Author Topic: Message-sent-delay?  (Read 2796 times)

0 Members and 1 Guest are viewing this topic.

Is there a SEXP that detects when a certain message from the messages list has been sent? There doesn't appear to be.

If not, might I suggest that somebody who knows more about coding than I do create it? Something like:

message-sent-delay
   1: name of message
   2: delay in seconds
   3: (optional) number of times message must have been sent

This would be really really handy for conversation timing.

 

Offline Axem

  • 211
No, right now there isn't a sexp that would trigger on a message being sent. Instead you would need to check to see if the event that would send the message is true or not.

For conversation timing, there's a few way you can do it now. Send-message-list (but you can't stop the list once it starts), or chained events/is-event-true-delay (a bit more work, but you can only have whole seconds in the delay, so 1 or 2, not 1.5 or 6.753).

I'll let a proper coder answer the feasibility of the sexp you're asking for though, but the above methods are ways of doing basically the same thing now.

 
It would be specifically for send-message-list, and even more specifically for particularly long conversations. As it is, I've just been eyeballing it, using is-event-true-delay and then modifying the delay if it's off...

EDIT: Oh, I don't think I was clear enough: what I mean by "conversation timing" is that there are cases where I use send-message-list, and I want an event to trigger once the list has been completed. Or once a certain line in the conversation has been said, etc.
« Last Edit: September 06, 2017, 06:28:28 pm by Kestrellius »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
There are some occasions when you can't actually check the if the event has occurred. Built-in messages are somewhat random and if the message has a variable in it (or a container once those are in trunk) the message that would be sent now might be different from what was sent back then, making it difficult to check for.

All messages sent are written to the log (press F4 to see) so it should be possible to check if a message has been sent with a SEXP but unless someone is actually hitting the conditions above, I don't see why you'd need to do it that way rather than simply figuring out if it must have triggered. If you want a certain event to occur mid-way through a conversation, it's usually more sensible to split the conversation over two events.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Okay, but if you're splitting it over two events, how do you make sure the second event triggers once the first event's list is finished? Other than the clumsy delay method?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I don't find the delay to be that clumsy. Remember that even if you used the SEXP you suggested, you'd still need a delay because the event using it would trigger in the same frame the message started, not the frame after it ended.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Don't use send-message-list, it is bad :(

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Don't use send-message-list, it is bad :(
Don't post things like these without elaborating on why it is bad.
Battuta please.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Inflexible timing and uninterruptible chains make it hard to adjust your messages and impossible to kill/delay them to account for other stuff happening in the mission.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Now you've imparted wisdom  :yes:

Don't let me catch you doing this again!
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Okay, I feel like I'm still not being understood here.

So, let's say I have a mission. Two characters have a conversation, and when they're done talking, a ship jumps in. I use send-message-list for the conversation, because it's forty messages long and using individual events would take like ten years.

How do I know when to tell the ship to jump in? There's no way to tell when the message list is complete. So, I can set the ship to jump in a certain number of seconds after the S-M-L event triggers, but I have no way of knowing how long the conversation will take. There's a lot of room for variation with a conversation that long. Yeah, I can just play the mission and count, and that's what I've been doing -- it's not really difficult. But it would save time to have a better method.

@Battuta: So...is there a way to make the process of using a separate event for every message not mind-bogglingly tedious? Even with S-M-L it takes a while. With individual events, you'd have to -- wait. You'd use is-event-true-delay, but you'd still have to guess how long it took for the previous message to play! So not only would it take forever to format all of those events, you'd have to test to make sure you had the delays right.

 

Offline Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
If you're using send-message-list, then you still have to have a rough estimate of how long your messages will play, so you can calculate and place delays of a proper length. There's no way to modify anything in the conversation when it already starts, so you could just add up every single delay in the send-message-list, add some more delay to it for the last message, and just have the ship warp in that amount of time after the event playing these messages fires.

I also have no clue why would one want to use send-message multiple times instead of send-message-list, especially in that case, when nothing is supposed to be happening during the conversation except the conversation.
How do you kill a hydra?

You starve it to death.

 

Offline Axem

  • 211
Unfortunately you are running into basically what has plagued endless other FREDders who have attempted to make "story-rich" missions with a lot of conversations. FreeSpace was never really meant to have conversations be very long. Just battle reports and some general intrigue, so the way messages work was very simple and low-key. Games these days have full blown conversation editors with branching paths and call backs to let the rest of the game know when conversations are happening and how to interrupt them correctly. FreeSpace is really stone age material in that regard.

So here's what you can do (at the moment):
1) use send-message-list and keeping a running tally of when each new message will filter through. That's a little tedious, but you have no control of how the messages are sent once the list gets going (as Battuta said). I think send-message-list is perfectly fine for 2-3 message long conversations where you know everyone is alive and well.

2) a whole lot of chained events (or is-event-trues) with send-messages. Yes this is even more tedious, but you can alleviate this a bit by copying and pasting a base send-message sexp and filling in what you need to. You'll have a greater deal of control, but yes, it is pretty tedious as well.

Now to answer your question "how long does this conversation take?". Well... that is really hard to answer. You'll need to find your own rule of thumb. Delays between short messages need about 5-6 seconds long for a player to be able to read them well. Average ones about 6-8. Long messages will need... however much.

 

Offline Novachen

  • 29
  • The one and only capella supernova
    • Twitter
Mh.. where is the problem the read all the messages aloud to know, how long every one of them will take?
Actually i would always create dialogue sequences with a voice acting in mind for the delays. Also you have characters in mind and so you know how (fast) they would speak.
Because so it does not need any big changes if there will be a real voice acting some day.


Actually i think 40 indiviudal events much less tedious instead of a giant message list  :)... because individual events give much more control about everything. And imo it does not take longer to create.. because you have to add every source, priority, message and delay in a message-list nonetheless.

Female FreeSpace 2 pilot since 1999.
Former Global moderator in the German FreeSpace Galaxy Forum.
Developer of NTP - A Multi-Language Translation Library Interface, which allows to play FreeSpace in YOUR Language.

Is one of my releases broken or not working? Please send a PM here, on Discord at @novachen or on Twitter @NovachenFS2, a public tweet or write a reply in my own release threads here on HLP, because these are the only threads i am still participating in.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
The easiest way to make a message-list is to open the mission file in notepad, and copypaste as many entries as you need, then continue editing the list in fred's event window after. Saves the tedium of manually having to add each line one by one.

Words
Agreed
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Oh...I think there's something I've been missing. I always use text-to-speech if there's no voice-acting available -- which obviously there isn't for my WIP -- and I'd just been having a delay of 0 between messages, and they lasted however long it took the TTS to read them. I assumed the delay took place after that span of time, not including it.

Also, when I've tried using the delay, I haven't been able to get it to do anything -- it seems to behave exactly the same...

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
It's in milliseconds, one second delay is 1000

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Okay, I feel like I'm still not being understood here.

So, let's say I have a mission. Two characters have a conversation, and when they're done talking, a ship jumps in. I use send-message-list for the conversation, because it's forty messages long and using individual events would take like ten years.

How do I know when to tell the ship to jump in? There's no way to tell when the message list is complete. So, I can set the ship to jump in a certain number of seconds after the S-M-L event triggers, but I have no way of knowing how long the conversation will take. There's a lot of room for variation with a conversation that long. Yeah, I can just play the mission and count, and that's what I've been doing -- it's not really difficult. But it would save time to have a better method.

@Battuta: So...is there a way to make the process of using a separate event for every message not mind-bogglingly tedious? Even with S-M-L it takes a while. With individual events, you'd have to -- wait. You'd use is-event-true-delay, but you'd still have to guess how long it took for the previous message to play! So not only would it take forever to format all of those events, you'd have to test to make sure you had the delays right.

One event for each message, chained to control the delays, your ship jumps in when the last event is true. Boom, super easy, you don't have to time anything to get your ship to arrive at the right time. And you can easily adjust the conversation length. Or add a dialogue skip on replays!

Send message list is an agent of Belial, cast it from your house

 
It's in milliseconds, one second delay is 1000

ohhhhhhhhhhhhhh

this explains everything

Anyway. Yeah, I guess I should switch to the one-event-per-message technique. Copy-pasting might make it less horrible...

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Delay between chained events is in whole seconds, though #justfredthings