Skip to content

Campaign scenes#

Scenes encountered during the main campaign-map loop. The base scene is mode 0x00 (campaign map); the others are overlays or dialogs launched from it.


0x00 — Campaign map#

Summary. The primary game view. The player sees the full realm map with province tiles, armies, castle icons, and the status bar / toolbar. Scroll, click, and army-order input are processed here. All other campaign dialogs layer on top of or branch from this scene.

Entry. Set to 0x00 at game start (lotr2_game_reset_map_state, lotr2_game_return_to_campaign_map), on wizard completion, and whenever an overlay mode restores the prior scene. lotr2_game_ui_enter_campaign_map_mode is called on init (phase = 1).

Exit. Any action that sets a new screen mode (merchant, trade, move-army, etc.) leaves this scene; restore functions write 0x00 back when returning.

Symbol Address Role
lotr2_game_ui_enter_campaign_map_mode 0x41755f Map draw/init; called on phase=1 entry
lotr2_game_screen_mode_tick 0x438b90 Main frame handler; branches on mode 0x00
lotr2_game_pick_scroll_dir 0x43a5af 8-way scroll direction; calls lotr2_game_screen_tick
lotr2_game_dispatch_click 0x43a78c Route click to map or panel
lotr2_game_handle_map_click 0x43a8c8 Hit-test map grid; calls lotr2_game_select_province
lotr2_game_ui_campaign_map_redraw_tick 0x40a9d0 Per-frame campaign map redraw entry
lotr2_game_ui_draw_map_entities_layered 0x40ab7f Full layered entity pass
lotr2_game_return_to_campaign_map 0x43cbd2 Cancel overlay; restore campaign map

Confidence. confirmed — mode 0x00 is the reset target throughout the codebase and the entry function is named.


0x02 — Village view#

Summary. Opens a panel showing a selected province's village/population details. Replaces the map view while active. The player can inspect settlement stats for the highlighted province.

Entry. lotr2_game_ui_enter_village_view called from lotr2_game_ui_on_screen_phase_exit when mode = 0x02; also set directly at line 44872 (GoG).

Symbol Address Role
lotr2_game_ui_enter_village_view (pass 37) Village view enter/draw

Evidence. src/LORDS2.EXE.c line 19432 — exit dispatcher; line 44872 — direct assignment.

Confidence. likely — handler is named but internal layout not fully mapped.


0x04 — Province event popup#

Summary. A modal popup reporting a random province event (plague, drought, bumper harvest, etc.). Drawn as an event-text panel with an icon; dismissed with the OK button.

Entry. Set at line 44856 when lotr2_game_ai_apply_season_random_events schedules a player-facing event. Exit dispatcher routes mode 0x04 to lotr2_game_ui_present_province_event_popup.

Symbol Address Role
lotr2_game_ui_present_province_event_popup 0x422da2 Present event modal; owned vs generic
lotr2_game_ui_setup_province_event_chrome 0x423c6e Event popup layout from province event flags
lotr2_game_ui_draw_province_event_body 0x423f78 Event body text and icons

Evidence. src/LORDS2.EXE.c lines 19434–19436; architecture evidence in ../architecture/game/MODULE.md (Castle interior / gateway UI).

Confidence. likely — symbols named and sequence confirmed; event-flag encoding not fully documented.


0x15 — Move-army dialog#

Summary. An overlay dialog listing adjacent provinces the player can move the selected army to. Available from the army panel lower-left action.

Entry. lotr2_game_ui_on_army_panel_move (0x424ea) sets mode 0x15. Also set directly at line 34739 in the army-panel move handler.

Exit. OK/cancel restores prior scene via lotr2_game_ui_restore_screen_mode. MP sends opcode before applying.

Symbol Address Role
lotr2_game_ui_draw_move_army_dialog 0x41947c Move-army dialog draw
lotr2_game_ui_on_army_panel_move 0x424ea Army panel → mode 0x15 entry
lotr2_game_ui_hit_test_dialog_ok 0x415da6 Modal OK button hit test

Evidence. src/LORDS2.EXE.c line 19420; line 34739; architecture ../architecture/game/MODULE.md (Campaign UI cluster).

Confidence. likely — handler named and entry confirmed; dialog layout not fully mapped.


0x16 — Disband dialog#

Summary. A confirmation dialog for disbanding the selected army. Presented after the player clicks the army panel upper-right disband button.

Entry. lotr2_game_ui_on_army_panel_disband (0x424d3) sets mode 0x16. Line 7347 also assigns directly.

Exit. Confirm or cancel; mode restores to campaign map.

Symbol Address Role
lotr2_game_ui_draw_disband_dialog 0x419648 Disband dialog draw
lotr2_game_ui_on_army_panel_disband 0x424d3 Army panel → mode 0x16 entry

Evidence. src/LORDS2.EXE.c line 19423; line 7347; architecture ../architecture/game/MODULE.md.

Confidence. likely — handler named; dialog internals not yet traced.


Evidence sources#