The LocalMP modules of wto_ws.dll scanned for 42 functions at start-up and used about a hundred structure offsets compiled in as constants, so a game update could move a field without anything noticing. Their needs are now definitions under patches/native/<module>.jsonc, resolved by the patcher when it builds the game copy, the same way exe patches are located: - Locate methods: "string_ref" finds code by the string it loads (optionally with a pattern around the lea, to read the field a scoreboard row stores under that name), and "within" searches a short pattern inside the function of a site located before it (function ranges from the exception directory). - Each module lists its sites (functions, globals, call targets and the instructions whose captures give structure offsets), its features and the modules it requires. A module whose sites are not all found is reported like an unavailable patch, with the modules depending on it. - The resolved values go into wto_ws.cfg as native.<site>[.<capture>] lines, with the executable's PE time stamp and image size so the library can refuse values resolved for another build. - Version records include the native module variants and values. - Patch-set folders: the patcher, the scripts and the launcher take the root of a patch set (exe, gui, native, versions) instead of separate folders. - New feature tags K-Chat and radio and K-Nuclear bomb in both language packs. The library still scans by itself; reading these values is the next change. Checked: root and launcher type checks; all 10 modules resolve on 2.61.0.37, where the 239 values equal what the drafting tool read with a disassembler, and on 2.61.0.43, where every structure offset is unchanged except the GameSaveData HUD event queue (0xae8 -> 0xb18); build-game-copy from 2.61.0.37 into a temporary folder writes the values into wto_ws.cfg.
127 lines
4.3 KiB
JSON
127 lines
4.3 KiB
JSON
// Combat events on the LocalMP host (native/wto-net/src/local_mp_events.c): assists, captures, hits,
|
|
// critical and severe damage, counted and reported as award facts.
|
|
// Without it: assists, captures and damage events score nothing in LocalMP battles.
|
|
{
|
|
"module": "local_mp_events",
|
|
"features": [
|
|
"K-Kill, assist and capture scoring",
|
|
"L-Battle awards"
|
|
],
|
|
"requires": [
|
|
"local_mp_core",
|
|
"local_mp_awards",
|
|
"local_mp_kills"
|
|
],
|
|
"sites": {
|
|
// dispatchAssist.
|
|
// 2.61.0.37: 0x35beb0
|
|
"dispatch_assist": {
|
|
"variants": [
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 78 0f 29 7c 24 60 0f 29 74 24 50 0f 28 f3 4c 89 c6 48 89 d7 48 89 cb 48 8b 05 ?? ?? ?? ?? 48 85 c9 7e ?? 48 85 c0"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// A caller of the capture zone dispatch; captures the callee.
|
|
// 2.61.0.37: 0x3db0e0
|
|
"caller_capture_zone": {
|
|
"variants": [
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 38 44 0f b7 72 02 44 8b 7a 04 4c 8b 62 08 4c 8b 6a 18 49 8d 85 88 06 00 00 48 89 44 24 30 49 8d 85 50 06 00 00 48 89 44 24 28 eb ?? 48 8b 90 08 0e 00 00 89 d1 83 e1 01 0b 0d ?? ?? ?? ?? 3b 88 14 0e 00 00 0f 85 ?? ?? ?? ?? 48 83 e2 fe 48 8b 82 98 0f 00 00 48 8b 88 b8 00 00 00 e8 ?? ?? ?? ??",
|
|
"captures": {
|
|
"call": {
|
|
"offset": 108,
|
|
"type": "rel32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// A caller of the hit / critical hit dispatch.
|
|
// 2.61.0.37: 0xff85ea
|
|
"caller_hit_crit": {
|
|
"variants": [
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"pattern": "8b 0d ?? ?? ?? ?? f7 c1 00 00 08 00 75 ?? f7 c1 00 00 00 01 75 ?? 0f b6 8f 10 10 00 00 39 4e 1c 74 ?? 41 20 c0 0f b6 86 49 01 00 00 0f 57 db f3 0f 5f 9e 30 01 00 00 48 8b 4e 58 85 ed f3 0f 5d 1d ?? ?? ?? ?? 88 44 24 30 0f 9f 44 24 28 44 88 44 24 20 48 89 fa 49 89 f0 e8 ?? ?? ?? ??",
|
|
"captures": {
|
|
"call": {
|
|
"offset": 90,
|
|
"type": "rel32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// A caller of the severe damage dispatch.
|
|
// 2.61.0.37: 0xe55afa
|
|
"caller_severe_damage": {
|
|
"variants": [
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"pattern": "66 83 be b0 06 00 00 ff 0f 85 ?? ?? ?? ?? 48 89 f1 e8 ?? ?? ?? ?? 84 c0 0f 84 ?? ?? ?? ?? 48 8d 9e b0 06 00 00 48 8b 4f 58 48 89 f2 49 89 f8 e8 ?? ?? ?? ?? 48 89 f1 48 89 fa e8 ?? ?? ?? ?? 0f b6 ae d4 06 00 00",
|
|
"captures": {
|
|
"call": {
|
|
"offset": 48,
|
|
"type": "rel32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// A caller of the naval damage dispatch.
|
|
// 2.61.0.37: 0xd048ea
|
|
"caller_naval_damage": {
|
|
"variants": [
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"pattern": "66 83 b9 90 0f 00 00 01 77 ?? 66 83 ff ff 74 ?? 0f b7 c7 0f 57 d2 f3 0f 2a d0 f3 0f 59 15 ?? ?? ?? ?? eb ?? f3 0f 10 15 ?? ?? ?? ?? 48 8b 94 24 c0 03 00 00 0f b6 7c 24 5b 41 89 f9 e8 ?? ?? ?? ?? 0f 57 c0 0f 2e f0 0f 96 c0 40 08 f8 a8 01 75 ?? 48 8b 96 e8 0a 00 00 4c 8b 84 24 c0 03 00 00 49 8b 48 58 0f 28 de e8 ?? ?? ?? ??",
|
|
"captures": {
|
|
"call": {
|
|
"offset": 104,
|
|
"type": "rel32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// Offender assist already reported.
|
|
// 2.61.0.37: 0x465896 (cmp byte ptr [r14 + 0x148], 0; jne 0x465620)
|
|
"offender_assist": {
|
|
"variants": [
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "within",
|
|
"in": "iground_award_assists",
|
|
"pattern": "41 80 be ?? ?? ?? ?? 00 0f 85 ?? ?? ?? ??",
|
|
"captures": {
|
|
"assist_sent": {
|
|
"offset": 3,
|
|
"type": "u32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|