scp-fs2open / scp-fs2open/fs2open.github.com
Campaign files (.csg) overwrite some values in Pilot JSON
- Dominant language
- C++
- Stars
- 487
- Forks
- 184
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 45
Description
There are values that are shared between Campaign and Pilot files, such as joystick sensitivity, deadzones, volume, among others.
Since the .csg is loaded after the pilot, whatever is in there gets loaded into memory. But when saving the Pilot file, the value saved is the one currently in memory, which would be the value loaded earlier from the .csg file.
I feel like this is an attempt at having per-campaign settings, but this is not clearly communicated anywhere, which ends up confusing. This feature also causes issues where if a campaign file has an invalid value (like in #3321), that value will then propagate to any new campaign the player starts (since when creating a new .csg, it uses the current settings values it has from memory).
And even if the player deletes the errored csg and is left in a "campaign-less" state, then they'll have the .json values, which will also contain the error as it was saved from the csg to the json.
I propose not allowing values to be redundant between campaign save files and pilot files, so that we can use *only* the pilot file for them. I don't see any clear benefits to having them in both and it and increases code upkeep.
If we *must* have settings stored independently from the player for some reason, I much prefer an approach similar to what was done with control presets.
Related: #4388
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.