Jump to content

Recommended Posts

I have a lot of similar ideas/concepts in mind, but my skill level as a scripter is still developing as a beginner.  In other words, it's tough for me to figure out how to code it into the mission correctly.  Some things in the mission now are actually a work-in-progress, such as the questioning of civilians.  Side missions are still in planning phase.  PVP is something I'd like to incorporate later on in development when the other systems are in place.

 

Also, I removed civilian drivers (for now) because they hit performance and are totally inept drivers.  I'd like to try using LAxemann's civilian traffic script, but it caused an insane amount of RPT errors on my dedicated server the last time I used it.

  • Like 2

Share this post


Link to post
Share on other sites

Hello Phronk, is there any chance you can add Leights OPFOR Pack to this mission? When I jump in the mission, I can see independent from vanilla Arma 3 as enemy.

 

Thanks

 

You can do that yourself via the UnitPools.sqf inside the EOS folder

Share this post


Link to post
Share on other sites

Actually, I have written a script that randomizes the clothing and weapons of the insurgents when they are spawned in a way that automatically detects if the host/server is running any of the supported addons (CUP Weapons, TalibanFighters, and/or TacticalBeard).

How does it work?  
1. Vanilla CSAT units are spawned, so players who connect without TalibanFighters (if host is running it) can still see the enemies

2. If host is not running TalibanFighters and/or CUP Weapons, then the CSAT soldiers' equipment is removed and replaced with random vanilla insurgent clothing and weapons

3. If host is running TalibanFighters and/or CUP Weapons, then the CSAT soldiers' equipment is removed and replaced with random TalibanFighters uniforms and/or CUP Weapons weapons

 

Why do it like this?

1. It keeps the mission modular without the need to manually change lobby parameters or load a different version of the mission

2. Spawning insurgents as vanilla CSAT units instead of (for example) Leight's Opfor Pack insurgents allows me to randomize their clothing with modded content without making it a mission/server requirement and so that players who connect while the game is in progress without those mods can still see enemies and civilians

 

I have plans on making the mission RHS, LOP, and CUP Units/Vehicles compatible in the future.  ;)

Share this post


Link to post
Share on other sites

Another question from my side:

 

Your random script makes enemys spawn first,then they get their gear and get placed where they belong,correct? 

People i`ve played with noticed bunched up AI soldiers that were not really deployed yet,is it possible to hide them or place them somewhere further away/out of sight to not break the immersion?

Share this post


Link to post
Share on other sites

They are all bunched up and frozen at first because I try to immediately disable all of their complex AI features and simulations, then re-enable them one-by-one with little delays in between.  This optimizes the spawning to reduce stutter and desync.  I'll definitely look into using the hideObjectGlobal command or something to hide the units so I don't break your immersion.  It might even optimize spawning even more!

Here's a video I did on it:

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the reply,i wasn`t even aware of the possibility to hide them completely.

I`ll try to band-aid something together for that "problem",it is not really that big of an issue and i`m grateful for what you have done with this mission already.

Share this post


Link to post
Share on other sites

I'm visiting Texas for a month so I can't try it out myself at the moment, but if you go into the "TakIns_G.Takistan" mission folder and go into the "eos\functions\" folder, open the infantry_fnc.sqf script and add the following to the line where I disable all the AI features:
_unit hideObjectGlobal true;

 

And add this to somewhere near the end of the unit's AI being re-enabled in the randOP4.sqf script:

_unit hideObjectGlobal false;

 

 

If you try it out, let me know if it actually hides the spawned units in MP!  

Thanks.

Share this post


Link to post
Share on other sites

I did as suggested but that does not do anything.If i change to "_unit this hideobjectGlobal true" in the infantry_fnc.sqf they get hidden but a  "_unit this hideobjectGlobal false" in the randOP4.sqf does not make them visible again

Share this post


Link to post
Share on other sites

That is very odd.  I don't see why they wouldn't be visible again after "_unit hideObjectGlobal false;" is executed.  That'll be #1 on my priority list to look into when I get back.

Share this post


Link to post
Share on other sites

When I use "hideObject" instead of "hideObjectGlobal", it works in the editor/singleplayer.  However, I'd rather use hideObjectGlobal because it's JIP compatible.  After reading the wiki more carefully, I realized that hideObjectGlobal must be called ON THE SERVER.  So I'm going to write a check for a server/dedicated before hiding the object.  It should work.  I'll update this post if the test fails/succeeds.

 

[EDIT]

Did a quick test which checks if(isServer) first, on my dedicated server and so far it works flawlessly.  I believe it has also improved performance, but it's difficult to judge since I tested it alone.  It's easier to gauge the impact of performance when testing with at least one other person in the mission.  I'm preparing an updated release of my mission for some time this weekend or during the week.

Share this post


Link to post
Share on other sites

i have a box ready to test it with at least 5 people,exluding me. Did you put the servercheck in front of the spawn command as a whole or just in front of the teleport section?

Share this post


Link to post
Share on other sites

The bold text inside the spoilers are the changes I made to get it to work.

 
infantry_fnc.sqf

if (!isServer) exitWith {};
// SINGLE INFANTRY GROUP
private ["_grp","_unit","_pool","_pos","_faction"];
 
_pos=(_this select 0);
_grpSize=(_this select 1);
_faction=(_this select 2);
_side=(_this select 3);
 
_grpMin=_grpSize select 0;
_grpMax=_grpSize select 1;
_d=_grpMax-_grpMin;
_r=floor(random _d);
_grpSize=_r+_grpMin;
 
if (surfaceIsWater _pos) then {_pool=[_faction,1] call eos_fnc_getunitpool;}else{_pool=[_faction,0] call eos_fnc_getunitpool;};
 
_grp=createGroup _side;
 
for "_x" from 1 to _grpSize do {
_unitType=_pool select (floor(random(count _pool)));
_unit = _grp createUnit [_unitType, _pos, [], 6, "FORM"];
_unit hideObjectGlobal true;
_unit enableSimulationGlobal false; _unit disableAI "ANIM"; _unit disableAI "FSM"; _unit disableAI "MOVE"; _unit disableAI "TEAMSWITCH"; _unit disableAI "CHECKVISIBLE"; _unit disableAI "SUPPRESSION"; _unit disableAI "AIMINGERROR"; _unit disableAI "TARGET"; _unit disableAI "AUTOTARGET"; _unit setBehaviour "CARELESS"; _unit setSpeaker "NoVoice"; _unit disableConversation true;
};
 
_grp

 

RandOP4.sqf

waitUntil {!isNil "bis_fnc_init"};
_unit=_this select 0;
if(isServer) then {
if(side _unit==East) then {
sleep 7.5;
removeBackpack _unit; removeAllItemsWithMagazines _unit; removeAllWeapons _unit;
_unit unassignItem "NVGoggles_OPFOR";
_unit removeItem "NVGoggles_OPFOR";
[_unit] call Hats;
sleep 3.0;
[_unit] call InsU;
[_unit] call InsV;
[_unit] call InsG;
sleep 1.0;
[_unit] call Gun;
sleep 8.5;
_unit enableSimulationGlobal true;
sleep 5.0;
_unit enableAI "ANIM";
sleep 5.0;
_unit enableAI "FSM"; 
sleep 5.0;
_unit enableAI "MOVE";
sleep 1.0;
_unit enableAI "CHECKVISIBLE";
sleep 1.5;
_unit enableAI "SUPPRESSION";
sleep 1.5;
_unit enableAI "AIMINGERROR";
sleep 1.5;
_unit enableAI "TARGET";
sleep 1.0;
_unit enableAI "AUTOTARGET";
if(round(random 2)==1) then { _unit addPrimaryWeaponItem "acc_flashlight";};
_unit hideObjectGlobal false;
_unit setBehavior "SAFE";
_unit enableAI "TEAMSWITCH";};};
 
if(isServer) then {
if(side _unit==Civilian) then {
sleep 1.0;
removeBackpack _unit;
removeGoggles _unit;
[_unit] call Hats;
sleep 3.0;
[_unit] call InsU;
[_unit] call InsG;
sleep 8.0;
_unit enableSimulationGlobal true;
_unit enableAI "ANIM";
sleep 5.0;
_unit enableAI "FSM"; 
sleep 5.0;
_unit enableAI "MOVE";
null=[_unit]execVM "eos\functions\ask.sqf";
sleep 1.5;
_unit enableAI "SUPPRESSION";
sleep 1.5;
_unit enableAI "TARGET";
sleep 1.5;
_unit enableAI "AUTOTARGET";
_unit setBehavior "SAFE";
_unit hideObjectGlobal false;};};

 
eos_spawnVehicle.sqf

if (!isServer) exitWith {};
_position=(_this select 0);
_side=(_this select 1);
_faction=(_this select 2);
_type=(_this select 3);
_special = if (count _this > 4) then {_this select 4} else {"CAN_COLLIDE"};
 
_vehicleType=[_faction,_type] call eos_fnc_getunitpool;
_grp = createGroup _side;
 
_vehPositions=[(_vehicleType select 0)] call BIS_fnc_vehicleRoles;
_vehicle = createVehicle [(_vehicleType select 0), _position, [], 0, _special];
clearItemCargoGlobal _vehicle;
 
_vehCrew=[];
 
{
_currentPosition=_x;
if (_currentPosition select 0 == "driver")then {
_unit = _grp createUnit [(_vehicleType select 1), _position, [], 0, "CAN_COLLIDE"];
_unit assignAsDriver _vehicle;
_unit moveInDriver _vehicle;
_vehCrew set [count _vehCrew,_unit];
_unit hideObjectGlobal true;
_unit enableSimulationGlobal false; _unit disableAI "ANIM"; _unit disableAI "FSM"; _unit disableAI "MOVE"; _unit disableAI "TEAMSWITCH"; _unit disableAI "CHECKVISIBLE"; _unit disableAI "SUPPRESSION"; _unit disableAI "AIMINGERROR"; _unit disableAI "TARGET"; _unit disableAI "AUTOTARGET"; _unit setBehaviour "CARELESS"; _unit setSpeaker "NoVoice"; _unit disableConversation true;
};
 
if (_currentPosition select 0 == "turret")then {
_unit = _grp createUnit [(_vehicleType select 1), _position, [], 0, "CAN_COLLIDE"];
_unit assignAsGunner _vehicle;
_unit MoveInTurret [_vehicle,_currentPosition select 1];
_vehCrew set [count _vehCrew,_unit];
_unit hideObjectGlobal true;
_unit enableSimulationGlobal false; _unit disableAI "ANIM"; _unit disableAI "FSM"; _unit disableAI "MOVE"; _unit disableAI "TEAMSWITCH"; _unit disableAI "CHECKVISIBLE"; _unit disableAI "SUPPRESSION"; _unit disableAI "AIMINGERROR"; _unit disableAI "TARGET"; _unit disableAI "AUTOTARGET"; _unit setBehaviour "CARELESS"; _unit setSpeaker "NoVoice"; _unit disableConversation true;
};
 
}forEach _vehPositions;
 
_return=[_vehicle,_vehCrew,_grp];
 
_return

Edited by phronk
  • Like 1

Share this post


Link to post
Share on other sites

Has anyone experienced crashes when playing this mission online?  Especially memory related crash errors?  I'm not sure if there's a script in the mission that needs to be fixed or if the crash is being caused by one of the client-side mods my friends and I are using.  Seems to happen less often when VerifySignatures is set to 1 or 2.  I've been experiencing (and am currently working hard to identify/resolve) game crashes either due to memory error(s) or one other error I can't remember.  It has happened with multiple respawn/revive scripts and even without them even implemented in the mission.

Here is the consistency of the crashing I've identified so far, although still vague:

  • Client(s) can crash after another client has connected to the server
  • Client(s) can crash after another client has been killed (or just hit?)
  • Client(s) can crash after another client respawns

Sometimes this will never happen even after 6 hours of playing straight.  So if you guys discover the issue or can help in anyway, I'd appreciate it!

Share this post


Link to post
Share on other sites

I expirienced memory related crashes a lot,couldn`t pinpoint the issue either. Other people however,who use the same files as me do not have any of them. I noticed a lot of these crashes came shortly after using the virtual arsenal

  • Like 1

Share this post


Link to post
Share on other sites

I've been trying to pinpoint where this memory leak is coming from.  It may be related to the initialization of a client/scripts, since I've witnessed a lot of crashes related to clients connecting and then it crashes a client who is already connected.

  • Like 1

Share this post


Link to post
Share on other sites

[brief Development News Update]

I've been working on more optimizations and fixing the memory crashes.  A lot of the code is being cleaned up and improved as well.  I'm making very good progress, but the issues haven't been completely resolved yet.

 

Additionally, I've started scripting my own optional simple light-weight injury/medical system which shouldn't hit performance.  The script will disable itself automatically for clients running ACE3, keeping it modular on a per-user basis.  Other small additions and changes will come in the next release.  For now, the updated mission will not be released until I resolve the crash issue and finish the medical system.  Keep an eye on the "Development Progress" post (2nd post in thread) for up-to-date changes.

 

No ETA just yet.

  • Like 1

Share this post


Link to post
Share on other sites

This mission sounds really great. Last week I read through the entire thread because my own (ALiVE) missions were crashing like hell (the new performance binaries fixed that).

It seems like based on the description that you've managed to incorporate a lot of what ALiVE does all through original scripting and I have to say, this sounds really impressive! I look forward to your next stable build. I can't wait to try it.

Would it be unreasonable or impossible for a person to play this alone? With AI teammates, of course. I don't generally have the time or friends to play online with and usually host my missions using LAN or TADST.

Share this post


Link to post
Share on other sites

You can play this alone all by yourself,loses a bit of charme and tactical approach but the mission itself is enjoyable from 1 to XX players

Share this post


Link to post
Share on other sites

You can play this alone all by yourself,loses a bit of charme and tactical approach but the mission itself is enjoyable from 1 to XX players

I don't actually want to play it alone. I want to play it with AI teammates. Is that possible?

Share this post


Link to post
Share on other sites

I originally started this project as an ALiVE Insurgency, but it really slowed down the performance of the mission.  As much as I LOVE the civilian modules, for now I'd rather stick to keeping this mission modular by using scripts instead of ALiVE.  I DO plan on making a version that uses the ALiVE civilian modules, but for now, it's more convenient and interesting (for me to develop) to use a scripted method instead.

 

My mission has been in development for about 2 years, but it is still incomplete to my standards because I haven't integrated all the features I want in a light-weight performance friendly way.  Things like logistics, better interaction with civilians, random side objectives, rewards, and more will come in time as I progress and develop as a scripter.

 

Also, to answer your question, you cannot play with AI teammates.  If you want, you can modify the mission to include a script which allows you to recruit AI.  In that case, it should be fine!

  • Like 2

Share this post


Link to post
Share on other sites

Have you tried the civilian modules lately? I have a mission I made on Reshmaan that uses three (three!) Civilian Placement modules, all set to "Extreme," and my FPS is still around 50 on my server with my crappy PC (Alienware Alpha i5 4590T GTX 860M).

Bummer on the AI teammate thing. I don't know enough about scripting to accomplish this, though Spyder's Addons does have an AI Recruit module I could possibly try.

Share this post


Link to post
Share on other sites

I haven't used ALiVE in almost a year, I think.  I know it has made tremendous progress since I used it for my mission.  I'll definitely integrate it in a modular way (automatic host detection) in the future.

 

Speaking of modularity, I made great progress with making the mission automatically compatible with CUP Weapons, Units, and Vehicles (any combination) so that the modded assets are used instead of vanilla ones.  For example, the vehicles at base will automatically be CUP Vehicles if CUP Vehicles is enabled on the host's machine (no lobby parameter changing necessary).  Insurgents and civilians will also use CUP Weapons, CUP Units (clothing, headgear, vests, etc.) and CUP Vehicles (any combination) if any of them are enabled on the host's machine.

 

Don't get hyped up for a release this weekend, but I'm going to try to get it ready for release.  Here's a list of things I need to finish before releasing an update:

  1. Respawn With Loadout
  2. Add a Vehicle Respawn Script *Done*
  3. Fix Memory Crash *Possibly Fixed*
  4. Decide If A3 Wounding System Stays or Gets Replaced

Also, I may include an optional AI recruitment script in the mission, which you'd have to manually turn on in the lobby parameters, just for you.  ;)

  • Like 2

Share this post


Link to post
Share on other sites

Take your time buddy. It will be pleasure whenever you are ready. What drew me to this thread was how you have been working on perfecting it for as long as you have. Most mission makers ditch their stuff within 30 days. It will be an absolute pleasure to play it whenever you have time to update it and I appreciate you thinking of me for the next release.

Looking forward to it man. Thanks for that.

  • Like 1

Share this post


Link to post
Share on other sites

Please have a look at AIS_Injury,it is a well done wounding system to take into consideration

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

×