Thanks i tried it at the vanilla game and it worked. It did not work at the mod. Will reinstall it help?
Thanks i tried it at the vanilla game and it worked. It did not work at the mod. Will reinstall it help?
Did you delete the vanilla's or the mod's music .dat and music .idx?
Have you found the logs folder?
yes i did but the mod i want to change is not in the logs folder. I think it is better that I just Reinstall the mod
Last edited by roy1593; February 02, 2011 at 06:28 AM.
Does the mod have its own logs folder?
No. I am now reinstalling the mod. Maybe it helps
I reinstalld the mod and it works all fine now. Thanks for the help.
Sometimes that's what it takes. You're welcome.
Thank you very much! Till yet, I thought that it is only possible to make it culture specific. I try it and it works. =)
First off: This tutorial is great!
But I have a problem. I've created some custom music types, and I gave them a list of winter tracks. But even in winter they will only play summer tracks. The entries are exactly like in vanilla, except for the tracks given. Can someone help me?
The winter code "MUSIC_STRATMAP_WINTER" is broken, it doesn't works unfortunately.
A pitty
But thanks for the information.
That's because the M2TW parser either doesn't pick it up or overwrites the contents with that of the MUSIC_STRATMAP_SUMMER block. However, it still generates the binary structure needed to make things work, so presumably the engine will still play ball if only we fix the paths to the MP3's in the binary structure manually. (More advanced work such as actually changing the number of tracks require more understanding of the file format.)
So adventurous modders could do the following to fix their packs right now:
- Extract the event packs into an empty directory using XIDX. Use the -xeb flags to extract, events and append bin suffixes to the (generated) file names.
- Open the 4th last file (the file with the highest number before the .bin suffix). E.g. if your pack extracts to 1024 files you want the file which ends with _1020.bin. If it extracts to 997 files, you want _993.bin and so on.
- Find the sequence 05 00 00 00, followed by 01 00 00 00 00 01 00 00 00. This marks the end of the MUSIC_STRATMAP_WINTER block in the binary structure. The music files for this trigger/event are encoded between that and the previous sequence of 01 00 00 00 00 01 00 00 00. With careful editing you can fix the filenames manually.
- Save the file.
- Regenerate the event packs with XIDX (use the -ceb flags). Be careful to ensure that your filenames are fed in the proper order to the XIDX program, the numbers in their names indicate their order. You may want to create a text file first which lists them in the right order (one name per line), then do something like:
Code:type name_of_text_file | path/to/xidx.exe -ceb events- Move the new event packs in the mod & test. When you hit winter your custom winter tracks should now play.
FWIW here's what I (think to) know about this particular binary structure, excerpted from my notes about the structures in the event packs:
Spoiler Alert, click show to read:
Spoiler Alert, click show to read:
Is it possible to have music for a faction regardless of region? Like, I wanted to give the Byzantines some unique regardless of location, is that at all possible?
Yes. You create a dedicated music type, you bind your custom music to that music type and you bind the faction to that music type in your campaign map.
You'll need to edit data/descr_sounds_music.txt to do the first part, and data/world/maps/base/descr_sounds_music_types.txt for the second.
I am having a lot of problems with this because my mod is made from scratch so I really dont know what I am doing wrong or right.
I have some previous experience with descr_sounds_music
but everything goes to when I do the steps.
here is what I do and what happens basically.
so I use the extractor to extract music, SFX and voice. I check to see if all the files are extracted and sure enough my extracted files are the same size as my .dat files.
i do my little editing like adding new music in the folder, and thats that.
I do my editing in descr_sounds_music which I am 100% sure I am doing right and save the text file.
I boot the game and it crashes on start up. this is the game's first attempt to rebuild my sound files which fails. what happens is very interesting, my new menu music is there (hurray!) so I know I did that part right but my faction (campaign) music are vanilla and all my SFX stuff is gone!
I always hated dealing with sounds because I have to deal with this kind of hell. can anyone help me?
Do you have all 39 sound text files in your \mod\data folder?
Also, the default path for extracted .dat files is \mod\data\sounds\data\sounds\voice (or sfx or music &c.) and not \mod\data\sounds\voice(sfx, music, &c.) as it should be, hence you have to cut your sounds and place them in the right folder first before restarting the game to rebuild the .dat and .idx files.
ok so what you are saying is that when I extract my files they would be in
mod/data/sounds/data/sounds/music and SFX and Voice
well what you said is true, when I extracted my sounds files that is certainly where they went.
I followed your advice and removed my events, music and SFX idx and dat files.
I booted the game and crashed again, this time it is even worse all 6 files that I removed are now 1kb.
I previously moved my music, SFX and voice from data/sounds/data/sounds/*all 3 files* to data/sounds/*all 3 files*
this technique at least gave me the menu music...
regarding your comment about the text files, my mod is based on Teutonic campaign and so I downloaded and placed M2TW sound files first and then I placed Teutonic over those and replaced any conflicts if there were any.
here is where I got the sound files
http://www.twcenter.net/forums/showthread.php?t=74106
Sounds fine concerning the sound text files.
Concerning the folder structure, that should indeed be:
mod\data\sounds\Voice
mod\data\sounds\Sounds
mod\data\sounds\SFX
mod\data\sounds\Music
including their vanialla subfolder structure.
If you have all sound text files in your data folder and placed your extracted sounds in the corresponding folders the game rebuilds the .dat and .idx files if deleted. You can test this by using a bare mod folder put the unmodded sound text files into the data folder, extract the vanilla sounds into the bare mod\data\sounds &c. folders and start the bare mod, you will have the game create the vanilla .idx and .dat files in your bare mod\data\sounds folder.
According to my experience 1kb .dat and .idx files can result from wrong sound formats or any custom folder structure for sounds that differs from the vanilla structure while CTD's normally indicate typos in the text files, including space deletion of the last space ending the text files.