My friends and I play a few games together with an AI or 4 and have been looking for an interesting way to record the interactions that occur within a game.
Given that there aren't many functional workarounds (and theres no way I'm just going to write down everything as it happens); I'm writing a script to read Stellaris save files and generate a ledger or history list of all interesting interactions for a given game.
The script will do the following in order (or this is the theory I'm working off):
My questions are:
Thanks for reading my blog.
Given that there aren't many functional workarounds (and theres no way I'm just going to write down everything as it happens); I'm writing a script to read Stellaris save files and generate a ledger or history list of all interesting interactions for a given game.
The script will do the following in order (or this is the theory I'm working off):
- Get a list of save files (ie open the save folder).
- Extract and read a given auto-save file.
- Record the date of the auto save for each list of events.
- Iterate though the events contained within (ie, species, wars, planetary claims, deaths of leaders, etc).
- Order these events by date and commit them to a `Era Block`, stapled with the date of the auto save that these were extracted from.
- Compare that Era to the previous Era and note any relevant changes (AI player no longer appears, war no longer happening, changes in system ownership).
- Commit each Era Block to a master list, ordered by date.
- Iterate the master list and save it as something for humans to read.
My questions are:
- What format are the gamestate files?
- Is there any python (or other package) which can be used to turn some of the data into something easier to manipulate?
- (Ideal) Is there a known/easy way to get the relevant events of the game without heavy manipulation of save files?
Thanks for reading my blog.