Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

@BangaBob

Did you test this on dedicated and MP Hosted with JIP? If you did then I must be doing something wrong if you didnt then I suggest you do

It seems to work fine when preview from editor (except helis dont despawn) but as we all know the editor preview is one thing MP is a completely different beast

On dedicated if 1 player joins and activates a red zone that say spawns 40 enemy - dont kill anyone and let second player join and it will spawn another 40 soldiers on so on every time someone joins - we had 5 join and it spawned 300AI!and the game becomes unplayable The house patrols dont occupy the houses and just stay bunched up . If player 1 leaves server and player 2 leaves red zone enemy despawn - then if player 2 activates a redzone it will spawn 80 enemy - player 1 rejoins server and it spawns another 40.

http://s24.postimg.org/6qssttm7l/2014_01_26_00002.jpg

On MP hosted (though less testing on this) same thing that every time someone joins it spawns another bunch of soldiers - The patrols some seem to just bunch up in centre of red zone , house patrols though do seem to occupy houses better

http://s2.postimg.org/6y4eflk7p/2014_01_26_00003.jpg

so just a heads up to anyone using this on a JIP mission on dedi or hosted might wanna check

I must have forgot to add a server check in the update.

Download link amended. Alternatively open

core\eos_core.sqf

Copy this on line 1

if (!isServer) exitWith {};

Repeat with

core\b_core.sqf

if (!isServer) exitWith {};

---------- Post added at 15:02 ---------- Previous post was at 14:57 ----------

No way to get it work. I tried with your scripts and your words :

I saved this in a "loadout.sqf" file.

And i call the script like this :

null = [_unit ] execVM "scripts\loadout.sqf";

In infantry_fnc.sqf

Weird. Try this instead

{
null = [_x] execVM "loadout.sqf"; //YOUR SCRIPT
_unit = _x;
{
 _skillvalue = (_skillset select _forEachIndex) + (random 0.2) - (random 0.2);
 _unit setSkill [_x,_skillvalue];
} forEach ['aimingAccuracy','aimingShake','aimingSpeed','spotDistance','spotTime','courage','reloadSpeed','commanding','general'];
if (EOS_DAMAGE_MULTIPLIER != 1) then {_unit removeAllEventHandlers "HandleDamage";_unit addEventHandler ["HandleDamage",{_damage = (_this select 2)*EOS_DAMAGE_MULTIPLIER;_damage}];};
if (EOS_KILLCOUNTER) then {_unit addEventHandler ["killed", "null=[] execVM ""eos\functions\EOS_KillCounter.sqf"""]};
} forEach (units _grp); 

Share this post


Link to post
Share on other sites

script error buddy:

Error in expression <loadSpeed','commanding','general'];
if (EOS_DAMAGE_MULTIPLIER != 1) then {_unit >
 Error position: <EOS_DAMAGE_MULTIPLIER != 1) then {_unit >
 Error Undefined variable in expression: eos_damage_multiplier

Share this post


Link to post
Share on other sites
Weird. Try this instead

Ok thanks, that's works, but they was an error in the loadout.sqf from chondo999

Blank space : _*this

/* Replace _this below if you want to call this script differently */

_unit = (_ this select 0);

I have two more questions if you have time.

My goal is to remove the helmet from the soldiers, il tried like this :

if (!isNull _unit) then {

_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addItem "NVGoggles"; _unit assignItem "NVGoggles";

_unit addItem "Binocular"; _unit assignItem "Binocular";

_unit removeheadgear;

But it does'nt work. Do you know what i'm doing wrong ?

-Second questions ?

Does the architecture of EOS will change again in next updates ? Just to know, because it's a lot of work for you at every update, but for us too :p

Thanks again for this script and for your help. You are the only guy i follow on Arma 3

#EDIT

the scripts work for enable lasers, but the game crash when IA despawn. Laser seems to still exist.

Edited by Katane

Share this post


Link to post
Share on other sites

This is some of the error given by EOS script in rpt files of the serveur. I hope that can help you in the future.

2014/01/26, 21:05:09 Server: Object 3:23 not found (message 87)

2014/01/26, 21:05:09 Server: Object 3:24 not found (message 87)

2014/01/26, 21:05:09 Server: Object 3:25 not found (message 87)

2014/01/26, 21:05:09 Server: Object 3:26 not found (message 87)

2014/01/26, 21:05:09 Warn: 17.79 ms spent, NMT=87

2014/01/26, 21:05:27 Warn: 10.99 ms spent, NMT=265

2014/01/26, 21:05:27 Warn: 11.99 ms spent, NMT=265

2014/01/26, 21:05:27 Warn: 11.96 ms spent, NMT=265

2014/01/26, 21:05:27 Warn: 14.96 ms spent, NMT=265

2014/01/26, 21:05:28 Warn: 13.70 ms spent, NMT=265

2014/01/26, 21:05:36 Error Variable indéfinie dans une expression: _infpool

2014/01/26, 21:05:36 File mpmissions\__cur_mp.Altis\eos\UnitPools.sqf, line 107

2014/01/26, 21:05:36 Error in expression <ount _pool)));

_unit = _grp createUnit [_unitType, _pos, [], 6, "FORM"];

};

2014/01/26, 21:05:36 Error position: <_unitType, _pos, [], 6, "FORM"];

};

2014/01/26, 21:05:36 Error Variable indéfinie dans une expression: _unittype

And much more... it's generate like 50 lines by seconds !

Share this post


Link to post
Share on other sites
This is some of the error given by EOS script in rpt files of the serveur. I hope that can help you in the future.

And much more... it's generate like 50 lines by seconds !

looks like there is a missing c at '<ount _pool', perhaps should be <count _pool.

Share this post


Link to post
Share on other sites
This is some of the error given by EOS script in rpt files of the serveur. I hope that can help you in the future.

Ok my bad, thoses errors are caused by myself, i try to resolve them by myself.

The script EOS vanilla is working fine.

EDIT :

looks like there is a missing c at '<ount _pool', perhaps should be <count _pool.

No errors found in the scripts at the line.. :confused:

@Banga or someone

2014/01/27, 20:44:03 Warn: 21.79 ms spent, NMT=265

Do you know what does that mean ?

EDIT # 2

It seems to be caused by my openme file.

EDIT # 3

2014/01/27, 20:44:03 Warn: 21.79 ms spent, NMT=265

This issue is caused by too many markers on the map.

It's not an Arma 3 problem. I tested the same mission with an old EOS version, and the error did not appear.

This error is spawned like 50 times by second. It's an important issue.

Hope that can help you Banga !

Edited by Katane

Share this post


Link to post
Share on other sites

Hey Banga

i really like EOS but i seem to have a problem getting my mission to load on a dedicated server

i have downloaded your newst 1.97 and used

have made a game logic server and it works fine in preview and when i host it on my own computer

Hope you can help me

Share this post


Link to post
Share on other sites

DEDICATED SERVER INFO

Been testing latest version of EOS on our dedi server and reporting back it works really well now. Performance superb and the firefights intense. Try creating a "red zone" and put a bastion zone on top of it with a half hour delay before initial wave. Just as my squad had fought their way into the town and cleared out the enemy then the bastion waves kicked in and we had to fight our way out. Superb!

After testing for a couple of days there are a couple of things that I wonder if anyone can help with or might be nice as tweaks/options to EOS.

1: Because it takes a few moments for the patrols to starat patrolling then it quite common to see a group of soldiers standing together and with an AP missile it's possible to wipe out almost the entire squad. The way I have got round this at the moment is to give my EOS zones a large "spawn" radius so enemy are spawned well before we reach the redzone to allow them time to start their patrol. The problem this creates is if a chopper flys within 1k of a redzone then troops spawn - is there a way or an option that would only allow ground troops / men to trigger zone? or not allow air units?

2 Is there a way to disable the Bastion countdown message? It interferes with other messages top right as it is always on top

3 Not sure but in bastion mode I had it set for 1 Armoured vehicle in each wave and I think it created 4 vehicles and there were 4 players in server was wondering if it was creating one per player?

4 Is there an option to have say 3 enemies remaining in a redzone to consider it "won". I noticed that its quite common to get an enemy "stuck/coverd" by a destroyed building anad there were a couple of zones that even though we knew there was only 1 enemy remaining we couldnt find him so we couldnt complete zone

5 Is there a way to have a message pop up when a "zone" turns green

Thanks in advance

Share this post


Link to post
Share on other sites
The problem this creates is if a chopper flys within 1k of a redzone then troops spawn - is there a way or an option that would only allow ground troops / men to trigger zone? or not allow air units?

Go in eos_core.sqf

Line 16 change false to true :

_heightLimit=true;

Then go line 33 and line 38 and choose wich heigh limit you want (mine is 100) :

if (!_cache) then {

if ismultiplayer then {

if (_heightLimit) then

{_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 100} count playableunits > 0";

}else

{_actCond="{vehicle _x in thisList && isplayer _x} count playableunits > 0";

};}else{

if (_heightLimit) then

{_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 100} count allUnits > 0";

}else

{_actCond="{vehicle _x in thisList && isplayer _x} count allUnits > 0";};};

Share this post


Link to post
Share on other sites

I did the above changes and it didnt seem to make any difference on either preview or on dedi so just want to check I am doing it right.

Does the 100 refers to the fact the player has to be below 100m? to trigger the zone?

Thanks

Share this post


Link to post
Share on other sites

EDIT # 3

This issue is caused by too many markers on the map.

It's not an Arma 3 problem. I tested the same mission with an old EOS version, and the error did not appear.

This error is spawned like 50 times by second. It's an important issue.

Hope that can help you Banga !

Please send me your mission so i can see the problem myself. Thanks

Share this post


Link to post
Share on other sites
Please send me your mission so i can see the problem myself. Thanks

Mission sent in PM.

Does the 100 refers to the fact the player has to be below 100m? to trigger the zone?

The player have to be under 100m to spawn the EOS units yep.

That should work in editor too. Just spawn with an aircraft and fly Under and Over 100m to see what happen.

P.S : The debug seems to be broken by the last update (2 days ago). So you can not see the debug text.

Edited by Katane

Share this post


Link to post
Share on other sites

I have been using EOS with great success in various missions but since A3 1.10, I cannot get rid of the markers during map view mission briefing. Once the mission has started the markers turn invincible. I also tried with a clean EOS install (1.97)

UPDATE

I figured out what is causing the MarkerAlpha issue. I used an missions intro:

0 fadeSound 0; 0 fadeMusic 0; enableRadio false; enableEnvironment false; clearRadio;

introShot = [
   markerPos "intro0", // Target position
   "Break is over ladies. I see you have all settled in nicely at our new base here in Pygros. We have had ample time to reinforce and resupply. Unfortunately so has our enemy. Brigade wants us to break out of the peninsula and secure the entire bay area. We'll deal CSAT an enormous blow if we control Altis International airport and the main harbour. The coming five missions we'll take the entire bay. Back to work ladies!", // SITREP text
   20, // 20m altitude
   100, // 100m radius
   20, // 20 degrees viewing angle
   0, // clockwise movement
   []] spawn BIS_fnc_establishingShot;

waitUntil {scriptDone introShot};
playSound ["intro1", true]; //Play music and fade in screen, music and sound
sleep 1; 5 fadeSound 0.4; 5 fadeMusic 0.18; enableRadio true; enableEnvironment true;  

I am not sure why yet, but this ^^ conflicts with the setMarkerAlpha setting.

Edited by whiztler

Share this post


Link to post
Share on other sites
Are we allowed to upload missions we made with this to the Steam workshop?

Yes, its fine with me

Share this post


Link to post
Share on other sites
Please send me your mission so i can see the problem myself. Thanks

About the "Warn: ###.## ms spent, NMT=###"-error. If you find out whats wrong, may you tell me too what's causing it after I get the same error. Thanks

Share this post


Link to post
Share on other sites

its clearly not in the openme.spf. as the erdor says its somwehere in dthe eos core.sqf. Have you changed anything in that? Because you shouldnt. Simple way to fix it replace your eos_core.sqf with a new one. Not so simple way. look if anything is wrong in the lines 50, 51, 52 and for error 2 linea 52, 53, 54.

Share this post


Link to post
Share on other sites
About the "Warn: ###.## ms spent, NMT=###"-error. If you find out whats wrong, may you tell me too what's causing it after I get the same error. Thanks

I get the same error too

Share this post


Link to post
Share on other sites
its clearly not in the openme.spf.

Actually OpenMe.sqf is where Saetheer calls EOS. It's more likely to be a mistake in the way he called EOS than the script itself.

Share this post


Link to post
Share on other sites
Actually OpenMe.sqf is where Saetheer calls EOS. It's more likely to be a mistake in the way he called EOS than the script itself.

(sorry I was in a hurry todays morning, thats why it "sounds" a bit "harsh". So, sorry!)

Might be possible but when I get an error that clearly shows where the error happens I normaly start searching there. So if he somehow changed the core file he should try to use a new one. Sure, if he didn't he should definitly check the settings in the openme.sqf

(sorry again! ^^)

Share this post


Link to post
Share on other sites

^ Very informativ.

I have a problem myself. On my server, the squares, after I left the area the red square stays bright red. As far as I know...there are still enemies. Do you know anything I could have done wrong?

Share this post


Link to post
Share on other sites

This version of EOS is not stable for MP. I use the old one and no error seems to appear. The game run better. More FPS.

This versio seems to spawn twice the unit.

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

×