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

ConvertUnit (Flowgraph Node)

- **Node Name:** `ConvertUnit`

Overview

  • Node Name: ConvertUnit
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/ui/convertUnit.lua

Converts a numeric value to the user's preferred unit system (metric/imperial) for distance or velocity.

Pin Schema

Input Pins

PinTypeDefaultDescription
valuenumber-Value to convert (in SI units - meters or m/s)
velocityboolfalse(Hidden) Use velocity conversion instead of distance
bigboolfalse(Hidden) Use large units (km/mi/h instead of m/ft/s)
formatstring"%0.2f%s"(Hidden) Format string for the full output

Output Pins

PinTypeDescription
valuenumberConverted numeric value
unitstringUnit label (e.g., "km/h", "mph", "m", "ft")
fullstring(Hidden) Formatted string combining value and unit

How It Works

  1. work() - Selects translateVelocity or translateDistance based on the velocity flag.
  2. Calls the translation function with the input value and big flag.
  3. Outputs the converted value, unit string, and optionally a formatted string.
  4. The full pin is only computed if it's connected (performance optimization via :isUsed()).

Key Dependencies

  • translateVelocity(value, big) - converts m/s to user's preferred velocity unit
  • translateDistance(value, big) - converts meters to user's preferred distance unit

Example Usage

-- Convert 30 m/s to user preference:
-- velocity=true, big=false → e.g., 108.00 km/h or 67.11 mph
local value, unit = translateVelocity(30, false)

-- Convert 1500m to large units:
-- velocity=false, big=true → e.g., 1.50 km or 0.93 mi
local value, unit = translateDistance(1500, true)

See Also

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

Context Translation (Flowgraph Node)

- **Node Name:** `Context Translation`

Set UI Timer / Corner Timer (Flowgraph Node)

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

On this page

OverviewPin SchemaInput PinsOutput PinsHow It WorksKey DependenciesExample UsageSee Also