ftl-overdrive
ftl-overdrive copied to clipboard
A Saved Game Parser
You might be interested in this for reverse engineering logic.
The next version of the FTL Profile Editor will be able to dump the contents of continue.sav as human-readable text.
https://github.com/Vhati/ftl-profile-editor http://www.ftlgame.com/forum/viewtopic.php?f=7&t=10959
We're still deciphering byte values, but here's a preview from my fork of it as of this morning. http://pastebin.com/NxE6Ur22 . . EDIT (2013-07-15): I've updated the github and forum links above.
Perhaps you could export into a format such as JSON, then it could well be possible to import this into Overdrive somehow.
Er, I was thinking you could use it to study how the original game's logic changes values between saves (Diffing the text dump, with an app like WinMerge). Or porting the parser into your own project so it could load continue.sav files directly.
Loading saves directly would be nice, but is it necessary? If not, do you have a mapping of the save file's structure to begin with? What would be the preference of the parser? JSON? XML?
Loading saves directly would be nice, but is it necessary?
As mentioned above, text dumps can be diff'd to highlight changes in order to learn what the original FTL is doing to the game state over time.
do you have a mapping of the save file's structure
Yes, the Profile/SavedGame Editor has been able to read the bytes of continue.sav and export a human-readable text file for a long time now. Essentially every value is documented in the dump. In the nine months that have passed since this issue was created, I've taken over development in ComaToes' absence (see the issue description for the new forum thread), and the editor has grown to edit nearly all those values as well.
The code for the parser is commented and available on github. Even just eyeballing the code is informative as to what sort of information the original game tracked, and roughly how it is organized into objects.
What would be the preference of the parser? JSON? XML?
Most likely XML, given that XML's already everywhere in FTL, and it's verbosity makes it diffable, even without XML-aware tools.