Skip to content

Available Editor Scripts

WerWolv edited this page Jul 8, 2018 · 8 revisions

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.

Currently supported save file types

Binary

Used for parsing binary files with no specific format by using addresses.

Example usage

"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.

Indirect addresses

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 #FF0000. 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 #008BFF. 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 #009B2F and reads/modifies this value instead.

Indirect address

Json

Used for parsing binary files with no specific format by using addresses.

Example usage

"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: Int arguments are unused in this Editor Script, so the value needs to be set to 0.
  • 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.

Json tags

A typical Json save file looks as follows:

{
   "playerData" : {
       "collectibles": { 
           "coins" : 1234,
           "specialCoins": 7
       }
   },
   "worldData" : {
      "door1_open" : true,
      "door2_open" : false
   }
}

In this example the coins should get modified. To achieve this, the parser needs to go into playerData, then collectibles and then read/modify the coins value. This path is the the values in strArgs. Here, strArgs needs to be set to

"strArgs" : [ "playerData", "collectibles", "coins" ].

Clone this wiki locally