RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Ambient SoundUI Apps ManagerUI AudioBindings LegendCamera Distance AppDeveloper ConsoleCredits MusicExternal WebSocket ServerFade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsNavigation Map DataVehicle Paint EditorVehicle Vicinity AppUI Visibility
Details InteractionVehicle SelectorTile ClusteringTile GroupingTilesTile SortingVehicle OperationsVehicle Specifications

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 ExtensionsuivehicleSelector

Tiles

Generates the grouped, clustered, and sorted tile grid for the vehicle selector.

Generates the grouped, clustered, and sorted tile grid for the vehicle selector.


Overview

ui_vehicleSelector_tiles is the tile generation engine for the vehicle selector. It converts filtered vehicle configs into grouped, clustered, sorted tile arrays for the UI grid. Supports two path types: allModels (overview with grouping) and configsForBrandSubModelOrModel (individual configs for a model).

Extension path: lua/ge/extensions/ui/vehicleSelector/tiles.lua Dependencies (require): tileSorting, tileGrouping, tileClustering, tilesModule


Exports (M)

FunctionSignatureDescription
getTiles(path, pathChanged) → groups[]Main entry: returns sorted tile groups for a path.
configToTile(config, fullName) → tileConverts a single config into a tile object.
clusterItems(configs) → clustersClusters configs using current display mode.
overrideDefaultSelectedTile(tile)Forces a specific tile to be pre-selected.
onExtensionLoaded()Creates the tilesModule instance.
emptyProfiler()Returns a no-op profiler instance.

Re-exported from submodules

getClusteredItemsFavouriteIconPercent, getClusteredItemsStats, getSources, sortByNameButOtherAlwaysLast, sortByValue, sortByYears, groupModeFunctions, getConfigOrModelPropValue


Internals

Path Handlers

allModels

  1. Filters all configs through passesFilters.
  2. Groups configs by the current group mode (Type, Brand, etc.) via tileGrouping.
  3. Clusters configs within each group via tileClustering.
  4. Creates tiles from clusters (or directly for unclustered favourites/recent).
  5. Sorts tiles per group (automatic or user-selected mode).
  6. Adds special Favourites/Recent groups with appropriate sorting.

configsForBrandSubModelOrModel

  1. Iterates configs for a specific model.
  2. Filters by submodel, brand, auxiliary, and current filters.
  3. Optionally filters by Favourites/Recent group context.
  4. Converts each matching config to a tile via configToTile.
  5. Sorts and sets default selection.

configToTile

Creates a tile with:

  • key - "modelKey/configKey"
  • name - Configuration name or full name
  • preview, model_key, config_key, configType
  • showDetails / doubleClickDetails - for UI interaction
  • Performance stats, favourite/recent indices, source icons

tilesModule Instance

On onExtensionLoaded, creates a generic tilesModule instance configured with vehicle-specific handlers, clustering, grouping, sorting, data source, and filter functions.


How It Works

  1. UI calls getTiles({keys: ["allModels"]}) or getTiles({keys: ["configsForBrandSubModelOrModel", model, ...]}).
  2. The appropriate path handler filters, groups, clusters, and sorts configs.
  3. Returns an array of group objects, each containing sorted tiles.
  4. The UI renders the tile grid from these groups.

Lua Examples

-- Get tiles for the overview
local groups = extensions.ui_vehicleSelector_tiles.getTiles(
  {keys = {"allModels"}}, true
)

-- Convert a single config to a tile
local tile = extensions.ui_vehicleSelector_tiles.configToTile(myConfig, true)

Hooks

HookWhen
onVehicleSelectorGetTiles (ext)Config path handler starts (with model/sub/brand/group params)

Additional Exports

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

  • M.clusterItems
  • M.configToTile
  • M.emptyProfiler
  • M.getClusteredItemsFavouriteIconPercent
  • M.getClusteredItemsStats
  • M.getConfigOrModelPropValue
  • M.getSources
  • M.getTiles
  • M.groupModeFunctions
  • M.onExtensionLoaded
  • M.overrideDefaultSelectedTile
  • M.sortByNameButOtherAlwaysLast
  • M.sortByValue
  • M.sortByYears

See Also

  • Vehicle Selector – Details Interaction - Related reference
  • Vehicle Selector – General - Related reference
  • Vehicle Selector – Tile Clustering - Related reference
  • UI System Guide - Guide

Tile Grouping

Assigns vehicle configs to display groups (Type, Brand, Country, Value, Years, etc.).

Tile Sorting

Sorting functions for vehicle selector tiles by various criteria.

On this page

OverviewExports (M)Re-exported from submodulesInternalsPath HandlersallModelsconfigsForBrandSubModelOrModelconfigToTiletilesModule InstanceHow It WorksLua ExamplesHooksAdditional ExportsSee Also