Scene catalog#
Every interactive screen in Lords of the Realm 2 is selected by the one-byte
global lotr2_game_screen_mode (char; 0x507ab8 retail). The game loop's
main per-frame handler lotr2_game_screen_mode_tick (0x438b90) branches on
this value to run each screen's input, draw, and animation logic. The
phase-exit / init dispatcher lotr2_game_ui_on_screen_phase_exit (0x417150)
re-enters a screen's draw or enter function whenever lotr2_game_screen_phase
transitions from 1 (init) to 2 (active).
This catalog is a reference evidence layer. Normative rules live in
docs/spec/ui/. Architecture implementation evidence
lives in docs/architecture/.
Scene model#
lotr2_game_screen_mode — current scene id (char)
lotr2_game_screen_phase — 1 = init / 2 = active (0x59347c)
lotr2_game_wizard_step — sub-step inside mode 0x1f (0x593494)
Overlay push / restore#
Certain actions push a transient overlay without abandoning the underlying scene:
| Function | Address | Action |
|---|---|---|
lotr2_game_ui_queue_screen_action |
0x489419 | Save current mode to DAT_0050c398; enter mode 0x27 (queued action) |
lotr2_game_ui_restore_screen_mode |
0x489491 | Pop: restore DAT_0050c398 as current mode |
lotr2_game_ui_enter_modal_mode |
0x415cb4 | Push current mode; enter overlay mode 0x1e |
lotr2_game_ui_enter_parameter_dialog |
0x415d23 | Push current mode; enter mode 0x21 |
lotr2_game_ui_enter_popup_menu |
0x4154af | Enter popup mode 0x32 |
Palette-fade transition (mode 0x23)#
Mode 0x23 is not a real scene but a transient palette-interpolation state.
lotr2_gfx_begin_palette_fade arms the fade; lotr2_gfx_fade_step steps it
each frame; the prior lotr2_game_screen_mode is restored once complete.
Mode 0x24 is an intermediate step of the same fade sequence.
flowchart LR
tick[lotr2_game_screen_mode_tick]
exit[lotr2_game_ui_on_screen_phase_exit]
mode[lotr2_game_screen_mode]
push[lotr2_game_ui_queue_screen_action]
pop[lotr2_game_ui_restore_screen_mode]
tick --> mode
mode -->|"phase = 1 (init)"| exit
exit -->|"calls enter/draw fn"| mode
push -->|"saves old mode, sets 0x27"| mode
pop -->|"restores saved mode"| mode
Master scene table#
Hex values are in decimal ASCII for printable chars.
| Mode (hex) | ASCII | Scene name | Group | Handler symbol | Address |
|---|---|---|---|---|---|
0x00 |
NUL |
Campaign map | Campaign | lotr2_game_ui_enter_campaign_map_mode |
0x41755f |
0x02 |
STX |
Village view | Campaign | lotr2_game_ui_enter_village_view |
0x44872 (GoG) |
0x04 |
EOT |
Province event popup | Campaign | lotr2_game_ui_present_province_event_popup |
0x422da2 |
0x08 |
BS |
Merchant | Castle & Economy | lotr2_game_ui_enter_merchant_screen |
0x41ddbd |
0x09 |
HT |
Faction stats | Diplomacy | lotr2_game_ui_draw_faction_stats_dialog |
(pass 37) |
0x0a |
LF |
Armoury | Castle & Economy | lotr2_game_ui_enter_armoury_screen |
0x41fcc1 |
0x0b |
VT |
Diplomacy faction dialog | Diplomacy | lotr2_game_ui_draw_diplomacy_faction_dialog |
0x43db3d |
0x0c |
FF |
Merchant trade | Castle & Economy | lotr2_game_ui_enter_merchant_trade_mode |
0x42580 (GoG) |
0x0d |
CR |
Armoury refresh (post-dismiss) | Castle & Economy | lotr2_game_ui_refresh_armoury_screen |
0x41ff10 |
0x0f |
SI |
Build-action dialog | Castle & Economy | lotr2_game_ui_draw_build_action_dialog |
0x41804 (GoG) |
0x10 |
DLE |
(map overlay; scroll context) | — | — | — |
0x11 |
DC1 |
Post-siege result | Battle & Siege | lotr2_game_ui_enter_post_siege_screen |
0x4210d0 |
0x12 |
DC2 |
Siege field-battle outcome | Battle & Siege | lotr2_game_ui_draw_siege_field_battle_outcome_panel |
0x428715 |
0x13 |
DC3 |
Siege defender routed | Battle & Siege | lotr2_game_ui_draw_siege_defender_routed_panel |
0x4289ec |
0x14 |
DC4 |
Trade dialog | Castle & Economy | lotr2_game_ui_draw_trade_dialog |
0x418ffe |
0x15 |
NAK |
Move-army dialog | Campaign | lotr2_game_ui_draw_move_army_dialog |
0x41947c |
0x16 |
SYN |
Disband dialog | Campaign | lotr2_game_ui_draw_disband_dialog |
0x419648 |
0x17 |
ETB |
Province overview | Castle & Economy | lotr2_game_ui_draw_province_overview_panel |
0x420470 |
0x18 |
CAN |
Diplomacy minimap | Diplomacy | lotr2_game_ui_draw_diplomacy_minimap_panel |
0x422acd |
0x19 |
EM |
Recruit dialog | Castle & Economy | lotr2_game_ui_draw_recruit_dialog |
0x419abf |
0x1a |
SUB |
Diplomacy text subdialog | Diplomacy | lotr2_game_ui_draw_diplomacy_subdialog_router |
(pass 38) |
0x1b |
ESC |
Siege battle prep | Battle & Siege | lotr2_game_ui_enter_siege_battle_prep_screen |
0x4215a8 |
0x1c |
FS |
Gateway / new-game | Setup Wizard | lotr2_game_ui_enter_gateway_screen |
0x425f59 |
0x1d |
GS |
Siege / castle build start | Battle & Siege | lotr2_game_ui_draw_siege_assault_prep_panel |
0x427a17 |
0x1e |
RS |
Modal overlay | System Dialogs | lotr2_game_ui_enter_modal_mode |
0x415cb4 |
0x1f |
US |
New-game / save / MP lobby wizard | Setup Wizard | lotr2_game_wizard_redraw_current_step |
0x426498 |
0x20 |
SPC |
Great-noble screen | Diplomacy | lotr2_game_ui_enter_great_noble_screen |
(pass 37) |
0x21 |
! |
Parameter dialog | System Dialogs | lotr2_game_ui_enter_parameter_dialog |
0x415d23 |
0x22 |
" |
(transition; internal) | — | — | — |
0x23 |
# |
Palette-fade transition | System Dialogs | lotr2_gfx_begin_palette_fade |
0x34348 (GoG) |
0x24 |
$ |
Palette-fade step 2 | System Dialogs | (paired with 0x23) |
— |
0x25 |
% |
Quit confirm | System Dialogs | lotr2_game_ui_draw_quit_confirm_dialog |
0x43c891 |
0x27 |
' |
Queued screen action | — | lotr2_game_ui_queue_screen_action |
0x489419 |
0x28 |
( |
Battle HUD (primary) | Battle & Siege | lotr2_combat_init_battle_hud_frame |
0x428de3 |
0x2c |
, |
Battle HUD (alt / replay) | Battle & Siege | lotr2_combat_init_battle_hud_frame |
0x428de3 |
0x2d |
- |
(battle cursor context) | — | — | — |
0x2e |
. |
Skirmish score (GoG only) | Setup Wizard | (GoG-specific) | — |
0x30 |
0 |
Battle narrative panel | Battle & Siege | lotr2_game_ui_draw_battle_narrative_panel |
0x428c2d |
0x31 |
1 |
Scroll-speed options | System Dialogs | lotr2_game_ui_draw_scroll_options_dialog |
0x43c864 |
0x32 |
2 |
Popup menu / end-modal | System Dialogs | lotr2_game_ui_enter_popup_menu |
0x4154af |
0x35 |
5 |
Save wizard chrome | Setup Wizard | lotr2_game_ui_draw_save_wizard_chrome(0) |
0x41c77d |
0x36 |
6 |
Load wizard chrome | Setup Wizard | lotr2_game_ui_draw_save_wizard_chrome(1) |
0x41c77d |
0x39 |
9 |
Options dialog | System Dialogs | lotr2_game_ui_draw_options_dialog |
0x41cd6c |
0x3a |
: |
(GoG alternate wizard) | — | — | — |
0x42 |
B |
Game options dialog | System Dialogs | lotr2_game_ui_draw_game_options_dialog |
0x43c49d |
0x43 |
C |
Display options dialog | System Dialogs | lotr2_game_ui_draw_display_options_dialog |
0x43c4b9 |
0x44 |
D |
Intro chapter picker | Setup Wizard | lotr2_game_ui_draw_intro_chapter_dialog |
0x42ace1 |
Modes not in the exit dispatcher#
Several mode values appear in assignment or conditional branches but have no
dedicated case in lotr2_game_ui_on_screen_phase_exit:
0x10— encountered as a valid context alongside mode0in scroll/map tests; role unclear. Possibly a dead or legacy map-context mode.0x22— set transiently atlotr2_game_screen_mode = 0x22(line 17697) then immediately overwritten; likely an in-frame handoff sentinel.0x27— the queued-screen-action placeholder (see overlay model above).0x2d— referenced in cursor-theme logic; role unclear; possibly an in-battle overlay context.0x3a— set in a GoG-only branch alongside0x1f; likely a GoG skirmish wizard alternative.
Scene groups#
| File | Scenes |
|---|---|
| campaign.md | Campaign map, village view, province event, move army, disband |
| castle-economy.md | Merchant, merchant trade, armoury, build-action, trade, recruit, province overview |
| diplomacy.md | Faction stats, diplomacy faction, diplomacy minimap, diplomacy text, great-noble |
| battle-siege.md | Siege prep, siege assault prep, siege outcomes, battle HUD, battle narrative |
| setup-wizard.md | Gateway, new-game/save/MP wizard, save/load chrome, intro chapter, skirmish score |
| system-dialogs.md | Modal overlay, parameter dialog, palette fade, quit confirm, options dialogs |
Evidence sources#
../architecture/game/MODULE.md— screen state machine, dialog symbols../architecture/ui/MODULE.md— overlay/restore stack, palette fadesrc/LORDS2.EXE.clines 19322–19442 —lotr2_game_ui_on_screen_phase_exitexit/init dispatcher