Features
- Documented API
- Support for reading general game information (difficulty, turn number, player civilizations and statuses, etc.)
- Support for reading and writing victory types (time, science, etc.)
- Support for reading and writing advanced options (policy saving, promotion saving, etc.)
- Support for reading and writing hidden options (always peace, always war, etc.)
- Support for reading and writing certain multiplayer options (pitboss, private game, turn mode, turn timer)
For an example of actual usage, see https://github.com/bmaupin/civ5save-editor
Goals
- Support for properties which can be changed by modifying the uncompressed header of the file
- Support for all versions of the base game, including DLC and expansion packs
- Support for the latest version only of mods (at least the most popular ones)
Non-goals
- Support for properties which can be changed in game (e.g. quick combat)
- Support for properties which have no effect when changed after a game's started
- Support for properties in the compressed section of the file
- Support for anything other than the latest version of a particular mod
- Support for other Civilization games
Installation
yarn add civ5save
Or:
npm install civ5save
Development
Install Yarn (https://yarnpkg.com/docs/install)
Clone the repository and install dependencies
git clone https://github.com/bmaupin/js-civ5save.git cd js-civ5save yarn install
Testing
yarn test
Building (includes documentation)
yarn build
Credits
References
- File format
- Victory conditions/max turns
- Multiplayer turn types
- Multiplayer private/public
- Multiplayer pitboss setting
- Multiplayer turn timer
- Multiplayer password and player status
- Patch notes for various versions