Jump to content
Sign in to follow this  
Mirek

ACM module on Dedicated Server?

Recommended Posts

Hi i have a mission using ACM module that worked fine in hosted enviroment, but now i have Dedicated server and the ACM and SOM modules doesnt work Anymore.

 

This is the code i have in my init.sqf:

som setVariable ["TSS_vehicle_custom", transport];
som setVariable ["settings", [["ambush", "trap", "patrol", "search"], true, ["FOX", ["FO"], "Balota", ["Balota"]], 240, false,180,0.4,[1000, 5000]]];

waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

//Sets frequency and number of patrols (0-1). BIS_ACM is module name
[0.2, BIS_ACM] call BIS_ACM_setIntensityFunc;  

//min max spawn distance
[BIS_ACM, 500, 1000] call BIS_ACM_setSpawnDistanceFunc;

//factions to be spawned
[["INS","CDF"], BIS_ACM] call BIS_ACM_setFactionsFunc;

//Skill range for spawned units
[0.2, 0.8, BIS_ACM] call BIS_ACM_setSkillFunc;

//Amount of ammo spawned units possess
[0.5, 0.8, BIS_ACM] call BIS_ACM_setAmmoFunc;

//Type of patrol. With 0 meaning no chance of appearing, and 1 meaning 100% chance. -1 removes patrol type completely.
["ground_patrol", 0.2, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

["air_patrol", -1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

//Available units to be spawned
[BIS_ACM, ["INS_InfSquad","INS_InfSection_AT","INS_InfSection_AA","INS_MotInfSection","CDF_InfSquad","CDF_InfSection_Patrol","CDF_MechReconSection"]] call BIS_ACM_addGroupClassesFunc; };

enableRadio false; 
0 fadeRadio 0;

If anyone can help, i would appreciate it.

Share this post


Link to post
Share on other sites

SOM and SSM both have their history of issues with a dedicated server.

https://dev.withsix.com/issues/26368

https://dev.withsix.com/issues/15096

 

Also a conflict.

https://forums.bistudio.com/topic/98206-how-to-simple-support-module-oa/page-2#entry1655043

 

Are you running on Beta, Legacy or None?  I helped with the SOM during the Beta addressing multiplayer issues, but don't have a DS.  I could only address issues that showed up in hosted missions.  There were a couple of obvious DS items, having to do with player being null, which were found and addressed.  But with not having a DS to work with, all I could do was hope that getting the hosted missions working would help with the dedicated server issues.

Share this post


Link to post
Share on other sites

Hi

 

i run normal Arma 2 CO i gues, I didnt opt for any betas or other nonregular stuff on this computer, i only use beta on my laptop, to test new features, and i dont see any reason to use legacy (older version).

 

As i said the mission runs perfectly on my PC, with no conflicts, but it desnt run SOM and ACM on dedicated. 

Share this post


Link to post
Share on other sites

I see lines in SSM that would seem to be player/objnull issues for a dedicated server.

 

Also, the SSM follows a hard path to its "init.sqf" script, which has almost all of the code, variables and functions.  To work the issues one would first have to recreate it as an addon.  (Correct me if that is incorrect.)

 

The SOM takes a soft path to its "init.sqf", making it easy to work with in editor missions.  Where a DS problem is found in a SOM script, the problem script can be copied to the mission folder, using a recreated folder path, or as custom phase scripts, and worked with until the issue resolves.  It's how I could work on hosted MP issues.

 

- Under Legacy, both SSM and SOM will still have the same dedicated server issues as before.
- Under None and Beta, the SSM looks like it would still have the same dedicated server issues as before.
- I don't know if SOM will work on a dedicated server under None or Beta.  Fixes for hosted multiplayer and to be Warfare compatible were included as part of the patch.

 

---- Edit:  Made a correction above, forgot "none" means the patched version; also -

 

Observation:
-----------
From your OP it would appear you use the SOM for transport support with a "TSS_vehicle_custom" editor vehicle?  Even under Beta, the SOM Transport support will have issues with a TSS_vehicle_custom when called by a joined client (but see suggestion below).

 

Information:
-----------
One issue that both Transport and Supply Drop supports had was that the aircraft belonged to the server, but the client must run the "transport.fsm" which controls them.  The supports always worked for the host, but not for joined clients.

 

The transport.fsm uses command "UnitReady" on the aircraft as a condition to advance scripts; but "UnitReady" only returns an accurate result when done on the machine the unit belongs to.  On any other machine it will always returns "true", even when the unit is not ready.  The joined client was running "unitReady" on an aircraft belonging to the server, and it would always return "true" even when the aircraft was not ready.

 

The issue was resolved for dynamic vehicles (spawned by the SOM scripts) by having them created by the client rather than the server.  In this way, the aircraft belongs to the client running the FSM, and the "UnitReady" command returns an accurate result.  The aircraft responds properly for host and client.

 

But in the patch it could not be resolved for a TSS_vehicle_custom, since editor objects belong to the server from start.  The "setOwner" command does not exist in A2.  It only exists in OA after v1.62, and any changes to the SOM had to be A2 compatible.

 

With the patch, the TSS_vehicle_custom will still work properly for the host, but encounter the issue of landing before arriving, and then when it does arrive, hovering high where players cannot board, when it is called by a joined client.  But the aircraft spawned dynamically by the scripts should respond properly.

 

Suggestion:
----------
If your mission is run using OA, you could copy over the SOM Phase Script #7 for Transport Support to the mission file, and insert a "setOwner" command for the TSS_vehicle_custom.  That might get it to respond properly after someone calls it (untested).

 

But the command will not work in a mission run using A2.  And it only works from server to client, not client to server.  The vehicle would somehow have to return to server before the command could be run again (maybe moving a server AI into pilot seat could work).

https://community.bistudio.com/wiki/setOwner

Edited by opusfmspol

Share this post


Link to post
Share on other sites

Hi,

 

thanks, I made it work (Partialy). I have 4 groups of playable soldiers in this mission, 2 infantary platoons, one pair of pilots and one pair of apc/tank crew, and i had all Commanders  sinchronised with the modules. It seems it works only if only one commander is sinchronised with the modules. It isnt ideal, because thanks to that i cannot let any of the platoons operate independently, and we cannot play the mission as an multisession thing, as once the players from the platton with sinchronised commander disconnect, the modules will cease to work. But at least it works somehow.

Share this post


Link to post
Share on other sites

Each SOM only allows one group to be synched to it.  If it has more than one group, it will select the first group and discard the others.

 

Each group can have their own SOM in multiplayer.  That's one of the patch fixes.  before the patch, having more than one SOM in a mission caused each player's menus to fluctuate.  But now the menus are updated by client instead of server, so they won't fluctuate.  Each leader sees only their own menu.

 

Keep in mind that if each group has their own SOM, they will receive their missions separately.  Each SOM works independently.

 

The leader installs were fixed as well, so that leadership will transfer to a subordinate when the group leader gets badly wounded or killed.  It transfers back if the group leader is healed or respawned.

 

If a person disconnects and their unit becomes an AI leader, the SOM should only stop working until a player fills the slot.  The AI no longer receive SecOps, they were never scripted to accept them or carry them out.  The mission calls to them would always time out.

Share this post


Link to post
Share on other sites

So i can have Multiple SOms and ACMs? If i have Multiple ACMs and SOMs do i have to have multiple settings in INIT.sqf? Is it possible to sinchronise The Modules so all the units have the same side missions? 

 

Also i use ACM to spawn random enemies that then attack the players, i gues having separate ACM for each unit would result in hordes of enemies spawning whenever all the units are together. That might be handy sometimes, but for my mission it is unacceptable, as this is an patroll mission that aims to simulate patroling in peacekeeping operation so enemies should be scarce and atacks should be there only to spice a bit the otherwise combatless mission.

Share this post


Link to post
Share on other sites

So i can have Multiple SOms and ACMs?

 

SSM: - Place only one on the map.  No synchronizing is done.  It is 'drop-and-play' like the ALICE module.

 

ACM: - Place as many as you want on the map.  Only synch one unit to each ACM and it doesn't have to be a leader.  Any unit can have more than one ACM, but an ACM cannot have more than one unit.  Each ACM generates its own combat based on its settings.

 

SOM: - You can place as many as you have group leaders for on the map.  Synchronize to any group member, but should prefer the group leader.  A group gets a SOM of its own.  Only the groups that have a SOM will receive SecOps.  Each SOM will provide its own SecOps.

 

When SOM initializes it registers the leader as the person to receive the missions, and registers the group members as well to track who is dead and who is alive.  The SOM terminates when the group is empty.

 

 

 If i have Multiple ACMs and SOMs do i have to have multiple settings in INIT.sqf?

 

Yes.  Each has to have their own settings.  With SOM it is important to give each group a separate call sign of their own, otherwise everybody is 'Alpha' and it's hard to know who a mission is called for.

 

 

 Is it possible to sinchronise The Modules so all the units have the same side missions?

 

Each SOM can have the same pool set ("settings").  But the modules will work independently.  Each will give the missions separately.

 

The only way to have two SOM's do the same mission at the same time is to have both call an immediate SecOp using params; but then you have duplicate radio calls, convoys, bad guys, etc.

 

 

 

Also i use ACM to spawn random enemies that then attack the players, i gues having separate ACM for each unit would result in hordes of enemies spawning whenever all the units are together. That might be handy sometimes, but for my mission it is unacceptable, as this is an patroll mission that aims to simulate patroling in peacekeeping operation so enemies should be scarce and atacks should be there only to spice a bit the otherwise combatless mission.

 

Each ACM will respond to its own intensity setting, and stacking does occur like that.  It's always random against the intensity setting whether anything generates.

Share this post


Link to post
Share on other sites

OK thanks.  

Another thing. Can i prevent ACM from spawning enemies in certain area? I use 

delete vehicle

 command for Ambient civilian vehicles, that spawn inside my base, but i dont know how to call similar thing for ACM.

 

Also SOM sometimes spawns a mission outside the playable map. Can i somehow tell it to spawn the mission only inside the border of the map?

Share this post


Link to post
Share on other sites

I will look at those.  There might be a way of using markers?  But I don't recall right away.

 

In the meantime, I sent you a PM about trying to make the SSM work for a dedicated server.

  • Like 1

Share this post


Link to post
Share on other sites

The SOM does not have blacklisting of areas.  I know exactly what your talking about, in one testing mission I had SecOps taking me further and further into no man's land.  I eventually got annoyed and kept declining SecOps until I returned to the operations area.

 

The ACM does have blacklisting of areas though.  You place markers in editor to create the beginning blacklisted areas.  You number the markers upward from 0, i.e.: "BIS_ACM_0", "BIS_ACM_1", "BIS_ACM_2", "BIS_ACM_3", etc., etc.  Keep in mind these marker blacklisted areas will affect all of the ACM's. Correction: These markers only affect one ACM.

 

After the game starts, markers, triggers, and arrays with [top-left,bottom-right] position coordinates can be used to add blacklisted areas to any specific ACM during the mission.  But you cannot remove blacklisted areas unless you can identify which array you want to remove from the list (it's a bunch of coordinates).

 

To add a blacklist area, you use "getVariable" to get the current list, then add to it the marker, trigger or array.  You then use "BIS_ACM_blacklistAreaFunc" to update the list in the ACM:

 

EXAMPLE:

/* *******************************************************************************
// The Server runs the ACM's scripts and FSM, so only run these on the Server, not
// on joined Clients (they won't have the _blacklist variable or the function).
******************************************************************************* */


// Get the current blacklist from the ACM.
_blacklist = This_ACM getVariable "blacklist";


// Adding an editor marker (any name) to blacklist area.
_marker = "RefugeeSafeZone";
_blacklist = _blacklist + [_marker];


// Adding a new scripted marker blacklist area.
// Create a new marker.  Can use any name.
_newMarker = CreateMarkerLocal ["NewBaseMarker",Position NewMainBase];
_newMarker setMarkerSizeLocal [200, 300];
_blacklist = _blacklist + [_newMarker];


// Adding an editor trigger blacklist area.
_trigger = FuelPointTrigger;
_blacklist = _blacklist + [_trigger];


// Adding a scripted trigger blacklist area.
// Trigger area should be what counts for the blacklist area.
_newTrigger = createTrigger ["EmptyDetector", getMarkerPos "NewAmmoPoint",false];
_newTrigger setTriggerArea [200, 200, 45, false]
_blacklist = _blacklist + [_newTrigger];


// Adding a coordinates array.
// It is an array with two position arrays:  [[TopLeft],[BottomRight]]
_posTopLeft = getMarkerPos "Gorka_1";
_posBottomRight = getMarkerPos "Polana_1";
_array = [_posTopLeft,_posBottomRight];
_blacklist = _blacklist + [_array];


// Update the blacklist in the ACM.
[This_ACM, _blacklist] call BIS_ACM_blacklistAreaFunc;

 

Blacklisted areas will only stop units from spawning there.  It will not stop the created units from wandering into the zone.

 

Unfortunately, adding blacklist ability to SOM doesn't look feasible for the patch for a few different reasons.  It's something best left to mission makers, using custom phase scripts in their mission folder.

 

I'm sorry, in earlier posts I don't know why I was reading "ACM" as "SSM".  Getting old and senile maybe?  Anyway, I looked through the ACM with dedicated server in mind, but all I could find was that the Garbage Collector would fail.  When GC processes its list of bodies, it checks group player to see if player is near.  But I didn't get the impression that it would stop the ACM.

Edited by opusfmspol

Share this post


Link to post
Share on other sites

Hmm ok.

 

I tried that 

BIS_ACM_0; BIS_ACM_1 

thing year or two back, and it didnt seem to work back then. Ill try it again.

 

Its so bad i only can work on arma at weekends. I would so much like to try those sugestions right away.

Share this post


Link to post
Share on other sites

Aha....  I just realized the "BIS_ACM_0", "BIS_ACM_1", etc., markers will NOT affect all of the ACM's, only one.  They're only good for a mission with one ACM.  I amended previous post.

 

During initialization, after the marker blacklist gets registered, the marker gets deleted... which means the blacklisting only occurs for the first ACM that initializes.  When the second and third ACM's initialize, the marker is gone.

 

Makes me think that adding the blacklist to each ACM after the modules have initialized and mission starts would be the better way to go.

Share this post


Link to post
Share on other sites

OK Opus i tried your mission. In hosted enviroment works fine, On dedicated it doesnt. The icons are there, the options under radio 0-8-etc are there, but if you call them it does nothing. No errors in RPT except mising string in Description.ext

22:21:41 Mission SSM_test.utes: Missing 'description.ext::Header'
22:21:54 [2.01043e+006,45684.8,0,"XEH: PreInit Started. v1.0.1.196. MISSINIT: missionName=SSM_test, worldName=utes, isMultiplayer=true, isServer=true, isDedicated=true"]
22:21:55 [2.01043e+006,45685.3,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
22:21:55 [2.01043e+006,45685.4,0,"XEH: PostInit Started"]
22:21:55 [2.01043e+006,45685.4,0,"CBA_VERSIONING: cba=1.0.1.196, ace=1.14.0.597, acex=1.14.0.373, acex_ru=1.14.0.77, acex_usnavy=1.14.0.79, "]
22:21:55 [2.01043e+006,45685.5,0,"XEH: PostInit Finished. State: _isClient=false, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=true, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=fa

Share this post


Link to post
Share on other sites

It seems to affirm what I thought, with dedicated server the "waituntil {player == player}" in SSM's init results in clients getting their functions, but the server hangs and doesn't get its functions.

 

I'll get you some edits which will hopefully clear it (and add a header to description.ext)

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
Sign in to follow this  

×