RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
ui/ambientSound - Ambient Sound Stream PlayerUI Apps ManagerUI AudioBindings LegendCamera Distance AppConsole (consoleNG)Credits MusicExternal App (WebSocket UI Server)Fade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsUI Navigation / MapVehicle Paint EditorVehicle Vicinity AppUI Visibility
Livery Editor - CameraLivery Editor - ControlsLivery Editor - Edit ModeLivery Editor – Editor (Core)Livery Editor – HistoryLivery Editor – Layer ActionLivery Editor – Layer EditLivery Editor – LayersLivery Editor – ResourcesLivery Editor – SelectionLivery Editor – ToolsLivery Editor – User DataLivery Editor – Utils

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 ExtensionsuiliveryEditor

Livery Editor – Editor (Core)

Core entry point and API interface for the livery editor UI. Manages editor lifecycle (setup, session, save, exit).

Core entry point and API interface for the livery editor UI. Manages editor lifecycle (setup, session, save, exit).


Overview

ui_liveryEditor_editor orchestrates the livery editor: initialising the dynamic decals API, toggling vehicle controls, loading/saving skin files, and cleaning up on exit. It acts as the bridge between the UI layer and editor_api_dynamicDecals.

Extension path: lua/ge/extensions/ui/liveryEditor/editor.lua


Dependencies

editor_api_dynamicDecals, ui_liveryEditor_layers, ui_liveryEditor_layers_decals, ui_liveryEditor_layers_cursor, ui_liveryEditor_camera, ui_liveryEditor_controls, ui_liveryEditor_resources, ui_liveryEditor_selection, ui_liveryEditor_tools, ui_liveryEditor_tools_transform, ui_liveryEditor_editMode


Exports (M)

FunctionSignatureDescription
setup()Initial API setup, switches skin to "dynamicTextures", disables vehicle controls.
startEditor()Full editor initialisation (API, resources, edit mode, controls).
startSession()Begins an editing session - loads a file or creates a new layer stack.
createNew()Resets state so the next session starts with a blank canvas.
loadFile(file) → boolValidates and queues a .dynDecals.json file for the next session.
save(filename)Exports the current skin and persists the layer stack to disk.
applySkin()Applies the saved skin name via core_vehicle_partmgmt.setSkin.
exitEditor()Clears the layer stack, re-enables vehicle controls, resets state.
onUpdate()Per-frame tick - forwards to api.onUpdate_() while the editor is running.

Data Fields

FieldDescription
M.dependencies{"editor_api_dynamicDecals", "ui_liveryEditor_layers", "ui_liveryEditor_layers_decals", ...} - decal API and layer subsystems.

Internals

Vehicle Controls Toggle

local function toggleVehicleControls(enable)
  local commonActionMap = scenetree.findObject("VehicleCommonActionMap")
  if commonActionMap then commonActionMap:setEnabled(enable) end
  local specificActionMap = scenetree.findObject("VehicleSpecificActionMap")
  if specificActionMap then specificActionMap:setEnabled(enable) end
end

Disables driving inputs while the editor is active, re-enables on exit.

Session Flow

  1. startEditor() - one-time setup (API, resources, edit mode, action maps)
  2. startSession() - either loads a queued file or creates a new stack with a fill layer using the vehicle's paint colour
  3. User edits layers via other livery editor extensions
  4. save(filename) - exports skin + saves .dynDecals.json
  5. applySkin() - optionally applies the skin so it persists after exiting
  6. exitEditor() - tears everything down, restores vehicle controls

Save Filename Pattern

Only alphanumeric, dash, and underscore characters are accepted: ^[a-zA-Z0-9_-]+$


How It Works

  1. The editor disables vehicle action maps and the API's own update loop on start
  2. A fill layer matching the vehicle colour is added as the base when creating new
  3. Saving exports the skin via api.exportSkin() and writes a layer stack JSON file
  4. On exit without applying, the skin resets to nil (default); with apply, the named skin stays

Example Usage

-- Start the editor
extensions.ui_liveryEditor_editor.startEditor()

-- Load an existing save
extensions.ui_liveryEditor_editor.loadFile("settings/dynamicDecals/mySkin.dynDecals.json")
extensions.ui_liveryEditor_editor.startSession()

-- Save and apply
extensions.ui_liveryEditor_editor.save("mySkin")
extensions.ui_liveryEditor_editor.applySkin()

-- Exit
extensions.ui_liveryEditor_editor.exitEditor()

Additional Exports

The following exports are available but not yet documented in detail:

  • M.applySkin
  • M.createNew
  • M.exitEditor
  • M.loadFile
  • M.onUpdate
  • M.save
  • M.setup
  • M.startEditor
  • M.startSession

Livery Editor - Edit Mode

Edit mode state machine for the livery editor - manages layer application, reapplication, selection, and undo within an editing session.

Livery Editor – History

Thin wrapper around the dynamic decals API undo/redo system that notifies the UI on history changes.

On this page

OverviewDependenciesExports (M)Data FieldsInternalsVehicle Controls ToggleSession FlowSave Filename PatternHow It WorksExample UsageAdditional Exports