Skip to content

Editor Config files ([titleId].json)

WerWolv edited this page Jul 24, 2018 · 23 revisions

Editor-Config files

Naming

Editor-Config files are used to specify what Widgets EdiZon should display, which Editor-Script file should get used and what parameters should get passed to the script. To use the builtin editor with a specific game, a Editor-Config file named with the titleID of that game will be required to be put inside the sdmc:/EdiZon/editor/ folder. For example, if the desired game is Zelda: Breath of the Wild, a file with this name will be required: sdmc:/EdiZon/editor/0100509005AF2000.json. Note that all alphabetical character need to be UPPERCASE!

Content

The content of the file is written in the JSON standard. A typical example looks as follows:

{
	"saveFilePaths" : [ "" ],
	"files" : "filename\\.sav",
	"filetype": "bin",
        "titleVersion": "1.2.3",
	"items": [
	{
	  "name" : "Integer Value",
          "category" : "Category 1",
	  "intArgs" : [ 2, 2 ], 
	  "strArgs" : [ "DEAD", "BEEF" ],
	  "widget" : {
		"type" : "int",
		"minValue" : 0,
		"maxValue" : 9999,
                "stepSize" : 100
	  }
	},
	{
	  "name" : "Boolean Value",
          "category" : "Category 1",
	  "intArgs" : [ 2, 2 ], 
	  "strArgs" : [ "CAFE", "BABE" ],
	  "widget" : {
		"type" : "bool",
		"onValue" : 0,
		"offValue" : 1
	  }
	},
	{
	  "name" : "List Value",
          "category" : "Category 1",
	  "intArgs" : [ 2, 2 ], 
	  "strArgs" : [ "DEAD", "C0DE" ],
	  "widget" : {
		"type" : "list",
		"listItemNames" : [ "List Entry 1", "List Entry 2", "List Entry 3" ],
		"listItemValues" : [ 123, 456, 789 ]
	  }
	}
	]
}

Tag List

  • saveFilePaths: The folder paths in which the save files are located. For this, a RegEx will be used. For example if there are saves inside save:/1/ and inside save:/2/, use [ "\\d" ]. Use "" to target the root directory.
  • files: Specifies which files should get displayed in the list. This value consist of a RegEx, which targets all valid names for the save files.
  • filetype: Specifies which Editor-Script file gets used to do the parsing. If bin.lua should get used, enter bin.
  • titleVersion: Optional! If this is specified, a warning will be displayed to the user if the version for which this config was made isn't the same as the version of the game that is installed right now.
  • items: Inside this array, every new element will become a new widget inside the editor.
    • name: The name of the widget. This is the text which will be displayed next to the value on the widget.
    • category: This string specifies in which category the widget will get sorted. This can be any alphanumeric string.
    • intArgs: Integer arguments that get sent 1:1 to the Editor-Script when executed. They depend on the Editor-Script implementation. Check out the Editor-Script file Wiki page for more information.
    • strArgs: String arguments that get sent 1:1 to the Editor-Script when executed. They depend on the Editor-Script implementation. Check out the Editor-Script file Wiki page for more information.
    • widget: These are the widget settings.
      • type: Configures the type of widget that gets used. Currently there are int, bool and list which generate a numeric up-down scroller, a switch and a list selection.
      • stepSize: Optional! Specific for integer types. This sets the speed with which the value fast increments. If this value doesn't get specified, the formula floor((maxValue - minValue) / 500.0F) will be used
      • minValue: Specific for integer types. This is the minimum value the allowed to be set before it wraps around.
      • maxValue: Specific for integer types. This is the maximum value the allowed to be set before it wraps around.
      • onValue: Specific for boolean types. This is the value that will be set if the switch is set to ON. This may be an int or a string.
      • offValue: Specific for boolean types. This is the value that will be set if the switch is set to OFF. This may be an int or a string.
      • listItemNames: Specific for list types. List of names that get shown in the editor drop down list.
      • listItemValues: Specific for list types. List of values that get written to the save file when a value inside the drop down list is selected. In the above example, if List Entry 1 gets selected, 123 will be written. These values may be ints or strings. Only one data type can be used at once.
Clone this wiki locally