Game state globals (partial recovery)
Provenance from pass 47b, pass 51, and pass 52 rename evidence in
LORDS2.EXE.c. Confidence: likely for turn-phase
flags and map cell base; confirmed for pass-51/52 session/view/globals.
Player slot (0x00580bac)
| Offset (VA) |
Symbol |
Role |
0x00580bac |
lotr2_game_local_player_slot |
Local player index (0-based); indexes player records at stride 0x160; join-handshake payload field |
Active view (0x0059c220)
| Offset (VA) |
Symbol |
Role |
0x0059c220 |
lotr2_game_active_view |
Top-level view context: 0 = campaign map, 2 = battle/siege; gates lotr2_game_dispatch_click, combat frame tick, SFX routing |
Value 1 is compared in a few paths (e.g. lotr2_combat_resolve_attack_province_slot) but no direct assignment observed in this export — may be legacy or set indirectly.
UI pointer state (0x005042cc–0x005042d0)
| Offset (VA) |
Symbol |
Role |
0x005042cc |
lotr2_ui_mouse_x |
Last mouse X; used by scroll-bar and toolbar hit tests |
0x005042d0 |
lotr2_ui_mouse_y |
Last mouse Y; paired with lotr2_ui_mouse_x |
Map tile grid (0x005934e0)
| Offset (VA) |
Symbol |
Role |
0x005934e0 |
lotr2_map_tile_index_grid |
0x81×0x41 dword array of province-cell indices; walked by lotr2_map_paint_visible_grid and entity draw passes |
See also map/MODULE.md.
Province scan scratch (0x0059c374)
| Offset (VA) |
Symbol |
Role |
0x0059c374 |
lotr2_game_province_cell_scan_index |
Linear cell index during 64×64 province structure search in lotr2_map_locate_province_structures (+8 per step) |
Turn-phase acknowledgment flags (0x0059b87c–0x0059b8a4)
Paired with lotr2_game_turn_phase (1–4) and toolbar handlers
lotr2_game_action_turn_phase*_toggle / lotr2_game_action_end_turn.
| Offset (VA) |
Symbol |
Role |
0x0059b87c |
lotr2_game_turn_phase1_ack |
Phase 1 toggle; SP flips 0/1; MP sends net opcode 0x32 |
0x0059b880 |
lotr2_game_turn_phase2_ack |
Toggled in lotr2_game_action_end_turn before economy/diplomacy loop |
0x0059b884 |
lotr2_game_turn_phase3_ack |
Phase 3 toggle; also gates map entity PL8 vs scaled sprite blit (0xfff0000 encoding) |
0x0059b8a4 |
lotr2_game_turn_phase4_ack |
Phase 4 toggle |
UI / settings toggles (0x0059b82c–0x0059b874)
| Offset (VA) |
Symbol |
Role |
0x0059b86c |
lotr2_game_ui_action_slots_active |
UI slot table gate; toggled by lotr2_game_action_toggle_ui_slots |
0x0059b870 |
lotr2_game_map_scroll_lock |
Scroll-lock; clears _DAT_00507754 when toggled |
0x0059b874 |
lotr2_game_wizard_panel_dirty |
Wizard numeric panel refresh; lotr2_game_ui_draw_wizard_numeric_panel |
0x0059b868 |
lotr2_game_settings_opt_flag_a |
Settings screen string variant (on/off line at Y=0xd0) |
0x0059b82c |
lotr2_game_settings_opt_flag_b |
Settings screen string variant (on/off line at Y=0xe0) |
Province cell table (0x00552180)
64×64 cells, 8-byte stride, linear index (y × 0x40 + x) × 8.
Seeded from l2_maps.dat by lotr2_map_load_from_dat; see
lotr2_maps_dat_record.md.
| Cell offset |
Symbol (base + offset) |
Seeded from dat |
Role |
| +0x00 |
lotr2_map_province_cell |
no |
Display / structure type (castle, farm, etc.) |
| +0x01 |
DAT_00552181 |
flags_plane |
Cell flags (0x20 start unit, 0x40 layer, 0x80 slot pair, 0x10 special) |
| +0x02 |
DAT_00552182 |
layer_a_plane |
Layer byte A |
| +0x03 |
DAT_00552183 |
layer_b_plane |
Layer byte B |
| +0x04 |
DAT_00552184 |
layer_c_plane |
Layer byte C |
| +0x05 |
DAT_00552185 |
no |
Passability / occupancy |
| +0x06 |
DAT_00552186 |
no |
Structure sprite / backup layer byte |
| +0x07 |
DAT_00552187 |
province_id_plane |
Province id (0 = none; gameplay uses < 0x12) |
Map scratch
| Offset (VA) |
Symbol |
Role |
0x0055a6c4 |
lotr2_game_map_entity_draw_token |
Per-column entity value from lotr2_map_tile_index_grid during lotr2_game_ui_draw_map_entities_layered |
AI sim turn phase (0x0055abd0)
Distinct from UI toolbar lotr2_game_turn_phase @ 0x0059347c.
| Offset (VA) |
Symbol |
Role |
0x0055abd0 |
lotr2_game_ai_turn_phase |
Outer sim phase 1–7; switched in lotr2_game_ai_turn_phase_tick; advanced by lotr2_game_ai_advance_turn_phase |
AI player step array (0x0055ada0)
| Offset (VA) |
Symbol |
Role |
0x0055ada0 |
lotr2_game_ai_player_step |
Per-player inner step (0–13, 999=done); reset by lotr2_game_ai_reset_step_counters |
Army / build tables
| Offset (VA) |
Symbol |
Role |
0x005643d0 |
lotr2_game_army_record_table |
Army record base; stride 0x1a4 per slot |
0x00551e00 |
lotr2_game_build_slot_index |
Build-queue scan cursor in lotr2_game_build_find_active_slot |
0x005637e0 |
lotr2_game_province_event_flags |
Province event-popup layout bitmask |
UI scratch / modal
| Offset (VA) |
Symbol |
Role |
0x005f13e0 |
lotr2_game_ui_text_scratch |
Eng-string draw buffer for lotr2_game_ui_draw_eng_string |
0x005da4b4 |
lotr2_game_ui_draw_y_baseline |
Line Y offset accumulator; reset before each draw row |
0x005042c5 |
lotr2_game_ui_modal_active |
Non-zero when modal/dialog input is active |
0x00580450 |
lotr2_game_ui_toolbar_context_slot |
MP toolbar context panel index (value - 0x123) |
Combat tile scan scratch (0x0059c9e8–0x0059c9ec)
| Offset (VA) |
Symbol |
Role |
0x0059c9e8 |
lotr2_combat_tile_scan_x |
Column index in nested combat LOS tile loops |
0x0059c9ec |
lotr2_combat_tile_scan_y |
Row index in nested combat LOS tile loops |
Config block (0x0059b800)
| Offset (VA) |
Symbol |
Role |
0x0059b800 |
lotr2_game_config_block |
0x41c-byte block persisted to lords2.inf; first 32 bytes also used as join player name |
Difficulty / culture (0x0059b888–0x0059b8a8)
| Offset (VA) |
Symbol |
Role |
0x0059b8a8 |
lotr2_game_difficulty_preset |
Campaign difficulty 0–3; drives table lookups in lotr2_combat_sync_difficulty_flags |
0x0059b888 |
lotr2_game_culture_count |
(preset + 2) - lotr2_net_roster_player_count; gates culture-kind checks |
Combat group scratch (pass 53)
| Offset (VA) |
Symbol |
Role |
0x00583140 |
lotr2_combat_group_table |
0x34-byte group slots 1..0x50 (lotr2_battle_group.md) |
0x0055ab40 |
lotr2_combat_group_alloc_index |
Free-slot scan cursor in lotr2_combat_alloc_group_slot |
0x0055ab18 |
lotr2_combat_cur_group_index |
Active group index for group-order handlers |
0x0056432c |
lotr2_combat_focus_group_index |
Focus group for lotr2_combat_move_group_to_tile |
0x00507754 |
lotr2_combat_hover_poll_time_ms |
Figure-hover tooltip poll throttle (timeGetTime) |
0x00507560 / 0x00507564 |
lotr2_combat_tooltip_blit_x / _y |
Tooltip blit origin from hover poll |
Open questions
- Exact semantics of province cell bytes +0, +5, +6 (not written by dat load)
- Whether
lotr2_game_turn_phase3_ack is strictly turn UI or also the map PL8 draw mode
lotr2_game_active_view == 1 assignment path
- Exact semantic meaning of
lotr2_net_join_flags and lotr2_net_session_setup_state
- Remaining player-record roster flags at
0x55ada4 (pass 57 queue — see lotr2_player_record.md)