Kartik Scripts

Damage System

The kartik-mechanic resource features a realistic damage system that maps vehicle impacts to specific part wear. Unlike standard GTA V damage which only affects engine and body health, this system applies mechanical wear to internal components based on the location and magnitude of the hit.


How It Works

The system listens for impact events (CEventNetworkEntityDamage) and calculates the "Damage Magnitude" based on the drop in engine and body health.

  1. Impact Threshold: Small bumps (controlled by impactThreshold in damage_config.lua) are ignored to prevent excessive wear from parking taps.
  2. Location Detection: The script analyzes the vehicle's velocity vector at the moment of impact to determine where the vehicle was hit (Front, Rear, Sides, or Bottom).
  3. Part Mapping: Each hit location is mapped to specific mechanical parts. For example, a front-end collision will damage the Radiator and Pistons, while a rear-end hit affects the Gearbox and Clutch.
  4. Class Multipliers: Different vehicle classes have varying durability. Motorcycles take more part damage per impact, while Industrial vehicles take significantly less.

Configuration

You can tune the sensitivity and mapping in shared/damage_config.lua.

Key Settings

SettingDescription
enabledToggle the entire part-damage-from-impact system.
impactThresholdMinimum health drop required to trigger part wear (Default: 15.0).
wearMultiplierGlobal scale for how much wear is applied (Default: 0.05).
classMultipliersScale damage per vehicle class (e.g., 0.5 for trucks, 2.0 for bikes).

Part Mapping Examples

Hit LocationPrimary Parts Affected
FrontRadiator, Pistons, Spark Plugs, Alternator, Oil Pan
RearGearbox, Clutch
Left / RightSuspension, Tires, Brakes
BottomSuspension, Oil Pan, Fuel Pump

On this page