Skip to content

JSON Data Structure ​

In this tool, all game data edited in the editor is saved as JSON files within the project. This chapter explains which tab corresponds to which file, the overall structure of the JSON internals, and in which situations you need to touch JSON directly along with the precautions.

Intended readers

  • Those who want to understand their project set up with version control (such as Git)
  • Those who want to restore partial data from a backup
  • Those who want to integrate with external tools (such as spreadsheets)
  • Those who want to grasp the overall design by looking at the JSON content

Normally there is no need to edit JSON directly during game creation. Editing via the editor is strongly recommended.

Save Location ​

All JSON data is saved in the following folder:

<project folder>/addons/rpg_wizard/data/settings/

The game's metadata is consolidated under this folder, so when managing with Git etc., committing this folder is sufficient.

Surrounding Folders ​

Other game resources besides JSON are also placed under the same data/:

addons/rpg_wizard/data/
├── settings/        ← JSON data (subject of this chapter)
├── events/          ← Event definitions (1 event = 1 JSON file)
├── maps/            ← Tilemap scenes (.tscn)
├── objects/         ← Object templates (.tscn)
├── sprites/         ← Image assets
├── animated_sprites/ ← Animated sprites (.tscn)
├── sounds/          ← Audio assets
├── themes/          ← UI themes
├── particles/       ← Particle effects
└── localized/       ← Translation data

Correspondence Between Editor Tabs and JSON Files ​

The editor tabs in this tool have a structure of 1 tab = 1 JSON file.

Editor TabCorresponding FileContent
Systemsettings/setting.jsonOverall game basic settings
Mapsettings/map.jsonMap metadata (terrain is in maps/*.tscn)
Eventsettings/events/*.json1 event = 1 file
Charsettings/character.jsonPlayer Characters
Enemysettings/enemy.jsonEnemy Characters (including AI patterns and drops)
Groupsettings/group.jsonEnemy groups (combinations for combat encounters)
Drop Tablesettings/drop_table.jsonWeighted lottery tables
Itemsettings/item.jsonItems, skills, magic
Attachsettings/attach.jsonEquipment, passives
Classsettings/class.jsonClasses (level-up curves)
Statesettings/state.jsonState ailments, buffs
Parametersettings/parameter.jsonParameter definitions such as HP / MP / STR
Typesettings/itemtype.json / attachtype.jsonItem / Attach classifications
Variablesettings/variable.jsonGlobal variables
Objectobjects/*.tscnNPC / Treasure chest templates (not JSON)
Effectsettings/effect.jsonBattle effect definitions
3D Mode Settingssettings/dungeon_3d_settings.json3D dungeon defaults
Minimapsettings/minimap_settings.json + settings/minimap_categories.jsonMinimap basic settings
Inputsettings/input.jsonKey assignments
Translationlocalized/translation.jsonMultilingual translation data
UI (Window / Button / Bar)settings/window.json / button.json / bar.jsonUI components

Additionally, the project's transition and sound settings are also located under settings/.

Two Save Structure Patterns ​

All JSON files are saved in one of two kinds of structures.

Pattern 1: Entry Dictionary Type ​

This is "a dictionary of objects keyed by ID". Used when registering multiple items in one file.

json
{
  "pc_hero": {
    "name": "Hero",
    "class": "cls_hero",
    "param": { "HP": 100, "MP": 20 }
  },
  "pc_mage": {
    "name": "Mage",
    "class": "cls_mage",
    "param": { "HP": 60, "MP": 80 }
  }
}

Applicable files: parameter / state / itemtype / attachtype / effect / class / drop_table / character / enemy / attach / item / group / map / bar / window / button

Pattern 2: Flat Dictionary Type ​

This is "a single dictionary keyed by property name". Used when saving "one set of settings for the entire game".

json
{
  "start_map": "map_village",
  "start_event": "evt_opening",
  "bgm_battle": "res://.../battle.ogg",
  "formula_battle_action_order": "USER.AGI.MAX"
}

Applicable files: setting / variable / sound

How to Distinguish ​

  • If multiple entries are held in one file → Entry Dictionary Type (most files)
  • If only one set of settings is held → Flat Dictionary Type (system settings, variables, etc.)

Commonly Seen Keys ​

id (Entry Dictionary Type Key) ​

The key itself in Entry Dictionary Type represents the ID (e.g., pc_hero). Only half-width alphanumeric characters and underscores can be used; duplicates are not allowed within each file.

name (Display Name) ​

The name displayed to players in-game. In many cases, it can be made multilingual by translating in the Translation tab.

note (Development Memo) ​

A free memo field for the creator (game maker). Not referenced from the runtime, edited in the TextEdit (labeled "Dev Memo") at the bottom of the editor screen.

note is different from comment

  • note: Developer-facing memo (not displayed in-game)
  • comment: Shown to the player as explanation (displayed in in-game description fields, subject to translation)

param (Parameter Dictionary) ​

The param of characters, items, and Attaches is a flat dictionary using the keys (HP / MP / STR etc.) defined in the Parameter tab.

json
"param": {
  "HP": 100,
  "MP": 20,
  "STR": 15
}

Formula Strings ​

Fields that save Formulas are stored as strings. They are evaluated at runtime as the Formula DSL.

json
"value": "USER.STR.MAX * 2 - TGT.DEF.MAX",
"determine": "TGT.HP.NOW > 0"

Reserved IDs ​

This tool has a total of 14 reserved IDs that cannot be renamed or deleted. This is because the tool must provide the basic elements of RPGs (HP / EXP / LEVEL / DEAD, etc.).

CategoryReserved IDs
ParameterHP, EXP, LEVEL
StateDEAD, ESCAPE (enemy-only)
Item TypeBASIC_ACTION, ITEM
Attach TypePASSIVE
ItemBA_ATTACK, BA_ESCAPE (enemy-only), BA_ITEM, BA_DEFEND
EffectATTACK, ESCAPE, DISAPPEAR

These IDs are protected so they cannot be deleted or renamed in the editor screens. See Reserved IDs List for details.

Situations Where You Should Edit JSON Directly ​

Normally, editing via the editor is strongly recommended, but direct JSON editing may be considered in situations like:

1. Version Control (Git etc.) ​

Because JSON files are text format, diff display and merging in Git are possible. Recording "what was changed in which editor tab" in commit messages makes it easier to track history later.

2. Partial Restoration from Backup ​

When restoring data that was mistakenly deleted, copying only the relevant entry from a past backup and pasting it into the current JSON is an effective operation.

3. Integration with External Tools ​

When you want to convert the results of bulk editing in a spreadsheet to JSON, import CSV data, or otherwise integrate with external tools, you may edit directly.

4. Bulk Replace / Bulk Add ​

When you want to bulk-change common properties of many characters or items, text editor's bulk replace may be faster than editing one at a time in the editor.

Situations Where You Must Not Edit JSON Directly ​

The following are absolutely forbidden or strongly discouraged:

1. Files During Runtime ​

If you change files while the game is running, changes may not be reflected (cache is used), and unintended overwrites may occur when the game is terminated.

2. Rename / Delete of Reserved IDs ​

If you directly edit and delete or rename a Reserved ID, the runtime will forcibly restore initial values, but WARNING logs will keep flowing. Avoid in user operations.

3. Inconsistent Reference Changes ​

Inconsistent changes such as referencing a non-existent class ID in a character's class field or writing a non-existent effect ID in an item's effect will cause errors or undefined behavior at game startup.

4. Breaking the JSON Structure ​

If there are JSON syntax errors (missing closing bracket, missing comma), the editor cannot read that file and the corresponding tab cannot be opened.

Backup recommended before JSON editing

Before editing JSON directly, always back up the target file. Set up a system where you can roll back if things fail before you begin.

Frequently Asked Questions (FAQ) ​

Q1: Which file should I start editing from? ​

Basically, please edit via the editor. The correspondence table on this page is a reference for "which file this setting in the editor is written to".

Q2: What is the .gd.uid file? ​

A UID management metafile for Godot 4. Always treated as a set with the corresponding .gd script. Do not delete.

Q3: There is a .tmp file ​

A temporary file created by Godot during saving. It is automatically deleted when the save completes normally. If it remains, restart the editor to clear it. Do not include in commit targets.

Q4: Are "settings files" and "save data" different? ​

Yes, they are different.

TypeSave LocationPurpose
Settings filesaddons/rpg_wizard/data/settings/*.jsonGame definitions (characters, items, maps, etc.), edited by the game creator
Save datauser://save_<index>.json + save_auto.jsonPlayer's play progress, automatically managed by the runtime

See Save/Load Reference for save data details.

Q5: It cannot be opened due to a JSON syntax error ​

Open the target file in a text editor and verify the syntax with tools like JSON Lint. Typical error causes are missing closing brackets or misplaced commas. After fixing, restart the editor to reload.

Q6: Can I change the top-level structure (Entry Dictionary Type / Flat Dictionary Type)? ​

You cannot. The structure the tool expects for each file is fixed.

Q7: I want to know all the data in more detail ​

This page is a digest version. For all properties of each file, refer to the corresponding editor tab reference (Char tab etc.) or the detailed JSON schema documents (for developers, _document/generated/spec_master/schema/*.md).