Portraits2dmp.py
because I have a lot of portraits in the randomizers and I needed this
- Renames portraits automatically and uses the first part before an underscore as the mug’s name. Eg. Brigid_SterlingGlovner becomes BrigidMug.
- Also supports fe6, LZ77 compresses portraits to save rom space, and runs much faster than the previous portrait formatters on my laptop anyway. 102 seconds for 755 portraits vs 30+ minutes with the older ones.
- Generates definitions for you, but you can define mug IDs yourself if you prefer
- Detects eye/mouth frame positions automatically
- Generates the whole installer for you
Requirements
Python
-
Install python into your path
-
Add any submodules that error to your path / cmd.exe. Eg.
pip install numpy
To use
- Download this folder
https://github.com/Veslyquix/SRR_FEGBA/tree/main/gfx/Portraits - Put portraits into the
png
subfolder
- Run portraits2dmp.py, or click ProcessPortraits.cmd
- If it errors, see Requirements above
- Add
#include "Generated.event"
to your installer, or use mine
Thanks to @MintX for writing their portrait formatter in python, upon which this is based on.
Hope this helps someone.