Author Topic: Feature request: Send message from list  (Read 1551 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Feature request: Send message from list
Been thinking about this one for awhile now.  It's kind of an expansion on any-wingman but would actually allow you to specify a list of ships that would send the message.  In case the first ship isn't in the mission it would use the second one in the list and so on.  Also things like any-Alpha,  any-Beta, or any <wing> would be nice. 
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: Feature request: Send message from list
Well I can't just do it for send-message-list. It would have to be done for at least send-message too and possibly other message SEXPs. I doubt you're complaining about that though. :)

Looking at the code this is perfectly legal for any of the message SEXPs.

send-message
-Beta
-high
-Message Name

However both FRED and the mission parse code won't let you do that. The code is still there and uncommented (as evidenced by the fact that I thought it was live and actually altered it when I added the radio silence code) but there is no way to reach it.

The code does have this comment in it.

Code: [Select]
// message from a wing
// this will be an invalid case soon
// Int3();
// choose wing leader to speak for wing (hence "1" at end of ship_get_random_ship_in_wing)

It looks like :v: planned to add exactly what you describe but forgot about it halfway through or decided against it. Since they never made it work I've got carte blanche to make it work sensibly rather than the stupid way they have it working in their half-finished code at the moment (It would only ever pick the wing leader and if he wasn't available it would pick any wingman from any wing). :)

So I'll simply make it do this, you can add any wing, it will first attempt to pick a ship at random from that wing who hasn't been radio-silenced. If it can't find one it will then pick any wingman in that wing. If that fails it sends high priority messages from command or sends nothing at all.

I suspect that's exactly what most FREDders would expect it to do. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Feature request: Send message from list
Not sure if that is what I was thinking or not.  It's part of it.  I was thinking something like this:

send-message
-->in-sequence
---->Beta 4
---->Gamma
---->GTV whatever
---->#voice in your head
-->high
-->message name
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: Feature request: Send message from list
Ah, what you actually want is something like this

when-argument
-first-of
--Ship list
-not
--is-destroyed-delay
-- <argument>
-send-message
-- <argument>

I suspect that would be easier to implement and would be a lot more useful in general. I'll probably implement the suggestion I had above first anyway cause it's pretty simple. Given that first-of is a cross between random-of and any-of it shouldn't be too hard to make it work but I have some other things I want to finish off first.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Re: Feature request: Send message from list
The problem is that you would need to create a voice file for each different persona, and then have the game figure out which voice file to play based upon the ship's persona
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Feature request: Send message from list
Agreed, but like using variables in messages it's one of those things that I tend to think that I'll worry about only if my mission actually is going to be voice acted. Since most aren't, why worry? :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Feature request: Send message from list
I'm more worried about using it in multi and having the message come from the player to the player if there aren't any AI ships left.  Wingman chatter in multi is always fun to try to code. 
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