Skip to content

hoi4.py is a Python library for parsing HOI4 save files (whether binary or plain text) and for plotting useful information from them.

License

Notifications You must be signed in to change notification settings

MicReed/hoi4.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hoi4.py

hoi4.py is a Python library for parsing HOI4 save files (whether binary or plain text) and for plotting useful information from them.

Installing

hoi4.py is available through PyPI:

pip install hoi4

Overview

Command Line

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

Within Python

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")

Changelog

0.1

11th June, 2022

  • Initial parsing of binary save files.
  • Initial parsing of plain text save files.
  • Basic command line interface.

About

hoi4.py is a Python library for parsing HOI4 save files (whether binary or plain text) and for plotting useful information from them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%