Author Topic: Complicated SEXP Strings  (Read 4838 times)

0 Members and 1 Guest are viewing this topic.

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Complicated SEXP Strings
I was playing around in FRED with your stupid (yet useful) little when-arguments and your idiotic (yet useful) string variables... And I found myself with quite a long SEXP string.

So then I sat and wondered... What's the most complicated SEXP string that you've ever made? I'd like to know since I like looking at SEXP strings... Especially when I didn't do them and someone already did it for me.

I thought it might make for an interesting thread... :D

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Complicated SEXP Strings
So then I sat and wondered... What's the most complicated SEXP string that you've ever made? I'd like to know since I like looking at SEXP strings... Especially when I didn't do them and someone already did it for me.

Corrected :)

The are no "complicate" SEXPs once you learn how to use them. Try to combine string-variables with when-argument conditionals in the most strange way and you shall see. You can find an example in Steadfast Ep1M1, with that take off string-variable system :)
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 Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Complicated SEXP Strings
Well even if you know how to use it and how it works it's still complicated.

I thought you were going to post something *really* freaky, LGM. ;)

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Complicated SEXP Strings
Like that thread in the INFA Internal? No. I posted my secrets there :nod:

The point is that when-argument is a key. With it, you can do so many things and significantly reduce the number of events of a mission.
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 Axem

  • 211
Re: Complicated SEXP Strings
This is the best one I can find. It's from my mission in the BtRL demo.



Let's hope kara won't see this thread or I'm sure he'll post something that'll make our brains implode. :p

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Complicated SEXP Strings
Here's one I was working on with EtheralEntity back in the day.  Was one of out many attempts to find a workaround for self destruct in multi player.  Never did find one that would work every time due to the processing order of the events and respawns plus multi player lag being thrown in.  The idea was to make player ships self destruct (thus forcing a respawn) if they left the vicinity of a super station in a TvT and did not return within a specific amount of time. 

Quote
$Formula: ( when
   ( true )
   ( when
      ( or
         ( < ( hits-left "Alpha 1" ) 1 )
         ( > ( hits-left "Alpha 1" ) @A1H[100] )
      )
      ( modify-variable @A1[30] 33 )
   )
   ( modify-variable
      @A1H[100]
      ( hits-left "Alpha 1" )
   )
   ( when
      ( >
         ( distance "<any unknown>" "Alpha 1" )
         150
      )
      ( when
         ( > @A1[30] 0 )
         ( modify-variable
            @A1[30]
            ( - @A1[30] 1 )
         )
      )
      ( when
         ( = @A1[30] 0 )
         ( modify-variable @A1[30] 33 )
         ( self-destruct "Alpha 1" )
      )
   )
   ( when
      ( <
         ( distance "<any unknown>" "Alpha 1" )
         151
      )
      ( modify-variable @A1[30] 10 )
   )
)
+Name: Alpha 1
+Repeat Count: 999999999
+Interval: 1
+Team: 0
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 Roanoke

  • 210
Re: Complicated SEXP Strings
This is the best one I can find. It's from my mission in the BtRL demo.



Let's hope kara won't see this thread or I'm sure he'll post something that'll make our brains implode. :p

As someone who's stuck with Retail (for the moment) and hasn't used "arguments", what did that achieve exactly ? was to ensure a waypoint didn't appear untill previous points had been visited ?

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Complicated SEXP Strings
Dunno how to explain, but every time FS2 sees <argument> it replaces it with one of the waypoints.

 

Offline Shade

  • 211
Re: Complicated SEXP Strings
Is it a requirement that the events actually work as intended? :p

Roanoke:

Using <argument> is essentially a way to avoid repeating the same event over and over again for different targets. Instead, you can now use an argument list on a repeating event and have it automatically go through it until the operation has been performed on all targets in the list. The event shown above will in turn delete navpoints 1 through 5, and is basically the same as making 5 seperate events for each nav point, but takes far less effort for the mission designer. It does become a more complicated event as you need to invalidate used arguments etc., but with practise it becomes a good time saver when FREDding.
« Last Edit: May 20, 2007, 09:54:04 am by Shade »
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Complicated SEXP Strings
Well this one from MindGames is still Top Secret



So I'll have to grab something from BtRL but unfortunately I don't have anything too complicated there (at least not in a single Event). My longest event in BtRL is this one IIRC.

Quote
$Formula: ( when
   ( and
      ( is-event-true-delay
         "Protect Scar And Everyone Else"
         5
      )
      ( not
         ( has-departed-delay 0 "Fractalÿ4" )
      )
      ( or
         ( and
            ( is-event-true-delay
               "Blue 2 Has Other Things To Do"
               0
            )
            ( >
               ( distance "Blue 2" "Monarch" )
               @CONST-DRADISMaxRange[4000]
            )
         )
         ( and
            ( is-event-true-delay
               "Blue 3 Has Other Things To Do"
               0
            )
            ( >
               ( distance "Blue 3" "Monarch" )
               @CONST-DRADISMaxRange[4000]
            )
         )
         ( and
            ( is-event-true-delay
               "Blue Has Other Things To Do"
               0
            )
            ( or
               ( >
                  ( distance "Blue 2" "Monarch" )
                  @CONST-DRADISMaxRange[4000]
               )
               ( >
                  ( distance "Blue 3" "Monarch" )
                  @CONST-DRADISMaxRange[4000]
               )
            )
         )
         ( and
            ( or
               ( order
                  "Blue 2"
                  "Destroy my target"
                  "Fractalÿ4"
               )
               ( order
                  "Blue 3"
                  "Destroy my target"
                  "Fractalÿ4"
               )
               ( order
                  "Blue"
                  "Destroy my target"
                  "Fractalÿ4"
               )
            )
            ( or
               ( >
                  ( distance "Blue 2" "Monarch" )
                  @CONST-DRADISMaxRange[4000]
               )
               ( >
                  ( distance "Blue 3" "Monarch" )
                  @CONST-DRADISMaxRange[4000]
               )
            )
         )
      )
   )
   ( do-nothing )
)
+Name: Fight Your Own Damned Battles

Which was basically the arrival trigger for Optic wing if the player tried to get one of his wingmen to abandon their escort and come help him fight Scar.


Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Re: Complicated SEXP Strings
* Dark Hunter s brain implodes
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

"You can fight like a krogan, run like a leopard, but you'll never be better than Commander Shepard!"

  

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Complicated SEXP Strings
's not that bad.

 
Re: Complicated SEXP Strings
'twas a joke, Snail.  ;)
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

"You can fight like a krogan, run like a leopard, but you'll never be better than Commander Shepard!"

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Complicated SEXP Strings
Well it would make a few people's head explode.

Hehe, LGM's helping me fix up my mission that I just don't seem to be able to get ;)

 

Offline Roanoke

  • 210
Re: Complicated SEXP Strings
probably easier to read if it were a  FRED screencapture.  :doubt:

That Mindgames event looks ace  :D

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Complicated SEXP Strings
Hehe, LGM's helping me fix up my mission that I just don't seem to be able to get ;)

I can always copy and paste that system posted in the INFA Internal :nod:
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 Axem

  • 211
Re: Complicated SEXP Strings


I see part of a training message sexp. My god. It's the training mission from hell!

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Complicated SEXP Strings
I have one mission (14c in PI) that doesn't have any truly complicated events, but is only one or two events away from the 150 limit. I only just realized that when I tried to make some adjustments to it. :p

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Complicated SEXP Strings
Pretty impressive. Closest I ever got to that is 120 in Birth of a Legend for BtRL.
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: Complicated SEXP Strings
Well, it's not a sexp event, but I did come up with the masterpiece in the attached screencap...


Well this one from MindGames is still Top Secret
Ah, I think I know which one you mean. :D


I have one mission (14c in PI) that doesn't have any truly complicated events, but is only one or two events away from the 150 limit. I only just realized that when I tried to make some adjustments to it. :p
Mission 6 in STR is like that too. :)

[attachment deleted by admin]
« Last Edit: May 21, 2007, 10:27:54 pm by Goober5000 »