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 dataCorrespondence Between Editor Tabs and JSON Files
The editor tabs in this tool have a structure of 1 tab = 1 JSON file.
| Editor Tab | Corresponding File | Content |
|---|---|---|
| System | settings/setting.json | Overall game basic settings |
| Map | settings/map.json | Map metadata (terrain is in maps/*.tscn) |
| Event | settings/events/*.json | 1 event = 1 file |
| Char | settings/character.json | Player Characters |
| Enemy | settings/enemy.json | Enemy Characters (including AI patterns and drops) |
| Group | settings/group.json | Enemy groups (combinations for combat encounters) |
| Drop Table | settings/drop_table.json | Weighted lottery tables |
| Item | settings/item.json | Items, skills, magic |
| Attach | settings/attach.json | Equipment, passives |
| Class | settings/class.json | Classes (level-up curves) |
| State | settings/state.json | State ailments, buffs |
| Parameter | settings/parameter.json | Parameter definitions such as HP / MP / STR |
| Type | settings/itemtype.json / attachtype.json | Item / Attach classifications |
| Variable | settings/variable.json | Global variables |
| Object | objects/*.tscn | NPC / Treasure chest templates (not JSON) |
| Effect | settings/effect.json | Battle effect definitions |
| 3D Mode Settings | settings/dungeon_3d_settings.json | 3D dungeon defaults |
| Minimap | settings/minimap_settings.json + settings/minimap_categories.json | Minimap basic settings |
| Input | settings/input.json | Key assignments |
| Translation | localized/translation.json | Multilingual translation data |
| UI (Window / Button / Bar) | settings/window.json / button.json / bar.json | UI 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.
{
"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".
{
"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.
"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.
"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.).
| Category | Reserved IDs |
|---|---|
| Parameter | HP, EXP, LEVEL |
| State | DEAD, ESCAPE (enemy-only) |
| Item Type | BASIC_ACTION, ITEM |
| Attach Type | PASSIVE |
| Item | BA_ATTACK, BA_ESCAPE (enemy-only), BA_ITEM, BA_DEFEND |
| Effect | ATTACK, 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.
| Type | Save Location | Purpose |
|---|---|---|
| Settings files | addons/rpg_wizard/data/settings/*.json | Game definitions (characters, items, maps, etc.), edited by the game creator |
| Save data | user://save_<index>.json + save_auto.json | Player'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).
Related Pages
- Reserved IDs List — Complete explanation of 14 reserved IDs
- setting.json Details — Save destination for the System tab, details of 46 properties
- Save/Load Reference — Runtime-side save data structure
- Formula Reference — How to write Formula fields
- Translation / Multilingual Support — Structure and role of translation.json
- Each editor tab reference (../reference/editor/) — List of items editable in the corresponding tab
