Multi Spawn Manager (Vehicle Groups)
Editor extension for creating, editing, saving, loading, and spawning **vehicle groups**. Supports both hand-picked ("custom") and auto-generated ("generator") groups.
Editor extension for creating, editing, saving, loading, and spawning vehicle groups. Supports both hand-picked ("custom") and auto-generated ("generator") groups.
Overview
Provides a full GUI for managing vehicle groups used by traffic, races, and other gameplay systems. Groups can be custom (per-slot vehicle selection with model/config/paint) or generator-based (population-weighted random selection). Integrates with core_multiSpawn for spawning.
Module Interface (M)
| Function | Description |
|---|---|
M.onEditorInitialized() | Registers windows and menu items under "Gameplay". |
M.onEditorGui(dt) | Main draw loop: group list, edit panel, spawn controls. |
M.onWindowMenuItem() | Shows the manager window. |
M.loadGroup(filePath) | Loads a .vehGroup.json file into the editor. |
M.saveGroup(file, filePath) | Saves the current group to file. |
M.onVehicleGroupSpawned() | Callback: resets spawn state after vehicles appear. |
File Paths
Default auto-load directories:
M.filePaths = { "vehicleGroups/", "settings/editor/vehicleGroups/" }Group Types
Custom Group
Per-slot vehicle definitions with:
- Model / Config / Paint selection via
vehicleSelectUtil - 3 paint layers with custom colour picker (base colour + PBR)
- Custom config file support
Generator Group
| Parameter | Type | Description |
|---|---|---|
amount | int | Number of vehicles to generate |
allMods | bool | Include modded vehicles |
allConfigs | bool | Include all configs |
maxYear | int | Latest model year (0 = any) |
country | string | Bias toward domestic vehicles |
minPop | int | Minimum population threshold |
modelPopPower | float | Population exponent for models |
configPopPower | float | Population exponent for configs |
popDecreaseFactor | float | Multiplier after insertion (prevents repeats) |
Spawn Modes
| Mode | Key |
|---|---|
| Road | road |
| Traffic | traffic |
| Line (Ahead/Behind/Left/Right/Above) | lineAhead, etc. |
| Race Grid | raceGrid |
| Race Grid (Alt) | raceGridAlt |
Additional spawn options: amount, spacing, shuffle toggle.
Menu Actions
File Menu
| Action | Description |
|---|---|
| New | Create empty group |
| Load... | Open .vehGroup.json |
| Save / Save as... | Write to file |
Tools Menu
| Action | Description |
|---|---|
| Shuffle Group | Randomise vehicle order |
| Duplicate Group | Copy with "- Copy" suffix |
| Set Scene Vehicles to Group | Import spawned vehicles |
Modal Windows
- Generator Tester - generate and preview a vehicle list, optionally copy to custom group
- Custom Paint - colour picker with PBR properties
- Overwrite Group - confirmation dialog for scene-to-group import
Usage Example
-- Load and spawn a traffic group
editor_multiSpawnManager.loadGroup("vehicleGroups/traffic.vehGroup.json")
-- Show the editor window
editor_multiSpawnManager.onWindowMenuItem()See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Mission Start Position Editor
Editor extension providing a **3D edit mode** for visually repositioning mission start trigger positions in the viewport.
Navigation Mesh Editor
Editor extension providing a **Navigation Mesh** editor window and edit mode. Currently a minimal scaffold with a "Hello world" placeholder.