Skip to content

Skirmish — multiplayer PvP#

Summary#

GoG skirmish PvP uses ASIGS (not retail DirectPlay) for session discovery and transport. Two humans configure armies on wizard step 0xb, mark ready, and sync setup fields via application opcodes sent through FUN_0043eda0. Battle then uses the same MP combat sync paths as campaign multiplayer.

Confidence: likely for opcode list from call sites; payload layouts from FUN_004463d9 field order.


Session bootstrap#

Step Function Effect
Connect FUN_004b7250 DAT_00553030 = 1; wait on session
Failure FUN_004b743b Revert to SP, wizard step 1
MP tick lotr2_game_tick_mp Initialize 2-player roster, AI culture assign
SIGS active DAT_00553248 = 1 Full lobby; save ext .sva/.svb

Skirmish MP requires DAT_0057cb38 == 1 (launcher GameType=Skirmish) to route to wizard 0xb instead of campaign step 8.


Player roster#

Skirmish MP is 2 players:

  • lotr2_game_local_player_slot — local human (1 or 2)
  • DAT_0056d5cc — opponent slot

Ready bits: *(int*)(&DAT_005533e0 + slot*4) == 1 when player confirmed.

FUN_004329ec waits until connected player count ≥ DAT_00553f98 (minimum 2) before starting battle.


Setup UI (step 0xb)#

MP-specific draws:

  • FUN_0041ff75 — opponent name list (8 names scroll)
  • FUN_00420147 — local name + cursor input
  • Ready highlight on fight button when DAT_005533e0[opponent]==1

Confirm path when DAT_00553248 != 0:

  1. FUN_004bbf89 — host/session confirm
  2. FUN_00446389 — set local ready, send 0x56 + 0x52

Skirmish sync opcodes#

Messages sent via FUN_0043eda0 during setup and battle. Retail names exist in protocols/dplay-app-messages.md; GoG uses the same opcode numbers over ASIGS transport.

Opcode Hex When sent Payload hint
3 0x03 Faction color sync After wizard color assign
4 0x04 Start game FUN_004329ec MP path
5 0x05 MP slot assign wait Step 4 faction pick
6 0x06 Lobby chat / ready pulse Step 8 or 0xb
7 0x07 Player slot commit MP roster
83 0x53 Scenario scroll FUN_0043d9cd, FUN_0043dd83
84 0x54 Wizard step / text Lobby transitions, name field
85 0x55 Start confirm Ready + battle entry
86 0x56 Ready toggle FUN_00446389
82 0x52 Ready auxiliary With 0x56
95 0x5f Custom map toggle FUN_0043da9e
96 0x60 Army tier change FUN_0043daf3, FUN_0043dbac

Packed setup blob#

FUN_004463d9 / unpack mirror write fields in order:

  1. DAT_0053e91c — battle type (4 bytes)
  2. DAT_0056899c — custom map flag
  3. DAT_00553da4, DAT_00553dd0 — army tiers (1 byte each)
  4. DAT_0053e8fc — siege flag
  5. DAT_0053ef5c — attacker slot
  6. DAT_00522f60 — 4 bytes
  7. DAT_0057c910, DAT_0057c96c — map ids
  8. DAT_0056d590 — scenario index
  9. DAT_0053f0d4 — scenario count
  10. DAT_0056d5c0 — 4 bytes
  11. DAT_0053f64c, DAT_0053e9a8 — scroll state
  12. DAT_0053f5fc — 0x41 custom name
  13. Additional army/name fields follow in same function (~37568+)

A compatible clone must pack/unpack this block identically for in-setup sync.


Battle-phase MP#

Opcode Role
0x3c / 0x3d Enter battle prep (lotr2_game_mp_send_enter_battle_mode)
0x33 / 0x3f Post-battle modal sync (FUN_0043bdcd)
0x19 Pause menu exit MP (FUN_00433deb)

Combat divergence UI (group 0xb 0x1c–0x1d, 0x2b–0x2c) indicates desync recovery — same as campaign MP.


Save extensions#

Load-game step uses extension by session type:

Condition Extension
SP .sav
MP, no SIGS link .svb
MP, SIGS linked .sva

Skirmish sessions may not use save/load in practice (single battle); paths exist in wizard for shared MP code.


Interop vs retail DirectPlay#

Feature GoG skirmish MP Retail campaign MP
Transport ASIGS DirectPlay 3 (DPLAYX.DLL)
Skirmish wizard Yes (step 0xb) No
Opcode catalog Same numbers (inferred) Documented in protocols/

A GoG-compatible clone needs ASIGS or a bridge; stock retail client cannot join GoG skirmish sessions.


Clone checklist#

  1. Implement 2-player ASIGS (or compatible) session with ready bits.
  2. Mirror setup opcode 0x53–0x60, 0x54–0x56, 0x52 during wizard step 0xb.
  3. Serialize FUN_004463d9 field block on any setup change.
  4. Gate skirmish lobby on launcher skirmish flag equivalent to DAT_0057cb38.
  5. Reuse battle MP sync from combat spec after FUN_004329ec start.

Evidence#

Symbol Address
FUN_004b7250 0x004b7250
FUN_004b743b 0x004b743b
lotr2_game_tick_mp 0x0049792e
FUN_0043eda0 (MP send dispatch)
FUN_004463d9 0x004463d9
FUN_00446389 0x00446389
lotr2_game_mp_send_enter_battle_mode 0x0043b593

Cross-link: protocols/dplay-app-messages.md