Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

This confused the hell out of me, :confused: no read me file, no examples, opened both mission supplied, got the jist of it but where and how do you put the info to call the script, I tried game logic - fail - trigger - fail lol and tried the init, please remember we are all not script gods some need help to understand what to do :) Could you please elaborate on these points ty..

Share this post


Link to post
Share on other sites

@Beerkan

Doh! is wright lol

(dang were did I put my soft ball bat??...let's see...)

Edited by RANKER
forgot something

Share this post


Link to post
Share on other sites
This confused the hell out of me, :confused: no read me file, no examples, opened both mission supplied, got the jist of it but where and how do you put the info to call the script, I tried game logic - fail - trigger - fail lol and tried the init, please remember we are all not script gods some need help to understand what to do :) Could you please elaborate on these points ty..

I will make a full read me when I'm happy eos won't go through any major changes. I am just keeping you guys informed on progression and hopefully accelerate bug tests. Until then simply download the template. Open the eos_init.sqf located inside the eos folder. And place your marker names inside the default eos slot.

Share this post


Link to post
Share on other sites

Hey mate.

First of all, awsome update, it seem to really improve performance alot mate.

Ive got some questions about the map markers.

I want to hide the map markers, because i feel it ruins immersion to simply look at your map to see if theres more enemies in the area.

So far ive used this in init.sqf:

{_x setMarkerAlpha 0} foreach ["mkr1","mkr2","mkr3","mkr4","mkr5","mkr6","mkr7","mkr8","mkr9","mkr10","mkr11","mkr12","mkr13"];

Ive put the markers into the eos_init.sqf like this, did some tweaking of the groups aswell:

// DEFAULT ZONES 			= TWO SQUAD IN BUILDINGS
_eosDefault = ["mkr8","mkr9","mkr11","mkr12","mkr13"];

// HEAVY ZONES 				= TWO SQUADS PATROLLING ZONE AND LIGHT VEHICLE AND REINFORCEMENTS WILL SPAWN
_eosHeavy = ["mkr2","mkr3"];

// LIGHT VEHICLE 			= ONE SQUAD AND LIGHT VEHICLE
_eosVeh = ["mkr10"];

// APC EOS ZONES 			= TWO SQUADS AND APC
_eosApc = [];

// REINFORCEMENT EOS ZONES	        = TWO SQUAD AND REINFORCEMENTS WILL SPAWN
_eosReinf = ["mkr1","mkr4","mkr5"];

// EMPTY ZONES				= CHANGE MARKER COLOUR WHEN UNITS ENTER (NO AI SPAWN)
_eosEmpty = [];

// SIDE MISSION EOS ZONE		= USE THIS WHEN YOU ARE CALLING EOS FROM SCRIPTS
_eosSide = [_externalMarker];

But for some reason it doesnt hide mkr8, mkr10 and mkr11. Im not sure why.

Is your script forcing the markers to be visible somehow?

Ive used this method in all previous versions and it always worked like a charm, now it just doesnt work for 3 of the markers.

Do you have any wise words?

I would also like to suggest an option to hide the mapmarkers via config chance (1/0), if you have any interest in this and if its not to much work :)

Share this post


Link to post
Share on other sites

Glad your finding the script useful :D

As for hiding markers. Well. you could always use invisibly markers.

OR you can find this line inside eos_init.sqf - _currentMKR setMarkerAlpha 0.5;

and swap with this

_currentMKR setMarkerAlpha 0;

EOS will work exactly the same way with any marker. I just prefer the rectangle insurgency style markers.

Share this post


Link to post
Share on other sites
Glad your finding the script useful :D

As for hiding markers. Well. you could always use invisibly markers.

OR you can find this line inside eos_init.sqf - _currentMKR setMarkerAlpha 0.5;

and swap with this

_currentMKR setMarkerAlpha 0;

EOS will work exactly the same way with any marker. I just prefer the rectangle insurgency style markers.

Will try it out straight away, thx so much for your hard work. Keep it up mate :)

EDIT:

Works like a charm, thx for the help mate.

EDIT2:

One more question hehe, In the new script does helicopters active the areas?

If so how would i go about disabling that?

I saw the answer a couple of pages back, but it doesnt seem to apply to this new version:

Find _spotFriendlies trigger. Replace 
_spotFriendlies setTriggerStatements ["this","",""]; 
with
_spotFriendlies setTriggerStatements ["this && {((getPosATL _x) select 2) < 5} count thislist > 0  ","",""];

Edited by Byrgesen

Share this post


Link to post
Share on other sites

@ Byrgesen

May I know how you "tweaked the groups" ??

because I am not a script writer :(

Working on my mission, I remembered that someone ask BangaBob

"how to create more groups" and BangaBob answered "place more markers".

So I am doing just that, but my markers are 20x20 because I put two markers

side by side in one area to have more groups.

The negative side of this is...

1) too many markers on the map and remembering their name is a pain.

2) me ether, I don't like the idea that players know at advance were the enemy is

by looking at their map and seeing those red squares.

3) do you know what a reinforcement is made of ??

and can it be tweak ??

=============================================

My wish list ;)

VERY LIGHT ZONE = 1 squad (good enough for those small places with few houses)

LIGHT ZONE = 2 squads patrolling

MEDIUM ZONE = 3 squads + 1 squad in houses + 1 light vehicle

HEAVY ZONE = 4 squads patrolling + 2 squads in buildings + 2 light vehicles + 1 (or 2) helicopter(s)

REINFORCEMENT = 2 squads + 1 light vehicle (it would be awesome with a massive PARADROP of OPFOR soldiers)

APC OES ZONE = As the APC don't shoot, they just stand there, I do not use it.

@ BangaBob

Thank you so very much for all your efforts to help us creating better missions.

Regards

Edited by RANKER
forgot something

Share this post


Link to post
Share on other sites
@ Byrgesen

VERY LIGHT ZONE = 1 squad (good enough for those small places with few houses)

LIGHT ZONE = 2 squads patrolling

MEDIUM ZONE = 3 squads + 1 squad in houses + 1 light vehicle

HEAVY ZONE = 4 squads patrolling + 2 squads in buildings + 2 light vehicles + 1 (or 2) helicopter(s)

REINFORCEMENT = 2 squads + 1 light vehicle

APC OES ZONE = As the APC don't shoot, they just stand there, I do not use it.

@ BangaBob

Thank you so very much for all your efforts to help us creating better missions.

Regards

Your going to Love the new update. ;) I am working on making the script more accessible for non-scripters by allowing you to easily select a preset zone.

One patrol = 0

Two Patrol = 1

Light vehicle Patrol = 2

APC patrol = 3

reinforcement enabled zone = 4

and so on.

If you dont like people seeing the markers then simply dont use rectangles. Just place invisible markers instead. The script wont notice.

(I should make this more clear in future updates.)

As for manually changing the size of groups this is also possible. I may add a function for this also. For example you can have a 5 person group. Or 10, 15,20 and so on.

If you do know your scripting then this script is highly custom-able.

BTW don't get too comfortable with the current version. The distance checks are actually unreliable on dedicated servers. Therefore i will be reverting to a trigger structure.

Share this post


Link to post
Share on other sites

BangaBob you are AWESOME !!

If it would be possible for you BangaBob it would be fantastic if you could give us as

a REINFORCEMENT a MASSIVE PARADROP of OPFOR (enemy) soldiers instead of the

original one.

DANG!!! can you imagine what kind of mission that would make that is another thing

on my wish list ha ha ha ha

I would not disturb you so much If I would have you expertise in script writing.

Best regards sir

Edited by RANKER
forgot something

Share this post


Link to post
Share on other sites

Hey,

what does the externalVariable do/what is it used for?

Share this post


Link to post
Share on other sites
Hey,

what does the externalVariable do/what is it used for?

The externalVariable was intended for allowing you to complete an EOS zone (Turn it green + delete AI) with another condition. For example, completing a side mission which would make the externalVariable = true.

However this feature is not ready yet

---------- Post added at 15:47 ---------- Previous post was at 14:04 ----------

v1.3 released

- EOS quick start instructions created

- Streamlined EOS calling process

- Reverted to triggers due to dedicated server issues.

If i've missed anything in the quickstart guide please let me know

Share this post


Link to post
Share on other sites

Updated version frontpaged on the Armaholic homepage.

==================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hi there really nice script just tested a little around but need to get more into it.

I had one thing that annoyed me. It was the static Markersize for testing and spawning. I thought: easiest way would be if the size of the Marker defines the size for checking and spawning of the AI.

I have a little change you could make: Instead to set a static Markersize you could get it from the Markers. I tried it out and works like a charm :)

So the size of a marker defines the size of the area for the Units.

You just need to replace _esoMarkerSize in eos_init to

getMarkerSize _x select 0

in every foreach loop. Then the size is defined by the A axis of the marker.

Also possible to change that A and B axis are used but an extra parameter is needed.

Edited by Spartan190

Share this post


Link to post
Share on other sites

You just need to replace _esoMarkerSize in eos_init to

getMarkerSize _x select 0

in every foreach loop. Then the size is defined by the A axis of the marker.

Nice. I specifically searched for that function but couldn't find it anywhere. I will certainly implement that in the next version

Share this post


Link to post
Share on other sites
Nice. I specifically searched for that function but couldn't find it anywhere. I will certainly implement that in the next version

Looking forward for it. Implemented it for myself for testing etc.

Function can be found here

Share this post


Link to post
Share on other sites

i like the new version ,with the new look EOS Script how do i stop the zones spwaning enemy when a helo flys over it ,so it only actives when there is feet on the ground

in the old version i had to change this

spotFriendlies = createTrigger ["EmptyDetector",_markerPosition];

_spotFriendlies setTriggerArea [_detectionDistance,_detectionDistance,0,true];

_spotFriendlies setTriggerActivation [_detectionSide,"PRESENT",true];

_spotFriendlies setTriggerStatements ["this && {((getPosATL _x) select 2) < 5} count thislist > 0 ","",""];

not sure were this is in your eos script

Share this post


Link to post
Share on other sites
i like the new version ,with the new look EOS Script how do i stop the zones spwaning enemy when a helo flys over it ,so it only actives when there is feet on the ground

in the old version i had to change this

not sure were this is in your eos script

it can be found in the eos_launch.sqf right under the variable initialization.

Share this post


Link to post
Share on other sites

Hi, @BangaBob - great idea ..... is it a lot of work to make the scrip suitable for A2+AO ?? - thanks

Share this post


Link to post
Share on other sites
Hi, @BangaBob - great idea ..... is it a lot of work to make the scrip suitable for A2+AO ?? - thanks

In theory it should be simple. This is what would need changing off the top of my head.

A. Open Eos_Init.sqf and find this line "// EAST UNIT POOLS. REMOVE OR ADD SQUADS AS NEEDED"

Under you will find all the unit pools for EOS. Replace with OA and ArmA 2 groups.

B. Open eos_Launch.sqf

Find this

if (surfaceIsWater _currentPOS) then {
	_sdmInwater = true; if (_debugHint) then {hint "SM on water";};
	_currentEOStype = _diverPool select (floor(random(count _diverPool)));
	_currentEOSVeh = _shipPool select (floor(random(count _shipPool)));	
	_typeGroup = "SpecOps";
	_spawnAPC = false;
	}else{
		_sdmInwater = false; if (_debugHint) then {hint "SM on land";};
		_currentEOStype = _InfantryPool select (floor(random(count _InfantryPool)));
		_currentEOSVeh = _motorPool select (floor(random(count _motorPool)));
		_currentEOSAPC = _armorPool select (floor(random(count _armorPool)));
		_typeGroup = "infantry";
	};

replace with

if (surfaceIsWater _currentPOS) then {
	_sdmInwater = true; if (_debugHint) then {hint "SM on water";};
		_currentEOStype = _InfantryPool select (floor(random(count _InfantryPool)));
		_currentEOSVeh = _motorPool select (floor(random(count _motorPool)));
		_currentEOSAPC = _armorPool select (floor(random(count _armorPool)));
		_typeGroup = "infantry";
	}else{
		_sdmInwater = false; if (_debugHint) then {hint "SM on land";};
		_currentEOStype = _InfantryPool select (floor(random(count _InfantryPool)));
		_currentEOSVeh = _motorPool select (floor(random(count _motorPool)));
		_currentEOSAPC = _armorPool select (floor(random(count _armorPool)));
		_typeGroup = "infantry";
	};

Share this post


Link to post
Share on other sites

@BangaBob - thanks will on it !!

Share this post


Link to post
Share on other sites

Hey,

I've been using the EOS system in a mission of mine, since the last few updates though im not sure how to use it properly.

I was trying to call it like this:

_amount = count _InsAreas;
_counter = 0;
_HeavyZones = [];
_VehZones = [];
_ApcZones = [];


while {_counter < _amount} do {

_mark = _InsAreas call bis_fnc_selectRandom;
_InsAreas = _InsAreas - [_mark];



if (_chance <= 50) then {
_HeavyZones = _HeavyZones + [_mark];
};

if (_chance > 50 && _chance <= 75) then {
_VehZones = _VehZones + [_mark];
};

if (_chance > 75 && _chance <= 100) then {
_ApcZones = _ApcZones + [_mark];
};


_counter = _counter + 1;
};

null = [_HeavyZones,_VehZones,_ApcZones] execVM "EOS\EOS_openMe.sqf";

And this is what i changed in the Eos_OpenMe.sqf:

_HeavyZonesArray = _this select 0;
_VehZonesArray = _this select 1;
_ApcZonesArray = _this select 2;



[_HeavyZonesArray,1,0,1,500] call callEosZone;

[_VehZonesArray,2,0,1,500] call callEosZone;

[_ApcZonesArray,3,0,1,500] call callEosZone;

However no enemies were spawning in any Area.

Ill stick with the older Version for now, though since you stated that the newer Version has far better performance i'd like to use it, naturally.

Cheers

Share this post


Link to post
Share on other sites
Hey,

I've been using the EOS system in a mission of mine, since the last few updates though im not sure how to use it properly.

I was trying to call it like this:

_amount = count _InsAreas;
_counter = 0;
_HeavyZones = [];
_VehZones = [];
_ApcZones = [];


while {_counter < _amount} do {

_mark = _InsAreas call bis_fnc_selectRandom;
_InsAreas = _InsAreas - [_mark];



if (_chance <= 50) then {
_HeavyZones = _HeavyZones + [_mark];
};

if (_chance > 50 && _chance <= 75) then {
_VehZones = _VehZones + [_mark];
};

if (_chance > 75 && _chance <= 100) then {
_ApcZones = _ApcZones + [_mark];
};


_counter = _counter + 1;
};

null = [_HeavyZones,_VehZones,_ApcZones] execVM "EOS\EOS_openMe.sqf";

And this is what i changed in the Eos_OpenMe.sqf:

_HeavyZonesArray = _this select 0;
_VehZonesArray = _this select 1;
_ApcZonesArray = _this select 2;



[_HeavyZonesArray,1,0,1,500] call callEosZone;

[_VehZonesArray,2,0,1,500] call callEosZone;

[_ApcZonesArray,3,0,1,500] call callEosZone;

However no enemies were spawning in any Area.

Ill stick with the older Version for now, though since you stated that the newer Version has far better performance i'd like to use it, naturally.

Cheers

Sorry. Now i've got the calling system worked out, every update from now on should be consistent with previous versions of EOS. So please don't hesitate to update your script to work with v1.3 and upwards

---------- Post added at 16:44 ---------- Previous post was at 16:40 ----------

v1.4 release.

- Using getmarkersize over static variable

- Updated Empty Marker script so it wont turn green until players are in zone AND enemies are dead

- Removed ActiveEOS marker function. Was redundant

- Safe Zone is now marker size + safe zone distance

- Added parameter for marker types, Invisible, Dynamic (highlights), Standard

- Completed EOS zones become empty zones.

- Amended Empty zones to not activate with helicopters

- Improved externalVariable

- Updated readme.pdf with more in-depth information regarding EOS

Keeping the eos_OpenMe.sqf consistent to ease transition pains . But do update it. Just replace your calls.

Your welcome :P

Edited by BangaBob

Share this post


Link to post
Share on other sites

Hello and thank you so mucht. A very handy and helpful peace of work! Thanks man :)

Unfortunately the new Update(1.4) gives me some errors :confused:

Error in expression <verPool,_shipPool,_motorPool,_armorPool,_typeGroup,_enemyTeam,_enemyFaction,_ene>
 Error position: <_typeGroup,_enemyTeam,_enemyFaction,_ene>
 Error Undefined variable in expression: _typegroup
File ...\missions\Co_08_Mout.Stratis\eos\eos_init.sqf, line 77

and

_currentMKR setMarkerAlpha _mkrAlpha;

};

>
 Error position: <setMarkerAlpha _mkrAlpha;

};

>
 Error setmarkeralpha: Type Bool, expected Number
File C:\Users\BlackSheep\Documents\Arma 3 - Other Profiles\GrumpySheep\missions\Co_08_Mout.Stratis\eos\eos_functions.sqf, line 8

Using lasted DEV Build 0.73.107502

Edited by BlackSheep
DEV Build added

Share this post


Link to post
Share on other sites
Hello and thank you so mucht. A very handy and helpful peace of work! Thanks man :)

Unfortunately the new Update(1.4) gives me some errors :confused:

Error in expression <verPool,_shipPool,_motorPool,_armorPool,_typeGroup,_enemyTeam,_enemyFaction,_ene>
 Error position: <_typeGroup,_enemyTeam,_enemyFaction,_ene>
 Error Undefined variable in expression: _typegroup
File ...\missions\Co_08_Mout.Stratis\eos\eos_init.sqf, line 77

and

_currentMKR setMarkerAlpha _mkrAlpha;

};

>
 Error position: <setMarkerAlpha _mkrAlpha;

};

>
 Error setmarkeralpha: Type Bool, expected Number
File C:\Users\BlackSheep\Documents\Arma 3 - Other Profiles\GrumpySheep\missions\Co_08_Mout.Stratis\eos\eos_functions.sqf, line 8

Using lasted DEV Build 0.73.107502

Very odd. Im running non-Dev build and im not getting any errors.

How are you calling the zone?

Share this post


Link to post
Share on other sites

init.sqf:

// Enemy Occupation System
[] execVM "EOS\EOS_openMe.sqf";

eos_OpenMe.sqf:

[["mkr_1"],0,0,1,250,0] call callEosZone; //LIGHT PATROL
[["VEHeos_1","VEHeos_2"],2,0,1,250,0] call callEosZone; //LIGHT VEHICLE
[["Empty_1","Empty_2","Empty_3","Empty_4","Empty_5","Empty_6"],5,0,1,50,0] call callEosZone; //EMPTY ZONE
[["mkr_4","mkr_5","mkr_6","mkr_8"],0,0,1,15,0] call callEosZone; //LIGHT PATROL
[["mkr_3","mkr_9"],1,0,1,15,0] call callEosZone; //HEAVY PATROL
[["mkr_2","mkr_7"],4,0,1,15,0] call callEosZone; //REINFORCEMENT ZONE

I fixed the '_typeGroup' error, simply by removing '_typeGroup' the from arrays. The variable is empty and not need any more from the script.

Error Undefined variable in expression: _typegroup

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

×