Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: karajorma on May 08, 2009, 01:34:28 pm

Title: More builtin changes
Post by: karajorma on May 08, 2009, 01:34:28 pm
One of the more annoying things about built-in messages is that you'll hear the same one over and over again if the pilot is given the same order more than once. While looking at the code today I noticed that it was actually fairly easy to change this. The game now supports as many built-in messages as you want for any persona (although I may limit this to a sane number like 10 or so). You must remember that all built-in messages (not just the ones from this mission) + scripted messages (i.e the ones the FREDder added to this mission) must be less than the MAX_MISSION_MESSAGES which is currently 1000.

Standard rules for my builds apply (i.e don't use any of the new features for anything you want to release on 3.6.10 Official as it will probably be a couple of months before all this stuff is in trunk and it will never be in 3.6.10.)

EDIT : Build modified to include support for the High Praise builtin message type. This plays a different praise message if the player has more than 10 kills. If the message doesn't exist the game will play the old praise message instead.

EDIT 2 : Added the Primaries Low builtin type too. It will be used instead of the more generic rearm message if a ship is low on bullets.

*Other Features*
---------------



Here (http://www.freespacefaq.com/Misc-Downloads/Builds/Multiple_Builtins_Build.7z)'s the build.
Title: Re: More builtin changes
Post by: General Battuta on May 08, 2009, 02:56:49 pm
Oh, man. I can't wait to try this out.
Title: Re: More builtin changes
Post by: Dark RevenantX on May 08, 2009, 03:57:26 pm
The energy pct will be extremely helpful for me.  Thanks.
Title: Re: More builtin changes
Post by: Deckard on May 09, 2009, 05:50:32 am
Olé! ( great! ) ;)
Title: Re: More builtin changes
Post by: karajorma on May 09, 2009, 07:50:39 am
If anyone has any ideas for builtin messages that aren't already mentioned on this thread (http://www.hard-light.net/forums/index.php/topic,61862.0.html). Now's the time to ask, while how to add them is still fresh in my mind. :)

Title: Re: More builtin changes
Post by: Angelus on May 09, 2009, 08:36:03 am
If anyone has any ideas for builtin messages that aren't already mentioned on this thread (http://www.hard-light.net/forums/index.php/topic,61862.0.html). Now's the time to ask, while how to add them is still fresh in my mind. :)



Dunno if it's feasible or useful, but what about "environmental" based messages?
Warnings that get played in nebulae and asteroid fields only.
If  a player for instance is supposed to guard a ship in a asteroid field the wingman send warnings that "more rocks closing to the ship" or something like that.

Would it be possible to send buildin messages based on how many asteroids are closing to the ship?

While that stuff is FREDable, i think it might save the FREDed some time when such messages are played by default.
Title: Re: More builtin changes
Post by: karajorma on May 09, 2009, 08:48:54 am
Builtins aren't just meant to save FREDders time though. They're meant to be there for things that are impossible or tediously difficult to set up without them.

In the example above you could just have the the guarded ship say that message. Changing it into a builtin forces you to come up with a line (and get it voice acted) for every single persona you have.

Which does remind me of an issue I forgot to mention. If you are using any of the new messages you must ensure that you have a version for every single persona as if the game fails to find a message for Persona A it will simply look to see if any other Persona has that message and will play that one instead.
Title: Re: More builtin changes
Post by: Tolwyn on May 09, 2009, 10:25:56 am
Which does remind me of an issue I forgot to mention. If you are using any of the new messages you must ensure that you have a version for every single persona as if the game fails to find a message for Persona A it will simply look to see if any other Persona has that message and will play that one instead.

Meaning, that the ship in question will send the message using a different persona or will the game switch to next available wingman, that does have the required voice line?
Title: Re: More builtin changes
Post by: karajorma on May 09, 2009, 11:14:35 am
The code works like this.

1) Select a random ship for the message if applicable (e.g Behind You, Praise, etc Death, Rearm, etc will have already specified a ship).
2) See if there is a message for that persona. Send from the ship from 1)
3) If 2) failed, see if there is a message for a different person. Send from the ship from 1)
4) Give up.

So if the persona doesn't have a certain message but other do the message will come from the right ship but the wrong persona. Unfortunately there is no way to change this without substantial re-engineering of the code. Which is why I suggested that if you use any new message, you make sure that all personae have that message. That is actually the way the game has always worked.
Title: Re: More builtin changes
Post by: Aardwolf on May 09, 2009, 10:07:39 pm
That's ... odd. Would it be difficult to change that to be customizable? I haven't looked much at the files for personas (other than the audio files and tstrings.tbl), so I don't really know what that end is like.
Title: Re: More builtin changes
Post by: karajorma on May 10, 2009, 01:41:25 am
It's a little odd but quite frankly you should be providing full support to any new builtins or none at all anyway. That's how FS2 did it. (In fact FS2 has a bunch of recorded lines for builtins that aren't ever used).
Title: Re: More builtin changes
Post by: Grizzly on May 24, 2009, 01:17:07 pm
Is there also a "High Own Praise", as in someone saying "Damn, I lost count of my kills!"?
Title: Re: More builtin changes
Post by: karajorma on May 24, 2009, 02:38:54 pm
Nope. AI don't keep track of their kills but I suppose it might  be possible to work out the number from the log.