Skip to content

AI Commander Tunable Constants Reference

rayswaynl edited this page Jul 12, 2026 · 3 revisions

AI Commander Tunable Constants Reference (WFBE_C_AI_COMMANDER_* / WFBE_C_AICOM_*)

Source-verified 2026-07-12 against master 9d7482116. Paths relative to Missions/[55-2hc]warfarev2_073v48co.chernarus/ unless noted. Arma 2 OA 1.64.

Every AI-commander tunable lives in one contiguous block of Common/Init/Init_CommonConstants.sqf under the //--- AI. heading (now lines 317-1424; with late-defined stuck/assault/slope constants under //--- Camps. starting at line 1425). This page tabulates each constant by its exact source line, default value, and one-line role. It is a config catalog, not a behavior audit — for what is/isn't actually wired into the supervisor, see AI Commander Autonomy Audit. Rows marked ⚠️ PROPOSE-FLAG have a source-side semantics change (not just a value change) and were deliberately left unrewritten pending owner review.

Two naming conventions coexist: the older WFBE_C_AI_COMMANDER_* (V0.x revival series) and the newer short WFBE_C_AICOM_* (B36/B37/V0.7+ tuning). Constants defined with if (isNil "X") then {X = ...} are param/override-overridable; bare X = ... assignments are forced (cannot be changed by a lobby param). None of the AI-commander constants carry a WF_Debug branch — START_FUNDS is a flat 200000 regardless of debug mode.

Master switches and locks

Constant Default Line Override? Meaning
WFBE_C_AI_COMMANDER_ENABLED 1 318 yes Enable or disable the AI commanders.
WFBE_C_AI_COMMANDER_LOCK 0 321 yes When 1, AI retains full command regardless of who occupies the slot (protects eval/night sessions from accidental human takeover). B67 changed live default to 0 (hybrid commander enabled — players can vote out the AI). Set to 1 to relock.
WFBE_C_AI_COMMANDER_ARTILLERY 0 165 no (forced) ⚠️ PROPOSE-FLAG (unverified 2026-07-12): source at Init_CommonConstants.sqf:601 is now if (isNil "WFBE_C_AI_COMMANDER_ARTILLERY") then {WFBE_C_AI_COMMANDER_ARTILLERY = 1} — flipped from forced-0 to overridable default-1 (comment at :912 dates this "2026-07-08, fable/alife-arty-dwell"). Semantics changed, not just the value — needs owner review before this row is rewritten.
WFBE_C_AI_COMMANDER_LOG 1 603 no V0.4: always-on [AICOM] diag_log (independent of WF_LOG_CONTENT; 0 to silence).
WFBE_C_AI_COMMANDER_USE_ARC_APPROACH 1 341 no 1: SetTownAttackPath arc approach; 0: simple AIMoveTo fallback.

Difficulty and economy (the LEVEL switch)

WFBE_C_AI_COMMANDER_LEVEL (line 606, default 1) drives a switch (lines 607-611) that sets three synthetic-money multipliers. Supply stays real on every level; only the synthetic FUNDS are tuned.

Constant Line Easy (LEVEL 0) Normal (LEVEL 1, default) Hard (LEVEL 2)
WFBE_C_AI_COMMANDER_LEVEL 606 0 1 (default) 2
WFBE_C_AI_COMMANDER_FUNDS_MULT 608 / 610 / 609 1.0 1.5 2.0
WFBE_C_AI_COMMANDER_INCOME_MULT 608 / 610 / 609 1.0 1.5 2.0
WFBE_C_AI_COMMANDER_INCOME_STIPEND 608 / 610 / 609 0 6000 9000

The Normal branch is the default case at line 610: base commander UBI = $2000/min CASH (the 60s income tick means per-tick == per-min). It is an unconditional per-tick AI-commander funds drip that keeps the AI fielding armies on a near-empty server.

Constant Default Line Override? Meaning
WFBE_C_AI_COMMANDER_START_FUNDS 200000 1518 yes B36 hotfix (Ray 2026-06-15): AI commander starts with a flat 200k cash (was FUNDS_START × FUNDS_MULT ≈ 45k); it runs the whole side. Players start with 30k. Defined in the //--- Economy. block, not the //--- AI. block.
WFBE_C_AICOM_INCOME_MULT_MAX 4.0 395 no Hard ceiling on the scaled commander income multiplier (packed-server runaway guard). B67: raised 3.0->4.0 to avoid clipping the low-pop inverted bonus.

Worker cadences and unit caps

Constant Default Line Meaning
WFBE_C_AI_COMMANDER_TICK 15 346 Supervisor base tick (s); how often the order-executor runs (hybrid responsiveness).
WFBE_C_AI_COMMANDER_BASE_INTERVAL 60 347 V0.2: base worker cadence (HQ deploy → doctrine build order → defenses).
WFBE_C_AI_COMMANDER_TEAMS_INTERVAL 90 348 V0.2: team-founding cadence.
WFBE_C_AI_COMMANDER_UPGRADE_INTERVAL 300 342 Upgrade-worker cadence (s). B67: raised from 120 to pace ~37-entry tech tree over ~185 min.
WFBE_C_AI_COMMANDER_TOWN_INTERVAL 120 343 Town-assignment worker cadence (s).
WFBE_C_AI_COMMANDER_PRODUCE_INTERVAL 45 344 Production worker cadence (s).
WFBE_C_AI_COMMANDER_TYPES_INTERVAL 30 345 Team-typing worker cadence (s).
WFBE_C_AI_COMMANDER_STRATEGY_INTERVAL 60 612 V0.5: war-strategy worker cadence (spearheads/relief/strike/arty).
WFBE_C_AI_COMMANDER_MOVE_INTERVALS 3600 337 Movement re-issue interval (s).
WFBE_C_AI_COMMANDER_TOTAL_AI_MAX 140 340 Per-side AI ceiling for AI-commander unit production (FPS safety cap).
WFBE_C_AI_COMMANDER_SUPPLY_TRUCKS_MAX 5 338 Max supply trucks the AI commander fields.
WFBE_C_AI_COMMANDER_DEFENSES_MAX 4 353 V0.2: manned base statics the AI places around its HQ.
WFBE_C_AI_COMMANDER_BUILD_GRACE 300 351 B36: seconds with NO human commander (from start, re-armed when a human leaves) before the AI builds/spends.

Team founding and dynamic population scaling

The static founding target plus the inverse-population team curve (B36.1, Ray 2026-06-15) consumed by AI_Commander_Teams.sqf. The team count is the dominant server-FPS lever, so the founding target scales INVERSELY with live human player count (headless clients excluded): more players → fewer HQ squads.

Constant Default Line Meaning
WFBE_C_AI_COMMANDER_TEAMS_TARGET 2 349 B36: HALVED 4→2 to cut HC saturation + group count. With MAX_EXTRA 1 the founding cap is 3 teams/side. Rollback: 4.
WFBE_C_AI_COMMANDER_TEAMS_MAX_EXTRA 0 352 Pinned at 0 (punchy-AICOM): exactly TEAMS_TARGET teams at low pop; no banking-valve extras beyond TEAMS_LOWPOP_EXTRA. Rollback: 1.
WFBE_C_AICOM_TEAMS_PC_LOW 10 359 0-2 players bucket. B59 (2026-06-20): 10 stays (comment history shows a since-reverted 10→15 load-test experiment).
WFBE_C_AICOM_TEAMS_PC_MID 7 360 3-5 players bucket. Build83 (2026-07-01): 8→7 (~20% commander-team trim).
WFBE_C_AICOM_TEAMS_PC_HIGH 4 361 6-9 players bucket. Build83: 5→4 (~20% trim).
WFBE_C_AICOM_TEAMS_PC_FULL 3 362 10+ players bucket. Rollback the whole curve: set all four to 2.
WFBE_C_AICOM_DISBAND_SAFE_DIST 1200 372 B36.1 on-join cleanup: retire a rear AI team only when NO player is within this many metres of its leader AND it is not in combat. punchy-AICOM (2026-06-17): 600→1200, wider no-retire radius so rear teams are kept; only retiring when truly far from any player. Rollback: 600.

Income scaling and the banking valve

Inverted income bonus (highest at LOW pop, to fund the team-curve flood) plus the B37 banking valve that converts low-pop banked funds into squads.

Constant Default Line Meaning
WFBE_C_AICOM_INCOME_PC_BONUS 0.06 373 B36.1: +6% AI-commander CASH income per human player UNDER the REF pop (inverted; 0 disables → flat INCOME_MULT).
WFBE_C_AICOM_INCOME_PC_REF 10 374 B36.1: player count at/above which the inverted income boost is ZERO (base income).
WFBE_C_AICOM_BANKING_VALVE 1 376 B37: 1=on (low-pop funds→squads valve + income trim); 0=B36.1 behaviour.
WFBE_C_AICOM_TEAMS_LOWPOP_EXTRA 4 377 B37: max extra HQ teams a rich low/mid-pop (≤5) commander may field when the valve is on (non-tiered fallback). B74 (Ray 2026-06-22): re-opened 0→4. Note: a newer per-tier WFBE_C_AICOM_LOWPOP_EXTRA_BY_TIER array (Init_CommonConstants.sqf:389) now supersedes this in most paths — not yet covered by this page.
WFBE_C_AICOM_INCOME_PC_BONUS_VALVE 0.045 394 B37: gentler low-pop income boost when the valve is on (vs 0.06), so more-squads does not over-bank.

Combined-arms mix and air gate

Constant Default Line Meaning
WFBE_C_AICOM_TYPE_MIX [0.65, 0.20, 0.12, 0.03] 521 P1 combined-arms ratio: target class mix [infantry, light, heavy, air] for newly-typed teams. Weights need not sum to 1 (normalised at pick time); falls back to a lower class then infantry if the rolled class has no buildable.
WFBE_C_AICOM_AIR_MIN_TOWNS 3 396 Aircraft are deferred until the AI holds this many towns (air is a late, established-only asset). 0 = no gate. B66: 4→3, bring air online a town sooner.

Coherent-front spearhead scoring (V0.8)

The frontier prefilter + distance-dominant scorer that makes the army advance as a wave onto nearby objectives instead of cherry-picking the enemy's rear (claude-gaming 2026-06-14).

Constant Default Line Meaning
WFBE_C_AICOM_FRONTIER_RADIUS 3000 187 ⚠️ PROPOSE-FLAG (unverified 2026-07-12): source at Init_CommonConstants.sqf:634 is now ((_wfbeAICOMMapRadius * 0.20) max 1500) — a map-size-scaled formula (cmdcon44-e, 2026-07-03 ZG fix), not a flat literal. On Chernarus this evaluates to 1536, not 3000. Semantics changed (flat constant → per-map formula) — needs owner review before this row is rewritten.
WFBE_C_AICOM_DISTANCE_DIVISOR 50 635 Score divisor on distance-to-front: one supply point is worth this many metres of march. Was effectively 150 (too weak).
WFBE_C_AICOM_HQ_PULL_DIVISOR 250 636 Score divisor on distance-to-ENEMY-HQ: small spearhead bias toward the enemy capital. Larger = weaker pull. 0 disables.
WFBE_C_AICOM_FAR_PENALTY 1000 637 Flat score penalty applied to any candidate OUTSIDE the frontier radius, so a rich deep city can't buy its way over a near contestable town.
WFBE_C_AICOM_CONCENTRATION 6 651 Base teams massed on the primary spearhead (used when a town's type is unknown; the per-tier table refines per target). B57: raised 4->6 to overwhelm garrisons via mass.
WFBE_C_AICOM_SPEARHEAD_TOWNS_MAX 2 652 Cap on how many DISTINCT spearhead towns the army splits across (was implicitly 5). 1-2 keeps the punch concentrated early.
WFBE_C_AI_COMMANDER_SPEARHEAD_PER_TOWN 3 618 V0.5: teams concentrated per spearhead town (legacy/fallback quota; per-tier quota overrides).

Bootstrap stipend (0-town opening)

V0.7 bootstrap: bias the first capture and trickle funds+supply per supervisor tick while town count == 0.

Constant Default Line Meaning
WFBE_C_AICOM_BOOTSTRAP_BIAS 1 943 1 enable, 0 disable: bias target selection to the nearest-to-base, lowest-value town so the AI captures its first income source fast.
WFBE_C_AICOM_BOOTSTRAP_FUNDS 100 945 Funds per minute (scaled to tick spacing) while 0 towns owned.
WFBE_C_AICOM_BOOTSTRAP_SUPPLY 120 946 Supply per minute (scaled to tick spacing) while 0 towns owned. punchy-AICOM (2026-06-17): 50→120 so a zero-town AI tech-unlocks + builds faster out of the gate. Rollback: 50.
WFBE_C_AICOM_BOOTSTRAP_MAXTIME 7200 947 Hard cutoff (s): stipend stops even if no town yet. punchy-AICOM (2026-06-17): 3600→7200, keep the zero-town stipend alive for 2h. Rollback: 3600.

Upgrade funds fallback and supply reserve

Constant Default Line Meaning
WFBE_C_AICOM_UPGRADE_FUNDS_RATE 1 458 ⚠️ PROPOSE-FLAG (unverified 2026-07-12): this identifier no longer appears anywhere in Init_CommonConstants.sqf at origin/master (grepped, zero matches) — the constant appears to have been removed. Needs owner review before this row is rewritten or dropped.
WFBE_C_AICOM_SUPPLY_RESERVE 8000 212 ⚠️ PROPOSE-FLAG (unverified 2026-07-12): source at Init_CommonConstants.sqf:948 is now 1000 with meaning "supply floor: do not start a tech upgrade that would drop supply below this... Research is SUPPLY-ONLY (the funds->supply fallback was removed for production)" — the FUNDS_RATE reroute this row describes no longer exists, not just a value change. Needs owner review before this row is rewritten.

Reinforcement ranges and critical-strength refill

Constant Default Line Meaning
WFBE_C_AI_COMMANDER_RELIEF_MAX 1 949 V0.5: max simultaneous town-relief diversions. punchy-AICOM (2026-06-17): 2→1, at most one team diverted to defense at a time. Rollback: 2.
WFBE_C_AI_COMMANDER_REINFORCE_RANGE 1200 1316 V0.5: Produce only refills teams this close to base (wiped teams reform at base).
WFBE_C_AICOM_FWD_REINFORCE_RANGE 900 1317 Forward-reinforce: deep teams beyond REINFORCE_RANGE may still refill if their leader hugs an owned town within this radius (refill spawns at the nearest factory). FILL-FIX (2026-06-18): 500→900 (rollback 500).
WFBE_C_AICOM_CRITICAL_STRENGTH 0.55 1318 Rank-2 health-gated refill: a team below this fraction of its template size is rushed to FULL strength in one Produce cycle. Bounded by funds/factory/AI-cap. 0 disables. FILL-FIX (2026-06-18): 0.30→0.55 (rollback 0.30).

Wildcard events

Constant Default Line Override? Meaning
WFBE_C_AI_COMMANDER_WILDCARD 1 614 yes V0.6: one free random event per AI-commanded side per interval. 0 disables wildcard events entirely.
WFBE_C_AI_COMMANDER_WILDCARD_INTERVAL 900 615 yes Seconds between wildcard events per side (15 min testing cadence, claude-gaming 2026-06-14; was 1800/30min).

Stuck-reaction, assault watcher, and slope governor

Three late-defined groups sitting under the //--- Camps. heading (not //--- AI.), all if (isNil 'X')-guarded with single-quoted names.

Constant Default Line Meaning
WFBE_C_AICOM_STUCK_SECS 210 1440 Commander stuck-reaction: the AssignTowns breadcrumb re-issues a parked team's order after this many seconds (was hardcoded 600s).
WFBE_C_AICOM_STUCK_MOVED 200 1441 Distance (m) under which a team counts as "not moved" for the stuck check.
WFBE_C_AICOM_STUCK_FAR 300 1443 Distance (m) from objective beyond which a parked team is considered stuck-far.
WFBE_C_AICOM_ASSAULT_ARRIVE_RADIUS 250 1448 Dispatch→arrival watcher: m to count "at the town" (≈ town SAD radius + leader margin; AIMoveTo uses 200).
WFBE_C_AICOM_ASSAULT_TIMEOUT 420 282 ⚠️ PROPOSE-FLAG (unverified 2026-07-12): source at Init_CommonConstants.sqf:1449 still assigns 420, but a new flag WFBE_C_AICOM_ASSAULT_DYNTIMEOUT (line 1465, default 1 = ON) now makes this the "legacy flat" fallback only — with the flag on, the effective per-dispatch timeout is dynamic, clamped between WFBE_C_AICOM_ASSAULT_TIMEOUT_MIN (420, :1475) and WFBE_C_AICOM_ASSAULT_TIMEOUT_MAX (1500, :1476). The row's meaning ("the" dispatch→arrival budget) is no longer accurate by default. Needs owner review before this row is rewritten.
WFBE_C_AICOM_ASSAULT_REACH_FOOT 2500 1458 m: foot teams won't be sent at ongoing-front spearheads farther than this; pick nearest reachable town instead. Value is now worldName-branched (Init_CommonConstants.sqf:1458): Takistan 1800, else (incl. Chernarus) 2500. History: 3500 (this page's prior value) → 3000 (B57) → 2500 (B66, cmdcon43-j).
WFBE_C_AICOM_ASSAULT_REACH_MOUNTED 9000 1459 m: teams with a drivable vehicle may take the long leg to a far spearhead.
WFBE_C_AICOM_SLOPE_Z 0.86 1490 Careful-gear governor: downshift NORMAL→LIMITED while the lead hull's surfaceNormal.z is below this (z = cos slope; 0.86 ≈ 31°) on Chernarus/Zargabad; Takistan branch uses 0.80. A2-fix: was 0.93 (~21°, too eager).

Cross-cutting AI constants (referenced by the commander, in the same block)

These are not commander-namespaced but bound the same AI subsystem.

Constant Default Line Meaning
WFBE_C_AI_MAX 12 332 Max AI allowed in each AI group.
WFBE_C_TOWNS_ACTIVE_MAX 12 326 Active-town budget: max concurrently active towns (FPS lever).
WFBE_C_GUER_GROUPS_MAX 80 331 Hard ceiling on total resistance groups (bounds runaway GUER growth toward the engine's ~144-groups/side limit). Raise to 999 for instant rollback.
WFBE_C_SIM_GATING 0 602 1 only on the NEXT arm: enableSimulation off for AI far from any active town.
WFBE_C_AB_ARM "NEXT-T1c" 584 A/B experiment arm label + sim-gating switch (LEGACY arm = control, gating off).

Continue Reading

Sidebar

Clone this wiki locally