I've cracked The Enigma. I managed to make custom sounds for different type of guns. I will keep this guide updated (if I find out smth else). For now, I just wanted to share with you «how to assign a unique sound to each gun (Chassepot, Minie, Snider, Spencer rifles, revolver, Gatling gun) not only their class (breech loading rifle, repeating rifle, revolver, machine gun).
First of all you’ll need Symphony sound tool made by crux3D. He never finished it (nor gave us his source code, so someone could finish it), Idk if he’s ever gonna be online, but with the current state of his utility, we can do some dope tricks.
If you want to be able to mess with the sounds, you need a clean shogun 2 install (or at least with no activated mods, make sure, that there are no “movie” type mods, cuz “mod” types can be deactivated before launching the game). But anyway I’ll attach the “sounds_unpacked” folder in archive.
Using of Symphony tool (link in the topic) is quite tricky, since you can’t just run you, you need to run it with cmd. In order to do it, here is step-by-step guide:
Spoiler Alert, click show to read:
If you want some other mod, that have its own sounds_packed file, you type this:
Spoiler Alert, click show to read:
There will be 61 files (screenshots attached).
They all answer for different in-game sounds:
Spoiler Alert, click show to read:
The main file, you are going to edit is “sounds_events.csv”. It’s a large file, that is opened with Microsoft Excel. It’s connected to .xml files. Events, that you add in .xml files have to be named in the .csv file as well.
Here you find lots of sound events, but for now I’ll be talking about firing sounds. They are stored in sound_bank_projectile_fire.xml
As I’ve noticed, there are 5 types of gun fire sounds, that are used for firearms (not counting cannons and bows):
1) Arquebus
2) Breech loading rifle
3) Repeating rifle
4) Revolver
5) Gatling gun
As I suspect, CA used a little trick to make volleys more impressive they assigned all of this sounds to ALL Boshin era firearms. So distinguishing them was a real pain in the a**e.
But here you go, all models you see soldiers are carrying doesn’t have to do anything with the type of ammo they use and the sound they produce, it’s just a mesh. Firing sounds are bound to projectiles (data.pack/db/projectiles) and specifically to the column named (gun_type) (screenshot)
There are 7 gun_types in Shogun 2:
1) Bow (This one is used for all of the bows in the game)
2) Grenade (This one I believe is used for blinding grenades and bomb throwers)
3) Musket_breech (This is used for ALL Boshin era firearms)
4) Cannon (I believe this is for all cannons in the game, haven’t checked it properly yet, since cannon work ok)
5) Musket_matchlock (This is used for Sengoku firearms)
6) Pistol (More about it later)
7) Sling (Probably for fire bomb kobaya)
8) Mortar (Supposedly for Sengoku hand mortar unit)
9) None (Yes, it’s the real name of the gun_type)
There are also some leftovers since ETW/NTW that remained unused, but can be reused manually.
These gun_types present in the sound_bank_projectile_fire.xml you’ve unpacked (downloaded) earlier. In this file there are tons of strings like <maybe_gun_type>unknown14</maybe_gun_type>. The sound, that the rifle/cannon/gun produces is bind to this gun_type, that is present in sound_bank_projectile_fire.xml and db/projectiles table.
Here is a table, that correlates gun_types in .xml and db tables:
Spoiler Alert, click show to read:
But to actually assign those guns to units you need to go to projectiles table, edit or make a new entry in the first column named “key”, copy or edit its stats, go to the right to the “gun_types” column and type there any of the gun_types, that I gave you in the table above.
Then you go to units_stats_land (I haven’t done it for naval crews, but I don’t think it would be much different or significantly difficult), scroll to “default_missle_type” and type there entry from projectiles table “key” column.
Spoiler Alert, click show to read:
But for it to work, you also need to edit sound_bank_projectile_fire.xml and sound_events.csv. Using the info from the table I gave you, you navigate in sound_bank_projectile_fire.xml find the entry you want to edit, for example, “unnamed_event_9889”. There you will find different gun_types, you always want to leave only 1 gun type per 1 unnamed_event, so you won’t have any sounds glitches, I choose to leave “unknown14” there. So you have to delete this entry in all other unnamed_events. Then you go to sound_events.csv, search there for your “unnamed_event_9889” and find this entry. Copy it somewhere and change the path to the desired sound path
Spoiler Alert, click show to read:
Make sure to add this folders sfx/famguy with the sounds in them to your mod.pack. All sounds must be in .wav format with 705 kbit/s about 3s length. In order to do it, you have to save your desired file with 22050 Hz sampling.
Spoiler Alert, click show to read:
Then you need to save your changes and run Symphony tool by the command, I described earlier:
Spoiler Alert, click show to read:
You may have noticed, that there are strings like <unit>Boshin_Cav_Missile_Carbine_Cavalry</unit> in the sound_bank_projectile_fire.xml. This string overrides your changes to sounds, forcing named units to use the sound from the unnamed_event_xxx they belong to. So if your Carbine Cavalry is assigned Spencer rifle sound by the gun_type, but this unit is written to another unnamed_event_yyy, for example, using bow sound, this unit will use bow sound. So I also attach the archive, where there are no predefined units.
Then you open with PFM (Pack file manager) your mod.pack (containing db/projectiles and db/units_stats_land tables you edited earlier) and add there folder “sounds_packed”.
Spoiler Alert, click show to read:
Then you run Shogun 2, enable your mod in the mod manager and see if it works:
https://youtu.be/AiGZIiQh77g
Credits:
crux3D – for his Symphony tool