This tool originates from here
First of all I am not author of files included (they are common files but still for this .zip credits goes to masda70).
The .zip contain 2 files for little interface upgrade on your Warcraft III client. This allows you to hear music in MIDI supported maps and run MIDI supported maps without any MIDI related bugs. This does not effect other maps which is not using MIDI format music.
To apply this patch on your client;
First, Open the zip and run the registry file included.You can also do it manually if it doesn't work. To do it manually;
(Warning: Do not change any other value in Registry Editor unless you know what you are doing!)
In regedit go to the key
[HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III] and add a DWORD named "Allow Local Files" (if it is not there already) then set its value to 1.
Second, You must extract UI folder to your Warcraft III directory. (it's directory is included in .zip but to be exact MIDISounds.slk file has to be in "*YourWarcraftIIIDirectory/UI/SoundInfo")
If it does not work there can be several reasons;
- Make sure you put MIDISounds.slk in correct directory
- Make sure you have "Ambient Sounds" and "Music" turned on at your Warcraft III Options as the Jass code to run MIDI files need you to have both options enabled.
- Make sure the map you are testing is MIDI supported.
- Not tested with MAC so it might be reason.
- Make sure you have gm.dls (it is like a sound bank in your Operating System and required to read MIDI sounds) in directory "C:\WINDOWS\system32\drivers". If you have your OS installed at somewhere else you might need to change a value in the .slk file. Open the .slk file in notepad and search for the entry "C:\Windows\system32\drivers"
You have to change that address depending on where your OS is installed and depending what version of OS you have.
We want to have the file to point the place where "gm.dls" file is. So just change that address to the one where gm.dls is. Mine is "C:\WINDOWS\system32\drivers\gm.dls" so I put "C:\WINDOWS\system32\drivers"
If you want to use a different dls file just remember to change the file name two lines above the line reads up ' C;X4;K"gm.dls" '
For map makers who want to Implement MIDI musics in their maps;
after completing instructions above. You can import the MIDI files from Import manager of your World Editor (they will be in category "Other" and will not show up in Sound Editor).Go to the trigger editor and add a trigger called "Music" that runs at map initialization and then convert it to custom text (JASS) through the edit menu.
Under the actions function ("Trig_Music_Actions") and before "endfunction"
add the following :
call SetAmbientDaySound( "Roland" )
call SetAmbientNightSound( "Roland" )
Now you can add a line call PlayMusicBJ("yourmidifile.mid") after that and it will trigger the music in the game or you can also do
call PlayMusicBJ( "yourmidifile.mid;midi2.mid;midi3.mid....etc" ) if you have more midis. Also you can use SetMapMusicRandomBJ instead of PlayMusicBJ.
Now test your map. When the game starts you should be hearing MIDI music!
Please note that if your midi file is for example war3mapImported\midi.mid you have to type call PlayMusicBJ("war3mapImported\\midi.mid"), so basically you need to always add a new '\' next to any slash contained in the file location.
If you ask "Why use MIDI files instead .wav or .mp3?" because you can get fairly long musics with above avarage quality and file size around 15KB to 100KB. It is the ONLY perfect way to add music to maps.
Keywords:
MIDI, Sound, Music, Upgrade, UI