You all know it - "Today is a good day to die...!" It is cool, but after all those years it no longer feels so great. So let us assume that I want my generals say something different before battles. Say, "Resistance is futile..." or an actual historical pre-battle speech in Latin. To do it is very simple. Getting the .mp3 file with the speech I want is actually the most difficult part. Assume I have it already, so let us call it "my_file.mp3" - what next?
First
If your mod is mod-foldered look for the file [MyMod - EB, IB, RS, whatever]\data\export_descr_sounds_prebattle.txt. If it is there - make a backup. If there is no such file go for the vanilla, i.e. ...RTW\data\export_descr_sounds_prebattle.txt and copy it into your mod folder. Also, if you want to add subtitles, which might be almost necessary for speeches in ancient languages, go into ...RTW\data\text folder, copy the file prebattle_speeches_subtitles.txt and copy it into [MyMod]\data\text folder - if it is not already there.
Now let us create in [MyMod - EB, IB, RS, whatever]\data\ the following folder structure: [MyMod]\data\sounds\Voice\Human\Localized\Pre_Battle_Speech - it is not strictly necessary, but I rather stayed on the safe side - and put the my_file.mp3 there and rename it into Roman_Intro_01_1.mp3.
Second
Open the export_descr_sounds_prebattle.txt with your favourite text editor. The content of this file are neatly structured:
Code:
BANK: prebattle_speech
cultures Roman - all the following until the next cultures tag concerns this culture
element VNV_OPENING - identifies the beginning of an element
VnV BadCommander 1 - condition under which the following sound-file is played
event
folder data/sounds/Voice/Human/Localized/Pre_Battle_Speech - line to mod No.1
Roman_Intro_01_1.mp3 - - line to mod No.2
end
The important thing to note is that a pre-battle speech is actually assembled by the engine from several individual sound-file, i.e. the elements.
Now comes the quick part - assume I want my_file.mp3 to play just for the Romans. So use the find-and-replace feature of your text editor and replace all instances of
Code:
folder data/sounds/Voice/Human/Localized/Pre_Battle_Speech
for
Code:
folder [MyMod]/data/sounds/Voice/Human/Localized/Pre_Battle_Speech
all the way until the line "cultures Greek" - BTW it is line 1717 in the vanilla file. Note that the slashes go in the opposite direction than usual, but it is not a bug, it is a feature (probably).
Third
Here comes the tedious part. Delete all conditions you do not need and change all file names referred to for your culture into "Roman_Intro_01_1.mp3" Essentially what you need is this:
Save and exit.
The result - now before every battle my sound will play instead of the vanilla battle speech. Because we need to preserve all elements listed in the file the same sound will play several times over. It does not matter too much unless the sound is long and you would like to have subtitles for it. Because the subtitles will also be long and because they are on screen all the time the file is playing it will clutter the screen. Much better is to cut your intended speech into several parts - several sound-files and assign them to the elements in appropriate order.
Subtitles¨
The easiest part of all - open the [MyMod]\data\text\prebattle_speeches_subtitles.txt and change the entries for the files which names we used into what are the intended subtitles:
from this:
Code:
{Roman_Intro_01_1}
You know my reputation! I would not choose to send you to your deaths unless it were absolutely necessary.
into something like this:
Code:
{Roman_Intro_01_1}
Let us pray now...
That is all there is to it. Good luck and have fun!
Bookmarks