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
Career BranchesCareer System CoreCareer Save System
Career Computer MenuCareer Fuel SystemInspect VehicleVehicle InventoryLinear TutorialLoaner VehiclesCareer LogLogbookMarketplaceMission WrapperCareer Painting ModuleCareer Part Inventory ModuleCareer Part Shopping ModuleCareer Payment ModuleCareer Permissions ModuleCareer Playbook Writer ModuleCareer Player Abstract ModuleCareer Player Attributes ModuleCareer Player Driving ModuleCareer Quick Travel ModuleCareer Rentals ModuleCareer Reputation ModuleCareer Spawn Points ModuleCareer Speed Traps ModuleCareer Test Drive ModuleCareer Tether ModuleCareer Tuning ModuleCareer UI Utils ModuleCareer Unlock Flags ModuleCareer Value Calculator ModuleVehicle Class GroupingVehicle Deletion ServiceVehicle PerformanceVehicle Shopping

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 Extensionscareermodules

Career Tether Module

Spatial boundary system that triggers callbacks when the player leaves defined areas. Supports box, sphere, capsule, and vehicle-tracking tether shapes. Used by part shopping, tuning, and other garage

Spatial boundary system that triggers callbacks when the player leaves defined areas. Supports box, sphere, capsule, and vehicle-tracking tether shapes. Used by part shopping, tuning, and other garage interactions to cancel sessions when the player walks away.


Public API

FunctionSignatureDescription
M.startBoxTether(p1, x1, y1, z1, callback, data) → tetherCreates an OBB tether centered at p1 with axis half-extents
M.startSphereTether(p1, r1, callback, data) → tetherCreates a sphere tether at p1 with radius r1
M.startDoorTether(door, bufferLength, callback, data) → tetherCreates a box tether from a scene door object + buffer
M.startCapsuleTetherBetweenStatics(p1, r1, p2, r2, callback, data) → tetherCapsule between two static points with independent radii
M.startCapsuleTetherBetweenStaticAndVehicle(p1, r1, vehId, r2, callback, data) → tetherCapsule from static point to a vehicle (dynamic p2)
M.startVehicleTether(vehId, radius, inverse, callback) → tetherSphere around a vehicle; inverse=true triggers on approach
M.addTether(t)Manually registers a custom tether object
M.removeTether(t)Removes a tether from the active list
M.drawAxisBox(corner, x, y, z, clr)Debug visualization: draws a solid axis-aligned box

Tether Object Structure

tether = {
  checkfun = checkSphereTether,  -- function(t) → bool (true = broken)
  p1       = vec3(...),          -- primary position
  r1       = 10,                 -- primary radius
  p2       = vec3(...),          -- secondary position (capsule)
  r2       = 5,                  -- secondary radius (capsule)
  vehId    = 123,                -- vehicle ID (vehicle tethers)
  inverse  = false,              -- trigger on enter instead of exit
  callback = function(t) end,   -- called when tether breaks
  data     = {},                 -- user data
  remove   = false,              -- set true to remove next frame
}

Shape Types

ShapeBreak Condition
BoxPlayer outside OBB defined by center + 3 axis vectors
SpherePlayer distance > radius from center
CapsulePlayer distance > interpolated radius along line segment
VehiclePlayer distance > radius from vehicle (or < if inverse)

Update Behavior

  • onUpdate is dynamically hooked/unhooked via extensions.hookUpdate - only runs when tethers exist
  • Broken tethers are cleaned up from the back of the list each frame
  • Set tether.remove = true to manually remove without triggering callback

Usage Example

-- Create a capsule tether for part shopping
local tether = career_modules_tether.startCapsuleTetherBetweenStatics(
  computerPos, 10,      -- computer end, 10m radius
  vehiclePos, 8,        -- vehicle end, 8m radius
  function(t) career_modules_partShopping.cancelShopping() end
)

-- Remove tether when done
tether.remove = true

Debug Mode

Set drawDebug = true in source to visualize all tethers with spheres, lines, and distance labels.


See Also

  • partShopping - Uses capsule tether for shopping boundary
  • tuning - Uses capsule tether for tuning boundary

Additional Exports

Values/Properties

ExportDescription
M.onUpdateValue: nil
M.onUpdateValue: onUpdate
M.onUpdateValue: nop

Career Test Drive Module

Manages test drive sessions from vehicle dealerships. Handles time limits, distance tethering, vehicle teleport-back on completion, abandon fees, and POI markers for return points.

Career Tuning Module

M.dependencies = {"career_career"}

On this page

Public APITether Object StructureShape TypesUpdate BehaviorUsage ExampleDebug ModeSee AlsoAdditional ExportsValues/Properties