Pause/place military or civilian placement module

  1. 8 years ago

    So as I understand it, you cannot change the force pool of a placement module during the mission as they are initialized at the mission start. However, I am looking for a way to change the force pool on a trigger. I know this has been asked before, but I couldn't find anything on search about it. Basically so that on a trigger activation you have reinforcements arrive, etc. Is it possible to just place the module, and then initialize it paused and then unpause it using the module script snippet?

    Ie:

    ["MILITARY_PLACEMENT_MODULE"] call ALiVE_fnc_unPauseModule;

    If this is the case, could you use a custom variable name for the module?

  2. Friznit

    22 Jul 2016 Administrator

    You can add/remove a number to the global forcepool, allowing AI commander to replace destroyed groups with a logistics request. This is basically how Dynamic Replacements work already, with force pool numbers increasing as objectives are captured.

    If you want more direct control as a mission maker, i suppose you could use the Military Logistics test functions to force a logistics demand.

    The wiki scripts page has info on both of these approaches

  3. Is it possible to just place the module, and then initialize it paused and then unpause it using the module script snippet?

    Ie:

    ["MILITARY_PLACEMENT_MODULE"] call ALiVE_fnc_unPauseModule;

    If this is the case, could you use a custom variable name for the module?

    I'd like to second that question too actually, would be really useful for creating SF type scenarios with players clearing an airfield in advance of a full invasion.

  4. Friznit

    22 Jul 2016 Administrator

    Easier to add more objectives than pause modules and less likely to break dependencieS

  5. I thought that changing the global force pool only effected the military logistics level. For example, you could have an objective module with 100 profiles, military logistics set to 100, change the global force pool to 1000, and increase the number of replacements the OPCOM has, but it won't place 1000 profiles.

    I want more placement. For example you start with 100 profiles, then capture an area that gives you 100 more profiles to work with, for a total of 200 profiles on the map, not just available for replacement.

    I understand I can add an objective easily with the script snippets, thus allowing the OPCOM to prioritize areas it did not before, but is there a way to actually get more units placed/profiled? Not just available for logistical purposes, but to spawn more units.

  6. Just thought of a possible workaround patpowercat; you could place a load of units off on one corner of the map with simulation etc disabled for performance and on a trigger have ALiVE profile all unprofiled units (excluding the units you don't want to profile with a script in their init), thus adding them to the OPCOM force pool. Might increase the amount of BCRs too?

    Would be much easier and less performance costly to unpause an individual module if that was on option though.

  7. It would be much easier to just create profiles instead of a placement module (which would also eventually run the objective count in the mission super.

  8. Ah yes, of course it would! Ignore my suggestion. Forgot you could do that.

  9. Friznit

    22 Jul 2016 Administrator

    Yep, the first script snippet on our wiki is for creating new groups and profiling them.

  10. Just so I make sure my little brain is understanding all this:

    1. The first script snippet you mention Friznit, save it as fnc_spawnProfileGroup.sqf
    2. Add to my init.sqf: ALIVE_spawnProfileGroup = compile (preprocessFileLineNumbers "fnc_spawnProfileGroup.sqf");
    3. Have trigger or whatever and set up the array as in the example snippet.

    My question is however: at what point are the groups profiled? When they get to their destination waypoint marker? Or are they profiled as soon as they spawn?

    Second question: This seems great for a single group or small team, but what if I wanted to add another 100 profiles? Just lot's of writing in groups?

  11. They are profiled at spawn.

    Second question: This seems great for a single group or small team, but what if I wanted to add another 100 profiles? Just lot's of writing in groups?

    Look in x_lib\config for configGetRandomGroups

    Just have a for loop that spawns 50 - 100 groups, each one with a randomly selected group.

  12. Look in x_lib\config for configGetRandomGroups

    Wut? We may both be speaking english, but I have no clue what you're saying.

  13. Go into the functions view in Editor, select configFile in the first dropdown, then Select ALiVE in the second, then x_lib in the third. Scroll down the list and you should see configGetRandomGroup. This will give you the function that you can use to spawn in new groups. Give me a bit and I'll try to work out how (I'm still not very well versed in all this)!

  14. Edited 8 years ago by incontinenetia

    Okay, so you can call ALIVE_fnc_configGetRandomGroup and have that populate group names instead of typing them all out individually.

    So you can make a local variable, say something like _randomGroup and use that to populate group name instead.

    So in your trigger you could have (I think, like I said, very new to this!!):

    _randomGroup = ["Infantry","OPF_F"] call ALIVE_fnc_configGetRandomGroup; 
    [getMarkerPos "MarkerSpawn", false, getMarkerPos  "MarkerDestination", "_randomGroup", "OPF_F"] call ALIVE_spawnProfileGroup;

    Could someone a bit brighter than me verify that I'm not talking out of my arse here?

  15. Correct ^

  16. Well that's great news!

  17. So I can't get the random group to work. I am able to get groups that I specify to spawn as instructed by the script.

  18. Did you use the exact script snippet from above?

    If so then try this instead, there was a small typo

    _randomGroup = ["Infantry","OPF_F"] call ALIVE_fnc_configGetRandomGroup; 
    [getMarkerPos "MarkerSpawn", false, getMarkerPos  "MarkerDestination", _randomGroup, "OPF_F"] call ALIVE_spawnProfileGroup;
  19. Edited 8 years ago by patpowercat

    No dice. Without the quotations around _randomGroup I cannot use the ALIVE_spawnProfileGroup. When I do use quotes, nothing spawns.

  20. Edited 8 years ago by SpyderBlack723

    Try this instead, uses a different function

    _randomGroup = ["Infantry","BLU_F"] call ALIVE_fnc_configGetRandomGroup; 
    _profiles = [_randomGroup, getPosATL player, random 360, true, "BLU_F"] call ALIVE_fnc_createProfilesFromGroupConfig;

    Make sure the ALiVE required and Virtual AI System modules are placed

  21. Newer ›
 

or Sign Up to reply!