User Tools

Site Tools


hpl3:game:voicehandler

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl3:game:voicehandler [2013/03/13 06:59]
thomas
hpl3:game:voicehandler [2014/01/09 08:10]
thomas [Character]
Line 21: Line 21:
 Name of the character Name of the character
  
-**AutoGenVoice**\\ +**EntryType**\\ 
-If the voices should be autogenerated ​(jrpg style).+The type of the sounds ​(and extrasoundsthat are played for this character. Is either World, WorldClean or GUI.
  
-**AutoGenVoiceFile**\\ 
-The sample that should be played when the character speaks. 
- 
-**AutoGenVoiceSoundFreq**\\ 
-Determines the frequences (times per second) that AutoGenVoiceFile is played. 
  
 ===== Scene ===== ===== Scene =====
Line 98: Line 93:
  
  
-Example, the firs sound of a subject can be:\\ +Here is an example:\\ 
 //​01_01_castle/​SwordFight_ShowMercy_002_Arthur_001//​\\ //​01_01_castle/​SwordFight_ShowMercy_002_Arthur_001//​\\
-This would be a voice sound being said in the map //"​01_01_castle"//​ (no file extension!),​ in the Scene //"​SwordFight"//​. The subject is //"​ShowMercy"//,​ it is the second line, it is being said by ''​Arthur'' ​and it is his first sound for that line.+This would be a voice sound being said in the map //"​01_01_castle"//​ (no file extension!),​ in the Scene //"​SwordFight"//​. The subject is //"​ShowMercy"//,​ it is the second line, it is being said by //"Arthur"// ​and it is his first sound for that line.
  
  
Line 146: Line 141:
 Number of seconds of padding in the length of voice file. If this is over 0, then that means the next sound will start that many seconds earlier (while the current sound is still playing). Number of seconds of padding in the length of voice file. If this is over 0, then that means the next sound will start that many seconds earlier (while the current sound is still playing).
  
 +====== Use with AI ======
 +
 +When using voice with AI it is best always through the [[http://​wiki.frictionalgames.com/​hpl3/​game/​scripting/​entity_components#​barkmachine|BarkMachine component]] using ''​BarkMachine_PlayVoice(...)''​. That way it is sure to be played in the right place even if there are multiple agents that use voices from the same character. When using the BarkMachine,​ the source set up directly before the line is played.
 +
 +The voices for all agents should also have "​AgentBark"​ as scene, this way it makes it possible to see to that there is only one dialog line from an Agent at a time. Should there be some special line that does not apply to this, then by all means do not do this. 
 +
 +If you want to have longer specific dialog on agents, then the best way to set that up is to have the piece of a dialog as a single subject with two unique Characters attached to the lines. Then set up these characters as voice sources specifically in the script and start the dialog using ''​Voice_Play''​. The scene must be AgentBark as described above and the prio must be less than what the default barks use. What then happens is that the dialog will continue until some AI event triggers default sounds to be played and the specific dialog will automatically be stopped.
 +
 +====== Best Practices ======
 +
 +Here are a few practices that should be used when adding voices in the game:
 +
 +**- Sound effects are between *:s **\\
 +When adding sound effects, like *gasp*, *pants*, *cries*, etc then always put them between *:s. This way we can easily remove them for people that do not want the hearing impaired option.
 +
 +**- Pure sound effects is a separate line**\\
 +When implementing a subject that contains parts where there is only (non character related) sound effects playing you shall add this as Line on its own. The character containing it shall be called "​_SoundEffect"​. If the sound effects need to come from special position in the world, then do add a "​_"​ followed by a prefix to the name, for instance "​_SoundEffect_Trees"​ (this should be pretty rare though and these sort of effects are better added through callback functions, but there might be some rare instance that require it).
 +
 +Important note is that this only meant for sound effects that are not specific to a character voice. Examples:\\
 +Do **NOT** use it for: *cough*, *clears throat*, *spits*, etc.\\
 +**DO** use it for: *steps are heard coming down the stairs*, *large metal door opens*, *Anne carefully steps on the creaking floor*, etc.\\
 +
 +**- All protagonist dialog come from the character "​Player"​**\\
 +Make sure that all the dialog that the player is supposed to say outloud comes from the character "​Player",​ as this allow the game to not play breathing, etc when a voice over from the player character is playing.
 +
 +**- Use proper prefix for subjects**\\
 +Have prefixes on the subjects that give some hint where they belong and make it easier to sort. For instance a blackbox subject should start with "​Blackbox_",​ eg "​Blackbox_FriedRobot"​. Another examples would be a situation that many subjects belong. Say Simon meets a farmer and there is a lot of subjects related to this, then use the prefix "​SimonMeetsFarmer_",​ eg "​SimonMeetsFarmer_Intro"​.
 +
 +This is also true for special characters, for instance when a certain character speak in a recording. So for instnace a character that appears in a SOMA blackbox message (that does not come from a world position), should have "​Blackbox_"​ as prefix, eg "​Blackbox_Amy"​.
 +
 +**- Write temp dialog in square brackets**\\
 +If you add some writing that is only temporary then add this between square brackets. Also briefly summarize what is supposed to be going on, or what the is supposed to be expressed. Examples:\\
 +[Player gets his finger caught in bear trap]\\
 +[Hint that the screw needs to be bigger]\\
 +
 +If you need to have further info that feels wrong to show in-game then you can add extra info under the line direction, but make sure to start the line with INFO:, so it is not confused with proper line direction. Examples:\\
 +INFO: The player tries to hold the pain inside.\\
 +INFO: The solution is to use the file on the screw, can have slight hint for that.\\
 ====== File Format ====== ====== File Format ======
  
hpl3/game/voicehandler.txt · Last modified: 2015/09/17 10:53 by ian.thomas