Initial Platoon/Company size for mil and civ objective

  1. ‹ Older
  2. 8 years ago
    Edited 8 years ago by HeroesandvillainsOS

    I've been debating on doing this for awhile so I have some questions. Ok, so my main gripe with ALiVE is with how inconsistent and seemingly random mission start forces can be (probably due to script errors messing with ALiVE's initialization) when relying on the mil/civ obj modules and the preset platoon/company/batallion sizes.

    With insurgencies, I need the spawns to be consistent from mission start to mission start, otherwise mission balance just gets killed when I don't know if 100 units or 50 units will be spread across the map initially. Or if I'll have 5 friendly forces to call in for reinforcement or 15.

    So I'm thinking, why don't I just manually place the initial units and sync them to the virtual AI module instead?

    If I decided to do this instead, what would I do with the objective modules to ensure the entire map was seen as objective worthy? I generally just let the civ/mil obj modules do all the work for me in this regard. Would I just keep them as is but change the forces to 0? And OPCOM would still recognize all of the mil/civ objects spread across the map and he'd still command these manually placed units to try to take these objectives like he normally would using the platoon/company/batallion sizes?

    And would OPCOM then begin to call in reinforcements like it always would, randomly based on the configs of the units and OPCOM's needs, or would ALiVE just replenish only the exact units I manually placed (example: Let's say I manually place two vehicles. Would OPCOM replace them with 2 vehicles or choose randomly based on how I set the other presets in the mil/civ obj modules?)?

    I need more control over what spawns just at the start of a mission, with the goal of things being more random as forces are killed and needs change and the mission progresses. Using the platoon/company/batallion presets in the modules does this really well with very little fuss. How can I achieve the same effect but just have more control over what spawns when the mission begins?

    Any details on how the systems work or any advice or input would be really really helpful. I've never just relied on manually placed units before so the concepts are new to me.

  3. Edited 8 years ago by marceldev89

    @HeroesandvillainsOS what would I do with the objective modules to ensure the entire map was seen as objective worthy?

    You can set the placement modules to Objectives only mode instead of Place units in the settings for those modules.

    @HeroesandvillainsOS And would OPCOM then begin to call in reinforcements like it always would, randomly based on the configs of the units and OPCOM's needs, or would ALiVE just replenish only the exact units I manually placed (example: Let's say I manually place two vehicles. Would OPCOM replace them with 2 vehicles or choose randomly based on how I set the other presets in the mil/civ obj modules?)?

    The reinforcements groups are always random and the amount is based on the number of groups that were spawned during mission start. That would (or should) also include the manually places groups/units.

    During init ALiVE builds an array with group counts for all group categories (see table below).

    Types      | Start amount
    =========================
    Infantry   |           16
    Motorized  |            4
    Mechanized |            4
    Armour     |            2
    SpecOps    |            6
    Plane      |            1
    Heli       |            2

    Sometime during the OPCOM analyze phase it will determine the % of groups there are currently and compare that to the threshold configured in the AI Commander module.

    Reinforcement type | Threshold
    ==============================
    Constant           |       90%
    Packets            |       75%
    Seldom             |       50%

    OPCOM will then request reinforcements for all the group types that need it (with a cap of 10 groups per group type EDIT: per OPCOM cycle).

    @HeroesandvillainsOS I need more control over what spawns just at the start of a mission, with the goal of things being more random as forces are killed and needs change and the mission progresses. Using the platoon/company/batallion presets in the modules does this really well with very little fuss. How can I achieve the same effect but just have more control over what spawns when the mission begins?

    You can, instead of placing them manually, use the Override X (where X is infantry, motorized, mechanized, amour or specops) options in the placement modules. That will (or should) always spawn exactly the specified number of groups and the group classes will be randomly selected.

    @HeroesandvillainsOS Any details on how the systems work or any advice or input would be really really helpful. I've never just relied on manually placed units before so the concepts are new to me.

    Here are some details for how the "normal" unit placing works and the weighting for it.

    With a force size of 800 the following group counts will be spawned during init. The Random weighting will just pick one of the other weightings randomly.

    Weighting  | Infantry | Motorized | Mechanized | Armored | Air | SpecOps
    ========================================================================
    infantry   |       64 |      0-13 |       0-13 |     0-8 | 0-2 |      16
    motorized  |       40 |        33 |       0-13 |     0-8 | 0-2 |      16
    mechanized |       40 |      0-13 |         33 |     0-8 | 0-2 |      16
    armored    |       40 |      0-13 |       0-13 |      20 | 0-2 |      16
    air        |       40 |      0-13 |       0-13 |     0-8 |  13 |      16
    specops    |       40 |      0-13 |       0-13 |     0-8 |  13 |      40

    With a force size of 400 the group counts would be as following.

    Weighting  | Infantry | Motorized | Mechanized | Armored | Air | SpecOps
    ========================================================================
    infantry   |       32 |       0-6 |        0-6 |     0-4 | 0-1 |       8
    motorized  |       20 |        16 |        0-6 |     0-4 | 0-1 |       8
    mechanized |       20 |       0-6 |         16 |     0-4 | 0-1 |       8
    armored    |       20 |       0-6 |        0-6 |      10 | 0-1 |       8
    air        |       20 |       0-6 |        0-6 |     0-4 |   6 |       8
    specops    |       20 |       0-6 |        0-6 |     0-4 |   6 |      20
  4. Edited 8 years ago by HeroesandvillainsOS

    Thanks @marceldev89 ! That's awesome! :) Your post was very informative! Thanks a million!

    OPCOM will then request reinforcements for all the group types that need it (with a cap of 10 groups per group type).

    For the sake of simplicity, let's forget about the 90%, 75% and 50% thresholds and just pretend it's always 100%. If ALiVE caps reinforcements at 10 groups per group type, what happens if you limit OPCOM to just infantry (I use 3CB BAF as my BLUFOR and infantry are the only groups available)? Will OPCOM only ever reinforce with 10 groups, even if I allow 100 infantry groups to spawn at the start of a mission? But they'd be able to call on 20 if I allowed motorized, and 30 if I allowed motorized and heli, etc? Am I understanding that right? Wouldn't that put infantry only or infantry and motorized only missions at a disadvantage over a long persistent campaign?

    You can, instead of placing them manually, use the Override X (where X is infantry, motorized, mechanized, amour or specops) options in the placement modules. That will (or should) always spawn exactly the specified number of groups and the group classes will be randomly selected.

    Unfortunately this is not the case. I wish it were. Don't get me wrong, I'm not blaming ALiVE for being the culprit. I just don't know why this keeps happening to me but it seems to me just about anything can break the ALiVE initialization process. Here's an example:

    Over the last several months, I have built several ALiVE insurgencies. The last phase of the mission making process was balancing BLUFOR and OPFOR starting forces. Using a profile counter in the debug window, along with monitoring current Operations in the Operations tab and debugging the Virtual AI module, I noticed right away that my initial forces would vary drastically every time I started the mission from the editor. For example, under the Operations tab, sometimes only a couple BLUFOR groups would be available on mission start. Then I'd simply back out of the mission again, click play again, and over a dozen would be available. And the profile counter would reflect the change too.

    Highhead was very kind to look at one of my missions in the editor and he noticed immediately that some errors were likely causing ALiVE difficulties during the initialization process. So I cleaned them and everything was much better and much more consistent.

    One example is a mission I made on Reshmaan Province which is broken again. This mission (like all of my missions) strictly relies on the overrides.

    https://forums.bistudio.com/topic/190913-alive-spcoop-1-8-prophet-a-series-of-missions-of-the-war-on-terror/

    Using the mil/civ objectives, along with a handful of cust obj, I meticulously balanced the initial profiles to average about 85 OPFOR and 70 BLUFOR on mission start. This would also give me around 11-15 friendly groups in the Operations tab fighting the battle with me.

    Except now, after 1.60, again, when I start the mission, OPFOR spawns with anywhere from 60-110 profiles on mission start and BLUFOR gets around 40-50ish and only ever has 5 or so groups around the map in the Operations tab. This is with around 100 BLUFOR units allowed to spawn, though filtered to not be allowed to take small objectives. You can see how this would obviously not be very ideal to have a very random and wide range of starting forces depending on the luck of what you had when pressing play.

    It seems that every update has caused this problem to occur to me. I've been dealing with it off and on for months. I don't doubt that it's again related to some new error or conflict causing ALiVE's initialization to not work properly so don't get me wrong, I have no idea if ALiVE is the issue or not. I was pretty confident that this issue had been fixed after cleaning house as Highhead suggested (so much so that I released them on BIS forums!) but the problem is back again so the only real solution I can think of is to just manually place the units and not allow ALiVE to randomly do it on mission start at anymore.

  5. Edited 8 years ago by marceldev89

    @HeroesandvillainsOS For the sake of simplicity, let's forget about the 90%, 75% and 50% thresholds and just pretend it's always 100%. If ALiVE caps reinforcements at 10 groups per group type, what happens if you limit OPCOM to just infantry (I use 3CB BAF as my BLUFOR and infantry are the only groups available)? Will OPCOM only ever reinforce with 10 groups, even if I allow 100 infantry groups to spawn at the start of a mission? But they'd be able to call on 20 if I allowed motorized, and 30 if I allowed motorized and heli, etc? Am I understanding that right? Wouldn't that put infantry only or infantry and motorized only missions at a disadvantage over a long persistent campaign?

    Should've mentioned that the 10 groups limit is per every OPCOM cycle. If the threshold allows for it, all groups will eventually be replaced. Updated the post as well to avoid confusion for others. :)

    @HeroesandvillainsOS Unfortunately this is not the case. I wish it were. Don't get me wrong, I'm not blaming ALiVE for being the culprit. I just don't know why this keeps happening to me but it seems to me just about anything can break the ALiVE initialization process. Here's an example:

    ...

    If I look at the code that spawn the groups there's practically no reason for it to spawn less groups than what's defined in the override fields.

    Another thing to keep in mind is that the placement modules will, in addition to the groups spawned around the TOAR, also spawn 1 group for all "sectors" (sectors are derived from the grid that ALiVE uses to scan the terrain, a sector might contain 1 or more objectives. The grid is similar to the grid that's shown on the in game map but not necessarily the same dimensions.) that are occupied as guards. These groups are not counted with the override fields, so if 1000 guard groups are spawned it will still spawn the number of groups defined in the override fields (it's actually normal groups first then guard groups but you get the idea). If that group happens to have a "vehicle" another profile will be created for that.

    Same thing regarding "vehicles" applies to all the other groups being spawned. So for example, a tank group will have 1 "entity" profile (for it's crew) and X "vehicle" profiles for the number of vehicles in that group.

    ---

    If anything I just said hasn't provided you with an "aha!" moment and you still think that ALiVE is doing something weird, provide a mission that somewhat reproduces the issue without any extra mods and I'll take a proper look at what's happening exactly. :)

  6. So even with the test build of ALiVE Spyder just sent me, when I loaded the mission OPFOR spawned with 77 Profiles (very nice!). I exited back to the editor, hit play again, and they had 111 (not nice). Objectives went from 88 to 107.

    I'll start working on a simple vanilla mission now to see if I can repro.

  7. Edited 8 years ago by HeroesandvillainsOS

    @marceldev89

    I just wanted to update you. So I made a vanilla mission on Stratis, slowly adding my mods and scripts in one by one until I could duplicate my issue with the large discrepancy of profile spawns on mission start.

    Long story short, once I introduced this \author is not a value error in, I was able to consistently repro the problem.

    But here's the catch. I could only duplicate it when more than one object or mod that has this error was present.

    Example, Spyder Addons has this error. With just that being used the profile initialization was fine. So I added a CBA object (which has this error too) and BAM, the problems started.

    So I messed around for a while trying to see if it was the specific object and over and over, this profile problem would only occur if 2 or more instances of \author is not a value was present. So if someone is using two mods that both have this error, they will very likely encounter issues with ALiVE. I spent a good amount of time with this and feel pretty confident what I'm seeing is accurate.

    Also, even one instance of this error is enough to delay ALiVE's initialization. Example: I use a trigger to detect once all East profiles are dead to give me a "mission complete" screen. Anytime this error occurs, the trigger fires on mission start because the trigger is beating ALiVE to the punch. Without this author error, the trigger works and always has worked in the past.

    Anyway, I figured you guys should be aware of this, in the event someone else asks or sees this thread.

  8. Edited 8 years ago by marceldev89

    I guess those errors break different stages of the initialization list , causing it to continue with the next item on the list while it should have waited for it to finish. :(

    Can you also reproduce the same thing on a (local) dedicated server? It won't open an error popup on the server side so maybe it won't break things there?

  9. That's an interesting idea. I have not attempted to run the missions on a server. I figured they'd have the same issue lol and I've been trying to get them back in a state where I can 're-release' them back on BIS forums.

    Once I figure out where my Workshop mods disappeared to ( :) ) I'll see how it goes and get my server set back up.

    The only mission that has this error now, after I removed the faulty modules and objects, is the one I made on FATA because the map itself has the error and probably always will. I'll see how it goes.

    Thanks so much for all the help and spreading all that glorious knowledge. :) I learned a lot. You should hang out around the forums more often!

  10. Edited 8 years ago by HeroesandvillainsOS

    @marceldev89

    Or anyone for that matter. I have a question in extension to the conversation above about ALiVE's initialization in relation to OPCOM BCR unit types based on initial unit spawns.

    I'm trying something new. I have an OPCOM set to use three different factions. The reason being, the two I initially wanted to use don't have any Armored units so I decided to throw some into the mix.

    OPCOM has a mil obj module set to spawn infantry only and civ obj module set to spawn infantry and motorized units only. So to spawn the armored units, I placed a few cust obj modules, mainly because I only want these tanks to spawn in very specific areas.

    During the BCR process, will OPCOM replace these Armored units with more Armored units even though the mil/civ obj modules themselves don't allow it? I'm assuming OPCOM values cust obj's equally to civ/mil objs but before I commit to this approach, I guess I'd feel fuzzier and warmer if I could get a definite yes.

    My other idea was to make this faction with the Armored units have its own OPCOM but I figure there's no sense in adding more stuff if I can accomplish more with less.

  11. Yeah, as long as you've allowed armored reinforcements in the logistics module it should work. :)

  12. Edited 8 years ago by HeroesandvillainsOS

    What if that OPCOM is an Assymetric commander (it's not. Just curious)? Will he try to use the overrides I put in the modules instead?

    It would actually make sense to me if he doesn't (insurgents I don't think generally spawn endless tanks IRL). I'm just kind of wondering how that would work without a Military Logistics module now that we're on the subject (and for future reference).

  13. Edited 8 years ago by SpyderBlack723

    Asymm will only recruit more infantry

  14. That makes perfect sense. Thanks!

  15. @SpyderBlack723 The profile counter you linked here awhile back seems to be a dead link now. Do you still have that file handy by chance? I lost the code when I deleted my in-game profile.

  16. Edited 8 years ago by SpyderBlack723

    No I don't lol. I cleaned out my gisthub snippets, which is why the file is dead.

    I'll write another.

  17. Try this

    if (isServer) then {
    
    	_profilesBySide = [ALiVE_profileHandler,"profilesBySide"] call ALIVE_fnc_hashGet;
    	_profilesBySide = _profilesBySide select 2;
    
    	systemchat format ["Profile Count OPFOR - %1", count (_profilesBySide select 0)];
    	systemchat format ["Profile Count BLUFOR - %1", count (_profilesBySide select 1)];
    	systemchat format ["Profile Count INDEPENDANT - %1", count (_profilesBySide select 2)];
    
    };
  18. @SpyderBlack723 Try this

    if (isServer) then { _profilesBySide = [ALiVE_profileHandler,"profilesBySide"] call ALIVE_fnc_hashGet; _profilesBySide = _profilesBySide select 2; systemchat format ["Profile Count OPFOR - %1", count (_profilesBySide select 0)]; systemchat format ["Profile Count BLUFOR - %1", count (_profilesBySide select 1)]; systemchat format ["Profile Count INDEPENDANT - %1", count (_profilesBySide select 2)]; };

    That's even better than the old one. Thanks!

  19. Edited 8 years ago by SpyderBlack723

    And it worked on the first try? It's a scripting miracle!

  20. Edited 8 years ago by HeroesandvillainsOS

    All that call to prayer stuff you've done has really paid off. Somebody's listening. :)

  21. And that code for the Profiles counter would go in the Description.ext or the mission.sqf? I'd like to be able to give my players an approximate number of the enemy forces they are still facing on the map.

  22. Newer ›
 

or Sign Up to reply!