-
Notifications
You must be signed in to change notification settings - Fork 12
Sound replacement
Note: file-based sound replacement is scheduled for deprecation in favor of per-template sound replacement and soundscripts. Refer to Entity templates.
Featureful SDK allows to replace the names of the sounds the specific NPC will play. This might be useful if the mod developer wants to have a special instance of the monster with a different set of sounds. Used together with the custom model is might give an impression of the new monster. To use sound replacement follow these steps:
- Create a text file somewhere in your mod directory. There's no special place for the sound replacement files, so it's up to you to choose. The mod sample has one sound replacement file in the sound/ subdirectory.
- Write down the pairs of values. Each line should consist of the original sound name and the sound you want it to be replaced with, both quoted with
"
. - In the monster entity set the
Sound Replacement File
parameter to the name of the file you created on step 1.
The sample mod has a file sound/female_pain.txt which describes replacements of the scientist pain sounds:
"scientist/sci_pain1.wav" "colette/colette_pain0.wav"
"scientist/sci_pain2.wav" "colette/colette_pain1.wav"
"scientist/sci_pain3.wav" "colette/colette_pain2.wav"
"scientist/sci_pain4.wav" "colette/colette_pain3.wav"
"scientist/sci_pain5.wav" "colette/colette_pain0.wav"
The map featureful_demo has a monster_civilian
entity which has its Sound Replacement File
parameter set to sound/female_pain.txt
. Together with a custom Speech Prefix
and a woman model from Condition Zero Deleted Scenes it allows to imitate a 'new' npc - a female civilian.
There're some difficulties you may face while crafting a sound replacement file, as you need to know the names of the original sounds in order to write a replacement.
It might be easy to get the idea what sounds the monster uses for some monster types.
But some monsters might use sounds from several directories (e.g. alien grunts use sounds from agrunt, player, hassault and hornet directories), and others might have unused sounds in their corresponding subdirectories (e.g. scientists don't use all of their pain sounds and they don't use sci_die sounds at all).
The only guaranteed way to be certain about what sounds the monster is using is to follow the source code, which of course is not ideal for the mod developer who doesn't want to get involved with programming.