Results 81 to 82 of 82

Thread: How to create a new accent

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default How to create a new accent

    In this tutorial we'll create a new accent for a faction of a modfoldered mod step by step.
    The total conversion Third Age:Total War will be used as an example of how to create the accent, but if you follow this tutorial you should be capable of doing it for every other mod as well.
    As for a possible hardcoded limit of accents, till now I've reached none, therefore it seems to be possible to create an unique accent for every faction of a mod up to the hardcoded limit of 31 factions and furthermore for every character in the game, if one has enough patience to do so.
    Sidenotes:

    If you're not using WinXP but vista x32/x64 or Win7 x32/x64 the first step before you start to mod is to follow this great tutorial by SigniferOne to ensure that you circumvent the UAC (user account control) and thus avoid any interference of it.
    Always do a backup of whatever file you might change or replace.
    Never delete anything that does no harm!
    multilanguage compatibility:

    If you want to have the voices of your mod compatible to every MIIK localization, do not include the extracted Medieval II or Medieval II Kingdoms vanilla .idx files into your modname\data\sounds\Voice folder!
    The game will automatically play the vanilla files according to every localization!
    That is, of course, only if they are used at all in your mod.

    Prerequisites and how to use them: Like to any other soundediting, you will have to download the .idx extractor created by Vercingetorix and the officially released Medieval II soundfiles.
    For special purposes like adding an existing accent of the americas, british_isles, crusades or teutonic campaigns to your mod, you've to download the officialy released Kingdoms soundfiles
    Take note that even if you're modding for MIIK, you don't need the MIIK soundfiles as long as you don't intend to use accents of the MIIK campaigns.
    When you've downloaded the MII soundfiles extract all of them into your modname\data\ folder without the permission to overwrite files.
    Using the .idx extractor:
    When you've downloaded the .idx extractor, you've to extract it and place all the files into your modname\data\sounds folder, in our case the Third_Age\data\sounds folder.
    Most of the options explained in the readme.txt are of no particular concern of yours, but it's worth to have a look at it nevertheless.
    To add new voices to your accent, you've to extract the Voice.idx of your mod (Third_Age\data\sounds\Voice.idx)
    Select the extract_sounds.bat and open it with any given texteditor. Change it in order that it looks like this:
    Code:
    .\xidx.exe -x Voice
    pause
    Save your changes and doubleclick the extract_sounds.bat. The voices will now be extracted into your modname\data\sounds\data\sounds\Voice (Third_Age\data\sounds\data\sounds\Voice) folder.
    After the extracting process is done, cut the Voice folder and paste it into your mod\data\sounds folder in order that it looks like this: modname\data\sounds\Voice (Third_Age\data\sounds\Voice).
    Delete the modname\data\sounds\data folder.
    Since we only want to add a new accent and thus only need the Voice.idx extracted, we're done with the .idx extractor.

    coding: Now comes the fun part, the coding .
    To add a new accent you've to edit the following files:
    • descr_sounds_accents.txt - in this file the accent is defined and the faction(s) get assigned to the accent
    • descr_sounds_units_confirm.txt - in this file the accent gets assigned to unit groups
    • export_descr_sounds_prebattle.txt - in this file all prebattle voices, such as battle speaches, are assigned
    • export_descr_sounds_soldier_voice.txt - in this file all the individual voices of the soldiers, such as yells, grunts, moans &c., are assigned
    • export_descr_sounds_stratmap_voice.txt - in this file all strat map voices, such as selection, movement, diplomacy &c., are assigned
    • export_descr_sounds_units_battle_events.txt - in this file all battle map voices of the narrator are assigned
    • export_descr_sounds_units_voice.txt - in this file all the battle map voices of the units are assigned
    • diplomacy.txt - in this file you've to place the text you want to have displayed when the sound is played
    • diplomacy_speech.txt - see above

    In our example we will now add a new accent for the faction egypt. Since egypt represents the High-elves in Third Age, we will name the accent Quenya, but you can basically name the accent to whatever your liking may be. Take note that some of the original sound files have a last blank line, leave this line alone!
    descr_sounds_accents.txt: We add the new accent at the bottom of the file and assign the faction egypt to it. Don't forget to remove the faction egypt from the former accent!
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;
    
    accent English
        factions turks, scotland, sicily, milan, normans, saxons, teutonic_order, slave
    
    accent Scottish
        factions moors
    
    accent French
        factions
    
    accent German
        factions england, hre, france, papal_states
    
    accent Mediterranean
        factions byzantium, portugal
    
    accent East_European
        factions russia, poland, hungary, denmark
    
    accent Arabic
        factions spain, venice
    
    accent Mongolian
        factions timurids, aztecs
    
    accent Quenya ;<<<<<<< new accent
    	factions egypt

    descr_sounds_units_confirm.txt: We further need to add the accent to the accent line:
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; Units group confirm bank
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    DEFAULT: 3d mindist 16 priority 170 fadein 0 fadeout 0
    DEFAULT: minpitch .8 maxpitch 1.1 volume -15 probability 1
    DEFAULT: distancepriority -1 randomdelay .3  effect_level .6 rndvolume -15 
    
    BANK: unit_confirm
    
       	
    			
    ; Mediterranean, English, Scottish, German, French, East_European, Arabic, Mongolian				
    			
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ROMAN   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    	accent Mediterranean, English, Scottish, German, French, East_European, Arabic, Mongolian, Quenya ;<<<<<<<<<< new accent
    		class General, Heavy
     			event lod 5 minpitch .8 maxpitch 1.0
     			  folder data/sounds/voice/human/generic
     			  Infantry_Group_Confirm_Small_01
     			  Infantry_Group_Confirm_Small_02
     			  Infantry_Group_Confirm_Small_03
     			end
     			
     			event lod 10 minpitch .8 maxpitch 1.0
     			  folder data/sounds/voice/human/generic
     			  Infantry_Group_Confirm_medium_01
     			  Infantry_Group_Confirm_medium_02
     			  Infantry_Group_Confirm_medium_03
     			end
    			
    			event lod 30 minpitch .8 maxpitch 1.0 
    			  folder data/sounds/voice/human/generic
    			  Infantry_Group_Confirm_Large_01
    			  Infantry_Group_Confirm_Large_02
    			  Infantry_Group_Confirm_Large_03
    			  Infantry_Group_Confirm_Large_04
    			  Infantry_Group_Confirm_Large_05
    			  Infantry_Group_Confirm_Large_06
    			  		  
    			  
    			end
    
    
    				
    		class Light
     			event lod 5 minpitch .9 maxpitch 1.05
     			  folder data/sounds/voice/human/generic
     			  Infantry_Group_Confirm_Small_01
     			  Infantry_Group_Confirm_Small_02
     			  Infantry_Group_Confirm_Small_03
     			end
     			
     			event lod 10 minpitch .9 maxpitch 1.05
     			  folder data/sounds/voice/human/generic
     			  Infantry_Group_Confirm_medium_01
     			  Infantry_Group_Confirm_medium_02
     			  Infantry_Group_Confirm_medium_03
     			end
    			
    			event lod 30 minpitch .9 maxpitch 1.05
    			  folder data/sounds/voice/human/generic
    			  Infantry_Group_Confirm_Large_01
    			  Infantry_Group_Confirm_Large_02
    			  Infantry_Group_Confirm_Large_03
    			  Infantry_Group_Confirm_Large_04
    			  Infantry_Group_Confirm_Large_05
    			  Infantry_Group_Confirm_Large_06
    			end


    Now you've to reflect which existing accent may fit your faction best concerning the generic voices such as moans, yells &c.. In this case the english accent, the one egypt was originaly assigned to, fits best.
    When you've decided which original accent you prefer, work yourself through the remaining files and copy the entire section of the original accent. Paste it to the end of the file, but not in the last blank line.
    Rename the accent line in order that it fits the name of your newly created accent.
    Be careful with all changes of the code!
    Always keep the given layout and never change a directory of the soundfiles, but place the soundfiles you want to add into the correct folder.
    Here are the examples of how the beginning and the end of the accents should look like.

    export_descr_sounds_repbattle: The beginning of the section:
    Code:
    		 accent Quenya
                      element VNV_OPENING
                               VnV  
                               trait BadCommander
                                        event
                                                 folder data/sounds/Voice/Human/Localized/Pre_Battle_Speech
                                                      xEnglish_Intro_1_1.mp3
                                                      xEnglish_Intro_1_2.mp3
                                                      xEnglish_Intro_1_3.mp3
                                        end
                               VnV  
                               trait BadDisciplinarian
                                        event
                                                 folder data/sounds/Voice/Human/Localized/Pre_Battle_Speech
                                                      xEnglish_Intro_2_1.mp3
                                        end
    The end of the section:
    Code:
                               VnV  
                               pri 9
                                        event
                                                 folder data/sounds/Voice/Human/Generic
                                                      Cheer01.mp3
                                        end
                               VnV  
                               pri 9
                                        event
                                                 folder data/sounds/Voice/Human/Generic
                                                      Cheer02.mp3
                                        end
                               VnV  
                               pri 9
                                        event
                                                 folder data/sounds/Voice/Human/Generic
                                                      Cheer01.mp3
                                        end
                               VnV  
                               pri 9
                                        event
                                                 folder data/sounds/Voice/Human/Generic
                                                      Cheer02.mp3
                                        end

    export_descr_sounds_soldier_voice.txt: The beginning of the section:
    Code:
    		 accent Quenya
                      class General
                               vocal Individual_Attack_Grunt
                                        event mindist 0.75 priority 120 volume -20 probability .4
                                                 folder data/sounds/Voice/Human/Localized/Battle_Map
                                                      English_General_Individual_Attack_Grunt_1.wav
                                                      English_General_Individual_Attack_Grunt_2.wav
                                                      English_General_Individual_Attack_Grunt_3.wav
                                                 folder data/sounds/Voice/Human/Generic
    The end of the section:
    Code:
                               vocal Individual_Battle_Scream
                                        event mindist 2 volume -10 probability .2 priority 100 probradius 10
                                                 folder data/sounds/Voice/Human/Localized/Battle_Map
                                                      English_Light_Battle_Scream_01.wav
                                                      English_Light_Battle_Scream_02.wav
                                                      English_Light_Battle_Scream_03.wav
                                                      English_Light_Battle_Scream_04.wav
                                                      English_Light_Battle_Scream_05.wav
                                                      English_Light_Battle_Scream_06.wav
                                                      English_Light_Battle_Scream_07.wav
                                                      English_Light_Battle_Scream_08.wav
                                                      English_Light_Battle_Scream_10.wav
                                                      English_Light_Battle_Scream_11.wav
                                                      English_Light_Battle_Scream_12.wav
                                                      English_Light_Battle_Scream_13.wav
                                                      English_Light_Battle_Scream_14.wav
                                                      English_Light_Battle_Scream_15.wav
                                                      English_Light_Battle_Scream_16.wav
                                                      English_Light_Battle_Scream_17.wav
                                                      English_Light_Battle_Scream_20.wav
                                                      English_Light_Battle_Scream_21.wav
                                                      English_Light_Battle_Scream_23.wav
                                                      English_Light_Battle_Scream_24.wav
                                                      English_Light_Battle_Scream_25.wav
                                                      English_Light_Battle_Scream_26.wav
                                                      English_Light_Battle_Scream_27.wav
                                                      English_Light_Battle_Scream_28.wav
                                                      English_Light_Battle_Scream_29.wav
                                                      English_Light_Battle_Scream_30.wav
                                                      English_Light_Battle_Scream_31.wav
                                                      English_Light_Battle_Scream_32.wav
                                                      English_Light_Battle_Scream_33.wav
                                                      English_Light_Battle_Scream_34.wav
                                                      English_Light_Battle_Scream_35.wav
                                                      English_Light_Battle_Scream_36.wav
                                                      English_Light_Battle_Scream_39.wav
                                                      English_Light_Battle_Scream_40.wav
                                                      English_Light_Battle_Scream_41.wav
                                                      English_Light_Battle_Scream_43.wav
                                                      English_Light_Battle_Scream_44.wav
                                        end

    export_descr_sounds_stratmap_voice.txt: The beginning of the section:
    Code:
             accent Quenya
                      type Admiral
                               vocal Attacked_Enemy
                                        event
                                                 folder data/sounds/Voice/Human/Localized/Camp_Map
                                                      xEnglish_Admiral_Attacked_Enemy_1.mp3
                                                      xEnglish_Admiral_Attacked_Enemy_2.mp3
                                                      xEnglish_Admiral_Attacked_Enemy_3.mp3
                                        end
                               vocal Attacking
                                        event
                                                 folder data/sounds/Voice/Human/Localized/Camp_Map
                                                      HE_Attack_Enemy01.mp3
    												  HE_Attack_Enemy02.mp3
                                        end
    The end of the section:
    Code:
                      type Witch
                               vocal Death_Cry
                                        event delay 0
                                                 folder data/sounds/Voice/Human/Localized/Camp_Map
                                                      English_Witch_Death_Cry_1.mp3
                                                      English_Witch_Death_Cry_2.mp3
                                                      English_Witch_Death_Cry_3.mp3
                                        end
                               vocal Select_Enemy
                                        event
                                                 folder data/sounds/Voice/Human/Localized/Camp_Map
                                                      English_Witch_Select_Neutral_1.mp3
                                                      English_Witch_Select_Neutral_2.mp3
                                                      English_Witch_Select_Neutral_3.mp3
                                        end

    export_descr_sounds_units_battle_events.txt: The beginning of the section:
    Code:
             accent Quenya
                      notification Allied_Army_Leader_Killed 1
                               event
                                        folder data/sounds/Voice/Human/Localized/Battle_Events
                                        xEnglish_Allied_Army_Leader_Killed_1.mp3
                               end
                      notification Allied_Army_Leader_Killed 2
                               event
                                        folder data/sounds/Voice/Human/Localized/Battle_Events
                                        xEnglish_Allied_Army_Leader_Killed_2.mp3
                               end
    The end of the section:
    Code:
                      notification Player_Engine_Unmanned 1
                               event
                                        folder data/sounds/Voice/Human/Localized/Battle_Events
                                        xEnglish_Player_Engine_Unmanned_1.mp3
                               end
                      notification Player_Engine_Unmanned 2
                               event
                                        folder data/sounds/Voice/Human/Localized/Battle_Events
                                        xEnglish_Player_Engine_Unmanned_2.mp3
                               end

    export_descr_sounds_units_voice.txt: The beginning of the section:
    Code:
    		 accent Quenya
                      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
                               vocal Group_Disbanded
                                        event 
                                                 folder data/sounds/Voice/Human/Localized/Battle_Map
                                                      English_General_Group_Disbanded_1.wav
                                                      English_General_Group_Disbanded_2.wav
                                        end
    The end of the section:
    Code:
                               vocal Unit_State_Phalanx_Off confirm
                                        event 
                                                 folder data/sounds/Voice/Human/Localized/Battle_Map
                                                      English_Light_Unit_State_Phalanx_Off_1.wav
                                                      English_Light_Unit_State_Phalanx_Off_2.wav
                                        end
                               vocal Unit_Under_Attack
                                        event 
                                                 folder data/sounds/Voice/Human/Localized/Battle_Map
                                                      English_Light_Unit_Under_Attack_1.wav
                                                      English_Light_Unit_Under_Attack_2.wav
                                        end

    diplomacy.txt The beginning of the section:
    Code:
    {DRT_QUENYA_ACCEPT_BRIBE}*any given text you like*
    {DRT_QUENYA_ACCEPT_BUY_VOTE}*any given text you like*
    {DRT_QUENYA_ACCEPT_COUNTER}*any given text you like*
    The end of the section:
    Code:
    {DRT_QUENYA_SELL_VOTE}*any given text you like*
    {DRT_QUENYA_THREAT}*any given text you like*
    {DRT_QUENYA_TRADE}*any given text you like*

    diplomacy_speech.txt The beginning of the section:
    Code:
    {xQuenya_Diplomat_Intro_Demeanour_Neutral_1}
    *any given text you like*
    
    {Quenya_Diplomat_Intro_Demeanour_Neutral_2}
    *any given text you like*
    The end of the section:
    Code:
    {xQuenya_Princess_Offer_Countered_Open_Positive_2}
    *any given text you like*
    
    {Quenya_Princess_Offer_Countered_Open_Positive_3}
    *any given text you like*
    Take note that the Syntax in the diplomacy_speech.txt is like follows:
    Code:
    {Name_of_the_soundfile_used_in_export_descr_sounds_stratmap_voice.txt_without.mp3}

    That's basically all you need to do to add a new accent to the game. But till now our new accent is nothing else than a copy of the preexisting english accent.

    recording: Now we're going to add newly recorded voices to our accent.
    Of course, you have to record your voices first.
    I recommend to always record in .mp3 format first regardless whether you might want to add strat map or battle map voices.
    Take note that CA most of the times, but not always, uses a simple "x" to distinguish .wav (battle map) from .mp3 (strat map) voices (x_name.mp3 vs. name.wav) as a starter for the filename.
    The final format of the voices in order that they are heared ingame must be:
    • strat map voices MUST be .mp3 format!
    • battle map voices MUST be .wav format 352kbit/s and MUST be recorded or converted in 16bit mono 22.050 Hz!

    I suggest to use a mp3 to wav converter, which are freeware and can be found in the net, to convert your original recording to wav and to level your voices on the one hand, to get rid of possible background noises on the other hand.

    When you've finished your recording, you have to place the files in the right directory. The directory it needs to be placed in can be found in the code of the sound files (see above).

    Now that you've recorded your voices, made sure they are in the correct format and palced them in the corresponding directories, it's about time to code them into the corresponding files.

    If all the coding and recording is done, you should backup your Voice.idx and Voice.dat as well as your events.idx and events.dat.
    Delete the Voice.idx, Voice.dat, events.idx and events.dat and start your game.
    The game will now recreate those files. While the spalsh screen is up, hit the escape button twice.
    When your loading screen pops up you should here a short sound, if you can here it, that's an idicator that the files have been successfully recreated and that no further problems should arise.

    Basically, we're done now

    Enjoy modding
    Last edited by Aikanár; July 23, 2012 at 01:49 PM. Reason: Updated - added diplomacy section


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •