Jump to content

Adding soundsets to the EEs using the EE Soundset Tool


Recommended Posts

Posted (edited)

Simple Soundsets

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 if you're just doing a simple soundset, though you should limit it to six if you're going to make it an extended soundset--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:

XXXXXXa.wav: Battle Cry 1
XXXXXXb.wav: Becoming Leader
XXXXXXc.wav: Tired
XXXXXXd.wav: Bored
XXXXXXe.wav: Badly Wounded
XXXXXXf.wav: Selected 1
XXXXXXg.wav: Selected 2
XXXXXXh.wav: Selected 3
XXXXXXi.wav: Action Acknowledgement 1
XXXXXXj.wav: Action Acknowledgement 2
XXXXXXk.wav: Action Acknowledgement 3
XXXXXXl.wav: Being Hit
XXXXXXm.wav: Dying
XXXXXXn.wav: In Forest
XXXXXXo.wav: In City
XXXXXXp.wav: In Dungeon
XXXXXXq.wav: Daytime
XXXXXXr.wav: Nighttime
XXXXXXs.wav: Action Acknowledgement 4
XXXXXXt.wav: Action Acknowledgement 5
XXXXXXu.wav: Action Acknowledgement 6
XXXXXXv.wav: Action Acknowledgement 7
XXXXXXw.wav: Reaction to Party Member Death
XXXXXXx.wav: Rare Action Acknowledgement 1*
XXXXXXy.wav: Rare Action Acknowledgement 2*
XXXXXXz.wav: Critical Hit
XXXXXX0.wav: Selected 4
XXXXXX1.wav: Critical Miss
XXXXXX2.wav: Target Immune
XXXXXX3.wav: Inventory Full
XXXXXX4.wav: Pickpocket Successful
XXXXXX5.wav: Hide in Shadows Successful
XXXXXX6.wav: Spell Disrupted
XXXXXX7.wav: Trap is Set Successfully
XXXXXX8.wav: Battle Cry 2
XXXXXX9.wav: Battle Cry 3

* Though these are listed in the IDS files and elsewhere as selection sounds, these rare sound files are action sounds.

You do not need to have all 36 of these files for the soundset to be available in the game.

Expanded Soundsets

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 expanded to cover all of the available sounds, though the games still retain some ordering differences to be backwards compatible with mods for the originals. I wrote a small tool to assist players or modders who want to add soundsets to the game, which was half-finished and terrible, until @Graion Dilach took the time to do it properly, so most of the credit should go to him. 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:

UNOFFICIAL Naming Conventions

XXXXXXa_.wav: Rare Action Acknowledgement 3
XXXXXXb_.wav: Rare Action Acknowledgement 4
XXXXXXc_.wav: Attack Sound 1*
XXXXXXd_.wav: Attack Sound 2*
XXXXXXe_.wav: Attack Sound 3*
XXXXXXf_.wav: Attack Sound 4*
XXXXXXg_.wav: Battle Cry 4
XXXXXXh_.wav: Battle Cry 5
XXXXXXi_.wav: Bored 2
XXXXXXj_.wav: Breaking Point
XXXXXXk_.wav: Selected 5
XXXXXXl_.wav: Selected 6
XXXXXXm_.wav: Selected 7
XXXXXXn_.wav: Being Hit 2
XXXXXXo_.wav: Being Hit 3
XXXXXXp_.wav: Dying 2
XXXXXXq_.wav: Reaction to Party Member Death 2
XXXXXXr_.wav: Happy
XXXXXXs_.wav: Badly Wounded 2
XXXXXXt_.wav: Becoming Leader 2
XXXXXXu_.wav: Morale Break 1
XXXXXXv_.wav: Morale Break 2
XXXXXXw_.wav: Rare Selected 1
XXXXXXx_.wav: Rare Selected 2
XXXXXXy_.wav: Rare Selected 3
XXXXXXz_.wav: Rare Selected 4
XXXXXX0_.wav: Rare Selected 5
XXXXXX1_.wav: Rare Selected 6
XXXXXX2_.wav: Rare Selected 7
XXXXXX3_.wav: Rare Selected 8
XXXXXX4_.wav: Tired 2
XXXXXX5_.wav: Unhappy
XXXXXX6_.wav: Unhappy 2

* While you can assign attack sounds, party members will generally ignore these and use sounds attached to their weapon types, e.g. your PC will attack with a sword sound instead of using an attack sound from the soundset.

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. The original sounds from the 'simple' soundset should be dropped into the 'sounds' folder of the tool. Note also that, since these use two-letter suffixes, it limits the internal name of the soundset to six characters.

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 to read

@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 = ~~ [toughl]

or

@24 = ~[grunt]~ [toughl]

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.

The very last entry is a special line:

@70 = ~Example Bob~

This is used as the soundset name in the sound selection menu, so you  could (for example) use something like ~Male: Tough~ or something else that makes sense in the menu.

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: however, you must delete the lines here for sounds you're not providing  in the tp2, otherwise you'll end up with the occasional blank sound playing when they there should be an actual line.

Near the very end is this line:

STR_VAR cd_name = "BOB"

Replace BOB with the name of your soundset, e.g. TOUGH. This field is case-sensitive and must be all-caps. This is the name that you're using for the sound files and should be limited to six 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 programs, cd_coundsets.command, 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.

Open up the setup-cd_soundsets.command file with a text editor and update the path in the last line.

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.

If you want to see some actual working examples in the wild, check out Graion's soundsets, which use this tool.

Edited by CamDawg
Added note about cd_name needing to be all-caps
Posted

And for some practical examples of what these sounds actually do. All examples from BG2, except rare select which is sourced from BG since BG2 didn't have them.

  • Action Acknowledgements (cd_action1-7): Played when character is given an action, like move.
    • Keldorn: Aye, as you wish.
    • Mazzy: I go forth.
    • Minsc: Live by the sword, live a good long time!
  • Rare Action Acknowledgements (cd_action_rare1-4): Same as Action Acknowledgements, rare variant.
    • Jan: I can't. I'm allergic! Well, all right, I'm not that allergic…
    • Edwin: "Edwin, do this." "Edwin, do that." Somebody get this jerk a banana.
  • Battle cries (cd_battlecry1-5): Used when initiating battle.
    • Keldorn: Good is on our side this day!
    • Valygar: I shall make this quick for you…
    • Minsc: Great fun! Hehe. Right, Boo?
  • Bored (cd_bored1-2): Played when idling too long.
    • Korgan: If I wished t' sit about all day, I'd do it in a proper pub with an ale in me hand!
    • In City (cd_city): Played randomly while in cities.
      • Edwin: The city changes, but the fools within are always the same.
    • Selected (cd_common1-7): Played when character is selected.
      • Jan: Don't yell! I can hear you just fine.
      • Cernd: What is it that you ask?
      • Anomen: Point the sword and I shall strike!
      • Minsc: Every hamster has his day.
      • Edwin: Have you nothing else to do but bother me?
      • Rasaad: We will take action soon. Right?
    • Critical Hit (cd_criticalhit): Used when scoring a critical hit.
      • Imoen: Gotcha good!
    • Critical Miss (cd_criticalmiss): Used when missing with a critical miss.
      • Yoshimo: Embarrassing!
    • Hit/damage (cd_damage1-3): Played when character struck; use a grunt or something non-verbal.
    • Daytime (cd_day): Played randomly during daytime.
      • Cernd: Another day of sun or cloud. The great cycles continue.
    • Spell disrupted (cd_disrupted): Played when a character's spell gets interrupted due to damage.
      • Aerie: I lost my spell. Sorry.
    • In Dungeon (cd_dungeon): Played randomly while in dungeons.
      • Nalia: I—I really don't like this. How are we helping the less fortunate trudging around in here?
    • Dead (cd_dying1-2): Played on character death. Sometimes just a scream.
      • Haer'Dalis: At last... oblivion! Ohh... oh…
    • In Forest (cd_forest): Played randomly while in forests.
      • Anomen: These trees and glades hide horrors of all manner... watch your backs!
    • Reaction to party death, general (cd_gen_death1-2): Used when a party member dies. Designated as 'general' since some BG NPCs had special lines when specific NPCs die.
      • Dorn: I've no use for the weak. We are better off.
      • Badly wounded (cd_hurt1-2): Played when character is down to about 25% of their HP.
        • Jaheira: I will require healing if I am to be of use to the group.
      • Target immune (cd_immune): Played when combat target can't be hit by the character's current weapon.
        • Korgan: Blasted beggar's immune!
      • Inventory full (cd_inventory): Played when character receives an item but their inventory is already full.
        • Neera: Can we lose some of this trash? I can't carry any more.
      • Leader (cd_leader1-2): Played when character is moved to the top slot.
        • Mazzy: In Arvoreen's name, I shall do all I can to lead you through these perilous times.
      • Morale break (cd_morale_break1-2): Played when character runs away due to morale failure.
        • Jaheira: I will not fall here!
      • Nighttime (cd_night): Played randomly during nighttime.
        • Hexxat: I used to love sunlight. But this is my time now.
      • Pickpocket successful (cd_pickpocket): Played when character successfully pickpockets an item.
        • Haer'Dalis: What was once yours is now mine alone.
      • Rare Select (cd_select_rare1-8): Same as Selected, rare variant.
        • Imoen: Do ya wanna tell me a story 'bout trollops an' plug tails? Please?
        • Minsc: When the going gets tough, someone hold my rodent.
        • Edwin: Please don't disturb me while I plot to overthrow you!
        • Jaheira: If a tree falls in the forest... I'll kill the bastard what done it!
      • Hide in shadows successful (cd_shadows): Played when character successfully hides in shadows.
        • Nalia: I am hidden from any that would see.
      • Tired (cd_tired1-2): Played when character is fatigued.
        • Aerie: Ahhh, my legs are just aching... I've never walked so much in my life! Can... can we rest now, please?
      • Trap set successfully (cd_trap): Played when a character successfully sets a trap or snare.
        • Yoshimo: A trap most devious for the careless of foot.

      The following, while technically part of soundsets and included with the tool, are not used by characters created by the player. This batch is used exclusively by NPCs to respond to the party's reputation:

      • Happy (cd_happy): Not used for PCs, but for NPCs in reaction to reputation happiness, specifically, played on rep changes and randomly when character is happy with the party reputation.
        • Viconia: I find this a most satisfactory arrangement.
      • Unhappy, annoyed (cd_unhappy_1): Played on rep changes and randomly when character is mildly unhappy with the party reputation.
        • Minsc: This behavior must not continue! Feel the burning stare of my hamster and change your ways!
      • Unhappy, angry (cd_unhappy_2): Played on rep changes and randomly when character is very unhappy with the party reputation.
        • Neera: Definitely don't like where this is headed.
      • Unhappy, breaking point (cd_breaking_pt): Played on rep changes and randomly when character is about to leave due to party reputation.
        • Dorn: NO MORE!

      And finally, the attack sounds are ignored AFAICT in favor of sounds related to the weapon being wielded:

      • Attack sounds (cd_attack1-4): Not used for NPC soundsets.
      Posted

      And if you really want to tailor your soundset to a specific game, some additional notes. These are generalizations and not hard rules--all of the EEs (as of 2.6) fully support all of these sounds, even if they're not generally used.

      • While supported in all EEs, these are generally only used in BG2EE: Critical Hit, Critical Miss, Hide in Shadows Successful, Inventory Full, Pickpocket Successful, Rare Action Acknowledgements, Spell Disrupted, Target Immune, and Trap Set Successfully.
      • While BGEE supports up to three Battle Cries, NPCs generally only use one. Similarly it only uses three Action Acknowledgements, instead of the full seven, and no Rare Action Acknowledgements.
      • BG2EE NPCs do not generally have Rare Select sounds.
      • Reaction to Party Death, General is not used much in BG2EE; it's more of a BGEE/IWDEE sound.
      • IWDEE has multiple variants for sounds where BGEE/BG2EE only had one: Badly Wounded: Bored; Dead; Hit/damage (has three for this vs. one for BGEE/BG2EE); Leader; Morale Break; Reaction to party death, general; and Tired. IWDEE also added a seventh Action Acknowledgement sound.
      Posted
      1 hour ago, CamDawg said:

      The following, while technically part of soundsets and included with the tool, are not used by characters created by the player. This batch is used exclusively by NPCs to respond to the party's reputation:

      • Happy (cd_happy): Not used for PCs, but for NPCs in reaction to reputation happiness, specifically, played on rep changes and randomly when character is happy with the party reputation.
        • Viconia: I find this a most satisfactory arrangement.
      • Unhappy, annoyed (cd_unhappy_1): Played on rep changes and randomly when character is mildly unhappy with the party reputation.
        • Minsc: This behavior must not continue! Feel the burning stare of my hamster and change your ways!
      • Unhappy, angry (cd_unhappy_2): Played on rep changes and randomly when character is very unhappy with the party reputation.
        • Neera: Definitely don't like where this is headed.
      • Unhappy, breaking point (cd_breaking_pt): Played on rep changes and randomly when character is about to leave due to party reputation.
        • Dorn: NO MORE!

      Note that NPCs created from player characters with the NPC Generator will actually use these lines.

      Posted

      Hello @Graion Dilach , i've tried to add my own personal voiceset using your tools (thanks a lot actually for that !). Everything is installed correctly, but the voiceset does not appear in my character selection screen. As i am working on a EET installation maybe that's why ? All files are installed correctly, the strings are correctly set and the file M_cdsnd.lua is also created (i have checked everything with near infinity). It's just that the name doesnot appear in the char slection screen. Do you have any insight on that one ?

      Posted (edited)

      If no file ended up in the language folder, then the voiceset doesn't appear at all. If you added all files to the wav folder (instead of splitting them, so that the dual-character suffix ones go to wav and the single-char suffix ones go to sounds) then yes, the voiceset won't pop up. Detection is still based on that folder contents, the LUA is only for cosmetics.

      This isn't really tidy but that's what we have here.

      Edited by Graion Dilach
      Posted

      Thank you for your quick answer. Can you be more specific about the dual and single  char suffixe ? That must be the reason why my voiceset does not appear.

      Posted

      Everything listed in the Simple Soundsets section of the first post here goes to the sounds subfolder, everything listed in the Expanded Soundsets section goes to the wav subfolder. The underscores in the Expanded section are part of the suffix and are the second character.

      Posted

      Heyyy, are rare action acknowledgments janky? Fought with my soundset for a night or two and finally got everything lined up, but issued manymany dozens of orders and never had my rare responses show up. It's the x, y, a_ and b_ below...

      DBvIkDW.png

      For these audio files...everything else seems to be behaving itself! I think I tested these only in BGEE and IWDEE so I guess it's possible--? That rare responses only show up in BG2EE? Iunno! I like my rares but would prefer em rare, I guess! Not the end of the world if I can't make em go, but!

       

       

      Posted

      I know they worked for me in my tests but those involved a BG2 set backport... I'll take a second look tonight. Do I see it right that you have 4 common and 4 rare action responses (just for reproduction)?

      Posted

      I only tested IWD yet but it does seem you might be on to something. Argh. BGEE is weird if that also fails because the SoD NPC voiceovers have action_rare lines set. I'm thinking of a few workarounds so I'll hope I'll get something out of this.

      Posted

      Hello, thank you for this great tool!

      I played through BG1, 2 and ToB with a soundset I made and I have noticed that there are some lines that didn't work for me:

      cd_action_rare 1-4 (suffixes x, y, a_, b_) , like said previously,  I have never heard these lines

      cd_common7 (suffix m_) , for some reason the 7th select doesn't play

      cd_damage2, 3 (suffixes n_, o_) , only cd_damage1 works and if you have 2 and/or 3 enabled the line won't play every time you get hit. It feels more like half the time when you have 2, and one third of the time when you have all 3 enabled

      Everything else works as expected, like the cd_select_rare 5-8 being action lines in BG2, though there's nothing rare about them

      Posted

      Right, so looking into this a bit:

      • Common select 7 doesn't work on any EE game.
      • I'm seeing similar issues with damage 2/3 as reported by MJK. It's actively detrimental to add these sounds. The second hurt and dying work fine, though.
      • Rare action sounds don't work on IWDEE or BGEE. The regular two slots work on BG2EE
      • Slots 35-38 are rare selection sounds on IWDEE and BGEE, and action sounds 4-7 on BG2EE. For parity, the 2.6 patch added four more rare selection sounds in slots 75-78 and four more action sounds in slots 79-83. The extra action sounds were supposed to only work on BGEE and IWDEE, and the extra rare selection sounds on BG2EE, so that all three games would total seven action sounds and four rare selection sounds. However, these slots are enabled on all games--so while you get seven action sounds and four rare selects in all games, you can get another four rare selects (eight total) in BGEE/IWDEE and four additional action sounds (11 total) on BG2EE.

      So, the proposed path forward for the next iteration of the tool:

      1. The tool will still add common 7, even though it doesn't work. The tool will also add the two rare action acknowledgements on BGEE/IWDEE even though they also don't work.
      2. The tool will skip damage 2/3 since they actually cause problems.
      3. Rare actions 3 and 4 are not actually a thing, and will be eliminated from the tool.
      4. Rare selections 5-8 will also be removed. While these do actually work on BGEE/IWDEE, I'd like to shoot for parity in the soundsets. For similar reasons I'm not adding actions 8-11; this will make soundsets have four rare selects and seven actions across all EEs. 

      Points one and four are more or less in the hopes that these get fixed in a future patch. I'd do the same for damage 2/3 (point two) except that they're currently introducing a problem.

      Join the conversation

      You are posting as a guest. If you have an account, sign in now to post with your account.
      Note: Your post will require moderator approval before it will be visible.

      Guest
      Reply to this topic...

      ×   Pasted as rich text.   Paste as plain text instead

        Only 75 emoji are allowed.

      ×   Your link has been automatically embedded.   Display as a link instead

      ×   Your previous content has been restored.   Clear editor

      ×   You cannot paste images directly. Upload or insert images from URL.

      ×
      ×
      • Create New...