RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Ambient SoundUI Apps ManagerUI AudioBindings LegendCamera Distance AppDeveloper ConsoleCredits MusicExternal WebSocket ServerFade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsNavigation Map DataVehicle Paint EditorVehicle Vicinity AppUI Visibility
Camera ManagementAction Map ManagementEdit Mode State MachineLivery EditorUndo/Redo WrapperLayer ActionsLayer Edit LifecycleLayer DataDecal Texture LoaderLayer SelectionToolsLivery FilesMath Utilities
Decal CursorDecal OperationsDecal LayersFill LayersGroup Layers

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

Decal Operations

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

See Also

  • Livery Editor – Layers / Cursor - Related reference
  • Livery Editor – Layers / Decals - Related reference
  • Livery Editor – Layers / Fill - Related reference
  • UI System Guide - Guide

Decal Cursor

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

Decal Layers

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 ExportsSee Also