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

Heroes: the item bar's widgets

Heroes

A widget is a one-key item on the hero's item bar: a tonic, a rocket jump, a pocket jeep, a cake to throw. In the engine it is a fire arm with an ability ammo component, like an ability; what differs is the item its enable makes. This page follows a widget's key and lists each widget with the numbers of its own template.

A widget key, step by step the key PIWeaponSelect + slot the server selects the use tests decide the enable AbilityAmmoComp 0x007728de the item heal, speed, shield, push .. the wait ammo.usageInterval The use tests (0x0070d6a7, 0x00773468): a key is refused .. while the widget's wait runs on foot when the template says disableOutsideVehicle in a seat when it says disableInsideVehicle (or, for any seat, disableInAllVehiclePositions) in a vehicle of another type than the template names (VTScoutCar, VTLightTank, VTFighter) swimming without allowInWater, sky diving without allowInSkyDive, under a parachute without allowInParachute off the ground when it says disableWhileOffGround The item bar crosses a slot out by tests of its own on the client (0x008e4855); they are listed on the HUD page.
A widget's key: the server selects, the use tests decide, the enable makes the item that does the work, and the wait starts.
Where the numbers come from, and the verdicts

The numbers are each widget's own template (the weapon archive of a 1.126 install), not the menu file's, which differs for most widgets. A verdict SAME means the original's function was read in the listing against ours' statements; DIFFERS is a filed difference; partly read says what was read. The sweep is of 2026-11-27 with its state of 2026-11-28 (behind its round 27): 30 widget rows and 3 rows every widget shares. Where a row below says "a test is written, not built", no run of that test exists yet: the difference rests on the reading alone.

What a key does#

  1. The key is the weapon-select control plus the slot's number. In Heroes the client's own key selects nothing: the server selects, and the choice comes back in the control block (the control block).
  2. The use tests decide whether the item may be selected: the fire arm's selectable test (BFHeroes.exe@bfh126!0x0070d6a7) and the ability ammo's (0x00773468).
  3. The enable (AbilityAmmoComp::enable 0x007728de) makes the widget's item from the template's ability.add...Item line: a heal, a speed factor, a shield, a push, a vehicle.
  4. The item runs for ammo.timeToStayActive, then the wait of ammo.usageInterval starts. Some widgets keep their wait through a death: the kit drop keeps the items' wait fraction (0x00724a52), SAME in ours.

The use tests#

A template switches tests on with its own lines:

Template lineThe key is refused
disableInsideVehicle 1in a seat
disableOutsideVehicle 1on foot
disableInAllVehiclePositions 1in any seat, a passenger's too
disableWhileOffGround 1in the air
no allowInWater / allowInSkyDive / allowInParachuteswimming / sky diving / under a parachute
ammo.vehicleRestriction, or the item's vehicle typein a vehicle of another type
while the wait runsalways

The item bar crosses a slot out by tests of the same kind, on the client.

The vehicle type rule#

Four widgets work only in one kind of vehicle. The type is the first value of the item's line:

WidgetTemplate lineWorks in
Jeep JumpaddVehicleJumpIem VTScoutCar 600 45 15 99000 3a jeep
Ramming JeepaddVehicleRammingIem VTScoutCar 100 5 1.5 0.5 99000 2a jeep
Plane Rocket Barrage PrototypeaddVehicleRestrictionItem VTFightera plane
Tank Shield PrototypeaddShield VTLightTank 60 -1 15 0 6a tank

The test is a block of the ability ammo's selectable test (0x007734cd to 0x007735a5). The port's server did not have it: Jeep Jump's key worked at a tank's wheel. MENDED on the server, replayed (the vehicle replay twelve of twelve identical) and played in a Heroes game by a scenario (bfh_widget_vehicle_type).

Pocket vehicles#

addVehicleSpawnItem ger_jeep_kubelwagen bri_jeep_willys VTScoutCar 10 2 0.7 60 3 (and the tank's and the helicopter's lines): the widget puts a vehicle of the hero's team in front of him; wait 12 s; not from a seat, not off the ground. A hero has one pocket vehicle at a time.

WhatThe original, as readThe portState
the order at a second callthe new vehicle is made first, then the earlier one is destroyed (0x007375a8)the same since the mendMENDED on the server: when the new vehicle cannot be made the hero keeps the earlier one. Its test was red on the tree before, one mutation was caught, and the vehicle replay stayed identical (twelve of twelve). Its play shows a blocked place alone, on both sides of the mend.
another player nearthe key is refused while any other living player stands within 5 m of the hero, a team mate too (0x0069985d)the other team's players alone are countedDIFFERS, not in the tree: the mend is a proven patch (red before, green behind, one mutation caught) that waits for the owner's word
the earlier vehicle's endits occupants are put out and it takes its damage in the caller's name (0x0069a16d), so its blast is his: an enemy hurt by it is his damage and his kill, a team mate killed by it his team killthe damage is in nobody's name, and such a death has no killerDIFFERS (read to its end on 2026-11-28); a test is written, not built; not ported

Blasts#

Every exploding widget goes through the explosion (0x0072a930), its two predicates (0x007280ff, 0x00728183), the splash hit (0x0072a3b0) and the fall-off (0x007281aa).

  • The blast asks every object with an armor or a detonation component.
  • The fall-off is full inside radius x hotSpotRadiusPercent (0.2 without a line) and falls in a straight line to 0 at the radius: SAME (bfh_game::explosion::falloff).
  • DIFFERS, not mended: the cover ray is stopped by thrown things in ours and passes them in the original; and a vehicle keeps the cover test in a stomp or gravity weapon's blast in ours.
  • The explosion and the two predicates were read whole; the splash hit itself was read in part.

The widgets#

Seconds are the template's. "Active" is ammo.timeToStayActive, "wait" is ammo.usageInterval.

WidgetWhat its template saysVerdict of the sweep
Terrific Health Tonicheals 50; wait 20 s; not in a vehicle; in water too; the wait is kept through a deathread whole (0x00738487, 0x0052c3ed, 0x00828174)
Bandage (every class, five tiers)6 / 7 / 8 / 9 / 12 % of the maximum every 1.5 s for 12 s; wait 3 s; ends on damage; allowInWater 1read; a Bandage that cures a burn or a poison heals nothing in that update
Wrench (five tiers)repairs 3 to 10 % of the vehicle's armour every second for 6 s; wait 15 to 10 s; only in a vehicleread: from any seat, the root of what he sits in is repaired
Sarge's Rocket and the other rocket fuels, Metallo's Rocket JumpaddRocketPackItem 1.0 1.1 100 0.05 -1.0 1.0 4.0 7.0; active 2 s; wait 30 sSAME as read; ours gives up after 64 blocked directions where the original tries on: no player's difference found
Captain Royal's Speed Boostfactor 1.2 / 1.4 / 1.4 by class for 5 s; wait 15 s; not in a vehiclethe attach and the end SAME; how the factor enters the speed is the filed difference
Jeep Jump, Ramming Jeepactive 4 s / 2 s; wait 5 s; a jeep onlythe vehicle type rule MENDED
Plane Rocket Barrage Prototyperockets of damage 7, radius 9; active 4 s; wait 5 s; a plane onlythe vehicle type rule MENDED
Plane Stealth Prototypewait 13 s; a plane onlyDIFFERS for a passenger: ours refuses him, the original passes him
Tank Shield Prototypea shield of 60 for 15 s; wait 8 s; a tank onlythe vehicle type rule MENDED; the attach read in its first half
Pocket Jeep, Tank, Copteraboveabove
Overchargelocks the movement, the weapon bar and the vehicle access for 3.5 s; a blast of damage 50, radius 8; wait 16 sthe three locks' readers found and read whole (0x00723bdd, 0x0072394d, 0x007239d1)
Teleporta device to throw; the hero is put at it after a delayread whole; DIFFERS for a hero in a passenger's open seat when the delay ends: the original moves the whole vehicle, ours does nothing
Festive Fireworkradius 10, force 20, no damage; wait 3 sits push is the blasts' row
Festive Flarea flare that lives 15 s; wait 15 sread: a hero has at most two flares in the world; the third removes his oldest
Sarge's Fun-Time Footballlives 120 s; wait 120 sread: the ball can be kicked from 1 s after it is thrown
the claws, the punches, the chair smacksa short blast of damage 25 (8 for the punches), radius 4partly read: the use test read, the melee hit not
the fire bombs and the surprise parcelsdamage 80, radius 6, force 12 after 3 s (5 s for one team's)the damage over time's start and update SAME
Festive Egga trap: damage 30, radius 12, then poison 5 every 1.5 s for 12 s; wait 23 sthe blast's row; the trigger not read
the Detonating Brewdamage 40, radius 10, then fire 5 every 1.5 s for 6 s; wait 45 sthe blast's row
the thrown bladesdamage 15 at every distance; wait 3 s; ends a stealththe hit's damage block read
the anniversary cakesdamage 30, radius 2, armed after 0.7 s; wait 3 sDIFFERS: the thrown thing's tumble (fire.randomRotationalSpeed) is missing in ours
Amassing Forcea burst of radius 20 that takes the force's gravity branch in place of the pushthe gravity branch of the force read (0x00728c03)

The filed differences, most used first#

  1. The widget bar's crossed slots: mended for water, sky dive, parachute and the seat (the HUD).
  2. The vehicle type rule: mended on the server, replayed and played; the client's prediction of the key is mended too, on tests, not yet played on a page.
  3. The pocket vehicles' order when the new vehicle cannot be made: mended on the server, with its test and the replay.
  4. The pocket vehicles' key with another player within 5 m: a proven patch, not in the tree; waits for the owner's word.
  5. The Teleport from a passenger's open seat: not mended.
  6. Blasts and thrown things in the cover ray: the mend is written with a rig of six rows; not in the tree.
  7. The tumble of cakes and class grenades: not mended.
  8. The Plane Stealth for a passenger: not mended.

Found since, as the sweep has them on 2026-11-28#

Each of these is a reading laid beside the port's code. Where it says "a test is written, not built", the test has not run: nothing is proven red yet.

WhatThe original, as readThe portState
who is charged for the earlier pocket vehicle's blastthe hero who called the new one (0x0069a16d, 0x0052e974)nobodya test is written, not built; not ported
a hero who ducks in a tank seat that allows ittakes no share of any blast (0x007283c7) and is hidden a quarter second later; his widget keys are refusedthe duck counts for the fire test alone: a blast beside the tank hurts hima test is written, not built; a mend makes the ducked hero stronger: the owner's line; not ported
the force on an armor that refuses force (the hill's rocket alone)left alone in every branch (0x00728c03)asked for a gravity weapon alone: another blast pushes ita test is written, not built; not ported
a hero behind a thing the same blast destroystakes half of each blocked sample's weight (0x007286d1)takes nonea test is written, not built; a mend makes a blast hurt more: the owner's line; not ported
the wait before a heat of team eliminationthe weapon bar is locked for every hero: no weapon change, no widget key, no seat (0x0072394d, 0x00506bb4)the lock asks the hero's abilities alonea test is written, not built; not ported
two movement items of one hero (Leg It and the Speed Boost)the one that ends first leaves the hero at plain speed for the rest of the other (0x00737bbf)the newest item that is left countsa test is written, not built; a mend makes him slower: the owner's line; not ported
a widget's key on a ladder and in a duckrefusedthe use test asks neitherDIFFERS as read; what becomes of the widget in the port was not read; no test
the Rocket Fuels and the Rocket Jumptries on past 64 blocked directionsgives up after 64no difference for a player found

In a player's words#

Three things every widget shares, as the widget sweep's notes tell them. The feature checklists take these sentences from here.

FeatureFor a player
The blastsEvery exploding widget hurts and pushes what stands within its radius: at full strength inside its hot spot, falling off to nothing at the edge. Something in the way between the burst and a thing halves the blast or stops it, except for a strike's, a keg's or a gravity charge's burst, which goes through cover
The widget barThe row of slots at the bottom of the screen, one for each widget: its icon, how many are left, the wait filling up again with a sound and five blinks when the widget is ready, a bar while it runs, and a cross over the slot wherever its key will not work
When a widget's key worksPressing a widget's key does something only where the widget allows it: a vehicle widget not on foot and not for the driver of another kind of vehicle, a widget that forbids seats not in a seat, some not off the ground, in water or under a parachute only when the widget says so, and none before its wait is over

The widgets' 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
4th Anniversary Cake54 of 680 lines checked2 of 190 of 19
Bandage, tiers Crude to Splendid25 of 274 lines checked1 of 190 of 19
Brass-Bender's / Destroyer Drone's Overcharge13 of 103 lines checked1 of 200 of 20
Bruce's Bash / Sly's Sucker-Punch7 of 74 lines checked1 of 19no such lines
Captain Royal's Speed Boost4 of 64 lines checked1 of 190 of 19
Festive Firework6 of 74 lines checked0 of 19no such lines
Festive Flare3 of 108 lines checked1 of 190 of 19
Frost's / Bane's Amassing Force17 of 142 lines checked0 of 190 of 19
Jeep Jump16 of 109 lines checked1 of 190 of 19
Plane Rocket Barrage Prototype3 of 60 lines checked1 of 19no such lines
Plane Stealth Prototype21 of 221 lines checked0 of 200 of 20
Pocket Copter19 of 163 lines checked6 of 190 of 19
Pocket Jeep12 of 122 lines checked1 of 190 of 19
Pocket Tank12 of 122 lines checked1 of 190 of 19
Ramming Jeep15 of 150 lines checked1 of 200 of 20
Royal / National Chair Smack7 of 74 lines checked1 of 19no such lines
Sarge's Fun-Time Football24 of 215 lines checked0 of 190 of 19
Sarge's Rocket Fuel / Turbojet Fuel, Titan / CEC Thruster Fuel5 of 53 lines checked1 of 190 of 19
Tank Shield Prototype28 of 293 lines checked1 of 190 of 19
Teleport9 of 139 lines checked1 of 190 of 19
Terrific Health Tonic15 of 181 lines checked1 of 190 of 19
The blasts (Claw Attack, Firework, Bash / Sucker-Punch, Firebomb / Super Bomb, Surprise, Egg, Brew, Chair Smack)43 of 528 lines checked0 of 200 of 20
The widget bar (every widget's slot: icon, count, wait, crossed out)2 of 62 lines checkedno such lines0 of 19
When a widget's key works (the use tests of every widget)6 of 109 lines checked0 of 190 of 19
Wolf / Vampire Claw Attack7 of 74 lines checked1 of 19no such lines
Wrench, tiers Crude to Splendid14 of 260 lines checked0 of 190 of 19

How it is tested#

  • The ability and widget engine (crates/bfh-game/src/abilities/tests.rs, 77 tests): template values read from the game's own files, an effect that survives a death, an item that ends at its duration, effects that stay on the local player.
  • Blasts (abilities/stomp.rs, explosion.rs): who is pushed and how far, friendlies taking no push, the hot spot of a Heroes explosion.
  • The item bar (crates/bfh-client/src/hud.rs): the slots' fill, the reload sweep, the gates.
  • Played: each widget has scenarios; most assert state (hit points, trace lines) and read no screenshot, which the feature checklists count as "played by state only", not as a check.

By those checklists no widget is done today. The filed differences above have, where it says so, a test that is written and red, or written and not yet built.

In the code#

WhatWhere
the items a widget makescrates/bfh-game (abilities)
the use tests' template bytescrates/bfh-data/src/templates.rs
the server's sidecrates/bfh-server
the barcrates/bfh-client/src/hud.rs (ItemBar, slot_no_use)

Notes: notes/bfheroes/widget_sweep.md, notes/bfheroes/abilities_table.md. See also abilities, classes.

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