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
Minimap Additional InfoMinimap LayersMinimap (Main)Minimap RoadsMinimap RouteMinimap Topographic MapMinimap UtilitiesMinimap Vehicles

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 Extensionsuiappsminimap

Minimap Layers

Z-order layer constants for minimap draw primitives.

Z-order layer constants for minimap draw primitives.


Overview

ui_apps_minimap_layers defines numeric layer constants that control the draw order of minimap elements. Lower values render first (bottom); higher values render on top.

Module path: lua/ge/extensions/ui/apps/minimap/layers.lua
Usage: local layers = require("ui/apps/minimap/layers")


Layer Constants

ConstantValueDescription
BACKGROUND0Background fill
BG_GRID10Background grid lines
ROADS_BG20Road segment outlines (dark stroke)
ROADS_FG30Road segment fills (colored)
ROUTE_BG40Navigation route outline (white)
ROUTE_FG50Navigation route fill (blue)
GAMEPLAY_MARKERS60Mission/playmode markers
VEHICLES_OTHER70Non-player vehicles
VEHICLES_POLICE80Police vehicles
VEHICLES_USABLE90Switchable/usable vehicles
VEHICLE_PLAYER100Player vehicle (always on top of others)
ROUND_OR_SQUARE_MASK110Circle/rect occlusion mask
COMPASS120North compass indicator
ROUTE_POINTER130Off-screen route direction pointer
GAMEPLAY_POINTER140Off-screen gameplay marker pointer
DEBUG150Debug overlays (topmost)

How It Works

All minimap draw calls pass a layer value as the last argument to TextureDrawPrimitive methods (td:circle, td:line, td:triangle, etc.). The engine sorts primitives by layer before rendering.

local layers = require("ui/apps/minimap/layers")

-- Road background drawn at layer 20, foreground at 30
td:lineRoundEnd(x1, y1, x2, y2, w, w, 0, bgColor, bgColor, 0, 0, 0, layers.ROADS_BG)
td:lineRoundEnd(x1, y1, x2, y2, w, w, 0, fgColor, fgColor, 0, 0, 0, layers.ROADS_FG)

This ensures consistent visual layering regardless of draw call order in code.

Additional Exports

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

  • M.BACKGROUND
  • M.BG_GRID
  • M.COMPASS
  • M.DEBUG
  • M.GAMEPLAY_MARKERS
  • M.GAMEPLAY_POINTER
  • M.ROADS_BG
  • M.ROADS_FG
  • M.ROUND_OR_SQUARE_MASK
  • M.ROUTE_BG
  • M.ROUTE_FG
  • M.ROUTE_POINTER
  • M.VEHICLES_OTHER
  • M.VEHICLES_POLICE
  • M.VEHICLES_USABLE
  • M.VEHICLE_PLAYER

Minimap Additional Info

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

Minimap (Main)

Main minimap renderer - manages the ImGui window, camera transforms, and orchestrates all minimap sub-modules.

On this page

OverviewLayer ConstantsHow It WorksAdditional Exports