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

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 ExtensionsuiliveryEditor

Livery Editor – Resources

Loads and categorises decal textures from the dynamic decals texture registry for the UI resource browser.

Loads and categorises decal textures from the dynamic decals texture registry for the UI resource browser.


Overview

ui_liveryEditor_resources reads tagged texture files from editor_api_dynamicDecals_textures, organises them into categories, and provides query functions for the UI's decal picker.

Extension path: lua/ge/extensions/ui/liveryEditor/resources.lua


Dependencies

editor_api_dynamicDecals_textures


Exports (M)

FunctionSignatureDescription
setup()Initialises the textures API and parses all tagged textures into categories.
requestData()Triggers liveryEditor_resources_data with the full texture list.
getTextureCategories() → categories[]Returns all categories sorted alphabetically.
getTexturesByCategory(category) → categoryReturns a single category object by value/name.
getDecalTextures() → textures[]Returns the full categorised texture list.
getCategories() → categoriesReturns raw categories (may be nil).

Data Fields

FieldTypeDescription
M.texturestableCached texture data (initialized as empty {}).

Data Fields

FieldDescription
M.dependencies{"editor_api_dynamicDecals_textures"} - texture management API.

Internals

Texture Category Format

{
  value = "flames",        -- tag name / category id
  label = "flames",        -- display label
  items = {
    {
      name = "flame01.png",
      label = "flame01.png",
      value = "flame01.png",
      preview = "/art/dynamicDecals/flames/flame01.png"
    },
    ...
  }
}

Setup Flow

  1. Calls texturesApi.setup() to initialise the texture file scanner
  2. Gets all tag-to-file mappings via texturesApi.getTagsWithRefs()
  3. Parses into the categorised format above
  4. Scans for untagged textures via texturesApi.getTextureFiles() + readSidecarFile()
  5. Untagged textures go into an "Others" category

Stub Hooks

dynamicDecals_onTextureFileAdded and dynamicDecals_onTextureFileDeleted are defined but empty - reserved for future hot-reload support.


How It Works

  1. On setup(), all decal texture files are scanned and grouped by their sidecar tags
  2. Textures without tags are collected into an "Others" bucket
  3. The UI calls requestData() or getTextureCategories() to populate the decal picker
  4. Categories are sorted alphabetically for consistent display

Example Usage

local resources = extensions.ui_liveryEditor_resources

-- After setup, get all categories
local categories = resources.getTextureCategories()
for _, cat in ipairs(categories) do
  print(cat.label, #cat.items .. " textures")
end

-- Get textures in a specific category
local flames = resources.getTexturesByCategory("flames")

Additional Exports

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

  • M.dynamicDecals_onTextureFileAdded
  • M.dynamicDecals_onTextureFileDeleted
  • M.getCategories
  • M.getDecalTextures
  • M.getTextureCategories
  • M.getTexturesByCategory
  • M.requestData
  • M.setup

Livery Editor – Layers

Manages the UI-side layer data model - parsing, caching, and notifying the UI of layer stack changes.

Livery Editor – Selection

Manages the layer selection state - single/multi-select, available actions, highlight toggling, and UI notifications.

On this page

OverviewDependenciesExports (M)Data FieldsData FieldsInternalsTexture Category FormatSetup FlowStub HooksHow It WorksExample UsageAdditional Exports