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

Set UI Layout (Flowgraph Node)

- **Node Name:** `Set UI Layout`

Overview

  • Node Name: Set UI Layout
  • Category: once_instant
  • File: extensions/flowgraph/nodes/ui/setUILayout.lua

Sets the UI app layout and game state. Controls which app layout is displayed (scenario, freeroam, quickrace, etc.) and optionally persists the layout after the flowgraph stops.

Pin Schema

Input Pins

PinTypeDefaultHiddenDescription
flowflow-noInflow
resetflow (impulse)-noResets the node to allow re-triggering
layoutstring / table (layoutData)"scenario"noLayout name (e.g. scenario, freeroam)
menustring"scenario"noMenu state name
keepLayoutbool-noIf set, layout persists after FG stops
gameStateNamestring"scenario"yesGame state name
appContainerContextstring-yesGameplay app container context to activate

Output Pins

PinTypeDescription
flowflowOutflow

Node Data

FieldDefaultDescription
useFreeroamMenuWhenUnrestrictedtrueAuto-switches to freeroam menu if scenario restrictions are off

How It Works

  1. postInit() - Populates hardcoded template options for layout, menu, and appContainerContext pins.
  2. workOnce() - Sets the game state:
    • If restrictions are off and useFreeroamMenuWhenUnrestricted is true, forces freeroam menu.
    • Calls self.mgr.modules.ui:setGameState(gameStateName, layout, menu).
    • Calls self.mgr.modules.ui:keepGameState(keepLayout) to persist if requested.
    • If appContainerContext is set, shows that app via ui_gameplayAppContainers.showApp().
  3. onClientPostStartMission() - Re-applies the game state (workaround for the game overriding state on mission start).
  4. onUiChangedState(cur, prev) - If active and the layout is quickraceScenario, triggers quick race mode and hotlapping reset on menu state.

Lua Code Example

-- What the node does internally:
self.mgr.modules.ui:setGameState("scenario", "scenario", "scenario")
self.mgr.modules.ui:keepGameState(false)

-- Optionally show a specific app container:
ui_gameplayAppContainers.showApp('gameplayApps', 'someAppId')

Key Dependencies

  • self.mgr.modules.ui:setGameState() - Flowgraph UI module for game state management
  • self.mgr.modules.ui:keepGameState() - Persist layout beyond FG lifetime
  • ui_gameplayAppContainers.showApp() - App container visibility
  • settings.getValue('restrictScenarios') - Scenario restriction check

See Also

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

Select Buttons (Flowgraph Node)

- **Node Name:** `Select Buttons`

Show Apps (Flowgraph Node)

- **Node Name:** `Show Apps`

On this page

OverviewPin SchemaInput PinsOutput PinsNode DataHow It WorksLua Code ExampleKey DependenciesSee Also