ptmcg / ClauseWizard

Python-based JSON parser for files from the Clausewitz engine, used in multiple Paradox Interactive games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status PyPI version Python 3.7

ClauseWizard

Python-based JSON parser for files from the Clausewitz engine, used in multiple Paradox Interactive games. You can open the resulting files with any text editor, but since the file size can exceed the allowed limit for some editors, you can use other software such as HugeJsonViewer.

Currently supports both savegames and files from:

  • Europa Universalis 4
  • Crusader Kings 2
  • Hearts of Iron 4
  • Stellaris

  • Compressed games: supported.
  • Multiplayer games: supported.
  • Ironman games: not supported (in development). If the ironman save is not in binary format, it should work with this library. (For HoI4 games, you need to change save_as_binary=yes option from yes to no on your settings.txt configuration file).

Getting started

Installation

Use the package manager pip to install ClauseWizard.

pip install ClauseWizard

Binary packages are available for download in the Release page.

Python version is 3.7, will test other versions.

Usage

import ClauseWizard

ClauseWizard.cwparse(file) # returns a list of tokens
ClauseWizard.cwformat(tokens) # returns a JSON-formatted string

You can also run Scripts\CWParser from your Python setup directory.

Built With

Contributing

Pull requests are welcome, specially for performance upgrades, the current code takes too long to execute.

Author(s)

Donate

License

This project is licensed under the GNU GPLv3 - see the LICENSE file for details.

Acknowledgments

  • Paradox Interactive for their great games & the creation of the Clausewitz engine.
  • Anthorath for being a good listener and not falling asleep while I explain all the code.
  • to_be_filled.jpg

Disclaimer

This site is not affiliated with Paradox Interactive or Clausewitz Engine. All product names, trademarks and registered trademarks are property of their respective owners. All company, product and service names used in this website are for identification purposes only.

About

Python-based JSON parser for files from the Clausewitz engine, used in multiple Paradox Interactive games.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%