User Tools

Site Tools


hpl3:game:voicehandler

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl3:game:voicehandler [2014/01/09 08:10]
thomas [Character]
hpl3:game:voicehandler [2015/09/17 10:53] (current)
ian.thomas [File Format]
Line 9: Line 9:
 ====== Setup ====== ====== Setup ======
  
-Before calling a subject the source of the sound should be set up. This is done with SetVoiceSource() in cVoiceHandleror better ​the helper function Voice_SetSource(). This sets up the entity (which can be something moving) which will emit the voice coming from the specified character. It will also set up the distance that the voice can be heard. ​Do this in OnEnter in the map script file.+Before calling a subject the source of the sound should be set up. This is best done inside the VoiceHandler editor itselfbut can also be done using the helper function Voice_SetSource(). This sets up the entity (which can be something moving) which will emit the voice coming from the specified character. It will also set up the distance that the voice can be heard. ​If using the function, it's best to do this in ''​OnEnter'' ​in the map script file.
 ====== Properties ====== ====== Properties ======
  
Line 23: Line 23:
 **EntryType**\\ **EntryType**\\
 The type of the sounds (and extrasounds) that are played for this character. Is either World, WorldClean or GUI. The type of the sounds (and extrasounds) that are played for this character. Is either World, WorldClean or GUI.
 +
 +**Volume** \\
 +Volume of the sound files. Gets multiplied with other volume properties.
 +
 +**ReverbVolume** \\
 +The amount of reverb used for the sounds. Gets multiplied with other ReverbVolume properties.
  
  
Line 37: Line 43:
 This is the priority for a voice to into focus, meaning that is subtittles are shown and any other voice playing gets its volume lowered. To beat a currently playing voice, FocusPrio must be higher.\\ This is the priority for a voice to into focus, meaning that is subtittles are shown and any other voice playing gets its volume lowered. To beat a currently playing voice, FocusPrio must be higher.\\
 When a subject starts playing it is checked if another sound is playing and FocusPrio determines if the new subject gets into focus. Also when a subject stops playing a certain amount of time is waited (default 2 seconds) and then there is a check to see if there is any playing voice that should come into focus. If there are many playing, FocusPrio determines which one. The reason for waiting a litte while is in case there is a conversiation in one scene containing many subjects, and if so it would not sound good if the focus was constantly switched (ie unrelated subtitles popping up for a second). When a subject starts playing it is checked if another sound is playing and FocusPrio determines if the new subject gets into focus. Also when a subject stops playing a certain amount of time is waited (default 2 seconds) and then there is a check to see if there is any playing voice that should come into focus. If there are many playing, FocusPrio determines which one. The reason for waiting a litte while is in case there is a conversiation in one scene containing many subjects, and if so it would not sound good if the focus was constantly switched (ie unrelated subtitles popping up for a second).
 +
 +
 +**Volume** \\
 +Volume of the sound and effect files. Gets multiplied with other volume properties.
 +
 +**ReverbVolume** \\
 +The amount of reverb used for the sounds. Gets multiplied with other ReverbVolume properties.
 +
 ===== Effect ===== ===== Effect =====
 This defines certain effect that should be played on the voice, be that echo, noise or whatnot. \\ This defines certain effect that should be played on the voice, be that echo, noise or whatnot. \\
Line 89: Line 103:
 This is the lowest level data structure for a subject. It contains properties for the voice, (opitonal) effect sound, and subtitle. This is the lowest level data structure for a subject. It contains properties for the voice, (opitonal) effect sound, and subtitle.
  
-The file name for the voice sound is generated based on the names of the higher level structures. The syntax is:\\  +The file name for the voice sound is generated based on the names of the higher level structures. The syntax is:\\ 
-''​[map]''/''​[scene]''​_''​[subject]''​_''​[line index in 3 digits]''​_''​[character]''​_''​[sound index in 3 digits]'' ​+''​[map]''​ /''​[scene]''​ _''​[subject]''​ _''​[line index in 3 digits]''​ _''​[character]''​ _''​[sound index in 3 digits]''​
  
- +Here is an example:​\\ 
-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.
  
- +The lang file entry for the text is also generated, with this syntax:\\ 
-The lang file entry for the text is also generated, with this syntax:\\  +Category: Voices_''​[map]''​ \\ 
-Category: Voices_''​[map]''​\\  +Entry: ''​[scene]''​ _''​[subject]''​ _''​[line index in 3 digits]''​ _''​[character]''​ _''​[sound index in 3 digits]''​ (apart from no folder name, it is exactly the same as for the voice file!)
-Entry: ''​[scene]''​_''​[subject]''​_''​[line index in 3 digits]''​_''​[character]''​_''​[sound index in 3 digits]'' ​ (apart from no folder name, it is exactly the same as for the voice file!) +
  
 Finally, if "​AutogenerateLangFiles"​ in "​Main"​ is set to true in the user settings, then the lang file entries will be autogenerated with the text specified in the sound'​s properties. Finally, if "​AutogenerateLangFiles"​ in "​Main"​ is set to true in the user settings, then the lang file entries will be autogenerated with the text specified in the sound'​s properties.
  
- +**Text** \\
-**Text** \\ +
 The text for the voices, not really saved by added to a lang file (if AutogenerateLangFiles is true i settings, see above) The text for the voices, not really saved by added to a lang file (if AutogenerateLangFiles is true i settings, see above)
  
- +**HasVoice** \\
-**HasVoice** \\ +
 If the sound has a voice at all. This is only meaningful false if there is an Effect filed specificed. If the sound has a voice at all. This is only meaningful false if there is an Effect filed specificed.
  
 +**Volume** \\
 +Volume of the sound and effect file. Gets multiplied with other volume properties.
  
-**Volume** \\  +**ReverbVolume** \\ 
-Volume ​of the sound and effect file. +The amount ​of reverb used for the sounds. Gets multiplied with other ReverbVolume properties.
  
-**VoiceOffset** \\ +**VoiceOffset** \\
 Number of seconds before voice starts to play. Number of seconds before voice starts to play.
  
- +**TextOffset** \\
-**TextOffset** \\ +
 Number of seconds before the subtitles show up. Number of seconds before the subtitles show up.
  
- +**ExtraEffectOffset** \\
-**ExtraSoundOffset** \\ +
 Number of seconds before the effect file starts to play. Number of seconds before the effect file starts to play.
  
- +**ExtraEffectFile** \\
-**ExtraSoundFile** \\ +
 File path to an extra sound file that is played along with the voice. File path to an extra sound file that is played along with the voice.
  
- +**EndsAfterExtraEffect** \\
-**EndsAfterExtraSound** \\ +
 If the sound should end when the extra sound file is done playing (and not the voice). If the sound should end when the extra sound file is done playing (and not the voice).
  
- +**EndPadding** \\
-**EndPadding** \\ +
 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).
  
Line 180: Line 185:
 INFO: The solution is to use the file on the screw, can have slight hint for that.\\ INFO: The solution is to use the file on the screw, can have slight hint for that.\\
 ====== File Format ====== ====== File Format ======
 +
 +(You shouldn'​t need this - everything can be edited using the VoiceHandler exe!)
  
 <code xml> <code xml>
hpl3/game/voicehandler.1389255005.txt.gz · Last modified: 2014/01/09 08:10 by thomas