Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Sound text files"

From TWC Wiki
Jump to navigationJump to search
(Format)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
('''''This entire (and unfinished) article and the procedures and instructions contained are intended for usage with M2TW 1.1 only. "Archive" refers to dat/idx files.''''')
+
{{RTW M2TW Modding Logo}}<br>
 +
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, [http://www.twcenter.net/forums/downloads.php?do=file&id=1110 an archive containing the sound text files is available here].
  
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 in the data\sounds subfolder inside the M2TW install folder. As they cannot be extracted from events.dat, [http://www.twcenter.net/forums/downloads.php?do=file&id=1110 an archive containing the sound text files is available here].
 
 
{| align="right"
 
  | __TOC__
 
  |}
 
  
 
'''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:''' 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.
Line 22: Line 18:
 
*[[descr_sounds.txt]] (Primary sounds file, other sounds files are direct or indirectly reference from this file through "include" command)
 
*[[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_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_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_event.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_engine.txt]]
 
*[[descr_sounds_enviro.txt]]
 
*[[descr_sounds_enviro.txt]]
*[[descr_sounds_generic.txt]]
+
*[[descr_sounds_events.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_interface.txt]]
 
*[[descr_sounds_music.txt]] (support mp3 format in RTW)
 
*[[descr_sounds_music.txt]] (support mp3 format in RTW)
*[[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_music_types.txt]] (M2TW only, assigned music based on regions and factions, file would stay in the same folder as [[descr_regions.txt]])
*[[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_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.txt]]
*[[descr_sounds_stratmap_anims.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_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_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.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_ambient.txt]]
 
*[[descr_sounds_units_anims.txt]]
 
*[[descr_sounds_units_anims.txt]]
Line 50: Line 48:
 
*[[descr_sounds_units_run.txt]]
 
*[[descr_sounds_units_run.txt]]
 
*[[descr_sounds_units_taunt.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_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]]
 
*[[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_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_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_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_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_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_units_battle_events.txt to contain sound bank data, support mp3 format in RTW)
+
*[[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)
+
*[[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===
 
===Format===
Line 71: Line 69:
 
   required_samples_cutoff X
 
   required_samples_cutoff X
  
Limit sound sample which would load for each events (X = number of samples which would be load in each events)
+
Limit number of sound sample which would load for each events at the same time (X = maximum number of samples which would be load)
  
 
   (specific bank setting, tend to have comment explanation when declare in file)
 
   (specific bank setting, tend to have comment explanation when declare in file)
Line 90: Line 88:
  
 
Category inside the bank (not all banks would have all categories below, see specific sound files for detail)
 
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 }
 
 
  weapon_type { weapon sound type: knife, sword, spear, axe, mace, club }
 
  unit { unit's type in EDU or unit's category or unit's class }
 
  weapon {EDU's attack Weapon type = melee, thrown, missile, or siege_missile} {EDU's attack damage types = piercing, blunt, slashing or fire}
 
    hit { armour type: flesh, leather, wood, metal, building, ground, water }
 
    hit ground { list of terrain types }
 
    hit building { building types }
 
    death_hit { flesh, leather, wood, metal, building, ground, water }
 
    fly
 
    flaming fly
 
    flaming hit { flesh, leather, wood, metal, building, ground, water }
 
 
  culture { culture according to descr_cultures.txt }
 
    element {  prebattle_speech element }
 
      VnV { trait X }
 
      relationship { Hates/Neutral faction_type }
 
      present { faction_type }
 
      helping { faction_type }
 
      situation { situation type }
 
      type { type name }
 
      odds { odds type }
 
      condition { condtion type }
 
      omen { omen type }
 
      reinforcement { reinforcement status }
 
    notification { battle event notification }
 
    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 }
 
    type { strat map's agent type }
 
      vocal { vocal type }
 
  
 
Sound event body, apart from trigger by game itself, they could be triggered by script.
 
Sound event body, apart from trigger by game itself, they could be triggered by script.
Line 207: Line 111:
  
 
'''looped''' - overwrite the parameter in play_tracked_sound
 
'''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)
 
'''retrigger X''' - delay before retriggering the sound, using for music (X is in second)
Line 270: Line 176:
  
 
*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.
 
*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.
  
 
[[User:Beiss|Beiss]]
 
[[User:Beiss|Beiss]]
 +
[[User:Suppanut|Suppanut]]
  
 
[[Category: M2TW Modding]]
 
[[Category: M2TW Modding]]
 +
[[Category:RTW Sounds & Media Modding]]
 +
[[Category: M2TW Sound Files]]
 +
[[Category:RTW Sound Files]]

Latest revision as of 11:35, 16 March 2021

Rome:Total War & Remastered - Modding Index

M2TW Modding Index



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.

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 number of sound sample which would load for each events at the same time (X = maximum number of samples which would be load)

 (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)

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.

Beiss Suppanut