Adding simple soundsets is fairly straightforward for the EEs: drop some properly named files into the lang/XX_XX/sounds in your game folder and you're good to go. Replace XX_XX with the name for your language (English is en_us, for example). The files themselves are the same as other wav files in the game--proper wav files or ogg files renamed as wav files. Pick a name for your soundset (up to seven letters) and then append the proper letter or number to assign it to the correct slot. For example, if you want to name your soundset Tough, then your files would be named tougha, toughb, toughc, etc. The slots are as follows:
XXXXXXXa.wav: Battle Cry 1
XXXXXXXb.wav: Becoming Leader
XXXXXXXe.wav: Badly Wounded
XXXXXXXf.wav: Selected 1
XXXXXXXg.wav: Selected 2
XXXXXXXh.wav: Selected 3
XXXXXXXi.wav: Action Acknowledgement 1
XXXXXXXj.wav: Action Acknowledgement 2
XXXXXXXk.wav: Action Acknowledgement 3
XXXXXXXl.wav: Being Hit
XXXXXXXn.wav: In Forest
XXXXXXXo.wav: In City
XXXXXXXp.wav: In Dungeon
XXXXXXXs.wav: Action Acknowledgement 4
XXXXXXXt.wav: Action Acknowledgement 5
XXXXXXXu.wav: Action Acknowledgement 6
XXXXXXXv.wav: Action Acknowledgement 7
XXXXXXXw.wav: Reaction to Party Member Death
XXXXXXXx.wav: Rare Action Acknowledgement 1*
XXXXXXXy.wav: Rare Action Acknowledgement 2*
XXXXXXXz.wav: Critical Hit
XXXXXXX0.wav: Selected 4
XXXXXXX1.wav: Critical Miss
XXXXXXX2.wav: Target Immune
XXXXXXX3.wav: Inventory Full
XXXXXXX4.wav: Pickpocket Successful
XXXXXXX5.wav: Hide in Shadows Successful
XXXXXXX6.wav: Spell Disrupted
XXXXXXX7.wav: Trap is Set Successfully
XXXXXXX8.wav: Battle Cry 2
XXXXXXX9.wav: Battle Cry 3
* Though these are listed in the IDS files and elsewhere as selection sounds, the rare sound files are action
You do not
need to have all 36 of these files for the soundset to be available in the game.
The EEs support additional sound slots and text for the sound files through the use of charsnd.2da. As of the 2.6 patch, this 2da is being standardized across platforms to make adding soundsets even easier, and I've written a small mini-mod
to assist players or modders who want to add soundsets to the game. The rest of the tutorial will be using this mod.
charsnd.2da simply matches a normal game string, with associated sound file, to a slot. The macro in the attached mod will create these strings and slot them into their proper place in charsnd.2da for you. You should follow the naming convention for the simple sound set, above, and place those wav files into the 'sounds' folder in the tool. While the extended sounds can use any naming convention, this is what I've been using internally for the extended soundset files:
XXXXXXX_.wav: Battle Cry 4
XXXXXXX-.wav: Battle Cry 5
XXXXXXX%.wav: Morale Break
XXXXXXX&.wav: Rare Action Acknowledgement 3*
XXXXXXX^.wav: Rare Action Acknowledgement 4*[email protected]
: Selected 5
XXXXXXX#.wav: Selected 6
XXXXXXX!.wav: Unhappy, Breaking Point
XXXXXXX=.wav: Unhappy, Annoyed
XXXXXXX~.wav: Unhappy, Angry
* The third and fourth rare action sounds are supported in IWDEE only.
These sounds, unlike the 'core' sound set, should be placed in the 'wav' folder in the tool. With the sound files in their proper folders, we'll move on to how to associate text with them.
Open up english/setup.tra and you'll see stuff like
@1 = ~action sound 1~ [bobi]
@2 = ~action sound 2~ [bobj]
@3 = ~action sound 3~ [bobk]>
These are WeiDU strings. The first line is associating the text between the tildes--in this case "action sound 1"--with the sound file named in the brackets--in this case bobi.wav--to a WeiDU string named @1
. If you're making a soundset named Tough, for example, and your first action sound is "Let's do this!" then you modify @1
@1 = ~Let's do this!~ [toughi]
One more trick for the tra file is that if you want no text for a sound, e.g. your damage sound is just a grunt, you can use either one of these options:
@24 = ~~ [bobl]
@24 = ~[grunt]~ [bobl]
Text inside brackets is ignored by the engine when the game is being played, so either one of these options would play the grunt without text.
Next open up cd_soundsets.tp2 with a text editor. At line 18, edit this line if your soundset is not for English:
COPY ~%MOD_FOLDER%/sounds~ ~lang/en_us/sounds~ // change en_us to the appropriate language folder
Change that en_us as appropriate for your language. If the soundset is for English, no change is needed.
Around line 23, you'll see a series of lines like
cd_action1 = RESOLVE_STR_REF(@1) // i
cd_action2 = RESOLVE_STR_REF(@2) // j
cd_action3 = RESOLVE_STR_REF(@3) // k
This bit in the tp2 is telling WeiDU to use strings from the tra file, e.g. the Action Acknowledgement 1 sound should use the @1
that we modified in the previous step. Again, you do not need to provide a full soundset: if you only want to use two action sounds, delete the lines related to action3-7 and the tool will adjust accordingly.
Near the very end is this line:
STR_VAR cd_name = "BOB"
Replace BOB with the name of your soundset, e.g. Tough. This is the name that will appear in the soundset selection menu and, as noted above, is limited to seven letters.
Once this is done, simply run the resulting mod by double-clicking setup-cd_soundsets.
Prepping Your Soundsets for Distribution
It will be a bit of a problem if everyone creates and distributes a mod for their soundset with the same mod name. If you want to distribute your soundsets for use by other players, rename all files with cd_soundsets in it (basically the setup-cd_soundsets WeiDU program, the cd_soundsets folder, and cd_coundsets.tp2 file) to something unique.
Open up english/setup.tra and change the @0 text to the name of your mod.
In addition, open up the tp2 again. At line 1, change the backup folder (cd_soundsets/backup) to match your new folder name (e.g mymod/backup). At line 2, change the author line to your email address. If you want to distribute multiple soundsets, you can duplicate the entire soundset section, from LAF cd_add_soundset through its END statement, as many times as desired. Be sure to use different string references for them, e.g. start the second soundset from @48
and add strings as necessary to the tra file.