Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: SajeOne on November 20, 2012, 04:18:18 pm
Title: [User Tutorial] Adding a Random Music Player
Post by: SajeOne on November 20, 2012, 04:18:18 pm
Hello guys, today I am going to show you how to add a random music player that I have created to your map. This music player is nice because it will always play a variety of songs and you dont have people spamming the same song over and over. Also this music player allows you to add as many songs as you want, There is no limit.
Step 3) Once open hit "CTRL + A" and go to "Tracks>Stereo Track to Mono" (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi48.tinypic.com%2F2ue4tpw.png&hash=a05cba332a38f6020641a43a60a120efe0979f9d)
Step 4) Go to "File>Export..." and pick a name to save your file as(Just remember it cannot contain spaces). Once you have named your file, save the file type as "Other uncompressed files" and hit the "Options..." button. a window will pop up containing two drop downs, set header to "WAV(Microsoft)" and encoding to "Unsigned 8 bit PCM" (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi47.tinypic.com%2F2woi368.png&hash=12347abed2c0ef56f84912083a7382da714f7034)
Step 5) Once that is done hit save and a window should prompt you with different tags and values needing your OK to continue, before you do make sure there are no entries in the values section. If there are entries there you can hit "Clear" to delete them. After you do that you can hit ok. (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi47.tinypic.com%2F14dltnd.png&hash=74107cb6ca1d967963b09f4e74498829d851b613)
Step 6) Once saved move this file to your "COD5Root\Sound_Assets\Raw\sound"
Step 7) Go to "COD5Root\raw\soundaliases" and open "random_song_alias.csv" with notepad++. There you will already see two lines that look like this: below these lines place this: Now replace "*NAME*" with whatever name you want for your sound, and replace "*SOUND_FILE* with your sound files name. Once you have done that it should look something like this: You can now save and close the file now.
Step 8 ) Now we must add this sound we have created into the music box, Open "random_song.gsc" in "COD5Root\mods\*YOURMAPNAME*\maps" look for where i have placed: In that section you will see: all you must do to add another song is copy the latest line and change the number to 1 higher then it is, first will be 0, then 1, then 2, then 3 and on. So for this instance im going to copy: and change it to this: for my instance i will be changing "*NAME*" to "beauty_song", so yours should look something like this: Next we will be changing the display name, AKA the name that will appear for a player that bought the player. Ex. "Playing: Monty - Horizon" to do this look for where i placed: In this section you should see: for this we will be doing the same thing as the last time, but instead of the value being the sound name, it is now the display name. First im going to copy and paste: and change it to: change "*DisplayName*" to the name of your song, for my example i will be using "Beauty Of Annihilation" Two out of three now, Next we need to add in how long the song is in seconds. Find where i placed: In this section you should see: Same as we did twice before i will copy and paste the latest entry: and change it to: replace song time with how much time in SECONDS that your song takes up. for my instance my song is 290 seconds long Once you have done that go to your launcher and check "Build mod.ff Fastfile" and "Build Sounds" then hit "Build Mod" (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi46.tinypic.com%2F1i0w39.png&hash=1fe096fa57d28c1070e822e92f8e79231996a84f) once its done go to "Cod5Root\raw\sounds" and you should see your converted sound file. Copy it and paste it into "COD5Root\mods\*YOURMAPNAME*\sounds" if this directory doesn't exist, create it. Make sure the sound file is checked in your IWD list then Build your mod and Compile Normally. Now when you are in game you will be able to play your song from the music player. Have Fun :nyan:
Title: Re: [User Tutorial] Adding a Random Music Player
Post by: daedra descent on November 20, 2012, 06:56:07 pm
that's a lot of opening and closing scripts for a music player. oh well, ill try it out :)
Title: Re: [User Tutorial] Adding a Random Music Player
Post by: SajeOne on November 20, 2012, 09:43:45 pm