Author Topic: Builtin Messages Overhaul  (Read 5679 times)

0 Members and 2 Guests are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Builtin Messages Overhaul


Since I've apparently been given a very light workload for the next two weeks, I've decided that I'm going to get back into SCP programming with some improvements to the way Builtin Messages work. The image above shows one of the major problems with the system.

For this reason, I plan to upgrade the system to allow messages.tbl to have a +Mood entry for any message. Anything without a mood is considered okay to play at any time. Anything with a mood will only play if the pilot or mission has a matching mood. So given a table like this

Code: [Select]
$Name: Praise Self
$Message: XSTR("Damn I'm good!", 968)
+Persona: GenericPilot1
+Wave Name: Pil_gen1_praisehimself.ogg
+Mood:            Boasting


$Name: Praise Self
$Message: XSTR("Please, I can do that any day of the week.", 974)
+Persona: GenericPilot1
+Wave Name: Pil_gen3_praisehimself.ogg
+Mood:            Arrogant


$Name: Praise Self
$Message: XSTR("Got one! Take that you metal bastard.", 975)
+Persona: GenericPilot1
+Wave Name: Pil_gen4_praisehimself.ogg
+Mood:            Vengeful


$Name: Praise Self
$Message: XSTR("Yeah! Scratch one bogey!", 984)
+Persona: GenericPilot1
+Wave Name: Pil_gen5_praisehimself.ogg


$Name: Praise Self
$Message: XSTR("Score another one for me.", 985)
+Persona: GenericPilot1
+Wave Name: Pil_gen6_praisehimself.ogg

At the start of the mission, only the last two generic (no mood) messages will play. The I use the new SEXP I'll add

Set-Builtin-Pilot-Mood
-Red 2
-Boasting

and the first message will play instead. Then the players battlestar gets blown up. I don't just want Red 2 to react so I use a different SEXP

Set-Builtin-Mission-Mood
-Vengeful

And now everyone will start cursing the Cylons when they kill them.

Anyway, that's the plan. What I want to know is if there are any ways I could make that better, or if there is anything else I should do to the builtin messages system while I'm in there.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Builtin Messages Overhaul
While you're messing with builtin messages, could you also get rid of the hardcoded terran command "hostiles arrived" message that appears when you set the command sender to a capship?
It's hardcoded for sure because it's not in my messages.tbl yet shows up randomly anyway, playing the retail headani + voice over file with the default message... I had to hack "around" it by replacing the source headani and voice file...
(´・ω・`)
=============================================================

 
Re: Builtin Messages Overhaul
Would it depend on a hard-coded list of moods, or would it work via string comparison? Hard-coded moods might be slightly faster and more fool-proof, but string comparison would allow infinite flexibility: mods could specify any moods they want. JAD could use 'troll' and 'disco' moods, for instance, and mission-specific built-in messages would also become possible. To continue your example, after the player's battlestar gets blown up, the pilots could go "There, that one's for the Theseus!". The only limit would be the modders' imagination.

 

Offline Sushi

  • Art Critic
  • 211
Re: Builtin Messages Overhaul
You mention both mission-based and pilot-based moods. I humbly suggest starting just with the first one, and dealing with the second one later. The mission ones are both more immediately useful and more straightforward, I think, and will be easier to do.

Honestly, my first thought is to just allow "mood" to be a property of a mission that can be controlled via set-mood and clear-mood SEXPs. You can have more than one mood as appropriate for the current circumstances (so you basically track a list of active moods). And as you already mentioned, mood-keyed messages will only play if the current mission's mood list includes the right string. It may also be useful to have a +Not Mood property, for messages that are generally appropriate EXCEPT for specific times.

So for Diaspora, to prevent stuff like the above, you could do the following:

- Cocky pilot messages of praise for self and others have +not-mood: Somber.
- In the mission, track a variable called "somber-cooldown." This starts at 0.
- When a major friendly ship gets blown up, add some value to somber-cooldown and call set-mood "Somber".
- Have a SEXP that just fires off every second and decrements somber-cooldown until it is 0.
- Have a SEXP that fires when somber-cooldown reaches 0 to call clear-mood "Somber".

Or something like that. This is all pretty much off the top of my head.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Builtin Messages Overhaul
If your going for cooldown stuff such as that, you might have to resort to mood scales... like from Overjoyed to Pissed off.  :nervous:
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Builtin Messages Overhaul
While you're messing with builtin messages, could you also get rid of the hardcoded terran command "hostiles arrived" message that appears when you set the command sender to a capship?
It's hardcoded for sure because it's not in my messages.tbl yet shows up randomly anyway, playing the retail headani + voice over file with the default message... I had to hack "around" it by replacing the source headani and voice file...

I'm not certain which error you're on about. But file a Mantis bug report on it and I'll assign it to myself.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Builtin Messages Overhaul
This sounds like a terrific feature. :yes:  I think the string-comparison method for mood selection would be the most useful.

 

Offline redsniper

  • 211
  • Aim for the Top!
Re: Builtin Messages Overhaul
Code: [Select]
when
-all-day
-erry-day
 -Set-Builtin-Pilot-Mood
  -Laporte
  -Vengeful
  -Murderous
  -Insane
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Builtin Messages Overhaul
While you're messing with builtin messages, could you also get rid of the hardcoded terran command "hostiles arrived" message that appears when you set the command sender to a capship?
It's hardcoded for sure because it's not in my messages.tbl yet shows up randomly anyway, playing the retail headani + voice over file with the default message... I had to hack "around" it by replacing the source headani and voice file...

I'm not certain which error you're on about. But file a Mantis bug report on it and I'll assign it to myself.

...This appears to have been caused by a massive derp on my part.
It's been defaulting to some hardcoded arrival message because it's picking "Command" to send a message when the Command Persona selected has no "Arrive Enemy" message defined (I derped and typoed Command as Comand lol), thus causing it to play HEAD-CM1, TC_Arrival.wav, and a random "Arrive Enemy" message picked from messages.tbl, which, while being a strange default option, I guess isn't really a bug?

That said I am excite about this feature.
« Last Edit: September 10, 2012, 10:54:09 pm by Droid803 »
(´・ω・`)
=============================================================

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Builtin Messages Overhaul
Cool. I'll have to get to coding it then. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Re: Builtin Messages Overhaul
Is there any chance for a taunt function (you would be able to use it on enemies to goad them into dropping what they're doing for a while to attack you, and enemies could be set to use it on you every so often)?
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Builtin Messages Overhaul
Yes, that'd come in handy. Also, voice messages by player while giving orders could greatly add to atmosphere, especially in non-FS mods.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Builtin Messages Overhaul
Neither of those are builtin messages but I'll look into it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Builtin Messages Overhaul
...you know what Spoon and Droid will do with this, right?  FS_Open: The Visual Novel.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Builtin Messages Overhaul
...you know what Spoon and Droid will do with this, right?  FS_Open: The Visual Novel.

Both Spoon and I (and probably Droid too) have in fact already done this by use of some insane SEXP trees. You can build your own extremely detailed pilot personas in FRED. Right now I have several missions where each wingmate will react not just to orders in general but to orders to attack or defend specific ships at specific times in the mission, and they'll even draw from a pool of randomized lines so they don't repeat themselves too much.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Builtin Messages Overhaul
...you know what Spoon and Droid will do with this, right?  FS_Open: The Visual Novel.
>Implying I'm not already doing this without this feature

Both Spoon and I (and probably Droid too) have in fact already done this by use of some insane SEXP trees. You can build your own extremely detailed pilot personas in FRED. Right now I have several missions where each wingmate will react not just to orders in general but to orders to attack or defend specific ships at specific times in the mission, and they'll even draw from a pool of randomized lines so they don't repeat themselves too much.
I've seen this in action in BP and its super nice and impressive  :yes:
But a visual novel it is not  :p
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
Re: Builtin Messages Overhaul
Yeah but the VN stuff you're doing is the same technique, right? It's not a codeside pilot persona thing. You could already achieve all this 'mood' stuff with SEXPs - it'd just be much more of a pain in the ass.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Builtin Messages Overhaul
Yep. Which is why I want to put it into the code. :)

...you know what Spoon and Droid will do with this, right?  FS_Open: The Visual Novel.

And the only reason I'm not going to be making Diaspora : The Visual Novel is cause we're shooting for fully voice acted in every release. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Builtin Messages Overhaul
...you know what Spoon and Droid will do with this, right?  FS_Open: The Visual Novel.
>Implying I'm not already doing this without this feature

I have to commend you for being able to sift through 200+ events, enough to make the old FRED events editor lock up on closing, and have the events page span 2 whole monitors.

Yeah but the VN stuff you're doing is the same technique, right? It's not a codeside pilot persona thing. You could already achieve all this 'mood' stuff with SEXPs - it'd just be much more of a pain in the ass.

Yeah, which is why I actually haven't tried it (to any deep extent, after it being apparent that it would be a pain in the ass) :P
I've heard the horror stories and am not interested in fighting SEXPthulhu to make it work. :nervous:
With the codeside pilot things though, I'm much more inclined to make it happen XD
(´・ω・`)
=============================================================

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Builtin Messages Overhaul
Without even the luxury of Spoon's awesome dual monitors I ended up having to FRED in notepad a lot. (This feature would own as code)