Configuration (DM.Config)¶
Recommended method — template file¶
Copy templates/DynamicMission_Config.lua into your mission folder, uncomment and edit the
fields you want to change, then load it via a second DO SCRIPT FILE trigger placed after
the one loading DynamicMission.lua (see Installation). The file is
version-controllable and reusable across missions.
Alternative — inline DO SCRIPT¶
For a one-off tweak with no external file to ship alongside the mission, the same fields can be
overridden via a DO SCRIPT trigger placed right after the DO SCRIPT FILE that loads
DynamicMission.lua (same "at mission start" trigger, right after):
DM.Config.AIRBASE_SPAWN_DEFENSE_PROXIMITY_RANGE = 15000
DM.Config.IDLE_LIMIT = 600
Before, not after
A trigger (template file or inline DO SCRIPT) placed before the DynamicMission.lua DO
SCRIPT FILE does not work — on load, DynamicMission.lua reassigns DM.Config as a
whole block, silently wiping out any override placed earlier. The override trigger must
always come after.
Two fields are the exception
REGION_TICK_INTERVAL and MAX_CYCLES_DEFAULT cannot be overridden after the fact, even
following the ordering above. They're fallback values consumed once per region, at the
moment the script parses each of your regions' nomenclature at mission start — before any DO
SCRIPT placed after loading can run. For these two, the only lever left is the region's own
nomenclature segment (segments 4 and 7, see Nomenclature). Every other
field below is read fresh on every use, so a post-load override applies normally.
Available fields¶
| Field | Default | Role |
|---|---|---|
AIRBASE_SPAWN_DEFENSE_PROXIMITY_RANGE |
20000 (m) |
Enemy detection range that triggers a proximity defense spawn |
PROXIMITY_CHECK_INTERVAL |
30 (s) |
Proximity scan frequency |
defenseSpawnGroupCount |
{min=1, max=3} |
Number of defense groups spawned per trigger |
IDLE_LIMIT |
300 (s) |
Time without a detected enemy before an active region goes back to sleep |
TYPE_CONTROL |
"TERRAIN" |
"TERRAIN" = regions auto-activate on enemy player presence; "MANUEL" = activation only via the F10 menu or the DM.Manager:activateRegion() API |
AUTO_ACTIVATION_CHECK_INTERVAL |
60 (s) |
Auto-activation scan frequency (TERRAIN mode only) |
SPAWN_DISPERSION_RADIUS |
200 (m) |
Dispersion radius of an MG_'s clones within its SZ_ zone |
THREAT_ALERT_ENABLED |
true |
Enables threat alert messages |
THREAT_ALERT_INTERVAL |
300 (s) |
Spacing between two alert messages for the same active region |
THREAT_ALERT_DURATION |
20 (s) |
Display duration of an alert message |
THREAT_ALERT_ON_SPAWN |
true |
Shows a one-off message when an MG_ spawns, taken from its WP0's name (see Nomenclature) |
BEEP_MESSAGE |
true |
Plays a sound beep with important messages (e.g. region CLEARED) |
DESIGNATED_PLAYER_NAME |
"" (empty) |
See F10 Menu |
These 13 fields are the ones exposed in the templates/DynamicMission_Config.lua template file —
other internal fields exist but aren't meant to be overridden by a mission maker (see the
developer reference).