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
Drift Zone BoundsDrift Race PathDrift UI DisplayDrift Detection EngineDrift SystemDrift Quick MessagesDrift Save/LoadDrift ScoreboardDrift Scoring SystemDrift AudioDrift StallingDrift StatisticsDrift Stunt Zones

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 Extensionsgameplaydrift

Drift Stalling

Reference for `gameplay_drift_stallingSystem`, which penalizes repetitive drift behavior by reducing the score multiplier when the player repeats the same stunts without variety.

Reference for gameplay_drift_stallingSystem, which penalizes repetitive drift behavior by reducing the score multiplier when the player repeats the same stunts without variety.


Dependencies

gameplay_drift_general


Overview

Tracks a history of all player stunts (drifts and stunt zones). Calculates a stalling value (0.5–1.0) based on how varied the recent history is. Repeating the same stunt type reduces the multiplier; mixing different stunts keeps it high.


Stalling Options (gymkhana defaults)

OptionValue
minStallingValue0.5
maxStallingValue1.0
historyLength10
Drift: posStallingWeight0.35
Drift: negStallingWeight0.15
Drift: maxRepetitions5
StuntZone: posStallingWeight1.0
StuntZone: negStallingWeight0.6
StuntZone: maxRepetitions1

Exports

FunctionSignatureDescription
reset()Clears history and resets stalling value to 1
calculateScore(score)Returns score * stallingValue
processStuntZone(stuntZoneId)Records a stunt zone completion in history and recalculates
getDriftDebugInfo()Returns {default=true, canBeChanged=true} for debug toggle
onDriftStatusChanged(isDrifting)When drifting starts, records a drift entry (stuntId=0) in history
onUpdate()Runs imgui debug panel
M.calculateScore(score)-
M.dependenciesvalue-
M.getDriftDebugInfo()-
M.onDriftStatusChanged(isDrifting)-
M.onUpdate()-
M.processStuntZone(stuntZoneId)-
M.reset()-

Key Behaviors

  • Switching between different stunt types increases the score; repeating the same one penalizes
  • The algorithm uses a sliding window of the last historyLength entries
  • Negative weight is applied when a stunt exceeds maxRepetitions within a buffer
  • Score multiplier is clamped between minStallingValue and maxStallingValue

See Also

  • drift/bounds - Drift Zone Boundary Detection - Related reference
  • drift/destination - Race Path & Wrong-Way Detection - Related reference
  • drift/display - Drift UI & HUD Management - Related reference
  • Gameplay Systems Guide - Guide

Drift Audio

Reference for `gameplay_drift_sounds`, which manages all audio feedback for the drift system including continuous drift sounds, tier/combo sounds, and crash/spinout audio cues.

Drift Statistics

Reference for `gameplay_drift_statistics`, which records drift performance metrics into the persistent statistics system (`gameplay_statistic`).

On this page

DependenciesOverviewStalling Options (gymkhana defaults)ExportsKey BehaviorsSee Also