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
Livery Editor – Layers / CursorLivery Editor – Layers / DecalLivery Editor – Layers / DecalsLivery Editor – Layers / FillLivery Editor – Layers / Group

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 ExtensionsuiliveryEditorlayers

Livery Editor – Layers / Decal

Provides per-layer decal operations - querying actions, adding decals, and reading formatted layer data for the cursor/decal UI.

Provides per-layer decal operations - querying actions, adding decals, and reading formatted layer data for the cursor/decal UI.


Overview

ui_liveryEditor_layers_decal manages individual decal layer interactions. It defines the available actions for a decal layer, provides a centred-add helper, and formats layer data for the cursor UI display.

Extension path: lua/ge/extensions/ui/liveryEditor/layers/decal.lua


Exports (M)

FunctionSignatureDescription
setLayer(layerUid)Sets the active layer UID for subsequent operations.
addLayer(params) → layerResets cursor, sets colour/texture from params, stamps a decal.
addLayerCentered(params) → layerAdds a layer at centre (0.5, 0.5) regardless of mouse mode, then resets cursor.
updateLayer(params)Stub - not yet implemented.
getLayerActions(layerUid) → actions[]Returns the available context menu actions for the given decal layer.

Internals

Action Menu

The available actions for a single decal layer:

LabelValueNotes
ReprojectrequestReprojectLazy-load, no drawer
Transformtransform
Materialsmaterials
MirrorrequestMirrorLazy-load, no drawer
Orderorder
HighlighthighlightToggle switch
EnableenabledShows current state
Duplicateduplicate
Deletedelete

Add Layer Flow

M.addLayer = function(params)
  resetCursor()  -- centre, white, default scale
  api.setDecalColor(color)
  api.setDecalTexturePath("color", params.texturePath)
  return api.addDecal()
end

addLayerCentered temporarily switches to cursor mode (non-mouse) to ensure the decal is placed at (0.5, 0.5), then resets and hides the cursor.


How It Works

  1. setLayer(uid) sets the active layer for the module
  2. getLayerActions(uid) builds an actions array; the "enabled" action includes the current state
  3. addLayer resets the cursor to defaults, applies params, and stamps via api.addDecal()
  4. addLayerCentered forces cursor mode to guarantee centre placement

Example Usage

local decalLayer = extensions.ui_liveryEditor_layers_decal

-- Add a new decal at centre
local layer = decalLayer.addLayerCentered({
  texturePath = "/art/decals/stripe.png",
  color = {1, 1, 1, 1}
})

-- Get actions for context menu
local actions = decalLayer.getLayerActions(layer.uid)

Additional Exports

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

  • M.addLayerCentered
  • M.getLayerActions
  • M.layerUid
  • M.setLayer
  • M.updateLayer

Livery Editor – Layers / Cursor

Manages the decal placement cursor - position, scale, skew, rotation, colour, material properties, and mirror settings.

Livery Editor – Layers / Decals

Operates on existing decal layers - transform (scale, skew, rotate), material properties (colour, metallic, roughness), and data formatting.

On this page

OverviewExports (M)InternalsAction MenuAdd Layer FlowHow It WorksExample UsageAdditional Exports