Skirmish — scoring and rematch#
Summary#
After a skirmish battle, the client shows an interim screen (0x2e), then a
two-page score report (screens '.' and '/') backed by score1.pl8 and
score2.pl8. The player may rematch (same setup) or return to the gateway menu
(0x1c). A local high-score table (10 entries) appears on the second page.
Confidence: likely for UI flow; speculative for high-score persistence.
Post-battle sequence#
flowchart LR
end["Battle ends"]
split["lotr2_game_battle_apply_casualty_split"]
interim["Screen 0x2e FUN_0042c64f"]
s1["Screen '.' FUN_00421707 score1.pl8"]
s2["Screen '/' FUN_00421d09 score2.pl8"]
action["Rematch or gateway"]
end --> split --> interim --> s1 --> s2 --> action
Trigger: lotr2_game_ui_on_battle_end_return when DAT_0057a0f0 != 0.
Screen 0x2e (interim)#
Sets lotr2_game_active_view = 0, DAT_0052af94 = 2. Prepares transition to
score assets via FUN_0042c64f. MP may route through modal handler
FUN_0043bdcd with sync opcodes before SP return.
Score screen 1 — '.' (FUN_00421707)#
Assets: score1.256, score1.pl8.
Displays both sides:
| Element | Source |
|---|---|
| Local player name | 0x553d54 + local_slot * 0x2c |
| Opponent name | 0x553d54 + DAT_0056d5cc * 0x2c |
| Score totals | DAT_0053e9b4, DAT_0057c95c |
| Column headers | L2.ENG group 0x25 (37): indices 0x26–0x28 map to unit labels (Heavy Infantry, Light Infantry, Slingers, …) |
| Per-type counts | Army record DAT_0052f21c for slots DAT_00553efc+6 vs DAT_00553f34+6 |
| Casualty columns | Start count − end count per type |
Portrait shields: sprite frame culture_color + 8 for each side.
Advance: mouse button flags DAT_004eafb4 / DAT_004eabe0 → screen '/'.
Score screen 2 — '/' (FUN_00421d09)#
Assets: score2.256, score2.pl8.
| Section | Content |
|---|---|
| Top list | 10 entries: DAT_0051fbc0 + i*0x20 names, DAT_0051fd00 + i*4 scores |
| Rank title | L2.ENG group 0x26 (38), index DAT_0053e9e0 |
| Bottom list | 5 entries for local player name + DAT_0051fd28 scores |
Actions:
| Input | Handler | Effect |
|---|---|---|
DAT_004eabe0 |
FUN_0042b780 + audio 0x4d5650 |
Rematch — same wizard step, re-init battle |
DAT_004eafb4 |
FUN_0042b780 + audio 0x4d565c |
Rematch (alternate button) |
FUN_0042b780 → wizard screen 0x1f, step 0xb/0xc, FUN_0042b7f7.
Return to gateway#
During battle intro/outro, DAT_0053f0c4 tags post-battle navigation:
| Value | Meaning |
|---|---|
| 0 | Normal (no gateway redirect) |
| 10 | Return to gateway; increment DAT_0053f258 on lobby re-entry |
| 11 | Return to gateway (alternate win/loss path) |
When 10 or 11: lotr2_combat_enter_mp_lobby_from_battle → screen 0x1c, reload
gateway.pl8. Confirm from gateway calls FUN_004329ec if DAT_0053f258 < 8.
After 8 map rotations, gateway confirm exits to main game shell (screen_mode=0).
Battle report panel (siege stats)#
FUN_00421f14 (related UI, group 0x53 / 83): detailed breakdown using
sgeplans.pl8 — catapults, towers, rams, morale bars. Used in skirmish siege
context when DAT_00568ed0 army slot is set.
High scores#
Storage location not confirmed in this export. Runtime buffers:
- Names @
DAT_0051fbc0(10 × 0x20) - Scores @
DAT_0051fd00(10 × 4) - Per-session local @
DAT_0051fd28(5 × 4)
Open question: whether these persist to disk (registry, .sav, or separate file).
Clone checklist#
- Implement two-page score UI with matching unit-type columns (7 siege / 11 field).
- Track start-of-battle and end-of-battle counts per unit type 0–6 (score UI uses 7 columns).
- Wire rematch to reload same
battle_type,scenario_index, tiers without campaign init side effects. - Rotate
map_index0–7 across gateway returns when tag 10 is set. - Load
score1/score2PL8 + palette assets.
Evidence#
| Symbol | Address |
|---|---|
lotr2_game_ui_on_battle_end_return |
0x0043be65 |
FUN_00421707 |
0x00421707 |
FUN_00421d09 |
0x00421d09 |
FUN_0042b780 |
0x0042b780 |
lotr2_combat_enter_mp_lobby_from_battle |
0x00497879 |
FUN_0042c64f |
(score interim) |
Assets: score1.pl8, score2.pl8, score1.256, score2.256