Results 1 to 4 of 4

Thread: Adding in-game music... can it be done?

  1. #1

    Default Adding in-game music... can it be done?

    I was wondering if I can add different music files into the game without having to go through the effort of downloading a mod or something. Can I just add in music files some place and have them play in battles. I just thought it would be cool to hear E.S. Posthumus' Pompeii or something instead of the same old stuff during a battle.

  2. #2

    Default Re: Adding in-game music... can it be done?

    It is possible. Just follow this guide.
    http://www.twcenter.net/forums/showthread.php?t=77905
    If you want to learn how to add music to your M2TW game, then you're in the right place. Follow the steps below and let me know if you have any problems.
    There are two methods on doing this, one is through the main data folder and the other is through your mod folder. The main data folder method follows next and you'll find the mod folder method at the bottom.


    MAIN DATA FOLDER METHOD

    For this method, you'll have to use the io.file first command. You can either create a new batch file with the "medieval2.exe --io.file_first" command or you can put:
    Quote:
    [io]
    file_first = true
    in your config file (medieval2.preference.cfg).

    For Vista users, you need to first follow these instructions by Spartan II before you do anything:


    Right click on the Medieval II - Total War folder (usually in C:/Program Files/SEGA) and go to properties, then the security tab, and click the big "edit" button. Then go to Administrators and check "full control." Then it will work. However, there will be a problem when you try to extract voice3.idx. It will say there was a problem with xidx.exe, and it will close. It says in the actual command prompt that it paused, or something. I still don't know why that happens with Vista, but for now, the music's fine.

    Step One: Download Vercingetorix's IDX extractor. Extract it to a folder of your choosing and take extract_sounds.bat and the xidx.exe and place it in your data/sounds folder. Run extract_sounds.bat and let it do its thing. Once that's done, there will be an extra data/sounds folder in your M2TW data/sounds folder. Go in there and grab the music folder and place it inside your M2TW data/sounds folder and delete the extra data folder.


    Step Two: In your data/sounds folder, first backup your events.dat, event.idx, Music.dat, and Music.idx files in case you screw up. You can just move those files to a new folder, located inside your sounds folder for easy access, called for example, MyMusicBackup or whatever. However you choose to backup those files, be sure that they are not in the data/sounds folder because it's crucial that the game rebuilds those files with your changes at the end.


    Step Three: Place all your custom music files inside the music folder and be sure that they are all in mp3 format and if there are any spaces in the titles of your custom music tracks, replace the spaces with _ (ex. new_music).


    Step Four: Download CA's sound text files in post #9 below and place them all in your data folder. Find descr_sounds_music.txt and right click it. Click properties and uncheck Read-only.

    Step Five: Now access your descr_sounds_music.txt file and add in your custom music titles with .mp3 at the end of them. For example, I want to add in four custom music tracks to the English faction: new_music1.mp3, new_music2.mp3, new_music3.mp3, and new_music4.mp3. I'll go in descr_sounds_music.txt and scroll down to the "NORTHERN, EASTERN & WESTERN EUROPEAN MUSIC" CAMPMAP section and add the new tracks as follows:

    Code:

    ;;; CAMPMAP



    state MUSIC_STRATMAP_SUMMER
    event delay 5
    folder data/sounds/music
    (Euro_Strat_Map_1)_Field_Of_Blood_01.mp3
    (Euro_Strat_Map_1)_Field_Of_Blood_02.mp3
    (Euro_Strat_Map_1)_Field_Of_Blood_03.mp3
    (Euro_Strat_Map_1)_Field_Of_Blood_04.mp3
    (Euro_Strat_Map_2)_Grey_Meadow_01.mp3
    (Euro_Strat_Map_2)_Grey_Meadow_02.mp3
    (Euro_Strat_Map_3)_Lilly_01.mp3
    (Euro_Strat_Map_3)_Lilly_02.mp3
    (Euro_Strat_Map_4)_Peter_The_Piper.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_01.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_02.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_03.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_04.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_05.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_06.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_07.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_08.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_09.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_10.mp3
    (Euro_Strat_Map_5)_Devil's_Harp_11.mp3
    new_music1.mp3
    new_music2.mp3
    end


    For the battle map music, you'll have to scroll up until you see the BAttlE MAP section. When adding your tracks in for the various battle map sub-sections, this is how it should look:


    Code:

    ;;; BAttlE MAP


    state MUSIC_BATTLE_TENSION
    event
    folder data/sounds/music
    (Euro_Tension_1)_BladeGrass.mp3
    (Euro_Tension_2)_Call_Of_The_Sheep.mp3
    (Euro_Tension_3)_Fear_Frozen.mp3
    new_music1.mp3
    end

    state MUSIC_BATTLE_MOBILIZE
    event
    folder data/sounds/music
    (Euro_Mobilize_1)_Sister_Davul.mp3
    (Euro_Mobilize_3)_This_is_it.mp3
    Euro_Mobilize_1.mp3
    Euro_Mobilize_2.mp3
    new_music2.mp3
    end

    state MUSIC_BATTLE_BATTLE
    event
    folder data/sounds/music
    (Euro_Battle_1)_Duke_of_Death.mp3
    (Euro_Battle_3)_Crusaders.mp3
    Euro_Battle_1.mp3
    Euro_Battle_2.mp3
    new_music3.mp3
    end


    Step Six: Last but not least, run the game and it'll rebuild the events.dat, event.idx, Music.dat, and Music.idx files with your changes once the splash screen comes up. It should only take a few seconds unless you've added a bunch a music tracks. That's it, you're done. Again, let me know if you encounter any problems.



    MOD FOLDER METHOD

    (For this method, you'll will not need the io.file first command.)


    Step One: Put all the sound text files in your mod/data folder (mod standing for whatever mod you're using like for example, broken_crescent\data).

    Step Two: Put the music folder, with all the music tracks inside, in your mod/data/sounds folder.

    Step Three: Delete events.dat and events.idx in the sounds folder

    Step Four: Make the necessary text edits in the descr_sounds_music.txt file and save it.

    Step Five: Start the game up and it'll rebuild the event files. After that, you're ready to go.
    Last edited by Antissa; August 08, 2008 at 12:24 AM.

  3. #3

    Default Re: Adding in-game music... can it be done?

    Thank you very much

  4. #4
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: Adding in-game music... can it be done?

    Moved to the Sounds and other Media forum.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

Posting Permissions

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