What STW Combat Zone does
A Combat Zone represents an active area where enemy forces should arrive and engage players. The system maintains a bubble around the zone, chooses suitable land positions outside it, creates AI groups, and dispatches them toward the zone. The bubble can move as the player group moves.
Combat Zones can be placed by the Game Master or created through automated Combat Support. A zone is intended to be one active order per location; duplicate requests are ignored or merged.
STWCombatZoneCKnowledgeAdapter.Server setup
- Load STWCombatZone, STWCombatSupportAPI, STWCombatKnowledge, and STWCombatZoneCKnowledgeAdapter on the server and clients.
- Start the scenario once so the server creates the Combat Knowledge configuration.
- Restart the server after changing profile configuration.
- Ensure the relevant faction profiles allow the
combat_zonecapability.
For manual testing, use the Game Master menu to place a Combat Zone proxy. The proxy becomes active and the provider schedules batched group dispatches.
Configuration
Combat Zone settings are stored in:
$profile:STW/CombatZone/STWCombatZoneConfig.json| Setting | Purpose |
|---|---|
enableCombatZones | Master switch for the module. |
maximumGroupsPerZone | Maximum active generated groups per zone. |
baseRadiusMeters | Starting radius of the combat bubble. |
dispatchIntervalMinSeconds / dispatchIntervalMaxSeconds | Random interval between dispatch attempts. |
spawnDistanceMinMeters / spawnDistanceMaxMeters | Distance range for positions outside the bubble. |
mixedFactionMode | Allows configured US/USSR or RHS_USAF/RHS_AFRF factions to be selected together. |
factionProfiles | Allowed factions, weights and group composition settings. |
playerLeaveGraceSeconds | Grace period before a zone is cancelled after players leave. |
Generated groups use the configured factions and CQB-like group composition, including anti-tank-capable units when available. Spawn candidates are rejected when they are in water or otherwise unsuitable.
Combat Knowledge integration
STWCombatZoneCKnowledgeAdapter adds Combat Zone capabilities to STWCombatKnowledge. It registers the combat_zone capability for the configured US, USSR, RHS_USAF and RHS_AFRF profiles and converts qualifying Combat Knowledge sightings into Combat Zone support requests.
When an AI group or the surveillance system obtains a valid enemy contact, Combat Knowledge evaluates its normal probability, threat, cooldown, faction and provider rules. If accepted, the adapter submits a Combat Zone order. The Combat Zone provider then creates or updates the corresponding zone and prevents duplicate orders in the same area.
Periodic intelligence reveals, when enabled in STWCombatKnowledgeBehavior.json, also enter the normal Combat Knowledge pipeline and may generate Combat Zone support without a direct visual detection.
Zone lifecycle
- Groups spawn outside the active bubble and receive destinations inside it.
- Future destinations follow significant movement of the bubble; groups already travelling are not constantly retasked.
- When players leave the area, the zone waits for its configured grace period, then cancels and removes its proxy and generated groups.
- Groups may be despawned server-side when far from players and no active combat or clearance order remains.
- Removing a zone from the Game Master menu removes the proxy and all groups owned by that zone.
Diagnostics and testing
Use the server script.log. Relevant entries begin with [STW][CombatZone]:
| Log entry | Meaning |
|---|---|
Spawn attempt | A valid outside-bubble spawn position was selected. |
Dispatched group | An AI group was created and sent toward the zone. |
Spawn rejected | The candidate failed a land, distance or safety check. |
players-left-bubble | The zone entered its player-leave cancellation path. |
For automated activation, also inspect [STW][CombatKnowledge] and [STW][CombatZoneCKnowledgeAdapter] entries. A Combat Knowledge decision can be valid while the provider still declines an order because the faction capability is disabled, a duplicate zone exists, or the provider limit has been reached.
