Sound Plugin - Version 3.3 - User Guide
Filename: plugin_blatt_sound
Offline Manual
You are reading this offline manual for this plugin. The links to the right
navigate through the offline information. The links above and to the left
link to www.ravenousbugblatterbeast.pwp.blueyonder.co.uk.
If you downloaded the plugin from somewhere else, or downloaded it some time ago,
I recomend you check for an updated plugin. Note that the on-line manual may have been updated
even if the plugin hasn't.
Using Message mode
You can bind the bbsound_speak command to a key so that you
can type the message to be said like a normal chat command:
bind "p" "messagemode bbsound_speak"
To speak, just press 'p' and type the message.
Announcement Configuration
The details of which sounds to play for which player are held within the file
playersounds.ini. This file can be located in the
addons/adminmod/config folder, or the game mod folder.
Below is an example of such a configuration
file:
//Type:Match :Connect Msg :Connect msg to others :Disconnect msg
//==================================================================================
name :Bugblatter:x :bugblatter connected :bugblatter say adios amigos
name :oe\:joe :x :joe connected :hoe disconnected
level :128 :x :administrator connected:administrator disconnected
clan :oe\: : :clan member connected :clan member disconnected
any : :welcome player: :
Each line of the configuration file has 5 fields, separated with : characters.
The \ character can be used to 'escape' a : character if it appears in the name
of a player or clan, as shown in the 2nd and 4th entries in the above example.
White space is permissible at the start or end of any field, so that you can give
the file a tabular appearance. Comments may appear in the file and must begin with
the characters //. The \ character may also be used to escape a // if it appears
in the player or clan name.
- Type field
- This specifies the type of test to perform, and is one of
'name','wonid','ip','level','clan' or 'any'.
- Match field
- This specifies the value to test against when checking to
see if the line of the configuration file applies to a player.
- Connect Message
- This is the message to play to the player if the test
is successful. An 'x' indicates do not play any message. An
empty message means carry on testing later lines in the file to
see if they are applicable.
- Connect Message to Others
- This is the message to play to the other players on the server
if the test is successful. An 'x' indicates do not play any message. An
empty message means carry on testing later lines in the file to
see if they are applicable.
- Disconnect Message
- This is the message to play to the other players on the server
when a matching player disconnects. An 'x' indicates do not play any message. An
empty message means carry on testing later lines in the file to
see if they are applicable.
In the example above:
- The first line states that if a player named 'Bugblatter' connects to the server,
it will not play any message to them, but will play the message 'bugblatter connected'
to the other players. When Bugblatter disconnects from the server, it will play
the message 'bugblatter disconnected'.
- The second line states that if a player named 'oe:joe' (note the escaping of the
: in the name) connects to the server, do not play any message to 'oe:joe' but play
'joe connected' to all other players. Also, play 'joe disconnected' when Joe leaves
the server.
- The third line states that if any player with access to the kick command (access
level 128) connects to the server, do not play any message to them, but play
'administrator connected' to all other players. When such a player leaves the server,
play 'administrator disconnected'. NOTE: If 'Bugblatter' or 'oe:joe' have access
to the kick command, it will not play 'administrator connected', because it has
already processed their greeting message.
- The fourth line states that if any player with a name that begins 'oe:' connects
to the server, say to all other players 'clan member connected'. When such a player
disconnects, say 'clan member disconnected'. NOTE: This line does not define a message
to play to the player when they connect, so the plugin will continue searching the
remaining lines of the file for one, even though the player did match this line, and
it did play the connection message to other players from this line.
- The fifth line is a catch-all case for all remaining players, and will play
them the 'welcome player' message when they join the server. For the reasons stated
above, the members of the 'oe:' clan will also get this message, except for 'oe: joe'.
Matching Rules
The values in the 'Type' column are:
- name
- The player's name is tested against the value in the second field.
- wonid
- The player's WON ID or Steam ID is tested against the value in the second field.
- ip
- The player's IP address is tested against the value in the second field.
- access
- The plugin tests if the player has the access level specified in the second field.
The second field must be numeric and a power of 2. (1,2,4,8,16,32,64,128,etc.).
- clan
- The first part of the player's name is tested against the value in the second field.
- any
- The test always succeeds - the second field is ignored.
Dictionary File
The dictionary file extends the vocabulary of the half-life speech
engine by defining splices of existing words that sound like new words.
Each line of the dictionary is of the format:
phrase=splice
Where "phrase" is the text that the line defines the sound for, and
"splice" is the list of half-life speech engine sounds components that
when played sound like "phrase".
e.g. The word "map" can be spliced by taking the starting sound of the
word "mass" and the ending sound of the word "cap", both of which are
available to the half-life engine. Therefore the splice for "map" is:
map=mass(e40) cap(s50)
Splice definitions can be typed directly into the announcement messages
in the configuration file, or used directly in the bbsound_announce command,
but placing them in the dictionary allows a library of commons splices to
be constructed.
Splicing information is contained in round brackets after the word
to be said. There are three splicing directives:
- (sXX) means remove the first XX percent of the word.
- (eXX) means remove the last XX percent of the word.
- (pXXX) means play the sound at XXX percent of its normal speed.
These directives can be combined on so environment(s40,e70,p50) will
play the part of the word environment beginning 40% of the way through and ending
70% of the way though at half its normal speed. Splices can be combined from as
many words as is required - e.g.
bugblatter=but(e50) gun(e10) blast(e35) mister(s40)
Message Length
It is a limitation of the half-life speech engine that each message string
must be no longer than 92 characters (why they picked 92, I have no idea).
This includes the length of any splice instructions. Therefore the maximum
length of the 3 message fields is 92 characters each, but the effective
maximum length may be less than this if your message contains splices.
Splicing tips
- Usually it is best if you can take a sound from the start
of a word to be used at the start of a word, and a sound from
the end of a word to be used at the end of a word. In particular
taking a sound from the start of a word to end your new word
often results in very odd inflexion.
- There is a limit of 92 characters for a phrase after the
actual words have been replaced with their splices, therefore
try and keep the splices as short as possible.
- Sometimes it sounds better to use a splice even when the
word is part of the base vocabulary. For example, the base
"on" sample sounds terrible and a better "on" sound can
be produced by splicing "son"
- You can use the (eXX) splice to shorten the gap between words.
e.g. "with(e90)" will still say "with" but there won't be such a
long gap between it and the next word.
Please submit any new words
you create for inclusion in future revisions of the dictionary.
|