On this page
Heroes: abilities and widgets
Battlefield Heroes added abilities (Burning Bullets, Hero Shield, Stealth, ...) and one-use widgets to an engine that had weapons. It did so with the parts the engine already had: an ability is an item in the hero's hands, selected like a weapon, with an ammo component that counts seconds instead of rounds.
What an ability is made of#
| Part | Class | Notes |
|---|---|---|
| the item | a fire arm template in Objects/Weapons_server.zip, one per ability level | selected through the same item lists as weapons |
| its clock | AbilityAmmoComp (template class 0x94f8, component slot 0xc4f4) | derives from the ammo component; CamouflageAmmoComp (0x94f1) derives from it |
| what it does | GenericAbility (dice.hfe.world.GenericAbility, class 0xea62) with ability components 0xea7a .. 0xea96 (damage modifier .. sound) | its own createComponent (BFHeroes.exe@bfh126!0x00637bc6) |
| the list | Objects/Items_server.zip Abilities.xml | 77 items, 197 asset ids: 18 abilities of five levels (twins of the two factions) and 59 one-level widgets |
The numbers that matter are in each level's own template: ammo.timeToStayActive (the seconds active), ammo.usageInterval (the interval between uses), the ability.add...Item line (what the ability gives), and for a thrown thing the projectile's detonation.* lines. The menu's values in Abilities.xml differ in places: Piercing Shot level 5 shows 12 s in the menu, and its template says 13 s for the Royals and 12 s for the Nationals.
The life of a widget#
- The key. The client sends the key as a player action. In Heroes the client's own key selects nothing (
GameLogic::selectWeaponBFHeroes.exe@bfh126!0x00508a9aasks whether this is the server): the player waits for the server (the control block). - The server selects.
setActiveWeapon(0x00721491) refuses while the soldier is locked and by the vehicle tests, thenenableItem(0x0071dd94): nothing when the list already enables that item. - The item's enable (
0x0070b876) answers false while the item is active or when its fire component'sisSelectableorpreEnablerefuse. A recharging widget is refused one step earlier, byAbilityAmmoComp::isSelectable(0x00773468). AbilityAmmoComp::enable(0x007728de) clears the recharge's start, sets the charge fromtimeToStayActiveand, on the server, makes the status items: the effect is on.- The sound.
DefaultSoundComp::enable(0x00777ec5) plays the deploy sound when 9 ticks have passed since the last. - The control block carries the held item back to the hero's own client, whose item block (
0x007a2f51) enables the same item there: the HUD's slot starts its sweep. - The end. When the charge runs out (or the shield is used up), the ability ends and its recharge starts; the slot's sweep on the HUD shows it.
The block in a soldier's record has two forms. The one our server writes (first bit clear, mask 0x2000) calls setActiveWeapon only for a weapon that is not the list's active one. The optimised form (first bit set, mask 0x80) calls it for lists 1 and 2 on every record. Ours reads and writes the first form only.
The times#
| Ability (level 1) | Class | Active | Recharge | Notes |
|---|---|---|---|---|
| Burning Bullets | Soldier | 4.0 s | 15 s | |
| 6th Sense | Soldier | 6.0 s | 15 s | the rim, the glow and the sound's start are checked in the page too |
| Grenade Spam | Soldier | 8.0 s | 20 s | |
| Combat Medicine | Soldier | 20 s | the recharge starts 1.0 s after the enable | |
| Explosive Keg | Gunner | 20 s | from the throw | |
| Frenzy Fire | Gunner | 10.0 s | 23 s | |
| Hero Shield | Gunner | 10.0 s | 15 s | used up by damage: the recharge started 6.2 s after the enable in the test |
| Leg It | Gunner | 4.0 s | 15 s | |
| I Eats Grenades | Gunner | 4.0 s | 26 s | |
| Stealth | Commando | 3.9 s | 28 s | |
| Poisoned Blade | Commando | 5.0 s | 15 s | |
| Elixir | Commando | 5.0 s | 15 s | |
| Rocket Jump | widget | 2.0 s | 30 s | |
| Tank Shield Prototype | widget | 4.1 s | 8 s | used from a vehicle's seat |
| Pocket Jeep | widget | 12 s | from 0.7 s after the enable | |
| Festive Firework | widget | 3 s | a count of 5; each throw's recharge starts 3.0 s later |
Levels 2 to 5 have their own templates and numbers, and the two factions' twins are not always equal: Burning Bullets level 5 stays active 10 s for the Royals and 15 s for the Nationals.
Levels 1 to 5#
Each level has its own template. The numbers are the templates' (read from a 1.126 install's weapon archive), in the order level 1 / 2 / 3 / 4 / 5; "ready again" is the wait before the next use.
| Ability | Class | Per level | Ready again |
|---|---|---|---|
| Bandage | every class | heals 6 / 7 / 8 / 9 / 12 % of the maximum every 1.5 s for 12 s | 3 s |
| Wrench | every class | repairs 3 / 4 / 5 / 7 / 10 % of the vehicle's armour every second for 6 s | 15 / 15 / 13 / 13 / 10 s |
| Combat Medicine | Soldier | radius 8 m; heals the user 15 / 21 / 27 / 33 / 40 %, plus 5 % (level 1) for each mate healed | 20 / 18 / 16 / 14 / 12 s |
| Burning Bullets | Soldier | 5 / 6 / 7 / 8 / 9 damage every 1.5 s for 6 s; armed 4 / 4 / 5 / 5 / 6 s | 15 / 15 / 13 / 13 / 10 s (Nationals' level 5: 15) |
| 6th Sense | Soldier | 6 / 7 / 8 / 10 / 12 s; team mates within 10 m see through walls too | |
| Grenade Spam | Soldier | 3 / 4 / 5 / 6 / 7 grenades of 20 / 17 / 15 / 13 / 12 damage within 10 m | 20 down to 12 s |
| Blasting Strike | Soldier | radius 6 / 7 / 8 / 9 / 12 m, 1 damage; force 550 / 575 / 600 / 625 / 650 on soldiers | |
| Hero Shield | Gunner | a shield of 30 / 35 / 40 / 50 / 60 points for the user and team mates within 10 m, for 10 / 10 / 15 / 15 / 15 s | |
| Leg It | Gunner | a speed factor by class (Gunner 1.4, Soldier 1.2, Commando 1.1) for the user and team mates on foot within 10 m, for 4 / 5 / 7 / 9 / 12 s | |
| I Eats Grenades | Gunner | radius 5 / 6 / 7 / 8 / 9 m for 4 / 5 / 7 / 8 / 10 s; heals 1 / 2 / 3 / 4 / 5 % for each one eaten | 26 / 24 / 21 / 18 / 16 s |
| Frenzy Fire | Gunner | 4 / 5 / 6 / 7 / 8 health back on every fourth hit, accuracy +10 to +50 %, for 10 s | 23 / 20 / 17 / 14 / 10 s |
| Explosive Keg | Gunner | 25 / 30 / 35 damage within 6 m, 40 / 45 within 8 m, after 3 s; a slow from level 2 | |
| Stealth | Commando | invisible beyond 15 / 13 / 11 / 9 / 6 m, 40 % solid nearer; until he fires | |
| Mark Target | Commando | 1 / 1 / 2 / 2 / 3 targets within 400 m, marked for 8 / 9 / 10 / 11 / 12 s | |
| Poisoned Blade | Commando | poison 5 / 7 / 9 / 12 / 15 every 2 s for 6 s; the knife's critical chance 10 / 15 / 20 / 25 / 30 %; armed 5 s | |
| Piercing Shot | Commando | +13 / 15 / 17 / 19 / 23 damage for 4 s | 24 / 21 / 18 / 15 / 13 s (Nationals' level 5: 12) |
| Elixir | Commando | a shield of 10 / 15 / 20 / 25 / 35 and speed x 1.2 for 5 / 7 / 9 / 11 / 13 s | 15 / 15 / 13 / 13 / 10 s |
| Troop Trap | Commando | arms after 5 s, lies 60 to 100 s; 30 / 35 / 40 / 45 / 50 damage within 12 m, trigger 3 m; poison |
How a speed factor enters a hero's speed is a filed difference (classes).
Where the port stands on the abilities#
Every one of the 18 abilities was read in the original's listing, whole or in part, and laid beside ours (the sweep of 2026-11-27):
| What | State |
|---|---|
| what the ability does (who is healed, shielded, marked, by how much) | the same in what was read for 15 of the 18 (five of them, Burning Bullets, Poisoned Blade, Piercing Shot, Troop Trap and Grenade Spam, read in part); Mark Target differed in its line of sight and is mended (below); the Hero Shield differs for a team mate in a vehicle seat (below); for Blasting Strike and the Explosive Keg the sweep gives no verdict beyond the effect's kind |
| the kind of the effect an ability puts on its user (which the HUD and other players' clients read) | differed in 11 abilities; mended in the tree, with a test that failed before the mend |
| Mark Target's line of sight | mended in the tree (2026-11-27): in the original no soldier stands in a mark's way (its ray ignores every soldier, 0x00739d40), and the port's mark now asks the terrain and the objects without the soldiers. Its test mark_line_heroes was red before the mend and one mutation was caught. Played in the desktop client; not yet played on a page. |
| Hero Shield for a team mate in a vehicle seat | differs, not mended (found 2026-11-28): as read, the original's query does not answer a soldier who sits in a seat (0x0076528b, 0x009c55a0), so a seated mate gets no shield; in the port he gets it. A test is written and not yet built, so there is no red run of it. |
| Combat Medicine for a seated team mate | the same in who is healed; not settled in the distance that is measured (the vehicle's root there, the mate's seat here) |
Details an ability's user may meet, as read:
- Bandage: when the hero burns or is poisoned, the update ends every damage-over-time on him, and a Bandage that cured in that update heals nothing in it.
- Wrench: from any seat, the root of the vehicle he sits in is repaired.
- 6th Sense is the client's own: every half second it looks whether one of his active items, or a team mate's within 10 m, sees through walls.
- Mark Target picks, among the enemies' soldiers and occupied vehicles within 400 m, the one nearest the centre of the user's view, once per target.
- I Eats Grenades runs in every update while it is active and looks at every projectile within its radius.
The hero's values#
| Class | Hit points (armor.maxHitPoints) |
|---|---|
| Commando | 80 |
| Soldier | 110 |
| Gunner | 150 |
A value audit compares our templates with the 1.126 data and constants on fixed inputs (tools/bfheroes/parity_audit.py): 417 values checked, 392 equal, 24 not verifiable yet, and one that deviated and was mended (sv.endDelay: 15 in Heroes, where Battlefield 2 and 2142 keep 10).
| System | Checked | Equal |
|---|---|---|
| movement | 90 | 90 |
| weapons (15 base hero weapons: rate of fire, magazine, reload, velocity, deviation) | 100 | 96 |
| abilities (interval, active time, heal / speed / burn values, every level) | 145 | 130 |
| vehicles (armour, torque, differential, gears) | 54 | 54 |
| rounds (server settings) | 21 | 17 |
| health | 7 | 6 |
How an ability is proven#
Each row of the abilities table (one ability level or one item kind) has a verdict:
| Verdict | Meaning |
|---|---|
PLAYED | a scenario plays a game on our server with a client of ours and asserts the row's effect |
PART | played, but each scenario names the part of the effect it does not assert |
UNIT | a test without a game |
NONE | no proof yet |
DIFFERS | a known difference from the original, with its task |
A scenario is played on the desktop client and then again with the same script in the browser's client, and the two HUD traces are laid side by side: the enable, the recharge, the slot's reload sweep, a consumable's count. Where both clients show the same numbers, the table above has them.
The abilities' 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 |
|---|---|---|---|
| 6th Sense | 8 of 53 lines checked | 2 of 17 | 2 of 17 |
| Bandage | 12 of 87 lines checked | 2 of 15 | 0 of 15 |
| Blasting Strike | 2 of 36 lines checked | 1 of 16 | 0 of 16 |
| Burning Bullets | 5 of 63 lines checked | 2 of 16 | 0 of 16 |
| Combat Medicine | 0 of 71 lines checked | 0 of 16 | 0 of 16 |
| Elixir | 7 of 87 lines checked | 1 of 15 | 0 of 15 |
| Explosive Keg | 6 of 25 lines checked | 1 of 16 | no such lines |
| Frenzy Fire | 6 of 58 lines checked | 1 of 16 | 1 of 16 |
| Grenade Spam | 2 of 58 lines checked | 0 of 16 | 0 of 16 |
| Hero Shield | 29 of 288 lines checked | 1 of 16 | 0 of 16 |
| I Eats Grenades | 13 of 96 lines checked | 1 of 15 | 0 of 15 |
| Leg It | 5 of 58 lines checked | 2 of 16 | 0 of 16 |
| Mark Target | 20 of 143 lines checked | 2 of 17 | 2 of 17 |
| Piercing Shot | 2 of 56 lines checked | 0 of 16 | 0 of 16 |
| Poisoned Blade | 4 of 65 lines checked | 0 of 16 | 0 of 16 |
| Stealth | 28 of 189 lines checked | 3 of 16 | 3 of 16 |
| Troop Trap | 24 of 278 lines checked | 3 of 16 | 0 of 16 |
| Wrench | 12 of 87 lines checked | 2 of 15 | 0 of 15 |
In the code#
| What | Where |
|---|---|
| Heroes' classes and template types | crates/bfh-data (classes), registered through bf2_objects::template::extension |
| abilities on the server | crates/bfh-game, crates/bfh-server |
| the client's item block | crates/bf2-client/src/predict.rs (apply_control_item_heroes) |
| the HUD's item bar | crates/bfh-ui, crates/bfh-client |
Notes: notes/bfheroes/abilities.md, abilities_table.md, abilities_page.md, classes.md, parity.md. More on Heroes: the classes' values, damage, the HUD, widgets, the game.
docs/dev/heroes/abilities.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.