RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Medal / Auto Medal (Flowgraph Node)Clear Messages (Flowgraph Node)Context Translation (Flowgraph Node)ConvertUnit (Flowgraph Node)Set UI Timer / Corner Timer (Flowgraph Node)Custom Button TEST (Flowgraph Node)Custom UI Layout (Flowgraph Node)End Screen (Flowgraph Node)End Stats (Flowgraph Node)Fade From Black (Flowgraph Node)Fade Sequence (Flowgraph Node)Fade To Black (Flowgraph Node)Flash Message (Flowgraph Node)Generic Mission Text (Flowgraph Node)Get Gamestate (Flowgraph Node)Show Editor (Flowgraph Node)Hide Game UI (Flowgraph Node)Message (Flowgraph Node)Mission End Screen (Flowgraph Node)Popup (Flowgraph Node)Monologue (Flowgraph Node)Multi Description (Flowgraph Node)On Bigmap Poi (Flowgraph Node)On Bigmap State Change (Flowgraph Node)Set UI Race Checkpoints (Flowgraph Node)Set UI Race Laps (Flowgraph Node)Set UI Race Recovery (Flowgraph Node)RT Message (Flowgraph Node)Select Buttons (Flowgraph Node)Set UI Layout (Flowgraph Node)Show Apps (Flowgraph Node)Show Monitor (Flowgraph Node)Start Screen (Flowgraph Node)Clear Goals (Flowgraph Node)Tasklist Message (Flowgraph Node)Tasklist Task (Flowgraph Node)Three Element Select (Flowgraph Node)Vehicle Selector (Flowgraph Node)

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 Extensionsflowgraphnodesui

Mission End Screen (Flowgraph Node)

- **Node Name:** `Mission End Screen`

Overview

  • Node Name: Mission End Screen
  • Category: once_instant
  • File: extensions/flowgraph/nodes/ui/missionEndScreen.lua

Shows the end screen of a scenario/mission with customizable buttons, progress data, and leaderboard information. Supports retry, continue, and user-defined custom buttons.

Pin Schema

Input Pins

PinTypeHiddenDescription
textstring / tablenoSubtext of the menu (string or multiDescription table)
failedboolyesWhether the player failed
changetablenoAggregate attempt change data (from attempt node)
progressKeystringnoKey for the attempt progress
customBtnsFirstboolyesIf true, custom buttons appear before default buttons

Output Pins

PinTypeDescription
retryflowFires when the player pressed "Retry"
contStartflowFires when the player pressed "Continue at mission Start"
contHereflowFires when the player pressed "Continue Here"
(dynamic)flowCustom button outputs (added via editor)

Node Data

FieldDefaultDescription
includeRetryButtontrueWhether to show the Retry button
includeScenarioButton-Whether to show a Scenarios button

Internals

FieldPurpose
self.openWhether the end screen is currently displayed
self.optionsArray of custom button names
self.oldOptionsPrevious button names for pin management

How It Works

  1. workOnce() - Calls openDialogue() to display the end screen.
  2. openDialogue() - Builds the end screen data:
    • Creates default buttons: Retry, Continue at Start, Continue Here, and optionally next-mission buttons.
    • Creates custom buttons from self.options (added via the editor UI).
    • Orders buttons based on customBtnsFirst pin.
    • Builds statsData with fail/pass state and text content.
    • If change pin has data, builds missionData with leaderboard keys, formatted progress, and star data.
    • Triggers guihooks.trigger('ChangeState', {state = 'scenario-end', params = endData}).
  3. buttonPushed(action) - Called from UI via Lua command string. Sets the matching output flow pin and closes the dialogue.
  4. closeDialogue() - Triggers ChangeState back to 'play' mode.
  5. drawCustomProperties() - Editor UI for adding/removing/renaming custom buttons.
  6. updateButtons() - Dynamically creates/removes pins for custom buttons while preserving existing links.

Special Cases

  • Tutorial mode: If the linear tutorial is incomplete, only the "Continue Here" button is shown.
  • Career mode: "Continue Here" only available when using player's own vehicle or career is inactive.
  • Scenario mode: Shows "Scenarios" button instead of "Continue at Start".
  • onResetGameplay() - Auto-triggers retry if the end screen is open and retry is enabled.

Lua Code Example

-- The end screen is triggered via guihooks:
guihooks.trigger('ChangeState', {
  state = 'scenario-end',
  params = {
    missionData = { ... },
    stats = {
      overall = { failed = false, medal = "none" },
      buttons = {
        { label = 'ui.common.retry', cmd = '...', focus = true, active = true },
        { label = 'missions.missions.general.end.continueHere', cmd = '...' },
      },
      title = "",
      text = "You completed the mission!",
    }
  }
})

Serialization

  • _onSerialize() - Saves options (custom button names).
  • _onDeserialized() - Restores options and rebuilds dynamic pins.

Key Dependencies

  • guihooks.trigger('ChangeState', ...) - State transition to scenario-end screen
  • gameplay_missions_progress - Leaderboard and progress formatting
  • gameplay_missions_missions - Mission lookup for next-mission buttons
  • career_career - Career state checks
  • career_modules_linearTutorial - Tutorial state checks

Previously Undocumented (Added by Audit)

  • C:getCmd(action) - Function handling getCmd logic
  • Input Pin: _active (any)
  • Input Pin: timeStr (any)

See Also

  • Medal / Auto Medal (Flowgraph Node) - Related reference
  • Clear Messages (Flowgraph Node) - Related reference
  • Context Translation (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Message (Flowgraph Node)

- **Node Name:** `Message`

Popup (Flowgraph Node)

- **Node Name:** `Popup`

On this page

OverviewPin SchemaInput PinsOutput PinsNode DataInternalsHow It WorksSpecial CasesLua Code ExampleSerializationKey DependenciesPreviously Undocumented (Added by Audit)See Also