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
Generic Mission Data AppPoints Bar App

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 Extensionsuiapps

Generic Mission Data App

HUD element for displaying categorized mission data (timers, messages, scores) during gameplay.

HUD element for displaying categorized mission data (timers, messages, scores) during gameplay.


Overview

ui_apps_genericMissionData provides a simple interface for gameplay systems to display ordered data elements on the HUD. Elements are categorized, ordered, and sent to the UI via guihooks.trigger('SetGenericMissionData').

Extension path: lua/ge/extensions/ui/apps/genericMissionData.lua
Unload mode: Manual


Exports (M)

FunctionSignatureDescription
setData(args)Add/update/clear a mission data element by category.
clearData()Clear all mission data and reset the UI.
sendAllData()Re-send all current elements to the UI (e.g., after reconnect).
onInit()Hook - sets extension unload mode to manual.
onUpdate()Per-frame update hook.

Internals

Data Structure

Mission data is stored in two tables:

  • missionData.elements - Keyed by category string, each holding {title, txt, order, style, minutes, seconds, milliseconds}
  • missionData.displayOrder - Sorted array of {category, element} for ordered rendering

setData Args

ui_apps_genericMissionData.setData({
  category = "timer",       -- Lua pattern or exact name (default: "default")
  title = "Time Left",      -- Header text
  txt = "01:30",            -- Body text
  order = -1,               -- Sort priority (lower = first, default: auto-decrement)
  style = "warning",        -- Optional CSS class
  minutes = 1,              -- Optional structured time fields
  seconds = 30,
  milliseconds = 0,
  clear = false,            -- If true, removes this category
})

Category Pattern Matching

The category field is matched as a Lua pattern against existing categories, allowing batch updates:

-- Clears all categories starting with "lap"
ui_apps_genericMissionData.setData({ category = "^lap", clear = true })

UI Communication

On data change, elements are sent individually with their display index:

guihooks.trigger('SetGenericMissionData', {
  element = item.element,
  index = i
})

Full reset sends SetGenericMissionDataResetAll.

Optimized Updates

If element order hasn't changed, only modified categories are re-sent to the UI. Full re-send only occurs when the sorted order changes.


How It Works

  1. Gameplay system calls setData() with category, text, and ordering info
  2. Element is stored/updated in missionData.elements
  3. Display order is recalculated and sorted by order field
  4. Changed elements are sent to UI via SetGenericMissionData guihook
  5. UI renders elements in order with optional styling and timer fields

Additional Exports

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

  • M.clearData
  • M.onInit
  • M.onUpdate
  • M.sendAllData
  • M.setData

UI Visibility

Controls visibility of the CEF and ImGui UI layers.

Points Bar App

HUD progress bar for displaying point-based scoring with configurable thresholds.

On this page

OverviewExports (M)InternalsData StructuresetData ArgsCategory Pattern MatchingUI CommunicationOptimized UpdatesHow It WorksAdditional Exports