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

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

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


Overview

ui_liveryEditor_layers_cursor controls the "cursor" used to preview and place new decals. It wraps the dynamic decals API cursor/decal properties and notifies the UI of changes. It also provides default values and a reset mechanism.

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


Exports (M)

FunctionSignatureDescription
translate(steps_x, steps_y)Moves cursor position by step increments.
setPosition(posX, posY)Sets cursor position absolutely.
scale(steps_x, steps_y)Adjusts cursor scale by steps.
setScale(scaleX, scaleY)Sets cursor scale absolutely.
skew(steps_x, steps_y)Adjusts cursor skew by steps.
setSkew(skewX, skewY)Sets cursor skew absolutely.
rotate(degrees, counterClockwise)Rotates cursor by degree steps.
setRotation(degrees)Sets cursor rotation absolutely.
setColor(color)Sets RGBA colour array on the cursor.
setMetallicIntensity(value)Sets metallic intensity (0–1).
setRoughnessIntensity(value)Sets roughness intensity (0–1).
setMirrored(mirrored, flipped)Sets mirror and flip flags.
setMirrorOffset(offset)Sets the mirror offset distance.
setUseMousePos(value)Toggles mouse-driven vs cursor-driven placement.
setProjectSurfaceNormal(value)Toggles projecting along the surface normal.
setDecal(texture)Sets the colour texture path. Ensures alpha > 0.
setCursorProperties(params)Bulk-sets cursor properties from a params table.
resetProperties(params)Resets specific or all properties to defaults.
getData() → tableReturns the full cursor state as a UI-friendly table.
requestData()Triggers LiveryEditor_CursorUpdated with current data.
notifyListeners()Alias for requestData - fires LiveryEditor_CursorUpdated.

Exported Constants

ConstantValueDescription
DEFAULT_POSITIONPoint2F(0.5, 0.5)Default cursor position (center).
DEFAULT_SCALEvec3(0.5, 1, 0.5)Default cursor scale.
DEFAULT_SKEWPoint2F(0, 0)Default cursor skew.
DEFAULT_ROTATION0Default rotation in degrees.
DEFAULT_COLORPoint4F(1, 1, 1, 1)Default colour (white, full alpha).
DEFAULT_METALLICINTENSITY0Default metallic intensity.
DEFAULT_ROUGHNESSINTENSITY0Default roughness intensity.
DEFAULT_MIRROREDfalseDefault mirror state.
DEFAULT_FLIP_MIRROREDfalseDefault flip-mirror state.
DEFAULT_MIRROR_OFFSET0Default mirror offset.

Internals

Step Units

TRANSLATE_STEP_UNIT = 0.001
ROTATE_STEP_UNIT    = 0.1
SCALE_STEP_UNIT     = 0.01
SKEW_STEP_UNIT      = 0.01

Default Values

DEFAULT_POSITION           = Point2F(0.5, 0.5)
DEFAULT_SCALE              = vec3(0.5, 1, 0.5)
DEFAULT_SKEW               = Point2F(0, 0)
DEFAULT_ROTATION           = 0
DEFAULT_COLOR              = Point4F(1, 1, 1, 1)
DEFAULT_METALLICINTENSITY  = 0
DEFAULT_ROUGHNESSINTENSITY = 0
DEFAULT_MIRRORED           = false
DEFAULT_FLIP_MIRRORED      = false
DEFAULT_MIRROR_OFFSET      = 0

Reset Params

resetProperties accepts an optional array of property names: "position", "scale", "skew", "rotation", "color", "metallicIntensity", "roughnessIntensity", "material" (resets color + metallic + roughness), "mirror", "transform" (alias for position).


How It Works

  1. Every setter wraps the corresponding api.set* call
  2. After each change, notifyListeners() triggers LiveryEditor_CursorUpdated with the full cursor data
  3. The UI reads position, scale, rotation, colour, etc. from the triggered data
  4. resetProperties() restores defaults selectively or globally

Example Usage

local cursor = extensions.ui_liveryEditor_layers_cursor

-- Set a decal texture and position
cursor.setDecal("/art/decals/logo.png")
cursor.setPosition(0.5, 0.5)
cursor.setScale(0.3, 0.3)
cursor.setColor({1, 0, 0, 1})  -- red

-- Reset everything
cursor.resetProperties()

Additional Exports

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

  • M.DEFAULT_COLOR
  • M.DEFAULT_FLIP_MIRRORED
  • M.DEFAULT_METALLICINTENSITY
  • M.DEFAULT_MIRRORED
  • M.DEFAULT_MIRROR_OFFSET
  • M.DEFAULT_POSITION
  • M.DEFAULT_ROTATION
  • M.DEFAULT_ROUGHNESSINTENSITY
  • M.DEFAULT_SCALE
  • M.DEFAULT_SKEW
  • M.getData
  • M.notifyListeners
  • M.requestData
  • M.resetProperties
  • M.rotate
  • M.scale
  • M.setColor
  • M.setCursorProperties
  • M.setDecal
  • M.setMetallicIntensity
  • M.setMirrorOffset
  • M.setMirrored
  • M.setPosition
  • M.setProjectSurfaceNormal
  • M.setRotation
  • M.setRoughnessIntensity
  • M.setScale
  • M.setSkew
  • M.setUseMousePos
  • M.skew
  • M.translate

Livery Editor – Utils

Math and conversion utilities shared across the livery editor modules.

Livery Editor – Layers / Decal

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

On this page

OverviewExports (M)Exported ConstantsInternalsStep UnitsDefault ValuesReset ParamsHow It WorksExample UsageAdditional Exports