Author Topic: Fixing SM2-08 {Solved}  (Read 1758 times)

0 Members and 1 Guest are viewing this topic.

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Fixing SM2-08 {Solved}
Retail SM2-08 causes a Sexp Overflow.

I'm working on trying to fix it, and maybe my approach is overly complicated.

First, I fixed the breaking debrief with the following:
Code: [Select]
$Formula: ( and
   ( is-event-true-delay
      "Killed A Turret"
      0
   )
   ( is-event-true-delay "All Good" 0 )
)

And added a new event "Killed A Turret":
Code: [Select]
$Formula: ( when
   ( is-event-true-delay
      "Any Turrets 1"
      0
   )
   ( or
      ( is-event-true-delay
         "Any Turrets 2"
         0
      )
      ( is-event-true-delay
         "Any Turrets 3"
         0
      )
      ( is-event-true-delay
         "Any Turrets 4"
         0
      )
   )
   ( do-nothing )
)
+Name: Killed A Turret
+Repeat Count: 1
+Interval: 1

In each of the referenced events "Any Turrets #" (1-4) I split up the 52 "( is-subsystem-destroyed-delay "Sathanas"  "turret##" 0 )" into groups of 13.

I need to set up each of these events so that destroying the subsystem only validates the event IF it also happens with "( is-event-true-delay "However" 0 )"

Example (does not work):
Code: [Select]
I are a moron. See below.

Working Code:
Code: [Select]
$Formula: ( when
( and
( or
( is-subsystem-destroyed-delay
"Sathanas"
"turret02"
0
)
( is-subsystem-destroyed-delay
"Sathanas"
"turret03"
0
)
)
( is-event-true-delay
"However"
0
)
)
( do-nothing )
)
+Name: Any Turrets 1
+Repeat Count: 1
+Interval: 1
« Last Edit: June 14, 2009, 07:06:20 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Fixing SM2-08 {Solved}
I take it that the reason for the complications are due to you wanting this to still work with Retail FS2, right?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Fixing SM2-08 {Solved}
Correct. Hence why, upon discover of the losution, I posted a fied Retail copy.

It is also committed to the FSU SVN for the MediaVP version.

I could have avoided a lot of headaches by using non-retail sexps, I'm sure.

Sadly, something with the mission is still screwed up. You can still get the Medal of Valor, even if you lose the Maahes.
« Last Edit: June 14, 2009, 03:22:48 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Fixing SM2-08 {Solved}
That's odd. I can't see how that could happen.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Fixing SM2-08 {Solved}
Neither can I.

But in testing, both, I lost the Maahes every time, but still got the Medal of Valor.

Re-Edit:
It might be because the following:
Code: [Select]
$Formula: ( when
( and
( is-event-true-delay
"Mission  Accomplished"
0
)
( is-event-true-delay "All Good" 0 )
( not
( is-destroyed-delay 0 "Maahes" )
)
)
( grant-medal "Medal of Valor" )
)
+Name: Medal of Valor
+Repeat Count: 1
+Interval: 1

Should be:
Code: [Select]
$Formula: ( when
( and
( not
( is-destroyed-delay 0 "Maahes" )
)
( is-event-true-delay
"Mission  Accomplished"
0
)
( is-event-true-delay "All Good" 0 )
)
( grant-medal "Medal of Valor" )
)
+Name: Medal of Valor
+Repeat Count: 1
+Interval: 1

Unless I have gotten something totally backwards. Which, since I am not a FREDer by any means is entirely possible.

Triple Edit: I was right. Or something. With the above change, if the Maahes is dostroyed, no Medal. If it is not, you get a medal.

Updated fixed Retail version available here.
« Last Edit: June 14, 2009, 07:08:01 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Fixing SM2-08 {Solved}
:wtf:

There's no way that should happen. The order of arguments in an AND SEXP shouldn't have the slightest effect on the outcome.

I'm going to have to take a long look into this one.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Fixing SM2-08 {Solved}
:wtf:...?

Is this issue potentially connected to the build you're using? Everything should be fine with those conditionals and SEXPS...
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Fixing SM2-08 {Solved}
Everything but the length.  It's too long for the engine to handle it was just never caught until a check for the length going over the limit was implemented. 
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