Creating a CLI tool or exposing an API
Hello there,
First of all, thanks for the great work you put in tool. Very enjoyable! I was wondering is there is a way you could expose an API to read and write the save, or even better, a CLI tool for this. The reason I am asking is because this would be the perfect way for me to develop at AI to play the game or at least to plan what to do in the game and training it accordingly.
Thanks!
Sounds cool. Would be really interesting to see this happen.
Hey, currently the parser is reasonably split up from the UI and you could make use of it from any .NET application. However, as evidenced by the implementation of the current cheats actually doing anything useful with that is a complete mess at the moment, especially when you want to write to the save.
I've recently picked the development of a new and improved version back up (can be found on the newer_parser branch) which aims to convert every single object in the save into a plain C# object with all the properties and will be MUCH more pleasant to work with from a programming point of view. This is again completely separated from the UI and can be easily consumed by any .NET application. Is that the kind of API you were looking for? I'm not too sure what kind of CLI tool we could make, so maybe you could elaborate on that.
In the far future, I would like to investigate adding a scripting language to the UI which should also make the editor a lot more powerful, but that's very far off on the roadmap.