Dynamic AI Zones

Make missions very quickly

Dynamic AI Zones


Untested: Alpha-Version


What this does:

It spawns automatically the desired numbers of enemies within the zones. All vehicles within the zone try to move on roads, enemies will either spawn in group and roam around the sector or spawn as individual contacts inside buildings.


How to use this:

- Copy / Past the FP Folder from the sample mission to your mission file

- Create a zone where you want to have enemies, for instance a town

- Adjust the trigger



I am only going to explain you the "On Activation" statement, since i truely hope, anyone know how to use a trigger. If not, just copy past mine frome the sample and adjust its size or use any from the framework.


Sample activation line:


Code
_nil = [thistrigger, 15, 5,["I_G_Offroad_01_armed_F","I_Truck_02_transport_F"], 3, ["I_MRAP_03_F","O_APC_Wheeled_02_rcws_v2_F"], WEST, true] execVM "FP\DIZ\diz.sqf";

1.) Thistrigger: It is a predefined variable for the trigger, therfore do not modify this

2.) 15: Number of infantry forces within the trigger you want to spawn in


3.) 5: Number of vehicle contacts within said zone

4.) ["I_G_Offroad_01_armed_F","I_Truck_02_transport_F"]: Array with the vehicle class names. Just place any vehicle down, right click on it Log > Log classes to clipboard to copy its class name. Insert it into said line, to spawn that sort of vehicle. you can use all ground vehicles except boats, since all contact only spawn on ground


5.) 3: Number of vehicle contacts within said zones (for heavier vehicles, e.g. Tanks or APCS

6.) ["I_MRAP_03_F","O_APC_Wheeled_02_rcws_v2_F"]: Array with the class names of the vehicles, see above.


7.) WEST: Side of the forces to spawn, you can also use EAST or GUER for the respective forces.


8.) true: this option enables or disables enemy spawns inside buildings. True = enabled, false = disabled.



Example: _nil = [thistrigger, 15, 5,["I_G_Offroad_01_armed_F","I_Truck_02_transport_F"], 3, ["I_MRAP_03_F","O_APC_Wheeled_02_rcws_v2_F"], EAST, true] execVM "FP\DIZ\diz.sqf";

  • Version

    Changelog:

    - WP fixed for vehicles.

    - Minimum Infantry group size increased to 3.

    - Added more classes for more variety

  • Version

  • Gonna write it here now that I've tested it so I don't forget


    • Transport vehicles have no cargo units, so they are not really a threat (trucks etc)
    • Vehicles seem to get a very concentrated waypoints in some areas, around their starting position. (Actually their entire waypoints are in a cluster)

      01b45e3709b5cc1c424f036d37db374b.png
    • All units are riflemen, which means they'll have 60% chance of spawning AT for every unit on the map, we need to add more classnames and use random select for it so it becomes like SpawnGroup function in FW. I spawned in 105 units in total and 61 of them had AT, I think that will be a bit too much for our mech ops :D

      d4b12fc312934003c0048533f4eed196.png
    • Perhaps we should use safe waypoints for all vehicles so they stick to roads, same for infantry, make them move in columns and not alerted and rushing around, makes it look more realistic. Instead of using limited speed on waypoints, I believe this will slow them down in combat too which is not preferable.
    • Possibly add control in a internal settings file for group sizes for infantry, as they are random but could also leave like 1 dude patrolling alone in his own group. I think having even numbers will be better, 4-5 dudes per group seems to always add more flexibility for the enemy when they move around.


    Overall it's a great start for a Dynamic system for spawns and patrols, I think this should get our main focus rather than the random objectives thing, because that will require a lot of work just to get started. This already has a start and now we just gotta perfect! Good shit!

    • I've addressed all issues above and changed them. Now vehicles should stick more to the road and get WPs in a bigger area since i've removed the safezone but replaced it with a bigger WP completion area. Classes have been randomized fully and synced to the FW. Minimum group size is now 3 units. I didnt change the thing with the cargo trucks, since it would be a massiv waste of units to fill up all cargo spaces in vehicles with units, therefore i only fill essential crew seats. I will add more vehicles as soon as i know which mods to use. At the moment, all vehicles are vanilla. If i add RHS / CUP it will create dependencies.

    • You can add 5 infantry in cargo for all transports, unless they have less than 5 cargo seats, then just fill the cargo seats. Trucks without cargo is pretty much useless, you can check my HuntBase script how its done. It doesn't have to be dependent on anything