Co-Simulation Signal Editor
Editor tool for configuring co-simulation signal coupling between BeamNG vehicles and external 3rd-party simulators via UDP. Also provides vehicle signal logging (VSL) capabilities for kinematics, dri
Editor tool for configuring co-simulation signal coupling between BeamNG vehicles and external 3rd-party simulators via UDP. Also provides vehicle signal logging (VSL) capabilities for kinematics, driver inputs, wheel data, electrics, powertrain, and sensor data.
Public Functions
| Function | Description |
|---|---|
M.onEditorGui() | Main per-frame UI rendering |
M.onEditorInitialized() | Registers edit mode and tool window |
Key Features
- Vehicle Signal Browser - View available signals from selected vehicle
- UDP Configuration - Set send/receive IP addresses and ports
- Signal Categories - Kinematics, driver inputs, wheels, electrics, powertrain, sensors
- Pose Tracking - Optional vehicle pose (position/rotation) logging
- Computation Timing - Configure expected 3rd-party computation and ping times
- VSL Logging - Vehicle Signal Logger for recording vehicle data
- Co-Simulation - Real-time signal exchange with external simulators
Signal Categories
| Category | Pointer | Description |
|---|---|---|
| Kinematics | isKinematics | Vehicle position, velocity, acceleration |
| Driver | isDriver | Steering, throttle, brake inputs |
| Wheels | isWheels | Per-wheel data (speed, slip, etc.) |
| Electrics | isElectrics | Electrical system values |
| Powertrain | isPowertrain | Engine, transmission data |
| Sensors | isSensors | Attached sensor readings |
| Pose | isPose | Full vehicle transform |
UDP Configuration
| Field | Default | Description |
|---|---|---|
| Send IP | 127.0.0.1 | Target IP for outgoing data |
| Receive IP | 127.0.0.1 | IP for incoming data |
| Send Port | 64890 | Outgoing UDP port |
| Receive Port | 64891 | Incoming UDP port |
Internal Communication
Uses lpack for encoding/decoding data between GE Lua and vehicle Lua (vlua):
local function updateCollectedVehicleData(collectedData)
cData = lpack.decode(collectedData)
isVluaDataReturned = true
endFunctions
updateCollectedVehicleData(collectedData)
Callback from vlua when vehicle signal data has been collected. Decodes the lpack-encoded data.
collectedData(string) - lpack-encoded vehicle data from vlua
onEditorInitialized()
Registers the co-simulation edit mode and tool windows (requires tech_license).
onEditorGui()
Main per-frame UI rendering for the signal editor and vehicle signals window.
onVehicleReplaced(vid)
Clears the signals list when a vehicle is replaced.
vid(number) - Vehicle ID
onVehicleSpawned(vid)
Resets execution state when a vehicle spawns (e.g. on CTRL+R reset).
vid(number) - Vehicle ID
Additional Exports
M.onVehicleReplacedM.onVehicleSpawnedM.updateCollectedVehicleData
See Also
- globals - Vehicle access and communication patterns
CEF Helper
Minimal editor extension that manages CEF (Chromium Embedded Framework) UI visibility when entering/exiting editor mode. Currently disabled for release due to track editor bugs.
Crawl Data Editor
Editor tool for creating and managing crawl gameplay data - trails, paths, boundaries, and starting positions used by the crawl game mode. Provides tabbed editing interface with separate edit modes fo