A Handful of tweaking questions

  1. 7 years ago

    I've been playing around with and am trying to tweak a few of the ALiVE features just trying to get a solid idea for the direction I wanted to head in, after having a few problems with my first attempts I decided to really sit down and study the wiki, and get a feel for as many elements as I can before committing to an idea. A couple of ideas came to me and in my reading I haven't been able to find some of the information I wanted to tweak a bit more.

    I love the multi-spawn insertion option, I feel it really adds a touch to the realism element that I've not been able to find in any other respawn options I've used prior to ALiVE, but I was wondering if there is anyway to edit which helo is used for the insertion and/or customize it's inventory?

    Upon digging a bit deeper I found two functions for which I've not been able to find a whole lot of documentation, `["MyCustomVariable",_value] call ALiVE_fnc_ProfileNameSpaceSave;` and `_value = "MyCustomVariable" call ALiVE_fnc_ProfileNameSpaceLoad;`. I was wondering if anyone could give me an example of how these can be used. These interest me for three reasons, I'm wondering if this would allow me to save two scripts that would essentially function as an "on" and "off", and then save that status so that in a persistent mission if the variable were saved while in the "off" position, when resuming a mission the game would recognize that it should be "off" and immediately execute that script as opposed to having to complete that objective again to have its effect.

    The other thing I hoped was that perhaps these two commands could allow for me to add certain items into persistence. Primarily one thing I wanted to capture in a scenario was solid use of player made mine fields, and the importance of placing and marking them carefully. I've not been able to really capture the use of a player minefield previously as without persistence the field gets cleared at restart with only a minimal chance of having been effective especially considering the amount of time it takes a player to set up a minefield properly.

    Finally I've been trying to find a way to add one of the Advanced ALiVE markers via script. Probably a sitrep or spotrep or something similar as a way to create some of my objectives. For instance I was hoping to add some custom placed intel objects that I could have interacted and then that intel on the map for custom side objectives to a mission. I feel this could create a much more organic feeling then having hard set mission objectives with pop up's and 3d icons, and allow players to determine if this is an objective that warrants pursuing currently or perhaps handling at a later time potentially after a save and restart. Could these commands potentially be used to save say 3 states to a variable, instead of just on/off but something like states of hasn't been found yet, has been found but not completed and has been found and completed.

    If anyone has any advice, or could point me towards some similar concepts in scripts/missions/or posts that I may have missed that I could dig through and try to understand these a bit better I would be very appreciative.

  2. Edited 7 years ago by SpyderBlack723

    I love the multi-spawn insertion option, I feel it really adds a touch to the realism element that I've not been able to find in any other respawn options I've used prior to ALiVE, but I was wondering if there is anyway to edit which helo is used for the insertion and/or customize it's inventory?

    I believe you can sync a helo object to the module, let me know if that doesn't work.

    ["MyCustomVariable",_value] call ALiVE_fnc_ProfileNameSpaceSave;

    It's pretty easy to use, you simply get to save a value corresponding to a key. This will be reloaded on a persistent save, so you can pull it on restart. It must be executed on the server to work properly (I believe, might have to check if it supports both now).

    ex.

    ["ScriptStarted", _started] call ALiVE_fnc_ProfileNameSpaceSave;

    Then in your init.sqf or wherever you want to check this variable on restart

    _scriptStarted = "ScriptStarted" call ALiVE_fnc_ProfileNameSpaceLoad;
    
    if (isnil "_scriptStarted" || {!_scriptStarted}) then {
        // start script
        ["ScriptStarted", true] call ALiVE_fnc_ProfileNameSpaceSave;
    };

    Actually that's a good example of everything in one snippet. Grabbing a variable, checking if it was saved, if not -- use a default value, otherwise react accordingly.

    Keep in mind those functions only work if you are saving your mission to profile namespace. The functions for saving when using a server are ALiVE_fnc_setData/ALiVE_fnc_getData.

    Cool idea with manually creating advanced markers via script. I'll have to look into whether or not there is an easy to use publically exposed function for doing so. Bump this ticket in 2 days if I haven't responded yet.

  3. Edited 7 years ago by TheDragon117

    @SpyderBlack723 First thanks for the response, and thanks for the example, I'm excited to see what I can do with that. For the time being I felt I'd use a local database while I'm playing with concepts, and possibly for my overall mission as I expect if I can save all the things I'd like to it will end up a considerable size and I didn't want to abuse the war room by uploading something so large.

    I just tried syncing to the re-spawn module with no luck unfortunately, I tried an empty helicopter and one with a crew from the the same faction. Interestingly enough though it does do something as the helo wasn't sitting where it was placed, but I did re-spawn in a standard ghost hawk. Thanks for the idea though.

    Also thanks for taking a look at the marker idea for me.

    Did you have any ideas on how I might add certain items to be saved in addition such as by class name for the mines?

    Thanks again.

  4. Deleted 7 years ago by TheDragon117
  5. The helicopter for multispawn might need to belong to the same faction as the player.

    You can also try running

    ALiVE_SUP_MULTISPAWN_TRANSPORT_BLU_F = "your helicopter classname here";

    in your mission's init.sqf file. You would replace BLU_F with the player's faction. For example, if you were playing as CSAT, it would be

    ALiVE_SUP_MULTISPAWN_TRANSPORT_OPF_F = "your helicopter classname here";

    Did you have any ideas on how I might add certain items to be saved in addition such as by class name for the mines?

    You could save an array of information when checking/setting whether or not the script was started. For example,

    _minesPlaced = "MinesPlaced" call ALiVE_fnc_ProfileNameSpaceLoad;
    
    if (_minesPlaced) then {
        _minesInfo = "MinesInfo" call ALiVE_fnc_ProfileNameSpaceLoad;
    
        _minesInfo params ["_mineClassnames","_mineCenter","_mineRadius"];
    };

    Then use such loaded information to run a script to replace the mines.

  6. It seems it is possible to create an advanced marker via script, but it is very unfriendly and convoluted - requiring a lot of information in that doesn't make much sense unless giving the marker creation UI.

  7. Thanks for the additional information there, I'll give that a shot. If I could trouble you for another piece of advice, since a large portion of these things are server only, would the initserver.sqf be an acceptable place to put a fair amount of this? or would the standard init.sqf be more appropriate. I've only played with init.sqf and initplayerlocal.sqf's previously, but it seemed it might be a way to make sure things are executed on the server only. If I understand it properly init.sqf would be running unnecessarily on the client as well?

    @SpyderBlack723 It seems it is possible to create an advanced marker via script, but it is very unfriendly and convoluted

    I appreciate you taking the time to look at that, it definitely sounds like something that's probably outside of my skill set at the moment, maybe I'll try give that a shot when I'm a bit more experienced unless I've found another clever method before then. On a related note, I can test it out and see if its not something you know off of the top of your head, but would a diary entry be saved by AliVE by default or would I need to use the other method you've given me examples for to try and capture that through a script?

    I appreciate your explanation of the tools above and look forward to trying to make something with them thanks for your help.

  8. Just a correction, mostly for the benefit of anyone who might come across this looking for similar information. Syncing does work on the multi-spawn insertion vehicle, upon closer inspection I realized that I had placed a vehicle that has 2 versions in 2 different factions and apparently used the wrong one.

    Though it appears it does not use the inventory given to the vehicle but instead reverts back to the default inventory for the class name.

  9. Friznit

    16 Jun 2017 Administrator

    It doesn't use the actual vehicle but just takes the classname from the synced object. Bit confusing but that's how it works!

  10. Edited 7 years ago by TheDragon117

    I gathered after I finally got it working. Is there anyway to interact with the inventory of the vehicle for insertion? like a way to set an init for the vehicle that will spawn? Or perhaps eventually a feature that might be implemented as you can use an init on some of the other vehicle modules like CAS I believe. One of the drawbacks of using ACE on almost any mission I make is that all vehicles spawn with medkits and FAKs which don't let my players resupply on any critical equipment lost while in the field.

  11. On a related note, I can test it out and see if its not something you know off of the top of your head, but would a diary entry be saved by AliVE by default or would I need to use the other method you've given me examples for to try and capture that through a script?

    If it's an asset created by ALiVE, it is saved, otherwise it is not.

  12. Thanks for the additional information there, I'll give that a shot. If I could trouble you for another piece of advice, since a large portion of these things are server only, would the initserver.sqf be an acceptable place to put a fair amount of this? or would the standard init.sqf be more appropriate. I've only played with init.sqf and initplayerlocal.sqf's previously, but it seemed it might be a way to make sure things are executed on the server only. If I understand it properly init.sqf would be running unnecessarily on the client as well?

    Either works, though if you use init.sqf, you must wrap the code with
    if (isServer) then {
    // .. code here
    };
    so that only the server runs it.

  13. Fantastic, Thanks so much for the information guys.

  14. @TheDragon117 One of the drawbacks of using ACE on almost any mission I make is that all vehicles spawn with medkits and FAKs which don't let my players resupply on any critical equipment lost while in the field.

    Keep in mind that when you have ACE installed, picking up a MEDKIT or FAK instantly "opens them up" and converts them to the appropriate bandages/auto injectors etc.

  15. @JD_Wang really I did not know this can't wait to try that out thanks for that tip that may just make my life a lot easier thank you.

 

or Sign Up to reply!