no more nexuiz on home page
[xonotic/xonotic.wiki.git] / Voices-and-sounds.md
1 Voices and sounds
2 =================
3
4 Each player model should have a .sounds file, named with the syntax `<name of model><format of mode>_0.sounds`. So for Ignis, the sound file would be `ignis.iqm_0.sounds`. This file will give a voice to the player model, allowing it to make noises and so on.
5
6 There are 32 lines in a .sounds file, which looks something like this:
7
8     //TAG: insurrectionist
9     //affirmative sound/player/carni-lycan/player/affirmative 0
10     attack sound/player/insurrectionist/coms/attack 0
11     //attacking sound/player/carni-lycan/player/attacking 0
12     attackinfive sound/player/insurrectionist/coms/attackinfive 0
13     coverme sound/player/insurrectionist/coms/coverme 0
14     defend sound/player/insurrectionist/coms/defend 0
15     //defending sound/player/carni-lycan/player/defending 0
16     //droppedflag sound/player/carni-lycan/player/droppedflag 0
17     //flagcarriertakingdamage sound/player/soldier/player/flagcarriertakingdamage 0
18     freelance sound/player/insurrectionist/coms/freelance 2
19     //getflag sound/player/soldier/player/getflag 0
20     incoming sound/player/insurrectionist/coms/incoming 0
21     meet sound/player/insurrectionist/coms/meet 0
22     needhelp sound/player/insurrectionist/coms/needhelp 2
23     //negative sound/player/carni-lycan/player/negative 0
24     //onmyway sound/player/carni-lycan/player/onmyway 0
25     //roaming sound/player/carni-lycan/player/roaming 0
26     //seenenemy sound/player/carni-lycan/player/seenenemy 0
27     seenflag sound/player/insurrectionist/coms/seenflag 0
28     taunt sound/player/insurrectionist/coms/taunt 4
29     teamshoot sound/player/insurrectionist/coms/teamshoot 3
30     death sound/player/insurrectionist/player/death 3
31     drown sound/player/insurrectionist/player/drown 0
32     fall sound/player/insurrectionist/player/fall 0
33     falling sound/player/insurrectionist/player/falling 0
34     gasp sound/player/insurrectionist/player/gasp 0
35     jump sound/player/insurrectionist/player/jump 0
36     pain25 sound/player/insurrectionist/player/pain25 0
37     pain50 sound/player/insurrectionist/player/pain50 0
38     pain75 sound/player/insurrectionist/player/pain75 0
39     pain100 sound/player/insurrectionist/player/pain100 0
40
41 The first line is not read by the game, it is simply for humans to tell which voice pack is being used in this file. There are, at the time of writing, 9 voice packs (carni-lycan, fricka, insurrectionist, marine, pyria-skadi, reptilian, soldier, specop, and torus).
42
43 For every line after that, the format is the same:
44
45     <sound name> <sound path> <variations of sound>
46
47 Sound name is the name of the sound, as can be seen in the example .sounds file above. Sound path is the path to the sound file, relative to xonotic root. The last argument is the number of variations of the sound. For instance, insurrectionist has 3 teamshoot sound files, named `teamshoot1.ogg`, `teamshoot2.ogg`, and `teamshoot3.ogg`. This is why the last number in line 22 is a 3. However, insurrectionist has only one attack sound, `attack.ogg`, so the last number in line 3 is 0.
48
49 The `//` you see in certain lines means that the voice pack used in the file does not have those sounds. They are sort of like a comment - the game throws an error while parsing them, but it does not affect anything else.
50
51 Entries up to line 23 are voice entries, meaning that in a perfect world a player can evoke them using `cmd voice <name of voice>`, but few of them are supported in game code. Line 23 and onward are voices the player makes automatically, when falling, taking damage, fragging, and so on.
52
53 Unfortunately, these 9 voice packs only have a few sounds in common, as voice packs frequently lack certain voices. The easiest way to fix this problem would be to include new voice packs in xonotic, but this may not happen due to a lack of people with voices and microphones.
54