hoi4.py is a Python library for parsing HOI4 save files (whether binary or plain text) and for plotting useful information from them.
hoi4.py is available through PyPI:
pip install hoi4
To convert a binary save file to plain text save file:
python -m hoi4 binary2plain -i my_save_file.hoi4 -o my_converted_save_file.hoi4
To convert any save file (binary or plain text) to a JSON representation:
python -m hoi4 hoi42json -i my_save_file.hoi4 -o my_save_file.json
You can import the hoi4.py library into your own Python scripts and programs:
import hoi4
text = hoi4.load_as_text("my_save_file.hoi4")
dictionary = hoi4.load_as_dict("my_save_file.hoi4")
11th June, 2022
- Initial parsing of binary save files.
- Initial parsing of plain text save files.
- Basic command line interface.