Jump to content

Recommended Posts

Hi i just heard of this module called the simulation manager anyone could explain what it is and how to use it?

Share this post


Link to post
Share on other sites

I've read somewhere that it basically freezes AI until the player is close enough. Maybe used to save computing power or generate certain events? (Fight doesn't start untilplayer is close etc.)

Share this post


Link to post
Share on other sites
I've read somewhere that it basically freezes AI until the player is close enough. Maybe used to save computing power or generate certain events? (Fight doesn't start untilplayer is close etc.)

This could be amazingly useful. Can the distance be altered? If so, oh man....

Share this post


Link to post
Share on other sites

Yes, you can set the distance and if air units should be frozen too. Take a look at the info button when you place the module in the editor.

Share this post


Link to post
Share on other sites

If there were no changes to it by BIS, this can pretty much f.... up a MP session.

It can catch itself up in a loop during uncaching if you enter an air vehicle, which leads to the server dropping to 0-1 FPS.

maybe they fixed it, just be aware if this happens.

Also, be aware, that your units wont move anymore, or do anything if you passed scripts / waypoints, etc.

Share this post


Link to post
Share on other sites

I was just hoping for inanimate units that only 'come alive' once your players have passed through a trigger.

Share this post


Link to post
Share on other sites

Basically its mainly disableSimulation that gives the improvement on perf. Issue is that they dont move too, hidden units will move but the impact on fps is less big, if there is any on server. If you just want units to "come alive" once you are in the proximity and you dont expect them to do anything before, its fine

Share this post


Link to post
Share on other sites

Sorry to dig up an old thread but I've gotta ask - does the Simulation Manager disable simulation of AI client-side only or client + server?

Also, I'm looking for some clarification on this:

"Distance from playable units at which objects will stop being simulated"

Is this for the client only, or all clients combined? E.g. If player 1 is at base and player 2 is at the AO - will player 1 still be simulating the objects that player 2 is close to? Or will objects near both still be simulated, but those objects that are 2km away from both players stop being simulated?

Share this post


Link to post
Share on other sites

This could be a vary useful module if bis would get some documentation on it. From just playing around with it in the editor i have found the fallowing.

Placing the Simulation Module on the map will cache any unit and/or object placed in the editor by the set range. It will cache any unit regardless of side if it is beyond the range of what was set. It will even cache units created by the sites module with no syncing required. This could prove to be a problem for some missions who need AI to move BVR (beyond visual rang) or what has been setup in the module. What i have come to find is when an AI has a named variable the caching will ignore that AI and allow it to continue with its waypoints and scripting. There is a setting to allow Air vehicles to be ignored but i have not tested it yet. Just from some quick testing i cached 30 groups of rifle squads and had a 15 fps increase when AI where cached. I do not however know if any of this will work in multiplayer or on dedicated server yet.

If it does work on dedicated servers it will greatly help out in mission making for those who are not vary good at scripting. This would be a solution for my issues in my 16 player 100+ AI mission as i dont want to deal with the memory leaks in the spawn group functions.

Edited by Cytreen

Share this post


Link to post
Share on other sites

Looking for clarification as well. I see there's a way to disable it for air units, but I wonder if there's a way to set specific units 'immune' to it's effects. Primarily I have some patrol boats that do really big sweeps and I'd like them to always be moving regardless of where the players are. There's only 2 of them, so I'm not worried about the performance hit.

Share this post


Link to post
Share on other sites

It would be great if there was a simple setvariable that could be added to the ai group to stop the module from affecting it.

Share this post


Link to post
Share on other sites
It would be great if there was a simple setvariable that could be added to the ai group to stop the module from affecting it.

see the above comment from Cytreen. if the AI has a named variable then the simulation manager will not cache it.

Share this post


Link to post
Share on other sites

yeah pastor - i got that, but that means naming each unit - a named group would be a nice touch too. saves a little work especially if placing units is copy and paste of groups placed in the editor.

would naming the site module stop that from caching?

does the Air units setting disable AI from moving or does it disable player air units from triggering them to re-enable their movement.

Share this post


Link to post
Share on other sites

Yeah, and that doesn't help my situation either. That'd help with the boats, but in other cases I have 'convoys' set up that the players need to blow up made up of named units and I don't want them moving at all till the players get nearby because otherwise there's a good chance some of the units will wreck themselves with bad pathing before the players get near them.

Share this post


Link to post
Share on other sites

@Kevson - Yeah, that's what I had and what I'm doing again, but thought the simulation manager would have done the trick for me and saved me a few triggers along the way. :)

Share this post


Link to post
Share on other sites

Well i finally tested this on a dedicated server and sadly like most of BIS shit it does not work. I have done everything from testing this stand alone no scripting and with synced and unsynced and the AI is still visible as well as objects. I observed many issues from AI walking in place to twitching left right repeatedly. Named units have no effect like it does in SP. BIS please make all of your modules support proper dedicated server setups.

Anyone with the skills can you please create a working caching system for editor place AI waypoints and scripted behaviors for TPWCAS. The cB AI caching from arma 2 does not function correctly in arma 3 so please dont post that as a solution.

Share this post


Link to post
Share on other sites
The cB AI caching from arma 2 does not function correctly in arma 3 so please dont post that as a solution.

How so? I use it and it caches units and doesn't throw any errors.

Share this post


Link to post
Share on other sites

When you say named variable, do you mean naming the unit "name field" in the editor or what do you mean?? because giving my Mortar´s names wont keep them from despawning when i'am far away.. i don¨t get it.

Share this post


Link to post
Share on other sites

Ok here are my findings from a quick look at the simulation manager.

1. This is NOT a caching script, caching to me means taking the units saving all their data and deleting them ready to respawn them when needed. It does NOT do this.

What it does do is disable the simulation of units and hides their model.

Distance is set to 2000m unless a value has been set in the module

exlude air is false unless changed in the module

BIS_fps_rescanNewObjects can be set to true to make it rescan the mission for units to monitor for hide/disable.

BIS_persistent holds an array of units that will not be monitored

Every 5 seconds the module rescans its list of playable units (playableUnits + switchableUnits), these are the units that are used for the distance check of whether things should be hidden/disabled or not.

Units to be hidden are allMissionObjects "ALL" (including units inside a vehicle), if any of the following are true then they are not included:-

isnull

dont have a class name

are a gamelogic

have a var name (setVehicleVarName or named in editor insert units name field)

are an AIR vehicle (dependent on exclude air setting)

MAIN LOOP

if an object is not in sidelogic or sideunkown AND

are not in BIS_persistent AND

are not within distance of any playable unit

THEN hide them and disable their simulation

If any playable unit is in an AIR vehicle then distance is doubled

if no playable unit is in an AIR vehicle (previously was) then distance is halved (normal)

if time since last check is greater than 10 seconds OR a playable unit has moved more than a quarter of the check distance then everything is rechecked

if BIS_fps_rescanNewObjects is true OR the BIS_persistent array has changed then objects list is updated and a recheck is done

All of this is done locally on each computer but all playable units are taken into account.

If im playing with my mate DAVE, currently all units within 2000m of either of us are visible and simulated on all computers.

If DAVE is the other side of the map and decides to take off in a helicopter then suddenly all units within 4000m of me and DAVE are visible/simulated on all computers. Even though i may be 10000m away anything DAVE can see (4000m) are also active on my computer.

DEDICATED

As Cytreen mentioned this module does not currently work on dedicated servers, although the FSM DOES work it just seems the BIS module architecture does not start it up as a module. EDIT: (It does seem to work on a dedicated sever but seems to have some issues initialising properly 100% of the time)

Place a game logic and name it.

Then some where in your script (remember you will want to run this everywhere, all clients and the server)

fps_manager setVariable ["radius",2000];
fps_manager setVariable ["excludeAir",false];
[fps_manager] execFSM "\a3\modules_f\ObjectModifiers\functions\fn_moduleSimulationManager.fsm";

Here i have named my gameLogic fps_manager. I suppose you could run this straight from the gamelogic's init itself.

My_Test_Mission

See action menu for quick commands to move you (me, slot 1 in MP) and pl2 which is the other playable unit either near the AI , at +2k away (where you spawn) or +4k away (Kamino), will move the heli aswell if you are sat in it. Open CAM will open the splendid camera at a position looking down on the AI (at the stratis airport) so you can see what is hidden/not hidden.

If there were no changes to it by BIS, this can pretty much f.... up a MP session.

It can catch itself up in a loop during uncaching if you enter an air vehicle, which leads to the server dropping to 0-1 FPS.

I have not checked this out to see if it is still a problem.

It will even cache units created by the sites module with no syncing required. This could prove to be a problem for some missions who need AI to move BVR (beyond visual rang) or what has been setup in the module

Units from site modules can be got by checking their "garrison" variable. This will return an array of all groups spawned by this module. You could then add this array to BIS_persistent to stop them being monitored.

{
{
	BIS_persistent set [count BIS_persistent, _x];
}forEach units _x;
}forEach (mySiteModule getVariable "garrison");

When you say named variable, do you mean naming the unit "name field" in the editor or what do you mean?? because giving my Mortar´s names wont keep them from despawning when i'am far away.. i don¨t get it.
I just tested this, placing a blufor static mortar and naming it in the editor and the unit remains active. Edited by Larrow
  • Like 1

Share this post


Link to post
Share on other sites

Some very useful information there Larrow, will give this a go tonight.

When testing the Simulation Manager on our dedicated server (using the editor module) it does seem to work for us, kinda. AI and objects are hidden/disabled when more than 2km away (as expected). However, objects don't always seem to be re-enabled/unhidden once the player respawns - all base objects are invisible.

If the player dies less than 2km away from the base then this issue doesn't occur (since the objects were never disabled in the first place).

I've reported this issue on the feedback tracker. Please vote it up if you want to see this issue (and the Simulation Manager in general) get some attention.

0016256: Simulation Manager does not re-enable objects on respawn

Edited by GDSN

Share this post


Link to post
Share on other sites
When testing the Simulation Manager on our dedicated server (using the editor module) it does seem to work for us, kinda.

Hmm ok just been back to test this, seems i must of been unlucky and the module does seem to work 95% of the time although there appears to be some timing issues and sometimes on initial spawn the module would not be working as the BIS variables are missing and the hiding/simualtion is not working.

How ever once i get initial spawn and module working i am unable to reproduce the effects you are seeing, no matter how many times i respawn or if i respawn close or far away from hidden/unhidden (except for the 5 second check loop) everything seem to be ok. Will check out your ticket and up vote as this could do with being investigated further.

Updated previous test mission, back to module version with respawning at the three distances (actions readded on respawn).

Share this post


Link to post
Share on other sites

Here is my youtube video. This shows how the simulation manager hides and disables a unit. I basically had the A.I. set to about 5 meters I think.

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

×