<?xml version="1.0" encoding="utf-8"?>
<!--
  ═══════════════════════════════════════════════════════════════════════════════
  WitosWeapon — Complete Weapon Configuration Reference  [ENGLISH]
  ═══════════════════════════════════════════════════════════════════════════════

  HOW IT WORKS
  ════════════
  Each vehicle seat can have its own independent weapon system.
  Configuration is done via properties in the vehicle XML
  (entityclasses.xml) with the name "VW_Seat{N}",
  where N is the seat number (starting from 0).

  The value is a list of Key=Value pairs separated by semicolons:
	  <property name="VW_Seat0" value="Enabled=true;Weapon=mg;Key=Mouse0;..."/>

  Keys are case-insensitive (Weapon=mg and weapon=mg are the same).
  Weapon types: "mg" (machine gun) or "gm"/"guidedmissile" (guided missile).

  3D MODEL NODES
  ══════════════
  Your Unity prefab must contain named GameObjects (transforms) that the
  system looks up by name. Place them anywhere in your model hierarchy.
  The system uses recursive search (BFS), so nesting is flexible.

  Example hierarchy for MG with turret:

	  VehicleRoot
	  ├── turret_yaw              ← Horizontal rotation node
	  │   └── turret_pitch        ← Vertical rotation node
	  │       ├── mg_muzzle       ← Fire origin point
	  │       │   └── MuzzleFlash ← Muzzle flash ParticleSystem
	  │       ├── barrel_spin     ← Spinning barrel (minigun)
	  │       └── recoil_bone     ← Recoil bone
	  ├── turret_mesh             ← Visible mesh (hidden without mod)
	  ├── weapon0                 ← Missile spawn point 1
	  └── weapon1                 ← Missile spawn point 2

  Example hierarchy for GM with missile turret:

	  VehicleRoot
	  ├── missile_turret_yaw      ← Horizontal rotation node (TurretYawNode)
	  │   └── missile_turret_pitch← Vertical rotation node (TurretPitchNode)
	  │       ├── weapon0         ← Missile spawn point 1
	  │       └── weapon1         ← Missile spawn point 2
	  └── ...

  AMMUNITION
  ══════════
  Ammo items must exist in items.xml. The player must carry them
  in their inventory (bag). For guided missiles, ammo items can also
  define explosion properties (see MISSILE AMMUNITION section).
-->

<weapon_reference>

  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   MACHINE GUN (MG) — MINIMAL CONFIGURATION                            -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	The bare minimum to get a machine gun working.
	Only 4 properties are required: Enabled, Weapon, Key and AmmoItem.
	Everything else uses default values.
  -->
  <vehicle name="MG_Minimal_Example">
	<property name="VW_Seat0" value="
	  Enabled=true;
	  Weapon=mg;
	  Key=Mouse0;
	  AmmoItem=ammo9mmBullet
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   MACHINE GUN (MG) — ALL OPTIONS                                       -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <vehicle name="MG_Full_Example">
	<property name="VW_Seat0" value="

	  <!-- ─── General ──────────────────────────────────────────────────── -->
	  <!-- Enabled: enables or disables the weapon on this seat             -->
	  <!-- Weapon: weapon type ('mg' for machine gun)                       -->
	  <!-- Key: fire key (any Unity KeyCode)                                -->
	  <!-- Key_Pad: optional alternative fire key for gamepad/controller.   -->
	  <!--   If set, the weapon fires when EITHER Key OR Key_Pad is held.   -->
	  <!--   Can also be rebound per vehicle via the in-game keybind UI.    -->
	  <!-- RequiredMod: mod name that must be installed on the vehicle       -->
	  <!--   for the weapon to work. If empty, always available.            -->
	  <!-- VisualNode: 3D node shown/hidden based on RequiredMod            -->
	  <!-- ItemName: base game item used to calculate damage,               -->
	  <!--   passive effects, tags, etc.                                    -->
	  Enabled=true;
	  Weapon=mg;
	  Key=Mouse0;
	  Key_Pad=Joystick1Button0;
	  RequiredMod=modMachineGunTurret;
	  VisualNode=turret_mesh;
	  ItemName=gunMGT1;

	  <!-- ─── Ammunition ───────────────────────────────────────────────── -->
	  <!-- AmmoItem: ammo item name (must exist in items.xml and            -->
	  <!--   the player must carry it in their inventory)                   -->
	  <!-- AmmoItems: for multiple ammo types, comma-separated list.        -->
	  <!--   If defined, takes priority over AmmoItem.                      -->
	  <!-- AmmoSwitchKey: key to cycle between ammo types                   -->
	  <!-- AmmoSwitchSnd: sound when switching ammo                         -->
	  AmmoItem=ammo762mmBullet;
	  <!-- AmmoItems=ammo762mm,ammo762mmAP,ammo762mmHP;                    -->
	  AmmoSwitchKey=X;
	  AmmoSwitchSnd=weapon/ammo_switch;

	  <!-- ─── Firing ───────────────────────────────────────────────────── -->
	  <!-- Range: maximum fire range (damage raycast) in meters             -->
	  <!-- AimRange: camera raycast range (where you aim).                  -->
	  <!--   Usually larger than Range so the crosshair is accurate         -->
	  <!--   at any visible distance.                                       -->
	  <!-- RoundsPerMinute: rate of fire (shots per minute)                 -->
	  <!-- SpreadDegreesHorizontal/Vertical: shot spread in degrees.        -->
	  <!--   Higher value = less accurate.                                  -->
	  <!-- HitmaskOverride: collision mask for the damage raycast           -->
	  Range=220;
	  AimRange=800;
	  RoundsPerMinute=720;
	  SpreadDegreesHorizontal=1.0;
	  SpreadDegreesVertical=1.0;
	  HitmaskOverride=8;

	  <!-- ─── Damage ───────────────────────────────────────────────────── -->
	  <!-- damageType: game damage type                                      -->
	  <!--   Values: Piercing, Bashing, Slashing, Heat, Electrical,         -->
	  <!--            Radiation                                              -->
	  <!-- material: impact material (affects impact particles)             -->
	  <!-- EntityDamageMul: damage multiplier to entities (zombies,         -->
	  <!--   animals, players)                                              -->
	  <!-- BlockDamageMul: damage multiplier to blocks                      -->
	  damageType=Piercing;
	  material=bullet;
	  EntityDamageMul=1.0;
	  BlockDamageMul=1.0;

	  <!-- ─── Magazine / Reload ────────────────────────────────────────── -->
	  <!-- RackSize: shots before reloading. 999999 = unlimited.            -->
	  <!-- ReloadTime: reload time in seconds. 0 = no reload.              -->
	  <!-- SndFire: fire sound                                              -->
	  <!-- SndReload: reload sound                                          -->
	  RackSize=50;
	  ReloadTime=3.0;
	  SndFire=weapon/gun_fire;
	  SndReload=weapon/gun_reload;

	  <!-- ─── Fire Point ───────────────────────────────────────────────── -->
	  <!-- MuzzleNode: model node name where the shot originates.           -->
	  <!--   Also used as parent for laser and FX.                          -->
	  MuzzleNode=mg_muzzle;

	  <!-- ─── Turret Rotation ──────────────────────────────────────────── -->
	  <!-- YawNode: node that rotates horizontally (left/right)             -->
	  <!-- PitchNode: node that rotates vertically (up/down)                -->
	  <!-- YawMin/YawMax: horizontal rotation limits in degrees             -->
	  <!--   (-180 to 180 = full rotation)                                  -->
	  <!-- PitchMin/PitchMax: vertical rotation limits in degrees           -->
	  <!-- YawSpeed/PitchSpeed: rotation speed in degrees/second            -->
	  <!-- YawAxisLocal/PitchAxisLocal: local rotation axis                 -->
	  <!--   Possible values: X, Y, Z, -X, -Y, -Z                          -->
	  <!-- YawInvert/PitchInvert: invert rotation direction                -->
	  <!-- YawCameraScale/PitchCameraScale: camera tracking scale           -->
	  <!--   (1.0 = follows camera 1:1)                                     -->
	  <!-- YawCameraOffset/PitchCameraOffset: base rotation offset          -->
	  <!--   in degrees (useful if the model has an off-center turret)      -->
	  YawNode=turret_yaw;
	  PitchNode=turret_pitch;
	  YawMin=-180;
	  YawMax=180;
	  PitchMin=-15;
	  PitchMax=60;
	  YawSpeed=180;
	  PitchSpeed=120;
	  YawAxisLocal=Y;
	  PitchAxisLocal=X;
	  YawInvert=false;
	  PitchInvert=false;
	  YawCameraScale=1.0;
	  PitchCameraScale=1.0;
	  YawCameraOffset=0;
	  PitchCameraOffset=0;

	  <!-- ─── Laser ────────────────────────────────────────────────────── -->
	  <!-- LaserEnabled: show/hide the laser                                -->
	  <!-- LaserColor: color in R,G,B,A format (each value 0 to 1)         -->
	  <!--   Examples: 1,0,0,1 (red) | 0,1,0,0.6 (semi-transparent green)  -->
	  <!-- LaserWidth: laser thickness                                      -->
	  <!-- LaserMaxDistance: visual laser range. If not specified,           -->
	  <!--   uses the Range value.                                          -->
	  LaserEnabled=true;
	  LaserColor=1,0,0,1;
	  LaserWidth=0.015;
	  LaserMaxDistance=250;

	  <!-- ─── Spinning Barrel (Minigun) ────────────────────────────────── -->
	  <!-- SpinNode: model node that spins when firing                      -->
	  <!-- SpinAxis: rotation axis (X, Y, Z, -X, -Y, -Z)                  -->
	  <!-- SpinSpeed / SpinSpeedFire: spin speed when firing (°/s).         -->
	  <!--   Both names are aliases of the same property.                   -->
	  <!-- SpinSpeedIdle: spin speed when idle (0 = stopped)                -->
	  <!-- SpinAccel: spin acceleration (°/s²)                              -->
	  <!-- SpinDecel: spin deceleration (°/s²)                              -->
	  <!-- SpinMinToFire: normalized minimum spin (0-1) required to         -->
	  <!--   fire. 0.5 = barrel must be at 50% speed before firing.         -->
	  <!-- SpinSndMin: normalized minimum spin for sound                    -->
	  <!-- SpinSndStart: spin-up sound                                      -->
	  <!-- SpinSndLoop: looping sound while spinning                        -->
	  <!-- SpinSndStop: spin-down sound                                     -->
	  SpinNode=barrel_spin;
	  SpinAxis=Y;
	  SpinSpeed=2400;
	  SpinSpeedIdle=0;
	  SpinAccel=3000;
	  SpinDecel=2000;
	  SpinMinToFire=0.5;
	  SpinSndMin=0.05;
	  SpinSndStart=weapon/minigun_spinup;
	  SpinSndLoop=weapon/minigun_loop;
	  SpinSndStop=weapon/minigun_spindown;

	  <!-- ─── Recoil ────────────────────────────────────────────────────── -->
	  <!-- RecoilNode: model node that recoils when firing                  -->
	  <!-- RecoilKick: recoil degrees per shot (on local X axis)            -->
	  <!-- RecoilReturnSpeed: return speed in degrees/second                -->
	  RecoilNode=recoil_bone;
	  RecoilKick=1.2;
	  RecoilReturnSpeed=12;

	  <!-- ─── Muzzle Flash FX ──────────────────────────────────────────── -->
	  <!-- FireParticle: ParticleSystem child name of the muzzle node       -->
	  <!--   Can be a direct name ("MuzzleFlash") or a relative path        -->
	  <!--   ("Fx/MuzzleFlash").                                            -->
	  <!-- FireFxNode: effect parent node. If not specified, uses           -->
	  <!--   MuzzleNode. Useful if the FX is on a different node.           -->
	  <!-- FireFxScale: particle effect scale                               -->
	  <!-- FireFxDuration: effect duration before stopping emission          -->
	  <!--   0 = doesn't stop automatically (ParticleSystem decides)        -->
	  <!-- FireFxDisableOnStop: disable the GameObject when finished        -->
	  FireParticle=MuzzleFlash;
	  FireFxNode=mg_muzzle;
	  FireFxScale=1.0;
	  FireFxDuration=0.08;
	  FireFxDisableOnStop=true;

	  <!-- ─── Seat IK ──────────────────────────────────────────────────── -->
	  <!-- Places the player's hands and feet on specific nodes of the      -->
	  <!-- vehicle model when sitting in this seat. Uses Unity's IK system. -->
	  <!--                                                                   -->
	  <!-- SeatIK: must be true to enable IK for this seat.                 -->
	  <!--   If false (default), all IK_* properties are ignored.           -->
	  <!--                                                                   -->
	  <!-- Available limbs: LeftHand, RightHand, LeftFoot, RightFoot        -->
	  <!-- For each limb you can define three properties:                    -->
	  <!--   IK_{Limb}Position: local position offset (X,Y,Z) relative to   -->
	  <!--     the parent node (or vehicle root if no parent is set).        -->
	  <!--     This property MUST be present for the limb to be activated.  -->
	  <!--   IK_{Limb}Rotation: local euler rotation (X,Y,Z). Default: 0,0,0-->
	  <!--   IK_{Limb}Parent: name of the model node to attach the IK       -->
	  <!--     target to. The system searches recursively in the vehicle     -->
	  <!--     prefab. If not set, the target is placed relative to the      -->
	  <!--     vehicle root.                                                  -->
	  <!--                                                                   -->
	  <!-- TIP: Use IK_{Limb}Parent with a node on the steering wheel,      -->
	  <!-- weapon handle, throttle lever, etc. so the IK target moves with  -->
	  <!-- that node when the turret rotates.                                -->
	  SeatIK=true;
	  IK_LeftHandPosition=0.3,0.9,-0.1;
	  IK_LeftHandRotation=0,0,0;
	  IK_LeftHandParent=steering_wheel;
	  IK_RightHandPosition=-0.3,0.9,-0.1;
	  IK_RightHandRotation=0,0,0;
	  IK_RightHandParent=steering_wheel;
	  IK_LeftFootPosition=0.2,0.1,0.3;
	  IK_LeftFootParent=left_pedal;
	  IK_RightFootPosition=-0.2,0.1,0.3;
	  IK_RightFootParent=right_pedal;

	  <!-- ─── Seat Follows Turret ──────────────────────────────────────── -->
	  <!-- Makes the player's body rotate with the turret, so the character -->
	  <!-- visually "turns in their seat" when aiming sideways.             -->
	  <!--                                                                   -->
	  <!-- SeatFollowsTurret: enables this feature. Default: false          -->
	  <!-- SeatFollowsTurretYawScale: multiplier on the yaw angle applied   -->
	  <!--   to the character body. 1.0 = same rotation as turret.          -->
	  <!--   0.5 = half rotation. Useful to limit upper-body twist.         -->
	  <!-- SeatFollowsTurretPitch: if true, also rotates the body on the    -->
	  <!--   pitch axis. Default: false (usually not needed).               -->
	  <!-- SeatFollowsTurretPitchScale: multiplier for pitch rotation.      -->
	  <!-- SeatFollowsPivotOffset: optional pivot offset (X,Y,Z) in local   -->
	  <!--   model space. If set, the body orbits around the pivot point     -->
	  <!--   instead of rotating in place. Useful for turrets where the     -->
	  <!--   seat is not at the rotation center.                             -->
	  SeatFollowsTurret=true;
	  SeatFollowsTurretYawScale=0.5;
	  SeatFollowsTurretPitch=false;
	  SeatFollowsTurretPitchScale=0.3;
	  SeatFollowsPivotOffset=0,0.2,0.1
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   GUIDED MISSILE (GM) — MINIMAL CONFIGURATION                          -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	The bare minimum for a functional missile launcher.
	Only requires: Enabled, Weapon, Key and AmmoItem.
  -->
  <vehicle name="GM_Minimal_Example">
	<property name="VW_Seat1" value="
	  Enabled=true;
	  Weapon=gm;
	  Key=G;
	  AmmoItem=Witos_MissileAmmo
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   GUIDED MISSILE (GM) — ALL OPTIONS                                     -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <vehicle name="GM_Full_Example">
	<property name="VW_Seat1" value="

	  <!-- ─── General ──────────────────────────────────────────────────── -->
	  <!-- Weapon: 'gm' or 'guidedmissile' (equivalent)                    -->
	  Enabled=true;
	  Weapon=guidedmissile;
	  Key=G;

	  <!-- ─── Ammunition ───────────────────────────────────────────────── -->
	  <!-- Works the same as MG. Each missile ammo type can have            -->
	  <!-- different explosion properties defined in items.xml              -->
	  <!-- (see MISSILE AMMUNITION section below).                          -->
	  AmmoItem=Witos_MissileAmmo;
	  <!-- AmmoItems=Witos_MissileAmmo,Witos_MissileAmmoAP;                -->
	  AmmoSwitchKey=X;
	  AmmoSwitchSnd=weapon/ammo_switch;

	  <!-- ─── Lock-On System ───────────────────────────────────────────── -->
	  <!-- LockRange: maximum distance to lock a target                     -->
	  <!-- ConeAngle: search cone angle in degrees                          -->
	  <!--   (from the crosshair center outward)                            -->
	  <!-- AcquireTime: seconds to acquire lock                             -->
	  <!-- LoseTime: seconds without seeing the target before losing it     -->
	  <!-- LockConfirmTime: extra confirmation time after full lock.         -->
	  <!--   Simulates more realistic systems.                              -->
	  <!-- RequireLockToFire: if true, cannot fire without a locked          -->
	  <!--   and confirmed target.                                          -->
	  LockRange=350;
	  ConeAngle=30;
	  AcquireTime=0.22;
	  LoseTime=0.35;
	  LockConfirmTime=0.5;
	  RequireLockToFire=false;

	  <!-- ─── Target HUD (Lock Square) ─────────────────────────────────── -->
	  <!-- HudEnabled: show/hide the lock-on square                         -->
	  <!-- HudPixels: square size in pixels                                 -->
	  <!-- HudOffsetY: vertical offset above the target                     -->
	  <!-- HudThicknessPx: square line thickness                            -->
	  HudEnabled=true;
	  HudPixels=40;
	  HudOffsetY=1.0;
	  HudThicknessPx=3;

	  <!-- ─── Missile Flight ───────────────────────────────────────────── -->
	  <!-- MaxSpeed: maximum missile speed                                  -->
	  <!-- Accel: missile acceleration                                      -->
	  <!-- TurnRate: missile turn rate (degrees/second)                     -->
	  <!--   Higher = more maneuverable, better at chasing agile targets.   -->
	  <!-- StartSpeed: initial launch speed                                 -->
	  <!-- ArmingDelay: seconds before the missile can impact               -->
	  <!--   (prevents self-hits on launch)                                 -->
	  <!-- NoTargetGravity: gravity applied to the missile when it has      -->
	  <!--   no target (falls in an arc without lock)                       -->
	  <!-- FallbackDistance: straight-line flight distance when fired        -->
	  <!--   without a locked target                                        -->
	  MaxSpeed=180;
	  Accel=180;
	  TurnRate=420;
	  StartSpeed=70;
	  ArmingDelay=0.20;
	  NoTargetGravity=25;
	  FallbackDistance=220;

	  <!-- ─── Launch Points (Hardpoints) ───────────────────────────────── -->
	  <!-- WeaponNodePrefix: prefix of spawn nodes in the model             -->
	  <!--   The system searches: weapon0, weapon1, weapon2... up to        -->
	  <!--   WeaponMax. Missiles are launched alternating between them.      -->
	  <!-- WeaponMax: maximum number of hardpoints to search                -->
	  WeaponNodePrefix=weapon;
	  WeaponMax=2;

	  <!-- ─── Magazine / Reload ────────────────────────────────────────── -->
	  <!-- RackSize: missiles before reloading                              -->
	  <!-- ReloadTime: reload time in seconds                               -->
	  RackSize=8;
	  ReloadTime=3.5;

	  <!-- ─── Sounds ───────────────────────────────────────────────────── -->
	  <!-- SndBeep: beep while searching for target (beeps faster           -->
	  <!--   as it approaches full lock)                                     -->
	  <!-- SndLocked: sound on lock confirmation                            -->
	  <!-- SndUnlock: sound on lock loss                                    -->
	  <!-- SndLaunch: sound on missile launch                               -->
	  <!-- SndReload: sound on reload                                       -->
	  SndBeep=misc/locking;
	  SndLocked=misc/locked;
	  SndUnlock=misc/unlock;
	  SndLaunch=weapon/missile_launch;
	  SndReload=weapon/missile_reload;

	  <!-- ─── Missile Turret Rotation ──────────────────────────────────── -->
	  <!--                                                                   -->
	  <!-- Guided missiles support an independent rotary turret that follows -->
	  <!-- the player's camera. Hardpoints (weapon0, weapon1...) should be   -->
	  <!-- placed as children of the pitch node, so missiles launch in the   -->
	  <!-- direction the turret is pointing.                                  -->
	  <!--                                                                   -->
	  <!-- These properties are EXCLUSIVE to the GM system. They use the     -->
	  <!-- "Turret" prefix to differentiate from MG turret properties        -->
	  <!-- (YawNode, PitchNode, etc.).                                        -->
	  <!--                                                                   -->
	  <!-- IMPORTANT: If TurretYawNode and TurretPitchNode are NOT           -->
	  <!-- defined, the system falls back to YawNode/PitchNode. This         -->
	  <!-- allows a seat with both MG and GM to share the same turret,       -->
	  <!-- or each system to use independent nodes.                          -->
	  <!--                                                                   -->
	  <!-- TurretYawNode: node that rotates horizontally (yaw).              -->
	  <!--   Must be a GameObject in the vehicle prefab.                    -->
	  <!-- TurretPitchNode: node that rotates vertically (pitch).            -->
	  <!--   Usually a child of TurretYawNode.                              -->
	  <!-- TurretYawMin/TurretYawMax: horizontal rotation limits             -->
	  <!--   in degrees. (-180 to 180 = full rotation)                      -->
	  <!--   Fallback: uses YawMin/YawMax if not defined.                   -->
	  <!-- TurretPitchMin/TurretPitchMax: vertical rotation limits           -->
	  <!--   in degrees. Fallback: uses PitchMin/PitchMax.                  -->
	  <!-- TurretYawSpeed: horizontal rotation speed (°/s).                  -->
	  <!--   Fallback: uses YawSpeed if not defined.                        -->
	  <!-- TurretPitchSpeed: vertical rotation speed (°/s).                  -->
	  <!--   Fallback: uses PitchSpeed if not defined.                      -->
	  <!-- TurretSnapOnEnter: if true, the turret snaps instantly            -->
	  <!--   to the camera position when entering the seat, instead         -->
	  <!--   of smoothly rotating. Useful for fast vehicles where           -->
	  <!--   waiting for rotation is annoying.                              -->
	  <!--                                                                   -->
	  <!-- NOTE: YawAxisLocal, PitchAxisLocal, YawInvert, PitchInvert,       -->
	  <!-- YawCameraScale, PitchCameraScale, YawCameraOffset and             -->
	  <!-- PitchCameraOffset are shared with MG (no Turret-prefixed          -->
	  <!-- version). They are read by the same WeaponTurretRotation          -->
	  <!-- system.                                                           -->
	  TurretYawNode=missile_turret_yaw;
	  TurretPitchNode=missile_turret_pitch;
	  TurretYawMin=-180;
	  TurretYawMax=180;
	  TurretPitchMin=-20;
	  TurretPitchMax=45;
	  TurretYawSpeed=90;
	  TurretPitchSpeed=60;
	  TurretSnapOnEnter=false
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   LEGACY GUIDED MISSILE PROPERTIES (GM_* prefix)                       -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	These properties go directly in the vehicle's <property> block
	(NOT inside VW_Seat). They are read first as default values.
	If a VW_Seat with Weapon=gm also exists, the VW_Seat values
	override these.

	Use this format when you don't need per-seat config, or as
	default values that VW_Seat selectively overrides.
  -->
  <vehicle name="GM_Legacy_Full_Example">
	<properties>
	  <property name="GM_Enabled"           value="true"/>
	  <property name="GM_Key"               value="G"/>

	  <!-- Lock-on -->
	  <property name="GM_LockRange"         value="350"/>
	  <property name="GM_ConeAngle"         value="30"/>
	  <property name="GM_AcquireTime"       value="0.22"/>
	  <property name="GM_LoseTime"          value="0.35"/>
	  <property name="GM_LockConfirmTime"   value="0.5"/>
	  <property name="GM_RequireLockToFire" value="false"/>

	  <!-- Missile flight -->
	  <property name="GM_MaxSpeed"          value="180"/>
	  <property name="GM_Accel"             value="180"/>
	  <property name="GM_TurnRate"          value="420"/>
	  <property name="GM_StartSpeed"        value="70"/>
	  <property name="GM_LifeTime"          value="10"/>
	  <property name="GM_ArmingDelay"       value="0.20"/>
	  <property name="GM_FallbackDistance"  value="220"/>
	  <property name="GM_NoTargetGravity"   value="25"/>
	  <property name="GM_MaxTravelDistance" value="650"/>

	  <!-- HUD -->
	  <property name="GM_HudEnabled"        value="true"/>
	  <property name="GM_HudPixels"         value="40"/>
	  <property name="GM_HudOffsetY"        value="1.0"/>
	  <property name="GM_HudThicknessPx"    value="3"/>

	  <!-- Launch points -->
	  <property name="GM_WeaponNodePrefix"  value="weapon"/>
	  <property name="GM_WeaponMax"         value="2"/>

	  <!-- Ammunition -->
	  <property name="GM_AmmoItem"          value="Witos_MissileAmmo"/>
	  <property name="GM_RackSize"          value="8"/>
	  <property name="GM_ReloadTime"        value="3.5"/>

	  <!-- Sounds -->
	  <property name="GM_SndBeep"           value="misc/locking"/>
	  <property name="GM_SndLocked"         value="misc/locked"/>
	  <property name="GM_SndUnlock"         value="misc/unlock"/>
	  <property name="GM_SndLaunch"         value="weapon/missile_launch"/>
	  <property name="GM_SndReload"         value="weapon/missile_reload"/>
	</properties>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   MISSILE AMMUNITION (items.xml)                                        -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	Each missile ammo type is a regular item in items.xml.
	The guided missile system reads properties from the ammo item at
	launch time. This lets different ammo types override explosion
	damage, sounds, particles, AND flight behaviour (speed, guidance,
	visual model …).

	IMPORTANT: These properties go inside items.xml, NOT in
	entityclasses.xml.

	Property resolution order (for every key):
	  1. item <property name="...">  (direct item properties)
	  2. item Action[0] / Action[1] properties  (vanilla compatibility)
	Any ammo property that is NOT present on the item is inherited
	from the vehicle seat configuration (entityclasses.xml).

	──────────────────────────────────────────────────────────────────────
	COMPLETE PROPERTY REFERENCE — MISSILE AMMO ITEM
	──────────────────────────────────────────────────────────────────────

	── SOUND / FX ────────────────────────────────────────────────────────
	GM_SndLaunch          Launch sound path.  Overrides the seat's
						  SndLaunch.  Also accepted without prefix:
						  SndLaunch=...
	GM_FxExplode          Prefab/particle name spawned at the impact
						  point.  Typical value: "explosion_small".

	── EXPLOSION DAMAGE ──────────────────────────────────────────────────
	Explosion.AudioName   Sound played at impact.  Searched first in
						  item props, then in Action props.
	Explosion.ParticleIndex  Index of the game's built-in particle
						  explosion table (0 = default).
	Explosion.EntityDamage   HP damage to living entities.  Default 1000.
	Explosion.EntityRadius   Radius (m) of entity damage sphere.  Default 10.
	Explosion.BlockDamage    Damage applied to blocks.  Default 2000.
	Explosion.BlockRadius    Radius (m) of block damage sphere.  Default 4.
	Explosion.BlastPower     Physics impulse applied to entities and
						  loose objects.  Default 200.

	── VEHICLE / EXTRA DAMAGE ────────────────────────────────────────────
	GM_VehicleDamage      Extra damage applied specifically to vehicles
						  (EntityVehicle).  Default 0 (uses EntityDamage).
	GM_VehicleRadius      Radius (m) for vehicle-specific damage. Default 0.

	── FLIGHT OVERRIDES ──────────────────────────────────────────────────
	  These properties are OPTIONAL.  If omitted the missile uses the
	  values configured on the vehicle seat.  If present they override
	  the seat values for this ammo type only.

	GM_MaxSpeed           Top speed of the missile (m/s).
	GM_Accel              Acceleration (m/s²).
	GM_TurnRate           Max angular turn speed (°/s).
	GM_StartSpeed         Initial speed at launch (m/s).
	GM_ArmingDelay        Seconds after launch before the warhead arms
						  and can detonate.
	GM_LifeTime           Missile lifespan in seconds.  Also accepted
						  without prefix: LifeTime=...
	GM_NoTargetGravity    Gravity (m/s²) applied when there is no
						  locked target.
	GM_MaxTravelDistance  Maximum flight distance (m) before self-destruct.
	GM_FallbackDistance   When no target is locked the missile flies
						  straight for this distance (m) before dropping.
	GM_Guided             true/false — set to false for unguided (dumb)
						  rockets.  Also accepted: GM_IsGuided=...

	── TARGETING OVERRIDES ───────────────────────────────────────────────
	GM_LockRange          Lock-on detection range (m).
	GM_ConeAngle          Half-angle (°) of the lock-on cone.
	GM_AcquireTime        Seconds to build a full lock.
	GM_LoseTime           Seconds before lock is lost when target leaves cone.
	GM_LockConfirmTime    Extra seconds required after full lock before
						  the HUD confirms (LOCKED).

	── WEAPON NODE ───────────────────────────────────────────────────────
	GM_WeaponNode         Override the hardpoint node used to spawn this
						  ammo type.  Format: "node_name" or
						  "WeaponNode;node_name".

	── VISUAL MODEL ──────────────────────────────────────────────────────
	GM_VisualModel        Asset bundle path of the missile 3D model
						  shown in flight.  Also accepted:
						  GM_MissileVisual=...
						  If absent the system tries to read "Meshfile"
						  from the item (extracts the part after '?').
	GM_VisualScale        Uniform scale applied to the visual model.
						  Default 0.25.

	── RELOAD / RACK ─────────────────────────────────────────────────────
	GM_RackSize           Number of missiles per rack (overrides seat).
						  Also accepted: RackSize=...
	GM_ReloadTime         Reload duration in seconds (overrides seat).
						  Also accepted: ReloadTime=...
	GM_SndReload          Reload sound (overrides seat SndReload).
						  Also accepted: SndReload=...

	── ALTERNATE FIRE ────────────────────────────────────────────────────
	GM_AlternateFire      true/false — fire from hardpoints in
						  alternating order instead of left-to-right.
						  Also accepted: AlternateFire=...
  -->

  <!--
  ════════════════════════════════════════════════════════════════════
  EXAMPLE 1 — Standard anti-entity missile (default settings)
  ════════════════════════════════════════════════════════════════════
  -->
  <!--
  <item name="Witos_MissileAmmo">
	<property name="Stacknumber"              value="10"/>
	<property name="HoldType"                value="45"/>
	<property name="Material"                value="Mmetal"/>

	Sound / FX
	<property name="GM_SndLaunch"            value="weapon/missile_launch"/>
	<property name="GM_FxExplode"            value="explosion_small"/>

	Explosion
	<property name="Explosion.AudioName"     value="explosion_sound"/>
	<property name="Explosion.ParticleIndex" value="0"/>
	<property name="Explosion.EntityDamage"  value="1000"/>
	<property name="Explosion.EntityRadius"  value="10"/>
	<property name="Explosion.BlockDamage"   value="2000"/>
	<property name="Explosion.BlockRadius"   value="4"/>
	<property name="Explosion.BlastPower"    value="200"/>
  </item>
  -->

  <!--
  ════════════════════════════════════════════════════════════════════
  EXAMPLE 2 — High-Explosive (HE) anti-structure missile
  Overrides flight parameters so HE rounds fly slower but hit harder.
  ════════════════════════════════════════════════════════════════════
  -->
  <!--
  <item name="Witos_MissileAmmoHE">
	<property name="Stacknumber"              value="5"/>
	<property name="HoldType"                value="45"/>
	<property name="Material"                value="Mmetal"/>

	Sound / FX
	<property name="GM_SndLaunch"            value="weapon/missile_launch_heavy"/>
	<property name="GM_FxExplode"            value="explosion_large"/>

	Explosion — heavy block damage, wide radius
	<property name="Explosion.AudioName"     value="explosion_heavy"/>
	<property name="Explosion.ParticleIndex" value="1"/>
	<property name="Explosion.EntityDamage"  value="800"/>
	<property name="Explosion.EntityRadius"  value="15"/>
	<property name="Explosion.BlockDamage"   value="5000"/>
	<property name="Explosion.BlockRadius"   value="8"/>
	<property name="Explosion.BlastPower"    value="500"/>

	Flight — slower but heavier round
	<property name="GM_MaxSpeed"             value="120"/>
	<property name="GM_Accel"               value="120"/>
	<property name="GM_TurnRate"             value="280"/>
	<property name="GM_LifeTime"             value="12"/>
  </item>
  -->

  <!--
  ════════════════════════════════════════════════════════════════════
  EXAMPLE 3 — Anti-vehicle (AV) missile
  Deals extra damage specifically to EntityVehicle.
  Unguided (dumb rocket) — GM_Guided=false.
  ════════════════════════════════════════════════════════════════════
  -->
  <!--
  <item name="Witos_MissileAmmoAV">
	<property name="Stacknumber"              value="4"/>
	<property name="HoldType"                value="45"/>
	<property name="Material"                value="Mmetal"/>

	Sound / FX
	<property name="GM_SndLaunch"            value="weapon/rocket_launch"/>
	<property name="GM_FxExplode"            value="explosion_vehicle"/>

	Extra vehicle damage (stacks on top of EntityDamage)
	<property name="GM_VehicleDamage"        value="3000"/>
	<property name="GM_VehicleRadius"        value="6"/>

	Standard explosion
	<property name="Explosion.AudioName"     value="explosion_sound"/>
	<property name="Explosion.ParticleIndex" value="0"/>
	<property name="Explosion.EntityDamage"  value="500"/>
	<property name="Explosion.EntityRadius"  value="8"/>
	<property name="Explosion.BlockDamage"   value="1500"/>
	<property name="Explosion.BlockRadius"   value="3"/>
	<property name="Explosion.BlastPower"    value="300"/>

	Unguided rocket — flies straight, no lock-on needed
	<property name="GM_Guided"               value="false"/>
	<property name="GM_MaxSpeed"             value="300"/>
	<property name="GM_Accel"               value="400"/>
	<property name="GM_LifeTime"             value="5"/>
	<property name="GM_NoTargetGravity"      value="5"/>
	<property name="GM_MaxTravelDistance"    value="400"/>
  </item>
  -->

  <!--
  ════════════════════════════════════════════════════════════════════
  EXAMPLE 4 — Long-range guided missile with custom visual model
  Also overrides rack size and reload time for this ammo type.
  ════════════════════════════════════════════════════════════════════
  -->
  <!--
  <item name="Witos_MissileAmmoLR">
	<property name="Stacknumber"              value="2"/>
	<property name="HoldType"                value="45"/>
	<property name="Material"                value="Mmetal"/>

	Visual — custom missile mesh in flight
	<property name="GM_VisualModel"          value="MyMod/Assets/missile_lr"/>
	<property name="GM_VisualScale"          value="0.35"/>

	Sound / FX
	<property name="GM_SndLaunch"            value="weapon/missile_lr_launch"/>
	<property name="GM_SndReload"            value="weapon/missile_lr_reload"/>
	<property name="GM_FxExplode"            value="explosion_medium"/>

	Explosion
	<property name="Explosion.AudioName"     value="explosion_sound"/>
	<property name="Explosion.ParticleIndex" value="0"/>
	<property name="Explosion.EntityDamage"  value="1200"/>
	<property name="Explosion.EntityRadius"  value="12"/>
	<property name="Explosion.BlockDamage"   value="2500"/>
	<property name="Explosion.BlockRadius"   value="5"/>
	<property name="Explosion.BlastPower"    value="250"/>

	Long-range flight
	<property name="GM_MaxSpeed"             value="220"/>
	<property name="GM_Accel"               value="220"/>
	<property name="GM_TurnRate"             value="380"/>
	<property name="GM_StartSpeed"           value="80"/>
	<property name="GM_ArmingDelay"          value="0.5"/>
	<property name="GM_LifeTime"             value="20"/>
	<property name="GM_MaxTravelDistance"    value="1200"/>
	<property name="GM_FallbackDistance"     value="600"/>

	Targeting — tighter cone, faster acquire for long-range
	<property name="GM_LockRange"            value="800"/>
	<property name="GM_ConeAngle"            value="15"/>
	<property name="GM_AcquireTime"          value="0.4"/>
	<property name="GM_LoseTime"             value="0.6"/>
	<property name="GM_LockConfirmTime"      value="1.5"/>

	Rack — only 2 rounds, long reload
	<property name="GM_RackSize"             value="2"/>
	<property name="GM_ReloadTime"           value="12"/>

	Alternate fire (left/right hardpoints in turns)
	<property name="GM_AlternateFire"        value="true"/>
  </item>
  -->


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   MULTI-SEAT TANK — COMPLETE EXAMPLE                                   -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	A tank with 3 combat stations showcasing all features together.
	Seat 0: Driver with fixed front MG (no turret).
	Seat 1: Gunner with rotating minigun turret, laser, spin, recoil.
	Seat 2: Missile operator with guided lock-on AND rotary turret.
  -->
  <vehicle name="Tank_MultiSeat_Example">

	<!-- Seat 0: Driver — Fixed front machine gun (simple) -->
	<!--
	  No YawNode/PitchNode = the weapon aims where the camera looks but
	  has no visible turret that rotates. Ideal for chassis-mounted weapons.
	-->
	<property name="VW_Seat0" value="
	  Enabled=true;
	  Weapon=mg;
	  Key=Mouse0;
	  ItemName=gunPistolT1;
	  AmmoItem=ammo9mmBullet;
	  Range=120;
	  AimRange=500;
	  RoundsPerMinute=450;
	  SpreadDegreesHorizontal=2.0;
	  SpreadDegreesVertical=1.5;
	  MuzzleNode=front_muzzle;
	  SndFire=weapon/pistol_fire;
	  LaserEnabled=false;
	  FireParticle=FrontFlash;
	  FireFxDuration=0.05
	"/>

	<!-- Seat 1: Gunner — Full turret with minigun -->
	<!--
	  Requires the "modMinigunTurret" mod installed on the vehicle.
	  If not installed, the "top_turret_mesh" node is automatically
	  hidden and the weapon doesn't work.
	-->
	<property name="VW_Seat1" value="
	  Enabled=true;
	  Weapon=mg;
	  Key=Mouse0;
	  RequiredMod=modMinigunTurret;
	  VisualNode=top_turret_mesh;
	  ItemName=gunMGT1;
	  AmmoItem=ammo762mmBullet;
	  AmmoItems=ammo762mmBullet,ammo762mmAP;
	  AmmoSwitchKey=X;
	  AmmoSwitchSnd=weapon/ammo_click;
	  Range=220;
	  AimRange=800;
	  RoundsPerMinute=3000;
	  SpreadDegreesHorizontal=0.8;
	  SpreadDegreesVertical=0.8;
	  EntityDamageMul=1.2;
	  BlockDamageMul=0.8;
	  damageType=Piercing;
	  material=bullet;
	  RackSize=200;
	  ReloadTime=5.0;
	  SndFire=weapon/minigun_shot;
	  SndReload=weapon/reload_heavy;
	  MuzzleNode=top_muzzle;
	  YawNode=top_turret_yaw;
	  PitchNode=top_turret_pitch;
	  YawMin=-180;
	  YawMax=180;
	  PitchMin=-10;
	  PitchMax=70;
	  YawSpeed=120;
	  PitchSpeed=90;
	  YawAxisLocal=Y;
	  PitchAxisLocal=X;
	  LaserEnabled=true;
	  LaserColor=1,0,0,0.8;
	  LaserWidth=0.012;
	  SpinNode=top_barrel_spin;
	  SpinAxis=Z;
	  SpinSpeed=3600;
	  SpinSpeedIdle=200;
	  SpinAccel=4000;
	  SpinDecel=2500;
	  SpinMinToFire=0.6;
	  SpinSndStart=weapon/minigun_windup;
	  SpinSndLoop=weapon/minigun_loop;
	  SpinSndStop=weapon/minigun_winddown;
	  RecoilNode=top_recoil_bone;
	  RecoilKick=0.4;
	  RecoilReturnSpeed=15;
	  FireParticle=TopMuzzleFlash;
	  FireFxDuration=0.04;
	  FireFxDisableOnStop=true
	"/>

	<!-- Seat 2: Missile Operator — Guided missiles with lock-on             -->
	<!--         AND INDEPENDENT ROTARY TURRET                               -->
	<!--                                                                      -->
	<!--  RequireLockToFire=true forces the player to have a locked           -->
	<!--  and confirmed target before firing.                                -->
	<!--  LockConfirmTime=1.0 adds 1 second extra after full lock            -->
	<!--  before confirming (more realistic).                                -->
	<!--                                                                      -->
	<!--  The missile turret uses TurretYawNode/TurretPitchNode              -->
	<!--  to rotate the launcher following the player's camera.              -->
	<!--  Hardpoints (missile_hp0..3) must be CHILDREN of the                -->
	<!--  TurretPitchNode so missiles launch in the correct direction.       -->
	<!--                                                                      -->
	<!--  TurretSnapOnEnter=true makes the turret snap directly to           -->
	<!--  the camera direction when entering the seat, without animation.    -->
	<property name="VW_Seat2" value="
	  Enabled=true;
	  Weapon=gm;
	  Key=Mouse0;
	  AmmoItem=Witos_MissileAmmo;
	  AmmoItems=Witos_MissileAmmo,Witos_MissileAmmoHE;
	  AmmoSwitchKey=X;
	  LockRange=400;
	  ConeAngle=25;
	  AcquireTime=0.3;
	  LoseTime=0.5;
	  LockConfirmTime=1.0;
	  RequireLockToFire=true;
	  HudEnabled=true;
	  HudPixels=50;
	  HudOffsetY=1.5;
	  HudThicknessPx=3;
	  MaxSpeed=200;
	  Accel=200;
	  TurnRate=350;
	  StartSpeed=60;
	  ArmingDelay=0.3;
	  NoTargetGravity=20;
	  FallbackDistance=300;
	  WeaponNodePrefix=missile_hp;
	  WeaponMax=4;
	  RackSize=4;
	  ReloadTime=8.0;
	  SndBeep=misc/locking;
	  SndLocked=misc/locked_confirm;
	  SndUnlock=misc/lock_lost;
	  SndLaunch=weapon/missile_launch;
	  SndReload=weapon/missile_reload;
	  TurretYawNode=missile_yaw;
	  TurretPitchNode=missile_pitch;
	  TurretYawMin=-120;
	  TurretYawMax=120;
	  TurretPitchMin=-10;
	  TurretPitchMax=50;
	  TurretYawSpeed=60;
	  TurretPitchSpeed=40;
	  TurretSnapOnEnter=true;
	  YawAxisLocal=Y;
	  PitchAxisLocal=X
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   ARMED HELICOPTER WITH DOOR GUNNER — EXAMPLE                          -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	Seat 0: Pilot with guided missiles and rotary missile turret.
	Seat 1: Door gunner with limited-arc MG.

	AUTOPILOT NOTE:
	The AP button appears automatically in the seat overlay (HUD)
	on EntityAirplanePro vehicles. No XML configuration needed.
	When active, the engine keeps running even if the driver
	switches seats. Automatically deactivates when all occupants
	leave the vehicle.
  -->
  <vehicle name="Armed_Helicopter_Example">

	<!-- Pilot: Guided missiles with rotary turret -->
	<!--
	  The pilot's missile turret has a limited frontal arc
	  (±60° horizontal) and uses TurretSnapOnEnter=false so the
	  turret smoothly rotates toward the camera position.
	-->
	<property name="VW_Seat0" value="
	  Enabled=true;
	  Weapon=gm;
	  Key=G;
	  AmmoItem=Witos_MissileAmmo;
	  LockRange=500;
	  ConeAngle=20;
	  AcquireTime=0.15;
	  LoseTime=0.4;
	  RequireLockToFire=false;
	  MaxSpeed=250;
	  TurnRate=500;
	  WeaponNodePrefix=pylon;
	  WeaponMax=4;
	  RackSize=8;
	  ReloadTime=4.0;
	  SndLaunch=weapon/rocket_launch;
	  TurretYawNode=pylon_yaw;
	  TurretPitchNode=pylon_pitch;
	  TurretYawMin=-60;
	  TurretYawMax=60;
	  TurretPitchMin=-30;
	  TurretPitchMax=15;
	  TurretYawSpeed=120;
	  TurretPitchSpeed=90;
	  TurretSnapOnEnter=false;
	  YawAxisLocal=Y;
	  PitchAxisLocal=X
	"/>

	<!-- Door gunner: MG with limited arc -->
	<!--
	  YawMin=-90 and YawMax=45 limits horizontal rotation to a
	  135-degree arc (90° left + 45° right).
	  Simulates a gunner who can only fire through the side door.
	-->
	<property name="VW_Seat1" value="
	  Enabled=true;
	  Weapon=mg;
	  Key=Mouse0;
	  ItemName=gunMGT1;
	  AmmoItem=ammo762mmBullet;
	  Range=180;
	  RoundsPerMinute=900;
	  RackSize=100;
	  ReloadTime=4.0;
	  MuzzleNode=door_muzzle;
	  YawNode=door_gun_yaw;
	  PitchNode=door_gun_pitch;
	  YawMin=-90;
	  YawMax=45;
	  PitchMin=-60;
	  PitchMax=20;
	  YawSpeed=200;
	  PitchSpeed=150;
	  LaserEnabled=true;
	  LaserColor=0,1,0,0.6;
	  SndFire=weapon/mg_fire;
	  SndReload=weapon/mg_reload;
	  FireParticle=DoorMuzzleFlash;
	  FireFxDuration=0.06
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   JEEP WITH SIMPLE TURRET — BEGINNER EXAMPLE                           -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	The simplest example of an armed ground vehicle.
	Only the passenger (seat 1) has a basic MG.
	Ideal for getting started.

	STEPS TO GET IT WORKING:
	1. Create a Unity prefab with a node named "simple_muzzle"
	2. Make sure the "ammo9mmBullet" item exists in items.xml
	3. Add this property to your vehicle's entityclasses.xml
	4. Enter seat 1 and fire with left click!
  -->
  <vehicle name="Jeep_Beginner_Example">
	<property name="VW_Seat1" value="
	  Enabled=true;
	  Weapon=mg;
	  Key=Mouse0;
	  AmmoItem=ammo9mmBullet;
	  Range=100;
	  RoundsPerMinute=300;
	  MuzzleNode=simple_muzzle;
	  SndFire=weapon/pistol_fire;
	  LaserEnabled=true;
	  LaserColor=1,0,0,1
	"/>
  </vehicle>


  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--   QUICK PROPERTY REFERENCE                                             -->
  <!-- ═══════════════════════════════════════════════════════════════════════ -->
  <!--
	┌──────────────────────────────┬────────┬──────────┬────────────────────┐
	│ Key                          │ Type   │ Default  │ Used by            │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ GENERAL                      │        │          │                    │
	│ Enabled                      │ bool   │ true     │ MG, GM             │
	│ Weapon                       │ string │ ""       │ MG, GM             │
	│ Key                          │ KeyCode│ Mouse0   │ MG, GM             │
	│ Key_Pad                      │ KeyCode│ None     │ MG, GM             │
	│ RequiredMod                  │ string │ ""       │ MG, GM             │
	│ VisualNode                   │ string │ ""       │ MG, GM             │
	│ ItemName                     │ string │ ""       │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ AMMUNITION                   │        │          │                    │
	│ AmmoItem                     │ string │ ""       │ MG, GM             │
	│ AmmoItems                    │ string │ ""       │ MG, GM             │
	│ AmmoSwitchKey                │ KeyCode│ None     │ MG, GM             │
	│ AmmoSwitchSnd                │ string │ ""       │ MG, GM             │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MG — FIRING                  │        │          │                    │
	│ Range                        │ float  │ 220      │ MG                 │
	│ AimRange                     │ float  │ 800      │ MG                 │
	│ RoundsPerMinute              │ float  │ 720      │ MG                 │
	│ SpreadDegreesHorizontal      │ float  │ 1.0      │ MG                 │
	│ SpreadDegreesVertical        │ float  │ 1.0      │ MG                 │
	│ HitmaskOverride              │ int    │ 8        │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MG — DAMAGE                  │        │          │                    │
	│ damageType                   │ enum   │ Piercing │ MG                 │
	│ material                     │ string │ bullet   │ MG                 │
	│ EntityDamageMul              │ float  │ 1.0      │ MG                 │
	│ BlockDamageMul               │ float  │ 1.0      │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MG — MAGAZINE                │        │          │                    │
	│ RackSize                     │ int    │ 999999   │ MG, GM             │
	│ ReloadTime                   │ float  │ 0        │ MG, GM             │
	│ SndFire                      │ string │ ""       │ MG                 │
	│ SndReload                    │ string │ ""       │ MG, GM             │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MG — FIRE POINT              │        │          │                    │
	│ MuzzleNode                   │ string │ mg_muzzle│ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ TURRET ROTATION (MG)         │        │          │                    │
	│ YawNode                      │ string │ ""       │ MG (+ GM fallback) │
	│ PitchNode                    │ string │ ""       │ MG (+ GM fallback) │
	│ YawMin                       │ float  │ -180     │ MG (+ GM fallback) │
	│ YawMax                       │ float  │ 180      │ MG (+ GM fallback) │
	│ PitchMin                     │ float  │ -60      │ MG (+ GM fallback) │
	│ PitchMax                     │ float  │ 60       │ MG (+ GM fallback) │
	│ YawSpeed                     │ float  │ 360      │ MG (+ GM fallback) │
	│ PitchSpeed                   │ float  │ 360      │ MG (+ GM fallback) │
	│ YawAxisLocal                 │ string │ Y        │ MG, GM             │
	│ PitchAxisLocal               │ string │ X        │ MG, GM             │
	│ YawInvert                    │ bool   │ false    │ MG, GM             │
	│ PitchInvert                  │ bool   │ false    │ MG, GM             │
	│ YawCameraScale               │ float  │ 1.0      │ MG, GM             │
	│ PitchCameraScale             │ float  │ 1.0      │ MG, GM             │
	│ YawCameraOffset              │ float  │ 0        │ MG, GM             │
	│ PitchCameraOffset            │ float  │ 0        │ MG, GM             │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MISSILE TURRET ROTATION (GM) │        │          │                    │
	│ TurretYawNode                │ string │ ""       │ GM                 │
	│ TurretPitchNode              │ string │ ""       │ GM                 │
	│ TurretYawMin                 │ float  │ =YawMin  │ GM                 │
	│ TurretYawMax                 │ float  │ =YawMax  │ GM                 │
	│ TurretPitchMin               │ float  │ =PitchMin│ GM                 │
	│ TurretPitchMax               │ float  │ =PitchMax│ GM                 │
	│ TurretYawSpeed               │ float  │ =YawSpeed│ GM                 │
	│ TurretPitchSpeed             │ float  │=PitchSpd │ GM                 │
	│ TurretSnapOnEnter            │ bool   │ false    │ GM                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ LASER                        │        │          │                    │
	│ LaserEnabled                 │ bool   │ true     │ MG                 │
	│ LaserColor                   │ string │ 1,0,0,1  │ MG                 │
	│ LaserWidth                   │ float  │ 0.015    │ MG                 │
	│ LaserMaxDistance             │ float  │ =Range   │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ SPINNING BARREL (MINIGUN)    │        │          │                    │
	│ SpinNode                     │ string │ ""       │ MG                 │
	│ SpinAxis                     │ string │ Y        │ MG                 │
	│ SpinSpeed / SpinSpeedFire    │ float  │ 2400     │ MG                 │
	│ SpinSpeedIdle                │ float  │ 0        │ MG                 │
	│ SpinAccel                    │ float  │ 3000     │ MG                 │
	│ SpinDecel                    │ float  │ 2000     │ MG                 │
	│ SpinMinToFire                │ float  │ 0        │ MG                 │
	│ SpinSndMin                   │ float  │ 0.05     │ MG                 │
	│ SpinSndStart                 │ string │ ""       │ MG                 │
	│ SpinSndLoop                  │ string │ ""       │ MG                 │
	│ SpinSndStop                  │ string │ ""       │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ RECOIL                       │        │          │                    │
	│ RecoilNode                   │ string │ ""       │ MG                 │
	│ RecoilKick                   │ float  │ 1.2      │ MG                 │
	│ RecoilReturnSpeed            │ float  │ 12       │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MUZZLE FLASH                 │        │          │                    │
	│ FireParticle                 │ string │ ""       │ MG                 │
	│ FireFxNode                   │ string │ =Muzzle  │ MG                 │
	│ FireFxScale                  │ float  │ 1.0      │ MG                 │
	│ FireFxDuration               │ float  │ 0        │ MG                 │
	│ FireFxDisableOnStop          │ bool   │ true     │ MG                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ GM — LOCK-ON                 │        │          │                    │
	│ LockRange                    │ float  │ 350      │ GM                 │
	│ ConeAngle                    │ float  │ 30       │ GM                 │
	│ AcquireTime                  │ float  │ 0.22     │ GM                 │
	│ LoseTime                     │ float  │ 0.35     │ GM                 │
	│ LockConfirmTime              │ float  │ 0        │ GM                 │
	│ RequireLockToFire            │ bool   │ false    │ GM                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ GM — HUD                     │        │          │                    │
	│ HudEnabled                   │ bool   │ true     │ GM                 │
	│ HudPixels                    │ int    │ 40       │ GM                 │
	│ HudOffsetY                   │ float  │ 1.0      │ GM                 │
	│ HudThicknessPx               │ int    │ 3        │ GM                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ GM — MISSILE FLIGHT          │        │          │                    │
	│ MaxSpeed                     │ float  │ 180      │ GM                 │
	│ Accel                        │ float  │ 180      │ GM                 │
	│ TurnRate                     │ float  │ 420      │ GM                 │
	│ StartSpeed                   │ float  │ 70       │ GM                 │
	│ ArmingDelay                  │ float  │ 0.20     │ GM                 │
	│ NoTargetGravity              │ float  │ 25       │ GM                 │
	│ FallbackDistance             │ float  │ 220      │ GM                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ GM — LAUNCH POINTS           │        │          │                    │
	│ WeaponNodePrefix             │ string │ weapon   │ GM                 │
	│ WeaponMax                    │ int    │ 2        │ GM                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ GM — SOUNDS                  │        │          │                    │
	│ SndBeep                      │ string │ misc/... │ GM                 │
	│ SndLocked                    │ string │ misc/... │ GM                 │
	│ SndUnlock                    │ string │ misc/... │ GM                 │
	│ SndLaunch                    │ string │ ""       │ GM                 │
	│ SndReload                    │ string │ ""       │ GM                 │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ MISSILE AMMO (items.xml)     │        │          │                    │
	│ GM_SndLaunch                 │ string │ ""       │ Ammo item          │
	│ GM_FxExplode                 │ string │ ""       │ Ammo item          │
	│ GM_LifeTime                  │ float  │ 10       │ Ammo item          │
	│ Explosion.AudioName          │ string │ ""       │ Ammo item          │
	│ Explosion.ParticleIndex      │ int    │ -1       │ Ammo item          │
	│ Explosion.EntityDamage       │ int    │ 1000     │ Ammo item          │
	│ Explosion.EntityRadius       │ float  │ 10       │ Ammo item          │
	│ Explosion.BlockDamage        │ int    │ 2000     │ Ammo item          │
	│ Explosion.BlockRadius        │ float  │ 4        │ Ammo item          │
	│ Explosion.BlastPower         │ int    │ 200      │ Ammo item          │
	└──────────────────────────────┴────────┴──────────┴────────────────────┘

	SEAT IK TABLE
	┌──────────────────────────────┬────────┬──────────┬────────────────────┐
	│ Key                          │ Type   │ Default  │ Used by            │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ SEAT IK                      │        │          │                    │
	│ SeatIK                       │ bool   │ false    │ MG, GM             │
	│ IK_LeftHandPosition          │ vec3   │ (none)   │ MG, GM             │
	│ IK_LeftHandRotation          │ vec3   │ 0,0,0    │ MG, GM             │
	│ IK_LeftHandParent            │ string │ ""       │ MG, GM             │
	│ IK_RightHandPosition         │ vec3   │ (none)   │ MG, GM             │
	│ IK_RightHandRotation         │ vec3   │ 0,0,0    │ MG, GM             │
	│ IK_RightHandParent           │ string │ ""       │ MG, GM             │
	│ IK_LeftFootPosition          │ vec3   │ (none)   │ MG, GM             │
	│ IK_LeftFootRotation          │ vec3   │ 0,0,0    │ MG, GM             │
	│ IK_LeftFootParent            │ string │ ""       │ MG, GM             │
	│ IK_RightFootPosition         │ vec3   │ (none)   │ MG, GM             │
	│ IK_RightFootRotation         │ vec3   │ 0,0,0    │ MG, GM             │
	│ IK_RightFootParent           │ string │ ""       │ MG, GM             │
	├──────────────────────────────┼────────┼──────────┼────────────────────┤
	│ SEAT FOLLOWS TURRET          │        │          │                    │
	│ SeatFollowsTurret            │ bool   │ false    │ MG, GM             │
	│ SeatFollowsTurretYawScale    │ float  │ 1.0      │ MG, GM             │
	│ SeatFollowsTurretPitch       │ bool   │ false    │ MG, GM             │
	│ SeatFollowsTurretPitchScale  │ float  │ 1.0      │ MG, GM             │
	│ SeatFollowsPivotOffset       │ vec3   │ ""       │ MG, GM             │
	└──────────────────────────────┴────────┴──────────┴────────────────────┘

	AXIS VALUES (for YawAxisLocal, PitchAxisLocal, SpinAxis):
	  X, Y, Z, -X, -Y, -Z

	KEY VALUES (for Key, AmmoSwitchKey):
	  Mouse0, Mouse1, Mouse2, G, X, F, T, Alpha1..Alpha9, etc.
	  Full list: https://docs.unity3d.com/ScriptReference/KeyCode.html

	DAMAGE TYPES (for damageType):
	  Piercing, Bashing, Slashing, Heat, Electrical, Radiation

	LASER COLOR FORMAT:
	  R,G,B,A  (each value between 0.0 and 1.0)
	  Examples: 1,0,0,1 (red)  |  0,1,0,0.6 (semi-transparent green)
				0,0.5,1,1 (light blue)  |  1,1,0,0.9 (yellow)

	IMPORTANT NOTES:
	● RackSize=999999 (default) means unlimited magazine (no reload).
	● LaserMaxDistance uses the Range value if not specified.
	● FireFxNode uses MuzzleNode if not specified.
	● SpinSpeed and SpinSpeedFire are aliases (same effect).
	● RequiredMod: if empty, the weapon is always available.
	  If specified, the named mod must be installed on the vehicle.
	● VisualNode: if specified, the named node is automatically
	  shown/hidden based on whether RequiredMod is installed.
	● Autopilot (AP button in the seat overlay) only works on
	  EntityAirplanePro vehicles. No XML configuration needed.
	● When switching ammo with AmmoSwitchKey, a reload is forced
	  if ReloadTime > 0 (simulates changing the magazine).
	● Missiles search for zombies, animals, vehicles and other players
	  as valid targets. They do not lock onto the own vehicle or operator.

	MISSILE TURRET ROTATION NOTES:
	● TurretYawNode and TurretPitchNode are exclusive to the GM system.
	  If not defined, the system falls back to YawNode/PitchNode
	  (allows sharing a turret between MG and GM on the same seat).
	● TurretYawMin/Max, TurretPitchMin/Max, TurretYawSpeed and
	  TurretPitchSpeed also fall back to their non-prefixed equivalents
	  (YawMin, PitchMin, YawSpeed, etc.) if not defined.
	● YawAxisLocal, PitchAxisLocal, YawInvert, PitchInvert,
	  YawCameraScale, PitchCameraScale, YawCameraOffset and
	  PitchCameraOffset do NOT have Turret-prefixed versions.
	  They are shared by MG and GM.
	● Hardpoints (weapon0, weapon1...) must be CHILDREN of the
	  TurretPitchNode so missiles launch in the direction the
	  turret is pointing.
	● TurretSnapOnEnter=true is useful for fast vehicles (planes,
	  helicopters) where waiting for turret rotation when entering
	  the seat can be annoying. The turret jumps instantly to the
	  camera position.
	● The turret is validated at runtime: if TurretYawNode or
	  TurretPitchNode nodes don't exist in the prefab, GM turret
	  rotation is silently disabled.
	● Each seat + vehicle has its own independent rotation state
	  (curYaw, curPitch). Switching seats resets the turret state.

	SEAT IK NOTES:
	● SeatIK=true must be set to activate any IK target on this seat.
	● A limb is only activated if its IK_{Limb}Position is defined.
	  Position is required; Rotation and Parent are optional.
	● IK_{Limb}Parent attaches the IK target to a named node, so it
	  moves with the model (e.g. a steering wheel or gun handle).
	● The system searches the vehicle prefab AND entity root recursively,
	  so deep hierarchy nesting is fine.
	● IK is applied with a one-frame delay (coroutine) to ensure the
	  animator is ready before targets are set.
	● IK targets are destroyed automatically when the player leaves the seat.

	SEAT FOLLOWS TURRET NOTES:
	● Visually rotates the player's body with the turret yaw (and
	  optionally pitch). Makes characters look like they are actually
	  aiming instead of staring forward.
	● SeatFollowsTurretYawScale lets you limit the body twist to a
	  fraction of the turret rotation (e.g. 0.5 = half the turret angle).
	● SeatFollowsPivotOffset defines an offset (in local model space) from
	  the character's rest position. The body orbits around that pivot,
	  useful when the character seat is not centered on the turret axis.
	● Key_Pad lets you assign a gamepad button as a secondary fire trigger.
	  The weapon fires if EITHER Key OR Key_Pad is held down.
	  Key_Pad can also be rebound per vehicle type via the in-game
	  keybind overlay (without modifying any XML).
  -->

</weapon_reference>
