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 / Decals

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

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


Overview

ui_liveryEditor_layers_decals provides the per-layer editing operations that modify an already-placed decal. Unlike the cursor module (which controls the preview), this module writes directly to layer objects via api.setLayer().

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


Exports (M)

FunctionSignatureDescription
setLayer(layerUid)Sets the active layer and stores a deep copy.
addLayer(params) → layerAdds a new decal using cursor mode at (0.5, 0.5).
setColor(layer, color)Sets RGBA colour on a layer.
setMetallicIntensity(layer, value)Sets metallic intensity on a layer.
setRoughnessIntensity(layer, value)Sets roughness intensity on a layer.
rotate(layer, degrees, ccw)Rotates a layer by incremental degrees.
setRotation(layer, degrees)Sets absolute rotation in degrees.
scale(layer, steps_x, steps_y)Scales a layer by step increments.
setScale(layer, scaleX, scaleY)Sets absolute scale.
skew(layer, stepsX, stepsY)Skews a layer by step increments.
setSkew(layer, skewX, skewY)Sets absolute skew.
setMirrored(layer, mirrored, flipped)Sets mirror and flip flags.
setDecal(layer, texture)Changes the decal texture path.
getData(layer) → tableReturns UI-formatted data for the layer.
getLayerActions() → string[]Returns available actions: transform, material, order, duplicate, mirror, rename, visibility, delete.
requestData / notifyListeners(layer)Triggers LiveryEditor_CursorUpdated with the layer's data.

Data Fields

FieldDescription
M.layerDatanil - cached data for the currently active decal layer.

Internals

Step Units

ROTATE_STEP_UNIT = 0.1
SCALE_STEP_UNIT  = 0.01
SKEW_STEP_UNIT   = 0.01

getData Format

Returns the same shape as the cursor's getData() but with applied = true, indicating the data reflects a placed layer rather than the cursor preview.

Notify Pattern

Every setter calls api.setLayer(layer, true) (true = re-render) then triggers LiveryEditor_CursorUpdated so the UI stays in sync.


How It Works

  1. setLayer(uid) caches the layer data for potential restore
  2. Transform functions modify layer.decalScale / decalSkew / decalRotation directly
  3. Material functions modify layer.color / metallicIntensity / roughnessIntensity
  4. After each change, api.setLayer(layer, true) commits and re-renders
  5. notifyListeners(layer) pushes updated data to the UI

Example Usage

local decals = extensions.ui_liveryEditor_layers_decals
local api = extensions.editor_api_dynamicDecals

local layer = api.getLayerByUid(someUid)
decals.setColor(layer, {1, 0, 0, 1})       -- red
decals.setScale(layer, 0.3, 0.3)
decals.setRotation(layer, 45)
decals.setMirrored(layer, true, false)

Additional Exports

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

  • M.addLayer
  • M.getData
  • M.getLayerActions
  • M.layerUid
  • M.notifyListeners
  • M.requestData
  • M.rotate
  • M.scale
  • M.setColor
  • M.setDecal
  • M.setLayer
  • M.setMetallicIntensity
  • M.setMirrored
  • M.setRotation
  • M.setRoughnessIntensity
  • M.setScale
  • M.setSkew
  • M.skew

Livery Editor – Layers / Decal

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

Livery Editor – Layers / Fill

Manages fill layers - solid colour backgrounds that serve as the base coat in a livery.

On this page

OverviewExports (M)Data FieldsInternalsStep UnitsgetData FormatNotify PatternHow It WorksExample UsageAdditional Exports