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
App Selector (General)

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 ExtensionsuiappSelector

App Selector (General)

Grid selector backend for browsing and adding UI apps to layouts.

Grid selector backend for browsing and adding UI apps to layouts.


Overview

ui_appSelector_general implements the grid selector API for the UI Apps panel. It provides tile generation, filtering by app type, search, display settings, and detail views with an "Add to Layout" button.

Extension path: lua/ge/extensions/ui/appSelector/general.lua
Dependencies: ui_apps


Exports (M)

FunctionSignatureDescription
getAppData() → tableReturns cached app data (apps, filters, display settings). Reinitializes on mod changes.
getTiles(path) → groups[]Returns sorted/grouped tile arrays for the grid selector.
getFilters() → filterDataReturns current filter state (type-based set filters).
toggleFilter(filterKey, value)Toggles a filter option on/off.
updateRangeFilter(filterKey, min, max)Updates a range filter (unused currently).
resetRangeFilter(filterKey)Resets a range filter.
resetSetFilter(filterKey)Resets a set filter to default.
getDisplayDataOptions() → options[]Returns display size dropdown options.
setDisplayDataOption(key, value)Persists a display option (e.g., tile size).
resetDisplayDataToDefaults()Resets display options to defaults.
getSearchText() → stringReturns current search query.
setSearchText(val)Sets the search query text.
getScreenHeaderTitleAndPath(path) → tableReturns breadcrumb path segments and title for the header.
getDetails(details) → tableReturns detail view data for a selected app (preview, specs, buttons).
executeButton(buttonId, data)Executes a detail panel button callback by ID.
executeDoubleClick(details)Double-click spawns the app into the current layout.
getManagementDetails()Returns management details (empty buttons for apps).
toggleFavourite(itemDetails)No-op - apps don't support favourites yet.
exploreFolder(path)No-op - apps don't support folder exploration.
goToMod(modId)No-op - apps don't support mod navigation.
profilerFinish()No-op profiler finish hook.
closedFromUI()No-op callback for when selector closes.
onModDeactivated()Hook - marks app data as changed on mod deactivation.
onModActivated()Hook - marks app data as changed on mod activation.
onModManagerReady()Hook - marks app data as changed when mod manager is ready.
onModManagerStateChanged()Hook - marks app data as changed when mod manager state changes.
onSettingsChanged()Hook - marks app data as changed when settings change.

Data Fields

FieldDescription
M.dependencies{"ui_apps"} - app management system.

Internals

Grid Selector Integration

This module implements the full GridSelector API contract used by the Angular UI. Key modules are loaded via require:

  • displayDataModule - Persists tile size to /settings/appSelectorData.json
  • filterModule - Manages type-based set filters with search
  • buttonModule - Handles detail panel button callbacks
  • translateHelper - Wraps translateLanguage() for i18n

Tile Generation

Apps are fetched from ui_apps.getUIAppsData().availableApps, filtered, sorted (non-auxiliary first, then alphabetical), and grouped by category:

-- Category sort order (hardcoded)
local categoryOrder = { "Dashboard", "Telemetry", "General", "Gameplay", "Debug" }

Each tile includes: key, name, preview, sourceIcons (BeamNG official badge, mouse-required icon), and isAuxiliary.

Detail View

The detail panel shows app name, preview image, description, and specs (interactivity, version, types). The primary button triggers:

guihooks.trigger('appContainer:spawn', { appName = app.appName })
guihooks.trigger('ChangeState', {state = 'menu.appedit', params = {mode = 'edit'}})

Data Invalidation

App data is reloaded when mods activate/deactivate:

M.onModDeactivated = function() appDataChanged = true end
M.onModActivated = function() appDataChanged = true end
M.onModManagerReady = function() appDataChanged = true end

How It Works

  1. UI opens the app selector → calls getTiles() to populate the grid
  2. User types in search → setSearchText() filters by localized name/description
  3. User clicks a tile → getDetails() returns preview, specs, and "Add to Layout" button
  4. User clicks "Add to Layout" or double-clicks → spawns the app into the current layout via appContainer:spawn
  5. Display size persisted to JSON so it survives sessions

Additional Exports

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

  • M.getAppData
  • M.closedFromUI
  • M.executeButton
  • M.executeDoubleClick
  • M.exploreFolder
  • M.getDetails
  • M.getDisplayDataOptions
  • M.getFilters
  • M.getManagementDetails
  • M.getScreenHeaderTitleAndPath
  • M.getSearchText
  • M.getTiles
  • M.goToMod
  • M.profilerFinish
  • M.resetDisplayDataToDefaults
  • M.resetRangeFilter
  • M.resetSetFilter
  • M.setDisplayDataOption
  • M.setSearchText
  • M.toggleFavourite
  • M.toggleFilter
  • M.updateRangeFilter

Minimap Vehicles

Renders player and other vehicles on the minimap with role-based styling.

Freeroam Selector (General)

Grid selector backend for browsing and launching freeroam levels/spawnpoints.

On this page

OverviewExports (M)Data FieldsInternalsGrid Selector IntegrationTile GenerationDetail ViewData InvalidationHow It WorksAdditional Exports