Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nightmare on June 30, 2020, 12:16:25 pm

Title: Variables?
Post by: Nightmare on June 30, 2020, 12:16:25 pm
Could somebody who exactly knows what's going on update the wiki article on variables? I know there was a major change a while ago, but I dunno how stuff exactly works so I can't do it myself. Last update was in Feb 2013, article is completely obsolete right now.
https://wiki.hard-light.net/index.php/Variable

Apart from that, Mobius wanted to know which variable variant is required to load the hull strength on a ship in the next mission.
Title: Re: Variables?
Post by: wookieejedi on June 30, 2020, 12:50:19 pm
Sure. Mobius should use `Save on Mission Complete` Also a new feature is if you hover over the variables it will give more info in FRED.

EDIT: Wiki updated.
Title: Re: Variables?
Post by: Nightmare on June 30, 2020, 01:22:59 pm
Awesome, many thanks for that! :) :yes:
Title: Re: Variables?
Post by: Mobius on June 30, 2020, 01:31:11 pm
Thanks for the details. On a side note, I was actually looking for campaign-persistent variables. We used to have those but they no longer show up in the latest FRED builds.
Title: Re: Variables?
Post by: wookieejedi on June 30, 2020, 02:09:42 pm
`campaign-persistent` variables are now `Save on Mission Complete`. Eternal variables are what `player-persistent` should have been, and `Save on Mission Close` are a new type to cover additional cases.
Title: Re: Variables?
Post by: karajorma on June 30, 2020, 07:50:45 pm
`campaign-persistent` variables are now `Save on Mission Complete`. Eternal variables are what `player-persistent` should have been, and `Save on Mission Close` are a new type to cover additional cases.

Slightly wrong. Save on Mission Close are what player-persistent variables were when persistent variables were originally added. A bug changed the way they worked a couple of years ago. Eternal is a flag you can add to BOTH Save on Mission Complete and Save on Mission Close to tell the game to not delete that variable even if the campaign ends or a different campaign is started.
Title: Re: Variables?
Post by: wookieejedi on June 30, 2020, 08:10:53 pm
Ah that makes sense, thank you for the correction. I have also updated the wiki with your clarifications.
Title: Re: Variables?
Post by: Mobius on August 10, 2020, 07:14:53 am
I ended up using is-previous-event-true SEXPs, though I will definitely take a look at the newer variable options and use them in case of future circumstances of this kind. Many things have changed since my FREDding sprees from a decade ago - at first, I was kind of puzzled but I will get used to all of these improvements.  :nod:

Thanks for the explanations, they've all been quite detailed.  :yes: