RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Rally Audio ManagerRally Camera Path PlayerRally ClientRally Cut CaptureRally EnumsRally Extension HelperRally GeometryRally ManagerRecce ManagerRecce AppRecce SettingsRally Settings ManagerSnap-to-RoadTraffic Exclusion ZonesRally UtilityRally Vehicle CaptureRally Vehicle Tracker

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 Extensionsgameplayrally

Traffic Exclusion Zones

Creates traffic exclusion zones around rally stage infrastructure (start positions, pathnodes) to prevent AI traffic from interfering with rally routes. Zones are applied to the navgraph via `map.setT

Creates traffic exclusion zones around rally stage infrastructure (start positions, pathnodes) to prevent AI traffic from interfering with rally routes. Zones are applied to the navgraph via map.setTrafficExclusionZones().


Exports

FunctionSignatureReturnsDescription
M.createZones(missions)table[]Creates exclusion zones for given missions (or current editor mission)

How It Works

Zone Creation

Each zone is a sphere defined by {pos = vec3, radius = 10}.

For rallyStage missions:

  • Zones at every start position
  • Zones at every pathnode (full route coverage)

For rallyRoadSection missions:

  • Zones at every start position only

Mission Resolution

If no missions are provided:

  1. Falls back to current mission from editor_rallyEditor.getMissionId()
  2. Looks up mission data via gameplay_missions_missions.getMissionById()
  3. Unsupported mission types are logged and skipped

Race Path Loading

Loads race.race.json from the mission folder, deserializes via the race path module to access start positions and pathnodes.

Integration with DevTools

Called from the rally DevTools panel:

local TrafficExclusion = require('/lua/ge/extensions/gameplay/rally/trafficExclusion')

-- Create zones from specific missions
local missions = { gameplay_missions_missions.getMissionById("rally_stage_01") }
local zones = TrafficExclusion.createZones(missions)

-- Apply to navgraph
map.setTrafficExclusionZones(zones)
map.reset()  -- Reloads navgraph with zones applied

Zone Structure

-- Each zone in the returned array
{
  pos = vec3(1500, 1600, 140),
  radius = 10  -- default radius in meters
}

See Also

  • Rally Audio Manager - Related reference
  • Rally Camera Path Player - Related reference
  • Rally Client - Related reference
  • Gameplay Systems Guide - Guide

Snap-to-Road

Provides snap-to-road functionality in the world editor's rally editor. Wraps a driveline (linked list of points) with spatial queries, point partitioning, filtering, camera path playback, and debug v

Rally Utility

Central utility module for the rally system. Provides constants, file path helpers, mission detection, notebook loading, corner call classification, string utilities, vehicle geometry helpers, and tim

On this page

ExportsHow It WorksZone CreationMission ResolutionRace Path LoadingIntegration with DevToolsZone StructureSee Also