Okaaayyy. After hours of hard work, I made a python script to write the xml file. John Doom, you can download the updated mod files here. I set pivot points for all sprites (my script need that info) and change the png extension to lower case, and new xml.
Instructions on the python script and workflow below:
Step 0a: draw and align the sprites within your painting program and export them as png.
Step 0b: Make sure all the 'png' in file name is
lower case and has the word
Head and
Male or
Female in it (case sensitive). (ex. OrcPaperDollHeadsMale.CIF_1-0.png instead of OrcPaperDollHeadsMale.CIF_1-0.PNG)
Step 0c: install
python3 if your computer don't have it.
Step 1: open DFU in unity editor.
Step 2: In unity, navigate to the texture folder of your mod and use unity's sprite editor to set pivot point. The pivot should be where the top left of the most top left neck pixel is. (see pic)
Step 3: after all pivots are set, run my python script in a terminal. (On linux or mac, you need to give this file execution permission first) The command is:
Code: Select all
python3 /path/to/XmlGenerator.py "/path/to/DFU_Project/Assets/Game/Mods/YourMod/Textures"
OR (on Windows, I guess)
Code: Select all
py /path/to/XmlGenerator.py "/path/to/DFU_Project/Assets/Game/Mods/YourMod/Textures"
You need to replace the path in the above command with
actual path on your computer.
Alternatively, put the python file in the texture folder of your mod (or soft link it) and run:
Step 4: ????
Step 4a: if you get error messages, or nothing happens, you can report it here but I 95% won't know how to fix it
Step 5: build the mod
- ins.png (301.48 KiB) Viewed 2690 times