how to give a unit their own selected-voice on the battle-map and a tutorial for
how to give a single unit from a faction its own full soundtrack on the battle-map
and finally unique strat map voices for unique characters, by Withwnar, for the cherry on the top.
Unit Selection Voice - standard uniqueness
Rule one: back up any file before editing!
Right, let us have some fun. Let us say that you have created a brand new unit named Marines (if you are to alter an existing unit or are familiar with your factions voices you might go directly to step 2 or even 3). Marines then, some real swashbuckler kind of guys.
1.1) Open descr_sounds_accents.txt
Here you can see what accent the faction the unit belongs to has. This you need in step 3 so you may put the Marines entry under right accent. Our Marines belong to England, lets say. And when we check the textfile. Example:
And what do you know? The accent for england was English! When you open your own it will naturally presumably look different and/or other accents may be of interest.
Good, now we know that!
1.2) Open export_descr_unit.txt
- Look for your unit in question. What we intend to check out is what type the unit is = what name does it have? In our case here it is plain Marines - note that type and dictionary names do not have to be the same and that we want to know the type!
- Secondly we want to know what voice_type the unit has. This is the same thing as class in export_descr_sounds_units_voice.txt (EDSU) and tells us under what accent-class in EDSU we will add the units voices. In this case it is Heavy.
- In some cases also the accent is noted. This is mainly in case the unit uses another accent than the rest of the faction. This is not common but should be good to know in case you are editing a submod or merc's for instance. I have added it to show you how it can look just in case.
Note: if the faction has "English" as accent but you give a unit "accent Arabic", for example, in the EDU, that unit's voice entry [see step 3] has to be placed under the "Arabic" accent instead of the "English" accent in export_descr_sounds_units_voice.txt.
Likewise, if you have given a unit its voice entry under the faction's accent but the unit do not say anything, it may be because the unit has an accent-entry in the EDU saying it has another accent than the rest of the faction. Edit that line or remove it if you do not intend for the unit to use anotehr accent than the rest of the faction uses.
So knowing these things we may decide what the Marines will say in the next step.
Code:
type Marines
dictionary Marines_1 ; Marines
category infantry
class heavy
voice_type Heavy
accent English
banner faction main_missile
banner holy crusade
soldier marines, 60, 0, 1
(...)
1.3) export_descr_sounds_units_voice.txt
Here is where you decide what soundfiles you want to give to the unit, just as with any unit.
First! Find the correct accent.
Then make sure that you find the correct class - remember, it was called voice_type in export_descr_unit.txt.
Now in the right accent and under the right class we are looking for a section called vocal Unit_Select.
Code:
accent English
class General
vocal Group_Created
event
(...)
end
class Heavy
vocal Group_Created
event
(...)
end
vocal Unit_Select
(...)
Now either edit the existing unit entry - or create a new entry, in my example for the Marines - in this section.
I have made up an example to show you how it may look where I add the Marines at the end of the Unit_Select section.
I will give the Marines 3 new soundfiles I have recorded (Give_Me_Rum_1 and 2 and Marines).
Plus I use one soundfile the Saxon Bodyguard already uses. This as an example that you may use what other units already use.
Note that where vocal Unit_Siege_Tower_Attack confirm begin vocal Unit_Select ends, so put it above that.
Code:
(...) vocal Unit_Select
engine town_ladder, medium_ladder
event
folder data/sounds/Voice/Human/Localized/Battle_Map
English_Heavy_Generic_Ladder_1.wav
English_Heavy_Generic_Ladder_2.wav
end
unit Saxon Bodyguard
event
folder data/sounds/Voice/Human/Localized/Battle_Map
English_Heavy_Generic_Generals_Bodyguard_1.wav
English_Heavy_Generic_Generals_Bodyguard_2.wav
end
unit Marines
event
folder data/sounds/Voice/Human/Localized/Battle_Map Give_Me_Rum_1.wav Give_Me_Rum_2.wav Marines.wav English_Heavy_Generic_Generals_Bodyguard_1.wav
end
vocal Unit_Siege_Tower_Attack confirm
event
(...)
- Remember to be accurate with both files [.wav, mono, 22.050Hz] and directory, so that you put the files right for the game to find.
- You may use same voice sounds as other units just to be clear, as I've done using the Saxon BG's for the Marines.
- As I did just copy the last voicesound from the Saxons I do not have to worry about that one IF I put my new sounds in the same directory (folder) as this general-sound is in. Do not put them in different folders. In this example I put my new sounds the same folder as the english BG already is in: data/sounds/Voice/Human/Localized/Battle_Map
1.4) Almost done
Delete the Voice.idx, Voice.dat, events.idx and events.dat and then you should be free enjoy it through start a game. Now our new Marines will shout some things about rum, something about Marines and something general-generic
OBS! Make back ups before deleting to make sure that you wont lose data. This would most likely be because you have not unpacked all soundfiles as suggested in the beginning or you lack some required .txt-files. Either way that is a precaution any modder should always take so can't leave it out
- If you have Windows Vista or 7 & have installed the game\mod in the default directory (C:\Program Files\SEGA\Medieval II Total War....) then you should disable UAC before doing this because the new .idx and .dat files will go in the virtual folder otherwise. More info on UAC can be found here.
Create uniqe unit battle voice - advanced overhaul
The basic concept is that you create a brand new accent dedicated fully to the hero unit, or at most 3 units with uniqe voices per accent from each accent class; General, Heavy and Light.
Remember that if you want a uniqe voice for a uniqe hero that hero needs also a uniqe unit (see step number 4).
2.1) Begin opening descr_sounds_accents.txt
There you add the new accent for the unit. In my case in TATW I wanted to make one for the general unit Borormir from Gondor, so I called it Boromir. Note that I do not choose a faction for the accent!
2.2) If you want to you may add pre-battle speeches in export_descr_sounds_prebattle.txt
Just copy the section from the factions normal section and rename the entry. In my case I was lazy and did not do it at all but then again I rarely listen to any other speech than the laconic "They deserve to die. Just kill them, lads!". Perhaps he speaks anyway because he's a part of the Gondor faction? Honestly can't tell.
Though, if you want to be sure do this.
Original Gondor accent is English:
Code:
accent English
element VNV_OPENING
VnV
trait BadCommander
event
(...)
Copied to the end and edited:
Code:
accent Boromir
element VNV_OPENING
VnV
trait BadCommander
event
(...)
2.3) export_descr_sounds_soldier_voice.txt
Copy and paste the factions section and rename the new one after your new accent. Once again I seem to been either lazy or just forgot this step, so while it works without it should enhance the sound experience altogether. Example:
Code:
accent English
class General
vocal Individual_Attack_Grunt
event mindist 0.75 priority 120 volume -20 probability .4
folder data/sounds/Voice/Human/Localized/Battle_Map
(...)
Aletered:
Code:
accent Boromir
class General
vocal Individual_Attack_Grunt
event mindist 0.75 priority 120 volume -20 probability .4
folder data/sounds/Voice/Human/Localized/Battle_Map
(...)
2.4) Open export_descr_unit.txt
Look for your hero in question. He have to have a uniqe bodyguard - or be a uniqe unit in case of a special soundtheme for a special unittype. In the example the gondor foot bodyguards is unit that only exists as Boromirs bodyguard.
Now the important thing is to change his accent to the new one - in my case accent Boromir and make sure that his vocie_type is General.
This way the general-unit Boromir will speak what we decide in the next step.
Code:
type gondor foot bodyguards
dictionary gondor_foot_bodyguards ; Boromirs Bodyguard
category infantry ; Quality
class heavy
voice_type General
accent Boromir
banner faction main_infantry
If you change the factions normal general units accent ALL generals will suddenly sound like the expected uniqe general, so do not do like thisunless you want all to have the new sounds (though, then a new accent is not needed at all);
Code:
type Gondor Bodyguard
dictionary Gondor_Bodyguard ; General's Bodyguard
category cavalry
class heavy
voice_type General
accent Boromir
banner faction main_cavalry
Spoiler Alert, click show to read:
OBS!
It can be good to remember that a units class in export_descr_unit.txt is not the same thing as class in export_descr_sounds_units_voice.txt.
The sound class is in export_descr_unit.txt called voice_type. Thus you do not have to have the same class as voice_type even if export_descr_sounds_units_voice.txt may seem as it should be so - except when it comes to generals. See spoilerbox under step 5.
2.5) export_descr_sounds_units_voice.txt
Here is where you decide what soundfiles you want to give to the unit, just as with any unit. I suggest you to begin with copy pate the whole entry of the factions original accent, rename it and then begin to make changes:
Orginal:
Code:
accent English
class General
vocal Group_Created
event
folder data/sounds/Voice/Human/Localized/Battle_Map
English_General_Group_Created_1.wav
English_General_Group_Created_2.wav
end
Copy pasted and edited:
Code:
accent Boromir
class General
vocal Group_Created
event
folder data/sounds/Voice/Human/Localized/Battle_Map
English_General_Group_Created_1.wav
English_General_Group_Created_2.wav
end
Remember to be accurate with both files [.wav, mono, 22.050Hz] and directory, so that you put the files right for the game to find.
Because Boromir is a general I did edit class General, as above.
Spoiler Alert, click show to read:
It should be noted that you can not give another general, let us say Faramir, the voice_type Heavy space in accent Boromir in export_descr_sounds_units_voice.txt and then editing export_descr_unit.txt and make it work.
Because when playing the game will ignore that Faramir is a unit with voice-type heavy but give the unit the accents voice_type general as Faramir ingame works like a general. Least this was my experience, I could done somthing wrong in the progress so feel free to test out and report back if you got a success
The most interesting sounds to alter is the vocal Group and the vocal Unit-ones, as some of these entries are both most obvious and affecting.
The main objective for changes I propse are selections, attacks and movements. Then its good to have the original sounds left due to the copy paste, as to change all [other] sounds is often both a very big job and not really interesting.
Each entry often contains between 2 to 6 sounds, so its quite a work if you want to change all sounds. Such soundentries as concerns selection, attacks, movements and so is often the ones that is of real interest and should be given real effort.
2.6) Almost done
Delete the Voice.idx, Voice.dat, events.idx and events.dat and then you should be free enjoy it through start a game.
OBS! Make back ups before deleting to make sure that you wont lose data. This would most likely be because you have not unpacked all soundfiles as suggested in the beginning or you lack some required .txt-files. Either way that is a precaution any modder should always take so can't let it out
- If you have Windows Vista or 7 & have installed the game\mod in the default directory (C:\Program Files\SEGA\Medieval II Total War....) then you should disable UAC before doing this because the new .idx and .dat files will go in the virtual folder otherwise. More info on UAC can be found here.
2.7) Optional use of the accent;
Spoiler Alert, click show to read:
When you have made the general unit you may have noted that the accent still havent made anything with its Class Heavy and Class Light.
If you have a odinary unit that you want to give a custom soundtheme you may use these two classes to cover that! Gondor has an elite unit called Fountain Guard. Let us play with the idea that I want to give them some uniqe voices. Then go back to step 4 and alter export_descr_unit.txt for this particular unit.
Change it to Boromir as well. As it should not sound like Boromir himself it cant have voice_type General, but Heavy and Light is still unoccupied. As the unit already have Heavy listed (se below) I leave it to that.
Code:
type Fountain Guard
dictionary Fountain_Guard ; Fountain Guard
category infantry
class spearmen
voice_type Heavy
accent Boromir
banner faction main_spear
Do as in step 5: change the sounds in export_descr_sounds_units_voice.txt to whatever sounds you want the unit to have - though this time under class Heavy.
Note: If any other unit is given accent Boromir and voice_type Heavy afterwards they will souns like the Fountain Guard.
We may still make another unit uniqe using the class Light in case we want to though.
//Hope I have not missed anything in these little tutorials and hope it will help you create more interesting units and campaigns.
Thanks to Ishan for input and contribution. Also thanks to Aneirin for input resulting in the Note on custom unit accents under 1.2.
And to our international treasure Withwnar for his full tutorial addition on strategy map voices.
Best regards Ngugi
Last edited by Ngugi; October 02, 2018 at 09:19 PM.
Reason: Typos, clarifications and additions
You should mentioned while doing this if a person has installed his game\mod in the default directory then he should disable UAC before doing this otherwise the newly created .idx and .dat files will go in the virtual folder instead.
Anyways very nicely explained although if "Unique unit soundtheme" is the only aim then there is no need to create a new accent.
You should mentioned while doing this if a person has installed his game\mod in the default directory then he should disable UAC before doing this otherwise the newly created .idx and .dat files will go in the virtual folder instead.
Thank you, fun that it will be easier availabel for people to find and hopefully have some help from, sir
Will add a notification on that then, never had such an issue so did not consider that.
Anyways very nicely explained although if "Unique unit soundtheme" is the only aim then there is no need to create a new accent.
Mhm, interesting!
Beside special entries for 'unit selection' I was not aware of that you could give a single unit special sounds within an existing accent.
Can you create 'vocal Group'- and the 'vocal Unit'-entries specified for a unit, rather than a class? Or can you even add an entire new voice class in the accent?
This expected limitations, that neither such thing could be added, was the reason to make a new accent for the hero from my part.
Last edited by Ngugi; December 12, 2011 at 09:30 AM.
Can you create 'vocal Group'- and the 'vocal Unit'-entries specified for a unit, rather than a class? Or can you even add an entire new voice class in the accent?
This expected limitations, that neither such thing could be added, was the reason to make a new accent for the hero from my part.
No. The structure of the events.dat binary does not permit it, and the M2TW parser probably won't be very happy with it either.
However, if all you wanted to do amounted to editing unit voice itself (i.e. not battle commands or speeches) then you may be able to go a long way by using code like this:
Code:
unit type "unit_edu_name_here" ;; or was it: unit "unit_edu_name_here" ??? either of the two, anyway.
If I understand you right now we are talking about this part of the EDSU
Code:
vocal Unit_Select
unit Heavy Billmen
event
folder data/sounds/Voice/Human/Localized/Battle_Map
English_Heavy_heavy_billmen_1.wav
English_Heavy_heavy_billmen_2.wav
end
as in "unit voice itself (i.e. not battle commands or speeches)"?
If so, yes it's certainly the easiest and a very effective way to make a unit uniqe
Perhaps should add that too then, so people do not think they always have to do this grander process!
Because this is meant to be an 'overhaul' for a unit, made for those who want to change if not all so a majority of a units voice-sounds. Even if just those cathegories suggested in #5 (movements, attacks etc) there could be something between 25 - 50 new sounds to change depening on ambition and recording & soundfile assets.
Yes i meant that, basically entries that are unique only will require a new accent, while diverse entries like the unit_selection sound can be inserted in the same accent without creating a new one. That was my point.
Like for example the war horn sound is culture based iirc so for a unique new one one needs to give that faction a unique culture.
Good, mm, yes, get your point.
I made an aditional tutorial under the first on how to add selection-sounds to not confuse anybody and cover the field of interest
- In some cases also the accent is noted. This is mainly in case the unit uses another accent than the rest of the faction. This is not common but should be good to know in case you are editing a submod or merc's for instance. I have added it to show you how it can look just in case.
If it differs from what you saw in step 1 you should adapt to what you see here, in step 3.
Originally Posted by Ngugi
Thanks, glad it helped, and if anything could be improved or clarified feel welcome to flag it
Actually, there is one thing, which was not fully clear to me from the start.
If a unit has an extra accent added to its entry, the entry of this accent will be used as reference.
That means the exe had to find the unit's name in the respective accent sections.
For example, if you add an Arabic accent, the sound entry has to be placed inside the Arabic accent section, NOT in the one from the unit's faction.
Maybe you could point that out a bit more
The rest is perfectly fine and well explained!!
I made the tutorial because I had a tricky time myself when I learned how to do it hehe, yet one sometimes get blind to what's obvious and not once learned ^^