Sound text files
The sound text files are used to edit the sound in RTW and M2TW. They contain paths and usage instructions for all noises/voices samples and musics in the game, and are indispensable when modding sound and music in RTW and M2TW. In their final form, they make up the currently non-extractable (using Vercingetorix IDX unpacker) events archive ("Archive" refers to dat/idx files) in the data\sounds subfolder inside the M2TW install folder. As they cannot be extracted from events.dat, an archive containing the sound text files is available here.
Note: Format of these text files are the same in both RTW and M2TW are the same (and seem to be largely the same since Shogun:Total War) with some different in sound bank's vocal events, class type, element's format (mostly found in export_descr_sound_*.txt family) but most of them are the same. RTW's sound banks are categorized by cultures, but in M2TW are categorized by accent groups (which setting is done in additional file not exist in RTW). And only some sound banks in RTW support mp3 format, the rest have to use wav format. But in M2TW, all sound bank could support mp3.
Note: RTW and its expansions are coming with events archives but game engine would not generate new events archive and seem not crucial to existence of sounds in mod of RTW as it seem to able to able to load sounds according to text files without events archives loaded according to process monitor ("name of found" result) or archived is blank files (0 byte) without losing any of their sound content.
Usage
The sound text files available in the above available archive are to be extracted into the data subfolder inside the M2TW install folder, where they are then edited in any text editor to fit the modder's needs.
List of files
Below is a list of all of the sound text files. Click a filename to read detailed information and usage instructions for a file. In general, each of the files listed below is very intuitive and self-explanatory, meaning it won't take anyone a long time to figure out how it works.
- descr_sounds.txt (Primary sounds file, other sounds files are direct or indirectly reference from this file through "include" command)
- descr_sounds_accents.txt (M2TW only, for assign factions to set of sound/voice accents, replacing role of culture for sound feature in RTW)
- descr_sounds_advice.txt (reference to export_descr_sounds_advice.txt through "source" command to separate setting value from sound bank data)
- descr_sounds_battle_events.txt (reference to export_descr_sounds_units_battle_events.txt through "source" command to separate setting value from sound bank data)
- descr_sounds_engine.txt
- descr_sounds_enviro.txt
- descr_sounds_generic.txt (M2TW only, contain a lot of different isolated sound events which not part of any sound bank include content which was originally part of RTW's descr_sounds_stratmap_anims.txt and descr_sounds_interface.txt)
- descr_sounds_interface.txt
- descr_sounds_music.txt (support mp3 format in RTW)
- world/map/base/descr_sounds_music_types.txt (M2TW only, assigned music based on regions)
- descr_sounds_narration.txt (In RTW, this file contain all historic battles narration. In M2TW, it contains only mid-battle event voice in historic battles but reference to export_descr_sounds_narration.txt through "source" command)
- descr_sounds_prebattle.txt (reference to export_descr_sounds_prebattle.txt through "source" command to separate setting value from sound bank data, also contain background sound setting)
- descr_sounds_stratmap.txt
- descr_sounds_stratmap_anims.txt (RTW only, content in this file move to descr_sounds_generic.txt in M2TW)
- descr_sounds_stratmap_voice.txt (reference to export_descr_sounds_stratmap_voice.txt through "source" command to separate setting value from sound bank data)
- descr_sounds_structures.txt
- descr_sounds_units.txt ("descr_sound_units_" family are referenced from this file through "include" command in RTW. in M2TW, those files reference from descr_sounds.txt directly.)
- descr_sounds_units_ambient.txt
- descr_sounds_units_anims.txt
- descr_sounds_units_celebrate.txt
- descr_sounds_units_charge.txt
- descr_sounds_units_collide.txt
- descr_sounds_units_confirm.txt
- descr_sounds_units_fight.txt
- descr_sounds_units_fire.txt
- descr_sounds_units_idle.txt
- descr_sounds_units_march.txt
- descr_sounds_units_reform.txt
- descr_sounds_units_retreat.txt
- descr_sounds_units_run.txt
- descr_sounds_units_taunt.txt
- descr_sounds_units_voice.txt (reference to export_descr_sounds_soldier_voice.txt and export_descr_sounds_units_voice.txt through "source" command to separate setting value from sound bank data)
- descr_sounds_weapons.txt
- export_descr_sounds_advice.txt (expansion of descr_sounds_advice.txt to contain sound bank data, support mp3 format in RTW)
- export_descr_sounds_narration.txt (M2TW only. expansion of descr_sounds_narration.txt which contain historic battle narration, support mp3 format in RTW)
- export_descr_sounds_prebattle.txt (expansion of descr_sounds_prebattle.txt to contain sound bank data)
- export_descr_sounds_soldier_voice.txt (expansion of descr_sounds_units_voice.txt to contain sound bank data for soldier as individual reaction)
- export_descr_sounds_stratmap_voice.txt (expansion of descr_sounds_stratmap_voice.txt to contain sound bank data)
- export_descr_sounds_units_battle_events.txt (expansion of descr_sounds_battle_events.txt to contain sound bank data, support mp3 format in RTW)
- export_descr_sounds_units_voice.txt (expansion of descr_sounds_units_voice.txt to contain sound bank data for unit as whole response to order)
Format
All sound files have the same operational structures due to they are originally single file (descr_sounds.txt) which split up for development ease with pattern as example for all sound files apart from descr_sounds.txt and descr_sounds_accents.txt which consider as header of all the sounds files contain many parameters which different from others and set for whole game.
Head of file.
DEFAULT: modifiers
DEFAULT = setting which declare by this would be using for follow sound events unless specified in event or DEFAULT is declared in the same category again.
required_samples_cutoff X
Limit sound sample which would load for each events (X = number of samples which would be load in each events)
(specific bank setting, tend to have comment explanation when declare in file)
source {text file name}
Indicated sound banks (not include value setting) would be continue on file as name indicate
BANK: { bank name } ignore {advice's text name} restricted {sample's file name}
(specific bank setting, tend to have comment explanation when declare in file)
BANK = declare category of sound as engine recognised, sound files tend to contain only 1 BANK per file
Note: Some sound events are not part of sound banks (such as narration and stratmap_anims}
Category inside the bank (not all banks would have all categories below, see specific sound files for detail)
mount { mount type in descr_mounts.txt } animal { wardogs, pigs } unit { unit's type in EDU or unit's category or unit's class } exclude_unit { unit's type in EDU or unit's category or unit's class } class { engine class name } type { water/enviro type } daytime { day_time in descr_daytypes.txt } weatherevent { weatherevent in descr_daytypes.txt } precipitate { precipitate type in descr_daytypes.txt } wind { wind level in descr_daytypes.txt } season { summer, winter, etc } climate { parameter as defined by descr_climate.txt } terrain { battle map terrain as generated on battlemap by descr_geography.db }
type { unit type in EDU }
mount { mount type in descr_mounts.txt } animal { wardogs, pigs } unit { unit's type in EDU or unit's category or unit's class } exclude_unit { unit's type in EDU or unit's category or unit's class } class { unit's voice_type } anim { animation sound event }
unit { unit's type in EDU or unit's category or unit's class } stage { ready, aim, fire }
type { ambient animal type } action { animal action }
type { event type according to descr_event_images.txt }
type { interface type } mode { interface type's mode }
culture { culture according to descr_cultures.txt } state { music state }
text { exporting Campaign Advice } (using by BANK: ADVICE)
action { strat map action } type { agent's type }
type { disaster type }
season { summer, winter, etc } terrain { strat map terrain } climate { climate according to descr_climates.txt } ambient looped
what { settlement, port, landmark } culture { culture according to descr_cultures.txt } level { settlement/port level } wonder { wonders' type }
category { ambient, major, gate, wall } type { battle map buildings/ambient } what { fire/transition } transition { transition type }
what { ambient }
culture { culture according to descr_cultures.txt } class { unit's voice_type } vocal { vocal type } engine { engine_type } unit { unit_type or unit's category or unit's class } exclude_unit { unit_type or unit's category or unit's class }
Sound event body, apart from trigger by game itself, they could be triggered by script.
event { event name } modifiers folder { base path } {sample name} modifiers (any of probability, volume etc) {sample name} ... folder { base path , in case files have different location} {sample name} modifiers (any of probability, volume etc) {sample name} ... end
{sample name} = name of sound sample file (if extension is .wav, extension could be omitted)
List of modifers (X indicated value for setting)
3d - sound has distance/direction modification
1d - sound has no distance/direction modification
Streamed - read from disk instead of embedded file in memory at the game startup
looped - overwrite the parameter in play_tracked_sound
ducking - temporary lowering other sounds (not use in vanilla RTW but could be used in RTW)
retrigger X - delay before retriggering the sound, using for music (X is in second)
minDist X - minimum distance which would hear the sound (X must more than 1.0)
maxDist X - maximum distance which sound would still be heard
priority X - (X = between 0 to 9999)
Volume X - modifier to based sound volume set in the preference (X = between -100 to 0 db)
probability X -
minPitch X -
maxPitch X -
dry_level X - (X = 0 to 1 }
wet_level X - (X = 0 to 1 }
delay X - delay in seconds before next 3d sounds start playing
randomdelay X - delay within seconds before next 3d sounds start playing
probradius X -
fadein X -
fadeout X -
pref X - sound preference setting to be use for events below (X = sfx/speech/music/INTERFACE }
pan X - 2D events only, from 0 (hard-left) to 1.0 (hard-right) 0.5 - default
ignore_pause X -
distancepriority X -
effect_level X -
rndvolume X -
The end of File may contains....
include {text file name}
Indicated extension of sound file (include value setting) to be continue on file as name indicated
Loading
Note that the sound text files cannot be loaded by using any special commands such as file_first.io. Instead, the game will, upon launch (i.e. by running medieval2.exe), detect whether a valid events archive (events.dat and events.idx) exists in the data\sounds subfolder.
- If one exists, and is valid, the sound text files will be ignored.
- If one exists, but is invalid (such as one created using Vercingetorix IDX extractor), or is missing altogether, the game will create a new events archive using the sound text files. Similarily, no changes will be made to valid Music, SFX and Voice archives. Events archive is not generated in RTW.
In order to make changes any of the archives, they must be renamed or moved to another folder so the game can't find them upon launch. If the game tries to build new archives, but the sound text files are missing, the result will be 1kB archives and no sound in the game. Note that this will never happen if valid archives are present in the data\sounds folder.
- Sound text files and all sound files they reference to are loaded only once upon startup.
- Sound files with wrong paths in text files would not report error upon exit in RTW but could be detected by using process monitor and only included result that "PATH NOT FOUND" and path contain either .mp3 and .wav while excluded all process name that not from game file .exe you run with. Sound files would always loaded from inside .dat files (memory-embedded) first before start looking sound files inside data\sound folder, so file which it loaded from inside .dat files would not appear as entry from process monitor.
Tip for Management Sound Files
1) Manage memory usage. Sound files have its limit, as most/all sounds samples would be uploaded to memory at startup and game has limit on memory usage, especially RTW which if sound samples combined more than 400 mb would lead to either sound-loss in some events (most likely music_bank which tend to be the biggest shared of sound by memory usage).
2) If your RTW mod is heavy on resource usage and you could not distinguish soundscape different between battlefield in M2TW and RTW, or you consider M2TW's is better, you should try adopted some or most of setting in descr_sounds_units.txt along with its subsidiary from M2TW due to they are better optimized in term of memory usage than setting in the same issue from RTW (which RTW has more depth and detail but most people could not distinguish between them in chaotic battle with loud music anyway).
3) Music is the heaviest part in sound setting in term of memory usage as bulk. So music events should not have sound samples more than five in each events and music files should be as small bit-rate as possible while still within acceptable sound quality, players of your mod are not rabbits or whales to have ability to distinguish different in minute detail in the mid of chaotic battle.