Skip to content

Territorial Victory Reference

rayswaynl edited this page Jul 2, 2026 · 1 revision

Territorial Victory Reference

This page documents the current Build 87 territorial victory clock in origin/claude/build84-cmdcon36@6f2fc4bd10c8339fd13be087d327717ff58c85e8. It is the dedicated operator reference for the "80% towns for 30 uninterrupted minutes" win path, and it should be read alongside the broader Victory and endgame atlas.

Scope note: line refs below cite the Chernarus source mission, Missions/[55-2hc]warfarev2_073v48co.chernarus/, on the current Build 87 branch. Maintained Vanilla/Takistan line numbers can drift and should be checked before release or source-patch wording.

Current Default

Territorial victory is controlled by a separate flag family, not by the legacy WFBE_C_VICTORY_THREEWAY parameter.

Constant Default Meaning Source
WFBE_C_VICTORY_TERRITORIAL 1 Enables the territorial clock. Common/Init/Init_CommonConstants.sqf:862
WFBE_C_VICTORY_TERRITORIAL_FRAC 0.8 Town-share ratio required before a side's clock starts or keeps running. Common/Init/Init_CommonConstants.sqf:863
WFBE_C_VICTORY_TERRITORIAL_MINS 30 Uninterrupted minutes at or above the ratio before victory is awarded. Common/Init/Init_CommonConstants.sqf:864

The user-facing tip also says territorial victory is live: holding most towns long enough can end the round before every base is destroyed (Common/Init/Init_CommonConstants.sqf:1480).

Two-Threshold Design

The mode uses two thresholds in sequence:

  1. Town-share threshold: every victory-loop tick, the server counts the towns a candidate side holds and checks (_held / _total) >= _terrFrac (Server/FSM/server_victory_threeway.sqf:64-71).
  2. Time threshold: once at or above the ratio, the side must remain there for _terrMins * 60 seconds without dropping below it (server_victory_threeway.sqf:56-58,83-89).

The gate is ratio-based, not rounded-town-count-based. _needed = _terrFrac * _total is display-only, so the actual win logic avoids off-by-one ambiguity around fractional town counts (server_victory_threeway.sqf:65-67).

GUER/resistance is not a candidate winner for this mode. The clock loop iterates WFBE_PRESENTSIDES - [WFBE_DEFENDER], the same exclusion used by the standard victory loop (server_victory_threeway.sqf:119,200). GUER can deny and flip towns, but it cannot complete this win path.

Clock Lifecycle

State Server behavior Evidence
Disabled or no towns The clock block does not run unless WFBE_C_VICTORY_TERRITORIAL > 0, !WFBE_GameOver, and _total > 0. server_victory_threeway.sqf:54
Clock starts A side at or above the ratio gets WFBE_TERRITORIAL_CLOCK_<sid> = time, milestone bucket reset to -1, and win marker reset to 0. server_victory_threeway.sqf:71-80
Clock advances The server computes elapsed and remaining time from the stored start time, then checks completion on later ticks. server_victory_threeway.sqf:81-90
Milestones announce Remaining-time buckets at 20, 10, 5 and 1 minute are rate-limited by WFBE_TERRITORIAL_MILE_<sid>. server_victory_threeway.sqf:91-104
Grip breaks Dropping below the ratio resets clock, milestone and win marker state, and announces that the siege is broken. server_victory_threeway.sqf:107-116
Clock completes Completion sets WFBE_TERRITORIAL_WIN_<sid> = 1; the normal award block reads it on the same side pass. server_victory_threeway.sqf:86-89,145-150

The victory loop sleeps for 80 seconds between passes (server_victory_threeway.sqf:6,203). Operators should expect announcement and award timing to be loop-cadence based rather than frame-exact.

Timeout And Award Path

"Timeout" for this mode means the 30-minute hold timer reaches zero while the side is still at or above the town-share threshold. It is not the same thing as the separate endgame soft-forcing economy taper.

When the territorial timer completes:

  1. The clock block marks WFBE_TERRITORIAL_WIN_<sid> as 1 (server_victory_threeway.sqf:86-89).
  2. The standard victory award block ORs _terrWin into the existing HQ-loss/all-towns trigger (server_victory_threeway.sqf:150,158-159).
  3. For territorial wins, _winSide = _x, because the side being evaluated is the dominating holder (server_victory_threeway.sqf:165-171).
  4. The server sends the normal endgame special with the winner side id (server_victory_threeway.sqf:179).
  5. It writes WF_Winner, sets gameOver and WFBE_GameOver, emits optional WASPSTAT|ROUNDEND, and calls WFBE_CO_FNC_LogGameEnd with _winSide (server_victory_threeway.sqf:186-198).
  6. The script exits the main loop and runs the existing mission shutdown path, including the AntiStack-disabled shortcut or final score persistence tail (server_victory_threeway.sqf:203-230).

The endgame soft-forcing constants are separate: WFBE_C_ENDGAME_FORCE_ENABLE defaults 0, starts after WFBE_C_ENDGAME_FORCE_TIMER = 90 unresolved minutes when enabled, and tapers income with its own step/floor constants (Common/Init/Init_CommonConstants.sqf:605-615). Do not describe that 90-minute economy pressure as the territorial-victory timeout.

Operator Smoke Cues

Use these RPT/log strings for manual or soak smoke when validating a territorial round:

Moment Expected cue
Clock starts `AICOMSTAT
Milestone `AICOMSTAT
Grip breaks `AICOMSTAT
Win awarded `AICOMSTAT

Dashboard announcements should also appear to clients:

Moment Message shape
Clock starts <side> dominates the region ... VICTORY in <mins>:00 unless their grip is broken!
Milestone <side> still holds the region ... VICTORY in <bucket> minute(s) unless broken!
Grip breaks The siege is broken! <side> no longer dominates the region ... the victory clock is reset.
Win awarded <side> has WON by TERRITORIAL DOMINANCE ...

Threeway Parameter Caution

WFBE_C_VICTORY_THREEWAY still exists and defaults to 0 (Common/Init/Init_CommonConstants.sqf:1559). Current Build 87 Chernarus deliberately removed the old _victory == 0 trap so non-zero values no longer disable standard supremacy/HQ-loss detection, but the source comment is explicit: no new victory modes are added by _victory; the change only keeps standard victory detection running (server_victory_threeway.sqf:3,11-15).

WFBE_C_VICTORY_THREEWAY_LOCATION_SWAP = 300 remains a legacy respawn/start-location parameter (Common/Init/Init_CommonConstants.sqf:1560). The current Chernarus source still references WFBE_C_VICTORY_THREEWAY in respawn availability (Client/Functions/Client_GetRespawnAvailable.sqf:96), but that is not the territorial clock.

Practical rule: use WFBE_C_VICTORY_TERRITORIAL* when discussing the 80%/30min mode. Use WFBE_C_VICTORY_THREEWAY only when discussing legacy victory-condition parameter behavior or respawn/start-location rules.

Smoke Checklist

Scenario Expected result
Territorial flag 0 No territorial clock announcements or win markers; standard victory detection still runs.
One side reaches the town-share ratio Clock starts once for that side, with clock-start telemetry and a dashboard announcement.
The side stays above the ratio Milestone buckets fire at most once each as the 30-minute timer advances.
The side drops below the ratio Clock, milestone and win marker reset; clock-broken telemetry appears.
The side holds for the full duration _winSide is the holding side; normal endgame, WF_Winner, WASPSTAT and LogGameEnd use that winner.
GUER/resistance holds towns GUER may deny territory, but it is excluded from candidate winners and should not receive a territorial win.
Non-zero WFBE_C_VICTORY_THREEWAY Standard detection should continue in current Chernarus; do not expect this parameter to implement the 80%/30min territorial mode.

Continue Reading

Main atlas: Victory and endgame atlas | Town context: Towns, camps and capture atlas | GUER context: GUER Insurgents faction overview

Sidebar

Clone this wiki locally