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)
(Format)
Line 88: 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)
 
  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.
 
Sound event body, apart from trigger by game itself, they could be triggered by script.

Revision as of 23:15, 4 January 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 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)

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