RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Locations DetectorMission ManagerMissionsMission Screen UIPOI TestProgressMission Start TriggerUnlocks

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 Extensionsgameplaymissions

Mission Screen UI

Reference for `gameplay_missions_missionScreen`, which formats mission data for the UI, handles starting options (repair costs, vehicle checks), and manages the mission details screen.

Reference for gameplay_missions_missionScreen, which formats mission data for the UI, handles starting options (repair costs, vehicle checks), and manages the mission details screen.


Module Exports (M)

FunctionSignatureDescription
formatMission(m) → tableFormats a mission object for the UI with progress, stars, settings
getMissionsAtCurrentLocationFormatted() → tableReturns all interactable missions at current marker, formatted
getMissionScreenData() → tableMain entry: returns formatted data for the mission screen UI
startMissionById(id, userSettings, startingOptions)Starts a mission by ID
stopMissionById(id, force, abandonButtonPressed)Stops/abandons a mission by ID
abandonCurrentMission()Shortcut to abandon the active foreground mission
changeUserSettings(id, settings)Recalculates progress key for new user settings
requestStartingOptionsForUserSettings(id, userSettings)Async: calculates starting options (repair, fees)
getActiveStarsForUserSettings(id, userSettings) → tableReturns which stars are active for given settings
getRepairCostForStartingRepairType(type) → tableReturns repair cost: money (1000) or voucher (1)
setPreselectedMissionId(mId)Pre-selects a mission for the next screen open
setPreselectedPage(page)Pre-selects a page ("settings", etc.)
activateSoundBlur(active)Toggles audio blur effect
activateSound(soundLabel, active, pitch)Plays/stops money/xp/voucher counting sounds
openAPMChallenges(branch, skill)Opens mission menu filtered by branch/skill
navigateToMission(id)Opens big map and navigates to mission location
getMissionTiles(ids) → tableBuilds filterable/sortable grid of mission tiles
isAnyMissionActive() → boolWhether a foreground mission is running
isMissionStartOrEndScreenActive() → boolChecks if any mission start/end screen is active
showMissionRules(id?)Shows mission rules as popups
startFromWithinMission(id, settings)Starts a mission from within another (flattens settings)
openVehicleSelectorForMissionBySetting(mId, settingKey)Opens vehicle selector for a mission's custom vehicle setting

Debug / Testing

FunctionSignatureDescription
enableDebug(enable)Enables/disables ImGui debug window for mission screen history
discoverLayouts()Scans /gameplay/testing/ for saved UI layouts

Hooks / Lifecycle

FunctionDescription
onExtensionUnloadedCleanup
onClientEndMissionCleanup on level unload
onBigMapActivatedHandles delayed navigation to a mission on big map
onMissionStartScreenReadyRecords UI layout history (last 20)
onRequestMissionScreenDataServes test layout data in debug mode

Screen Data Contexts

getMissionScreenData() returns different data depending on state:

ContextWhenContents
ongoingMissionMission is activeSingle formatted mission + recovery options
availableMissionsAt a mission markerList of nearby missions + tiles + tutorial flag
emptyNo missions availableEmpty context
M.abandonCurrentMission()-
M.activateSound(soundLabel, active, pitch)-
M.activateSoundBlur(active)-
M.changeUserSettings(id, settings)-
M.debugOnUpdate(dt)-
M.dependenciesvalue-
M.discoverLayouts()-
M.enableDebug(enable)-
M.formatMission(m)-
M.getActiveStarsForUserSettings(id, userSettings)-
M.getMissionScreenData()-
M.getMissionTiles(ids)-
M.getMissionsAtCurrentLocationFormatted()-
M.getRepairCostForStartingRepairType(type)-
M.isAnyMissionActive()-
M.isMissionStartOrEndScreenActive()-
M.navigateToMission(id)-
M.onBigMapActivated()-
M.onClientEndMission(levelPath)-
M.onExtensionUnloaded()-
M.onMissionStartScreenReady(uiLayout)-
M.onRequestMissionScreenData(mode)-
M.openAPMChallenges(branch, skill)-
M.openVehicleSelectorForMissionBySetting(mId, settingKey)-
M.requestStartingOptionsForUserSettings(id, userSettings)-
M.savedLayoutsvalue-
M.setPreselectedMissionId(mId)-
M.setPreselectedPage(page)-
M.showMissionRules(id)-
M.startFromWithinMission(id, settings)-
M.startMissionById(id, userSettings, startingOptions)-
M.stopMissionById(id, force, abandonButtonPressed)-
M.testLayoutvalue-
M.uiLayoutHistoryvalue-

Starting Options Flow

requestStartingOptionsForUserSettings(id, userSettings):

  1. Checks if player uses own vehicle, custom vehicle, or provided
  2. Outside career → always defaultStartingOptions
  3. During tutorial → always defaultStartingOptions
  4. Checks entry fee affordability
  5. If walking with own vehicle required → disabled
  6. Checks vehicle certification (WIP)
  7. Async checks repair status via career_modules_inventory.updatePartConditions
  8. Returns repair options: no repair (disabled), voucher repair, money repair

How It Works

-- formatMission builds the full UI data:
local function formatMission(m)
  return {
    id = m.id, name = m.name, icon = m.iconFontIcon,
    description = m.description,
    userSettings = m:getUserSettingsData(),
    progress = m.saveData.progress,
    formattedProgress = gameplay_missions_progress.formatSaveDataForUi(m.id),
    additionalAttributes = { ... }, -- vehicle, difficulty, custom
    leaderboardKey = m.defaultLeaderboardKey or 'recent',
    gameContextUiButtons = m:getMissionScreenDataUiButtons(),
    -- + parentInfo for rally loops, leagues, etc.
  }
end

Key Behaviors

  • Repair costs: 1000 money or 1 voucher
  • User settings are cached on the mission as _lastUserSettingsOutsideOfMission
  • Star activity depends on whether user settings match defaults
  • Mission tiles support grouping by: all, missionType, branchSkill, difficulty, level, league
  • Sound objects for money/xp/voucher counting are lazily created

See Also

  • missions/locationsDetector - Nearby Mission Location Detection - Related reference
  • missions/missionManager - Mission Lifecycle Manager - Related reference
  • missions/missions - Mission Registry & Data Management - Related reference
  • Gameplay Systems Guide - Guide

Missions

Reference for `gameplay_missions_missions`, the central registry that loads, constructs, caches, and serves all missions in the game. This is the primary entry point for accessing mission objects.

POI Test

Reference for `gameplay_missions_poiTest`, a simple test/debug extension that creates POI markers from parking spots to validate the POI interaction system.

On this page

Module Exports (M)Debug / TestingHooks / LifecycleScreen Data ContextsStarting Options FlowHow It WorksKey BehaviorsSee Also