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
Minimap Additional InfoMinimap LayersMinimap RendererMinimap 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

See Also

  • Minimap Additional Info - Related reference
  • Minimap (Main) - Related reference
  • Minimap Roads - Related reference
  • UI System Guide - Guide

Minimap Additional Info

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

Minimap Renderer

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

On this page

OverviewLayer ConstantsHow It WorksAdditional ExportsSee Also