On this page
Heroes: the three classes' values
The six soldier templates of Battlefield Heroes 1.126 (two teams, three classes) differ between the classes in three values only: the run speed, the acceleration and the hit points. Everything else a class feels like comes from its weapons and its abilities. This page gives the numbers, the function of the original that applies each, and a verdict for each: the same in the port, or filed as differing.
The numbers are the game's own data (the soldier, kit and weapon templates of a 1.126 install). A verdict SAME means one worker read the original's function in the listing and laid it beside the port's statements. DIFFERS means the port computes another number, and the difference is filed. Not settled means the function was not read yet, and the page says what is missing. The sweep behind this page is of 2026-11-27.
The numbers#
| Value | Commando | Soldier | Gunner | Template line |
|---|---|---|---|---|
| hit points | 80 | 110 | 150 | armor.maxHitPoints, armor.hitPoints |
| run speed | 5.5 m/s | 4.5 m/s | 3.8 m/s | SoldierRunspeed |
| acceleration (a tick) | 0.3 | 0.2 | 0.2 | SoldierAcceleration |
| deceleration | 0.3 | 0.3 | 0.3 | SoldierDeceleration |
| speed while aiming on foot | 1.5 m/s | 1.5 m/s | 1.5 m/s | SoldierWalkSpeed |
| crouched / lying / swimming | 2 / 0.8 / 2.1 m/s | the same | the same | SoldierCrouchSpeed, SoldierCrawlSpeed, SoldierSwimSpeed |
| jump | factor 1, length 0.98 | the same | the same | SoldierJumpFactor, SoldierJumpLengthFactor |
The two teams differ in the hit boxes' materials only. The default weapons of the two teams have the same numbers in all nine kinds; the knife alone differs by its material, so that a knife does not hurt its own team.
Try it#
Pick a class, a stance and a speed effect. The picker shows the hit points, the speed as the original's getter was read to compute it, and the speed the port computes today.
How each value is applied#
| Value | The original (BFHeroes.exe@bfh126) | The port | Verdict |
|---|---|---|---|
| the run speed | the speed getter 0x0071d0d0, state 3, chosen by the speed state's update 0x0071f2d8 for a standing hero who does not aim; the movement step 0x00721ba7 multiplies the direction by it and by SoldierSpeedFactor | HeroMovement::from_lines, SoldierMove::pose_speed in move_p; the states by update_speed_state (crates/bf2-physics) | SAME |
| aiming, crouched, lying, in water | 0x0071f2d8 picks the state: zoomed on his feet 2 (walk), crouched 1, lying 0, swimming 5; a crouched hero's speed is also multiplied by the zoom's ratio (0x0071f849) | the same states; the crouch factor in soldier_phys.rs aim_view | SAME for the states |
| acceleration and deceleration | 0x00721ba7: each tick the throttle and the strafe move toward the input by (input - x) x factor; under 0.001 they are 0 | move_p: x += (input - x) * k | SAME |
| the speed in the air | 0x00721ba7: air time (2 at a jump) x 0.5 x SoldierInAirSpeed | move_p, the same product | SAME |
| the jump | the jump block of 0x007220df: the up speed is 6.0 x the jump factor; the forward speed is kept x 0.98 | soldier_control, a Heroes arm | SAME |
| the sprint | the sprint state's update 0x00817884: a start is refused while the dissipation time is not above FLT_EPSILON, and the data says 0 | Sprint::update_2142, a Heroes arm | the result is the same: no hero can sprint |
| the speed ramp at a stance change | ((speed - start) x time) / duration + start | ((speed - start) / duration) x time + start: Battlefield 2's order | DIFFERS, in the last bit at most; nothing a player can feel |
| the speed under a speed factor | see below | see below | DIFFERS, filed |
| the hit points | not read in the sweep | the templates' values | not settled by a read; the numbers are the templates' |
| regeneration | the armor template has no regeneration property; whether the armor's update heals was not read | not read | not settled |
| the fall damage | 0x0072ef7f: the up part of the contact speed loses 15; the term is (speed - limit) x speed with the limit 10.5 | bfh_game::fall_damage::terrain_collision | SAME in the statements read |
How a speed effect's factor enters#
A speed effect (Leg It, the Speed Boost, a slow, a field, a weapon's below-health upgrade) is a factor on the soldier's speed. The item's template line gives one factor a class:
| Effect | Template line | Commando | Soldier | Gunner |
|---|---|---|---|---|
Leg It (Increase_Run_Speed) | ability.addUserSpeedModItem 1.1 1.2 1.4 -1 10 4 | 1.1 | 1.2 | 1.4 |
the Speed Boost (HeroSpeed) | ability.addUserSpeedModItem 1.2 1.4 1.4 -1 0 5 | 1.2 | 1.4 | 1.4 |
The getter's factor is the product of three: the status item's, the fire arm's and the player's.
What the original's listing was read to do. The movement step asks the speed getter (0x0071d0d0) for state 7, "the current one". For that state the getter calls itself with the soldier's current state, whose arm has already multiplied the template's speed by the factor, and then multiplies the answer by the factor again (0x0071d1c3, 0x0071d1d0). On land the speed is the template's speed times the factor times the factor. The 1.89 client has the same shape (0x006c094b). Swimming, a factor under 1 counts as 1.
What the port does today. It multiplies once (bf2_physics::soldier::move_p, soldier_control::soldier_speed_p).
| Class | Run speed | Under Leg It, the original as read | Under Leg It, the port today | The port is slower by |
|---|---|---|---|---|
| Commando | 5.5 m/s | 6.66 m/s | 6.05 m/s | 9 % |
| Soldier | 4.5 m/s | 6.48 m/s | 5.40 m/s | 17 % |
| Gunner | 3.8 m/s | 7.45 m/s | 5.32 m/s | 29 % |
The same holds for every other factor the getter takes: a slow of 0.8 is 0.64 in the original as read.
The reading was made twice in the machine code (the class sweep and the ability sweep, 2026-11-27). The patch with its test (heroes_speed_factor_twice_bfh126) is written and is not in the tree: the statement is the server's and the client prediction's both, the played scenarios of the abilities hold the factor once, and a server's statement lands only in front of its replay. Until it lands, a hero under Leg It is slower in the port than in the original by the last column.
The default weapons#
One row a weapon kind a class carries by default. The damage is a random point between a minimum and a maximum that each run in straight lines from the value at 0 m to the value at the medium distance and on to the long distance (0x00705480; ours bfh_game::crit::ProjectileDamage): SAME.
| Weapon | Classes | Rounds a minute | Magazine, reload | Damage over the distance | Critical |
|---|---|---|---|---|---|
| knife | Commando | 120 | none | 28-35 at every distance | 8 % for +25 |
| pistol | Commando, Soldier | 450 | 9, 2 s | 5-9 at 0 m, 13-15 at 12 m, 3-9 from 20 m | 3 % for +10 |
| sniper rifle | Commando | 120 | 8, 2.5 s | 5-7 at 0 m, 15-21 at 30 m, 21-24 from 50 m; head x 1.25, body and limbs x 0.7 | 6 % for +15 |
| SMG | Soldier | 300 | 30, 2 s | 5-9 at 0 m, 8-12 at 18 m, 5-9 from 23 m | 2.5 % for +20 |
| shotgun | Soldier, Gunner | 150, 8 pellets | 10, 3.5 s | a pellet 1.5-5.5 at 0 m, 1-4.5 at 15 m, 0.75-2 from 24 m | 5 % for +2 |
| machine gun | Gunner | 600 | 110, 4 s | 2-6 at 0 m, 5-13 at 13 m, 2-9 from 20 m | 3 % for +8 |
| anti tank weapon | Gunner | 45 | 1, 3.5 s | direct 14-19 at 0 m, 27-33 from 50 m; blast radius 9, damage 7 | |
| TNT | Soldier, Gunner | 1, 5 s | blast radius 6, damage 80; x 0.2 on a soldier | ||
| hand grenade | Soldier | 1, 6 s | blast radius 5, damage 60, falling to 0 at 5 m |
Pick a weapon, a target and a distance:
What every weapon runs through:
| Step | The original | Verdict |
|---|---|---|
| the rate of fire | ticks between shots = 1800 / rounds a minute in whole numbers (0x007958ae): 300 a minute is 6 ticks, 450 is 4, 600 is 3 (weapons) | SAME |
| a direct hit | (angle term x (distance damage + the attacker's item bonus)) x the material table's factor (0x007306dc) | SAME in what was read |
| a blast's fall-off | full inside radius x hotSpotRadiusPercent, then 1 - (distance - inner) / (radius - inner) (0x007281aa; ours bfh_game::explosion::falloff) | SAME |
| a reload's start | the template's reload ticks less the player's ability rate (0x0079b215; ours AmmoComp::do_reload_heroes) | SAME |
| the deviation | (minDev x its zoom factor + fire + speed + turn + misc) x stance x zoom (0x0077b2c6); the nine default weapons set only minDev | SAME in the tail read |
| recoil, the zoom's factor, the projectile's flight | not read | not settled |
The counts of the sweep#
29 rows: 13 of the classes, 6 of the functions every weapon runs through, 9 of the weapon kinds and one of the shop's variants (as ranges). SAME 14, DIFFERS 2 (the speed factor, the stance ramp's last bit), not settled 3 rows whole and parts of 2. The shop's variants were not laid beside the port one by one.
How it is tested#
- The values are the templates' own, read from the game's files in tests of
bfh-gameandbfh-data. - Movement (
crates/bf2-physics/src/soldier.rs,soldier_control.rs): the speed factor that spares swimming from slows, a hero's forced run and blocked input, and a test program of its own showing that a hero's input never reads the lie key (tests/heroes_lie_input.rs). - The speed factor's filed difference on this page has a patch with a test, not landed: until it lands the page's number for the port is what the port does, and the original's is a reading made twice in the machine code.
Four of this page's sixteen addresses stand in a test. The hit points were not read in the sweep; they are the templates'.
In a player's words#
| Feature | For a player |
|---|---|
| +10 hit points item | An item a hero can own: while it is among his kit's abilities his hit point limit is 10 above his class's, and he is set to the new limit when he gets it (a Soldier's 110 becomes 120) |
The checklists#
Each of these has a checklist in the feature ledger: every step of the original's code behind it and every situation it must work in. None is called done until every line is checked.
| Feature | Checked | What it does | What you see |
|---|---|---|---|
| Speed boosts and slows (what a hero moves at) | 9 of 95 lines checked | 2 of 14 | 0 of 14 |
Each of these has a checklist in the feature ledger: every step of the original's code behind it and every situation it must work in. None is called done until every line is checked.
| Feature | Checked | What it does | What you see |
|---|---|---|---|
| +10 hit points item | 1 of 39 lines checked | 0 of 14 | 0 of 14 |
In the code#
| What | Where |
|---|---|
| the hero's movement values | crates/bf2-physics/src/soldier.rs (HeroMovement), soldier_control.rs |
| damage over the distance, critical hits | crates/bfh-game (crit) |
| blasts | crates/bfh-game (explosion) |
| fall damage | crates/bfh-game (fall_damage) |
| a weapon's below-health speed factor | crates/bfh-game (customization::weapon_gear::SpeedBelowHealth) |
Notes: notes/bfheroes/class_sweep.md, notes/bfheroes/ability_sweep.md. See also how damage is worked out, abilities, widgets, the HUD.
docs/dev/heroes/classes.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.