Page 16 of 16 FirstFirst ... 678910111213141516
Results 301 to 309 of 309

Thread: How To Add In Your Own Music To M2TW

  1. #301

    Default Re: Tutorial: How To Add In Your Own Music To M2TW

    I tried to do the mod foldered version with the vanilla beyond mod. I managed to add battle, tension and campaign music. But the mobilize music, which plays when you order a batallion to move, doesnt work. Worse than that, a very annoying high pitched sound keeps playing instead, like some sort of error happened. Why is it happening? Anyone else experienced the same thing?

  2. #302
    Gigantus's Avatar I am not going crazy - I am crazy. I just go normal every now and then.
    Patrician Citizen Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,404
    Blog Entries
    35

    Default Re: How To Add In Your Own Music To M2TW

    Try using a different sound clip to see if it might be caused by your replacement.
    Or restore the original section from a backup and then copy your entry over the existing entry instead of deleting and creating new lines.

    Shameless plug in: using my dev kit might make multiple testing less tedious.



  3. #303
    Live2sculpt's Avatar Senator
    Join Date
    Sep 2009
    Location
    MI, U.S.A.
    Posts
    1,146

    Default Re: How To Add In Your Own Music To M2TW

    Necro-posting.... These instructions seem simple. But I wonder if they're out of date.
    I've been following the instructions but getting mixed results.
    I was trying to replace the SS music with the old MTW music. I edited the descr_sounds_music.txt for the new files. Put the MP3's in the sounds/music folder etc.
    But deleting the SS events.dat and events.idx just resulted in almost complete silence. The only new sound that would express was the MTW main menu music. No UI sounds, voices, or other music played.
    If I try to execute without deleting the events files, everything goes back to normal, but no custom music plays, in spite of them being in the sounds/music folder.

    I considered going through this process from within the main game sound folder (JIC it was a glitch within SS setup) and then maybe copying the files over), BUT... my M2TW does NOT list ANY descr_sounds_ files in it's main data folder(?)

    Has M2TW been changed since this old guide was written, in such a way that complicates this proceedure?
    Can we still customize the M2TW music, or have the tools we used stopped working?
    Last edited by Live2sculpt; August 08, 2022 at 11:54 AM.

  4. #304
    Gigantus's Avatar I am not going crazy - I am crazy. I just go normal every now and then.
    Patrician Citizen Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,404
    Blog Entries
    35

    Default Re: How To Add In Your Own Music To M2TW

    You need to extract the music from Stainless Steel as well before generating new files.

    If you want to experiment a bit then try out my sound dev kit.It contains all the required descr_sound TXT files - these are not included in the pack files and need otherwise to be downloaded from here.
    Last edited by Gigantus; August 09, 2022 at 10:52 AM.



  5. #305
    Live2sculpt's Avatar Senator
    Join Date
    Sep 2009
    Location
    MI, U.S.A.
    Posts
    1,146

    Default Re: How To Add In Your Own Music To M2TW

    Quote Originally Posted by Gigantus View Post
    You need to extract the music from Stainless Steel as well before generating new files.
    Thanks.
    But I should extract the SS6.4.mp3's even if the ONLY mp3 references I typed into the descr_sounds_music.txt are the new MTW.mp3's that I put into the music folder?

    By the way, the SS6.4.mp3 files come already unpacked into the music folder. Also the SS6.4 music.dat and music.idx are both 1Kb. (??)

    I want to delete the SS6.4 music completely because I don't intend to use any of it. Does that not work?

    Does this not work if the only mp3 references I type into descr_sounds_music are the new MTW ones?

    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;; FRONTEND ;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




    state MUSIC_FRONTEND
    event
    folder data/sounds/music
    Frontend.mp3
    end




    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;





    ;;; BAttlE MAP


    state MUSIC_BATTLE_TENSION
    event
    folder data/sounds/music
    Euro_Tension_1.mp3
    Euro_Tension_2.mp3
    Euro_Tension_3.mp3
    end

    state MUSIC_BATTLE_MOBILIZE
    event
    folder data/sounds/music
    Euro_Mobilize_1.mp3
    Euro_Mobilize_2.mp3
    Euro_Mobilize_3.mp3
    end

    state MUSIC_BATTLE_BATTLE
    event
    folder data/sounds/music
    Euro_Battle_1.mp3
    Euro_Battle_2.mp3
    Euro_Battle_3.mp3
    end




    ;;; BATTLE MAP RESULT


    state MUSIC_RESULT_WIN_CLOSE
    event
    folder data/sounds/music
    Euro_Win_1.mp3
    end
    state MUSIC_RESULT_WIN_AVERAGE
    event
    folder data/sounds/music
    Euro_Win_1.mp3
    end
    state MUSIC_RESULT_WIN_CRUSHING
    event
    folder data/sounds/music
    Euro_Win_1.mp3
    end
    state MUSIC_RESULT_LOSE_CLOSE
    event
    folder data/sounds/music
    Euro_Lose_1.mp3
    end
    Last edited by Live2sculpt; August 10, 2022 at 08:21 AM.

  6. #306

    Default Re: How To Add In Your Own Music To M2TW

    hi all,

    just providing more insight as after one whole day of countless attempts, I've finally managed to make it work and to use my own custom musics in MTW Kingdoms (more precisely on a custom mod in the mods folder, which is a mix of Reforged/MOS/DAC/DCI/Heirs of Elendil... etc). So basically, the process is as initially described, but I will add more precisions and the key issues that I met and that you might be facing too:

    1/ Extract the musics in either in a custom folder or in data/sounds of your mod, ensure you have (a) xidx.exe and (b) extract_sounds.bat (text inside:row1 ".\xidx.exe -x music voice sfx" and row2 "pause"). Also you need music.dat and music.idx (your existing version). Double click on the bat file to extract them. You have then a data/sounds/music folder containing all the musics that were stored in the music.dat file.
    2/ Add your musics in the music folder (format: .mp3 and no space in their name, advice: use short names). You may start slowly, with one music at start until it works, only then you can go bigger with the changes.
    3/ Ensure in your data folder of your mod you have all the necessary sounds .txt files that were mentioned before, and most of all the descr_sounds_music.txt filewhich is of utmost importance.
    4/ This descr_sounds_music.txt must be cleared of any error. This file indicates all the musics used by the game per culture. Careful, if there is any error, the result of the whole process will be either a CTD or a game without sound. This is one of the issues I faced, when importing this file from another mod. The file contained multiple errors: musics not existing anymore, factions which are not cultures (e.G. goblins, isengard...).
    Advice 1: run the system.log file when you launch the game to detect errors, especially missing files (missing musics referenced in this txt file) or unknown type of the music_bank (i.e. a faction which is not a culture).
    Advice 2: you need to list all the cultures in this file, to ensure it is in a valid format. So if you have it from a mod for instance, I would advise to remove all the musics indicated (name.mp3) but to keep all the sections. E.g.
    state MUSIC_CAMPAIGN_LOADING event folder data/sounds/music/xxx end (there is no more music indcated between the location row and the following end row).
    Advice 3: keep only 1 entry used for testing, in frontend section, since this is the starting menu. You can then hear the music and know immediately if it works. Add this music to all the existinc cultures to ensure you are not missing it.
    5/ Rebuilding the music and events .dat and .idx files. This is a real pain since any error in the above txt file prevents the events.dat and events.idx from correctly rebuilding, leading to very small size files. Same for music, if there are errors then the process of rebuilding ends at the location of the error, hence the smaller size.
    So there, you have to work with the system.log to identify where the errors are.
    The process to rebuild these .dat .idx files is as follows: once your music is added in the music folder, position this music folder in the MODname/data/sounds folder. Then ensure both music.dat, music.idx and events.dat and events.idx are deleted (you have the initial back up kept in a separate folder just in case).

    One final word as I also faced this error: my game had no music in campaign and in battle, only inside the menus. This was because of the world/maps/base/descr_sounds_music_types.txt file. I restored the default mod file first (as I knew the mod played music) before making any change. Only then I could have a fresh start to mod properly the musics in the game.

    Hope this is clearer. If not, I think the last resort is then to provide a clean descr_sounds_music.txt file with the sounds/music folder containing only 1 music referenced in the file, so that you have a clean basis to start start adding one by one your custom musics that you can test on an ongoing basis...
    Best of luck to all of you.

  7. #307

    Default Re: How To Add In Your Own Music To M2TW

    Alternatively, if you stil lcan't manage to generate the events.dat and events.idx files (with a proper size/format), then only 2 solutions remain:
    1/ use the ones already working from your current game folder (or mod folder), extract the musics, then replace the musics by yours keeping the exact same name and tree (same subfolders). Position the music folder in your MOD/data/sounds folder and delete music.dat, music.idx but keep events.dat and events.idx. These 2 last files are fixed files you can't modify, and they will remain valid as long as the musics are identical i.e. same name, tree, no additional music or removed music. To be noted that this solution of music replacement also solves any error in the descr_sounds_music.txt file, since this txt file is superseded by the events.dat file when the game tries to find which music to play.
    2/ if this downgraded solution still fail, you have to use the music as background in a media layer and no sound in the game... as others usggested before.

  8. #308
    Live2sculpt's Avatar Senator
    Join Date
    Sep 2009
    Location
    MI, U.S.A.
    Posts
    1,146

    Default Re: How To Add In Your Own Music To M2TW

    One of the things that has me confused is that I’m also trying to use HaHawk’s Native Voices mod.
    in order for Native Voices to work in a mod, the dat and idx files in the mod must be placed in the vanilla sounds folder, while all the edited descr_sounds__.txt files are placed in the mods data folder.

    Huh? Why is that nessasary? How do these files even work? What does M2TW do when rebuilding the dat and idx? Are they comprised of files from both base game as well as the mod? If I want to preserve Native Voices in a rebuild, should I first unpack the HaHawk Native Voices mod dat and idx files into the vanilla game sounds folder? Do my mod folder Native Voices and MTW Music descr_sounds__.txt files need to include the mp3’s from the vanilla game files in order to work?

    I find it difficult to follow instructions about procedures without first understanding HOW the thing actually works.
    Last edited by Live2sculpt; August 10, 2022 at 06:36 PM.

  9. #309
    Live2sculpt's Avatar Senator
    Join Date
    Sep 2009
    Location
    MI, U.S.A.
    Posts
    1,146

    Default Re: How To Add In Your Own Music To M2TW

    Quote Originally Posted by Legendarium View Post
    Use the ones already working from your current game folder (or mod folder), extract the musics, then replace the musics by yours keeping the exact same name and tree (same subfolders). Position the music folder in your MOD/data/sounds folder and delete music.dat, music.idx but keep events.dat and events.idx.
    I was just about to do that yesterday when I realized the Stainless Steel 6.4 music format wasn't going to support my MTW music goal. Reason being I want the MTW music to play according to the seasons (I'm using a 12TPY script). BUT SS6.4 music doesn't have seasons. SS6.4 descr_sounds_music.txt uses the exact same mp3 playlist for BOTH Summer & Winter (Because original Stainless Steel is a 1TPY campaign mod).


    *EDIT* Well, I rewrote my SS6.4 descr_sounds_music.txt (again) carefully. Only entering MP3s that I've confirmed are in my mods/SS6.3/data/sounds/music folder.
    Still assuming emptying the music folder of all older MP3s shouldn't be a problem if they're not referenced anywhere in the descr_sounds_music.txt.

    It worked!

    I guess I was just sloppy last time and missed something. This time the sound files rebuilt correctly and the Native Voice mod is also left functioning correctly. Excellent!


    Incidentally, when modifying txt files such as descr_sounds_music.txt, I find WinMerge to be an invaluable tool.
    It displays the old and new documents side by side, lines them up by their simmilarities, and highlights any line/script differences for you to confirm or correct. Very helpful for finding scripting mistakes early on. A free tool --> https://winmerge.org/downloads/?lang=en
    Last edited by Live2sculpt; August 10, 2022 at 09:14 PM.

Posting Permissions

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