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
General MilestonesMilestones Core
Branch MilestonesDelivery MilestonesInsurance MilestonesMission MilestonesMoney MilestonesSpeed Trap MilestonesStatistic Milestones

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 ExtensionscareermodulesmilestonesgeneralMilestones

Speed Trap Milestones

Generates milestones for speed trap interactions: all-time speed records and total trigger counts.

Generates milestones for speed trap interactions: all-time speed records and total trigger counts.


Public API

(No directly called public functions beyond hooks)

Hook Handlers

HookPurpose
M.onGeneralMilestonesCollectGenerate speed trap milestones
M.onSpeedTrapTriggeredUpdate records, check milestone thresholds
M.onGeneralMilestoneClaimedRe-register statistic callback (assigned but references undefined registerStastisticCallback)

Generated Milestones

Velocity Record

PropertyValue
IDvelocitySpeedTrapMilestone
Label"Speeding Menace"
Steps70, 90, 120, 150, 180, 220 km/h (converted to m/s)
IconpowerGauge05
Save datamaxVelocityReachedByPlayer

Trigger Counter

PropertyValue
IDspeedTrapTriggerCounterMilestone
Label"Serial Speeder"
Steps15, 30, 45, ... (step × 15), max 10 steps
IconpowerGauge05
Save datatriggerCount

Both use minorLinear rewards with {speedTrap=true} filter. Trigger counter also has general=true.

Disabled Milestones (in code but commented out)

  • Per-trap velocity milestones (individual speed cameras)
  • "All Traps" milestone (trigger every speed camera)
  • These await a proper speedtraps/level system

onSpeedTrapTriggered Flow

  1. Verify speed trap has a speedLimit and triggered by player vehicle
  2. Update maxVelocityReachedByPlayer if new record
  3. Loop-check velocity milestone steps
  4. Increment triggerCount, check counter milestone

See Also

  • general - Milestone collection
  • milestones - Save data and notifications

Money Milestones

Generates milestones tracking money earned and spent across various tagged categories.

Statistic Milestones

Generates milestones based on `gameplay_statistic` metrics: distance driven, playtime, rollovers, and airtime.

On this page

Public APIHook HandlersGenerated MilestonesVelocity RecordTrigger CounterDisabled Milestones (in code but commented out)onSpeedTrapTriggered FlowSee Also