Jump to content
Enigx

[Release] Enemy Spawning System (ESS)

Recommended Posts

Enemy Spawning System (ESS)

by Enigx

 

Here my small contribution to Arma 3 community.

Enemy Spawning System (ESS) is a simple and stable script for mission makers to spawn AI units on areas placed on map from editor.

This ESS system is inspired to BangaBob's EOS system. I have used my spawning scripts for the core (created for other systems) to make a simple system especially useful for infantry spawning in single SP/MP missions. As a general configuration I used that of the excellent EOS system. Thanks to BangaBob!

 

Armaholic

Enemy Spawning System (ESS)

 

Hey, it seems Armaholic has been shut down!!

Alternatively, I added the file to this link which uses a personal external website (completely unrelated to the Arma game).


Features:

  • Spawn infantry units, static turrets and vehicles
  • A lot of preloaded units classname from different Mods
  • Simple and stable particularly suitable for SP/MP missions
  • Activation when players are close to the spawning area (ESS zone)
  • Particularly useful for patrolling units and inside buildings
  • AI units patrol the area without exit from it
  • Saving of server resources
  • Detailed guide step by step with addons
  • SP and MP compatible

 

Installation / Usage:

For instructions and information of how to use the ESS please refer to the included documentation and ESS_Call.sqf.

 

Notes:
Tested in many MP missions on dedicated without any problems.

TIP: spawn of vehicles should be done in areas with no or limited presence of buildings and objects. A procedure is present in the script to select a "safe" spawning position for vehicles (taken from findSafePos.sqf of EOS), in order to avoid their placing on buildings, trees, walls... but that's Arma!! and it is not excluded that on some maps and conditions, spawining could interfer with objects on map with unpredictable consequences :-) 


Credits & Thanks:
Special thanks to BangaBob for sharing his EOS system. This ESS system is inspired by that.
Special thanks to Shuko for sharing his SHK_pos - Random position generator system.
Special thanks to Zenophon for sharing his Infantry Occupy House system.

Thanks to Armaholic Community.


Changelog:

Version 1.1

  • Added the possibility to have each light vehicle full of infantry units, specifying a chance value.

 

Version 1.0
First official version 1.0

Edited by Enigx
Update download link
  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

Thanks, great work !!! Are there any way to add red markers wich will become green after clearing out all enemies in it (like in insurgency scenario) and despawn function (when player leave activated area its delete all spawned units)?

 

Share this post


Link to post
Share on other sites
4 hours ago, baton1990 said:

Thanks, great work !!! Are there any way to add red markers wich will become green after clearing out all enemies in it (like in insurgency scenario)?

 

 

Thanks baton1990!

Yes it could be possible to add this function, but it's not the aim of this system. It is mainly focused to the MP where you have a mission to accomplish in operative areas, so without markers to indicate or not enemy presence or despawn function. There are already systems that already do what you say (see EOS for example) and that was not the purpose I had when I developed it. I needed a lean, simple and stable system for my MP missions using a script I had developed for infantry units that did just that.

Cheers

Share this post


Link to post
Share on other sites

What is the main benefit of using this over EOS?

 

My unit has used EOS for several years now and is always looking for improved systems. Unfortunately nothing so far has topped EOS's flexibility.

Share this post


Link to post
Share on other sites
5 hours ago, n_icomach said:

What is the main benefit of using this over EOS?

 

My unit has used EOS for several years now and is always looking for improved systems. Unfortunately nothing so far has topped EOS's flexibility.

 

Hi, thank you for your reply.

As mission maker I have used the EOS for many times and it is an excellent flexible system. No discussion about that, and infact I used a similar architecture. The only remark that I can do is that sometime I noticed some sporadic AI infantry units tend to go outside the area forcing you to check them from Zeus to avoid they walk around the map. 

Maybe it's an effect that only I have had, I don't know. Anyway I created this personal system (using script done for a more complex gaming system in which the ESS is intergrated as dynamic spawning system when in-game), in which this effect doesn't happen and with which I have had a positive experience in my MP missions.

Of course It does not want to be pretentious or replace systems already in use and tested, but only my small contribution to share with the community, as many similar systems you can find on web. No more, no less :wink_o: :smile_o:

cheers

 

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, Enigx said:

 

Hi, thank you for your reply.

As mission maker I have used the EOS for many times and it is an excellent flexible system. No discussion about that, and infact I used a similar architecture. The only remark that I can do is that sometime I noticed some sporadic AI infantry units tend to go outside the area forcing you to check them from Zeus to avoid they walk around the map. 

Maybe it's an effect that only I have had, I don't know. Anyway I created this personal system (using script done for a more complex gaming system in which the ESS is intergrated as dynamic spawning system when in-game), in which this effect doesn't happen and with which I have had a positive experience in my MP missions.

Of course It does not want to be pretentious or replace systems already in use and tested, but only my small contribution to share with the community, as many similar systems you can find on web. No more, no less :wink_o: :smile_o:

cheers

 

Thank you for the reply!

I'll go ahead and give it a shot.

 

Thank you for your contribution to the community! 

Share this post


Link to post
Share on other sites

Hello Enigx,

 

Feature Request, is there a way we could have the zones ignore helicopters/airplanes?

Currently when a pilot is doing air things they are likely to trigger off zones accidentally, which causes a desync spike as units are spawned/despawned.

 

This is currently one of the best features of EOS.

Share this post


Link to post
Share on other sites
13 minutes ago, n_icomach said:

Hello Enigx,

 

Feature Request, is there a way we could have the zones ignore helicopters/airplanes?

Currently when a pilot is doing air things they are likely to trigger off zones accidentally, which causes a desync spike as units are spawned/despawned.

 

This is currently one of the best features of EOS.

any chance you have tried to lower the height of the trigger ?

so the trigger is like 500 X 500 X 25 

Share this post


Link to post
Share on other sites
32 minutes ago, Play3r said:

any chance you have tried to lower the height of the trigger ?

so the trigger is like 500 X 500 X 25 

AS far as im aware triggers dont count as markers, so im using markers.

Share this post


Link to post
Share on other sites
15 hours ago, n_icomach said:

Hello Enigx,

 

Feature Request, is there a way we could have the zones ignore helicopters/airplanes?

Currently when a pilot is doing air things they are likely to trigger off zones accidentally, which causes a desync spike as units are spawned/despawned.

 

This is currently one of the best features of EOS.

 

Hi,

the suggest of Play3r can be applied to your scope.

Open file ESS_system\functions\ESS_Launch.sqf. At line 24 it is defined the trigger for EZZ zone activation. Try to change the line

_essActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE]; 

with 

_essActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE , 100 ];    

// 100 (meters) is the height of the trigger. Modify it with your minimum flight altitude

Not tested but it should work.

Of course flying vehicles below the 100m will always activate it ☺️

Note: I don't know how it could work for infantry activation if ESS area is defined on mountains. You need to do some tests and find the optimized height limit.

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
22 hours ago, Enigx said:

 

Hi,

the suggest of Play3r can be applied to your scope.

Open file ESS_system\functions\ESS_Launch.sqf. At line 24 it is defined the trigger for EZZ zone activation. Try to change the line


_essActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE]; 

with 


_essActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE , 100 ];    

// 100 (meters) is the height of the trigger. Modify it with your minimum flight altitude

Not tested but it should work.

Of course flying vehicles below the 100m will always activate it ☺️

Note: I don't know how it could work for infantry activation if ESS area is defined on mountains. You need to do some tests and find the optimized height limit.

Thank you for the feedback. I misunderstood what Play3r was attempting to inform me of apparently.

 

I'll go ahead and mess with that on my end.

Thank you!

Share this post


Link to post
Share on other sites
4 hours ago, n_icomach said:

Thank you for the feedback. I misunderstood what Play3r was attempting to inform me of apparently.

 

I'll go ahead and mess with that on my end.

Thank you!

Well i could just have told you where to look for the trigger height, but i was sure you did know where to look.

And you have tried to look in the  ESS_Launch file. but glad that @Enigx did explain it better then i did.

 

Share this post


Link to post
Share on other sites

Can you fix few thing and add?
1. Enemies do not spawn in the water, applies to all inf, light veh, heavy veh, static weapon.

2. light vehicles would also have infantry. (80% chance that there is an infantry ride)

 

Share this post


Link to post
Share on other sites
18 hours ago, Casio91Fin said:

Can you fix few thing and add?
1. Enemies do not spawn in the water, applies to all inf, light veh, heavy veh, static weapon.

2. light vehicles would also have infantry. (80% chance that there is an infantry ride)

 

 

Hi,

thanks for your comments.

1. I removed water spawning because I think it has no sense. Do you really want soldiers swiming into water or BTR in the deep sea? 😊

Anyway if you want it you can change few strings as follows:

 

-) For infantry

In file ESS_Launch.sqf, at lines 43-55, change

    _p1 = [_ESSAreaMkr] call SHK_pos;
        
    sleep _TempSpawn;
    _p2 = [_ESSAreaMkr] call SHK_pos;
        
    sleep _TempSpawn;
    _p3 = [_ESSAreaMkr] call SHK_pos;
        
    sleep _TempSpawn;
    _p4 = [_ESSAreaMkr] call SHK_pos;
        
    sleep _TempSpawn;
    _p5 = [_ESSAreaMkr] call SHK_pos;

with

    _p1 = [_ESSAreaMkr,true] call SHK_pos;
        
    sleep _TempSpawn;
    _p2 = [_ESSAreaMkr,true] call SHK_pos;
        
    sleep _TempSpawn;
    _p3 = [_ESSAreaMkr,true] call SHK_pos;
        
    sleep _TempSpawn;
    _p4 = [_ESSAreaMkr,true] call SHK_pos;
        
    sleep _TempSpawn;
    _p5 = [_ESSAreaMkr,true] call SHK_pos;

-) for light veh, heavy veh, static weapon

In file findSafePos.sqf, at line 5, change

_pos = [_mrk] call SHK_pos;

with

_pos = [_mrk,true] call SHK_pos;

That's all.

 

You can find additional options into SHK script "shk_pos.sqf". if you want 

 

2. Explain me better. Do you want: 

- each light vehicles to be 80% full?

or that 

- 80% of them are full? (this is no easy to implement)

or that 

- everyone has an 80% chance of being full? (maybe this)

Now the system spawn only driver and gunner if vehicle provided with gunnur postation.

Share this post


Link to post
Share on other sites

i think is best option:

1 hour ago, Enigx said:

- everyone has an 80% chance of being full? (maybe this)

Now the system spawn only driver and gunner if vehicle provided with gunnur postation.

 

I don’t want infantry to swim in the ocean, but for some reason some spawn in the ocean. (better explained)

Edited by Casio91Fin

Share this post


Link to post
Share on other sites
On 2/20/2021 at 11:15 AM, Casio91Fin said:

i think is best option:

 

I don’t want infantry to swim in the ocean, but for some reason some spawn in the ocean. (better explained)

 

I have included your suggestion in version 1.01.

Now each light vehicle has a chance to be full of infantry units. Chance (%) can be specified in the ESS call with a value from 1 to 100. 

Set 1 to have only driver and gunner, 100 to have all light vehicles full.

Of course in your case put 80.

Spawning in water not implemented, so change strings as I've already written in previous post to have this function. 

Updated version soon available on Armaholic link.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks a lot doing this. Its really very good and I appreciate what you've done with it.  I'm just annoyed that I've only seen this today ! But will be very useful, for my missions going forward. 👍

Just one question. The area markers are visible on the map. Am I missing something ?  I can take a look through your functions and see if there is an "alpha 0" option, but just wondering if I missed something ? I don't see an option in the array.

Thanks.

UPDATE:
Ignore me, its me being dumb. It's fine. 

Share this post


Link to post
Share on other sites

Hi @Duke101,

Thank you. I'm glad you like it.

Take a look at the other systems too if you are interested.

Cheers

Share this post


Link to post
Share on other sites

hey nice clean script and like that you are using zens occupy house script. my favorite house spawn script btw.

 

I had some ideas to which you may think about adding. 

 

I feel its missing flying vehicles, have an option to add planes or heli's to patrol the air

 

you have everything spawning in at 50 m of marker. could you make it more random at distance and direction? say lite vehicles are more 75-125 meters from marker, random direction. 

 

could the statics have an option to spawn sandbags or some cover around the position? for example, if static high perhaps some cover or sandbags vs static low nothing.

 

EOS has an enemy reinforcement script added that worked sometimes. may be you could add this option as well. perhaps defend an area for x time with waves of ai attacking 360 or something. ai infantry attacking seems to be the easiest cause the vehicles just get stuck or drive off. 

 

I think your master system looks good too and an example mission or video would be a great addition. Something to showcase everything. right now I see a lot of script and say well it may be cool. Also the mod dependencies pushes me away. 

 

great work and thanks for your additions. I will be using this for missions. I may edit it some but i typically break stuff.

Share this post


Link to post
Share on other sites

Hi @jandrews 

thank you for your feedback.

 

On 12/18/2021 at 2:49 PM, jandrews said:

 

I feel its missing flying vehicles, have an option to add planes or heli's to patrol the air

 

I created this system for missions, in particular for infantry, so I don't believe this improvement is so useful. I think one or two flying vheicles can be placed on map by editor directly.

Furthermore, helicopters and planes are always difficult to manage and always do the opposite of what you tell them !

 

On 12/18/2021 at 2:49 PM, jandrews said:

you have everything spawning in at 50 m of marker. could you make it more random at distance and direction? say lite vehicles are more 75-125 meters from marker, random direction. 

It's not correct. 

For infantry inside the buildings, they spawn in random position on marker (in all the area) and then placed inside the closer building searched in a radius of 50m from this position.

The same for vehicles and static, they are generated in a random position and then a "safe" position is searched for their positioning around this (radius of 50 m).

For directions, waypoints are placed always in all the area, guaranteeing every direction.

 

On 12/18/2021 at 2:49 PM, jandrews said:

could the statics have an option to spawn sandbags or some cover around the position? for example, if static high perhaps some cover or sandbags vs static low nothing.

 

It's an interesting improvement. I'll think about it

 

On 12/18/2021 at 2:49 PM, jandrews said:

EOS has an enemy reinforcement script added that worked sometimes. may be you could add this option as well. perhaps defend an area for x time with waves of ai attacking 360 or something. ai infantry attacking seems to be the easiest cause the vehicles just get stuck or drive off. 

I've already done a system that does it with defending areas and random ai attacks from 360 through random routes.

See here 

other system here below, where random enemy attacks are created on SPECIFIC ROUTES placed on the map from the editor. I used it in a lot of missions.

 

On 12/18/2021 at 2:49 PM, jandrews said:

I think your master system looks good too and an example mission or video would be a great addition. Something to showcase everything. right now I see a lot of script and say well it may be cool. Also the mod dependencies pushes me away. 

 

 

There is already a mission example in the download. The user guide is also quite comprehensive.

For a video.. ehm... my english is not so good, sorry 🙂 

 

Thanks for your comments, I will keep them in mind in the next system release.
Glad you use it. Let me know what you think

Share this post


Link to post
Share on other sites

Hey there, I'm running into an issue where Arma 3 is unable to locate the script file "ESS_system\functions\ESS_Launch.sqf". The error message I'm receiving is that the aforementioned .sqf file cannot be found. 

I have checked the following:

File and folder names are correct and their capitalization matches exactly.

Directory structure is YourMissionFolder\ESS_system\functions\ESS_Launch.sqf.

The file ESS_Launch.sqf has the correct .sqf extension.

The ESS_system folder is located in the mission's root directory.

Despite all of these checks, I'm still receiving the error that "ESS_system\functions\ESS_Launch.sqf" cannot be found.
Thanks in advance!

Share this post


Link to post
Share on other sites

HI, I just read your question (and the email on my website) just now.

The path to the file is that, there are no errors. It's hard to understand why it gives you the error without seeing in detail how you set up the call instructions.
Let me understand, do you activate the call via a trigger in the editor?
Remember that in the triggers you must also put the initial "null" otherwise I remember you will get an error.

Something like that:

null = [0,east,"ESS_1",[10,4],[5,1],[3],[1,1,80],[1,1],500] execVM "ESS_system\functions\ESS_Launch.sqf";

If you can, post me some instructions you use.

 

Share this post


Link to post
Share on other sites

Thank you so much for your quick response. Yes, you are right, I have been activating the call via a trigger in the editor.

I've made sure to include the initial "null" in the trigger call, like so:

 

null = [FACTION,SIDE,"MARKER",[NUM_TEAM_ROAD,MAX_UNITS_PER_TEAM_ROAD],[NUM_TEAM_HOUSE,MAX_UNITS_PER_TEAM_HOUSE],[STATIC],[LIGHT_VEHICLE,BEHAVIOR_LGH,CHANCE],[HEAVY_VEHICLE,BEHAVIOR_HVY],DISTANCE] execVM "ESS_system\functions\ESS_Launch.sqf";
 

The path to the file appears to be correct and, to my understanding, matches the path in the trigger call. Still, I continue to receive an error indicating that the script file cannot be found.

Here's the folder structure of my mission for your reference:

MPMissions
  \MyMission
     \ESS_system
        \functions

           ESS_Launch.sqf
        ESS_Call

   initServer.sqf

   description.ext

In the description.ext, I've defined ESS_Call and ESS_Launch functions like so:
Within the initServer I have placed the 
[]execVM "\ESS\ESS_system\ESS_Call.sqf";

some within the arma discord had suggested setting up the description.ext with the CfgFunctions, I was actually in the middle of testing that when I saw your response. and heres what i have so far.  

class CfgFunctions {

    class ESS {

        class Functions {

            class initialize {

                file = "ESS\ESS_Call.sqf";

                preInit = 1;

            };

            class spawnGroup {

                file = "ESS\functions\ESS_Launch.sqf";

            };

        };

    };

};
again thanks for the reply. let me know if you need any more context

Share this post


Link to post
Share on other sites

Oh one more thing this is on a custom map Tschernobyl. Idk if this is a factor. 

Share this post


Link to post
Share on other sites
9 hours ago, Reggedon said:

Thank you so much for your quick response. Yes, you are right, I have been activating the call via a trigger in the editor.

I've made sure to include the initial "null" in the trigger call, like so:

 

null = [FACTION,SIDE,"MARKER",[NUM_TEAM_ROAD,MAX_UNITS_PER_TEAM_ROAD],[NUM_TEAM_HOUSE,MAX_UNITS_PER_TEAM_HOUSE],[STATIC],[LIGHT_VEHICLE,BEHAVIOR_LGH,CHANCE],[HEAVY_VEHICLE,BEHAVIOR_HVY],DISTANCE] execVM "ESS_system\functions\ESS_Launch.sqf";
 

The path to the file appears to be correct and, to my understanding, matches the path in the trigger call. Still, I continue to receive an error indicating that the script file cannot be found.

Here's the folder structure of my mission for your reference:

MPMissions
  \MyMission
     \ESS_system
        \functions

           ESS_Launch.sqf
        ESS_Call

   initServer.sqf

   description.ext

In the description.ext, I've defined ESS_Call and ESS_Launch functions like so:
Within the initServer I have placed the 
[]execVM "\ESS\ESS_system\ESS_Call.sqf";

some within the arma discord had suggested setting up the description.ext with the CfgFunctions, I was actually in the middle of testing that when I saw your response. and heres what i have so far.  

class CfgFunctions {

    class ESS {

        class Functions {

            class initialize {

                file = "ESS\ESS_Call.sqf";

                preInit = 1;

            };

            class spawnGroup {

                file = "ESS\functions\ESS_Launch.sqf";

            };

        };

    };

};
again thanks for the reply. let me know if you need any more context

 

Check your folders path. The "ESS\" folder of description and initserver lines doesn't exist in your strutture!

You should get an error already when the server starts, when the initserver.sqf is loaded.

Let me know

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

×