Skip to content

GUER Insurgent Player Economy

rayswaynl edited this page Jul 2, 2026 · 5 revisions

GUER Insurgent Player Economy

Source-verified 2026-06-27 against master bef714aa5. Paths relative to Missions/[55-2hc]warfarev2_073v48co.chernarus/ unless noted (other roots: Server/, Common/, Client/). Arma 2 OA 1.64.

The optional GUER "Insurgents" playable faction has no commander, no factory, and no town-supply economy. Instead it runs a self-contained two-part loop on the server: a per-minute stipend paid straight into each living resistance player's team funds, and a time-tier broadcast that progressively unlocks heavier ground vehicles in the buy menu. Both halves live in a single server loop (Server/Server_GuerStipend.sqf) and a client overlay (Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf). The whole system keys off the master gate WFBE_C_GUER_PLAYERSIDE — which defaults to ON (1) since the B66 trial-round flip, so a stock server runs the faction live (set the gate to 0 to disable it and restore byte-for-byte two-side behaviour).

Current build84/cmdcon36 balance refresh: Balance asymmetries records the current 30/80/160 kill-tier defaults, 0.5 kill-bounty coefficient, checkpoint toll versus stipend math, upgrade dependency splits, and W1 War Chest sizing. Older provenance on this page still describes the broader system shape unless a row cites the refreshed constants directly.

Master Gate

Everything keys off one constant. It defaults to ON since B66; set it to 0 to disable the faction.

Item Value / Behaviour Source
Constant default WFBE_C_GUER_PLAYERSIDE = 1 (ON since B66; 0=off) Common/Init/Init_CommonConstants.sqf:76
Resistance side ID WFBE_C_GUER_ID = 2 Common/Init/Init_CommonConstants.sqf:32
Server loop spawn gate Init_Server.sqf runs execVM "Server\Server_GuerStipend.sqf" at its own isServer + WFBE_C_GUER_PLAYERSIDE > 0 gate (B74.2: decoupled from team-registration block) Server/Init/Init_Server.sqf:814-815
Server loop self-gate if ((... "WFBE_C_GUER_PLAYERSIDE", 0) < 1) exitWith {} Server/Server_GuerStipend.sqf:14
Client overlay load gate Root_GUE.sqf compiles the overlay only when WFBE_C_GUER_PLAYERSIDE > 0 Common/Config/Core_Root/Root_GUE.sqf:129-130
Client overlay self-gate if !((... "WFBE_C_GUER_PLAYERSIDE", 0) > 0) exitWith {}; also exits if not local player or not resistance Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:22-24

When the gate is OFF, Init_Server.sqf additionally deletes the synced GUER player-slot units so nobody can join a non-functional insurgent slot (Server/Init/Init_Server.sqf:621-626).

Team Registration

When the gate is ON, Init_Server.sqf registers the four RESISTANCE player slots (synced to WFBE_L_GUE, the LocationLogicOwnerResistance) as harass teams before the stipend loop starts.

Item Value Source
Registration gate WFBE_C_GUER_PLAYERSIDE > 0 && !isNil "WFBE_L_GUE" Server/Init/Init_Server.sqf:751
GUER starting funds wfbe_funds = 50000 per team Server/Init/Init_Server.sqf:760
Team side flag wfbe_side = resistance Server/Init/Init_Server.sqf:761
Persistent flag wfbe_persistent = true Server/Init/Init_Server.sqf:762
Autonomy [_group, false] Call SetTeamAutonomous Server/Init/Init_Server.sqf:765

Note the registration comment at Server/Init/Init_Server.sqf:586 calls GUER a "zero-fund harass team", but the live registration seeds each team with 50000 funds (Server/Init/Init_Server.sqf:596) — the stipend tops that up from minute to minute.

The Stipend (Per-Minute Cash)

The loop pays a town-deficit-scaled rate to every living resistance player's group, once per interval, via WFBE_CO_FNC_ChangeTeamFunds.

Parameter Value Source
Interval _interval = 60 seconds Server/Server_GuerStipend.sqf:18,33
Base rate _baseRate = 150 per interval Server/Server_GuerStipend.sqf:19
Per-town bonus _townBonus = 10 per GUER-held town below start count Server/Server_GuerStipend.sqf:20
Cap _baseRate * 3 = 450 per interval (deep deficit) Server/Server_GuerStipend.sqf:49
Rate formula (_baseRate + (_deficit * _townBonus)) min (_baseRate * 3) Server/Server_GuerStipend.sqf:49
Deficit formula (_startTownCount - _curTowns) max 0 Server/Server_GuerStipend.sqf:48
Recipient filter alive _x && side _x == resistance && isPlayer _x, iterated over playableUnits Server/Server_GuerStipend.sqf:51-52,58
Payment call [_g, _rate] Call WFBE_CO_FNC_ChangeTeamFunds on the player's group Server/Server_GuerStipend.sqf:56

WFBE_CO_FNC_ChangeTeamFunds simply adds _amount to the team's wfbe_funds (broadcast public): _team setVariable ["wfbe_funds", (_team getVariable "wfbe_funds") + _amount, true] (Common/Functions/Common_ChangeTeamFunds.sqf:8). Before paying, the loop initialises a missing wfbe_funds to 0 on the player's group (Server/Server_GuerStipend.sqf:55).

Town-Deficit Snapshot

The "starting" town count is captured once, after ownership has had time to settle, and the loop never re-baselines it — so capturing towns back from GUER raises the stipend, while GUER expanding past its start does not reduce it below base.

Step Behaviour Source
Wait condition waitUntil towns populated AND WFBE_L_GUE exists & non-null Server/Server_GuerStipend.sqf:23-26
Settle delay sleep 30 after the wait Server/Server_GuerStipend.sqf:27
Snapshot _startTownCount = {(_x getVariable ["sideID", -1]) == WFBE_C_GUER_ID} count towns Server/Server_GuerStipend.sqf:29
Current count recomputed each tick by the same sideID == WFBE_C_GUER_ID count Server/Server_GuerStipend.sqf:47
Loop guard while {!WFBE_GameOver} Server/Server_GuerStipend.sqf:52
Start log ["INITIALIZATION", ... "GUER player economy started (start towns=%1)."] Server/Server_GuerStipend.sqf:30

Because the snapshot uses sideID == 2 (WFBE_C_GUER_ID), only towns the resistance actually owns at settle time count toward the baseline. Deficit is clamped at 0 (max 0), so the rate never drops below the 150 base.

Kill Bounty (Cash for Enemy Kills)

Beyond the stipend, a GUER player's team is paid a bounty every time the player kills a WEST/EAST unit, handled server-side in RequestOnUnitKilled.sqf. This is the third GUER income source (alongside the stipend and the 150 * supplyValue town-capture cash).

Item Value Source
Gate WFBE_C_GUER_PLAYERSIDE > 0, killer is resistance, killer side != killed side, killer has a wfbe_funds team Server/PVFunctions/RequestOnUnitKilled.sqf:131-152
Normal bounty round((unitPrice select QUERYUNITPRICE) * WFBE_C_GUER_KILL_BOUNTY_COEF), coef 0.5 (50% of unit price) Common/Init/Init_CommonConstants.sqf:80
IED bounty coef WFBE_C_GUER_IED_KILL_COEF = 0.30 (30%) when the kill is within ~6 s of a wfbe_ied_recent stamp (anti-farm) Common/Init/Init_CommonConstants.sqf:81
Sink added to the killer's group wfbe_funds via WFBE_CO_FNC_ChangeTeamFunds Server/PVFunctions/RequestOnUnitKilled.sqf:152

The cumulative side-wide counter WFBE_GUER_PLAYER_KILLS (incremented only on WEST/EAST kills by GUER players) drives the vehicle kill-tiers below, the 25-kill M113_UN_EP1 VBIED unlock, and the kill-scaled barracks AI cap (base 4, +1 per 10 kills, max 12).

Vehicle Kill-Tier Broadcast

The same loop publishes WFBE_GUER_VEHICLE_TIER from the cumulative GUER player kill count (WFBE_GUER_PLAYER_KILLS), so the buy menu gates heavier ground vehicles on kills — the legacy elapsed-time ladder (30 m / 90 m / 180 m) was removed in B75.5. Both WFBE_GUER_VEHICLE_TIER and WFBE_GUER_PLAYER_KILLS are re-published every cycle (not only on change) for JIP durability, and the tier is seeded + broadcast immediately at loop start so already-joined players do not wait 60 s.

Tier Unlock threshold (WFBE_GUER_PLAYER_KILLS) Source
0 (default) 0 kills (from start) Server/Server_GuerStipend.sqf
1 _kills >= WFBE_C_GUER_KILLTIER_1 (current default 30 kills; was 15) Common/Init/Init_CommonConstants.sqf:108, Server/Server_GuerStipend.sqf
2 _kills >= WFBE_C_GUER_KILLTIER_2 (current default 80 kills; was 40) Common/Init/Init_CommonConstants.sqf:109, Server/Server_GuerStipend.sqf
3 _kills >= WFBE_C_GUER_KILLTIER_3 (current default 160 kills; was 80) Common/Init/Init_CommonConstants.sqf:110, Server/Server_GuerStipend.sqf
Broadcast sets + publicVariable "WFBE_GUER_VEHICLE_TIER" every cycle (JIP durability); also re-broadcasts WFBE_GUER_PLAYER_KILLS each cycle Server/Server_GuerStipend.sqf

Client Overlay: Depot Pool Rebuild

Root_GUE_PlayerOverlay.sqf runs on each GUER player and rebuilds the buy-menu depot pool WFBE_GUERDEPOTUNITS whenever the broadcast tier changes. The buy menu reads WFBE_GUERDEPOTUNITS at open time, so updating it dynamically is what time-gates the vehicles.

Item Value / Behaviour Source
First-tick seed WFBE_GUERDEPOTUNITS set synchronously before the watcher spawns Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:47
Watcher loop [] spawn { while {!WFBE_GameOver && local player && side group player == resistance} ... } Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:48-51
Tier read _tier = ... getVariable ["WFBE_GUER_VEHICLE_TIER", 0]; rebuild only when _tier != _lastTier Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:52-53
Poll interval sleep 10 Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:84
Map branch runtime if (worldName == "Chernarus") selects GUE_* roster, else TK_GUE_*_EP1 (GUER-MAPFIX 2026-06-18: was a #ifdef IS_CHERNARUS_MAP_DEPENDENT, broken when the file is preprocessed standalone) Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:63

Chernarus Roster Per Tier

Tier Vehicles added Source
0 (always) Offroad_DSHKM_Gue, V3S_Gue, hilux1_civil_2_covered (VBIED), Ka137_MG_PMC + GUE_Soldier_* infantry Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:58-63
1 (current default 30 kills) + BRDM2_Gue, T34_TK_GUE_EP1 Common/Init/Init_CommonConstants.sqf:108, Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:64
2 (current default 80 kills) + T55_TK_GUE_EP1, BTR40_TK_GUE_EP1 Common/Init/Init_CommonConstants.sqf:109, Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:65
3 (current default 160 kills) + T72_Gue, BMP2_Gue Common/Init/Init_CommonConstants.sqf:110, Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:66

Takistan Roster Per Tier

The Takistan branch has no T-72/BMP-2 GUE (caps at the T-55 family) and repoints the VBIED type to the TK covered pickup.

Tier Vehicles added Source
0 (always) Offroad_DSHKM_TK_GUE_EP1, Pickup_PK_TK_GUE_EP1, V3S_TK_GUE_EP1, datsun1_civil_2_covered (VBIED), Ka137_MG_PMC + TK_GUE_*_EP1 infantry Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:71-77
1 (current default 30 kills) + BRDM2_TK_GUE_EP1, T34_TK_GUE_EP1 Common/Init/Init_CommonConstants.sqf:108, Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:78
2 (current default 80 kills) + T55_TK_GUE_EP1, BTR40_MG_TK_GUE_EP1 Common/Init/Init_CommonConstants.sqf:109, Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:79
3 (current default 160 kills) + Ural_ZU23_TK_GUE_EP1 Common/Init/Init_CommonConstants.sqf:110, Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:80

The overlay also defines per-role respawn gear for the Engineer, Spotter/Sniper and Medic roles, identical on both maps (AKS-74 family): WFBE_GUER_DefaultGearEngineer/Spot/Medic (Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:28-42). The single overlay file is the persistent edit point for both maps — LoadoutManager copies Chernarus to Takistan on regen, and a separate Root_TKGUE_PlayerOverlay.sqf would be deleted by DeleteExtraFiles (Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:9-12).

End-to-End Flow

Stage Actor What happens
Boot Server Init_Server.sqf registers GUER teams (50000 funds) and execVMs the stipend loop when gate ON (Server/Init/Init_Server.sqf:587,596,612)
Settle Server Loop waits for towns + WFBE_L_GUE, sleeps 30 s, snapshots start-owned town count (Server/Server_GuerStipend.sqf:23-29)
Each 60 s Server Recomputes tier from WFBE_GUER_PLAYER_KILLS, re-publishes the tier + kill count every cycle; computes the deficit-scaled rate, pays each unique living resistance group (Server/Server_GuerStipend.sqf)
On tier change Client Overlay watcher rebuilds WFBE_GUERDEPOTUNITS for the new tier (Common/Config/Core_Root/Root_GUE_PlayerOverlay.sqf:51-82)
On buy-menu open Client Buy menu reads WFBE_GUERDEPOTUNITS as its depot pool

Continue Reading

Sidebar

Clone this wiki locally