This tutorial should explain the basics.
This tutorial should explain the basics.
I know Trajan's guide, ~2 years ago I started using this way of adding music but his tutorial is different, for faction regions and you only work with one file. I want music for each faction separately. It doesn't help to understand tutorial from this thread.
I'd like to add music for each separate faction but for whole faction not only for that faction regions. I mean if I play as England, I want to hear England tracks even outside their own lands. In every battle regardless of region. Same with other factions. I don't want to hear eg France music in France regions when playing as England or Scottish music when fighting with them on their lands. I want to hear only my own faction music, faction that I choose to play. It works by using Trajan's totorial but it's only for group of factions when I want unique music for each. Is it possible?
Let me see if I get it together for you:
step 1
Defining Music_Types
Go into the file called descr_sounds as shown here and add all your music_types (I named it 'testmusic':
step 2Code:; List of used music types music_types_enum northern_european eastern_european southern_european middle_eastern mesoamerican testmusic
Defining Music_Type for each faction
Now you have defined your music_types go to world folder, then go to maps, then base, there you will see descr_sounds_music_types. Go into that and edit the file how I have done so here (used region list from my Bare Geomod installation).
The region setting apparently over writes the faction setting, so in your case I would remove all region entries, else you will hear other music specified in other section's region list when being active over that region or fighting battles there.Code:music_type testmusic regions Inverness_Province Oslo_Province Stockholm_Province Helsinki_Province Arhus_Province regions Edinburgh_Province Dublin_Province York_Province Caernarvon_Province Nottingham_Province regions Stettin_Province Hamburg_Province Antwerp_Province Magdeburg_Province London_Province regions Bruges_Province Frankfurt_Province Metz_Province Caen_Province Prague_Province regions Rheims_Province Rennes_Province Nuremburg_Province Paris_Province Hohenstauffen_Province regions Angers_Province Vienna_Province Dijon_Province Bern_Province Innsbruck_Province regions Bordeaux_Province Toulouse_Province Marseille_Province factions england
step3
Adding the Music_Types to your descr_sounds_music folder
Last of all you need to add all your new music_types to your descr_sounds_music folder. Simply copy and paste the whole music_type series of code below for each custom music_type:
I guess you know how to replace individual music pieces (see custom entry in first entry of CampMap section) and where to put that new music piece? And that you have then to delete the IDX\DAT file to generate a new set?Code:music_type testmusic ;;; BATTLE MAP state MUSIC_BATTLE_TENSION event folder data/sounds/music (Arabic_Tension_1)_Kebabka.mp3 (Arabic_Tension_2)_Starsand.mp3 end state MUSIC_BATTLE_MOBILIZE event folder data/sounds/music (Arabic_Mobilize_1)_High_Winds.mp3 end state MUSIC_BATTLE_BATTLE event folder data/sounds/music (Arabic_Battle_1)_Crack_your_head_with_a_Tabla.mp3 (Arabic_Battle_2)_Wind_Cuts.mp3 end ;;;; BATTLE MAP RESULT state MUSIC_RESULT_WIN_CLOSE event folder data/sounds/music (Arabic_Win_1)_Balalip.mp3 end state MUSIC_RESULT_WIN_AVERAGE event folder data/sounds/music (Arabic_Win_1)_Balalip.mp3 end state MUSIC_RESULT_WIN_CRUSHING event folder data/sounds/music (Arabic_Win_1)_Balalip.mp3 end state MUSIC_RESULT_LOSE_CLOSE event folder data/sounds/music (Arabic_Lose_1)_Fly_Away.mp3 end state MUSIC_RESULT_LOSE_AVERAGE event folder data/sounds/music (Arabic_Lose_1)_Fly_Away.mp3 end state MUSIC_RESULT_LOSE_CRUSHING event folder data/sounds/music (Arabic_Lose_1)_Fly_Away.mp3 end state MUSIC_RESULT_DRAW event folder data/sounds/music (Arabic_Lose_1)_Fly_Away.mp3 end ;;; CAMPMAP state MUSIC_STRATMAP_SUMMER event delay 5 folder data/sounds/music NEWSONG.mp3 end state MUSIC_CAMPAIGN_LOADING event folder data/sounds/music (Frontend_1)_Amen.mp3 (Euro_Loading_1)_Time_and_Again.mp3 (Euro_Loading_2)_The_Widow.mp3 end state MUSIC_PREBATTLE_SCROLL event folder data/sounds/music (Arabic_Camp_Battle_1)_Honour_Of_Sultan.mp3 end state MUSIC_RESULT_STRAT_WIN_CLOSE event folder data/sounds/music (Arabic_Win_1)_Balalip.mp3 end state MUSIC_RESULT_STRAT_WIN_AVERAGE event folder data/sounds/music (Arabic_Win_1)_Balalip.mp3 end state MUSIC_RESULT_STRAT_WIN_CRUSHING event folder data/sounds/music (Arabic_Win_1)_Balalip.mp3 end state MUSIC_RESULT_STRAT_LOSE_CLOSE event folder data/sounds/music end state MUSIC_RESULT_STRAT_LOSE_AVERAGE event folder data/sounds/music end state MUSIC_RESULT_STRAT_LOSE_CRUSHING event folder data/sounds/music end state MUSIC_RESULT_STRAT_DRAW event folder data/sounds/music end ;;; CAMPAIGN RESULT state MUSIC_CAMPAIGN_VICTORY event looped folder data/sounds/music end state MUSIC_CAMPAIGN_DEFEAT event looped folder data/sounds/music end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Wow, now I should manage thanks a lot I know about deleting idx/dat but I don't understand what you mean withYou're saying about pasting .mp3 into music folder and editing descr_sounds_music file?I guess you know how to replace individual music pieces (see custom entry in first entry of CampMap section) and where to put that new music piece?
Hey, last question. Do I have to remove other entries in other places that are associated with faction or region/music type I have changed? Let's say Denmark is north-european. I added new music type "norths" assigned Denmark to it and their own music etc how you said in your tutorial post above, but there are still some files where Denmark is assigned to north-european or their regions. E.g in descr_sound_music I have to put:
but there is also:Code:music_type norths ;;; BATTLE MAP state MUSIC_BATTLE_TENSION event folder data/sounds/music (Arabic_Tension_1)_Kebabka.mp3 (Arabic_Tension_2)_Starsand.mp3
But in descr_sound_music_types there isCode:NORTHERN MUSIC music_type northern_european state MUSIC_FRONTEND event folder data/sounds/music (Frontend).mp3 end ;;; BAttlE MAP state MUSIC_BATTLE_TENSION event folder data/sounds/music (Arabic_Tension_1)_Kebabka.mp3
along withCode:music_type norths factions denmark
Code:music_type northern_european regions Visby_Province Roskilde_Province Lund_Province.... factions denmark...
Just an example. So do I have to remove other original entries too or just do what is in tutorial and the rest of entries will not interfere or overwrite music in game?
Great, thanks for quick reply. So I'll report when I'm done if it works without problems
i got 21 music types added , and i got CTD in camping map ...i don't know what a problem ,but when i back up events.dat and idx CTD gone... and i can see it getting worst when i add new music type ...and when i got 21 game just crushed in first load camping music,all mp3 files is fine ,looks like it overload may be in descr_sounds_music.txt
HELP!!!
i had different mp3 kbps like 320kbps, 128kbps, 141kbps, 179kbps, 96kbps... may be it is problem?
I don't think the kbps should cause a problem but I can't confirm. There might be a limit to music types or you made a simple spelling mistake. Add them one at a time and test. Not a good idea anyhow to make bulk changes, makes it difficult to narrow down error causes.
Which text editor do you use?
Yes u right , the problem was my metodth, i use to work ,with sound files...i use sound files from the folder without creating Music.dat and idx ,and use dead ones with 1KB so the game use files from the music folder ....it was work , till i got too much music files ...and the game got the CTD ...now i know - creating new Music.dat and idx files it only right way
Hey Gigantus,
I finally found time to try your music method and did everything as you listed above in post #85 but i have some issues. I can only hear my own music while on campaign map and pre battle/win/lose/draw panel. I can't hear my music while on battle map.
If i remove all regions in descr_sounds_music_types i can't hear my own music in battle map.
If i add all regions to only my faction and remove all from the rest, i hear my own music during the battle but even if i play as any other faction. So it assign my music to all factions in the game ;/
If i add all regions to all factions then i hear everything in everywhere.
I can't make it work no matter how i try ;(
I hope you can help me somehow.
Edit: Like if you go back to first page, author of this guide said: "The regions define the music_type played in the battle map so here if you are Norwegian but fighting in the province called Aberffraw_Province you will hear the battle music defined in the England Music_Type" And this is exactly what i wan't to change because i want to hear faction music i already play.
Last edited by revar; September 25, 2017 at 04:05 PM.
You are trying to change a hard coded mechanic I am afraid: "The regions define the music_type played in the battle map"
The music in battle is defined by the region's entry in descr_sound_music_types, the default (if there are no region entries) will be your faction entry. Once you remove the faction as well I assume it will be the very first music_type listed in the relevant sound text file.
Then why they put factions there in descr_sound_music_types if regions overwrites the faction settings anyway? This is so stupid, why i can't just make England music play for England on all regions, Norway music play for Norway on all regions and so on with every single faction.
1. If i keep regions for each and don't remove them, playing as England i hear Norway music on their lands which is what i don't want.
2. If i remove all regions and leave only music_type and factions, the game use default music or as you said very first music_type in txt file.
3. If i remove all regions except for England i can hear my music but if i choose to play other faction i hear England music too which is what i don't want too.
It's bad either way :|
Last edited by revar; September 26, 2017 at 04:24 PM.
Sorry, guys, do you know if there is size or lenght limitations for music files?