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

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 Extensionsui

Grid Selector

Facade module that routes all grid selector API calls to the appropriate backend (vehicle, gameplay, app, freeroam).

Facade module that routes all grid selector API calls to the appropriate backend (vehicle, gameplay, app, freeroam).


Overview

ui_gridSelector is a thin routing layer that dispatches API calls to the correct backend module based on backendName. It provides a unified interface for the UI to interact with any selector type.

Extension path: lua/ge/extensions/ui/gridSelector.lua

Dependencies: ui_vehicleSelector_general, ui_gameplaySelector_general, ui_appSelector_general, ui_freeroamSelector_general


Exports (M)

Backend Resolution

FunctionSignatureDescription
getBackendByName(backendName)Returns the backend module for a name.

Delegated API (all take backendName as first arg)

CategoryFunctions
TilesgetTiles(backendName, ...)
FiltersgetFilters(backendName, ...), getActiveFilters(backendName, ...), toggleFilter(backendName, ...), updateRangeFilter(backendName, ...), resetRangeFilter(backendName, ...), resetSetFilter(backendName, ...), getSearchText(backendName, ...), setSearchText(backendName, ...) - all delegate to the resolved backend
DisplaygetDisplayDataOptions, setDisplayDataOption, resetDisplayDataToDefaults
NavigationgetScreenHeaderTitleAndPath, profilerFinish, closedFromUI
DetailsgetDetails, executeButton, getManagementDetails, exitCallback, executeDoubleClick, toggleFavourite
UtilityexploreFolder, goToMod

Data Fields

FieldDescription
M.dependencies{"ui_vehicleSelector_general", "ui_gameplaySelector_general", "ui_appSelector_general", "ui_freeroamSelector_general"} - all selector backends.

Internals

Backend Mapping

local function getBackendByName(backendName)
  if backendName == "vehicleSelector" then return ui_vehicleSelector_general
  elseif backendName == "gameplaySelector" then return ui_gameplaySelector_general
  elseif backendName == "appSelector" then return ui_appSelector_general
  elseif backendName == "freeroamSelector" then return ui_freeroamSelector_general
  end
end

Direct Implementations

Two functions are implemented directly rather than delegated:

-- Opens the native file explorer
M.exploreFolder = function(_backendName, path)
  Engine.Platform.exploreFolder(path)
end

-- Navigates to mod details page
M.goToMod = function(_backendName, modId)
  guihooks.trigger('ChangeState', {state = 'menu.mods.details', params = {modId = modId}})
end

Call Pattern

All delegated functions follow the same pattern - strip backendName and forward:

M.getTiles = function(backendName, ...) return getBackendByName(backendName).getTiles(...) end
M.toggleFilter = function(backendName, ...) return getBackendByName(backendName).toggleFilter(...) end

How It Works

  1. UI calls ui_gridSelector.getTiles("gameplaySelector", path)
  2. getBackendByName resolves to ui_gameplaySelector_general
  3. The call is forwarded with remaining arguments
  4. Backend processes and returns data to the UI
  5. This pattern keeps the UI code backend-agnostic

Additional Exports

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

  • M.closedFromUI
  • M.executeButton
  • M.executeDoubleClick
  • M.exitCallback
  • M.getActiveFilters
  • M.getBackendByName
  • M.getDetails
  • M.getDisplayDataOptions
  • M.getFilters
  • M.getManagementDetails
  • M.getScreenHeaderTitleAndPath
  • M.getSearchText
  • M.profilerFinish
  • M.resetDisplayDataToDefaults
  • M.resetRangeFilter
  • M.resetSetFilter
  • M.setDisplayDataOption
  • M.setSearchText
  • M.toggleFavourite
  • M.updateRangeFilter

Gameplay App Containers

Manages visibility of in-game HUD apps (rally, drift, drag, countdown, flash messages) and a queued flash message system.

Livery Editor

Main livery editor controller - manages setup, teardown, saving, and update loop for the dynamic decal painting system.

On this page

OverviewExports (M)Backend ResolutionDelegated API (all take backendName as first arg)Data FieldsInternalsBackend MappingDirect ImplementationsCall PatternHow It WorksAdditional Exports