Game Mechanics/sandbox

Heroes & Generals has many mechanics not immediately obvious to the new player and hidden stats which influence weapon handling and vehicle combat.

# Handheld Weapons

## Precision and Accuracy

Handheld weapons handle very differently depending on numerous factors both specific to the weapon and due to changes in-battle.

### Before firing

All weapons have an idle **sway** pattern - represented by movement of the weapon model - which affects where the weapon is pointed at any given time. Sway when standing, crouched and prone is determined on a per-weapon basis and are affected by weapon mods that change 'precision'. In-battle, it is also affected by fatigue and movement (both physical and camera-wise), as well as temporarily from firing weapons. The variables used in the weapon configuration files are as follows:

* **swaystandmode** - the sway when standing
* **swaycrouchmode** - the sway when crouched
* **swaypronemode** - the sway while prone
* **swayprecisionmodifier** - multiplier for above values when aiming
* **aimpenaltyprecisionmodifier** - multiplier of aimpenaltyperbullet when aiming
* **aimpenaltyperbullet** - the amount of additional sway added after every shot
* **aimpenaltycontractionpersec** - the rate at which sway returns to normal after firing (increased by Dead-Eye)
* **aimpenaltyturn** - the amount of additional sway from turning (reduced by Quickdraw)
* **swayspeed** - the amount of additional sway from moving
* **swayfatigue** - the maxmum amount of additional sway from fatigue (which is recovered faster with First Blood and Marathon Man)

### When firing

The bullet fired may deviate from the point of aim by a certain amount, measured in degrees and often referred to as just 'conefire'. This is only affected by weapon modifications that change 'precision'.

Weapons experience recoil, which upon firing immediately shifts your soldier's view (camera recoil). This is dictated by the values 'camerarecoilup and 'camerarecoilright' and is slightly randomised, the maximum "variance on recoil vector (circle radius after resulting vector is drawn)" being dictated by 'camerarecoilvariance'. Camera recoil is affected by weapon modifications which change 'stability'.

### During Continuous Fire

Weapons also experience horizontal recoil, dictated by a recoil pattern unique to every weapon. This recoil pattern undergoes 'cone expansion' under sustained fully-automatic fire or rapid semi-automatic fire. Cone expansion is affected by ammo mods which change 'stability' and is decreased by Tight Grip.

The **sway pattern** also affects where consecutive shots will land during continuous fire, subject to the same mechanics as ordinary idle sway.

# Armor and Components

Armor on vehicles serves two purposes when getting shot: completely blocking penetration (dependent on armor thickness) and reducing vehicle damage on penetration (minimum 50% reduction, but varies depending on vehicle). Armor is worn down when blocking shots, resulting in damage reduction ceasing to be applied if the armor is worn down enough. This can result in even a Light Machine Gun being able to destroy a tank given enough time and ammunition.

Unintuitively, the armor wear down mechanic also means thinner armor wears down slower since less shots are able to be blocked - so as a result thinly armored vehicles are more durable and receive less damage over the course of their lifetime - though have an increased risk to component damage due to penetration.

Armor has a separate HP value that determines how thick it currently is - for instance if armorHP is 80% of the maximum value, the armor thickness will be at 80%. armorHP is multiplied by the vehicle's armorHPMul value. minArmorPercent represents the armorHP level at which armor is fully degraded and no longer absorbs damage. Components additionally (or instead) have an internalHP value which represents its health, and when it is fully depleted (i.e. component destroyed) the damage multiplied by totalDamageMultiplier is transferred to the next component (always BaseStructure or Fuselage, which in turn transfers 50% damage to the main vehicle HP). If a component does not 'transferToSecondary', then it applies a flat damage value to the vehicle hitpoints. "The maximum hitpoints the vehicle can lose from one component type is based on the max from one. E.g. if a vehicle has 2 ammo compartments (one that can transfer 1000 dmg and another that can transfer 500 damage), then the total they can transfer is 1000 where the large one can transfer 666 and 333 for the small one."

# Vehicle Handling

Each drivable surface in the game has a material type that determines how a vehicle handles when driving on it. The modifiers are as follows:

* **onRoadPercent** - the portion of the maximum 'onroad' speed of the vehicle that it can travel at when on the surface
* **tractionMul** - the portion of the maximum traction of the vehicle
* **wobbliness**

1. ↑ https://heroesandgenerals.com/forums/topic/90567-111-weapon-and-ammunition-configuration-values/?tab=comments#comment-1296980
2. ↑ https://heroesandgenerals.com/2020/01/update-1-17-1-minor-release/
3. ↑ https://heroesandgenerals.com/2018/10/changelog-1-12-deploy-drive-destroy/