<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dragonminez.com/index.php?action=history&amp;feed=atom&amp;title=How_to_JSON%2Fen</id>
	<title>How to JSON/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dragonminez.com/index.php?action=history&amp;feed=atom&amp;title=How_to_JSON%2Fen"/>
	<link rel="alternate" type="text/html" href="https://wiki.dragonminez.com/index.php?title=How_to_JSON/en&amp;action=history"/>
	<updated>2026-10-25T22:24:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.dragonminez.com/index.php?title=How_to_JSON/en&amp;diff=4428&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://wiki.dragonminez.com/index.php?title=How_to_JSON/en&amp;diff=4428&amp;oldid=prev"/>
		<updated>2026-10-13T05:22:49Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;How to JSON&amp;#039;&amp;#039;&amp;#039; explains the rules every DragonMineZ data file follows. You don&amp;#039;t need to know Java to configure DragonMineZ, but your files have to be valid JSON, and DragonMineZ upgrades its files between versions in ways you should know about before you start editing.&lt;br /&gt;
&lt;br /&gt;
== Ground rules ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Standard JSON.&amp;#039;&amp;#039;&amp;#039; No trailing commas; keys and strings go in double quotes. The config parser tolerates &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; comments and skips keys that start with &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; without a warning, but DragonMineZ drops them whenever it rewrites a file (a version upgrade, &amp;lt;code&amp;gt;/dmzconfig&amp;lt;/code&amp;gt; or the in-game config editor). Keep long notes outside the file.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;UTF-8 encoding.&amp;#039;&amp;#039;&amp;#039; Config is read and written as UTF-8 (&amp;lt;code&amp;gt;ConfigLoader.java&amp;lt;/code&amp;gt;). Don&amp;#039;t save files as UTF-16, or with a byte order mark (BOM) that your editor might add silently.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use a real editor.&amp;#039;&amp;#039;&amp;#039; VS Code, Notepad++ or IntelliJ catch bracket and quote mismatches before they reach the server. Notepad works, but it won&amp;#039;t warn you about syntax errors.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Validate before you deploy.&amp;#039;&amp;#039;&amp;#039; A single misplaced comma makes the whole file fail to parse. Paste the file into any JSON validator (or use your editor&amp;#039;s built-in linter) before restarting or reloading a live server.&lt;br /&gt;
&lt;br /&gt;
== When DragonMineZ can&amp;#039;t read your file ==&lt;br /&gt;
DragonMineZ never overwrites a file it can&amp;#039;t read. If a config file has a syntax error:&lt;br /&gt;
* DragonMineZ logs &amp;lt;code&amp;gt;&amp;lt;file&amp;gt; has malformed JSON; using defaults this session and leaving your file untouched&amp;lt;/code&amp;gt;, with the line, column and path of the error.&lt;br /&gt;
* For that session the game runs on the built-in default values of that file. Your file stays exactly as you left it.&lt;br /&gt;
* Fix the syntax and run &amp;lt;code&amp;gt;/dmzreload&amp;lt;/code&amp;gt; (or restart) to apply your values.&lt;br /&gt;
The same applies to the other JSON files DragonMineZ loads: a malformed custom form, raid, tournament, quest, saga, side quest or wish file is &amp;#039;&amp;#039;&amp;#039;skipped&amp;#039;&amp;#039;&amp;#039; (not regenerated) and reported.&lt;br /&gt;
&lt;br /&gt;
=== The JSON load report ===&lt;br /&gt;
{{Config|General Server Config|developer.reportJsonProblemsInChat}}&lt;br /&gt;
All these problems are collected in one report. With &amp;lt;code&amp;gt;developer.reportJsonProblemsInChat&amp;lt;/code&amp;gt; enabled in &amp;lt;code&amp;gt;general-server.json&amp;lt;/code&amp;gt; (the default), every player sees a short summary in chat on login: the files that failed (&amp;lt;code&amp;gt;[!]&amp;lt;/code&amp;gt;) and the default files that were upgraded automatically (&amp;lt;code&amp;gt;[~]&amp;lt;/code&amp;gt;). The report also flags &amp;#039;&amp;#039;&amp;#039;unknown keys&amp;#039;&amp;#039;&amp;#039;, usually a typo such as &amp;lt;code&amp;gt;&amp;quot;tpGainMultipler&amp;quot;&amp;lt;/code&amp;gt;: the key is ignored and the rest of the file still loads. The server log has the full details.&lt;br /&gt;
&lt;br /&gt;
== Config versions and automatic upgrades ==&lt;br /&gt;
Every config file (&amp;lt;code&amp;gt;general-server.json&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;combat.json&amp;lt;/code&amp;gt;, a race&amp;#039;s &amp;lt;code&amp;gt;character.json&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stats.json&amp;lt;/code&amp;gt;, forms, &amp;lt;code&amp;gt;entities.json&amp;lt;/code&amp;gt;, raids, tournaments and so on) carries a &amp;lt;code&amp;gt;configVersion&amp;lt;/code&amp;gt; string in &amp;lt;code&amp;gt;X.Y.Z&amp;lt;/code&amp;gt; form, for example &amp;lt;code&amp;gt;&amp;quot;2.2.0&amp;quot;&amp;lt;/code&amp;gt;. &amp;#039;&amp;#039;&amp;#039;Do not edit it by hand.&amp;#039;&amp;#039;&amp;#039; DragonMineZ compares it with the mod&amp;#039;s own config version every time it loads the file:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Current version:&amp;#039;&amp;#039;&amp;#039; the file is loaded as it is.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Older or missing version:&amp;#039;&amp;#039;&amp;#039; DragonMineZ upgrades the file. Any value that isn&amp;#039;t in &amp;lt;code&amp;gt;X.Y.Z&amp;lt;/code&amp;gt; form, such as the old numeric &amp;lt;code&amp;gt;21.0&amp;lt;/code&amp;gt;, counts as outdated.&lt;br /&gt;
An upgrade goes through these steps:&lt;br /&gt;
# The old file is &amp;#039;&amp;#039;&amp;#039;moved&amp;#039;&amp;#039;&amp;#039; to &amp;lt;code&amp;gt;config/dragonminez/oldBackup/&amp;lt;same relative path&amp;gt;&amp;lt;/code&amp;gt; (for example &amp;lt;code&amp;gt;oldBackup/races/saiyan/forms/superforms.json&amp;lt;/code&amp;gt;).&lt;br /&gt;
# A fresh file is generated from the new defaults.&lt;br /&gt;
# Your old values are merged back in with a &amp;#039;&amp;#039;&amp;#039;three-way merge&amp;#039;&amp;#039;&amp;#039; against the defaults of the previous release, which ship inside the mod jar (&amp;lt;code&amp;gt;data/dragonminez/previousConfigs/&amp;lt;/code&amp;gt;):&lt;br /&gt;
#* a value you never changed (it still equals the previous release&amp;#039;s default) takes the &amp;#039;&amp;#039;&amp;#039;new&amp;#039;&amp;#039;&amp;#039; default, so balance changes reach you;&lt;br /&gt;
#* a value you changed is &amp;#039;&amp;#039;&amp;#039;kept&amp;#039;&amp;#039;&amp;#039;;&lt;br /&gt;
#* keys added in the new version are added with their default, and entries you added to maps (for example extra entity ids) are kept;&lt;br /&gt;
#* if there is no previous-release copy of a file (custom races, newly added files), every value that differs from the new default is kept.&lt;br /&gt;
# The log shows &amp;lt;code&amp;gt;Regenerating &amp;lt;file&amp;gt;. Reason: Outdated version (...)&amp;lt;/code&amp;gt; and how many of your values were preserved.&lt;br /&gt;
Values the merge can&amp;#039;t carry over (for example a value of the wrong type, such as a string where a number is expected) fall back to the default. After an update, compare the new file with its copy in &amp;lt;code&amp;gt;oldBackup/&amp;lt;/code&amp;gt; if something looks off.&lt;br /&gt;
&lt;br /&gt;
{{Note|type=warning|title=Leave configVersion alone|text=Changing &amp;lt;code&amp;gt;configVersion&amp;lt;/code&amp;gt; by hand either forces an unwanted upgrade or makes DragonMineZ treat an outdated file as current, so new keys and balance fixes are not merged in.}}&lt;br /&gt;
&lt;br /&gt;
== Custom and user-defined files ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Custom races&amp;#039;&amp;#039;&amp;#039; (any folder under &amp;lt;code&amp;gt;config/dragonminez/races/&amp;lt;/code&amp;gt; that isn&amp;#039;t a default race) go through the same version check: their &amp;lt;code&amp;gt;character.json&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stats.json&amp;lt;/code&amp;gt; are upgraded with the merge above, keeping every value you set. DragonMineZ never generates default forms for them.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Custom form files&amp;#039;&amp;#039;&amp;#039; (form groups that aren&amp;#039;t DragonMineZ defaults, in &amp;lt;code&amp;gt;races/&amp;lt;race&amp;gt;/forms/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;forms/&amp;lt;/code&amp;gt;) keep their content: when their version is outdated, a copy is moved to &amp;lt;code&amp;gt;oldBackup/&amp;lt;/code&amp;gt; and the file is saved again with the current version.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Extra raid and tournament files&amp;#039;&amp;#039;&amp;#039; you add are loaded as they are.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Custom quests, sagas and side quests&amp;#039;&amp;#039;&amp;#039; you create in the world save are never modified. Only the default files DragonMineZ generated are upgraded (see below).&lt;br /&gt;
* Files whose name starts with &amp;lt;code&amp;gt;old_&amp;lt;/code&amp;gt; in the forms, raids and tournaments folders are ignored, so you can park a file there without it being loaded.&lt;br /&gt;
&lt;br /&gt;
== Quest files and defaultsVersion ==&lt;br /&gt;
{{Config|General Server Config|gameplay.autoUpdateQuests}}&lt;br /&gt;
Default quest, saga and side quest files in &amp;lt;code&amp;gt;&amp;lt;world&amp;gt;/dragonminez/&amp;lt;/code&amp;gt; carry a &amp;lt;code&amp;gt;&amp;quot;defaultsVersion&amp;quot;&amp;lt;/code&amp;gt; field instead of &amp;lt;code&amp;gt;configVersion&amp;lt;/code&amp;gt;. When a new DragonMineZ version ships changed defaults and &amp;lt;code&amp;gt;autoUpdateQuests&amp;lt;/code&amp;gt; is on, DragonMineZ runs a similar three-way merge on them (against &amp;lt;code&amp;gt;data/dragonminez/previousQuests/&amp;lt;/code&amp;gt; in the jar). If both you and the new version changed the same field, &amp;#039;&amp;#039;&amp;#039;your value is kept&amp;#039;&amp;#039;&amp;#039; and the conflict is listed in &amp;lt;code&amp;gt;&amp;lt;world&amp;gt;/dragonminez/quest_update_report.txt&amp;lt;/code&amp;gt;. Before changing a file, DragonMineZ copies it to &amp;lt;code&amp;gt;&amp;lt;world&amp;gt;/dragonminez/oldBackup/&amp;lt;/code&amp;gt;.&lt;br /&gt;
See [[Special:MyLanguage/Custom Quests#Default file upgrades|Custom Quests]] for how the merge treats each field, and [[Special:MyLanguage/Reloading and Updating Changes|Reloading and Updating Changes]] for how upgrades are reported.&lt;br /&gt;
&lt;br /&gt;
== Common mistakes ==&lt;br /&gt;
* Not renaming &amp;lt;code&amp;gt;raceName&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;groupName&amp;lt;/code&amp;gt; or other id-like fields consistently between the folder name and the JSON content. DragonMineZ keys many lookups off both.&lt;br /&gt;
* Copying a form or race file and forgetting to change its internal identifiers, so one entry silently overrides another.&lt;br /&gt;
* Editing a file while the server is running and expecting it to apply live. See [[Special:MyLanguage/Reloading and Updating Changes|Reloading and Updating Changes]] for what needs a reload and what needs a restart.&lt;br /&gt;
* Editing the copy in &amp;lt;code&amp;gt;oldBackup/&amp;lt;/code&amp;gt; thinking it&amp;#039;s still active. It isn&amp;#039;t: DragonMineZ never reads it back.&lt;br /&gt;
* Typos in key names. The key is ignored (and reported), so your value never applies.&lt;br /&gt;
&lt;br /&gt;
== Checking a field against the code ==&lt;br /&gt;
The modding pages of this wiki name the Java class behind each file (for example &amp;lt;code&amp;gt;RaceCharacterConfig.java&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FormConfig.java&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;GeneralServerConfig.java&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;com.dragonminez.common.config&amp;lt;/code&amp;gt;). When in doubt about a field name or type, that class is the ground truth: the wiki describes it, but the code defines it. The easiest reference is a freshly generated file: start a test instance, then copy the file DragonMineZ writes.&lt;br /&gt;
&lt;br /&gt;
{{Navbox Modding}}&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>