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
Freeroam 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 ExtensionsuifreeroamSelector

Freeroam Selector (General)

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

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


Overview

ui_freeroamSelector_general implements the grid selector API for the freeroam level picker. It provides tile generation, filtering, display settings, favourites, recent selections, and detail views with configurable action buttons.

Extension path: lua/ge/extensions/ui/freeroamSelector/general.lua
Dependencies: ui_gameplaySelector_tiles
Settings path: /settings/freeroamSelectorData.json


Exports (M)

Tile & Data

FunctionSignatureDescription
getTiles(path) → groups[]Returns grouped tiles for the grid selector.
getGameplayData() → tableReturns cached freeroam data (items, filters, display settings).
getUiData() → tableReturns UI-ready data package.
getDetails(item) → tableReturns detail view via onGameplaySelectorGetDetails hook.
executeButton(buttonId, data)Executes a detail panel button callback.
executeDoubleClick(item)Runs the primary/double-click button action.

Filters

FunctionSignatureDescription
getFilters() → filterDataReturns current filter state.
toggleFilter(key, value)Toggles a filter option.
resetSetFilter(key)Resets a set filter.
getSearchText / setSearchText(text?)Get/set search query.

Display & Preferences

FunctionSignatureDescription
getDisplayDataOptions() → options[]Returns all display option definitions.
setDisplayDataOption(key, value)Sets a display option (tile size, recent mode, etc.).
toggleFavourite(itemDetails) → boolToggles favourite status for an item.

Navigation

FunctionSignatureDescription
getScreenHeaderTitleAndPath(path) → tableReturns breadcrumb title and path segments.
openFreeroamSelector()Opens the selector with freeroam filter pre-set.
openFreeroamSelectorForFreeroamConfigurator(callback)Opens in spawnpoint-selection mode with custom "Select Spawnpoint" button.
closedFromUI()Cleanup hook when the selector is closed.
onModManagerStateChanged()Hook - marks gameplay data as changed.
onSettingsChanged()Hook - marks gameplay data as changed.
updateFilterData(...)Updates filter data for the freeroam 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.
getManagementDetails(...)Returns management detail data for an item.
exitCallback(...)Callback invoked on exit.
exploreFolder(...)Opens the file explorer for an item's folder.
goToMod(...)Navigates to the mod page for an item.
clearAllFilters()Clears all active filters.
passesFilters(item) → boolChecks if an item passes current filter criteria.
updateDisplayData(key, value)Updates a display data value.
setCustomDetailsButtons(buttons)Sets custom buttons for the detail panel.
getCustomDetailsButtons() → tableReturns the current custom detail buttons.
onModDeactivated()Hook - marks gameplay data as changed.
onModActivated()Hook - marks gameplay data as changed.
onModManagerReady()Hook - marks gameplay data as changed when mod manager is ready.
getDisplayData() → tableReturns display data settings.

Data Fields

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

Internals

Display Data Options

Key configurable options persisted to JSON:

KeyDefaultDescription
displaySize"medium"Tile size (list/tiny/small/medium/large/huge)
showAuxContenttrueShow auxiliary debug content
showRecentMode"unclustered"Recent items display mode
showFavouritesMode"reducedClusters"Favourites display mode
defaultFreeroamAction"configureFreeroam"Primary button action

Tile Source

Items come from the onGameplaySelectorGetTiles extension hook, filtered to items with validBackends.freeroamSelector == true.

Filter Logic

Search matches against item name, level name, and custom filterHook extensions. Auxiliary content is hidden when showAuxContent is disabled.

Freeroam Configurator Mode

M.openFreeroamSelectorForFreeroamConfigurator(function(levelName, spawnPointName)
  -- callback receives selected level and spawnpoint
end)

This sets up custom "Select Spawnpoint" buttons and a custom breadcrumb path pointing back to the freeroam configurator.

Data Invalidation

Data reloads on onModActivated, onModDeactivated, and onModManagerReady.


How It Works

  1. UI opens the freeroam selector → getTiles() populates the grid from extension hooks
  2. User browses/searches/filters levels and spawnpoints
  3. Clicking a tile → getDetails() fetches detail view via onGameplaySelectorGetDetails hook
  4. Primary button starts freeroam or opens configurator (based on defaultFreeroamAction setting)
  5. Favourites and recent selections are persisted for quick re-access

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.getCustomDetailsButtons
  • 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.openFreeroamSelector
  • M.passesFilters
  • M.profilerFinish
  • M.resetDisplayDataToDefaults
  • M.resetRangeFilter
  • M.resetSetFilter
  • M.setCustomDetailsButtons
  • M.setDisplayDataOption
  • M.setSearchText
  • M.toggleFavourite
  • M.toggleFilter
  • M.trackRecent
  • M.updateDisplayData
  • M.updateFilterData
  • M.updateRangeFilter

App Selector (General)

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

Gameplay Selector - General

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

On this page

OverviewExports (M)Tile & DataFiltersDisplay & PreferencesNavigationData FieldsInternalsDisplay Data OptionsTile SourceFilter LogicFreeroam Configurator ModeData InvalidationHow It WorksAdditional Exports