Author Topic: What is this for? Problem solved.  (Read 2560 times)

0 Members and 1 Guest are viewing this topic.

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
What is this for? Problem solved.
While doing some update work on STL I found a section I've never seen before:
#Sexp_variables

$Variables:
(
      0      "ReconCount"      "0"      "number"
      1      "SafeJump"      "1"      "number"
      2      "ShipCount"      "0"      "number"
)
This is in several of the missions and in every case the mission causes FRED to crash if I modify it and try to save it.  I can play the missions and modify them with notepad but can't modify and save them in FRED.  This is only true for those missions that have a SEXP_variables section located prior to the Command briefing section.  What does this do and can it be removed?
« Last Edit: May 19, 2014, 06:25:46 pm by Macfie »
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Aren't those just...variables? Broadly used in advanced mission design, a cornerstone of sophisticated FRED work? Why would you want to remove them?

Or am I missing some way in which they differ from normal variables? If I'm not, then, uh, meet variables! They are super cool and incredibly vital to complex mission design.

For reference, you're seeing the variable's index (0), its name (ReconCount), its default value (0), and the type of variable ("number" or "string").


 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
In FRED, you interact with variables using the events editor. Right click and use 'add variable'/'modify variable' to add a variable or tweak a variable's name and default parameters. Use the modify-variable SEXP and its friends to modify variables. Use variables as values in data fields to call them/

 

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
Shouldn't they then be in the events section and why are they preventing FRED from saving the mission?
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
They're not events - just pieces of data that events interact with. Storing them up near the mission header helps with workflow, since it makes them easy to copy/paste between mission files when reusing event blocks that call the same variables.

If they're preventing FRED from saving the mission, then something's wrong. Is it possible that manual editing of those sections has damaged them? What version of FRED are you using?

 

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
The latest nightly.  I was trying to figure out if I needed the variables.
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Sorry, I have to ask a clarifying question. Did FRED start crashing on mission save before or after you manually edited the files in notepad?

Removing a variable will cause the mission to crash on save (or load) if that variable is referenced anywhere in the mission file. Odds are that any given variable is referenced, since it was probably added for a reason.

 

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
Before, I first tried to modify the missions in FRED and discovered the problem.  The changes I made had nothing to do with the variables.  After that was when I tried modifying the missions.  It doesn't actually crash FRED it tells me it can't save the mission and I lose all the data in the mission.  It essentially saves a default that looks like a new mission.  It has a Ulysses with nothing else.
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Wow. That's...quite something. Is there any chance you can use a debug build of FRED to repro the error, then post a fred2_open.log? (I assume those exist)

 

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
Here's the debug log.

[attachment deleted by an evil time traveler]
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Wait what.

Code: [Select]
C:\Games\FreeSpace2\FSP_STL\data\missions\STL-12.fs2(line 1011): Error: Required token = [#Wings] or [$Name:], found [$Texture Replace:].

ERROR: C:\Games\FreeSpace2\FSP_STL\data\missions\STL-12.fs2(line 1011):
Error: Required token = [#Wings] or [$Name:], found [$Texture Replace:].

I have to ask, what exactly are you doing with those missions? Because that error message basically tells me that the order of entries in the .fs2 file is severely messed up.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
This is from the original STL mission.  It appears to be a preexisting problem.  All I did was change a selection for debriefing music in the debriefing editor.
I've attached a copy of the mission.

[attachment deleted by an evil time traveler]
« Last Edit: May 19, 2014, 01:11:13 pm by Macfie »
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
The error is related to the old feature around commenting out SCP features in the mission file by adding ";;FSO 3.6.8;;" or such.  FRED scrambles up the mission when you try and save it with these still in there.  You should do a global find and replace on ";;FSO 3.6.8;;" throughout the campaign, replacing it with nothing.  This will fix the problem.  I've been bitten by that issue in the past.
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline Macfie

  • 210
  • If somebody made a campaign I've probably got it
Thanks, Admiral.  Now that you mention it I seem to remember something about that.  I'll try that and see if it fixes the problem.

Removed ;;FSO 3.6.8;; and that solved the problem
« Last Edit: May 19, 2014, 06:25:08 pm by Macfie »
Normal people believe that if it isn't broke, don't fix it. Engineers believe that if it isn't broke, it doesn't have enough features yet.
The difference between Mechanical Engineers and Civil Engineers is:
Mechanical Engineers build weapons.  Civil Engineers build targets
An optimist sees the glass half full; the pessimist sees it half empty. An engineer sees that the glass is twice as big as it needs to be.