Author
Topic: JSON pilot files (Read 493 times)

JSON pilot files

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.

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.

[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee[6:24 PM] PIe: and donuts[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE[6:25 PM] Axem: :O[6:25 PM] Axem: am i under arrest[6:26 PM] [`_`]/: no, just please step out of the myrmidon[6:26 PM] [`_`]/: you have so much to fred for

Re: JSON pilot files

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.

[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee[6:24 PM] PIe: and donuts[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE[6:25 PM] Axem: :O[6:25 PM] Axem: am i under arrest[6:26 PM] [`_`]/: no, just please step out of the myrmidon[6:26 PM] [`_`]/: you have so much to fred for

Re: JSON pilot files

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.