Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Admiral Nelson on August 16, 2017, 10:16:24 am

Title: Messages.tbl Query
Post by: Admiral Nelson on August 16, 2017, 10:16:24 am
Could someone explain for me what exactly triggers the FSO specific wingman persona messages "Praise Self" and "High Praise" to play?  Thanks!
Title: Re: Messages.tbl Query
Post by: m!m on August 16, 2017, 11:07:43 am
So, according to the code every kill by a non-player ship has the chance of triggering a self-praise message (by default that chance is 10%). Then the code checks if the ship sending the praise message is in one of the starting wings and if it isn't then the message isn't played. There are a few other checks in there but those are mostly to make sure that the code only triggers for actual kills and not e.g. for killing a nav buoy.

The "High Praise" message is the same as "Praise" but that message is used if the player has more than 10 kills.
Title: Re: Messages.tbl Query
Post by: Admiral Nelson on August 16, 2017, 11:18:04 am
Thank you!  That's very helpful.
Title: Re: Messages.tbl Query
Post by: Trivial Psychic on August 16, 2017, 01:36:19 pm
I don't think I've ever heard a "self praise" message before.
Title: Re: Messages.tbl Query
Post by: Admiral Nelson on August 16, 2017, 02:26:59 pm
It is an FSO addition, so you could only hear it in a user made campaign in which someone has created voice acted personae and also recorded lines for "Self Praise."  Perhaps Diaspora may have it?
Title: Re: Messages.tbl Query
Post by: m!m on August 16, 2017, 02:28:22 pm
The self praise feature was written specifically for Diaspora and is used there.
Title: Re: Messages.tbl Query
Post by: Admiral Nelson on August 16, 2017, 04:20:17 pm
I think I'm still confused here.  I created a mission with 10 enemy fighters with primaries and secondaries locked, and 5% hull.  I then let my wingman, also in Alpha wing, massacre these.  I've not once heard the Praise Self message even if I set its occurrence chance to 100. Am I missing something?

Extract of the relevant parts from my messages.tbl:

#Message Frequencies

$Name: Praise Self
+Occurrence Chance: 100
+Maximum Count: 10
+Minimum Delay: 0

$Persona: Assassin    
$Type: wingman

$Name: Praise Self
$Message: XSTR("That's what happens when you try to keep up with me!", -1)
+Persona: Assassin
+Avi Name: Head-ASSASSIN
+Wave Name: assassin_27.wav
Title: Re: Messages.tbl Query
Post by: m!m on August 16, 2017, 04:44:02 pm
Ah, for the praise message to trigger the killer has to have dealt at least 10 percent of the damage. Since that is not possible the messages are never triggered.
Title: Re: Messages.tbl Query
Post by: Admiral Nelson on August 16, 2017, 08:47:45 pm
OK, that makes sense.  I can get it to trigger as expected now.  Thank you!
Title: Re: Messages.tbl Query
Post by: AdmiralRalwood on August 16, 2017, 09:22:40 pm
"High Praise" additionally requires that whatever wingman is randomly selected to praise the player have >50% hull.
Title: Re: Messages.tbl Query
Post by: karajorma on August 16, 2017, 11:37:31 pm
10% IIRC is what you need to be credited with a kill. So for that reason a wingman must also do that much damage to take credit.

You can hear the praise builtins in Diaspora. Listen for Turbo's "I just had to remind you who's the best pilot in the fleet!" for an example.
Title: Re: Messages.tbl Query
Post by: xenocartographer on August 17, 2017, 06:34:49 am
Simms' "Target down!" is also a self-praise message, and I think there are a few others in WiH.