Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

Ya sorry about that. First post, first mission editing.

This is one of the zones I'm using as a test. The zone will not go to green after killing all the infantry..

null = [["mrkr47"],[1,2],[1,1],[1,1],[1],[1],[1,1],[5,0,300,EAST,FALSE,TRUE]] call EOS_Spawn;

NP! Happens all the time on these forums. :)

Good news is I think I found your problem! In your unitpools you are missing your crew definitions! The other pools will tell EOS what *vehicles* to use but not who should be manning them. This is an example of the AAF independent pool (faction #2):

_diverPool=	["I_diver_exp_F","I_diver_F","I_diver_TL_F"];
_crewPool=	["I_crew_F"];
_heliCrew=	["I_helicrew_F","I_helipilot_F"];

Share this post


Link to post
Share on other sites

Thanks for the help Oktyabr!! Only problem is I can't find the crew pools for Massi's African Conflict anywhere. Everything else seems to be working great!

Share this post


Link to post
Share on other sites

I have been noticing a lot more desync when my zones activate since changing to this version. Anyone else noticing this?

Share this post


Link to post
Share on other sites
Thanks for the help Oktyabr!! Only problem is I can't find the crew pools for Massi's African Conflict anywhere. Everything else seems to be working great!

Just place one manually in the editor and copy the config name it gives you at the top, right corner of the unit selector, then paste that into the pool. If you can't find any then maybe African Conflict doesn't have dedicated crew personnel which means you'll have to sub a guy with a gun in their place. That's one of the neat things about EOS... you can put any unit (that you can find the config for) in any vehicle. I could have greek civilians manning NATO main battle tanks if I wanted :)

I have been noticing a lot more desync when my zones activate since changing to this version. Anyone else noticing this?

I haven't noticed any more... or any less (I get some desync on my mission regardless). I'll try to experiment a bit and pay more attention.

My question, two actually, about the helicopter spawning. Sometimes the helicopter (transport) lands, drops off troops and then takes off again. Other times it just seems to shut the engine down and park there. Is there a way to "encourage" the first result? Second question: Those troops that get out of the chopper... are they one of the group patrols from the call line, do they become one after they disembark, or are they just ambient eye candy?

Edited by Oktyabr

Share this post


Link to post
Share on other sites

My question, two actually, about the helicopter spawning. Sometimes the helicopter (transport) lands, drops off troops and then takes off again. Other times it just seems to shut the engine down and park there. Is there a way to "encourage" the first result? Second question: Those troops that get out of the chopper... are they one of the group patrols from the call line, do they become one after they disembark, or are they just ambient eye candy?

Helicopter transport is a real pain to make 100% reliable. As for the dropped patrol. They are an extra patrol ontop of everything in the call line. When they disembark they are given the same patrol script as the rest of the EOS units

Share this post


Link to post
Share on other sites
Helicopter transport is a real pain to make 100% reliable. As for the dropped patrol. They are an extra patrol ontop of everything in the call line. When they disembark they are given the same patrol script as the rest of the EOS units

Thanks for the reply! You might consider adding something to keep players from jumping on board such a heli when it lands... is there a way to "lock" it so the heli can drop it's troops without letting stowaways on board?

I wish there was some trick to getting AI vehicles to follow roads a bit better. They seem to do pretty well until they hit a 90 degree turn close to a building. Even a tip on some editor object I might try on some particularly tricky spots to keep vehicles from colliding with the corners of buildings would be sweet, if anyone has any suggestions?

EDIT-- I was just testing the heli land and take off bit again and I watched a little bird come in, touch down, and before any of the troops could disembark it took off again! They were already jumping... most of them survived it but the last two fell at least 60 feet unto cold, hard tarmac! LOL!

Edited by Oktyabr

Share this post


Link to post
Share on other sites

I'm so freaking happy I found this mod. I've been jumping from mod to mod looking for something like this. Finally something simple and efficient. I don't know if you have plans to implement civilians already, but please consider creating a civilian population script/marker. That would add the last dynamic to populating my maps. Awesome job bud. Really impressive, keep it up.

Share this post


Link to post
Share on other sites
I'm so freaking happy I found this mod. I've been jumping from mod to mod looking for something like this. Finally something simple and efficient. I don't know if you have plans to implement civilians already, but please consider creating a civilian population script/marker. That would add the last dynamic to populating my maps. Awesome job bud. Really impressive, keep it up.

This mod script has civilians too. Just add them like you do enemies.

Share this post


Link to post
Share on other sites
This mod script has civilians too. Just add them like you do enemies.

Yup!

My civs even have their own "motorized" calls! They aren't any better at navigating than the militarized versions but hey, it works! :)

Share this post


Link to post
Share on other sites

I'm working on a private Wasteland build for my friends. I love EOS. It allowed me to populate the island with AI in about 10 minutes. Thank you for the great documentation!

I haven't read the whole thread here (I'm working on it), but I have read the manuals.

Is there a way to increase spawn dispersion? I'd like to have a "cohesive" unit or units spawn inside of a city, but dispersed throughout the city. Right now they spawn in a pretty tight group. Also, most of these groups seems to spawn and start shooting themselves up. I can't figure out why that is happening. This is a sample of one of my spawn-lines:

null =[["Town_4"],[2,1],[2,2],[1,3],[1],[2],[1,2],[4,0,1000,EAST,FALSE,FALSE]] call EOS_Spawn;

Huge thanks, and the gang is wondering if there is a contribution box out there somewhere?

Edited by StaticDET5
Turn on notifications

Share this post


Link to post
Share on other sites

i think 4 its = WEST FIA FACTION

null =[["Town_4"],[2,1],[2,2],[1,3],[1],[2],[1,2],[4,0,1000,EAST,FALSE,FALSE]] call EOS_Spawn;

Share this post


Link to post
Share on other sites

I almost feel like I asked this before but I can't find the post where I did it! :D

Has anyone experimented with the dynamic creation of an EOS zone, during mission run time? I'd like to have, for example, a task to find and destroy an insurgent camp that is randomly placed on the map during the mission. This would require the generation of a new marker/zone and I wonder how difficult it would be (or even if it's possible at all) to have it be populated by EOS; i.e. creating a new EOS zone in the middle of a mission? If this isn't possible has anyone found any good work around for it?

Thanks in advance!

Share this post


Link to post
Share on other sites
I almost feel like I asked this before but I can't find the post where I did it! :D

Has anyone experimented with the dynamic creation of an EOS zone, during mission run time? I'd like to have, for example, a task to find and destroy an insurgent camp that is randomly placed on the map during the mission. This would require the generation of a new marker/zone and I wonder how difficult it would be (or even if it's possible at all) to have it be populated by EOS; i.e. creating a new EOS zone in the middle of a mission? If this isn't possible has anyone found any good work around for it?

Thanks in advance!

Yup, this works fine.

You can't move an active EOS zone after you've spawned units (or at least, the spawned units don't follow it), but creating them dynamically is fine.

Share this post


Link to post
Share on other sites
Yup, this works fine.

You can't move an active EOS zone after you've spawned units (or at least, the spawned units don't follow it), but creating them dynamically is fine.

Thanks cameroon! Would you have an example you could share? To give me something to refer to? This is a pseudo script example of what I'm looking for:

Check time/event. != new task exit

-pick random location

-create 100x100 marker called "marker1"

-place marker at location (would like to find a script to destroy/hide any map objects like trees, etc. too before placing)

-place objects in marker (tents, ammo crates, burning fire pit, etc.)

-spawn EOS units on marker and have them patrol

-notify players of new task to "find and destroy insurgent camp in the vicinity of <getpos "marker1">"

---once task "complete" destroy marker and contents

I'm also looking at using Shuko's Taskmaster 2 or FHQ TaskTracker to streamline the system, if that helps, but haven't finished my research into which one yet (opinions are welcome).

Thanks in advance. :)

Share this post


Link to post
Share on other sites
Thanks cameroon! Would you have an example you could share? To give me something to refer to? This is a pseudo script example of what I'm looking for:

Check time/event. != new task exit

-pick random location

-create 100x100 marker called "marker1"

-place marker at location (would like to find a script to destroy/hide any map objects like trees, etc. too before placing)

-place objects in marker (tents, ammo crates, burning fire pit, etc.)

-spawn EOS units on marker and have them patrol

-notify players of new task to "find and destroy insurgent camp in the vicinity of <getpos "marker1">"

---once task "complete" destroy marker and contents

I'm also looking at using Shuko's Taskmaster 2 or FHQ TaskTracker to streamline the system, if that helps, but haven't finished my research into which one yet (opinions are welcome).

Thanks in advance. :)

I'm a big fan of the FHQ scripts, but I haven't tried Shuko's to compare.

As for the rest, they are of varying levels of complexity/difficulty ;) I'm not in a location where I can put up any examples, but I can offer some feedback on complexity/approach.

- You can use selectBestPlaces to try and locate a space that's suitable for your location. I use it for a lot of my "random area" scripts, like locating a place for a helicopter crash to have soft-landed, wooded areas where the enemy is hiding, etc.

- The marker's easy, just take a look at the createMarker, setMarkerSize to create a suitable EOS zone (use setMarkerShape "ELLIPSE" or "RECTANGLE")

- Whenever you want to make the EOS zone active, make your EOS call like normal with that marker name that you created

- Same with the task creation, since those will all happen at the same time. FHQ will take care of all the details of getting the task and state to all players and I believe Shucko's does the same. I highly recommend using one of them, as tasks and JIP are a GIANT PAIN.

For your pre-built camp, that'll take some effort to setup. The way I would probably do it is to use lxOPS (a script that lets you create objects and get copy the creation and positioning) to build up the camp the way you want it to look, then take that and convert it to be all relative to a center point. Then you can just run it with the marker position as the center. If no one has a better solution or example for you, I can do an example for you later tonight. It's not overly difficult, just tedious to set up.

As for "flattening" the area, i's probably a little tricky to make work _and_ look right, but probably better than things clipping through trees and rocks. I don't have a good solution for that though.

To give you an example of a way that I've used a system like this, I have a mission that contains sub-missions - one of which is randomly selected when the players start the mission. One of those is a search-and-rescue mission that does the following:

- Use selectBestPlaces to find some open areas (+meadows - trees - forests - houses - sea) within in a 300 meter radius of a point and randomly selects one of those, then spawns a MH9 there (and damages it)

- Use selectBestPlaces to find a wooded area for the pilots to hide (+trees + forests - meadows - houses - sea) within 400-700 meters of the "crash" site and tells the pilots to move to that point

- Randomly selects a nearby town/city/village and then uses selectBestPlaces to find an open area and then spawn in some trucks & opfor and gives them a waypoint to go to the crash location

- Plots a spiral waypoint search pattern for the opfor so they start hunting the pilots without "knowing" where they are

- When the pilots identify the players (who are doing SAR via a helicopter), they pop smoke or an IR grenade depending time of day

So I could basically put theses missions on any map and it would work, I only have to specify the initial starting point that's near-enough to some villages/cities so that there's a place for the opfor to spawn from. It sounds very similar to what you're trying to do, but with a camp of pre-configured objects which is the main complexity. I'm not using EOS for that part, but I could easily create a marker at the crash site and use EOS to spawn some units there if I wanted a slightly different type of mission.

Share this post


Link to post
Share on other sites

Man, this script looks great, but before I dive headlong into it, I have a couple of questions after reading the readme and last 30 or so pages of the thread. I may have missed the answers due to info overload, so feel free to point me at a previous answer and say, "It's already been answered doofus." if I missed it.

1) I've seen a few different mentions of zone size. Is there a true limit to how big zones could be? To be honest, what I'd like to do is cover most of map with zones so that there's random patrols all over the map, but I'd like them to be big 1km or 2km zones so there's not a ton of them. Is that going to create any major issues?

2) Can multiple zones spawn/despawn at the same time? As in, Player A is on the west side of the map, Player B is on the East side of the map, and zone(s) near both of them spawn?

Thanks much in advance!

Share this post


Link to post
Share on other sites

So I could basically put theses missions on any map and it would work, I only have to specify the initial starting point that's near-enough to some villages/cities so that there's a place for the opfor to spawn from. It sounds very similar to what you're trying to do, but with a camp of pre-configured objects which is the main complexity. I'm not using EOS for that part, but I could easily create a marker at the crash site and use EOS to spawn some units there if I wanted a slightly different type of mission.

Thanks cameroon! My "campsite" idea would get used over again, just in a different location. I thought I would use EOS for the opfor since it caches them when players aren't around and there is no messing with waypoints (for a simple "patrol this area" type of setup). The items in the camp really don't have to be precise, just ambiance really. It might be nice to have a campfire in the center of the marker and maybe use shk_pos to randomly place a handful of other goodies using the center of the marker as the point of origin. A couple of tents, some ammo crates, maybe some camo netting... Nothing too spectacular, just something to make the area look like a campsite.

I want to do other variations including the classic "helicopter crash", an IED factory in a randomly chosen building, etc. too. Since I'm using Raven's LIFTER script I thought I might throw in a "recover the wreck" type of side mission as well... "An MRAP suffered badly in a recent IED attack and the wreckage is now blocking the road (randomly select area of road). Take that Chinook, clear the road, and bring the wreck back to base for further analysis (task complete)."

Anyway, getting off the thread topic. Looking forward to seeing what you can do with an EOS call in a dynamically spawned task, whenever you get the time to share such a thing. Thanks again! :)

---------- Post added at 02:30 PM ---------- Previous post was at 02:25 PM ----------

Man, this script looks great, but before I dive headlong into it, I have a couple of questions after reading the readme and last 30 or so pages of the thread. I may have missed the answers due to info overload, so feel free to point me at a previous answer and say, "It's already been answered doofus." if I missed it.

1) I've seen a few different mentions of zone size. Is there a true limit to how big zones could be? To be honest, what I'd like to do is cover most of map with zones so that there's random patrols all over the map, but I'd like them to be big 1km or 2km zones so there's not a ton of them. Is that going to create any major issues?

2) Can multiple zones spawn/despawn at the same time? As in, Player A is on the west side of the map, Player B is on the East side of the map, and zone(s) near both of them spawn?

Thanks much in advance!

1) I have around 40 EOS zones in my mission, most of them are between 1 and 2km on the longest side. No problems here! :)

2) I think so, which is where you can run into trouble unless it's being hosted on a super computer or something. 40 heavily populated zones and 40 players all wandering the map by themselves is going to equal a whole bunch of AI "spawned" into the game at the same time... tough on FPS no matter how you place the AI. EOS isn't the weak part of that equation though. Some careful mission/group planning and/or limiting your maximum player count will go a long ways to solving that. This is why big coop missions like Domination only spawn one AO at a time ;)

Share this post


Link to post
Share on other sites
i think 4 its = WEST FIA FACTION

null =[["Town_4"],[2,1],[2,2],[1,3],[1],[2],[1,2],[4,0,1000,EAST,FALSE,FALSE]] call EOS_Spawn;

Shoot. If that's it, I'm going to be annoyed (with myself).

Any idea on the squad dispersion idea?

Another issue: Has anyone tried putting random generators in the EOS line? Could you generate enemies in a specific spot, but with random factions? I tried doing this earlier with a "floor(random 5)" command, but it didn't seem to work.

Thanks.

Share this post


Link to post
Share on other sites
Thanks cameroon! My "campsite" idea would get used over again, just in a different location. I thought I would use EOS for the opfor since it caches them when players aren't around and there is no messing with waypoints (for a simple "patrol this area" type of setup). The items in the camp really don't have to be precise, just ambiance really. It might be nice to have a campfire in the center of the marker and maybe use shk_pos to randomly place a handful of other goodies using the center of the marker as the point of origin. A couple of tents, some ammo crates, maybe some camo netting... Nothing too spectacular, just something to make the area look like a campsite.

I want to do other variations including the classic "helicopter crash", an IED factory in a randomly chosen building, etc. too. Since I'm using Raven's LIFTER script I thought I might throw in a "recover the wreck" type of side mission as well... "An MRAP suffered badly in a recent IED attack and the wreckage is now blocking the road (randomly select area of road). Take that Chinook, clear the road, and bring the wreck back to base for further analysis (task complete)."

Anyway, getting off the thread topic. Looking forward to seeing what you can do with an EOS call in a dynamically spawned task, whenever you get the time to share such a thing. Thanks again! :)

So I figured the easiest way to explain/demo some EOS randomization would be just to take a mission I had and strip it down - https://dl.dropboxusercontent.com/u/8018430/RandomEOSDemo.Altis.zip uses a random EOS location (and also FHQ tasks) and seems like it's probably doing most of the things you were looking for. I moved the EOS_spawn calls out of OpenMe.sqf but the spawn calls are the same as what you'd use otherwise.

I'm imagine there are some bad habits in the code of the mission, but hopefully at least the concepts transfer. ;)

If you want to talk about the random encampment part or have questions about what's in that demo mission, I'd say we could do that via PM or in another thread instead of adding to the EOS to avoid hijacking the thread.

Share this post


Link to post
Share on other sites
So I figured the easiest way to explain/demo some EOS randomization would be just to take a mission I had and strip it down - https://dl.dropboxusercontent.com/u/8018430/RandomEOSDemo.Altis.zip uses a random EOS location (and also FHQ tasks) and seems like it's probably doing most of the things you were looking for. I moved the EOS_spawn calls out of OpenMe.sqf but the spawn calls are the same as what you'd use otherwise.

I'm imagine there are some bad habits in the code of the mission, but hopefully at least the concepts transfer. ;)

If you want to talk about the random encampment part or have questions about what's in that demo mission, I'd say we could do that via PM or in another thread instead of adding to the EOS to avoid hijacking the thread.

Thanks cameroon! I'll be giving it a thorough look over tonight, to see what I can figure out on my own... but expect a PM in the next day or two just in case ;)

Share this post


Link to post
Share on other sites
Shoot. If that's it, I'm going to be annoyed (with myself).

Any idea on the squad dispersion idea?

Another issue: Has anyone tried putting random generators in the EOS line? Could you generate enemies in a specific spot, but with random factions? I tried doing this earlier with a "floor(random 5)" command, but it didn't seem to work.

Thanks.

I can't imagine why using floor(random 5) wouldn't work, so long as you have 0-5 defined in UnitPools.sqf (I believe the default only has 0-4). Of course, if you do [floor(random 5),0,1000,EAST,FALSE,FALSE] then you could get NATO units that are on the EAST side - just bringing that up to make sure that's what you intended. :)

As for squad dispersion, if you have a picture that might help since close-together/far-apart may be very subjective. Depending on your scenario you might get the results you're looking for with multiple and partially overlapping zones, but it's really tough to say if that would be of any help without having a frame of reference.

Share this post


Link to post
Share on other sites

I've just tried this out and it's fantastic. I have two questions that I don't know if may be possible or not?

1) Once you've triggered the spawning of the enemy groups, if you take off in a helicopter they all disappear once you get about 10m above the ground level. Can you set it so that doesn't happen and they stay there as long as you're within the radius of the area? Basically not have it height dependant.

2) Is it possible to set the patrolling speed of the vehicles to limited?

That's about it, thanks :)

Share this post


Link to post
Share on other sites
I've just tried this out and it's fantastic. I have two questions that I don't know if may be possible or not?

1) Once you've triggered the spawning of the enemy groups, if you take off in a helicopter they all disappear once you get about 10m above the ground level. Can you set it so that doesn't happen and they stay there as long as you're within the radius of the area? Basically not have it height dependant.

2) Is it possible to set the patrolling speed of the vehicles to limited?

That's about it, thanks :)

1) In your EOS call line, the second to last boolean controls if helicopters cause despawn above 5m or not. If you want to have them spawn in without this effect just set it to FALSE, as per this example:

null =[["EOS"],[2,1],[2,2],[1,3],[1],[2],[1,2],[1,0,35,WEST,FALSE,TRUE]] call EOS_Spawn;

There is actually a pretty good document on all the settings included with the download :)

Share this post


Link to post
Share on other sites

Thanks Oktybar. I don't know why but I never saw that bit :confused:

The script is great. Just a shame that the patrol vehicle AI around towns is still the usual Arma. Follow the trail of destruction until you find the vehicle stuck on a wall or tipped over >.< doh!

Share this post


Link to post
Share on other sites
Thanks Oktybar. I don't know why but I never saw that bit :confused:

The script is great. Just a shame that the patrol vehicle AI around towns is still the usual Arma. Follow the trail of destruction until you find the vehicle stuck on a wall or tipped over >.< doh!

Yeah, I've wondered more than once what it would take to get some better road finding working and maybe UPS for the infantry spawns. No insult to EOS though! I love this script and use it extensively. It's just sad that BIS, with all the time and money that they've invested in the Arma series, still can't get an AI vehicle to follow a road.

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

×