Author Topic: Help needed on variables editor  (Read 905 times)

0 Members and 1 Guest are viewing this topic.

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Help needed on variables editor
This is beginner's stuff, indeed, but since the wiki page does not give explanation on the current version of the variables editor in FRED, I'm a little in the dark here. What exactly do "save on mission complete", "save on mission close", and "eternal" respectively do? The old "campaign-persistent" and "player-persistent" were a lot more self-explanatory imo.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Help needed on variables editor
Save on mission complete = the variable will only be altered permanently if you beat the mission and proceed in the campaign. (Right?)

Save on mission close = the variable will be altered no matter how the mission ends, whether in failure, success, or just an alt-f4. (Right?)

Eternal = uh I think changes are always saved and it persists across campaigns...?

Someone should check me on this.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Help needed on variables editor
Those are correct, as far as I have tested and used them anyway.

 

Offline 0rph3u5

  • 211
  • Someone should label the Future: Assembly Required
    • Steam
    • Twitter
Re: Help needed on variables editor
Save on mission complete = the variable will only be altered permanently if you beat the mission and proceed in the campaign. (Right?)

Correct.

Save on mission close = the variable will be altered no matter how the mission ends, whether in failure, success, or just an alt-f4. (Right?)

Add restart and "quit to mainhall" to that list.

I am not sure about Alt+F4.

Eternal = uh I think changes are always saved and it persists across campaigns...?

This moves the location where the variable is saved from "with the campaign save file" to "with the player data" (the files are still in the same folder, its just a different file). An Eternal variable will not be reset if the campaign that uses it is reset in the campaign-section of the main hall. If you want that to happen you have to make that happen yourself.


Note: Note on these work in the Mission Simulator. The variables will fall back to their default value.
"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

==================

"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

"...because they are not Dragons."

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Help needed on variables editor
I asked this in a different thread but it doesn't seem to be getting any attention, so I'll add it here.  Persistent variables, in this case the "Save on Mission Complete" ones, in order to pass this information from one mission to the next, I need to make the variable in mission 1, have some point when the data is acquired, flag it as save-on-mission-complete, then in a later mission create another variable in that mission with the exact same name, and then use the data?  Do I need to flag this as save-on-mission-complete as well?  As this is a numeric variable, do I need to do something special with its initial value?
The Trivial Psychic Strikes Again!

 

Offline 0rph3u5

  • 211
  • Someone should label the Future: Assembly Required
    • Steam
    • Twitter
Re: Help needed on variables editor
Persistent variables, in this case the "Save on Mission Complete" ones, in order to pass this information from one mission to the next, I need to make the variable in mission 1, have some point when the data is acquired, flag it as save-on-mission-complete, then in a later mission create another variable in that mission with the exact same name, and then use the data?

Yes

As this is a numeric variable, do I need to do something special with its initial value?

The initial value get's overriden in campaign mode, however in the Mission Simulator the campaign persistent variable will default to it initial value.

E.g. For the re-release of Light of Antares I added some inter-mission persistence to the cruisers. During one testing run I made the mistake of not including a "when variable = 0, ship-vanish" and 0 as default value for the persistence variable. The event that set the ship to the saved hull value then set the ship 0 percent hull causing it to explode almost instantly as the mission starts, when played in the Mission Simulator.
"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

==================

"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

"...because they are not Dragons."

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Help needed on variables editor
Thanks for the top about the 0 thing.  I thought I was doing everything right.  I'll have to take another look at things again.
The Trivial Psychic Strikes Again!

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Help needed on variables editor
Thanks for the replies. "save on mission complete" pretty much seems to be the old "campaign-persistent". Because I remembered I had old missions lying around which used "campaign-persistent" variables and those are flagged "save on mission complete" when you open them in FRED.

I still don't really understand how "eternal" works. I made a little test campaign in which I had a variable as "save on mission complete" plus "eternal" which resulted in the variable not storing changes between missions, i.e. it was back to default in the second mission. Are they not supposed to be used together or what?

 
Re: Help needed on variables editor
I strongly belive that both variables have to be the same type.

 

Offline 0rph3u5

  • 211
  • Someone should label the Future: Assembly Required
    • Steam
    • Twitter
Re: Help needed on variables editor
I still don't really understand how "eternal" works. I made a little test campaign in which I had a variable as "save on mission complete" plus "eternal" which resulted in the variable not storing changes between missions, i.e. it was back to default in the second mission. Are they not supposed to be used together or what?

Do both the "save" and "recall" events work properly? - I have had that issue with an unreleased version of Walking on Ashes (1.0.5). - Event.log is your friend here.
"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

==================

"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Help needed on variables editor
I still don't really understand how "eternal" works. I made a little test campaign in which I had a variable as "save on mission complete" plus "eternal" which resulted in the variable not storing changes between missions, i.e. it was back to default in the second mission. Are they not supposed to be used together or what?

That should have worked. Was the variable in the second mission also flagged as eternal? If not the game should throw up an error message in debug mode but in normal builds IIRC it will just silently use a new standard "save on mission complete" variable instead.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Help needed on variables editor
Yes, the variables have the same name and the same flags on in both missions. Without "eternal" everything works as it should be.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Help needed on variables editor
So let me get this straight, you have two missions in the same campaign, the first one creates a eternal, save on mission complete variable. The second mission calls the same variable but the value is reset to the default value, not the one set by the eternal variable. Are you running in debug mode without errors?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Help needed on variables editor
Where is the fs2_open.log stored again?

 
Re: Help needed on variables editor
Doesn't Knossos have a button for that?