Repository navigation
Creating a Mod
ZSolarDev edited this page Nov 11, 2026
·
4 revisions
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 generatedconfig.tomlfile.) -
hxml(an append to the generated_hxOut.hxmlfile.)
-
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.
For some simple mod demos, view the demos page on the wiki.