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 – Layer Action

Dispatches high-level actions (reproject, transform, delete, duplicate, mirror, etc.) on the currently selected layer(s).

Dispatches high-level actions (reproject, transform, delete, duplicate, mirror, etc.) on the currently selected layer(s).


Overview

ui_liveryEditor_layerAction defines an action-dispatch system for the livery editor. The UI sends an action string and this module routes it to the appropriate operation on the selected layer.

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


Exports (M)

FunctionSignatureDescription
performAction(action) → variesDispatches the named action on the current selection. Returns action-specific data.
toggleEnabledByLayerUid(layerUid)Toggles a layer's enabled flag directly by UID.

Action Types

ActionDescription
requestReprojectShows the cursor with the selected layer's properties for repositioning.
cancelReprojectRestores the layer and hides the cursor.
reprojectStamps the cursor position as the new layer position.
transformOpens the layer transform view for position/scale/rotation editing.
materialsOpens the materials view for colour/metallic/roughness editing.
highlightToggles decal highlighting on the selected layer. Returns bool.
enabledToggles enabled state on all selected layers. Returns bool.
deleteRemoves the selected layer from the stack.
duplicateDuplicates the selected layer.
mirrorToggles the mirrored flag. Returns bool.
flipMirroredToggles flip on the mirrored decal. Returns bool.

Internals

Reproject Flow

  1. requestReproject - copies layer properties to the cursor, hides the layer, shows the cursor
  2. User repositions the cursor on the vehicle
  3. reproject - stamps a new decal, overwrites the original layer UID, removes the temporary

Mouse vs Cursor

Helper functions useMouse() / useCursor() toggle api.settingsFlags.UseMousePos to switch between mouse-driven and keyboard/controller-driven cursor placement.


How It Works

  1. The UI calls performAction("transform") (or any action string)
  2. The module reads the first selected layer from ui_liveryEditor_selection
  3. Fetches the full layer data from the API
  4. Routes to the corresponding internal function
  5. Returns a value where applicable (booleans for toggles)

Example Usage

local layerAction = extensions.ui_liveryEditor_layerAction

-- Delete the selected layer
layerAction.performAction("delete")

-- Toggle mirror and check result
local mirrored = layerAction.performAction("mirror")

-- Toggle enabled directly
layerAction.toggleEnabledByLayerUid(someLayerUid)

Additional Exports

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

  • M.performAction
  • M.toggleEnabledByLayerUid

Livery Editor – History

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

Livery Editor – Layer Edit

Manages the full edit lifecycle for a single decal layer - transform (translate, rotate, scale, skew), material properties, and gamepad/controller hold-repeat input.

On this page

OverviewExports (M)Action TypesInternalsReproject FlowMouse vs CursorHow It WorksExample UsageAdditional Exports