Skip to content

Generator and sample code for semicircular parliament diagrams for your Hearts of Iron IV Scripted GUIs

Notifications You must be signed in to change notification settings

Flaxbeard/hoi4-parliament-diagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HOI4 Parliament Diagram

A handy Python generator which will generate code for a dynamic parliament diagram which can be slotted into any Hearts of Iron IV Scripted GUI. Created for use in Cold Southern Springs and its parent mod, The New Order: Last Days of Europe.

These diagrams can have an arbitrary number of seats and can use any set of icons. They are fairly lightweight and low-code, relying on three arrays and a dynamic list. In addition, tooltips, rings to highlight coalition members, and more can be added without much additional effort.

This repo also includes a code sample to help you get started.

Usage

The diagram creator tool requires Python 3 and the Pillow library (pip install Pillow). The tool is a GUI built in tkinter and is fairly self-explanatory, simply move your sliders to design a nice looking diagram, select an icon, fill in the fields below the preview, and click "Generate Output." Resulting code is all included in the parliament_gui_code.txt file, comments explain where to put each part.

Guides

Guides are coming soon. For now, take a look at the sample code provided in this repo, and the commented output of the diagram creator tool. You can also look to a handy example someone has published on the Steam workshop (I am not affiliated with this example).

License / Credit

No credit needed, but feel free to shoot me a PM on Discord (Flaxbeard#6752) if you make anything neat with this, I love to see what people can make. If so inclined, feel free to thank "Flaxbeard" in your mod credits, but this is not nececssary.

Additional thanks goes to fedacking for some helpful changes to the program.

Ingame Example

An example parliament diagram An animated version

Diagram Creator Tool

An example of the GUI tool

Related Tools

Looking for other neat HOI4 GUI widgets? Check out:

About

Generator and sample code for semicircular parliament diagrams for your Hearts of Iron IV Scripted GUIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published