Skirmish — setup wizard#
Summary#
Skirmish army and map configuration happens on wizard steps 0xb (multiplayer)
and 0xc (single player). Both share draw helpers FUN_0042051c (SP) and
FUN_00420630 (MP). The UI covers battle type, scenario list, army size tiers,
faction color, attacker/defender sides, and (MP) player ready state.
Confidence: likely for control layout; confirmed for battle-type → scenario-count mapping from decompilation.
Wizard steps#
| Step | Hex | Mode | Draw function |
|---|---|---|---|
| 12 | 0xc |
SP vs NPC | FUN_0042051c |
| 11 | 0xb |
MP PvP | FUN_00420630 |
MP panel additionally blits a preview sprite and draws opponent name / ready UI
(FUN_0041ff75, FUN_00420147).
Background assets (lotr2_game_wizard_load_step_assets):
DAT_0056899c |
Palette | Panel |
|---|---|---|
| 0 | skirmish.256 |
skirmish.pl8 |
| 1 | skirmish.256 |
skircust.pl8 |
Battle types (DAT_0053e91c)#
Selected by FUN_0043dc1d from lotr2_game_turn_phase at click time. Special
case: if turn_phase == 3 and DAT_0055cd34 != 0, type forced to 0.
| Type | Value | Scenario count (DAT_0053f0d4) |
Map loader | Siege flag |
|---|---|---|---|---|
| Field A | 0 | 10 | FUN_0047aaa3 |
0 |
| Field B | 1 | 10 | FUN_0047aaa3 |
0 |
| Siege | 2 | 15 | FUN_0047c4ba |
DAT_0053e8fc = 1 |
| Custom | 3 | 20 | FUN_0047b8b2 |
0 |
Battle type labels on the panel are PL8 sprite frames 0x18–0x1b (not L2.ENG
text). Highlighted type uses dimmed palette on the other three tabs
(FUN_004207c3).
Custom type calls FUN_0042d4aa and allows editing DAT_0053f5fc (map name buffer).
Scenario list#
| Global | Role |
|---|---|
DAT_0053f64c |
Scroll offset in list UI |
DAT_0056d590 |
Selected scenario index (0 .. count−1) |
DAT_0053e9a8 |
Highlighted row in scroll window |
Scroll: FUN_0043d9cd adjusts index by lotr2_game_turn_phase (±1), clamps
to [0, DAT_0053f0d4 − 7], reloads map via FUN_0042b9c4 / FUN_0042ba40 /
FUN_0042bf46. MP sends opcode 0x53.
Names: loaded from battles.eng into RAM; FUN_0042ab15 indexes the string
table. Custom maps use DAT_00521ca0 (0xe4c bytes) populated from user file
(FUN_0042ab82).
List UI: FUN_00421005 draws six visible rows; bar graph shows army size split
(lotr2_game_ratio_percent on DAT_0053f64c vs DAT_0053f0d4).
Army size modifiers#
Per-side tier 1–3 stored in:
| Global | Side |
|---|---|
DAT_00553da4 |
Local / left army tier |
DAT_00553dd0 |
Opponent / right army tier |
Handlers:
FUN_0043daf3— increment/decrement both tiers (swap direction byturn_phase)FUN_0043dbac— cycle unit category row (DAT_00553d78per player, 0–4)
Tier affects unit counts when FUN_0042bf46 copies from DAT_00516ac0 preset
block (loaded from TROOPS*.ENG by FUN_0042ac0c).
MP sync: opcode 0x60.
Faction color#
lotr2_game_wizard_sync_faction_color copies shield color from wizard assignment
table DAT_004d5548 into player record +0x03 (DAT_0057bf0a).
SP only: FUN_0042ba40 picks NPC culture_row from preset table, assigns L2.ENG
group 7 name, and picks opposing faction color from pair table
(DAT_004d4ca8). See army-and-scenarios.md.
Attacker / defender#
| Global | Role |
|---|---|
DAT_0053ef5c |
Player slot ID of attacker (1 or 2) |
Swap sides: FUN_0043dd83 toggles attacker between local slot and
DAT_0056d5cc (opponent slot). Rebuilds army records via FUN_0042ac0c /
FUN_0042ba40 / FUN_0042bf46.
UI swaps “Attack” / “Defend” labels (group 0xb indices 0x17 / 0x18) and
arrow sprites.
Custom map toggle#
FUN_0043da9e:
- Toggles
DAT_0056899c - Resets army tiers to 2
- MP opcode 0x5f
- Reloads
skircust.pl8vsskirmish.pl8
When custom mode is active, layout uses FUN_0042130f / FUN_00420de4 instead
of FUN_00421231 / FUN_004209c1.
Start battle#
Single player — FUN_004329ec:
lotr2_game_begin_new_campaign()(unlessDAT_005aeb8cload-game flag)- Sets
DAT_0052af94 = 3, arms UI refresh - Battle starts through normal combat entry with
DAT_0057a0f0already set
Multiplayer — same function waits until all required players have
DAT_005533e0[slot] == 1, then sends opcode 4 and initializes views.
Ready (MP step 0xb): FUN_00446389 sets local ready bit and sends opcodes
0x56 + 0x52. Host confirm uses FUN_004bbf89.
MP setup sync payload#
FUN_004463d9 serializes skirmish setup for network unpack:
| Field | Global |
|---|---|
| Battle type | DAT_0053e91c |
| Custom map flag | DAT_0056899c |
| Army tiers | DAT_00553da4, DAT_00553dd0 |
| Siege flag | DAT_0053e8fc |
| Attacker slot | DAT_0053ef5c |
| Scenario index | DAT_0056d590 |
| Scenario count | DAT_0053f0d4 |
| Scroll offset | DAT_0053f64c |
| Custom map name | DAT_0053f5fc (0x41 bytes) |
See multiplayer-pvp.md.
Bottom panel actions#
Strings group 0xb:
| Index | Typical use on setup panel |
|---|---|
| 0x24 | Start / fight button |
| 0x25–0x27 | Context buttons (layout differs custom vs standard) |
Evidence#
| Symbol | Address |
|---|---|
FUN_0042051c |
0x0042051c |
FUN_00420630 |
0x00420630 |
FUN_0043dc1d |
0x0043dc1d |
FUN_0043d9cd |
0x0043d9cd |
FUN_0043da9e |
0x0043da9e |
FUN_0043daf3 |
0x0043daf3 |
FUN_0043dd83 |
0x0043dd83 |
FUN_004329ec |
0x004329ec |
FUN_004463d9 |
0x004463d9 |