Mission Editor – Setup Modules
Editor sub-module for configuring mission **setup modules**: Vehicles, Traffic, and Environment. These define how the mission configures player vehicles, traffic spawning, and environmental conditions
Editor sub-module for configuring mission setup modules: Vehicles, Traffic, and Environment. These define how the mission configures player vehicles, traffic spawning, and environmental conditions.
Overview
Manages mission.setupModules with three sections - Vehicles, Traffic, and Environment. Each can be independently enabled/disabled and may be blocked by the mission type. Handles backwards compatibility and differential setup for vehicles.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | (missionEditor) | Stores editor reference. |
C:setMission | (mission) | Loads all ImGui input state, applies backwards compatibility, resolves blocked modules. |
C:setBackwardsCompatibility | () | Patches compatibility data from mission instance, removes obsolete modules. |
C:getMissionIssues | (m) → table | Checks for missing/malformed setup module data. |
C:draw | () | Renders all three setup module sections in a two-column layout. |
C:displayDiffSetup | (veh) | Combo widget for differential options (toggle, lock front/rear, transfercase, rangebox). |
Vehicles Section
| Field | Type | Description |
|---|---|---|
vehicles | array | Provided vehicle definitions (model, config, paints) |
includePlayerVehicle | bool | Allow current player vehicle |
prioritizePlayerVehicle | bool | Make player vehicle the default |
| Per-vehicle diff setup | combo | Toggle diffs, lock front/rear, transfercase 4hi, rangebox low |
Uses vehicleSelectUtil for model/config/paint selection with custom config support.
Traffic Section
| Field | Type | Description |
|---|---|---|
amount | int | Vehicle count (-1 = auto) |
activeAmount | int | Simultaneously active vehicles |
parkedAmount | int | Parked vehicle count |
respawnRate | float | 0–3 respawn rate |
useTraffic | bool | Enable traffic by default |
usePrevTraffic | bool | Keep freeroam traffic |
useGameOptions | bool | Use traffic settings |
useSimpleVehs | bool | Use simple vehicle models |
useCustomGroup | bool | Use custom .vehGroup.json |
Environment Section
| Field | Type | Description |
|---|---|---|
time | float | Time of day (0–1, -1 = default) |
timeScale | float | Time progression speed |
windSpeed | float | Wind speed |
windDirAngle | float | Wind direction (0–360°) |
fogDensity | float | Fog density (0–1) |
todUserSetting | bool | Let user set time of day |
Usage Example
local setupTab = require('extensions/editor/missionEditor/setupModules')(missionEditorRef)
setupTab:setMission(mission)
setupTab:draw()
local issues = setupTab:getMissionIssues(mission)See Also
- Mission Editor - Additional Attributes - Related reference
- Mission Editor - Career Setup - Related reference
- Mission Editor - Conditions - Related reference
- World Editor Guide - Guide
Mission Editor – Progress Single
Editor sub-module for viewing a **single mission's progress** - unlocked stars, attempt history, and raw save data.
Mission Editor – Start Trigger
Editor sub-module for configuring **how and where a mission starts**. Supports `coordinates` (world-space position with radius) and `league` (career progress screen) trigger types.