Skip to content

Commander Town Ledger

grok-main-07162211-1 edited this page Jul 17, 2026 · 1 revision

Commander Town Ledger (CTL)

Source pass: 2026-07-17 against rayswaynl/a2waspwarfare origin/master (Chernarus mission root). Design adaptation of docs/design/v2/aicom-v2-commander-town-ledger.md. Lane is currently DISARMED on master.

What It Is

Commander Town Ledger (CTL) is a WEST/EAST-only virtual per-town strength overlay. Each owned town keeps a strength record that persists across occupation activation cycles: combat depletes it, time regenerates it, and AI investment can push strength above baseline up to a paid cap. Materialization of reactive occupation groups scales by that strength. Standing permanent garrisons are not the point — strength is invisible A-Life, structurally mirrored from the GUER Director ledger.

CTL is not a GUER feature. It does not move strength between towns (no virtual cells). WEST/EAST already have maneuver arms; CTL strength is town-local (regen, payment, attrition).

Current Source State (master, 2026-07-17)

Item Value Anchor
Implementation file Server/AI/Server_CmdTownLedger.sqf header + ledger loop
Launch gate Server/Init/Init_Server.sqf:1116-1118 execVM only when lane flag > 0
Lane master switch AICOMV2_LANE_CMD_TOWN_LEDGER = 0 Common/Init/Init_CommonConstants.sqf:2679DISARMED (owner: not soak-tested; open survivor-tracking defects)
Garrison-link subflag AICOMV2_CTL_GARRISON_LINK = 1 Init_CommonConstants.sqf:2687 — still double-gated on the lane flag; inert while lane is 0
Invest subflag AICOMV2_CTL_INVEST_ENABLE constants near CTL block; design intends paid invest arm

With the lane flag at 0 the launch block is not entered; flag-off is intended to leave mission behaviour byte-identical to the pre-CTL path.

How It Works (when armed)

  1. Ledger — per-town records for WEST/EAST-owned towns (strength, baseline, paid/invested component, timestamps).
  2. Capture seed / regen — capture and idle time drive regeneration toward baseline; fights write survivor ratios back (design; re-verify materialization hooks when arming).
  3. Paid investment — AI commander (and later human commander surfaces) can spend into a town's defense, raising strength toward AICOMV2_CTL_PAID_MAX (design default family matches GUER free-1.0 / paid-1.5).
  4. Garrison link — when both AICOMV2_LANE_CMD_TOWN_LEDGER and AICOMV2_CTL_GARRISON_LINK are on, defender garrison sizing in Server_GetTownGroupsDefender.sqf can scale from ledger strength (mirrored attacker materialization pattern).
  5. TelemetryCTLSTAT|v1|... RPT lines (e.g. INVEST_APPLY, GARRISON).

Not The Commissar Panel / Not GUER Director

System Side Role
Commander Town Ledger WEST/EAST Virtual town defense strength + paid invest
GUER Director V2 resistance Virtual resistance ledger + cells + brain
GUER Commissar Panel resistance players Human spend surface that orders the Director

Open / Known Issues (do not arm lightly)

  • Owner comment on the lane default: CTL was never soak-tested and has open survivor-tracking defects; stay dark until fixed + clean soak.
  • Fresh-eyes note: ledger field written at invest apply (Server_CmdTownLedger.sqf around the INVEST_APPLY path) may include a timestamp slot that is write-only depending on consumer code — re-grep readers before relying on that field.
  • Design docs may still say "design only"; code exists but the lane flag remains 0.

Design And Code Anchors

  • Design: docs/design/v2/aicom-v2-commander-town-ledger.md
  • Implementation plan sibling: docs/design/v2/aicom-v2-ctl-implementation-plan.md (if present in tree)
  • Sibling GUER design: docs/design/v2/aicom-v2-800-guer-director.md
  • Pitch-era GUER page (pre-implementation framing): GUER Director living-resistance pitch

Continue Reading

Edit summary (task wasp-wiki-pages-wave-20260717)

New page. Facts re-read from Chernarus mission source and constants on 2026-07-17. Confidence: high on flag=0 and launch gate; medium on full invest/garrison runtime paths (not runtime-smoked in this pass).

Sidebar

Clone this wiki locally