Castle & economy scenes#
Scenes accessed from a province's castle or economy panel: trading goods, managing the armoury build queue, recruiting armies, reviewing province outputs, and entering the merchant.
0x08 — Merchant#
Summary. The merchant overlay screen where the player can buy and sell goods (food, wood, iron, pitch). Entered from the campaign map when a province with a merchant is selected and the merchant button is pressed.
Entry. lotr2_game_ui_enter_merchant_screen called via the exit
dispatcher; also set to 0x08 at line 44910 in the map-click handler when
the merchant action is triggered.
Exit. Dismiss or trade confirm; mode restores to campaign map
(lotr2_game_return_to_campaign_map) or transitions to merchant trade
(0x0c).
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_enter_merchant_screen |
0x41ddbd | Merchant overlay enter/draw |
Evidence. src/LORDS2.EXE.c line 19384; line 44910; architecture
../architecture/game/MODULE.md (Screen-mode dialogs pass 31d).
Confidence. likely — handler named; trade-quantity interaction not fully traced.
0x0a — Armoury#
Summary. The armoury screen for a castle province. The player sees and manages the build queue for weapons and siege equipment. Up to three build slots are shown with type, progress, and resource cost.
Entry. lotr2_game_ui_enter_armoury_screen via exit dispatcher
(mode 0x0a); also entered on init from province overview (0x17) via
lotr2_game_ui_enter_armoury_screen(1).
Exit. Dismiss armoury; transitions to armoury-refresh mode 0x0d to
reload assets, then returns to campaign map or province overview.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_enter_armoury_screen |
0x41fcc1 | Armoury screen enter/draw |
lotr2_game_ui_draw_armoury_stat_rows |
0x420005 | Draw 8 armoury build-slot stat rows |
lotr2_game_ui_blit_armoury_build_slots |
0x420243 | Blit active build-slot sprites |
lotr2_game_ui_draw_armoury_weapon_panel |
0x4202e3 | Load/draw selected weapon type PL8 panel |
lotr2_game_action_build_queue_increment_slot |
0x43d46b | Increment build-queue slot |
lotr2_game_action_build_queue_decrement_slot |
0x43d4ed | Decrement build-queue slot |
Evidence. src/LORDS2.EXE.c line 19393; architecture
../architecture/game/MODULE.md (Castle interior / gateway UI pass 37).
Confidence. confirmed — symbols and build-slot stride (6 bytes per slot
at army record +0x52) documented in pass 36.
0x0c — Merchant trade#
Summary. A sub-screen of the merchant flow where the actual trade
quantities are confirmed. Distinct from the merchant overview (0x08) in
that the player commits buy/sell amounts.
Entry. lotr2_game_ui_enter_merchant_trade_mode via exit dispatcher;
set at line 42580.
Exit. Trade confirm or cancel; returns to merchant (0x08) or campaign
map.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_enter_merchant_trade_mode |
(pass 37) | Merchant trade mode enter/draw |
Evidence. src/LORDS2.EXE.c line 19411; line 42580; architecture
../architecture/game/MODULE.md.
Confidence. likely — handler name recovered; trade-quantity layout not fully mapped.
0x0d — Armoury refresh (post-dismiss)#
Summary. A transient mode set immediately after dismissing an armoury
sub-dialog (e.g. the weapon panel). The game reloads armoury assets before
redisplaying mode 0x0a. Not a player-visible scene in its own right.
Entry. lotr2_game_ui_refresh_armoury_screen at 0x41ff10; mode 0x0d
set at line 39530 during armoury-dialog teardown.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_refresh_armoury_screen |
0x41ff10 | Reload armoury assets after dialog dismiss |
Evidence. Architecture
../architecture/game/MODULE.md (Castle interior / gateway UI pass 37);
src/LORDS2.EXE.c line 39530.
Confidence. likely — reload function named; exact transition sequence not fully confirmed.
0x0f — Build-action dialog#
Summary. The dialog for selecting and queuing a construction action on a province (farm, castle upgrade, lumber camp, etc.). Invoked from the build toolbar when a province is selected.
Entry. lotr2_game_ui_draw_build_action_dialog via exit dispatcher; set
at line 41804 from the build-menu hit-test.
Exit. Select an action or cancel; mode returns to campaign map or castle panel.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_draw_build_action_dialog |
(pass 33d) | Build-action dialog draw |
lotr2_game_ui_hit_test_build_action |
0x41b2d | Build-menu toolbar hit test; sets build action |
lotr2_game_ui_exit_build_submode |
0x442c37 | Exit build sub-screen; restore map or mode 0x18 |
Evidence. src/LORDS2.EXE.c line 19429; line 41804; architecture
../architecture/game/MODULE.md (Campaign UI / sync pass 35).
Confidence. likely — entry confirmed; dialog row layout partially mapped.
0x14 — Trade dialog#
Summary. Army resource-trade panel allowing transfer of goods between the selected army and its province. Launched from the army panel upper-left.
Entry. lotr2_game_ui_on_army_panel_trade (0x424a3) sets mode 0x14;
also set directly at line 41951.
Exit. Confirm or cancel; mode returns to campaign map.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_draw_trade_dialog |
0x418ffe | Trade dialog draw |
lotr2_game_ui_on_army_panel_trade |
0x424a3 | Army panel upper-left → mode 0x14 |
Evidence. src/LORDS2.EXE.c line 19417; line 41951; architecture
../architecture/game/MODULE.md (Campaign UI cluster pass 27).
Confidence. likely — handler named; trade-quantity internals not traced.
0x17 — Province overview#
Summary. A summary panel showing a selected province's gold, population, development progress, and other statistics. May also trigger armoury entry on phase init when a castle is present.
Entry. Exit dispatcher routes mode 0x17 to
lotr2_game_ui_draw_province_overview_panel; when param_1 == 1,
lotr2_game_ui_enter_armoury_screen(1) is called first (armoury pre-load).
Exit. Dismiss returns to campaign map.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_draw_province_overview_panel |
0x420470 | Province gold/pop summary draw |
lotr2_game_ui_draw_status_bar_overlay |
0x421a97 | Bottom status strip and debug mem overlay |
lotr2_game_ui_draw_number_with_table_caption |
0x4228d7 | Number + table-8 caption helper |
Evidence. src/LORDS2.EXE.c lines 19395–19399; architecture
../architecture/game/MODULE.md (Castle interior / gateway UI pass 37).
Confidence. likely — handler named; stat row layout partially mapped.
0x19 — Recruit dialog#
Summary. The unit-recruitment panel where the player selects a troop type and quantity to raise in a province. Entered from the army panel lower-right.
Entry. lotr2_game_ui_on_army_panel_recruit (0x423f7) sets mode
0x19.
Exit. Confirm recruit (deducts gold, spawns army via
lotr2_game_recruit_spawn_army) or cancel; returns to campaign map.
| Symbol | Address | Role |
|---|---|---|
lotr2_game_ui_draw_recruit_dialog |
0x419abf | Recruit dialog draw |
lotr2_game_ui_on_army_panel_recruit |
0x423f7 | Army panel lower-right → mode 0x19 |
lotr2_game_recruit_spawn_army |
0x4c23f1 | Spawn army; debit gold |
lotr2_game_mp_send_menu_selection_inc |
0x441bf3 | Build-menu increment (SP local or opcode 0x1f) |
lotr2_game_mp_send_menu_selection_dec |
0x441cb7 | Build-menu decrement (SP local or opcode 0x20) |
Evidence. src/LORDS2.EXE.c line 19426; architecture
../architecture/game/MODULE.md (Campaign UI cluster / castle pass 36).
Confidence. likely — entry confirmed; recruit-type encoding not fully documented.
Evidence sources#
../architecture/game/MODULE.md— passes 27, 31d, 33d, 35, 36, 37src/LORDS2.EXE.clines 19322–19442 — exit/init dispatcher