BF2.US bf2-rsdeveloper wiki Parity Discord bf2.us
Battlefield Heroes
On this page

Heroes: abilities and widgets

Heroes

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.

A level-1 ability: active (solid), then recharging (pale); seconds 0 5 10 15 20 25 30 35 40 Burning Bullets 4 + 15 6th Sense 6 + 15 Grenade Spam 8 + 20 Frenzy Fire 10 + 23 Hero Shield 10 + 15 Leg It 4 + 15 I Eats Grenades 4 + 26 Stealth 3.9 + 28 Poisoned Blade 5 + 15 Elixir 5 + 15 Rocket Jump 2 + 30 Tank Shield Prototype 4.1 + 8 Soldier Gunner Commando widget of any class
Level 1 of twelve abilities and widgets: the seconds active, then the seconds of recharge, as the HUD of both of our clients showed them.

What an ability is made of#

PartClassNotes
the itema fire arm template in Objects/Weapons_server.zip, one per ability levelselected through the same item lists as weapons
its clockAbilityAmmoComp (template class 0x94f8, component slot 0xc4f4)derives from the ammo component; CamouflageAmmoComp (0x94f1) derives from it
what it doesGenericAbility (dice.hfe.world.GenericAbility, class 0xea62) with ability components 0xea7a .. 0xea96 (damage modifier .. sound)its own createComponent (BFHeroes.exe@bfh126!0x00637bc6)
the listObjects/Items_server.zip Abilities.xml77 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#

  1. The key. The client sends the key as a player action. In Heroes the client's own key selects nothing (GameLogic::selectWeapon BFHeroes.exe@bfh126!0x00508a9a asks whether this is the server): the player waits for the server (the control block).
  2. The server selects. setActiveWeapon (0x00721491) refuses while the soldier is locked and by the vehicle tests, then enableItem (0x0071dd94): nothing when the list already enables that item.
  3. The item's enable (0x0070b876) answers false while the item is active or when its fire component's isSelectable or preEnable refuse. A recharging widget is refused one step earlier, by AbilityAmmoComp::isSelectable (0x00773468).
  4. AbilityAmmoComp::enable (0x007728de) clears the recharge's start, sets the charge from timeToStayActive and, on the server, makes the status items: the effect is on.
  5. The sound. DefaultSoundComp::enable (0x00777ec5) plays the deploy sound when 9 ticks have passed since the last.
  6. 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.
  7. 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.
Two forms of the item block

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)ClassActiveRechargeNotes
Burning BulletsSoldier4.0 s15 s
6th SenseSoldier6.0 s15 sthe rim, the glow and the sound's start are checked in the page too
Grenade SpamSoldier8.0 s20 s
Combat MedicineSoldier20 sthe recharge starts 1.0 s after the enable
Explosive KegGunner20 sfrom the throw
Frenzy FireGunner10.0 s23 s
Hero ShieldGunner10.0 s15 sused up by damage: the recharge started 6.2 s after the enable in the test
Leg ItGunner4.0 s15 s
I Eats GrenadesGunner4.0 s26 s
StealthCommando3.9 s28 s
Poisoned BladeCommando5.0 s15 s
ElixirCommando5.0 s15 s
Rocket Jumpwidget2.0 s30 s
Tank Shield Prototypewidget4.1 s8 sused from a vehicle's seat
Pocket Jeepwidget12 sfrom 0.7 s after the enable
Festive Fireworkwidget3 sa 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.

AbilityClassPer levelReady again
Bandageevery classheals 6 / 7 / 8 / 9 / 12 % of the maximum every 1.5 s for 12 s3 s
Wrenchevery classrepairs 3 / 4 / 5 / 7 / 10 % of the vehicle's armour every second for 6 s15 / 15 / 13 / 13 / 10 s
Combat MedicineSoldierradius 8 m; heals the user 15 / 21 / 27 / 33 / 40 %, plus 5 % (level 1) for each mate healed20 / 18 / 16 / 14 / 12 s
Burning BulletsSoldier5 / 6 / 7 / 8 / 9 damage every 1.5 s for 6 s; armed 4 / 4 / 5 / 5 / 6 s15 / 15 / 13 / 13 / 10 s (Nationals' level 5: 15)
6th SenseSoldier6 / 7 / 8 / 10 / 12 s; team mates within 10 m see through walls too
Grenade SpamSoldier3 / 4 / 5 / 6 / 7 grenades of 20 / 17 / 15 / 13 / 12 damage within 10 m20 down to 12 s
Blasting StrikeSoldierradius 6 / 7 / 8 / 9 / 12 m, 1 damage; force 550 / 575 / 600 / 625 / 650 on soldiers
Hero ShieldGunnera 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 ItGunnera 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 GrenadesGunnerradius 5 / 6 / 7 / 8 / 9 m for 4 / 5 / 7 / 8 / 10 s; heals 1 / 2 / 3 / 4 / 5 % for each one eaten26 / 24 / 21 / 18 / 16 s
Frenzy FireGunner4 / 5 / 6 / 7 / 8 health back on every fourth hit, accuracy +10 to +50 %, for 10 s23 / 20 / 17 / 14 / 10 s
Explosive KegGunner25 / 30 / 35 damage within 6 m, 40 / 45 within 8 m, after 3 s; a slow from level 2
StealthCommandoinvisible beyond 15 / 13 / 11 / 9 / 6 m, 40 % solid nearer; until he fires
Mark TargetCommando1 / 1 / 2 / 2 / 3 targets within 400 m, marked for 8 / 9 / 10 / 11 / 12 s
Poisoned BladeCommandopoison 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 ShotCommando+13 / 15 / 17 / 19 / 23 damage for 4 s24 / 21 / 18 / 15 / 13 s (Nationals' level 5: 12)
ElixirCommandoa shield of 10 / 15 / 20 / 25 / 35 and speed x 1.2 for 5 / 7 / 9 / 11 / 13 s15 / 15 / 13 / 13 / 10 s
Troop TrapCommandoarms 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):

WhatState
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 sightmended 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 seatdiffers, 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 matethe 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#

ClassHit points (armor.maxHitPoints)
Commando80
Soldier110
Gunner150

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).

SystemCheckedEqual
movement9090
weapons (15 base hero weapons: rate of fire, magazine, reload, velocity, deviation)10096
abilities (interval, active time, heal / speed / burn values, every level)145130
vehicles (armour, torque, differential, gears)5454
rounds (server settings)2117
health76

How an ability is proven#

Each row of the abilities table (one ability level or one item kind) has a verdict:

VerdictMeaning
PLAYEDa scenario plays a game on our server with a client of ours and asserts the row's effect
PARTplayed, but each scenario names the part of the effect it does not assert
UNITa test without a game
NONEno proof yet
DIFFERSa 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.

FeatureCheckedWhat it doesWhat you see
6th Sense8 of 53 lines checked2 of 172 of 17
Bandage12 of 87 lines checked2 of 150 of 15
Blasting Strike2 of 36 lines checked1 of 160 of 16
Burning Bullets5 of 63 lines checked2 of 160 of 16
Combat Medicine0 of 71 lines checked0 of 160 of 16
Elixir7 of 87 lines checked1 of 150 of 15
Explosive Keg6 of 25 lines checked1 of 16no such lines
Frenzy Fire6 of 58 lines checked1 of 161 of 16
Grenade Spam2 of 58 lines checked0 of 160 of 16
Hero Shield29 of 288 lines checked1 of 160 of 16
I Eats Grenades13 of 96 lines checked1 of 150 of 15
Leg It5 of 58 lines checked2 of 160 of 16
Mark Target20 of 143 lines checked2 of 172 of 17
Piercing Shot2 of 56 lines checked0 of 160 of 16
Poisoned Blade4 of 65 lines checked0 of 160 of 16
Stealth28 of 189 lines checked3 of 163 of 16
Troop Trap24 of 278 lines checked3 of 160 of 16
Wrench12 of 87 lines checked2 of 150 of 15

In the code#

WhatWhere
Heroes' classes and template typescrates/bfh-data (classes), registered through bf2_objects::template::extension
abilities on the servercrates/bfh-game, crates/bfh-server
the client's item blockcrates/bf2-client/src/predict.rs (apply_control_item_heroes)
the HUD's item barcrates/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.

Source: docs/dev/heroes/abilities.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.