Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

[["Patrol"],[1,2,2,0,0,0],[2,250,1],true] execVM "eos_GearBox.sqf";

at marker " Patrol"

1 in house

2 patrols

2 lights vehicle

0 heavy

0 mortar

0 fly

Guerilla

250 + markersize

1 invisible

But before you need to add a game logic "server" in your mission.

Share this post


Link to post
Share on other sites
This is already a feature in the next version. Aswell as full unit caching and the ability to add specific unit classnames for use with mods. Also helicopters will land with reinforcements now. The next update will be released as dev version in the next few days

good news!!!

thanks again!

By the way i have not seen one unit (House patrol) inside buildings in Altis! is this a bug?

Edited by Grillob3

Share this post


Link to post
Share on other sites

is it possible for you to add support for some mods like massi's, because i can't find the group classnames of his for the life of me.

Share this post


Link to post
Share on other sites

this "eos_SpawnInfantry.sqf" works with massi's units

if (!isServer) exitwith {};

private ["_callNumber","_spawnHouse","_diverPool","_InfantryPool","_enemyFactionVehicle","_debugHint","_eosGroupSize","_currentEOStype","_typeGroup","_enemyTeam","_eosMarkerSizeB","_eosMarkerSizeB","_currentPOS""_sideEOSInf","_spwnposNew","_loop","_active","_spotFriendlies","_currentMKR","_enemyFactionType","_spawnType","_enemyFaction"];

_currentMKR=(_this select 0);

_currentPOS=markerpos _currentMKR;

_eosMarkerSizeB=getMarkerSize _currentmkr select 1;

_enemyFactionType=(_this select 1);

_spotFriendlies=(_this select 2);

_spawnHouse=(_this select 3);

_debugHint=false;

switch (_enemyFactionType) do{case 0:{

// EAST UNIT POOLS. REMOVE OR ADD SQUADS AS NEEDED

_InfantryPool = ["OPF_mas_afr_InfSquad_o","OPF_mas_afr_InfSquad_Weapons_o","OPF_mas_afr_InfTeam_o","OPF_mas_afr_InfTeam_AT_o","OPF_mas_afr_InfTeam_AA_o","OPF_mas_afr_Support_CLS_o","OPF_mas_afr_Support_EOD_o","OPF_mas_afr_Support_ENG_o","OPF_mas_afr_InfSentry_o"];// default stuff ["OIA_InfSquad_Weapons","OIA_InfSquad"];

_diverPool = ["OI_diverTeam"];

_enemyFaction = "East";

_enemyFactionVehicle = East;

_enemyTeam = "OPF_mas_afr_F_o";

_typeGroup = "Infantry_mas_afr_o"; //this goes here now

};case 1:{

// WEST UNIT POOLS. REMOVE OR ADD SQUADS AS NEEDED

_InfantryPool = ["BUS_InfSquad","BUS_InfSquad_Weapons"];

_diverPool = ["BUS_DiverTeam"];

_enemyFaction = "west";

_enemyFactionVehicle = West;

_enemyTeam = "BLU_F";

};case 2:{

// GUER UNIT POOLS. REMOVE OR ADD SQUADS AS NEEDED

_InfantryPool = ["IND_mas_afr_InfSquad_i","IND_mas_afr_InfSquad_Weapons_i","IND_mas_afr_InfTeam_i","IND_mas_afr_InfTeam_AT_i","IND_mas_afr_InfTeam_AA_i","IND_mas_afr_Support_CLS_i","IND_mas_afr_Support_EOD_i","IND_mas_afr_Support_ENG_i","IND_mas_afr_InfSentry_i"]; // default stuff ["HAF_InfSquad_Weapons","HAF_InfSquad"];

_diverPool = ["HAF_DiverTeam"];

_enemyFaction = "Indep";

_enemyFactionVehicle =INDEPENDENT;

_enemyTeam = "IND_mas_afr_F_i";

_typeGroup = "Infantry_mas_afr_i"; //this goes here now

};};

if (surfaceIsWater _currentPOS) then {

if (_debugHint) then {hint "SM on water";};

_currentEOStype = _diverPool select (floor(random(count _diverPool)));

_typeGroup = "SpecOps";

}else{

if (_debugHint) then {hint "SM on land";};

_currentEOStype = _InfantryPool select (floor(random(count _InfantryPool)));

};

_spwnposNew = [_currentPOS, random (_eosMarkerSizeB -15), random 359] call BIS_fnc_relPos;

_sideEOSInf = [_spwnposNew, _enemyFactionVehicle, (configfile >> "CfgGroups" >> _enemyFaction >> _enemyTeam >> _typeGroup >> _currentEOStype),[],[],[0.25,0.4],[],[EOSgroupSize,0]] call BIS_fnc_spawnGroup;

if (_spawnHouse) then {

if (_debugHint) then {hint "Spawning house patrol";};

0=[_currentPOS,units _sideEOSInf,_eosMarkerSizeB,0,[0,4],true] call callHouseScript;

}else{

if (_debugHint) then {hint "Spawning patrol";};

0=[_sideEOSInf, _currentPOS, (random _eosMarkerSizeB * 0.5)] call BIS_fnc_taskPatrol;

};

_loop=true;

while {_loop} do {sleep 1;

_active=_spotFriendlies getvariable "Active";

if (_debugHint) then {hint format ["%1",_active];};

if (!_active) then {

{deleteVehicle _x} forEach units _sideEOSInf;

deleteGroup _sideEOSInf;

_loop=false;

};

};

waituntil {!_loop};

_callNumber=_spotFriendlies getvariable "totalCalls";

_callNumber=_callNumber + 1;

_spotFriendlies setvariable ["totalCalls",_callNumber];

//hint format ["%1",_callNumber];

just replace everything inside your "eos_SpawnInfantry.sqf" inside the EOS folder with this.

Share this post


Link to post
Share on other sites

it does work - I've tested it in MP on my server and it works great. Also, sometimes African units will crew vehicles as well.

Share this post


Link to post
Share on other sites
[["Patrol"],[1,2,2,0,0,0],[2,250,1],true] execVM "eos_GearBox.sqf";

at marker " Patrol"

1 in house

2 patrols

2 lights vehicle

0 heavy

0 mortar

0 fly

Guerilla

250 + markersize

1 invisible

But before you need to add a game logic "server" in your mission.

I copied and past the "game logic" demo folder!!...

And it wasn't good!

I will retry, i changed something in my init.sqf!!... perhaps it was that!

I'll tell you!

Thanks ;)

Share this post


Link to post
Share on other sites

If I have a group of 50m x 50m boxes with EOS, is there a way I can 'reset' the whole area back to red? My issue is that I'd need to find a way for this to sit on a 24/7 server and be able to run and reset this whenever needed. Does this reset automagically? Or is there some addAction I can tie into an object or something?

Share this post


Link to post
Share on other sites

OK i found for my problem!!

My martker name was "région_rebel" !!!! (i'm french :D )... and i had to call it "region_rebel" ("e" and not "é"!!)...

Everything is ok now :p

Share this post


Link to post
Share on other sites

Hey Banga, I downloaded your script and it works great.

I'm currently editing a nightmission where all players spawn without NVG's and I would like to have all enemey AI patrols use their flashlight while patrolling.

Is there any place where I can add the {_x enableGunLights "forceOn"} line or is there another way to do this?

Edited by Reggaesmurf

Share this post


Link to post
Share on other sites
If I have a group of 50m x 50m boxes with EOS, is there a way I can 'reset' the whole area back to red? My issue is that I'd need to find a way for this to sit on a 24/7 server and be able to run and reset this whenever needed. Does this reset automagically? Or is there some addAction I can tie into an object or something?

http://forums.bistudio.com/showthread.php?153100-Enemy-occupation-system-(eos)&p=2458736&viewfull=1#post2458736

I already tried to discuss this but no one understand why we need such a feature :)

Share this post


Link to post
Share on other sites
If I have a group of 50m x 50m boxes with EOS, is there a way I can 'reset' the whole area back to red? My issue is that I'd need to find a way for this to sit on a 24/7 server and be able to run and reset this whenever needed. Does this reset automagically? Or is there some addAction I can tie into an object or something?

Do you mean a restart function when all points are capt ??

Share this post


Link to post
Share on other sites
If I have a group of 50m x 50m boxes with EOS, is there a way I can 'reset' the whole area back to red? My issue is that I'd need to find a way for this to sit on a 24/7 server and be able to run and reset this whenever needed. Does this reset automagically? Or is there some addAction I can tie into an object or something?

You can turn persistent off in your server.cfg so that when the last player logs off the Server the mission resets instead of Running. Or keep the persistent and Loop it in the Missions list in the server.cfg so on mission end it restarts.

Share this post


Link to post
Share on other sites
Do you mean a restart function when all points are capt ??

Yeah, or if only some are captured.

I'll look into a mission generator like was previously mentioned. http://forums.bistudio.com/showthread.php?153100-Enemy-occupation-system-(eos)&p=2458736&viewfull=1#post2458736

You can turn persistent off in your server.cfg so that when the last player logs off the Server the mission resets instead of Running. Or keep the persistent and Loop it in the Missions list in the server.cfg so on mission end it restarts.

I'm not quite sure that's what we want. We don't want everyone to have to leave the server to reset one mission area. But thanks.

Share this post


Link to post
Share on other sites

You just have to create a loop that will check for the time.

When the time is reach, delete all the trigger created bys eos, change marker color and restart the eos gear box...

Share this post


Link to post
Share on other sites
I just gave this script a quick shot, and while it clearly does what it is intended to, i am missing one feature: Saving the number of soldiers that has been in one zone. I explain on the example mission: the first zone is red, 5 enemy units spawn and want to kill me. I kill all 5 of them, spawn gets green, no more spawning here. Next zone further done the airfield: 5 Units spawn, i kill 3, go away, come back and 5 units spawn. Could it be possible to "safe" the ammount of left units and let the respawn?

And what about that?? It would be very usefull for us :bounce3:

So tell us if you think it is possible to do it, without too much problems!... when u're ready ;)

Thanks ;)

Share this post


Link to post
Share on other sites

I seem to be having a issue with the new FIA faction. Sometimes the OPFOR shoot, sometimes they don't. I tested running in front of them for 10mins on a Local MP server with 6 players and sometimes they shot, sometimes they didn't. Not sure if lag, or respawn, or revive caused them to not engage us, but something I only seen so far with FIA.

Share this post


Link to post
Share on other sites
I seem to be having a issue with the new FIA faction. Sometimes the OPFOR shoot, sometimes they don't. I tested running in front of them for 10mins on a Local MP server with 6 players and sometimes they shot, sometimes they didn't. Not sure if lag, or respawn, or revive caused them to not engage us, but something I only seen so far with FIA.

With the stable version or with the betadev ?

Share this post


Link to post
Share on other sites
With the stable version or with the betadev ?

Dev Build, Todays patch added FIA.

Share this post


Link to post
Share on other sites
i have this issue since altis... sometimes you can't kill ai ??

Sometimes, or they seem to just take a billion bullets, more so than it seems with ExtendedArmor on.

Sometimes they just turn off on shooting you, sometimes they don't. This happens on SP and MP. Haven't tried with Stratis yet, I'll go see if same problems occur.

Share this post


Link to post
Share on other sites
And what about that?? It would be very usefull for us :bounce3:

So tell us if you think it is possible to do it, without too much problems!... when u're ready ;)

Thanks ;)

He already said that will be implemented in the future updates!

Share this post


Link to post
Share on other sites
Sometimes, or they seem to just take a billion bullets, more so than it seems with ExtendedArmor on.

Sometimes they just turn off on shooting you, sometimes they don't. This happens on SP and MP. Haven't tried with Stratis yet, I'll go see if same problems occur.

there is no problem with stratis...

Share this post


Link to post
Share on other sites
He already said that will be implemented in the future updates!

I'm not sure! this is what he said :

Its possible to do this. I havn't done so because it is complicated and adding into EOS will be very complicated and may cause more issues that it solves. Maybe when the full game is released i will take a new look

Perhaps if we just can add delay to de-spawn ennemies, will be a good option for this!!

Is there someone tested this :

Try adding a timeout when the _spotfriendlies trigger is created.

For example

_spotFriendlies = createTrigger ["EmptyDetector",_currentPOS]; 
_spotFriendlies setTriggerArea [(_SafeZone+ _eosMarkerSizeA),(_SafeZone+ _eosMarkerSizeB),0,true]; 
_spotFriendlies setTriggerActivation ["ANY","PRESENT",true]; 
_spotFriendlies setTriggerStatements ["{vehicle _x in thisList && isplayer _x} count allUnits > 0","",""];
_spotfriendlies setTriggerTimeout [1, 2, 3, false]; 

Because, if we can't save deads ennemis, we can try to set a delay for despawn them instead we got time to return in zone before they disappear ?

Someone think about something to add delay?

Thanks ;)

Share this post


Link to post
Share on other sites
I'm not sure! this is what he said :

Perhaps if we just can add delay to de-spawn ennemies, will be a good option for this!!

Is there someone tested this :

Because, if we can't save deads ennemis, we can try to set a delay for despawn them instead we got time to return in zone before they disappear ?

Someone think about something to add delay?

Thanks ;)

I was thinking this very same thing last night.

I was going to look through the settings to see where the variable is. There must be a figure dictating despawn time somewhere.

The only downside of this is if someone flies all over the island activating all the zones this will create a extra burden on the server.

Ideally I would like if possible any zones activated above a certain height to despawn as normal but have a seperate, longer & adjustable despawn time for any zonez activated below that height.

Share this post


Link to post
Share on other sites
_spotfriendlies setTriggerTimeout [1, 2, 3, false];

yes I have tested that, it works but I wouldn't use it on altis.

the reason why I took out that line is when u drive trough enemy occupied kavala for example,

the amount of enemy's gets overwhelming to a point that is becomes unplayable.

specially cause the markers out of range don't deactivate fast enough.

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

×