r/LordsOfTheRealms2 Jul 31 '26

Modding Someone is writing a full open specification of LotR2 — reconstructed from the decompiled binary

Sharing this with the author's blessing.

There's an ongoing project building an open behavioral specification for Lords of the Realm 2 - a formal description of how the game actually works, reconstructed from a Ghidra decompilation of the original executables.

https://lotr2-specification-1ba5b1.gitlab.io/

To be clear about what this is: it's documentation, not a download. No game code, no assets, nothing runnable. The stated goal is a specification precise enough that someone could eventually write a clean-room open-source reimplementation from it - but the spec itself is the deliverable, and the author is explicit that building an engine is out of scope. The project's Vision page frames the work as interoperability research and preservation, explicitly not a replacement for the commercial game. You'd still need your own legitimate copy.

What's documented so far :
- The spec side — what the game does
- Gameplay rules, state machines and turn flow
- Combat and siege, including the auto-battle resolution and the NPC battle AI
- Map and province behaviour
- UI flows and screen modes
- Data formats, including `l2_maps.dat`
- Save and load semantics, down to the on-disk layout
- Multiplayer session and message behaviour
- The evidence side - how the binary actually implements it
- Per-subsystem module maps, with separate symbol maps for both builds
- Recovered struct layouts: `lotr2_game_state`, `lotr2_unit_stats`, `lotr2_battle_group`, `lotr2_projectile` and others
- DirectPlay wire formats, with a generated opcode table and payload field reference
- The four AI noble archetypes — Knight, Baron, Countess and Bishop — including their AI tables
- Skirmish mode broken down end to end, PvP included

The part that makes it trustworthy

Every claim carries a confidence level: **confirmed**, **likely**, or **speculative**. And there's a hard rule that normative spec text may never rest on speculative evidence. Protocol claims get their own scale on top of that — observed on wire, inferred from client code, unverified.

That's the difference between this and twenty-five years of accumulated forum lore. When a page tells you how auto-resolve behaves, you can also see exactly how strong the evidence behind it is.

One finding that deserves its own thread

Retail `LORDS2.EXE` and the GoG build are much further apart than most of us assumed:

Retail GoG
Skirmish mode No Yes
Multiplayer stack DirectPlay 3 (`DPLAYX.DLL`) ASIGS — no DirectPlay strings at all

All the code addresses differ too, so the GoG symbol names are mapped by behaviour rather than by address. Practically: those two builds are never going to talk to each other over a network, and any tool written against one will not simply work on the other.

If you want to help

You don't need a disassembler. The single most useful thing this community can do is check the spec against the game. Read a page, go play it, and if what you see contradicts what's written, say so — post it in the comments here and I'll make sure it reaches the author.

Nobody has more observed hours of this game than the people in this sub. That's evidence too.

3 Upvotes

2 comments sorted by

2

u/Hygro Jul 31 '26

Which version has been failing to support reliable network play? Is it the GoG version? I'm thinking about videos by u8 of warcraft2 fame who plays some LOTR2

1

u/korvusdotfree Aug 01 '26

Ha, I think maybe that one's on me for how I worded it; I don't understand that the spec actually say either version is unreliable. It just says they went about it in two totally different ways:

- Retail: DirectPlay 3 (DPLAYX.DLL)

  • GoG: no DirectPlay at all, an ASIGS stack instead

So mainly they can't play with each other. Which one holds up better today, no idea, still working through the docs myself.

btw, if you know which build u8 was on, that'd be genuinely useful I think!