Jump to content

Recommended Posts

Hi all,

I'm about to add a new module in MGI Advanced Module addon, for spawning any groups you want, any time... (done)

This module allows:

- to spawn any group, even customized, on any side,

- spawning on multiple possible areas (triggers)

- with a wide randomized choice  or a very specific group.

 

You can place several modules on the map, each of them have their own parameters;

1. Choose the side (applies to all groups spawned from a module, no matter the initial vanilla side). So civilian units can be aggressors.

2. decide if you want to spawn:

    * at total random (so the groups are picked in cfgGroups, but for the side you chose (normal limitation)

    * at randomized or specific faction(s)  . They must exist in cfgGroups (not all factions from cfgFactionClasses are available for groups). All factions (cfgGroups) are available so not depending, here, on the final side

    * You can filter these first possibilities by the type(s) of groups. For example, "infantry" and/or "motorized" and/or "armored"... But, these types must exist in the cfgGroups.

    * you can choose to spawn a specific group (from cfgGroups).. or even an array of units, vehicles... or even an edited group (with all customized textures, pylons, loadouts...)

    * linked group(s) on module, customized or not, will be candidates for spawning. That's fine for spawning not existing groups such as air or sea patrols.

3. Choose the attitude: behavior, combat mode, formation...

4. choose the repeat sequence (limitation and delay

5. decide on what condition groups module can spawn (not only at start, but any time!)

6. decide for a simple task (or not). Chase players, enemies, defend...

7. run a code for each group  (useful for specific task)

 

ArmA%203%20Screenshot%202021.01.07%20-%2

 

MODULE(S) IN 3DEN - Position/ area of the module(s) if no synced trigger area. Direction of the module, in 3den, is the direction of the group (if no synced trigger area)

SYNCED TRIGGER AREA(S) - The position, area and direction of the module doesn't matter any more. The group(s) are spawning at randomized positions in randomized trigger area(s), with the direction of the trigger area.

SYNCED UNIT(S) - In 3den, you can place (customized or not) group(s) with the module(s). No matter if you synced one (leader or not) or several units of a group, with the module. The group will be candidate for spawning.

 

 

PARAMETERS


SIDE - Definitely the side of your group(s) for this module.
No matter the choice you did (edited group, chosen faction(s), or type(s) of group or group(s)..) What ever you spawn we belong to this side.
--> But, if you let the module at full random (no synced group, no, faction, no type, no group), in this case, the randomized group is picked among the native possibility from cfgGroups.

So, if you just select a side (say EAST), you'll spawn randomized groups(s) from OPFOR.

 

HOW MANY GROUPS - The number of group(s) to be spawned at each occurrence. Randomization will depend on the possibility of what you want to spawn, so your choice)
Min 1 max 12 (limited for performance saving when spawning heavy customized groups. Feel free to add other modules)

 

NOTE: The modules works with edited groups or existing configs/classes of groups in cfgGroups (see config viewer from console).

So, scripted groups have always the architecture:

                    configFile >> "cfgGroups" >> "side" >> "faction"* >> "type of group" >> "group"  ... then units/vehicles for each group

Example: side like "Indep" , faction like "IND_E_F", type like "infantry",  group like "I_E_InfSquad"

 

FACTION(S)* - If empty, no filter about them. If filled without any more details (type(s), group(s) )  all available factions in cfgGroups can be used to spawn any child type, then any child group.

But ⚠️ all current faction names can't work. Some existing factions in cfgFactionClasses are not present in cfgGroups. For example: "CIV_IDAP_F" (IDAP civilian faction has no group) or even "OPF_V_F" (Arma Viper) can't work in the architecture of cfgGroups. (for Viper, the only group defined in: configfile >> "CfgGroups" >> "East" >> "OPF_F"  >> "SpecOps" >> "OI_ViperTeam" exits. So at faction level, there is nothing to do).

You can fill the parameter with a working class like: "OPF_F" , or the config (configfile >> "CfgGroups" >> "East" >> "OPF_F"), or an array of these possibilities. Not case sensitive.

 

TYPE(S) - if more a filter about what you want to spawn. That should be simple as "infantry" or " motorized or mechanized" or "armored". That doesn't. Even in Arma vanilla, you can find exotic classes as "motorized_MTP". Any dev has his own mind to sort the groups by types. The reason is probably the way you can find sorted groups in 3den's right panel. But, it's just impossible (or needs an updated list of hundreds of names) to filter groups easily. You have to do that job, if you want to do so, writing a config or a class or an array of that, for filtering the type(s). Not case sensitive but do not make typo's error! If wrong, there is no more filter.

You can fill the parameter with a working class (not the config) like: "specops", or an array of these possibilities.
 

Spoiler

 

Check each of them in cfgGroups, like this example :

configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "SpecOps" // OK

configfile >> "CfgGroups" >> "East" >> "OPF_G_F" >> "SpecOps"  // doesn't exist . So, no filter as result.

 

 

SPECIFIC GROUP(S) - a step more for less randomization. You are at the group level. As factions, you can fill it with class (of group) or config or an array of these possibilities.

Much more, you can add arrays of units/vehicles class(es). That's also a way to customize some groups, but one the contrary of synced edited ones, you'll not able to define appearance for vehicles or pylons payload at this moment.

 

RADIUS AREA - radius of the module area, so the spawn area if no synced trigger areas. Useless if any trigger area synced.

 

GROUP(S) DIRECTION - orientation of the module in 3den (shift mousse drag) . Do not write anything on field (it's a result, not an entry). Useless if any trigger area synced.

 

GROUP(S) SKILL - As 3den, skill for whole group, with +/-10% randomized on each units.

 

ENABLE DYNAMIC SIMULATION - As in 3den. See Biki for detailed explanation (recommended)

 

CONDITION FIELD - checked every 2 seconds. So, much more convenient than a simple condition of presence at start! Feel free to do what you want but return a boolean.

Examples:

   * spawning only at night :  sunOrMoon < 0.5

   * strengthening weakened side :   INDEPENDENT countSide allGroups < 3 

   * waiting for more players :     count allPlayers > 2

   * even checking for 1000 m distance at least from any player:

   private _possAreas =  _logic getVariable "possAreas"; (count allPlayers > 0 && allPlayers findIf {private _plyr = _x;  _possAreas findIf  {_plyr distance _x#0 < 1000} == -1} == -1)

but that will not despawn or hide or disable the groups! See the dynamic simulation instead.

 

REPEAT OCCURRENCE - the added times for re-spawning the same groups (not at the same place) . 0 means no more occurrence. -1 means infinite repeat.

So if you want to spawn 3 times a group, set it to 2 (1 shot  + 2 added)

 

INTERVAL FOR REPEAT - A delay between 2 consecutive spawns , if the condition are met. If not, the spawn will wait for condition to be TRUE, then spawn, then wait for interval duration, then check for condition...

min 30 sec max 2 hours.

 

FORMATION OF THE GROUP - As usual. Sometimes this setting is reinitialized to default wedge. I didn't identify why. So check twice before OK button and save scenario.

 

BEHAVIOR - (or behaviour, sorry) Same as usual

 

COMBAT MODE - same as usual

 

SPEED MODE - As usual. same little problem as formation. Check twice.

 

INSIGNIA - I hope that works fine everywhere...

 

CODE FOR GROUP - Blank of any code (without {}). Passes parameters are <group> <<leader>,  <vehicles of the group> . For example, just write:

params ["_grp","_lead","_vehs"];  private _wp = _grp addWaypoint [<aPosition>,0]; _wp setWaypointType "MOVE"; _lead forceFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa"; {_x setFuel 0.2} forEach _vehs

 

No bracket, just like this.

 

BASIC TASK -  can be:

   * Do Nothing (the preferred one of dumb AIs)

   * Attack nearest known enemy. So the group will start after an enemy knowledge acquisition. Not before. I hope I managed air assets for chasing air assets... I can't imagine infantry running after a jet.

   * Chase nearest enemy. Same as above but the position of nearest enemy is known (for spawning attack waves for example)

   * Attack nearest Player (known enemy) . The group must acquire the detection of a hostile player.

   * Chase nearest player (enemy). The group will start the hunting on player's (updated) position.

   * Defend this area. some SAD waypoints in the area of the group(s).

 


known difficulties

- Mods like Unsung or CUP or RHS (all in fact) requires a sharp attention for the name of the factions/groups but also Types... of groups. You can't imagine hundreds of names for stupid things like "infantry" "armored" "mechanized" ... That should be normalized, but not!

- Too many mods, even non used by mission, but just loaded on server (so ticked), will affect the randomization for nuts, and lead to unwanted results like Arma or CUP units during Unsung play.

 

know bugs

all corrected so far

 

To do list:

- respawn without delay on whole group death

- add a filter for mods... A lot of work.

 

Enjoy!

All feedback welcome.

 

[RELEASED]

 

 

 

  • Like 3
  • Thanks 3

Share this post


Link to post
Share on other sites

WOW..this sounds interesting and very useful...Thank you for the hard work, mate!

Share this post


Link to post
Share on other sites

Should be released soon now: (done)

 

 

The 2 cent question:

Why should I use this module instead of placing my own groups in 3den ?

- In Arma, all presence conditions are checked at start. You can add triggers for enabling simulation and visibility and/ or for spawning/despawning groups but that demands some good knowledge...

- for example, if you randomize a little bit the position, or if you are using the basic BIS_fnc_spawnGroup, you'll experience some weird results. Example: try to spawn a tank platoon in town.

- you can also randomize on multiple areas;

- it's far easier to add conditions like spawning at night only (sunOrMoon < 0.5) or when a side is weakened, or what ever reason you want.

- just follow the video.

 

The other 2 cent question:

Why didn't you share a script instead of publishing a module, and why not a stand-alone module?

There are two many functions and sub-functions to share that in scripts. If you are using just one module, as for BI ones, you will not run all functions but only those which are necessary. So, full mod with all modules, and tiny mod with one module is same in game.

 

See you soon with updated mod.

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Added the notice in front page. That should be clearer.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×