refactor(native)!: load LocalMP values from the build configuration

wto_ws.dll no longer scans aces.exe or carries structure offsets of a game
build. It reads the values the patcher resolved (wto_ws.cfg native.* lines)
into g_lmp through one table that names, per module, which value fills which
field (local_mp_values.c), and installs each module whose values are all
present, in dependency order, instead of giving up on the whole bridge when
one subsystem is missing. When the settings were resolved for another
executable (PE time stamp and image size differ), the bridge stays off.

local_mp_offsets.h keeps the existing names so the module code reads as
before; only Dagor library layouts (dag::Vector, DataBlock), protocol enums,
the reflection buffer size and the two change request members with no reader
in the client remain constants. A few fields are derived where the client has
no instruction of its own for them (local_mp_values.c derive_values). The
signatures moved to patches/native, and the header-based check-offsets
command is gone: record-game-version and the launcher's patch check resolve
the native modules now.

Shared sites moved to local_mp_core (mission customBots, the player's unit
eid) so modules do not depend on each other for them.

Checked: DLL build (no warnings outside MinHook); root and launcher type
checks; check-patches on 2.61.0.37; version records for 2.61.0.37 and
2.61.0.43 (10 native modules each); a lab run of the 2.61.0.37 copy logs
239 native values and "9 of 9 LocalMP modules installed". Battles were not
played in this run.

BREAKING CHANGE: Rebuild game copies to generate the new native values in wto_ws.cfg. Use record-game-version.ts or the launcher patch check in place of wtotools check-offsets.
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 12:26:11 +08:00
1 parent dde852e2b1
commit fdac56a036
23 files changed
+721 -805

No files matched your search

+58
View File
@@ -429,6 +429,64 @@
}
}
]
},
// MissionSettings customBots.
// 2.61.0.37: 0x126ef8d (lea rdi, [rsi + 0x718]; mov rcx, rdi; call 0x3093970)
"mission_custom_bots": {
"variants": [
{
"written_for": "2.61.0.37",
"locate": {
"method": "within",
"in": "mission_settings_load",
"pattern": "48 8d be ?? ?? ?? ?? 48 89 f9 e8 ?? ?? ?? ??",
"captures": {
"custom_bots": {
"offset": 3,
"type": "u32"
}
}
}
}
]
},
// Scoreboard row writer (refers to "airSevereDamage").
// 2.61.0.37: 0x12929f0
"scoreboard_rows": {
"variants": [
{
"written_for": "2.61.0.37",
"locate": {
"method": "string_ref",
"string": "airSevereDamage",
"target": "function"
}
}
]
},
// The controlled unit eid, falling back to the player's own unit eid.
// 2.61.0.37: 0x1292bfb (mov edx, dword ptr [rdi + 0x880]; lea r8, [rdi + 0x854]; test edx, edx; ...)
"mplayer_unit_eid": {
"variants": [
{
"written_for": "2.61.0.37",
"locate": {
"method": "within",
"in": "scoreboard_rows",
"pattern": "8b 97 ?? ?? ?? ?? 4c 8d 87 54 08 00 00 85 d2 4c 0f 45 c1 48 8d 8f 48 08 00 00 0f 44 97 ?? ?? ?? ??",
"captures": {
"controlled_eid": {
"offset": 2,
"type": "u32"
},
"unit_eid": {
"offset": 29,
"type": "u32"
}
}
}
}
]
}
}
}
-58
View File
@@ -89,44 +89,6 @@
}
]
},
// Scoreboard row writer (refers to "airSevereDamage").
// 2.61.0.37: 0x12929f0
"scoreboard_rows": {
"variants": [
{
"written_for": "2.61.0.37",
"locate": {
"method": "string_ref",
"string": "airSevereDamage",
"target": "function"
}
}
]
},
// The controlled unit eid, falling back to the player's own unit eid.
// 2.61.0.37: 0x1292bfb (mov edx, dword ptr [rdi + 0x880]; lea r8, [rdi + 0x854]; test edx, edx; ...)
"mplayer_unit_eid": {
"variants": [
{
"written_for": "2.61.0.37",
"locate": {
"method": "within",
"in": "scoreboard_rows",
"pattern": "8b 97 ?? ?? ?? ?? 4c 8d 87 54 08 00 00 85 d2 4c 0f 45 c1 48 8d 8f 48 08 00 00 0f 44 97 ?? ?? ?? ??",
"captures": {
"controlled_eid": {
"offset": 2,
"type": "u32"
},
"unit_eid": {
"offset": 29,
"type": "u32"
}
}
}
}
]
},
// MissionSettings allies country.
// 2.61.0.37: 0x1277500 (mov rcx, qword ptr [rcx + 0xd0]; jmp 0x127751f; xor r10d, r10d)
"mission_allies_country": {
@@ -186,26 +148,6 @@
}
}
]
},
// MissionSettings customBots.
// 2.61.0.37: 0x126ef8d (lea rdi, [rsi + 0x718]; mov rcx, rdi; call 0x3093970)
"mission_custom_bots": {
"variants": [
{
"written_for": "2.61.0.37",
"locate": {
"method": "within",
"in": "mission_settings_load",
"pattern": "48 8d be ?? ?? ?? ?? 48 89 f9 e8 ?? ?? ?? ??",
"captures": {
"custom_bots": {
"offset": 3,
"type": "u32"
}
}
}
}
]
}
}
}