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
Gameplay Selector - GeneralTile ClusteringGameplay Selector TilesTile Sorting

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 ExtensionsuigameplaySelector

Gameplay Selector - General

Backend module for the gameplay grid selector - manages display options, filters, tiles, favourites, and navigation for scenarios, campaigns, challenges, and freeroam.

Backend module for the gameplay grid selector - manages display options, filters, tiles, favourites, and navigation for scenarios, campaigns, challenges, and freeroam.


Overview

ui_gameplaySelector_general is the backend that powers the gameplay selector grid UI. It aggregates tiles from tile generators (campaigns, levels, missions, scenarios), applies filtering and display preferences, and provides details/actions for selected items.

Extension path: lua/ge/extensions/ui/gameplaySelector/general.lua

Dependencies: ui_gameplaySelector_tiles


Exports (M)

FunctionSignatureDescription
getUiData()Returns items, displayData, filters, and backendName.
getGameplayData()Returns full gameplay data (initializes on first call).
getTiles(path)Returns grouped/clustered tiles for a navigation path.
passesFilters(item)Checks if an item passes active filters.
getDisplayData()Returns current display settings.
updateDisplayData(key, value)Updates a display setting.
getDetails(item)Returns detail panel data for an item.
executeButton(buttonId, data?)Executes a detail panel button action.
executeDoubleClick(item)Executes the double-click action for an item.
toggleFavourite(itemDetails)Toggles favourite status for an item.
openGameplaySelector()Opens the selector with default settings.
openChallengesSelector()Opens filtered to Challenges.
openScenariosSelector()Opens filtered to Scenarios.
openCampaignsSelector()Opens filtered to Campaigns.
openRallySelector()Opens filtered to Rally stages/loops.

Filter API

FunctionSignatureDescription
getFilters() → filterDataReturns filter list and state.
toggleFilter(key, value)Toggles a set filter option.
setSearchText(text)Sets search text.
clearAllFilters()Resets all filters and search.
onModManagerStateChanged()Hook - marks gameplay data as changed.
onSettingsChanged()Hook - marks gameplay data as changed.
updateFilterData(...)Updates filter data for the gameplay selector.
isFavourite(...)Checks if an item is marked as favourite.
isRecent(...)Checks if an item was recently used.
trackRecent(...)Marks an item as recently used.
getActiveFilters(...)Returns currently active filters.
updateRangeFilter(...)Updates a range-type filter value.
resetRangeFilter(...)Resets a range filter to default.
resetDisplayDataToDefaults(...)Resets all display options to defaults.
profilerFinish(...)Finishes a profiler measurement.
setCustomDetailsButtons(...)Sets custom buttons for the detail panel.
getCustomDetailsButtons()Returns the current custom detail buttons.
getManagementDetails(...)Returns management detail data for an item.
exitCallback(...)Callback invoked on exit.
exploreFolder(path)Opens the file explorer for an item's folder.
goToMod(modId)Navigates to the mod page for an item.
closedFromUI()Cleanup hook when the selector is closed.
getDisplayDataOptions() → options[]Returns display data configuration options.
getScreenHeaderTitleAndPath(path) → tableReturns the header title and breadcrumb path.
getSearchText() → stringReturns the current search text.
onModDeactivated()Hook - marks gameplay data as changed on mod deactivation.
onModActivated()Hook - marks gameplay data as changed on mod activation.
onModManagerReady()Hook - marks gameplay data as changed when mod manager is ready.
resetSetFilter(filterKey)Resets a set filter to default.
setDisplayDataOption(key, value)Sets a display data option.
exploreFolder(...)Opens the file explorer for an item's folder.
goToMod(...)Navigates to the mod page for an item.

Data Fields

FieldDescription
M.backendName"gameplaySelector" - backend identifier.
M.dependencies{"ui_gameplaySelector_tiles"} - tile generation system.
M.displayDataInstanceDisplay data module instance for managing view preferences.

Internals

Display Data Options

Persisted to /settings/gameplaySelectorData.json. Key options:

KeyDefaultDescription
groupMode"system"Groups: System, Type, Level, None
clusterMode"automatic"Clustering: Automatic, Type, Level, None
displaySize"medium"Tile size: List through Huge
sorting"automatic"Sort mode: Automatic, Name, Date
showAuxContenttrueShow auxiliary/debug content
showCareerContentfalseShow career-only missions

Filter System

Filters are built from gameplay item properties: system, type, level. Items are checked against both standard filters and career content filtering:

function M.passesFilters(item)
  if not filter.passesFilters(item) then return false end
  if item.isCareerOnly and not displayData.showCareerContent then return false end
  return true
end

Data Initialization

On first access or mod activation, tiles are collected via the hook system:

extensions.hook("onGameplaySelectorGetTiles", items, M)

Tile generators register via this hook to provide their items.


How It Works

  1. UI opens the selector → openGameplaySelector() clears filters and navigates
  2. getUiData() aggregates items from all tile generators via hooks
  3. Items are filtered and grouped based on display settings
  4. getTiles(path) delegates to the tiles module for grouping/clustering
  5. Selecting an item calls getDetails() which hooks into generators for detail panels
  6. Button clicks trigger executeButton() which invokes the registered callback

Additional Exports

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

  • M.getGameplayData
  • M.onModActivated
  • M.onModDeactivated
  • M.onModManagerReady
  • M.onModManagerStateChanged
  • M.onSettingsChanged
  • M.clearAllFilters
  • M.closedFromUI
  • M.executeButton
  • M.executeDoubleClick
  • M.exitCallback
  • M.exploreFolder
  • M.getActiveFilters
  • M.getDetails
  • M.getDisplayData
  • M.getDisplayDataOptions
  • M.getFilters
  • M.getManagementDetails
  • M.getScreenHeaderTitleAndPath
  • M.getSearchText
  • M.getTiles
  • M.getUiData
  • M.goToMod
  • M.isFavourite
  • M.isRecent
  • M.openCampaignsSelector
  • M.openChallengesSelector
  • M.openGameplaySelector
  • M.openRallySelector
  • M.openScenariosSelector
  • M.profilerFinish
  • M.resetDisplayDataToDefaults
  • M.resetRangeFilter
  • M.resetSetFilter
  • M.setDisplayDataOption
  • M.setSearchText
  • M.toggleFavourite
  • M.toggleFilter
  • M.trackRecent
  • M.updateDisplayData
  • M.updateFilterData
  • M.updateRangeFilter

Freeroam Selector (General)

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

Tile Clustering

Groups gameplay items into clusters by level, type, or automatic system-based rules, and creates summary tiles for the grid UI.

On this page

OverviewExports (M)Filter APIData FieldsInternalsDisplay Data OptionsFilter SystemData InitializationHow It WorksAdditional Exports