Author Topic: I'll be lucky if 10 people care about this!....  (Read 6497 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I'll be lucky if 10 people care about this!....
But I don't care cause those who will are likely to be very happy. :D While trying to fix a bug in the argument SEXPs I noticed that it should be possible to make this work.




The <Argument> being used will always be the first one encountered when working up the chain from the <argument>. You can not use an <argument> from the first SEXP in the 2nd or 3rd argument SEXPs unless you use SEXP variables to pass them downstream. You can however use them in anything else still (and that now includes when and every-time, both of which would crash the game previously).

Here's the build for those who want to play with it. If you haven't understood a word I've been on about then this probably isn't for you. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Re: I'll be lucky if 10 people care about this!....
Funky :yes:

Just when i get my head around Variables... Arguments throw me off agin :lol:
I'm sure this will help me get to know em. :nod:

 

Offline Topgun

  • 210
Re: I'll be lucky if 10 people care about this!....
huh? so beta will self-destruct if one of the fenris's subsystems are destroyed?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I'll be lucky if 10 people care about this!....
The SEXP itself isn't exactly doing anything interesting as such. What's interesting is the way it's working. I'm using when-argument within a when-argument. FS2_Open used to crash if you tried that sort of shenanigans before.  :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: I'll be lucky if 10 people care about this!....
So is that's essentially just a when-then-when?  I'm not so amazed that you fixed it, as that something which seems fairly intuitive didn't work before.  I hope I'm understanding it, and good job for catching that, regardless.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I'll be lucky if 10 people care about this!....
Doing the following has been possible since retail

When
-x
-When
--Y
--Do something
-When
--Z
--Do something else

In coding terms it's equivalent to

Code: [Select]

if (x) {
   If (y) {
      Do something
  }
   if (z) {
      Do something else
   }
}

As you can see that's both perfectly legal but also something coders often want to do. That has always worked. The problem was with the new -argument SEXPs Goober added. An analogy for when-argument isn't as simple but lets say using one allows us to declare a variable inside the if statement (It isn't really like that but just to keep things simple). What we had in FS2_Open would be equivalent to this

Code: [Select]
if (x) {
   int a;
 
   If (y) {
      Do something
  }
   if (z) {
      Do something to a    <-----------------------------------   a can't be accessed here so the game crashes
   }
}

As you can see it's something you might expect to be legal and is definitely something I wanted fixed. :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: I'll be lucky if 10 people care about this!....
Ooooh.  Yes, very good catch indeed.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Deckard

  • 27
  • DECK-A-R&D
Re: I'll be lucky if 10 people care about this!....
Nice one! ;)
-------------------------------
Deckard a.k.a The Silencer

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I'll be lucky if 10 people care about this!....
:bump:

http://www.freespacefaq.com/Misc-Downloads/Builds/Argument-Changes.7z

I need someone to download and test this build in a mission or two which uses the argument SEXPs heavily. BtRL would be a good choice but anything that uses them a lot will be fine. I want reports of any reproducible crashes which don't occur in other builds (WMCoolmon's build here would be a good choice to test against if you do get a crash).

I need this tested whether or not you care about the argument stuff above as what I'm most concerned about is that the changes in this build broke something.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Re: I'll be lucky if 10 people care about this!....
I'm still getting to grips with SCP extras in general Karajorma, :ashamed: wish i could help.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: I'll be lucky if 10 people care about this!....
BtRL is completely unplayable with this build. The first mission alone drags on the FPS so bad, it,s like flying through syrup once the furball is on. The waypoints do not update properly, I loose targeting and any attempt to target anything gives me a "Disengaging Targeting System", so I have to eyeball it....which would be fine if it wasn't for the molasses effect.

At least it doesn't crash. I will give it that much. But then, I cannot get through the first mission.

BtRL was just installed and updated. No modifications to anything: I copied in the posted EXE from here and executed it directly.

All other builds (including the built in one) work fine.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"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: I'll be lucky if 10 people care about this!....
Hang on a sec. You get bad FPS in this build but get good FPS on any other recent 3.6.10 builds (for instance the one I linked to)?
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
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: I'll be lucky if 10 people care about this!....
Yes.

_Especially_ in the first mission past training. Everything is fine up until you split to follow the waypoints.

Additionally, this build falls under Mantis 1759
« Last Edit: September 02, 2008, 01:40:47 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"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: I'll be lucky if 10 people care about this!....
EDIT : Nevermind. I think I see what I did wrong.

Okay, can you redownload and test this one.
« Last Edit: September 02, 2008, 03:13:57 pm by karajorma »
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
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: I'll be lucky if 10 people care about this!....
Much better. Waypoints update as they should, and everything is smooth. No failures so far. Anything specifically other than BtRL I should test?
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"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: I'll be lucky if 10 people care about this!....
BtRL was a good choice cause both myself and Axem used the argument SEXPs heavily. For instance the problem you were seeing was due to a mistake in the way the new code was handling the in-sequence SEXP and Axem's mission is probably the only released mission using that one (I don't think I even used it in my missions).

Anything with heavy use of argument SEXPs is good. Use of nested arguments like in the first post is better but obviously you'd need to build missions that do that yourself. :)
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
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: I'll be lucky if 10 people care about this!....
Ka-Oh. I've got some ideas.

BTW, still affected in BtRL of jumped out ships still being targeted. I think WMC has a fix pending that. Refer to either last post on his or the above linked Mantis.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"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 Black Wolf

  • Twisted Infinities
  • Global Moderator
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: I'll be lucky if 10 people care about this!....
How is this different to chaining sexps? Just more efficient in terms of sexp node usage?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Re: I'll be lucky if 10 people care about this!....
What would normally take fifteen sexps can now be done by one. :yes:

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I'll be lucky if 10 people care about this!....
How is this different to chaining sexps? Just more efficient in terms of sexp node usage?

It's a lot more powerful. For a start chaining events wouldn't let you do this if you wanted the event to repeat since chaining repeating events together has always been fraught with problems.

If you've ever had to do this you'll see the use

Event 1
when-argument
-list of ships
-condition
-modify variable
--variable name
--<argument>

Event 2

when
-condition
do-something to the ship in the above variable

You'll see what this change can do. Now you can avoid messing around with variables and simply have the second check inside the first event.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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