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

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 Extensionsui

Mission Info

Manages mission info dialogues and activity accept popups in the UI.

Manages mission info dialogues and activity accept popups in the UI.


Overview

ui_missionInfo handles opening/closing mission information dialogues and activity accept screens. It stores button callback tables, dispatches actions by name or index, and pushes/pops the MissionUIActionMap for input handling.

Extension path: lua/ge/extensions/ui/missionInfo.lua


Exports (M)

FunctionSignatureDescription
openDialogue(content)Opens a mission info dialogue with optional buttons.
closeDialogue()Closes the dialogue, pops action map.
performAction(actionName)Executes a button's cmd by matching action name.
openActivityAcceptDialogue(content)Opens the activity accept UI with multiple elements.
performActivityAction(id)Calls the button function at the given index.
setActivityIndexVisible(index)Fires onActivityIndexVisible with element data.

Internals

State

  • M.buttonsTable - Array of {action, cmd} for mission dialogues, or indexed callbacks for activities.
  • M.openState - Tracks "opened" / "closed" for onMissionInfoChangedState hook.

openDialogue Flow

  1. Optionally pushes MissionUIActionMap (unless content.actionMap == false).
  2. Stores content.buttons in M.buttonsTable.
  3. Triggers MissionInfoUpdate with content.
  4. Plays event:>UI>Missions>Info_Open.

openActivityAcceptDialogue Flow

  1. Fires onActivityAcceptUpdate extension hook and ActivityAcceptUpdate guihook.
  2. Updates M.openState and fires onMissionInfoChangedState.

closeDialogue Flow

  1. Pops MissionUIActionMap.
  2. Clears buttonsTable.
  3. Triggers MissionInfoUpdate(nil) and ActivityAcceptClose(nil).
  4. Updates M.openState to "closed".

How It Works

  1. A mission or activity calls openDialogue or openActivityAcceptDialogue with content.
  2. The UI renders the dialogue; user clicks a button.
  3. UI calls performAction(actionName) which finds the matching button and runs loadstring(button.cmd)().
  4. When dismissed, closeDialogue cleans up input maps and triggers close events.

Lua Examples

-- Open a simple mission info dialogue
extensions.ui_missionInfo.openDialogue({
  title = "Delivery Mission",
  text = "Deliver the package to the destination.",
  buttons = {
    { action = "accept", cmd = "print('accepted')" },
    { action = "decline", cmd = "print('declined')" },
  }
})

-- Close the dialogue
extensions.ui_missionInfo.closeDialogue()

Hooks

HookPayloadWhen
MissionInfoUpdate (guihook)content or nilDialogue opened/closed
ActivityAcceptUpdate (guihook)content arrayActivity accept opened
ActivityAcceptClose (guihook)nilDialogue closed
onActivityAcceptUpdate (ext)contentActivity accept opened
onMissionInfoChangedState (ext)(oldState, newState, content?)Open/close state changes
onActivityIndexVisible (ext)element data or nilActivity index selection changes

Additional Exports

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

  • M.closeDialogue
  • M.elemDataTable
  • M.openActivityAcceptDialogue
  • M.openDialogue
  • M.performAction
  • M.performActivityAction
  • M.setActivityIndexVisible

Messages/Tasks App Containers

Manages visibility of UI apps (messages, tasks) within named containers.

Police Info

Sends police pursuit data to the UI HUD every frame.

On this page

OverviewExports (M)InternalsStateopenDialogue FlowopenActivityAcceptDialogue FlowcloseDialogue FlowHow It WorksLua ExamplesHooksAdditional Exports