Author Topic: FRED Mission Save Changes  (Read 4499 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
FRED Mission Save Changes
Given the constant ability of FRED's versioning system to **** up missions on a regular basis I've decided to make the whole damn thing optional. Instead of simply having two save formats, you now have 3. Retail, FS2_Open and FS2_Open (Compatibility). The old method of saving missions using ;;FSO 3.6.x;; in front of certain features has been relegated to FS2_Open (Compatibility) where it can suck quietly without annoying anyone until someone bothers to fix it.

By default FS2_Open is the format chosen and this strips any and all version tags. Since this is a change from the way it used to work I figured I'd post a build for testing before I commit this to SVN.

What I need is for FREDders to open a variety of their missions and resave them (under a different name) a couple of times. Then check the mission still works in FS2. If it doesn't, try the same thing with a nightly build.

You can find the builds here (Foff_Version() Build) although only the FRED builds have any real difference, I've included an up to date FS2 build as well.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: FRED Mission Save Changes
Well I started with the mission with texture replacement from the 1695 bug report.  It still has problems saving even without the ;; fs2_open ;; stuff.  Kind of expected that.

Tried a couple other missions and they seem to save fine.  Ran a couple of file compares on them and the only difference I noticed were the camera position changing by .000001 in one mission and a space being added after +flags: in the wings section.  Don't think these will actually cause a problem though. 

No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
 
Re: FRED Mission Save Changes
The last two nightly builds have a serious problem saving Fred missions in my experience. I had to go back to the Dec 17 build to get a stable Fred that saves my mission files.
Here is a recent error message using the Dec 31st build:

Code: [Select]
Error: D:\Games\FreeSpace2\data\missions\Assault Fighter Testing.fs2(line 145:
Error: Required token = [#Wings] or [$Name:], found [12 Alpha 3 ] .

File: parselo.cpp
Line: 670


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 00497926()
    fred2_open_3_6_10r-20081225_r5020.exe 0041d324()
------------------------------------------------------------------


Error: D:\Games\FreeSpace2\data\missions\Assault Fighter Testing.fs2(line 146:
Error: Required token = [#Wings] or [$Name:], found [GVF Khepri Friendly -109.249443,] .

File: parselo.cpp
Line: 670


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 00497926()
    fred2_open_3_6_10r-20081225_r5020.exe 0041d324()
------------------------------------------------------------------


Error: D:\Games\FreeSpace2\data\missions\Assault Fighter Testing.fs2(line 147:
Error: Required token = [#Wings] or [$Name:], found [1.000000, 0.000000, 0.000000,] .

File: parselo.cpp
Line: 670


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 00497926()
    fred2_open_3_6_10r-20081225_r5020.exe 0041d324()
------------------------------------------------------------------


Error: D:\Games\FreeSpace2\data\missions\Assault Fighter Testing.fs2(line 148:
Error: Required token = [#Wings] or [$Name:], found [0.000000, 1.000000, 0.000000,] .

File: parselo.cpp
Line: 670


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 00497926()
    fred2_open_3_6_10r-20081225_r5020.exe 0041d324()
------------------------------------------------------------------


Error: D:\Games\FreeSpace2\data\missions\Assault Fighter Testing.fs2(line 149:
Error: Required token = [#Wings] or [$Name:], found [0.000000, 0.000000, 1.000000 Non] .

File: parselo.cpp
Line: 670


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 00497926()
    fred2_open_3_6_10r-20081225_r5020.exe 0041d324()
------------------------------------------------------------------


Error: Failed attempting to reload mission after saving.  Report this bug now!
File: freddoc.cpp
Line: 587


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 0041c880()
------------------------------------------------------------------


Error: Failed attempting to reload mission after saving.  Report this bug now!
File: freddoc.cpp
Line: 587


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20081225_r5020.exe 0041c880()
------------------------------------------------------------------
Got Shivans? The SOC Ezechiel is the schnitzel! Don't leave base without it.

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: FRED Mission Save Changes
question:

this build then removes the added tags on 3.6.10 builds such as Score tags if I save it on fred_Open right?
el hombre vicio...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Mission Save Changes
Yep. It should strip out any tags that were previously present.

Jadehawk, that's exactly the issue that caused me to give up on the old save format entirely and code this workaround in instead. What really annoys me is that I think it's something to do with my "+Use Table Score" feature but since the code is so hard to understand I can't be certain.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: FRED Mission Save Changes
r5009 doesn't have the current save bug.  I think it was introduced when Goober tried to fix one of the problems with texture replacement saving. 

String of events as I remember them. 

r5009 saves texture replacement unless you change the ship name then it looses it.  Because of the version code this resulted in the next x number of lines (however many texture replacement lines there were) being versioned.  The next Knightly build removed that problem of commenting those lines but seems to have introduced the current one. 

It doesn't happen on all ships with texture replacement but at least in my test mission blows up on a ship with more than one texture replaced. 

If I had to take a guess I would say something in change 5013 fixed one issue and caused this one.

Trying to narrow it down a bit farther.  It seems to bail on a ship with texture replacement and a +score of 0.  Still working on it.  I'll see if I can get a good test mission built to save. 


OK I think we have a winner.  I got to a point where a bug occurs but it does not crash the mission.  Steps taken:

Created a new mission with 4 Fenris with the following names:  One Texture, Multi Texture, Score 0, and Score 0 Multi. 
Saved the mission twice to be sure nothing weird happened.
Changed one texture on ship One Texture. 
Saved again twice with different name.  Still no obvious problem
Changed 3 textures on Multi Texture still no obvious problem
Changed score to 0 on Score 0.
Saved twice with another new name.
All of a sudden ship Score 0 Multi has texture replacement before I change it.

So now I'm thinking it's a problem with setting the score to 0.  Wrong.  I closed the mission and tried to go back to the save with no texture replacement.  Ship Score 0 Multi still has texture replacement.  So I'm thinking maybe I set the wrong ship the first time (which I may have done) so I removed the texture replacement from it and give it to the right ship and save.  Now 3 ships have texture replacement. 

It's like it's not initializing the variables or something and getting lost.  There may be more to this bug then just a save problem. 

I'm going to try to repeat this step by step and take screenshots after dinner.  I'll put the results in the 1695 bug in mantis. 

Don't have it.  Unfortunately this seems to be a totally unrelated bug.   Well at least I already had the steps to reproduce this one.


Back to the saving problem.  I went back to one of my initial test missions.  Removed all texture replacement from it and saving it still crashed.  Then I removed all the ;; fs2_open 3.6.10 ;; from the +use table score lines.  This time is saved fine.   

Could this just be a FRED build incompatibility?  The new test mission I was building never did get the save crash problem just that new bug with texture replacement.  Removing the comments that were only in FRED for a couple of weeks seems to have gotten around the problem. 

The texture replacement save problem seems to have been fixed at some point as well.  I opened an old version that did have that problem at one point but it saved just fine.  So it seems that it's only those missions that have the ;;FS2_OPEN 3.6.10;; in them. 
« Last Edit: January 01, 2009, 07:38:38 pm by FUBAR-BDHR »
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Mission Save Changes
Which of these problems are caused by compatibility mode and which were from the new standard save method?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: FRED Mission Save Changes
I haven't actually noticed any difference between them.  The new standard save method seems to work just fine after I strip the ;;FS2_Open 3.6.10;; out manually in notepad.  Both modes crash with it in there. 

No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: FRED Mission Save Changes
I just figured out what is causing the main problem.  If you open up a mission in one of the recent Knightly builds (I'm using r5024 right now) that was created in 3.6.9 and just save it it will add the ;;FSO 3.6.10;; +Use Table Score:.  Now if you try to save that mission again you get the crash.  Remove the ;;FSO 3.6.10;; and you are fine.  It will not add it again (which may be a bug in itself) 

I have not yet tested this in the Foff build but suspect it will do the same thing when saving in compatibility mode. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Mission Save Changes
Hmmmmm. I'll look into this but I'm going to have trouble fixing any compatibility mode problems due to the fact that I haven't got the faintest clue how it works and it occasionally seems to do the impossible (like popping the version from a vector that had previously been cleared).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: FRED Mission Save Changes
Jadehawk, that's exactly the issue that caused me to give up on the old save format entirely and code this workaround in instead. What really annoys me is that I think it's something to do with my "+Use Table Score" feature but since the code is so hard to understand I can't be certain.

Yup, all builds after r5009 destroy every Saga mission I open and then try to save. Error message similar to the one posted above:

Code: [Select]
Error: D:\SVN\trunk\Codename Hermes\data\missions\M08-BG-Hermes.fs2(line 296:
Error: Required token = [#Wings] or [$Name:], found [96 64 ] .

File: parselo.cpp
Line: 670


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10r-20090120_r5052.exe 00497ad6()
    fred2_open_3_6_10r-20090120_r5052.exe 0041d254()
------------------------------------------------------------------
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Mission Save Changes
Solution is the same too. Search and replace the ;;FSO 3.6.10;; tags and the problem will never bother you again in the default mode. The only thing I can do about this is to replace fout_version with fout in the options for +use table score and assist percentage. That would have the effect of breaking compatibility mode but I don't think it's much of a loss at the moment since it's already broken anyway.

If no one has a solution by the end of the weekend I'll just do it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: FRED Mission Save Changes
I have a solution but I've been hard pressed to find free time recently.