Author Topic: JSON pilot files  (Read 273 times)

0 Members and 1 Guest are viewing this topic.

Offline m!m

  • 210
Currently, FSO uses a binary file format for storing the pilot data. While this format is quite space efficient it is absolutely unreadable for someone without a hex editor. A while back I made some changes to the pilot code which made it possible to write the pilot data in the much more readable JSON format. That made it easier to debug issues but the code was not able to read this format when the game was started the next time. That is what these changes implement. The builds below are able to use JSON for loading and storing the pilot data. "Old" binary pilots will be converted when FSO is started for the first time so you will not lose any progress if you use these builds.

Test builds for all platforms: http://swc.fs2downloads.com/builds/test/jsonPilots/
Pull request with changes: https://github.com/scp-fs2open/fs2open.github.com/pull/1267

To test these builds all you have to do is run FSO with them and try some stuff that involves the pilot data like continuing a campaign. I want to make sure that the common operations definitely work before this gets merged into the master branch.

 

Offline PIe

  • 26
"Old" binary pilots will be converted when FSO is started for the first time so you will not lose any progress if you use these builds.
Does this mean that any campaign progress made with this build will be lost if I switch back to a regular one, ie I'll be back at the point where I switched builds?

 

Offline m!m

  • 210
Yes, any progress made with these builds will not be saved in the old files.

 
In normal build last played pilot is at the top. In this not.
Minor thing but I got used to it :P

Ok, now this is weird. I did few mission in main campaign on this build then switch back to normal build and I see these missions are done :confused:
« Last Edit: January 11, 2018, 05:10:12 pm by tomimaki »

 

Offline m!m

  • 210
In normal build last played pilot is at the top. In this not.
Minor thing but I got used to it :P
I just checked and for me the last played pilot appears at the top of the list :doubt:

 

Offline PIe

  • 26
With this build, under one circumstance I need to reselect the campaign each time I launch FSO.
Steps to repro are:
Play a mission that advances you in the campaign; change pilot settings (I changed difficulty); play another mission that advances the campaign; restart FSO.  It will tell you that you need to select a campaign.
« Last Edit: February 04, 2018, 01:09:25 pm by PIe »

  

Offline m!m

  • 210
I found an issue where the old binary pilots were always being converted to their JSON version even though the JSON version already existed which would explain why changing your settings would not be saved. The builds from the first post contain a fix which should resolve that issue.