Game Mechanics

**Achtung! Work In Progress!**
**This page is a Work in Progress.**

**Comment**: MarineScienceDude (talk) 12:20, 18 May 2022 (UTC)

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** - sway when standing
* **swaycrouchmode** - sway when crouched
* **swaypronemode** - sway while prone
* **swayprecisionmodifier** - multiplier for above values when aiming
* **swayspeed** - sway added when moving at 100% run speed
* **swayfatigue** - maximum amount of additional sway from fatigue (which is recovered faster from 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 ammunition upgrades 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 upgrades 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 upgrades and is decreased by Tight Grip when aiming.

Cone expansion also applies to a **spray pattern**, affecting where consecutive shots will land during continuous fire. Cone expansion is counteracted by **cone contraction**, which applies at any time even when firing. The base shape of this spray pattern is identical to the sway pattern, but shot placement is randomised and expansion/contraction of the pattern is independent of idle sway. The variables used in the weapon configuration files are as follows:

* **aimpenaltyperbullet** - cone expansion applied after every shot
* **aimpenaltyprecisionmodifier** - multiplier of aimpenaltyperbullet when aiming
* **aimpenaltycontractionpersec** - the rate of cone contraction (increased by Dead-Eye)
* **aimpenaltyturn** - cone expansion from turning (reduced by Quickdraw)

# Armor and Components

Vehicle armor degrades over time when receiving damage, represented by an '**armorHP**' value which varies across vehicles as per an **armorHPMul** value.

Armor will always absorb damage as long as armorHP value isn't 0 (i.e. Armor fully degraded). It will:

* Absorb 20% damage against direct-type attacks that ricochet (bounce off)
* Absorb 25% damage against direct-type attacks that penetrate
* Absorb 50% damage against explosive-type attacks that penetrate
* Absorb 100% damage against direct-type attacks that fail to penetrate

All absorbed damage will be dealt to the Armor's armorHP instead of the vehicle's hitpoint.

As armor is worn down, the effective thickness decreases proportional to armorHP. For instance, if a vehicle's armorHP is at 80% of its maximum value, the armor thickness will be at 82% original thickness (10% thickness left when armorHP is at 0%, translating to a 9% thickness loss per 10% armorHP lost). As a result, theoretically, even a Light Machine Gun is able to penetrate and destroy a tank given enough time and ammunition.

All armor has a **minArmorPercent** of 0.1, meaning that if their armorHP is fully depleted, they will retain 10% of their original thickness.

When components are destroyed, it deals damage in 2 parts: first part is equivalent to its starting **internalHP** value, which is multiplied by **totalDamageMultiplier**; the second part is the rest of the 'excess' damage after destroying the component. These 2 parts of damage are combined together and then transferred to the next component (always BaseStructure or Fuselage, which in turn transfers 50% damage to the main vehicle HP). The variables used in the configuration files for components are displayed in the table below:

# 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**

Actual speed is determined through this calculation:

(
s
p
e
e
d
−
s
p
e
e
d
O
f
f
R
o
a
d
K
p
h
)
∗
o
n
R
o
a
d
P
e
r
c
e
n
t
s
p
e
e
d
O
f
f
R
o
a
d
K
p
h

{\displaystyle (speed - speedOffRoadKph)\*onRoadPercent+speedOffRoadKph}

1. ↑ https://heroesandgenerals.com/2016/01/hip-fire-and-amp-cone-fire-updated-with-adams-update/
2. ↑ 2.0 2.1 https://heroesandgenerals.com/2020/01/update-1-17-1-minor-release/
3. ↑ 3.0 3.1 3.2 https://heroesandgenerals.com/forums/topic/90567-111-weapon-and-ammunition-configuration-values/?tab=comments#comment-1296980