AI Performance Tuning - salutesh/DayZ-Expansion-Scripts GitHub Wiki
Enabling the in-game AI stats
To figure out how many concurrent Expansion AI your server can handle, you can use the in-game Expansion AI stats.
To enable the stats, first make sure you added yourself as admin in your AI Settings (only admins will be able to see the in-game stats).
Option A) serverDZ.cfg
Then, with the server stopped, add the following line to your server configuration file (serverDZ.cfg) and start the server (if you already have enableDebugMonitor = 1 in the file, just change the value to 2):
enableDebugMonitor = 2;
Option B) init.c
Alternatively, if you are unable to change enableDebugMonitor to 2 (for example because OmegaManager doesnt allow you to). You can also add the following line inside your init.c
ExpansionWorld.s_DebugMonitor_ShowServerStats = true;
This will enable the in-game Expansion AI stats for all admins in AISettings.json. This option is also available in the diag client (DayZDiag_x64.exe) via the diag menu (Alt+Win) -> Script - modded -> EXP AI.
How to interpret the in-game stats
EAI Count
This shows the total number of alive Expansion AI currently on the server and the number of spawned patrols.
Server FPS
Your max server FPS should be above 60 and your average server FPS should be above 35 (this is with -limitFPS 60 on the server commandline).
EAI UPD Count
Number of Expansion AI updated per time interval. This is adjusted automatically based on server load. The system will try to maintain stable server FPS and aim for an AI update delta-time of around 50-100 ms.
EAI UPD DT (AI Update Delta-Time)
With the desired amount of Expansion AI spawned, your average AI update delta-time should ideally be between 50-100 ms. Values up to around 150 are also still acceptable and will not impede the AI's ability to react to their environment much (it will decrease their maximum rate of fire with guns that have burst or fullauto modes though). Anything higher will lead to increased AI reaction times. If this value gets too high, you should cut down on the amount of concurrent Expansion AI.
EAI UPD COST (AI Update cost)
This is the cost for updating a single Expansion AI. It's mostly informational, but if the average update cost rises above 0.5 ms, then you are approaching the total number of AI you can run.
FTO (Frame Time Optimization)
Frame Time Optimization automatically adjusts the AI updates per time interval (usually 1-4 ms) according to server load. This option is always enabled, but a debug option exists in the AI menu (default hold T key in game) when using DayZDiag_x64.exe to disable it (this can lead to severely degraded performance when more than 30 Expansion AI are on the map).