API ReferenceGE ExtensionsuigameplaySelectortileGenerators
Mission Tiles Generator
Tile generator for mission/challenge entries in the gameplay selector grid.
Tile generator for mission/challenge entries in the gameplay selector grid.
Overview
ui_gameplaySelector_tileGenerators_missionTiles provides tiles and detail panels for gameplay missions (the "Challenges" system). Missions are loaded from gameplay_missions_missions and include support for career-only content filtering.
Extension path: lua/ge/extensions/ui/gameplaySelector/tileGenerators/missionTiles.lua
Exports (M)
| Hook Handler | Signature | Description |
|---|---|---|
onGameplaySelectorGetTiles | (items, backend) | Adds mission tiles to the items list. |
onGameplaySelectorGetDetails | (itemDetails, details, buttonInstance, backend) | Detail panel with mission specs and start button. |
Internals
Tile Structure
{
name = translate(mission.name),
system = "Challenges",
type = translate(mission.missionTypeLabel), -- e.g. "Drift Zone", "Time Trial"
level = translate(core_levels.getLevelTitle(mission.startTrigger.level)),
isCareerOnly = true/false, -- career-only missions can be filtered
key = "mission_<missionId>",
sourceIcons = {}, -- beamNG, bug, cup (career-only)
validBackends = {gameplaySelector = true},
}Career-Only Filtering
Missions with careerSetup.showInCareer = true and showInFreeroam = false are flagged as isCareerOnly. The gameplay selector respects the showCareerContent display option.
Detail Panel Specifications
Two specification groups:
- General: mission type, difficulty, vehicle, author, date, map, custom attributes
- Career: skill/branch info, career-only availability notice
Tags
- Official (beamNG icon)
- Auxiliary/dev mission (bug icon)
- Career Only (cup icon)
- Mod info (puzzle icon)
- Mission type label
Start Button
buttonInstance.addButton(function()
backend.trackRecent(itemDetails.key)
gameplay_missions_missionManager.startWithLoadingLevel(mission)
end, {
label = "Start Mission",
primary = true,
isDoubleClickAction = true,
waitForLoadingScreen = true,
})How It Works
- Hook collects all missions from
gameplay_missions_missions.get() - Each mission is mapped to a tile with type/level/system metadata
- Career-only missions get a
cupsource icon andisCareerOnlyflag - Detail panel generates specifications from mission attributes
- "Start Mission" button launches with level loading via
startWithLoadingLevel
Additional Exports
The following exports are available but not yet documented in detail:
M.onGameplaySelectorGetDetailsM.onGameplaySelectorGetTiles