Results 1 to 4 of 4

Thread: Shogun 2 Modding sounds

  1. #1

    Default Shogun 2 Modding sounds

    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: 

    1) Extract Symphony.exe to any folder you find comfortable for you. (My path is D:\Shogun_2\Symphony)
    2) Run “cmd.exe” as administrator (I do it to avoid any problems) (In win10 click “start” in the left bottom corner and type “cmd” and it will be found) and there you need to find a way to the folder, where your “symphony.exe” is situated.
    In my case it looks like this:

    You’ll need to type this
    D:
    Cd shogun_2
    Cd symphony
    3) To extract files you type:
    symphony extract "D:\Games\Steam\SteamApps\common\total war shogun 2" "D:\Misc\Shogun_2\sounds_test"
    First is the command for the program – my path to shogun 2 main folder (change it to your path) – path to the folder, where you want your extracted files to be (this folder must be created before using the program)

    If you want some other mod, that have its own sounds_packed file, you type this:
    Spoiler Alert, click show to read: 
    symphony extract "D:\Games\Steam\SteamApps\common\total war shogun 2" "C:\Users\MSI-PC\Appdata\Roaming\The Creative Assembly\Shogun2\scripts\user.script.txt" "D:\Misc\Shogun_2\sounds_test2"
    Note: The mod, which sounds you desire to extract, must be written in user.script.txt

    There will be 61 files (screenshots attached).
    They all answer for different in-game sounds:
    Spoiler Alert, click show to read: 


    Sound_bank_projectile_fire – projectile fire
    Sound_bank_unknown1 – projectile fire and impact
    Sound_bank_unknown3 – projectile explosion
    Sound_bank_unknown4 – projectile flight
    Sound_bank_unknown5 – building select
    Sound_bank_unknown6 – wildlife
    Sound_bank_unknown7 – field musicians
    Sound_bank_unknown8 – fots/sfx/weapons/cannonfire/stw2_hyb_shell_incoming_medium_07_v1.00_gme.wav
    Sound_bank_unknown9 – environment ambience
    Sound_bank_unknown10 – city ambience
    Sound_bank_unknown11 – towns ambience
    Sound_bank_unknown12 – environment ambience
    Sound_bank_unknown13 – group movement sfx\movement\animalgroupmovement\stw2_hyb_horse_groupwalksmallshallowwater_v1.00_adpcm_gme.wav,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    Sound_bank_unknown14 – group projectiles sfx\weapons\arrows\s2tw_lib_weapon_arrow_normal_group_small_fire_04_v1.00_gme.wav,sfx\weapons\arrows\s2tw_lib_weapon_arrow_normal_group_small_fire_05_v1.00_gme.wav,sfx\weapons\arrows\s2tw_lib_weapon_arrow_normal_group_small_fire_06_v1.00_gme.wav,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    Sound_bank_unknown15 – wildlife sfx/land/wildlife/riverside/emp_lib_ambience_individualriversidefrogs_15_v1.00_gme.wav,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    Sound_bank_unknown16 – different music
    Sound_bank_unknown17 – projectiles impact
    Sound_bank_unknown18 – anim body falls
    Sound_bank_unknown19 – anim body falls
    Sound_bank_unknown20 – footstep
    Sound_bank_unknown21 – footstep
    Sound_bank_unknown22 – footstep
    Sound_bank_unknown23 – footstep
    Sound_bank_unknown24 – is empty
    Sound_bank_unknown25 – is empty
    Sound_events.csv
    Others I haven’t studied yet, but I suspect, most of them will be useless because they are not fully decrypted.

    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: 

    Default
    unnamed_event_9889,projectiles_fire,0,3,1,0.400000,-2.000000,1.000000,20.000000,640.000000,1.000000,0.750000,86900.000000,0.000000,random,sfx,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,0.250000,1.000000,0.000000,0.000000,2.000000,0.000000,none,1.000000,default,0.000000,0.000000,0.000000,40.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,20.000000,1.000000,0.200000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_01_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_02_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_03_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_04_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_05_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_06_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_07_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_08_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_09_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_10_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_11_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_12_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_13_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_14_adpcm_gme.wav,fots/sfx/weapons/breechload_rifle/stw2_gun_breechload_rifle_shot_15_adpcm_gme.wav,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    Changed:
    unnamed_event_9889,projectiles_fire,0,3,1,0.400000,-2.000000,1.000000,20.000000,640.000000,1.000000,0.750000,86900.000000,0.000000,random,sfx,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,0.250000,1.000000,0.000000,0.000000,2.000000,0.000000,none,1.000000,default,0.000000,0.000000,0.000000,40.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,20.000000,1.000000,0.200000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,sfx/famguy/ostrich_shot_01.wav,sfx/famguy/ostrich_shot_02.wav,sfx/famguy/ostrich_shot_03.wav,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,






    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: 

    D:
    Cd shogun_2
    Cd symphony
    To pack your edited sound file you type:
    symphony pack "D:\Games\Steam\SteamApps\common\total war shogun 2" "D:\Misc\Shogun_2\sounds_stripped" "D:\Misc\Shogun_2\sounds_test2\sounds_packed"
    First is the command for the program – my path to shogun 2 main folder (change it to your path) – path to the folder where unpacked sounds you edited are stored – path to folder where you want your packed files to be.

    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
    Attached Files Attached Files
    Last edited by HuskyTW; April 02, 2021 at 10:29 AM.

  2. #2

    Default Re: Shogun 2 Modding sounds

    Reserved

  3. #3

    Default Re: Shogun 2 Modding sounds

    Reserved (2)

  4. #4

    Default Re: Shogun 2 Modding sounds

    Reserved (3)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •