-
Notifications
You must be signed in to change notification settings - Fork 0
Town AI Group Composition Catalog
Source-verified 2026-06-21 against master 0139a346. Paths relative to Missions/[55-2hc]warfarev2_073v48co.chernarus/ unless noted. Arma 2 OA 1.64.
This page catalogs the town AI group library — the named infantry and vehicle group templates that populate towns, and the server logic that selects which ones spawn. These are the groups that occupy a town when a side captures it and the resistance garrison that defends an uncaptured town. They are loaded server-side only and are separate from the commander-deployable squads in the AI Squad Team Templates Catalog (Core_Squads/Squad_*.sqf) and from the individual purchasable units in the Faction Unit and Vehicle Roster Catalog.
Each faction's Common/Config/Groups/Groups_<faction>.sqf builds two parallel arrays — _k (group-type keys) and _l (unit-classname rosters, one per key) — then hands them to Config_Groups.sqf (Groups_US.sqf:274):
[_k,_l,_side,_faction] Call Compile preprocessFile "Common\Config\Config_Groups.sqf"Config_Groups.sqf stores each roster into missionNamespace under WFBE_<side>_GROUPS_<key>, appending when a key repeats so the variable holds a list of interchangeable rosters (Config_Groups.sqf:12-19):
WFBE_<side>_GROUPS_<key> = [ roster1, roster2, ... ]At spawn time the selector picks one roster at random from that list (Server_GetTownGroups.sqf:208: _get select floor(random count _get)). This is why several Groups_*.sqf files define the same key twice (e.g. Groups_CDF.sqf lists Squad twice) — each duplicate adds a composition variant to the random pool.
The three active faction group files are loaded only on the server, indexed by the active faction per side (Common/Init/Init_Common.sqf:313-317):
if (isServer) then {
Call Compile preprocessFileLineNumbers Format["Common\Config\Groups\Groups_%1.sqf",_grpWest];
Call Compile preprocessFileLineNumbers Format["Common\Config\Groups\Groups_%1.sqf",_grpEast];
Call Compile preprocessFileLineNumbers Format["Common\Config\Groups\Groups_%1.sqf",_grpRes];
};_grpWest/East/Res resolve to the active faction in each side's pool (WEST CDF/US/USMC, EAST INS/RU/TKA, GUER GUE/PMC/TKGUE; Chernarus actives are USMC/RU/GUE). See the Defense Structures Catalog for the faction-pool resolution shared by both systems.
The faction group files fall into two distinct key schemes, matched to the two selectors below.
| Scheme | Keys | Faction files | Selected by |
|---|---|---|---|
| Upgrade-suffixed |
Squad_0..3, Squad_Advanced, Team_0..3, Team_MG_0..3, Team_AT_0..3, Team_AA, Team_Sniper_0..3, Motorized_0..4, AA_Light, AA_Heavy, Mechanized_0..4, Armored_0..4
|
Groups_US.sqf, Groups_USMC.sqf, Groups_RU.sqf, Groups_TKA.sqf
|
Attacker selector (by supply + upgrade level) |
| Non-suffixed |
Squad, Squad_Advanced, Team, Team_MG, Team_AT, Team_AA, Team_Sniper, Motorized, AA_Light, AA_Heavy, Mechanized, Mechanized_Heavy, Armored_Light, Armored_Heavy
|
Groups_CDF.sqf, Groups_INS.sqf, Groups_GUE.sqf, Groups_PMC.sqf, Groups_TKGUE.sqf
|
Defender selector (by town type) |
Source: _k key lists across Common/Config/Groups/Groups_*.sqf. On both Chernarus and Takistan the active WEST and EAST factions use suffixed files (attacker path), and the active GUER faction uses a non-suffixed file (defender/resistance path).
server_town_ai.sqf routes each side to the matching selector (Server/FSM/server_town_ai.sqf:184-189):
if (_side == WFBE_DEFENDER) then {
_groups = [_town, _side] Call WFBE_SE_FNC_GetTownGroupsDefender
} else {
_groups = [_town, _side] Call WFBE_SE_FNC_GetTownGroups;
};WFBE_DEFENDER is the resistance side (Common/Init/Init_Common.sqf:296: WFBE_DEFENDER = resistance). Both selectors are bound at Server/Init/Init_Server.sqf:66-67. When a town has only air threats and no ground enemies, the same calls run with a third true argument (_aa_get) that restricts the result to AA groups (server_town_ai.sqf:200-202).
A capturing/holding side garrisons a town with a group set scaled by the town's supplyValue (_sv). Each entry is [group-type, force, kind] where force is how many copies enter the weighted random pool (higher = more likely) and kind is 0 infantry / 1 vehicle. The infantry-key suffix is the side's current upgrade level: Squad_<barracks> / Team_*_<barracks> use WFBE_UP_BARRACKS, Motorized_<light> uses WFBE_UP_LIGHT, and Mechanized_<heavy> / Armored_<heavy> use WFBE_UP_HEAVY (Server_GetTownGroups.sqf:25-27; indices WFBE_UP_BARRACKS=0, WFBE_UP_LIGHT=1, WFBE_UP_HEAVY=2 at Common/Init/Init_CommonConstants.sqf:37-39). Below, B/L/H denote those upgrade-level suffixes.
| supplyValue | Group types (force in parentheses) | % infantry | _groups_max |
Source |
|---|---|---|---|---|
< 10 |
Team_B, Team_AT_B
|
100 | 2 | :31-37 |
10–20 |
Team_B(2), Team_MG_B(2), Team_AT_B, Motorized_L
|
80 | 4 | :39-47 |
20–40 |
Squad_B, Team_MG_B, Team_B, Team_AT_B, Team_AA, Team_Sniper_B, Motorized_L, Mechanized_H
|
80 | 4 | :49-61 |
40–60 |
Squad_B, Team_MG_B, Team_B, Team_AT_B, Squad_Advanced/Squad_B(2), Motorized_L, AA_Light, Mechanized_H(2) |
75 | 5 | :64-76 |
60–80 |
Squad_B, Team_MG_B, Team_B, Team_AA(2), Team_AT_B(2), Team_Sniper_B, Motorized_L(2), Mechanized_H(2) |
70 | 5 | :79-91 |
80–100 |
Squad_B, Team_MG_B, Team_B, Team_AT_B(2), Squad_Advanced/Squad_B(3), Mechanized_H(2), Armored_H
|
70 | 6 | :94-105 |
100–120 |
Squad_B, Team_MG_B, Team_B, Team_AA, Team_AT_B(2), Squad_Advanced/Squad_B(2), Team_Sniper_B, Mechanized_H(2), Armored_H(3) |
70 | 6 | :108-121 |
>= 120 |
Squad_B, Team_MG_B, Team_B, Team_AA, Team_AT_B(3), Squad_Advanced/Squad_B(2), Team_Sniper_B, Mechanized_H, Armored_H(3) |
70 | 7 | :123-136 |
The Squad_Advanced/Squad_B entries resolve to Squad_Advanced only when the barracks upgrade is at max level 3, otherwise Squad_B (:70, :100, :115, :130).
The resistance garrison of an uncaptured town is scaled by the town's wfbe_town_type rather than supply, and uses the non-suffixed keys. Same [group-type, force, kind] shape.
| Town type | Group types (force in parentheses) | % infantry | _groups_max |
Source |
|---|---|---|---|---|
TinyTown1 |
Squad, Team, Squad_Advanced, Team_MG
|
100 | 3 | :24-27 |
SmallTown1 |
Squad, Team(2), Squad_Advanced, Team_AT, AA_Light, Motorized, Mechanized
|
80 | 5 | :29-32 |
SmallTown2 |
Squad_Advanced, Team, Team_MG, Team_AT(2), Motorized, AA_Light, Armored_Light
|
80 | 5 | :34-37 |
MediumTown1 |
Team(3), Team_Sniper, Team_MG, Team_AT, Motorized, Mechanized, AA_Light, Mechanized_Heavy(2), Armored_Light
|
80 | 6 | :39-42 |
MediumTown2 |
Team(3), Team_Sniper, Team_MG, Team_AT, Motorized, Mechanized(2), AA_Light, Mechanized_Heavy, Armored_Light
|
80 | 6 | :44-47 |
LargeTown1 |
Squad, Team(2), Team_Sniper, Team_MG, Squad_Contractor, AA_Light(2), Team_AT, Mechanized_Heavy(2), Armored_Light(2), Armored_Heavy
|
75 | 7 | :49-52 |
LargeTown2 |
Squad_Advanced, Team(2), Team_Sniper, Team_MG, AA_Light(2), Team_AT(2), Mechanized_Heavy, Armored_Light, Armored_Heavy(2) |
75 | 7 | :54-57 |
HugeTown1 |
Squad(3), Team(2), Squad_Advanced(2), Team_Sniper, Team_MG, AA_Heavy(2), Team_AT(2), Mechanized_Heavy, Armored_Light(2), Armored_Heavy(2) |
75 | 8 | :59-62 |
HugeTown2 |
Squad(2), Team(3), Squad_Advanced(2), Team_Sniper, Team_MG, AA_Heavy(2), Team_AT(2), Mechanized_Heavy, Armored_Light(2), Armored_Heavy(2) |
75 | 8 | :64-67 |
PMCAirfield |
Squad, Team, Team_AT, Team_Sniper, Motorized(2), AA_Light
|
70 | 6 | :69-72 |
| default |
Squad, Team, Team_AT, Motorized
|
80 | 3 | :74-77 |
A faction's group file need not define every key the selector references — the build loop guards each lookup with isNil (Server_GetTownGroups.sqf:149, Server_GetTownGroupsDefender.sqf equivalent). A referenced key that the active faction lacks (e.g. Groups_GUE.sqf defines no Team_MG) is simply skipped, so that town spawns without that group type.
-
Group count.
_groups_maxfrom the table is multiplied by an occupation coefficient and rounded. Attacker usesWFBE_C_TOWNS_UNITS_COEF(Server_GetTownGroups.sqf:141); defender usesWFBE_C_TOWNS_UNITS_DEFENDER_COEF(Server_GetTownGroupsDefender.sqf:82). Both ladder1 / 1.5 / 2 / 2.5off their occupation/defender setting (Common/Init/Init_CommonConstants.sqf:678-679). -
Infantry / vehicle split. The pool is split by the
% infantrycolumn into infantry (kind 0) and vehicle (kind 1) groups, each shuffled, then interleaved up to_groups_max(Server_GetTownGroups.sqf:168-199). If one kind is empty the split collapses to 100 % of the other (:168-169). -
AA gating. When called with
_aa_get = true(air-only threat), onlyAA_Light/AA_Heavy/Team_AAgroups are kept and_groups_maxis capped at 3 (Server_GetTownGroups.sqf:143,150-155). Conversely, while a town already has active air (wfbe_active_air), those AA group types are excluded from a normal ground spawn (:154). -
Group-count merge (server-FPS optimization). Before returning, infantry rosters are fused into fewer flat groups targeting
WFBE_C_TOWNS_MERGE_TARGETunits each (default 5, hard cap 10), so a town spawns the same units in fewer server group-brains; vehicle rosters are never merged. Set the target to0to disable (Server_GetTownGroups.sqf:214-244; constantCommon/Init/Init_CommonConstants.sqf:680). The defender variant has its ownWFBE_C_TOWNS_MERGE_TARGET_DEFENDER/WFBE_C_TOWNS_MERGE_CAP_DEFENDERoverrides (Server_GetTownGroupsDefender.sqfmerge block).
The roster behind each key is a flat list of unit classnames. Two representative entries (Chernarus actives):
| Key | Faction file | Roster | Source |
|---|---|---|---|
Squad_0 (attacker) |
Groups_USMC.sqf |
USMC_Soldier_GL, USMC_Soldier_MG, USMC_Soldier_LAT, USMC_Soldier_GL, USMC_Soldier_LAT, USMC_Soldier_Medic
|
Groups_USMC.sqf:12-19 |
Squad (defender) |
Groups_GUE.sqf |
GUE_Soldier_CO, GUE_Soldier_GL, GUE_Soldier_AR, GUE_Soldier_1
|
Groups_GUE.sqf:12-18 |
Vehicle keys carry vehicle classnames instead — e.g. Armored_4 in Groups_USMC.sqf is three M1A2_TUSK_MG (Groups_USMC.sqf:267-272). Per-unit classname details live in the Faction Unit and Vehicle Roster Catalog.
-
AI-Squad-Team-Templates-Catalog — the sibling system: commander-deployable squad templates (
Core_Squads/Squad_*.sqf), distinct from these town groups - Faction-Unit-And-Vehicle-Roster-Catalog — the individual unit and vehicle classnames that make up these rosters
-
Towns-Camps-And-Capture-Atlas — town types, capture flow, and the
server_town_ai.sqflifecycle that calls these selectors -
Economy-Towns-And-Supply —
supplyValueand town economy that scale the attacker garrison - Upgrades-And-Research-Atlas — the BARRACKS/LIGHT/HEAVY upgrades that drive the suffixed-key tier
Home | Agent Guide | Current live state | Release 1.2.2 (B91) | Quickstart | Progress | Lifecycle wait-chain | Join/disconnect | Parameters/build | Assets/config | SQF atlas | PV index | Modules | Support/specials | Commander/HQ | Commander vote/reassign | Construction/CoIn | Construction cleanup | WDDM compositions | Factory/purchase | Upgrades/research | Towns/camps/capture | Victory/endgame | Markers/cleanup | Server runtime | AI runtime/HC | AI commander audit | HC delegation | Town AI safety | Commander reassignment | Resistance supply | Player UI workflow | UI atlas | Respawn/death | Gear template filter | Vehicle cargo loop | Service guards | UI IDD repair | UI design inspiration | WASP overlay | Feature status | Source propagation | release readiness | Tooling readiness | Integration trust | AntiStack DB | Owner decisions | Shelved registry | Abandoned feature revival | Hardening roadmap | PVF dispatch | Server authority | ICBM authority | Attack-wave authority | Telemetry families | AICOM V2 cutover | Consumer port map | Testing workflow | Server ops | Web tools | Ecosystem repos | Arma 2 OA refs | A2 traps | OA compatibility audit | Coverage ledger | Navigation inventory | Pruning ledger | Knowledge roadmap | Agent context | Collab protocol | Worklog | Audit archive 2026-07 | Briefing reference | Utes invasion concept
- Shelved AICOM concepts - revivable someday ideas (owner-shelved 2026-07-03)
Docs rule: source-backed claims only; Arma 2 OA scripting docs only; gameplay edits start in Missions/[55-2hc]warfarev2_073v48co.chernarus.
- Getting started
- Status and coordination
- Agent context
- Agent collaboration protocol
- Agent worklog
- Agent worklog archive
- Progress dashboard
- PR cleanup and integration lab
- Shelved PR #169: gear price double-count
- Shelved PR #194: Chernarus no-trees
- Coordination board
- Codebase coverage ledger
- Bottleneck removal queue
- Current source status
- Wiki mirror reconciliation
- Navigation inventory
- Registers
- Agent orchestration
- Architecture
- Architecture overview
- Mission entrypoints and lifecycle
- Lifecycle wait chain
- Player join/disconnect and AntiStack lifecycle
- Mission parameters/localization/build inputs
- Stringtable localization key-family catalog
- Source inventory
- Content structure and maps
- Assets/config/localization/parameters
- Mission start parameters index
- Code and networking
- Gameplay systems
- Core systems index
- Gameplay systems atlas
- Commander/HQ lifecycle atlas
- Economy, towns and supply
- Economy system reference
- Balance asymmetries
- Anti-stack skill-balance mechanic
- Empty-side supply income stagnation
- Towns, camps and capture atlas
- Victory and endgame atlas
- Victory conditions reference
- Territorial victory reference
- Marker cleanup and restoration
- Marker loop engine and registries
- Map marker families content catalog
- Marker subsystem function reference
- Client marker FSM updater map
- Support specials and tactical modules
- SCUD TEL tactical munitions
- Naval HVT objectives (carriers/SCUD)
- SCUD saturation strike mechanic
- Takistan airfield FPV drone design
- Construction and CoIn systems
- Structure damage reduction & friendly-fire
- Construction logic list cleanup
- Flak tower & WDDM anchor compositions
- Resistance supply scaffold
- GUER Insurgents faction overview
- GUER Insurgents branch audit
- GUER insurgent player economy
- GUER Commissar Panel
- GUER air-defense loop (Ka-137/Mi-24)
- Upgrades and research atlas
- Supply mission architecture
- Supply mission authority cleanup
- Current supply helicopters PR1
- Respawn and death-loop lifecycle
- Vehicle theft economy pitch
- GUER tunnel network pitch
- Content, reference and catalogs
- Faction unit/vehicle roster catalog
- Auxiliary/SF/civilian unit catalog
- Gear store loadout route catalog
- Upgrade research (cross-faction)
- Gear store price and upgrade catalog
- Gear store catalog (complete, per faction)
- Defense structures catalog
- Artillery reference per faction
- AI squad team templates catalog
- Town AI lifecycle reference
- Town AI group composition catalog
- Class-skill system reference
- Player skill abilities reference
- Default gear template content catalog
- Chernarus map content reference
- Takistan map content reference
- Takistan features
- Takistan parity reference
- Takistan oilfields objective reference
- IRS IR-smoke countermeasure
- Arty module special munitions
- Zeta cargo sling-load reference
- Spawn primitive function reference
- Kill and score pipeline
- Waypoint helper function reference
- Position and proximity function reference
- Side/team state function reference
- Player AI watchdog and recovery
- AICOM stuck-recovery v2
- LoadoutManager data-model contributor guide
- Discord status bot setup and reference
- GLOBALGAMESTATS extension reference
- New player quickstart (player guide)
- Optional client mods (player guide)
- Earning funds and score (player guide)
- Vehicle service and logistics (player guide)
- Commander's handbook (player guide)
- Tactical support menu
- Paradrop player experience
- Supply missions (player guide)
- In-game briefing & Diary field manual
- Playable maps catalog
- Faction root variables reference
- Faction base structures catalog
- Counter-battery radar system
- Bank, Reserve and Artillery Radar structures
- Map ruleset model and object config
- Countermeasures module reference
- Vehicle countermeasure (flares/spoofing)
- UAV terminal and spotter system
- Artillery firing function reference
- Service Point pricing model
- Medic redeployment truck (forward spawn)
- Side-patrol runtime and convoy mechanics
- Day/night cycle and weather system
- Config lookup helper reference
- CIPHER sort utilities reference
- Modded maps status and content
- BattlEye filter setup and OA taxonomy
- Player squad/group join protocol
- AutoFlip vehicle recovery
- Engine stealth fuel toggle
- Valhalla vehicle climbing-assist
- Missile and ordnance Fired-EH reference
- Vehicle equip and rearm reference
- Array and collection utilities
- Server composition spawner reference
- Upgrade queue server loop
- Map boundaries and off-map enforcement
- Namespace/profile/diagnostic utilities
- Group bool getVariable A2-OA trap
- Vehicle weapon balance init
- View distance auto-throttle
- Camp & respawn-camp getters
- Performance audit writer
- Site clearance (bulldozer)
- Factory queue cancel & refund
- AI commander tunable constants
- Experimental feature-flag constants
- Flag system quick reference
- Mission tunable constants catalog
- Gear parsing & cargo capacity
- Structure dressing function
- Paradrop delivery functions
- ICBM nuke client VFX & radiation
- Server HandleSpecial router
- LocalizeMessage chat router
- Gear buy-menu render & price functions
- Server broadcast & telemetry loops
- Per-unit client init pipeline
- Vehicle marking & texture pipeline
- Defense category & budget
- Legacy AI order primitives
- Commander-team driver
- AICOM command verbs
- AICOM behavior fix taxonomy
- AI commander wildcard deck reference
- AICOM aircraft and airfield system
- Static-defense manning
- End-of-game stats screen
- AI commander execution loop
- Deployable bipod / weapon resting
- Town-economy getters
- Server-init deadspawn & airfield probe
- GUER VBIED detonate action
- Resource income-tick engine
- AI commander treasury accessors
- PVF send-helper contracts
- AICOM logging & AICOMSTAT telemetry
- AICOMSTAT v2 event census
- WASPSCALE v2 telemetry
- WASPSCALE v2-ext coverage audit
- Telemetry families reference
- Group lifecycle & entity reaping
- Batch AI spawner orchestrator
- Client funds/income HUD readout
- Server group GC & cap warning
- Town runtime tuning constants
- Client input/hotkey handler
- WASP base-repair system
- WASP DropRPG launcher/ordnance
- CoIn construction-interface client engine
- Town-capture garrison & airfield rebuild
- Map-control & minimap templates
- Client FPS & state telemetry
- Client service-proximity getters
- Airfield-exclusive roster & unit hints
- Unit-camera spectator system
- Town-garrison patrol/defense worker
- RequestTeamUpdate squad-discipline
- Arma2Warfare GPT assistant
- LoadoutManager build configs & defines
- GLOBALGAMESTATS extension logging
- Discord bot instrumented logging
- Eden/Everon & Taviana map content
- Cruise missile strike asset
- AI / HC
- AI headless and performance
- AI mods and pathfinding reference
- Headless client scaling and topology
- AI runtime/HC loop map
- Headless client init and stat loop
- HC delegation target selection
- Player AI caps and role balance
- Old WarfareBE FPS comparison
- AI commander autonomy audit
- Upstream BE 2073 AICOM delta
- Parent 2.073 divergence audit
- AI commander capture & fun plan
- AI commander B69 improvement roadmap
- AI commander B69 implementation sketches
- AICOM V2 cutover status
- Headless delegation and failover
- Commander reassignment call shape
- GUER Director living-resistance pitch
- Quality and operations
- Foundation perf findings & Tier-3 dead-ends
- Dead/stale code register
- Commander vote/reassignment
- Attack-wave authority
- Server runtime and operations
- Server ops runbook
- JIP enrollment & client data delivery (b74.2 lessons)
- Server gameplay runtime atlas
- PerformanceAuditAnalyzer
- Performance opportunity sweep
- Documentation plan
- Knowledge platform roadmap
- Wiki quality audit
- Wiki pruning and relevance ledger
- Audit findings queue (2026-06-03)
- Deep review findings
- Client UI / server-loop perf findings
- Performance gain simulation
- Self-host testing field notes
- Cleanup and work lanes
- Hardening and authority
- UI / player workflows
- Client UI, HUD and menus
- UI HUD and dialogs
- Player UI workflow map
- Client UI systems atlas
- UI IDD collision repair
- UI control class library reference
- UI theme palette and style macros
- UI design inspiration 2026-07
- Available-actions client gate FSM
- Gear/loadout/EASA atlas
- Gear template profile filter
- Vehicle cargo equip loop bounds
- Factory and purchase systems atlas
- Service menu affordability guards
- WASP overlay
- Class-skill system reference
- Skin selector and class swap
- Earplugs audio toggle
- Mission audio catalog
- HQ radio knowledge-base catalog
- QoL trio player hints
- Player vehicle/travel actions
- Tooling / release / integrations
- Tools and build workflow
- Warfare web tools
- Ecosystem & companion repos
- Zargabad tooling parity
- July 2026 release readiness
- Operator monitor and CPU affinity tools
- Tooling release readiness audit
- Source fix propagation queue
- Agent release readiness ledger
- Release source intake map
- Testing/debugging/release workflow
- Current RPT release gate
- RPT telemetry consumer port map
- External integrations
- Integration trust boundary audit
- AntiStack database extension audit
- Community & Dev
- Community & Dev
- Miksuu upstream wiki import / archive index
- Upstream changelog feature leads
- Developer history and upstream lessons
- Upstream Miksuu commit intel
- Upstream mining ledger
- Archive script mining v2
- Upstream BE 2073 AICOM delta
- Parent 2.073 divergence audit
- PR8 and Drone upstream lesson match
- Development lessons learned
- External research reports
- Audit archive 2026-07
- Briefing reference
- Utes invasion concept
- Miksuu archive: Home
- Miksuu archive: Welcome
- Miksuu archive: Big announcements
- Miksuu archive: Changelog
- Miksuu archive: Development process
- Miksuu archive: Discord bot
- Miksuu archive: Gameplay videos
- Miksuu archive: LoadoutManager
- Miksuu archive: Chernarus script architecture
- Base-game visual catalogs
- Compatibility and references
- HC upstream history and lessons
- Player stats branch audit
- BuyMenu EASA QoL branch audit
- Perf quick wins branch audit
- Commander positions branch audit
- Zargabad branch audit
- Quad AI Commander concept
- Arma 2 OA external reference guide
- Base-game config & image reference
- Arma 2 OA compatibility audit
- Arma 2 OA agent traps reference
- Arma 2 OA command versions
- Wiki source consistency
- External Arma 2 OA reference index