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

Heroes: the screens around the game

Heroes

Around the fight a hero reads a great deal: who killed him and with what, how many points a deed gave, who leads the scoreboard, who won. A sweep read each of those numbers, names and texts in the original's code and laid it beside the port's. This page is that sweep's state after its last round, in its own verdict words.

The screens around a round of Heroes before the round the loading page and its bar, the welcome dialog, the line that waits for players in the round the scoreboard, the points that pop up, the event lines in the middle, the chat, the emote wheel dead who killed me and with what, his health bar, the countdown to the spawn the round's end the winner's line, the result dialog, the card with every hero's line at any time the Escape pop-up with its three buttons, the map's screen BFHeroes.exe@bfh126!0x008a9653 (points), 0x008edf33 (the killed panel), 0x00528d2f (the card's order), 0x008e6a5d (a screen's change)
The screens of a round, in the order a hero meets them. Each line of the sweep is one thing a hero reads on one of them.

The HUD's own variables (health, ammunition, the item bar, tickets, name tags) are another sweep's and stand on the HUD; abilities, widgets and classes have their own pages too.

The verdicts, and the count

SAME: the original's function was read against the port's statements. DIFFERS: filed. NOT WIRED: the original writes it and the port does not. MENDED: it differed and is mended in the tree, each with a test that was red before and one mutation caught. After the sweep's round 40 (2026-11-28) its table has 78 rows: 60 SAME, 13 DIFFERS, 4 NOT WIRED, and one that is another sweep's. Several DIFFERS rows are mended since they were filed; the table keeps the verdict it was filed with and adds the mend, and so does this page.

What is the same#

Sixty rows. The larger groups:

ScreenRead as the same
the scoreboarda row's score, kills and third number (deaths; rocket captures in one mode, flag captures in another), the name, a dead hero's grey row and the colours, the order of the rows, the row of a hero who left, the head with the two flags and army names, the picture behind your own row and a friend's, the missions list under the rows, the add-friend and bookmark lines
the pointsthe valor points' pop and sound, hero points, how many points a deed gives, the +N in the middle when the target is off the screen, the war room points of a round
the killed panelwho killed me, the killer's health bar, the weapon's name, which panel shows (killed by, or an accident), the kill message to the killer and his list of killed heroes
experiencethe level arc round the portrait (all thirty levels' numbers equal), the level's number, the level-up line, the prestige bar
the round's startthe welcome dialog, the unranked line, the waiting line
the round's endthe winner's line and the team picture, the winners' valor badge, the card's numbers on the client, the card's parts
the middle of the screenthe special line, the important line, the in-game event line with its queue, "this flag cannot be taken yet", a control point captured or lost, the connection problem line
capture the flag, the rocket modethe lines and voices for a flag picked up, dropped, captured and returned; the line at a spawn in the rocket mode
the chatthe form of a line, what a team, squad or whisper line is sent with, the spam warning, the labels over the input box, whose lines a hero sees
around the gamethe emote wheel, the loading page's bar, the Escape pop-up with its three buttons, the map's screen, the in-game store's two lines

Some of these rest on a read "in outline" or on one part that was not opened; the sweep's rows say which (notes/bfheroes/screen_sweep.md).

What differed and is mended#

WhatThe original, as readState
the end-of-round card's lineseach team's heroes sorted by score (BFHeroes.exe@bfh126!0x00528d2f)MENDED and seen on a page: the card lists by score where it listed by joining order
capture the flag, the line at the spawnone of three lines by who carries which flag (0x008a2203)MENDED and seen on a page
the XP booster's pop beside the portraitthe bonus, not the points (0x006e607c)MENDED and seen on a page: a green +40 beside the portrait
the respawn countdownthe true seconds above 120; the last number stays at the round's endMENDED (the HUD sweep's row; the HUD)
the pre-game linewritten only in the start delay and in the round itself (0x004a5b6e)MENDED on tests; a play would show one frame's difference
the purple points over a target that takes more damagepurple while a damage field holds the target, and a field counts only once it is active (0x0078cf65)MENDED on tests; not seen on a page (its scenario is written and was not played)
the list of killed heroes under the round's resultemptied while the dialog standsMENDED on tests
a chat line of a sender without a teamwhiteMENDED on tests
a demo's key labelsHeroes' own text keysMENDED on tests; a demo's playback was not played
the centre info line's two timed textsHeroes' own keysMENDED; nothing changes on a screen, because no node of version 1.126 shows the line

What differs today#

WhatThe original, as readThe portWhat a hero meets
a kill's assistersthe server gives each assister of a kill one kill on the scoreboard and tells his client (0x00753ebe); his HUD adds the row "Assist Kill" with the victim's portrait (0x008a9653)the server runs Battlefield 2's form; the client has no case for the eventno kill and no row for the assister. No mend: it waits for the owner's yes or no, because stored progress would change
the picture that slides in while an ability is activethe component does nothing when its ability turns on or off (0x007e4bdc); nothing posts the events the pictures' manager handlesthe port posts them itselfwith the one shipped ability that has the component, a picture slides in for its 12 s; the original shows none. Whether it goes is the owner's call
the change from one screen to anothereach screen's lists of flags (0x008e6a5d, read whole)the same for most; four things differat the round's end a special message line that is up, the vehicle icon and the "killed by myself" flag stay as they were. The mend is written, not built. Not seen on a page
the end-of-round card's names and numbersdrawn wholethe port's Flash player sizes the text a little shortsome names and scores lack their last character. The mend is a patch for the Flash player: written, not applied
the scoreboard's totals rowsno node of version 1.126 shows themthe key differsnothing

What is not wired#

WhatState
basic training's task panelNOT WIRED: the port has no tutorial manager and tasks, which hold the panel's state. Its rules are read (tutorial and missions); more than a mend
the assist on the clientNOT WIRED, with the server's side above
the VIP messagethe client's side is mended since (the HUD sweep); the port's server has no statement that sends the event, so it cannot be played

What the original does not show#

Read so that nobody ports it by mistake:

  • No kill feed line for everyone. The texts are built and handed to a function that only frees them (0x00930032).
  • No line in words for a kill, an assist, a heal, a repair or a capture: all 37 calls of the line's setter pass the flag that leaves it out (0x009300aa).
  • No level and no ping in a scoreboard row, and no totals rows.
  • No "has left the game" line: no function references the key.
  • No options screen and no server list in game: Escape shows the leave pop-up.

What the port has#

PartState
sixty rows of the sweepread as the same
a kill's assisters, server and clientdiffers and not wired; waits for the owner's word
the picture of an active abilitydiffers: the port shows more; the owner's call
the change from one screen to anotherdiffers in four things; the mend is written, not built
the end-of-round card's last charactersdiffers; the mend is an unapplied patch
basic training's task panelnot wired
the purple points, the killed list, the pre-game linemended on tests; not seen on a page

How it is tested#

Every mend of this sweep has a test written from the original's address that was red before the mend, and one mutation that the test caught (how a port is made). What a hero can see was then played on a page built from the tree, beside a page built from the commit before the mend: the card's order (bfh_r0108_card_order), the line at a capture-the-flag spawn, the booster's pop. The rows above that say "not seen on a page" have their tests and no such play yet. See scenarios.

In the code#

WhatWhere
the points and their colourcrates/bfh-client/src/stealth.rs (damage_value, field_active)
the result dialog's frameeor_dialog in crates/bfh-client
the screens' lists of flagscrates/bf2-hud/src/screen.rs (screen_vars_in)
missions on the clientcrates/bfh-client/src/missions.rs

Notes: notes/bfheroes/screen_sweep.md. See also the HUD, widgets, abilities, what is still open.

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