A game update used to fail a patch whenever any byte it compared moved, even when only an address in the instruction changed. Patch definitions now say what a change needs and read the rest from the code: - patch.jsonc holds a list of variants, each written for one game build (written_for) with its own locate block and edit; locate.jsonc is merged into it. Exactly one variant must apply, otherwise the patch is left out. GUI script patches use the same variants rule. - expect_original and the bytes to write use the signature syntax, so addresses that differ between builds can be wildcards. - A locate block can capture values at the site (rel32 targets, immediates, displacements); a rel32 fixup fills a hole in the written bytes from a capture. allow-local-host-bot-spawns now jumps to the target of the conditional jump it replaces instead of a stored distance, which makes it apply to 2.61.0.43 as well. - verified_on is gone from the definitions. patches/versions/<version>.jsonc records, per checked game build, which variant of every patch applies and where; scripts/record-game-version.ts writes it and the launcher reads the recorded versions from there. The Python tools (check-patches, patch-exe, check-gui) read the same format; check-patches assembles a variant whose assembly names captures at the site it was located at. Checked: root and launcher type checks; check-patches and check-gui on 2.61.0.37 and 2.61.0.43 (12 exe and 35 GUI patches each); check-patches and check-gui report a deliberately broken patch with a non-zero exit; build-game-copy from 2.61.0.43 into a temporary folder. The computed bytes of allow-local-host-bot-spawns on 2.61.0.37 equal the bytes it stored before. BREAKING CHANGE: Each patch needs a variants list. Move executable locators into patch.jsonc and regenerate game version records with record-game-version.ts.
35 lines
1.4 KiB
JSON
35 lines
1.4 KiB
JSON
// Always take the "-nobeac on the command line" branch, so BattlEye is never loaded.
|
|
// Why the executable: the anti-cheat loader runs before any network request; no service can answer it.
|
|
// Without it: launching aces.exe directly loads BattlEye and it tries to report to its servers.
|
|
{
|
|
"id": "isolation/never-load-battleye",
|
|
"title": "反作弊 BattlEye 永远不加载,和带上原版启动参数 -nobeac 的效果相同",
|
|
"features": [
|
|
"A-Isolation from the official game",
|
|
"A-No Gaijin connections"
|
|
],
|
|
"requires": [],
|
|
"variants": [
|
|
// Anti-cheat init, from the already-initialised check to the end of the "Disabled from CMD" branch, 109 bytes;
|
|
// rip-relative and branch targets are wildcards.
|
|
// 2.61.0.37: unique hit at 0x30c7112, edited je at +0x4a (0x30c715c).
|
|
{
|
|
"written_for": "2.61.0.37",
|
|
"locate": {
|
|
"method": "signature",
|
|
"section": ".text",
|
|
"pattern": "48 83 3d ?? ?? ?? ?? 00 74 ?? 48 8d 15 ?? ?? ?? ?? 31 db b9 03 00 00 00 45 31 c0 45 31 c9 e8 ?? ?? ?? ?? e9 ?? ?? ?? ?? 49 89 ce c7 44 24 50 01 00 00 00 48 8d 0d ?? ?? ?? ?? 48 8d 54 24 50 45 31 c0 e8 ?? ?? ?? ?? 48 85 c0 74 ?? 48 8d 15 ?? ?? ?? ?? b9 03 00 00 00 45 31 c0 45 31 c9 e8 ?? ?? ?? ?? bb 01 00 00 00 e9 ?? ?? ?? ??"
|
|
},
|
|
"edit": {
|
|
"offset": 74,
|
|
"asm": [
|
|
"nop",
|
|
"nop"
|
|
],
|
|
"bytes": "90 90",
|
|
"expect_original": "74 21"
|
|
}
|
|
}
|
|
]
|
|
}
|