API ReferenceGE ExtensionsuivehicleSelector
Tile Grouping
Assigns vehicle configs to display groups (Type, Brand, Country, Value, Years, etc.).
Assigns vehicle configs to display groups (Type, Brand, Country, Value, Years, etc.).
Overview
ui_vehicleSelector_tileGrouping determines which visual group(s) a vehicle config belongs to in the selector grid. Supports categorical groups (Type, Brand, Country, etc.) and range-based groups (Years, Value). Also inserts configs into special Favourites/Recent groups.
Extension path: lua/ge/extensions/ui/vehicleSelector/tileGrouping.lua
Exports (M)
| Function | Signature | Description |
|---|---|---|
getGroupsForConfig | (config, groupMode, displayData) → group[] | Returns groups a config belongs to. |
isRangeGroupMode | (groupMode) → bool | Whether this group mode uses range buckets. |
getGroupModeFunction | (groupMode) → fn | Returns the grouping function. |
getRangeGroupingFunction | (groupMode) → fn | Returns the range bucketing function. |
getConfigOrModelPropValue | (config, prop) → value | Gets property from config, falling back to model. |
Data Fields
| Field | Description |
|---|---|
M.groupModeFunctions | Table mapping group mode names to their grouping functions. |
Internals
Type Ordering
Car → "Cars and Trucks" (10)
Truck → "Cars and Trucks" (20)
Heavy Machinery → "Heavy Machinery" (30)
Trailer → "Trailers" (80)
Prop → "Props" (90)Group Mode Functions
| Mode | Groups By |
|---|---|
Type | Vehicle type → merged category name |
Brand | Brand name |
Country | Country of origin |
Config Type | Factory / Race / Drift / etc. |
Derby Class | Derby class |
Body Style | Body style |
Source | Content source |
Range Groups
| Mode | Buckets |
|---|---|
Years | Decade-based: "1990s", "2000s", etc. |
Value | Price tiers: "$0-$10k", "$10k-$20k", ..., "$1M+" |
Special Groups
If favourites/recent display is enabled, configs are also added to Favourites (order -1) and Recent (order -2) groups.
How It Works
getGroupsForConfigreads the relevant property from the config (or model fallback).- For categorical modes, calls the group function to get a
{groupName, groupOrder}. - For range modes, calls the range function to get one or more bucket groups.
- Appends Favourites/Recent groups if the config qualifies and display settings allow it.
Lua Examples
local tileGrouping = require('/lua/ge/extensions/ui/vehicleSelector/tileGrouping')
-- Get groups for a config
local groups = tileGrouping.getGroupsForConfig(config, "Type", displayData)
-- → {{groupName = "Cars and Trucks", groupOrder = 10}}
-- Check if a mode is range-based
local isRange = tileGrouping.isRangeGroupMode("Value") -- trueAdditional Exports
The following exports are available but not yet documented in detail:
M.getConfigOrModelPropValueM.getGroupModeFunctionM.getGroupsForConfigM.getRangeGroupingFunctionM.isRangeM.isRangeGroupMode
See Also
- Vehicle Selector – Details Interaction - Related reference
- Vehicle Selector – General - Related reference
- Vehicle Selector – Tile Clustering - Related reference
- UI System Guide - Guide