Skip to content

Creating a Mod

ZSolarDev edited this page Nov 10, 2026 · 5 revisions

Creating your Project

To start, follow this process:

  • If you haven't already, install the haxelib via haxelib install Hx4Diva
  • Set up Hx4Diva via haxelib run hx4diva setup
  • Go to the directory you want to create the project folder in, and run hx4diva create "Your project name goes here"
    • You can leave the name blank/undefined too, it'll default to "DummyMod".

And you have your project inside of a folder named what you put in the command. To edit its metadata or any build info, open the folder and edit its mod.json file. Here's the structure:

  • name
  • description [optional]
  • authors [optional]
  • version [optional]
  • main (your main class.)
  • classPath (the path to your source code folder.)
  • modOutput (the path your mod will build to.)
  • dependencies [optional]
  • macros (hxml macro commands.) [optional]
  • postBuildCommands [optional]
  • append [optional]
    • config (an append to the generated config.toml file.)
    • hxml (an append to the generated _hxOut.hxml file.)

Once your mod.json is filled out, you can build it to a mod via hx4diva build. It'll create your mod at your modOutput folder path.

Programming Your Project

TODO

Clone this wiki locally