-
Notifications
You must be signed in to change notification settings - Fork 2
patches.json specification
This page is for people writing / developing patches. If you just want to know how to patch your game, see this page instead.
The JSON file is an array of patch objects.
Property | Type | Description |
---|---|---|
name |
String | Name of the patch. |
description |
String | Patch description which appears in the tooltip. Required, but can be blank. |
caution ** |
String | Warning about the patch which appears in a highlighted tooltip. |
gameCode |
String | Gamecode. For instance; ABC in ABC-001-2024042700 . |
type |
String | See Memory, union, and Signature patch properties. |
peIdentifier * |
String | Identifier for main game module. See the PE Identifier section. |
preset ** |
Bool | Unused. Leave as false or omit. |
*Optional if the filename is {peIdentifier}.json
.
**Optional.
For "type": "memory"
, the patch object has an array patches
of objects:
Property | Type | Description |
---|---|---|
dllName |
String | Name of the module in which the patch is to be applied. |
offset |
Integer | Integer representation of the offset at which the patch is to be applied. |
dataDisabled |
String | Original data in hex. |
dataEnabled |
String | Patch data in hex. |
For "type": "union"
, the patch object has an array patches
of objects:
Property | Type | Description |
---|---|---|
name |
String | Name of the patch option. |
patch |
Object | See below. |
Note
For union type, all patches in the patches array must have the same dllName
, offset
, and length of data
.
Property | Type | Description |
---|---|---|
dllName |
String | Name of the module in which the patch is to be applied. |
offset |
Integer | Integer representation of the offset at which the patch is to be applied. |
data |
String | Patch data in hexadecimal. |
Warning
Since no one really wrote signature patches, it's not a well tested code path. Please avoid it if you can, it might be removed in the future.
For "type": "signature"
, the patch object has the following extra properties:
Property | Type | Description |
---|---|---|
signature |
String | |
replacement |
String | |
dllName |
String | Name of the module in which the patch is to be applied. |
offset * |
Integer | Integer representation of the offset. |
usage * |
Integer |
*Optional.
patch
object properties:
Property | Type | Description |
---|---|---|
dllName |
String | Name of the module in which the patch is to be applied. |
offset |
Integer | Integer representation of the offset at which the patch is to be applied. |
data |
String | Patch data in hexadecimal. |
For "type": "number"
, the patch object has an object named patch
with the following properties:
Property | Type | Description |
---|---|---|
dllName |
String | Name of the module in which the patch is to be applied. |
offset |
Integer | Integer representation of the offset at which the patch is to be applied. |
size |
Integer | Size of patch, in bytes (e.g., 4 for int32). Must be 1, 2, 4, or 8. |
min |
Integer | Minimum allowed value for the patch(inclusive) |
max |
Integer | Maximum allowed value for the patch(inclusive) |
Starting with version 24-07-03
-
for the first JSON object in the array, if it does not follow the patch format (i.e., omit the name
field), it will be printed in the log. In this object, you can put whatever you want, such as version, time created, date code for the game, etc. See the example JSON file below.
By default, modules are identified by the following PE headers:
The peIdentifier
is then produced by concatinating the 3-character gameCode
in uppercase, the TimeDateStamp
in lowercase hexadecimal, and the AddressOfEntryPoint
in lowercase hexacedimal as follows:
{gameCode}-{TimeDateStamp}_{AddressOfEntryPoint}
For instance, if gameCode = LDJ
, TimeDateStamp = 0x64EF0FF5
, and AddressOfEntryPoint = 0x1037754
, then peIdentifier = LDJ-64ef0ff5_1037754
.
URL https://spice2x.github.io/patches/
is available with:
-
M32:J:B:A:2022102400
- see https://spice2x.github.io/patches/M32-634910da_15daec.json -
LDJ:J:A:A:2023090500
- see https://spice2x.github.io/patches/LDJ-64ef0ff5_1037754.json
These patches are shared as a reference for patch developers only. spice2x team will not be maintaining patches.
If patches don't show up, run spice.exe -cfg
, open the Patches tab, and check for any error messages in the console.
If patches do show up but with an error, check the rightmost column for error message in the UI.
Getting "config parse error" error code? Check rapidjson error codes here.
Github user KuuaDev for contributing this documentation.