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
-
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*
---------------
- Advanced Team Loadout Functions
- Ability to play cutscenes before Fiction, Command Brief, Brief, Game Start and Debrief.
- Various multiplayer SEXP fixes detailed here (http://www.hard-light.net/forums/index.php/topic,62306.msg1229273.html#msg1229273).
- Ability to chat to team mates only in TvT games briefings using /f:
- Praise Self built-in message support (as described here (http://www.hard-light.net/forums/index.php/topic,61862.0.html)). NB I'm likely to change how often these play in some way.
- New SEXPs
- do-for-valid-arguments (http://www.hard-light.net/forums/index.php/topic,62580.0.html)
- validate-argument
- afterburner-energy-pct
- weapon-energy-pct
- get-damage-caused
- primary-fired-since
- secondary-fired-since
- set-afterburner-energy
- set-weapon-energy
- set-shield-energy
- set-ambient-light (http://www.hard-light.net/forums/index.php/topic,62736.0.html)
- set-respawns
Here (http://www.freespacefaq.com/Misc-Downloads/Builds/Multiple_Builtins_Build.7z)'s the build.
-
Oh, man. I can't wait to try this out.
-
The energy pct will be extremely helpful for me. Thanks.
-
Olé! ( great! ) ;)
-
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. :)
-
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.
-
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.
-
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?
-
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.
-
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.
-
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).
-
Is there also a "High Own Praise", as in someone saying "Damn, I lost count of my kills!"?
-
Nope. AI don't keep track of their kills but I suppose it might be possible to work out the number from the log.