Skip to content

Architecture Overview

rayswaynl edited this page Jun 28, 2026 · 16 revisions

Architecture Overview

For upstream development patterns and negative knowledge from Miksuu PRs, reverts and branch history, start with Developer history and upstream lessons. It helps distinguish current architecture from old experiments and abandoned merge attempts.

The repository is an Arma 2 OA Warfare/CTI mission derived from Benny's Warfare and actively modernized for the Miksuu/WASP server. The core runtime is SQF in a mission folder, surrounded by C# helper tools, a Discord status bot, and a Windows extension bridge.

Unless a row names another ref, source anchors below are valid for docs branch docs/developer-wiki-index HEAD@55cb55e2170f. Rechecked 2026-06-24: targeted source diffs from 2de2de92 through HEAD over the overview's cited runtime and bootstrap paths are empty, preserving the earlier overview source-anchor snapshots. Treat current stable/B74.1 origin/master@f8a76de34, current B74.2 origin/claude/b74.2-aicom@21b62b04, historical release a96fdda2, Miksuu b8389e748243 and origin/perf/quick-wins@0076040f as branch-scope refs; follow the owner pages before citing line refs from those branches.

How To Use This Page

Use this page to choose the right owner document. Keep detailed branch matrices, patch shapes and smoke checklists in the narrower pages.

Need Open this
Boot order, role detection and JIP waits Mission entrypoints and lifecycle, Lifecycle wait-chain, SQF code atlas
Function compile ownership and runtime wiring SQF code atlas, Function and module index, Variable and naming conventions
Server loops, operations and integrations Server runtime and operations, Server gameplay runtime atlas, External integrations
Networking, PV/PVF and authority hardening Networking and public variables, Public variable channel index, Server authority migration map, PVF dispatch implementation
Client UI, menus, HUD and markers Client UI systems atlas, Player UI workflow map
Economy, construction, upgrades, AI, supports and artillery Economy, towns and supply, Construction and CoIn systems atlas, Upgrades and research, AI/headless/performance, Support specials and tactical modules atlas
Generated targets, release propagation and branch status Tools and build workflow, Agent release readiness ledger, Current source status snapshot, Feature status register

Current Branch Scope

Use this table before turning an architecture overview anchor into a branch claim.

Ref Architecture source scope Practical route
Docs branch HEAD@55cb55e2170f Runtime and bootstrap anchors listed here are unchanged from 2de2de92 / 05664f17 for checked description.ext, initJIPCompatible.sqf, common/client/server/headless init paths and HC_IsHeadlessClient.sqf. Tooling line anchors remain branch-sensitive and are owned by Tools and build workflow. Use this page for orientation, then open the linked owner page for system behavior, branch matrices and smoke gates.
Current stable/B74.1 origin/master@f8a76de34 and current B74.2 origin/claude/b74.2-aicom@21b62b04 Same high-level source/generated-target architecture, but line refs and some boot-adjacent behaviors differ. B74.2 changes only source-Chernarus Client/Init/Init_Client.sqf and Server/Init/Init_Server.sqf among checked boot paths; maintained Vanilla stays stable-shaped. Start from Mission entrypoints and lifecycle, Lifecycle wait-chain, Source fix propagation queue and the subsystem owner page before citing stable/B74.2 line refs.
Historical release a96fdda2, Miksuu b8389e748243 and origin/perf/quick-wins 0076040f Source shape is close enough for architecture orientation, but branch drift remains important, including HC bootstrap shape, FPS publisher count, generated-input/template state and tooling root-discovery differences. Recheck exact source paths before making upstream/perf/release claims; use Developer history and upstream lessons for historical context.

Runtime Owner Map

Partition Primary responsibility Source anchors Deeper owner
Common Shared constants, config imports, utility functions, public-variable registration, faction/core data, artillery and shared modules. Common/Init/Init_Common.sqf:6-85, :94-160, :289-323, :369-371 SQF code atlas, Assets/config/localization atlas
Server Authoritative side logic, economy state, towns, AI spawning, victory checks, PVF request handling, cleanup, extension hooks, AntiStack and server metrics. Server/Init/Init_Server.sqf:10-95, :355-386, :507-538, :577-620 Server gameplay runtime atlas, Server runtime and operations
Client UI, menus, player actions, local HUD/marker loops, skill modules, supply mission start flow, map interactions and client PVF handlers. Client/Init/Init_Client.sqf:49-140, :324-339, :360-388, :490-509, :547-595, :773-789 Client UI systems atlas, Player UI workflow map
Headless Headless-client function subset and registration into server delegation. initJIPCompatible.sqf:164-170, :236-238; Headless/Init/Init_HC.sqf:4-15 AI/headless/performance, Headless delegation and failover
WASP Custom gameplay overlay such as RPG drop, base repair, marker monitor and start-vehicle additions. initJIPCompatible.sqf — the old WASP bootstrap (WASP_procInitComm) compile line has been removed from master; the mission relies on raw setVehicleInit/processInitCommands calls directly; live client wiring starts from Client/Init/Init_Client.sqf:15, :573-574, and WASP start vehicles are server-created in Server/Init/Init_Server.sqf:425-463. WASP overlay, WASP marker wait cleanup

Partition caveat: Common/Init/Init_Common.sqf is not purely client-safe shared code. It imports public variables at :294-295, but also has server-only group config under if (isServer) at :302-308. Confirm the owner before moving compile or config registration.

Source And Generated Targets

Missions/[55-2hc]warfarev2_073v48co.chernarus is the source mission for gameplay edits. Maintained Vanilla/Takistan is generated or copied from that source family; modded folders are not a safe propagation target unless a tooling owner explicitly claims them.

Target / tool Current source-backed rule Owner route
Source mission Edit Chernarus first for gameplay/source changes. description.ext:39-58 includes generated version.sqf, sounds/music and the resource/dialog/title/parameter headers. Source inventory, Tools and build workflow
Generated version.sqf contract description.ext:39 includes version.sqf; clean checkouts need LoadoutManager-generated target files before pack/test claims. Mission config/version include graph, Tools and build workflow
LoadoutManager root Branch-sensitive; this overview keeps only the docs-head anchor. Current docs head still accepts either an ancestor named a2waspwarfare or a repo-like root with Missions, Missions_Vanilla and Tools/LoadoutManager/LoadoutManager.csproj (FileManager.cs:153,158,166,176,184-188). Stable/release/Miksuu/perf branch splits belong on the tooling owner pages. Tools and build workflow, Source fix propagation queue
Maintained generated targets SqfFileGenerator.cs:128-129 writes Chernarus and Takistan terrain outputs; :131-132 keeps modded terrain writing commented. Tools and build workflow
Packaging ZipManager.cs:16 packages Missions and Missions_Vanilla; Modded_Missions is commented out. Tools and build workflow

Bootstrap Shape

initJIPCompatible.sqf is the front-door role router. It imports MP parameters and constants at :121-123, applies Air Event/debug overrides at :125-162, gates headless support at :164-170, starts Common/Towns at :214-215, starts Server at :217-220, waits for side team state before Client at :223-233, and starts Headless at :236-238.

The exact wait graph belongs in Lifecycle wait-chain. The exact compile registry belongs in SQF code atlas. The high-risk architecture fact is the separation of ownership: server creates replicated side/team/HQ state (Init_Server.sqf:355-386, :465-502), clients wait for that state and wire local UI/action/runtime surfaces (Init_Client.sqf:360-388, :459-509, :787-789), and headless clients still register after a fixed sleep rather than an explicit serverInitFull barrier (Headless/Init/Init_HC.sqf:11-15 versus Init_Server.sqf:507).

Representative Source Anchors

Claim Source anchors
Mission front door and include graph description.ext:39-58 includes version.sqf, sound/music headers and the Rsc header/style/parameter/resource/dialog/title files.
Runtime role dispatch initJIPCompatible.sqf:214-238 starts Common, Towns, Server, Client and Headless branches after parameter setup.
Common side-presence/defender setup Common/Init/Init_Common.sqf:273-287 detects which side logics exist and fills WFBE_PRESENTSIDES, then still fixes WFBE_DEFENDER = resistance; keep dynamic-defender work routed through the lifecycle/feature owner pages.
Server replicated state and loops Server/Init/Init_Server.sqf:355-386 seeds side logic state; :507-538 starts town/victory/resource/collector loops; :577-620 starts server FPS, PerformanceAudit, AntiStack and player-list follow-up work.
Client waits and local runtime surfaces Client/Init/Init_Client.sqf:360-388 waits for town/structure/commander state before client FSMs; :459-509 handles spawn/HQ/CoIn setup; :773-789 finishes load-in and vote-menu state.
Headless timing edge Headless/Init/Init_HC.sqf:14-15 uses a bounded waitUntil (20 s deadline via diag_tickTime) before connected-hc; it is not an explicit wait on serverInitFull from Server/Init/Init_Server.sqf:507. (The former blind sleep 20 was replaced in master — see commit 3d0ada29b.)

Development Philosophy

This mission values runtime performance and live-server stability. Many systems have explicit audit logging, cached UI writes, deferred loops, and optional switches. Documentation and feature work should preserve those patterns instead of reintroducing large per-frame scans or unconditional global broadcasts.

Continue Reading

Previous: Quickstart | Next: Mission entrypoints and lifecycle

Main map: Home | Source map: Source inventory | Runtime: Lifecycle wait-chain

Sidebar

Clone this wiki locally