-
Notifications
You must be signed in to change notification settings - Fork 7
Subtitles
Half-Life Featureful has a subtitles (captions) system allowing for showing texts as the scripted voice line is played.
Captions are not showing for the regular sentences spoken by monsters (e.g. idle voicelines) to avoid littering the screen with too much text.
Caption profile defines the color of the captions.
Caption profiles are configured in sound/captions_profiles.txt. Caption profile name is a 2-letter identifier.
Example:
// Barney
ba 0 115 255
// Scientist
sc 225 225 225
It defines two captions profiles intended to use with Barney's and Scientist's sentences. The numbers after the name represent the RGB color. In this example the profile ba
defines a bluish color and the profile sc
defines a whitish color.
Captions for subtitles are defined in sound/captions.txt. Each caption has an identifier that corresponds to the entry from sound/sentences.txt. When a monster or ambient_generic
starts playing a scripted sentence it automatically sends an identifier to the client. If there's a caption corresponding to this identifier it renders on the client.
Example:
BA_LATE ba Morning, Mr. Freeman. Looks like you're running late.
In this example BA_LATE
corresponds to the sentence of the same name from sound/sentences.txt. The ba
is a caption profile name.
The hold time of the caption depends on the duration specified in the scripted_sentence
. If the sentence is played via ambient_generic
the hold time is calculated automatically from the length of the text. Also in this case the speaker icon is automatically added to the caption to imitate the message incoming from the radio.
The full format of the caption line looks like this:
SENTENCE_NAME !duration ^delay profile Text
!duration
(optional) is the forced duration of the caption (in seconds). Use it if you don't want to rely on the duration specified in the scripted_sentence
or automatic calculation of the hold time.
^delay
(optional) is the delay before showing the caption (in seconds). Useful if the start of the sentence doesn't include any words (e.g. in Half-Life: Induction it's used for phone calls as there're beep sounds at the start of the sentence).
Example:
SC_EXAMPLE !15 ^3 sc This message is delayed by 3 seconds and forced to be shown for 15 seconds.