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
Vehicle Selector – Details InteractionVehicle Selector – GeneralVehicle Selector – Tile ClusteringVehicle Selector – Tile GroupingVehicle Selector – TilesVehicle Selector – Tile SortingVehicle Selector – Vehicle OperationsVehicle Selector – Vehicle 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

Vehicle Selector – Tile Clustering

Groups vehicle configurations into clustered tiles by brand/model or model key.

Groups vehicle configurations into clustered tiles by brand/model or model key.


Overview

ui_vehicleSelector_tileClustering handles clustering individual vehicle configs into visual tiles for the vehicle selector grid. Supports two modes: brandSubModelOrModel (groups by brand + submodel) and model (groups by model key). Also computes favourite/recent stats and source icons for each cluster.

Extension path: lua/ge/extensions/ui/vehicleSelector/tileClustering.lua


Exports (M)

FunctionSignatureDescription
clusterItems(configs, clusterMode) → tableGroups configs into clusters keyed by cluster label.
createTileFromClusteredItems(clusteredItems, group, clusterMode) → tileCreates a UI tile from a cluster.
getClusterModeFunction(clusterMode) → fnReturns the clustering key function.
getClusteredItemsFavouriteIconPercent(clusteredItems) → ...Returns favourite/recent stats for a cluster.
getClusteredItemsStats(clusteredItems, sortMode) → preview, model, config, lastReturns preview image and representative config.
getSources(config, model, onlyIcons) → string[]Returns source labels/icons for a config.

Internals

Cluster Modes

ModeKey Function
brandSubModelOrModelBrand + " " + SubModel (falls back to model key)
modelconfig.model_key

clusterItems

Returns { [clusterLabel] = { configsByKey, count, list, years, value } }.

Tile Creation

Both createTileFromBrandSubModelOrModel and createTileFromModel produce tiles with:

  • key, name, preview, subElementCount
  • favouriteIdx, recentIdx, showFavouriteIconPercent
  • gotoPath - navigation path for drilling into configs
  • doubleClickDetails - model/config for double-click action
  • Performance stats: Value, Weight, Top Speed, Power, 0-60 mph, etc.
  • sourceIcons - array of {icon} or {svg} objects
  • isAuxiliary - true only if all configs in cluster are auxiliary

Source Icons

getSources returns icons based on:

  • BeamNG - Official → "beamNG"
  • Custom → "wrench"
  • Automation type → SVG path
  • Has modID → "puzzleModule"
  • Missing JBeam → "danger"

How It Works

  1. clusterItems groups configs by the chosen mode function.
  2. For each cluster, createTileFromClusteredItems builds a tile with preview, stats, and source icons.
  3. The tile's gotoPath allows the UI to navigate into the cluster's configs.
  4. Favourite/recent stats determine star icons and sorting priority.

Lua Examples

local tileClustering = require('/lua/ge/extensions/ui/vehicleSelector/tileClustering')

-- Cluster configs by brand+submodel
local clusters = tileClustering.clusterItems(configList, "brandSubModelOrModel")

-- Create a tile from a cluster
for label, cluster in pairs(clusters) do
  local tile = tileClustering.createTileFromClusteredItems(cluster, group, "brandSubModelOrModel")
end

Additional Exports

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

  • M.clusterItems
  • M.createTileFromClusteredItems
  • M.getClusterModeFunction
  • M.getClusteredItemsFavouriteIconPercent
  • M.getClusteredItemsStats
  • M.getSources

Vehicle Selector – General

Central hub for the vehicle selector: data initialization, filtering, display settings, favourites, and opening modes.

Vehicle Selector – Tile Grouping

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

On this page

OverviewExports (M)InternalsCluster ModesclusterItemsTile CreationSource IconsHow It WorksLua ExamplesAdditional Exports