RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Ambient SoundUI Apps ManagerUI AudioBindings LegendCamera Distance AppDeveloper ConsoleCredits MusicExternal WebSocket ServerFade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsNavigation Map DataVehicle 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

Points Bar App

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

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


Overview

ui_apps_pointsBar provides a simple API for gameplay systems to display a points progress bar with multiple star/medal thresholds. Data is streamed to the UI via guihooks.queueStream('pointsBar').

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


Exports (M)

FunctionSignatureDescription
setPoints(points, pointsLabel?)Updates the current point value and optional display label.
setThresholds(thresholds)Sets the threshold array (e.g., {100, 200, 300} for bronze/silver/gold).
clearData()Resets to default thresholds and zero points.
requestAllData()Re-sends current state to the UI (e.g., after app reconnect).
onInit()Hook - sets extension unload mode to manual.
onUpdate()Per-frame update hook.

Internals

Data Flow

When setPoints() or setThresholds() is called, a guiData table is computed and streamed:

guiData = {
  fillPercent = points / maxValue,           -- 0-1 bar fill
  pointsLabel = "250",                       -- Display text
  thresholdsReached = {true, true, false},   -- Which thresholds are met
  thresholdPercentages = {30.3, 60.6, 90.9}, -- Threshold positions as % of bar
  thresholdCount = 3                         -- Number of thresholds
}
guihooks.queueStream('pointsBar', guiData)

The max value is lastThreshold * 1.1 (10% buffer beyond the highest threshold).

Default State

pointsData = {
  currentPoints = 0,
  pointsLabel = "0",
  thresholds = {100, 200, 300}
}

Debug Mode

When debug = true, an ImGui window shows current points and thresholds with a clear button.


How It Works

  1. Gameplay system calls setThresholds({100, 200, 300}) to configure medal levels
  2. During gameplay, calls setPoints(currentScore) each update
  3. Module computes fill percent, threshold positions, and which thresholds are reached
  4. Data is streamed to UI which renders a progress bar with threshold markers
  5. clearData() resets everything when the activity ends

Additional Exports

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

  • M.clearData
  • M.onInit
  • M.onUpdate
  • M.requestAllData
  • M.setPoints
  • M.setThresholds

See Also

  • Generic Mission Data App - Related reference
  • UI System Guide - Guide

Generic Mission Data App

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

Minimap Additional Info

Streams supplementary info (distance to target, location name, police status) alongside the minimap.

On this page

OverviewExports (M)InternalsData FlowDefault StateDebug ModeHow It WorksAdditional ExportsSee Also