Attached is a zip file containing symphony.exe. Symphony is a windows console application for unpacking and repacking total war sound files. It now supports the formats used in Empire: Total War and Napoleon: Total War and (to a limited extent) Total War: Shogun 2.
Usage:
symphony extract <path to root total war folder> <path to output folder>
(i.e. symphony extract "C:\Program Files\Steam\SteamApps\common\empire total war" unpacked_sounds)
Extracts sounds_packed/sound_events and sounds_packed/sound_bank_database into csv, txt and xml files and writes those files to the specified folder. You should normally run this with a vanilla install.
symphony extract <path to root total war folder> <path to user script> <path to output folder>
(i.e. symphony extract "C:\Program Files\Steam\SteamApps\common\napoleon total war" "%appdata%\The Creative Assembly\Napoleon\scripts\user.script.txt" unpacked_sounds)
Loads the mods specified in the user script and then extracts sounds_packed/sound_events and sounds_packed/sound_bank_database into csv, txt and xml files and writes those files to the specified folder. You should only extract after loading mods if you want to edit packed sounds that have been created to work with a mod.
symphony pack <path to root total war folder> <path to edited sound files> <path to output folder or pack>
(i.e. symphony pack "C:\Program Files\Steam\SteamApps\common\napoleon total war" unpacked_sounds sound_non_wavefile_data_my_unit_mod.pack)
Packs the csv, txt and xml files in the specified folder into sound_events and sound_bank_database files and writes them to the specified destination. If the destination is a folder symphony will write raw files. If the destination is a packfile which does not already exist, or is an existing packfile which does not contain any files besides sounds_packed/sound_events and sounds_packed/sound_bank_database then symphony will create a new packfile with dependencies. If the destination is a packfile which contains additional files symphony will rename it to <name>.bak and then create a new packfile which contains all of the files from that packfile, plus the new sounds_packed/sound_events and sounds_packed/sound_bank_database files. In this case the packfile dependencies will not be modified.
symphony pack <path to root total war folder> <path to edited sound files> <path to user script> <path to output folder or pack>
(i.e. symphony pack "C:\Program Files\Steam\SteamApps\common\empire total war" unpacked_sounds "%appdata%\The Creative Assembly\Empire\scripts\user.empire_script.txt" sound_non_wavefile_data_my_unit_mod.pack)
Loads the mods specified in the user script and then packs csv, txt and xml files in the manner specified above.
Symphony loads all non-mod pack files on startup, plus any mod packs specified in the user script given, if any. Normal use would be to extract with a vanilla install, optionally edit the unpacked sounds and then pack with a mod enabled. For example, to fix the sound randomization issue that occurs with unit mods you would extract with a vanilla install, enable your mod via the user script and then pack. Symphony should then produce packed sound files that reproduce the original intended sound behaviour when your mod is active. This is achieved with the following steps:
1. Disable all mods (including loose files).
2. Run: Symphony extract <path to root total war folder> <path to unpacked sound folder>
(i.e. Symphony extract "c:\Program Files\Steam\SteamApps\common\total war shogun 2" "c:\symphony")
3. Enable all mods.
4. Run: Symphony pack <path to root total war folder> <path to unpacked sound folder> <path to user script> <path to output packfile>
(i.e. Symphony pack "c:\Program Files\Steam\SteamApps\common\total war shogun 2" "c:\symphony" "%appdata%\The Creative Assembly\Shogun2\scripts\user.script.txt" "c:\Program Files\Steam\SteamApps\common\total war shogun 2\data\sounds.pack")
5. Edit your user script and add "mod sounds.pack;"
Note that if you use mods with movie-type or other non-mod type packfiles you must take care to manage them with symphony. If you have a movie-type unit mod active and extract the vanilla sound packs against it you will extract a randomized sound pack!
Symphony lists which files it is reading and writing so that you can easily confirm that the expected mod files are being read.
For a vanilla extraction you can expect output similar to:
Code:
Loaded "sounds_packed/sound_events" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/agents_tables"
Loaded "agents" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/building_levels_tables"
Loaded "building_levels" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/projectiles_explosions_tables"
Loaded "projectiles_explosions" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/factions_tables"
Loaded "factions" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/sea_surfaces_tables"
Loaded "sea_surfaces" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\main.pack"
Loading database table "db/cultures_subcultures_tables"
Loaded "cultures_subcultures" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/units_tables"
Loaded "units" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch5.pack"
Loading database table "db/unit_category_tables"
Loaded "unit_category" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\main.pack"
Loading database table "db/unit_class_tables"
Loaded "unit_class" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\main.pack"
Loaded "sounds_packed/sound_bank_database" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch5.pack"
Wrote "unpacked_sounds\sound_categories.csv"
Wrote "unpacked_sounds\unknown_1.txt"
Wrote "unpacked_sounds\sound_events.csv"
Wrote "unpacked_sounds\ambience.csv"
Wrote "unpacked_sounds\unknown_2.txt"
Wrote "unpacked_sounds\movies.csv"
Wrote "unpacked_sounds\sound_settings.xml"
Wrote "unpacked_sounds\sound_bank_surface_impacts.xml"
Wrote "unpacked_sounds\sound_bank_projectile_fire.xml"
Wrote "unpacked_sounds\sound_bank_projectile_explosion.xml"
Wrote "unpacked_sounds\sound_bank_projectile_ground_impact.xml"
Wrote "unpacked_sounds\sound_bank_projectile_idle.xml"
Wrote "unpacked_sounds\sound_bank_region_buildings.xml"
Wrote "unpacked_sounds\sound_bank_ambient_birds.xml"
Wrote "unpacked_sounds\sound_bank_ambient_forest_birds.xml"
Wrote "unpacked_sounds\sound_bank_ambient_land.xml"
Wrote "unpacked_sounds\sound_bank_ambient_environment.xml"
Wrote "unpacked_sounds\sound_bank_building_levels.xml"
Wrote "unpacked_sounds\sound_bank_building_ambience.xml"
Wrote "unpacked_sounds\sound_bank_sea.xml"
Wrote "unpacked_sounds\sound_bank_group_movement.xml"
Wrote "unpacked_sounds\sound_bank_naval_unit_voice_events.xml"
Wrote "unpacked_sounds\sound_bank_campaign_voices.xml"
Wrote "unpacked_sounds\sound_bank_unit_voice_events.xml"
Wrote "unpacked_sounds\sound_bank_ambient_battle_forest.xml"
Wrote "unpacked_sounds\sound_bank_ambient_water_wildlife.xml"
Wrote "unpacked_sounds\sound_bank_music_state.xml"
Wrote "unpacked_sounds\sound_bank_bodyfall_light.xml"
Wrote "unpacked_sounds\sound_bank_bodyfall_heavy.xml"
Wrote "unpacked_sounds\sound_bank_man_individual_footstep_walk.xml"
Wrote "unpacked_sounds\sound_bank_man_individual_footstep_run.xml"
Wrote "unpacked_sounds\sound_bank_man_individual_footstep_turn.xml"
Wrote "unpacked_sounds\sound_bank_horse_individual_footstep_walk.xml"
Wrote "unpacked_sounds\sound_bank_camel_individual_footstep_walk.xml"
Wrote "unpacked_sounds\sound_bank_elephant_individual_footstep_walk.xml"
Done.
For a simple unit mod packing you can expect output similar to:
Code:
Loaded "output\sound_categories.csv"
Loaded "output\unknown_1.txt"
Loaded "output\sound_events.csv"
Loaded "output\ambience.csv"
Loaded "output\unknown_2.txt"
Loaded "output\movies.csv"
Loading database table "db/agents_tables"
Loaded "agents" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/building_levels_tables"
Loaded "building_levels" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/projectiles_explosions_tables"
Loaded "projectiles_explosions" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/factions_tables"
Loaded "factions" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/sea_surfaces_tables"
Loaded "sea_surfaces" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\main.pack"
Loading database table "db/cultures_subcultures_tables"
Loaded "cultures_subcultures" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch2.pack"
Loading database table "db/units_tables"
Loaded "units" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\patch5.pack"
Loaded "my_unit_mod" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\my_unit_mod.pack"
Loading database table "db/unit_category_tables"
Loaded "unit_category" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\main.pack"
Loading database table "db/unit_class_tables"
Loaded "unit_class" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\main.pack"
Loaded "output\sound_settings.xml"
Loaded "output\sound_bank_surface_impacts.xml"
Loaded "output\sound_bank_projectile_fire.xml"
Loaded "output\sound_bank_projectile_explosion.xml"
Loaded "output\sound_bank_projectile_ground_impact.xml"
Loaded "output\sound_bank_projectile_idle.xml"
Loaded "output\sound_bank_region_buildings.xml"
Loaded "output\sound_bank_ambient_birds.xml"
Loaded "output\sound_bank_ambient_forest_birds.xml"
Loaded "output\sound_bank_ambient_land.xml"
Loaded "output\sound_bank_ambient_environment.xml"
Loaded "output\sound_bank_building_levels.xml"
Loaded "output\sound_bank_building_ambience.xml"
Loaded "output\sound_bank_sea.xml"
Loaded "output\sound_bank_group_movement.xml"
Loaded "output\sound_bank_naval_unit_voice_events.xml"
Loaded "output\sound_bank_campaign_voices.xml"
Loaded "output\sound_bank_unit_voice_events.xml"
Loaded "output\sound_bank_ambient_battle_forest.xml"
Loaded "output\sound_bank_ambient_water_wildlife.xml"
Loaded "output\sound_bank_music_state.xml"
Loaded "output\sound_bank_bodyfall_light.xml"
Loaded "output\sound_bank_bodyfall_heavy.xml"
Loaded "output\sound_bank_man_individual_footstep_walk.xml"
Loaded "output\sound_bank_man_individual_footstep_run.xml"
Loaded "output\sound_bank_man_individual_footstep_turn.xml"
Loaded "output\sound_bank_horse_individual_footstep_walk.xml"
Loaded "output\sound_bank_camel_individual_footstep_walk.xml"
Loaded "output\sound_bank_elephant_individual_footstep_walk.xml"
Wrote "sound_non_wavefile_data_my_unit_mod.pack"
Done.
Notice the additional 'Loaded "my_unit_mod" from "C:\Program Files\Steam\SteamApps\common\empire total war\data\my_unit_mod.pack"' under 'Loading database table "db/units_tables"', which shows the desired mod has been loaded.
Symphony has not been heavily tested. I have also had to make a number of assumptions about how things should work. If you are having problems please post in this thread and I will attempt to resolve your issues if possible and as my time allows.
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/; or, (b) send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California 94140, USA.
Uses Boost.Array, Copyright (C) 2001-2004 Nicolai M. Josuttis
Uses Boost.LexicalCast, Copyright Kevlin Henney, 2000-2005. Copyright Alexander Nasonov, 2006-2007. Copyright (C) Antony Polukhin, 2011.
Uses Boost.Filesystem, (C) Copyright Beman Dawes, 2002-2005
Uses Boost.Integer, Copyright (C) 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota, John Maddock
Uses Boost.Thread, Copyright (C) 2007 -8 Anthony Williams
Thanks to Steph, Seyal, Kurisu Paifuaa, DARTH VADER, Anton III and anyone else I missed for helping track down issues with Symphony and Shogun 2.
Technical information about the underlying file formats is available here.