Developer Scope and Prerequisites

From DragonMineZ Wiki

Developer Scope and Prerequisites explains who the modding and add-on pages are written for, the two ways to extend DragonMineZ, and the folders and tools you need before you start. Run DragonMineZ once first, so that its config files exist.

Intended audience

The modding and add-on pages are written for:

  • People who can edit JSON and resource pack assets.
  • People who can run Minecraft Forge development environments.
  • People who want to contribute DMZ-compatible content.

They don't cover general player walkthroughs, lore or survival progression. For those, start with the Beginner's Guide.

Two ways to extend DMZ

Approach What you need Where to start
Data add-ons (configs, races, forms, quests, wishes, Dragon Ball packs, resource packs) A text editor and a DMZ instance This page, then the JSON pages linked below and in Modding
Code add-ons (your own Forge mod that hooks DMZ events and APIs) A Forge 1.20.1 development environment Add-on Getting Started

Baseline setup

  1. Run DMZ once so the config files are generated.
  2. Use config/dragonminez as the config root of your local development instances.
  3. Race configuration lives in config/dragonminez/races/<race_name>/ (character.json, stats.json and a forms/ folder). See Custom Races.
  4. Shared stack forms live in config/dragonminez/forms/. See Custom Forms.
  5. Entity attributes are configured in config/dragonminez/entities.json.
  6. General server settings are in config/dragonminez/general-server.json.
  7. General user (client) settings are in config/dragonminez/general-user.json.
  8. Combat, training, skills and ki techniques are configured in config/dragonminez/combat.json, config/dragonminez/training.json, config/dragonminez/skills.json and config/dragonminez/techniques.json.
  9. Raid and tournament definitions live in config/dragonminez/raids/ and config/dragonminez/tournaments/, one JSON file per raid or tournament; extra files you add are loaded too.
  10. The client-only HUD layout, written by the in-game HUD editor, is config/dragonminez/hud_layout.json.

Every config file except general-user.json and hud_layout.json is sent from the server to each client on login, so clients always use the server's values.

Outdated or broken config files are not silently thrown away: DMZ moves the old file into config/dragonminez/oldBackup/ (same relative path) and merges your edits into the new defaults. See How to JSON and Reloading and Updating Changes.

World save data

Some systems live inside the world folder instead of config/:

Folder Contents Page
<world>/dragonminez/sagas/, quests/, sidequests/ Story sagas, saga quests and side quests Custom Quests
<world>/dragonminez/wishes/ Per-world wish overrides (one file per dragon) Custom Wishes
<world>/dragonminez/dialogues/ NPC dialogue files NPC Dialogue
<world>/dragonminez/npcs/ NPC placements (placements.json) and alignment rules (alignment_rules.json) NPC Placement and Alignment
<world>/dragonminez/playerdata_json/ Player data when the JSON storage backend is selected General Server Config

Dragon Ball add-on packs (folders or .zip files) go in the dragonballs folder of the game directory; see Custom Wishes. Not sure where a folder is on your machine? See Locating Specific Folders.

Reload workflow

After changing JSON config files, you can reload them in game with /dmzreload [all|config|story|wishes] (no argument means all). The command's source is src/main/java/com/dragonminez/server/commands/ReloadCommand.java. See Commands and Reloading and Updating Changes for what each section reloads.

Resource pack changes (models and textures) normally need a resource reload or a restart.

Finding JSON mistakes

Configured in: General Server Configdeveloper.reportJsonProblemsInChat

When a config, quest or wish file fails to load, DMZ records the file, the line and column, and the JSON path of the problem. The report is printed to the server log and shown in chat to players when they log in. Server owners can turn the chat message off with developer.reportJsonProblemsInChat = false in general-server.json.

Translations

All in-game text uses translation keys. The English source file is assets/dragonminez/lang/en_us.json; community translations are managed on Crowdin (see Contributing).

DragonMineZ automatically downloads the latest Crowdin translation for the game language you selected (every language except en_us), so translation fixes reach players without a mod update. To turn this off (for example, to test your own language file), start the game with the JVM argument -Ddmz.crowdin.enabled=false.

When a translation key is missing, some DMZ screens fall back to a readable version of the id (for example, quest texts and form names are turned into title-cased words). For proper names and other languages, ship your own keys in a resource pack under assets/<namespace>/lang/<locale>.json and use those keys in your JSON (for example, a form's name uses race.dragonminez.<race>.form.<group>.<form>).