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 – Tools / GroupLivery Editor – Tools / MaterialLivery Editor – Tools / MiscLivery Editor – Tools / SettingsLivery Editor – Tools / Transform

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 ExtensionsuiliveryEditortools

Livery Editor – Tools / Group

Layer ordering and grouping/ungrouping operations for the livery editor.

Layer ordering and grouping/ungrouping operations for the livery editor.


Overview

ui_liveryEditor_tools_group manages layer stack ordering (move up/down/top/bottom) and group creation/dissolution. It operates on the currently selected layer(s) via the selection API.

Extension path: lua/ge/extensions/ui/liveryEditor/tools/group.lua


Exports (M)

FunctionSignatureDescription
moveOrderUp() → newOrderMoves the selected layer one position up in the stack.
moveOrderDown() → newOrderMoves the selected layer one position down.
changeOrderToTop() → newOrderMoves the selected layer to the top of its siblings.
changeOrderToBottom() → newOrderMoves the selected layer to position 2 (above the fill base).
setOrder(order) → resultSets the selected layer to an explicit order position.
moveOrderUpById(layerUid) → newOrderMoves a specific layer up by UID.
moveOrderDownById(layerUid) → newOrderMoves a specific layer down by UID.
changeOrder(oldOrder, oldParentUid, newOrder, newParentUid)Low-level order change with parent support.
groupLayers()Groups all selected layers into a new linked set.
ungroupLayer()Dissolves a group, moving children to the group's parent.

Internals

Order Bounds

  • Top = siblingCount (highest order)
  • Bottom = 2 (position 1 is typically the fill base layer)
  • Moving up increments order; moving down decrements

Group Creation

M.groupLayers = function()
  -- Find shallowest selected layer to determine parent
  local shallowestLevel, parentUid = ...
  local newGroup = api.addLinkedSet({parentUid})

  -- Move each selected layer into the new group
  for k, layerUid in ipairs(selectedLayerUids) do
    api.moveLayer(uiLayer.order, uiLayer.parentUid, newOrder, newGroup.uid)
  end

  uiSelectionApi.select(newGroup.uid)
end

Ungroup Flow

  1. Stores child UIDs (to avoid stale references during moves)
  2. Moves each child from the group to the group's parent at sequential positions
  3. Removes the now-empty group layer

How It Works

  1. Order operations use api.moveLayer(from, fromParent, to, toParent) to reposition
  2. Group creation uses api.addLinkedSet() then moves selected layers into it
  3. Ungrouping iterates children, moves them out, then deletes the group shell
  4. The selection automatically updates to the newly created group

Example Usage

local groupTool = extensions.ui_liveryEditor_tools_group

-- Move selected layer up
groupTool.moveOrderUp()

-- Group multiple selected layers
extensions.ui_liveryEditor_selection.select({uid1, uid2})
groupTool.groupLayers()

-- Ungroup
groupTool.ungroupLayer()

Additional Exports

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

  • M.changeOrder
  • M.changeOrderToBottom
  • M.changeOrderToTop
  • M.moveOrderDown
  • M.moveOrderDownById
  • M.moveOrderUp
  • M.moveOrderUpById
  • M.setOrder
  • M.ungroupLayer

Livery Editor – Layers / Group

Provides operations on linked-set (group) layers - material propagation to child layers.

Livery Editor – Tools / Material

Material property tool - sets colour, metallic, roughness, normal intensity, and decal texture on cursor or selected layers.

On this page

OverviewExports (M)InternalsOrder BoundsGroup CreationUngroup FlowHow It WorksExample UsageAdditional Exports