Author Topic: Flacky Campaign Editor  (Read 2734 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Flacky Campaign Editor
I've been creating an altered version of the original Freespace campaign, including loops, and I've encountered some very annoying bugs.  For one, while attempting to adapt the existing Port campaign file, I find that the editor deletes the commented lines designed to allow later FSO builds to make use of newer features such as higher resolution mainhalls.  Also, when I added the loop, it randomly changes the order of the events for each mission so that the repeat event moves to the middle position, then when you save it it complains that mission's pass info doesn't end in "true".  Also, it was randomly toggling loops for different missions, sometimes prompting warnings that there are too many loops splitting off from the same mission.  Finally, while FRED doesn't complain, when I begin the campaign in FSO (same build) it suddenly complains about there being an issue with "cond".  Here's the error log:

In sexpression: ( cond )
(Error appears to be: cond)
File: missionparse.cpp
Line: 5762

ntdll.dll! ZwWaitForSingleObject + 10 bytes
KERNELBASE.dll! WaitForSingleObjectEx + 156 bytes
fs2_open_3_8_0_RC1_x64_SSE2-FASTDBG.exe! <no symbol>
kernel32.dll! BaseThreadInitThunk + 13 bytes
ntdll.dll! RtlUserThreadStart + 33 bytes

Now, I found that I can still play the mission, but when I try to move on to the next mission, I get the error message again, and FSO goes completely black, except for the pointer.

Anyone got any insight on this?
The Trivial Psychic Strikes Again!

 
Re: Flacky Campaign Editor
There's always the good FRED++. A campaign file should be simple enough to hand-edit, but if not, shoot me a PM and we can dive into it together. Note that my free time is very constrained this week due to finals.

I'm 97% sure that "cond" isn't a valid SEXP. Nvm.
« Last Edit: May 01, 2017, 07:12:59 pm by xenocartographer »

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Flacky Campaign Editor
Assume that any .fs2 or .fc2 file with version-specific commenting will not be parsed correctly  It's really tricky to get that right due to the way Volition wrote their parser.  You'll need to hand-edit the files if you want to keep version-specific commenting.

The loops in the campaign editor could be the result of parsing the file incorrectly (due to the commenting) or they could be the result of the editor throwing a tantrum.  (I personally stopped using the campaign editor years ago and just edit all .fc2 files in Notepad++.)  I recommend starting over with a .fc2 file that has no version-specific comments in it anywhere, just to rule out the most likely source of the errors.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Flacky Campaign Editor
Thanks.  I was hoping that I wouldn't have to do it from scratch.  This is my last resort.  Did the BP team run into any of these difficulties when updating to FS2:Blue?
The Trivial Psychic Strikes Again!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Flacky Campaign Editor
Did the BP team run into any of these difficulties when updating to FS2:Blue?
I'm about 90% certain they just use notepad to make/edit their campaign files, but even if they didn't, they don't use version-specific comments.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Flacky Campaign Editor
Well, creating a new campaign file from scratch results in no complaints.  Thanks.  Perhaps the campaign editor needs some updating though, so it won't cause stuff like this.  At least have it leave the version-specific comments intact.
The Trivial Psychic Strikes Again!

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Flacky Campaign Editor
Perhaps the campaign editor needs some updating though, so it won't cause stuff like this.  At least have it leave the version-specific comments intact.
It's really tricky to get that right due to the way Volition wrote their parser.

To mitigate this, FRED will no longer generate version-specific comments in the first place unless you explicitly force it to.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Flacky Campaign Editor
I tried really hard, either last year or the year before, to make the parser less likely to go screwball with version-specific comments, but apparently that didn't work; they're just hard to deal with in general and serve a very niche purpose anyway. You should pretty much never use version-specific comments (instead, you can specify the minimum version of FSO that your mod supports and encourage people to upgrade instead of trying to make your mod compatible with older versions). The only reason FSPort uses them is so they can maintain retail compatibility, which basically no other mod should ever do.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Flacky Campaign Editor
Did the BP team run into any of these difficulties when updating to FS2:Blue?
I'm about 90% certain they just use notepad to make/edit their campaign files, but even if they didn't, they don't use version-specific comments.

I used notepad to edit the Act 3 campaign file only because its particular structure was something that the campaign editor can't produce.
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 Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
Re: Flacky Campaign Editor
Let me guess, is it the way of handling the Dreamscape that's done like that?
How do you kill a hydra?

You starve it to death.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Flacky Campaign Editor
Yep.
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Flacky Campaign Editor
I'm pretty sure I covered the reasons why version specific comments were a moronic idea years ago. I thought they were already turned off by default?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Flacky Campaign Editor
They are...

FRED will no longer generate version-specific comments in the first place unless you explicitly force it to.

However...

while attempting to adapt the existing Port campaign file

(emphasis added)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Flacky Campaign Editor
Ah so there is no need to forego using the campaign editor then, just remove the comments and then all will be fine.

The comments about Freespace Blue threw me, updating the retail FS2 campaign file shouldn't run into these issues.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Flacky Campaign Editor
Ah so there is no need to forego using the campaign editor then, just remove the comments and then all will be fine.

Yup.

Quote
The comments about Freespace Blue threw me, updating the retail FS2 campaign file shouldn't run into these issues.

Uh...

while attempting to adapt the existing Port campaign file

Emphasis added on a different word. :)  The Port campaign file is neither FreeSpace Blue nor retail FS2.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Flacky Campaign Editor
Re-read the thread. There are a whole bunch of comments about Freespace Blue.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Flacky Campaign Editor
That comment was in response to "updating the retail FS2 campaign file shouldn't run into these issues."

Trivial Psychic was comparing the FS2 -> FreeSpace Blue effort to the FS1 -> FreeSpace Port effort.  I got the impression from your comment that you were conflating the two.  If you weren't, then we're on the same page.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Flacky Campaign Editor
Actually, I was comparing the conversion of FS2 => FS:Blue, to FS1:Port => FS:Augmented... my current project.
The Trivial Psychic Strikes Again!

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Flacky Campaign Editor
:sigh:  Right.  Knew that, wrote something different.  I suppose I shouldn't throw stones about conflating projects then. :)