Skip to content

Server Gameplay Runtime Atlas

rayswaynl edited this page Jun 4, 2026 · 30 revisions

Server Gameplay Runtime Atlas

Upstream-history note: Miksuu commit clusters show that server runtime changes around town AI, JIP and performance often need follow-up fixes. Read Developer history and upstream lessons before altering long-running server loops or wakeup logic.

This atlas maps long-running server gameplay loops and runtime surfaces that future owners should treat carefully. Paths are relative to Missions/[55-2hc]warfarev2_073v48co.chernarus/.

Runtime Loops

Runtime surface Source anchors Notes
Town capture loop Server/Init/Init_Server.sqf:510; Server/FSM/server_town.sqf Server-owned capture, supply value changes, camp side updates and performance audit rows.
Town AI loop Server/Init/Init_Server.sqf:512-514; Server/FSM/server_town_ai.sqf Defender/occupation activation, town AI delegation, static defense operation and despawn behavior.
Resource loop Server/Init/Init_Server.sqf:531; Server/FSM/updateresources.sqf Side supply/player funds/commander funds. Economy and AntiStack changes can alter income behavior.
Victory loop Server/Init/Init_Server.sqf:528; Server/FSM/server_victory_threeway.sqf Winner inversion/double-fire hazards live here; route through DR-11/DR-36 before patching.
Supply mission tracking Server/Module/supplyMission/supplyMissionStarted.sqf; Server/Module/supplyMission/supplyMissionCompleted.sqf Client-stamped cargo/reward state remains an authority cleanup lane; completion calls ChangeSideSupply, so rewards hit the DR-44 wfbe_supply_temp_<side> final mutation channel. Scan narrowing is docs/source propagated; use Current source status snapshot before making stable-master or release claims.
HQ killed processing Server/Construction/Construction_HQSite.sqf:89,91; Client/Init/Init_Client.sqf:500-503; Server/Functions/Server_OnHQKilled.sqf:46-81,96-114 Mobile-HQ killed EHs can fire from multiple owning-side clients; Server_OnHQKilled.sqf currently has no processed-once guard before score awards, messages and HQ marker/state broadcasts. Canonical finding: Deep-review findings DR-20.
Server FPS publishing Server/GUI/serverFpsGUI.sqf; Server/Module/serverFPS/monitorServerFPS.sqf; Server/Init/Init_Server.sqf:578,595 Current docs/source exits both publishers on !isDedicated; Arma smoke and branch-scope proof still decide release status. Canonical finding: Deep-review findings DR-19.

Mini-scout follow-up 2026-06-04 mapped the startup cluster around Server/Init/Init_Server.sqf:507-626: town runtime, town AI, victory, resources, garbage and empty-vehicle collectors, cleaner/restorer workers, server FPS publishers, Performance Audit, AFK kick, AntiStack loops, player-count monitor, commander vote workers and day/night control all start from this hub. Runtime edits should therefore be reviewed as a worker set, not as isolated scripts.

Current Runtime Risks

Risk Status Owner route
Hosted/listen FPS busy loop Docs/source propagated; stable/release branch status and Arma smoke decide shipped state; DR-19 Hosted server FPS loop sleep, Current source status snapshot and Deep-review findings DR-19
Supply command-center broad scan Docs/source propagated; stable/release branch status and Arma smoke decide shipped state Supply mission scan narrowing
Supply reward/cooldown authority Open hardening; includes DR-44 final side-supply mutation channel Supply mission authority cleanup
Victory double-fire/winner inversion Open correctness Deep-review findings DR-11/DR-36
HQ-killed duplicate processing / score exploit Open correctness; DR-20 Deep-review findings DR-20
Direct PV authority Open hardening Public variable channel index
AntiStack/database loops High-sensitivity External integrations and AI, headless and performance
Dormant maintenance hooks Init_Server.sqf:36 comments UpdateSupplyTruck; :567 comments groupsMonitor; :65,88-92 retain older commented AFK/server-FPS/MASH compile remnants. Keep disabled hooks documented as historical or deliberately revive them with owner-scoped smoke.

Safe Runtime Rules

  • Do not remove sleeps or change scan cadence without measuring gameplay and performance effects.
  • Keep Arma 2 OA hosted/dedicated/headless differences explicit; do not import Arma 3 locality/JIP examples.
  • Treat publicVariable handlers as lacking a trusted sender identity unless source proves a server-owned anchor.
  • When gameplay code is requested later, patch source Chernarus first and propagate generated Vanilla Takistan through LoadoutManager.

Continue Reading

Systems: Gameplay systems atlas | Performance: Performance opportunity sweep | Current truth: Current source status snapshot

Sidebar

Clone this wiki locally