• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

[Mutator] Music downloader

Marco

Grizzled Veteran
May 23, 2009
644
230
Finland
This is simply a mod which allows server admins to make clients automatically download music and karma data files for KF.

Server hosts download this file: http://www.klankaos.com/downloads/MusicLoader.rar
Clients download this file: http://www.klankaos.com/downloads/MusicLoaderClient.zip
Unzip all files to KillingFloor/System folder.

Notice:
- Downloader works for Windows clients only (not Linux nor Mac clients), however server side mutator works on any version.
- Clients are required to have a custom DLL file in their KF system folder for this mod to work (it will make your game reboot to install it).
- Mod has built-in Russian language support (translated by Poosh).

To setup downloads for the resource files, you have to use UCC.exe Compress for the .ogg and .ka files you wish to add and upload them to a HTTP website.
Important: In order to prevent caps sensitive issues, I've forced clients to always download file names in all lower case, so for example: Aliens01_Loud.ogg.uz2 should be renamed to aliens01_loud.ogg.uz2!

The following settings are available in MusicLoader.ini:
[MusicLoader.MusicMut]
MainDownloadLink=www.somesite.com/downloads/ - This is the primary download URL.
CustomFileLinks=SomeSongName:www.someothersite.com/downloads/
CustomFileLinks=SomeSongNameB:www.someothersite.com/downloads/
- These can be used to redirect specific files to specific sites only.
CustomKarmaFiles=Doom3Karma
CustomKarmaFiles=MoreRagdolls
- These lines can be added to make clients download custom ragdolls that are required by some mods in server.​
To start this mutator on server, either add mutator named "Music Downloader" or in URL "?Mutator=MusicLoader.MusicMut".
ManualMapMusic=KFO-HauntedHotel:Damned-Calm01:Damned-Calm02:Damned-Close:Damned-Monster - Manually force a set of musics associated to a map.
CustomMusicFiles=SomeSong - List of musics that are required on the server in every map.

The mutator is programmed to search for all MusicTriggers, KFMusicTriggers, Level Properties Song and ACTION_ChangeMusic in ScriptedTriggers for required musics in a map, so if level has any other custom methods to start music, this mod wont consider them as required map song.

Note in the default MainDownloadLink (www.klankaos.com/downloads/Music/) I have added some custom songs there already:
aliens01_loud.ogg.uz2 to aliens12_loud.ogg.uz2
aliens01_quiet.ogg.uz2 to aliens16_quiet.ogg.uz2
d2map01.ogg.uz2 to d2map32.ogg.uz2
damned-calm01.ogg.uz2 to damned-calm02.ogg.uz2
damned-close.ogg.uz2 and damned-monster.ogg.uz2
doom3karma.ka.uz2
drag1.ogg.uz2 to drag5.ogg.uz2
smoothjazz.ogg.uz2
sunkissed.ogg.uz2​
If you want me to add other songs or karma data files in there, feel free to give me suggestions.

Version 2.1:
- Fixed parsing error of long HTML headers which made client refuse to download songs from specific sites.
- Added new settings (ManualMapMusic/CustomMusicFiles).
- Added so download error message shows also the file name it failed to download (so it's easier to identify which file is missing from download site).
- Made music downloader retry once after a download error incase first error was some temporary error.
- Fixed so that it properly downloads files with spaces in names.

Version 2.0:
- Fixed some HTTP connection issues when downloading files.
- Made the DLL file install itself rather than making clients go to web browser to download it.

If you wish to have the C++ source codes of this mod, you will have to PM me about it.


Legal notice for TWI:
This mutator hasn't involved any reverse engineering of Core.dll, all is done with help of UT public headers, and Notepad++ to find Core.dll export names.
 
Last edited:
I've never been able to get this to work with a custom URL, just sits a 0% forever, I've tried making it all lower-case compressing it, and etc

Here is the directory with every piece of .ogg music for any map I could get my hands on

The file trying to be downloaded is doom3karma.ka

Worked fine to me when I tried with following settings:
[MusicLoader.MusicMut]
MainDownloadLink=lusterious.net/kf/redirect2/
CustomKarmaFiles=Doom3Karma
 
Upvote 0
Found a problem with the MusicLoader on the clientside, if you install the .dll first without joining a server that needs it you will get a failed launching URL with "Can't find file for package MusicLoader" this is cause when you have the .dll you do not download the .u from the server and the .u is needed
 
Upvote 0
Updated this mod to make it install itself automatically on client if they so chose to, rather than forcing them to go on web browser to download it.

With this update, clients who already downloaded old version will get mismatch in MusicLoader.u, so delete that file (as-well as MusicLoader.dll) and download the new version from the link above!
 
Last edited:
Upvote 0
Hello. I have some problems in setting this mutator. My download server address in MusicLoader.ini is like this

[MusicLoader.MusicMut]
MainDownloadLink=121.165.43.22/Redirect/Music/

If I omit http:// it displays errors like this

"Download failed (SomeSongName.ogg): Connection failed to open."

and then download fails.

If I then add http://

[MusicLoader.MusicMut]
MainDownloadLink=http://121.165.43.22/Redirect/Music/

"Download failed (SomeSongName.ogg): Couldn't resolve host site: http"

and it also fails to download compressed ogg files to client.
 
Upvote 0
Hello. I have some problems in setting this mutator. My download server address in MusicLoader.ini is like this

[MusicLoader.MusicMut]
MainDownloadLink=121.165.43.22/Redirect/Music/

If I omit http:// it displays errors like this
"Download failed (SomeSongName.ogg): Connection failed to open." and then download fails.

If I then add http://
[MusicLoader.MusicMut]
MainDownloadLink=http://121.165.43.22/Redirect/Music/

"Download failed (SomeSongName.ogg): Couldn't resolve host site: http" and it also fails to download compressed ogg files to client.
 
Upvote 0
Sounds to me the HTTP address is invalid. You should make sure people can access from web browser to URL: 121.165.43.22/Redirect/Music/<songname>.ogg.uz2 (for example: 121.165.43.22/Redirect/Music/smoothjazz.ogg.uz2), at least I get no connection to that address when I try to open it.

Also you never prefix URLs with the http protocol in Unreal settings (not even on redirect address), as it serves no purpose when game is programmed to open them as HTTP already.
 
Upvote 0
Currently running this mutator on my server. However, it doesnt download songs with spaces in their names (which some moron map makers do that). Can this be fixed?

I did fix that, although I forgot to mention that in changelog. Maybe you're still just running old version, try to redownload the mod and see if that fixes the problem?
 
Upvote 0
Redirect problem.

Redirect problem.

I'm having a problem with MusicLoader and my redirect.
It only downloads one song then it fails to download the others:
http://steamcommunity.com/sharedfiles/filedetails/?id=329440560http://steamcommunity.com/sharedfiles/filedetails/?id=329440560

My redirect url is:
kf.lolisandstuff.moe:1984/KillingFloor/
I talked to Janitor, he sugested using www. as hostname so I tried that as well. www.lolisandstuff.moe:1984/KillingFloor/
Same problem. His redirect works though on my server. I got no idea what's wrong with it.

Edit: Got it also running on port 80 now. Same problem...
 
Last edited:
Upvote 0