Author Topic: How to specify one ship in a multi-wave wing?  (Read 3189 times)

0 Members and 1 Guest are viewing this topic.

Offline Aardwolf

  • 211
  • Posts: 16,384
How to specify one ship in a multi-wave wing?
I'm wondering if it's possible. I had a guess that maybe it treats the replacement ship as the same when it parses the SEXP somehow, but otherwise it would require variables and string concatenation and ewwww.

If there isn't a clean way to do this, I propose a feature: a sexp to specify the nth fighter in a multi-wave wing. It might require a bit more specific logic for replacement wings that use the wave threshold setting though...

Edit: another consideration you might want to take into consideration is, the FRED'er might want to refer to a specific position in a specific wave other than the first. Like, maybe they want to specify the 4th pilot in the 2nd wave of a wing with a threshold of 2. So basically he'd be the 8th pilot to arrive, but would be the 6th pilot simultaneously in the field.

You might need to be able to specify a specific wave number, or to use condition for whether a wave qualifies or not.
« Last Edit: July 18, 2009, 03:44:11 pm by Aardwolf »

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: How to specify one ship in a multi-wave wing?
OK that might have been one of the most confusing questions I've ever seen.

Are you trying just trying to have something happen when say the 11th ship in cancer arrives or dies or whatever?  If so you can get around the not being able to specify Cancer 11 in an sexp by using when-argument and placing cancer 11 in the list.
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 Aardwolf

  • 211
  • Posts: 16,384
Re: How to specify one ship in a multi-wave wing?
No, I mean in general it is already possible to put "Cancer 3" somewhere, but you can't easily put "Whatever ship is occupying the 3rd slot in Cancer wing for the current wave". But then I had an idea for how to make a sexp like this:

(not yet implemented)

op member-of-wing
        Cancer
        3


which would be equivalent to "Whatever ship is occupying the 3rd slot in Cancer wing for the current wave". It might also be useful, if it isn't implemented yet, to have a sexp to query what wave a multi-wave wing is on. Possibly like this:


op wing-latest-wave
        Cancer


which would return the number that the specified wing is currently up to, as far as waves (and the value it returns would increase every time the next wave arrives. It probably would start at zero up until the first wave arrived. Finally, it might also be necessary to have something like this:


op has-wave-arrived-delay
        Cancer
        2
        10


where the 2 is the wave number and the 10 is the delay. This would be so that, in addition to being able to check what wave you're at, you could also use changes in that as cues for events.

Of course, if there's already an easy way to do it, this would be unnecessary (but might still make things more convenient, depending what it takes to do these things now).

Basically, it's a "sexp request"

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: How to specify one ship in a multi-wave wing?
well I think there is a workaround... but I dunno if it works for I did not need to use it yet (its from this list of "ideas how to screw with FRED, that exist in you mind even if you never need them at all")

If you are using when-argument or everytime-argument you can type anything as argument - even "Arjuna 9" if there is no Arjuna wing or Arjuna 9 at all
FRED has yet not complained at that (but that might be because FRED does not check the arguments....)
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: How to specify one ship in a multi-wave wing?
Well to determine what wing it's on you can do a check for each time the first ship in the next wave arrives.  Doesn't work for wave threshold too well but I'm sure with a little bit of effort it would work.  Same thing  when-argument had-arrived-delay cancer 1, cancer 5, cancer 9 etc. 

Wing latest wave is simple math except for the wave threshold as well. 

Both of these really only become an issue if the ships get wiped out too quickly so the threshold is bypassed and a full wing arrives instead of say 3 of a wing of 4. 
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: How to specify one ship in a multi-wave wing?
I'm not seeing why there would be a big enough need for these SEXPs as so far I think you can calculate the answers using existing SEXPs.

I don't particularly want to add niche use SEXPs if they're for something that can be done in another way.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: How to specify one ship in a multi-wave wing?
Yeah, it's not so much of a "ADD THIS FEATURE NOW" as me commenting that the existing way of doing it seems like a bit of a hack, and possibly a nuisance in arbitrarily large wings.

  

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: How to specify one ship in a multi-wave wing?
Yea it can be a pain.  Try subsystem guardian 99 waves of 6 ships.  Not impossible but you have to split it into 3 events to fit all the ships in due to the character limit. 

On the other hand I belive there is still a limit on the number of sexps you can have so if it can be done some other way then its better to save room.   
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 Aardwolf

  • 211
  • Posts: 16,384
Re: How to specify one ship in a multi-wave wing?
You mean how many sexp's can be used in a single mission, or unique sexp's that can be defined before needing to make big changes to the game engine?

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: How to specify one ship in a multi-wave wing?
The second one.
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: How to specify one ship in a multi-wave wing?
On the other hand I belive there is still a limit on the number of sexps you can have so if it can be done some other way then its better to save room.

There is but I don't think we're anywhere near it yet. I've never really looked into this but IIRC the limit is 1024 SEXPs.

Still that does mean we should avoid the ones that will barely ever be used since there is a limit. More importantly though the more SEXPs we add the more confusing FRED becomes.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: How to specify one ship in a multi-wave wing?
What is the limit based on? 10-bits per multiplayer packet or somesuch?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: How to specify one ship in a multi-wave wing?
There's a define somewhere in sexp.h that sets it to 1024. No idea how easy that would be to bump though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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