Installation:
· Extract the archive into the CustomSoundtrack directory in your game folder. If you're on Steam, it's likely to be
C:\Program Files (x86)\Steam\steamapps\common\MGS_TPP\CustomSoundtrack
· If you haven't already, add the tracks you would like your chopper to play in MP3 format to that same folder.
Instructions:
· Run _Randomizer.bat while the game is running (you can start it before or after launching the game, doesn't matter).
· In-game, once you've unlocked the Speakers for the helicopter, go to your music tapes, and select "_helo" as your helicopter music.
· You can edit the file for some basic options. Change "_helo" to whatever you want the name of the track to be. Change "60" to however many seconds you want the script to wait before it chooses a new song.
Compatibility:
· This will work with every other mod.
· This will work with every version of the game.
Known issues:
· Avoid having punctuation (like "!") in your music track filenames, otherwise it might break the script. Spaces are fine, as are parentheses and dashes.
· This will select any song in the folder randomly. If there's a track in there you don't want to be used, you can add a comma to the filename so it gets skipped.
Credit goes to JeanGenieLaysOnHisBack.
Technical stuff:
Here's the source code.
setlocal EnableDelayedExpansion
set NAME="_helo"
set /a "timer=60"
:start
set /a "count=0"
set FILE=""
for %%F in ("*.mp3") do call set /a "count+=1, 1/(%RANDOM% %%%% count)" 2>nul || set FILE="%%~nF"
@echo New song: %FILE%
copy %FILE%.mp3 %NAME%.mp3
@echo Waiting %timer%s...
ping localhost -n %timer% >nul 2>&1
goto start
endlocal
I'm a noob when it comes to batch files, I hacked this together from stackoverflow posts.
it chooses an mp3 file at random in the folder and copies it to a file called _helo.mp3. It then pings localhost 60 times as a dirty workaround for a wait timer.
Feel free to modify/improve this and post it yourself.