RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Locations DetectorMission ManagerMissionsMission Screen UIPOI TestProgressMission Start TriggerUnlocks
Base MissionEditor HelperFlow Mission

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE ExtensionsgameplaymissionsmissionTypes

Editor Helper

Reference for the editor helper class that provides a rich set of UI elements for editing mission type data in the mission editor. This is the backbone of all mission editor panels.

Reference for the editor helper class that provides a rich set of UI elements for editing mission type data in the mission editor. This is the backbone of all mission editor panels.


Module Export

Returns a constructor function (derivedClass, ...) that creates an editor helper instance with an elements array and autoAdditionalAttributes table.


Class C - Element Factory Methods

MethodSignatureDescription
addNumeric(label, fieldName, default, displayOptions)Float input with optional unit display (velocity/distance/time)
addString(label, fieldName, default, len, displayOptions)Text input with optional translation check and dropdown
addBool(label, fieldName, default, hideElementList, displayOptions)Checkbox, can toggle visibility of other elements
addTransform(label, fieldName, valueOptions, displayOptions)Position/rotation/scale with 3D gizmo and draw modes
addModelConfig(label, fieldName, defaultModel, defaultConfig, displayOptions)Vehicle model+config selector
addFile(label, fieldName, default, allowedExtensions, displayOptions)File path input with browse dialog
addFixedFile(label, filepathsInMissionfolder, displayOptions)Fixed file reference (race, sites, prefab, flow, campath)
addRace(label, fieldName, default, ...)File input specialized for .path.json race files
addSites(label, fieldName, default)File input specialized for .sites.json files
addLeaderboard(label, fieldName, defaultCount, best, medium, worst)Leaderboard parameter editor
addReward(label, fieldName, default)Numeric input styled as reward
addDropdown(label, fieldName, values, default, tooltips)Dropdown selector
addMissionId(label, fieldName, default, displayOptions)Searchable mission ID selector
addSimpleLapConfig(label, fieldName, displayOptions)Lap configuration utility
addCustomElement(label, getNew, setMission, draw)Fully custom element with callbacks

Decorators

MethodDescription
addDecoHeader(text, color)Colored section header
addDecoText(text, tooltip)Info text with tooltip
addDecoSeparator()Horizontal line
addDecoSpacer()4px spacer
addDecoDummy(height)Custom height spacer

Class C - Core Methods

MethodSignatureDescription
getNewDataC:getNewData() → tableReturns default field values for all elements
setMissionC:setMission(m)Loads mission data into all element UI states
checkMissionC:checkMission(m, fix) → issuesValidates mission data; optionally auto-fixes missing/mismatched fields
drawC:draw(filterOptions)Draws all elements with ImGui; handles mouse interaction for transforms
getAllFieldNamesC:getAllFieldNames() → tableReturns all field names with types for flowgraph integration
setAutoAdditionalAttributesC:setAutoAdditionalAttributes(key, auto)Marks additional attributes for auto-generation

Transform Draw Modes

ModeDescription
sphereSphere at position with scale as radius
sphereDirSphere with directional prism indicator
vehicleVehicle-shaped box with direction triangle
halfBoxHalf-size OBB visualization
fullBoxFull-size OBB visualization

How It Works

-- In a mission type's editor.lua:
local E = {}
E.__index = E
local helper = gameplay_missions_missions.editorHelper(E)

-- Add elements in init:
function E:init()
  self:addDecoHeader("Race Setup")
  self:addFile("Race File", "raceFile", "", {{"Race","*.path.json"}})
  self:addTransform("Start Position", "start", {defaultPos=vec3()}, {drawMode="vehicle"})
  self:addBool("Closed Track", "closed", false)
  self:addNumeric("Laps", "laps", 3, {min=1, max=100})
end

Key Behaviors

  • Issue Detection: checkMission finds missing fields, type mismatches, invalid files/models/configs
  • Fixed Files: Support context menus for Race Editor, Sites Editor, Flowgraph Editor, Cam Path Editor, and Scenetree
  • Mouse Interaction: Clickable transforms can be selected by clicking in the 3D viewport
  • Star Association: Elements can be linked to stars via displayOptions.associatedStars

See Also

  • missionTypes/baseMission - Base Mission Type Constructor - Related reference
  • missionTypes/flowMission - Flowgraph-Based Mission Type - Related reference
  • Gameplay Systems Guide - Guide

Base Mission

Reference for the base mission type, the simplest mission class providing minimal lifecycle hooks. Returned by `gameplay_missions_missions.baseMission()`.

Flow Mission

Reference for the flowgraph mission type, the primary mission class used by most BeamNG missions. Extends `baseMission` with flowgraph manager integration, vehicle/traffic/environment setup modules, c

On this page

Module ExportClass C - Element Factory MethodsDecoratorsClass C - Core MethodsTransform Draw ModesHow It WorksKey BehaviorsSee Also