-
-
Notifications
You must be signed in to change notification settings - Fork 111
Available Editor Scripts
This is the documentation for all available Editor Scripts. Please note, not all of them are developed by the EdiZon developers (@WerWolv98 and &thomasnet-mc). If you want your own Editor Script do be added to the documentation, please create an issue on the main repository with a link to your documentation and your Editor Script.
Used for parsing binary files with no specific format by using addresses.
"filetype" : "bin",
"items" : [
{
"intArgs" : [ 2, 2 ],
"strArgs" : [ "DEAD", "BEEF" ],
}
]
This Editor Script file can be used by specifying filetype
as bin
in your Editor Conifig file.
Following arguments can be passed to the Editor script by using intArgs
and strArgs
:
-
intArgs
- Value 1: The size of the address used in bytes. (1 for u8, 4 for u32)
- Value 2: The size of the value to be read and written. (1 for u8, 4 for u32)
-
strArgs
- Value 1: The indirect address of a value. This is the address to an address where the actual value can be found. See the next chapter for more information. If unused, set to
0000
. - Value 2: The direct address of a value. This is the address of the value you want to edit. If an indirect address is used, this will function as an offset added to the address read by the indirect address. If unused, set to
0000
.
- Value 1: The indirect address of a value. This is the address to an address where the actual value can be found. See the next chapter for more information. If unused, set to
An indirect address is basically an address to an address to a value. For following example an indirectAddress
value of 0008
and an address
of 0010
is used. First the parser looks for the value at address 0x0008 . In this example it's 20 00
which corresponds to 0x0020 because save files are almost exclusively saved in little endian. Now the parser seeks to the address it just has read. In this example it seeks to address 0x0020 . If no address
has been set in the Editor Config file, this will be the value that gets read and modified by EdiZon. If address
has been set, that value, in this example 0x0010, will be added to the previously read offset 0x0020, so the parser ends up at address 0x0030 and reads/modifies this value instead.
Used for parsing json save files.
"filetype" : "json",
"items" : [
{
"intArgs" : [ 0 ],
"strArgs" : [ "hello", "world" ],
}
]
This Editor Script file can be used by specifying filetype
as json
in your Editor Config file.
Following arguments can be passed to the Editor script by using intArgs
and strArgs
:
-
intArgs
- Value 1: This specifies if booleans or integers should get used by the script. If this is 1, the script will use true & false instead of 1 and 0. If it's 0, it will use normal integers.
-
strArgs
- Values: As many values as needed can be specified here. These tags specify the path to the value which gets read/modified. See the next chapter for more information.
A typical Json save file looks as follows:
{
"playerData" : {
"collectibles": {
"coins" : 1234,
"specialCoins": 7
}
},
"worldData" : {
"door_open : [ true, false ]
}
}
In this example the the second door should get opened. To achieve this, the parser needs to go into worldData, then door_open and then read/modify the second value in the array. This path is used as values in strArgs
. To access an array by an index, prepend the number with a backslash. Here, strArgs
needs to be set to
"strArgs" : [ "worldData", "door_open ", "\\1" ]
.