Nuclide
Software Development Kit for id Tech
Sentences

Sentences are the voice-acting backbone of the sound system. More...

Macros

#define DYNAMIC_SENTENCES
 

Functions

string Sentences_GetSamples (string)
 Returns a string of sample for a given sentence. More...
 
int Sentences_GetID (string)
 Returns the shared network ID for a given sentence. More...
 
string Sentences_GetString (int id)
 Gets the sentences string for a given id. More...
 
void Sentences_Shutdown (void)
 Called by CSQC_Shutdown() when the client game exits to clear the sentences buffer. More...
 

Variables

stringg_sentences
 
int g_sentences_count
 

Detailed Description

Sentences are the voice-acting backbone of the sound system.

Sentences Documentation

A lot of information was implemented with the help of: http://articles.thewavelength.net/230/

Specification of sound/sentences.txt

Each line is a new sentence group.

[GROUPNAME] [...PARAMETERS] [...SAMPLES]

If a sample is not in a sub-directory, it'll be assumed to be part of the 'vox' sub-directory, or the last valid path of a previous sample.
For example:

attention male/hello how are you

becomes:

vox/attention.wav male/hello.wav male/how.wav male/are.wav male/you.wav

When parameters are surrounded by spaces, this means they apply to all current samples. They can be overwritten later down the parsing.

When a parameter is attached to a sample, e.g.:

attention(p120)

Then this parameter only applies to said keyword.
Whereas...

(p120) attention everyone alive

Will apply the pitch effect to all three succeeding samples.

Parameters:
(pXX) = Pitch. Valid values are from 50 to 150.
(vXX) = Volume. Valid values are from 0 to 100.
(sXX) = Start point in %. E.g. 10 skips the first 10% of the sample.
(eXX) = End point in %. E.g. 75 ends playback 75% into the sample.
(tXX) = Time shift/compression in %. 100 is unaltered speed, wheras 50 plays the sample back in half the time.

Macro Definition Documentation

◆ DYNAMIC_SENTENCES

#define DYNAMIC_SENTENCES

Function Documentation

◆ Sentences_GetID()

int Sentences_GetID ( string  sentence)

Returns the shared network ID for a given sentence.

◆ Sentences_GetSamples()

string Sentences_GetSamples ( string  msg)

Returns a string of sample for a given sentence.

◆ Sentences_GetString()

string Sentences_GetString ( int  id)

Gets the sentences string for a given id.

◆ Sentences_Shutdown()

void Sentences_Shutdown ( void  )

Called by CSQC_Shutdown() when the client game exits to clear the sentences buffer.

Variable Documentation

◆ g_sentences

string* g_sentences

◆ g_sentences_count

int g_sentences_count