For all you SCP-philes out there, I have implemented persistent variables for campaigns. It all happens behind the scenes, so you'll hardly have to worry about a thing.

There are two types of persistent variables - campaign-persistent and player-persistent. I'll address each one separately.
- campaign-persistent - Any mission variable can be specified as campaign-persistent in the FRED variable dialog. Variables with this flag are saved in the campaign file, just like goals and events. When a new mission is loaded, the parser compares the saved variable listing with the variables used in the current mission. It finds any matches, it initializes the mission variable with the saved value and updates the saved value upon mission completion. Thus, for a hypothetical trading campaign, you could have a campaign-persistent variable "money" that maintains its value from mission to mission.
- player-persistent - Most of the time, you won't even need to bother with this type, but I implemented it for the off-chance that it would come in handy for something (and also because I had a certain something in mind for later use, heh heh heh
). Like campaign-persistence, player-persistence is indicated via a checkbox in FRED. However, this variable type is stored in the player file and maintains its value without regard to the missions played or if the mission is even completed. You can die, replay the mission, or even quit the mission in the middle of playing, and this variable will maintain its value. If you wanted to be tricky, you could use this variable to track the player's strategy throughout the mission and, upon death or replay, change things around before the player even encounters them. You can even use this variable to keep track of whether the player has attempted the second mission in a red-alert sequence and then gone back to play the previous mission.
NB: Player-persistent variables overwrite campaign-persistent ones. As far as limits go, you can have as many campaign-persistent variables as you want per mission, up to 100, but you can only have 100 player-persistent variables in a campaign. And in any case, you can't keep track of any variables unless you are playing a campaign - no tracking stuff from standalone missions, although I can't see where you would want to.
Final note: This mod changes both the player and campaign savefile formats, so all player files will now be bumped from version 140 to version 141. The change shouldn't be noticeable; I added compatibility checking so that all pilot files should migrate versions without any problem. However, in-progress campaigns may need to be restarted.
Additional note: I tried using SCP pilots with retail FS2, and as I hoped, they work fine. Version 141 saves additional information at the end of the pilot file, while retail FS2 reads the pilot file only as far as is required for version 140, never encountering the version 141 data. You can continue to interchange SCP and non-SCP pilots without problems.
