Killing Floor

Killing Floor

37 ratings
How-to: Speedy downloads for modded servers
By Vel and 2 collaborators
This guide is for those of you who want to run a modded KF Server (listen or dedicated) with a redirect for fast downloads.

No ♥♥♥♥♥♥♥♥, no hours of waiting for mods to download or relying on other hosts. Just you and your server!
   
Award
Favorite
Favorited
Unfavorite
Using 'HTTP FILE SERVER' tool (Recommended)
Thanks to @The0neThy0nly for his find.

Instead of signing up or using any of the hosting services, you can simply download this tool:

Tool Download Link: https://www.rejetto.com/hfs/?f=dl

Instructions

- Install it
- Create your own directory inside it by right-clicking on the white space under 'Virtual File System' and select a 'Add Folder From Disk'. Choose the 'Real Folder' option (Where you have all your Compressed Mods inside)
- From the menu, click on IP Address --> 'Find External IP'
- change your PORT and forward it's TCP in your Router.
- You're Done. You can click on 'Open in Browser' and all your files should be visible.

Take the URL of the opened page and treat it as your RedirectURL.

If you have a Dynamic IP Address like me, please follow my other guide here:

KF REDIRECT URL WITH A DYNAMIC IP

And replace your IP Address in the URL (Generated when you clicked on 'Open In Browser') with the one you made from the Guide.

___________________________

Optionally:

You can create credentials for who can delete/upload files to your server for better mod management.
Using a 'Hosting Service'
The assumption is this: you want to create a modded KF server, and want other players to download any mod files super-fast upon joining.

For that purpose, you will need a Webhost/Redirect URL with good bandwidth where you can upload all the mod files.
New weapons, new maps, gameplay mods, character skins, anything you want.

What you need:
  1. A brain (knock, knock!)
  2. An email account
  3. Basic understanding of how to configure stuff
  4. The willingness to do it!


1. Sign up for the Webhost
  1. Go to your new free webhost[www.000webhost.com].
  2. Click "Sign up".
  3. Select FREE and fill out the fields.

What you get this way:
  • 1 GB online drive space
  • 10 GB / month download bandwidth
And that's good enough for you.


2. Go to Settings and get your host address

After you sign-up, you should be able to see this:



Click on Settings in the upper-right corner.

Now you should be able to see your FTP credentials (note: if you have no password, scroll down and request a password change).




3. Set up FTP client

Once you can see those settings, go to WinSCP[winscp.net] and download the software. WinSCP is used for uploading any mod files to your server.

When you've got the software, open it and enter your FTP credentials:



Just mirror what you got in your Webhost settings.
Before you press LOGIN, click on Advanced settings and enter the following settings (this ensures the connection remains active when you are copying files from your PC to the server). Like this:



Press OK and log in.

If you did everything correctly, you should be able to see this:



The right side pane will be empty of course until you upload some files (we'll get to that in a moment).

Create a folder INSIDE /public_html and name it files. You ALWAYS upload your mod files to the /files folder.


4. Check your Redirect URL

Now you have a server which will be used in a Redirect URL to provide fast downloads. To make sure it's working correctly, head back to your web browser and enter the following:


Replace {UserName} with your own user name from the webhost.

E.g.
My redirect URL is http://velsankfservers.000webhostapp.com/files/
velsankfservers → username from Webhost
/files/ → folder created through WinSCP

If it's working, you should see this (just without all the files yet):



Perfect! Now you have a Redirect URL ready to be used!
Usage of Redirect URL + Important info
Now that your Redirect URL is created, you need to make your KF Server use it.

Note: I'll be using my own URL in this guide as the reference. Use your own URL that you created in the previous steps.
My URL: http://velsankfservers.000webhostapp.com/files/

This works for both Dedicated (from SteamCMD) and Listen (in-game) servers.

Edit KillingFloor.ini
That's the game's config file inside /KillingFloor/System/
If you have trouble finding the game's folder, open your Steam Library, then right-click Killing Floor and select "Properties". Next go to the "Local files" tab and click "Browse local files..."

Go to section
[IpDrv.HTTPDownload]
use Ctrl+F, then paste the above to quickly find it

Find the line
RedirectToURL=
and paste your Redirect URL after the equals

E.g.:
RedirectToURL=http://velsankfservers.000webhostapp.com/files/

Also make sure that the following line right below is set properly:
UseCompression=True

That's it! Your server is now using a Redirect URL, which makes joiners download any files from the fast external webhost.

You can go ahead and start adding your files.

___________


Important Information:

Before uploading the files to the webhost (via WinSCP), you must compress them to the UZ2 format!

Files with all extensions (except one) HAVE to be compressed. Read the section below to learn how to batch-compress any mod files.

*.rom files → \Maps
*.u files → \System
*.ucl files → \System
*.upl files → \System
*.ini files → \System
*.int files → \System
*.ogg files → \Music THE ONLY FILES NOT TO COMPRESS
*.utx files → \Textures
*.uax files → \Sounds
*.ukx files → \Animations
*.usx files → \StaticMeshes

This is where all the files go, inside your KillingFloor directory, found in Steam\steamapps\common\KillingFloor\

BEFORE you upload any mod files to the server, install the KF mods on your PC, putting them into their corresponding folders.

Remember that you also need the ServerPerks mod (latest version is V7) for mods adding custom characters and weapons. ServerPerks.ini should list them.

Some mutators need to be added in KillingFloor.ini as ServerPackages
ServerPackages={MutatorNameHere}
Or as 'ServerActors'
ServerActors={MutatorNameHere}
You can get any mutator name by opening its .ucl file, inside /System

E.g.:
ServerPackages=ServerPerks
Compressing files before uploading
Now that you have your webhost, the Redirect URL is configured, and you installed some mutators locally on your PC, it's time to transfer the mod files to the webhost.

In short:
  1. Compress your files
  2. Upload them to the webhost
  3. Profit

______________

To compress the files, copy all mod files you are using into a single folder, preferably inside your KF directory for easier access, like this:




I made 2 folders, one for all the original files and another for the compressed UZ2 files.

Now, create a batch file with this script that I made to compress all files in 1 click.

for /f "tokens=*" %%a in ("{Directory Of Orignal Files}\*.rom") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.u") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.ucl") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.upl") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.ini") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.int") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.utx") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.uax") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.ukx") do ucc compress %%a pause for /f "tokens=*" %%a in ("{Directory with original files}\*.usx") do ucc compress %%a

  1. Copy this script into Notepad.
  2. Replace {Directory with original files} (including the brackets) with the path to the single folder with files you created.
  3. Save the script as a BAT file (name it something like compressor.bat, make sure the extension is .bat).
  4. Run the BAT file as Administrator. After every extension, press Enter to continue.

Don't worry if the script gives you an error, it does that if it doesn't find any files with specific extension (this depends on the mod).

Advanced Methods
For those in need of a more efficient tool boasting an optional, minimalistic GUI, consider using the KF Redirect Tool[github.com]:
  • An easy-to-use tool for compressing and decompressing KF1 packages.
  • Compatible with Windows, Linux and MacOS.
  • Offers superior file processing speed compared to KF1's default mechanism:
    • The CLI app (kfuz2.exe) employs a faster archiving algorithm, providing almost double the speed of UCC.exe.
    • The Python GUI app utilizes multithreading, achieving even higher performance.


How to Use
GUI App
  • Download the kfuz2_egui executable file for your operating system from the release section[github.com].
  • Choose the Input folder containing the game packages. This could be your entire server folder; built-in files will be automatically ignored.
  • Select the Output folder if you wish to accumulate all files in a single location. Otherwise, new files will be generated in the same directory as the input files.
  • Click on the compress or decompress buttons based on your requirements. Monitor the progress in the console.
  • That's it!

CLI App
If you wish to create your own scripts, here are some basic examples:

To compress a file in verbose mode and specify a different output directory:
.\kfuz2_cli.exe --verbose --output "D:\Documents\CompressedFiles" "D:\Documents\BitCore.u"

To decompress a file in silent mode and save it in the same directory as the input file:
.\kfuz2_cli.exe --quiet --decompress "D:\Documents\CompressedFiles\BitCore.u.uz2"

To compress a file, specify an output directory, and disable the additional check for verifying if the input file matches KF1's format:
.\kfuz2_cli.exe --output "D:\Documents\CompressedFiles" --nocheck "D:\Documents\BitCore.u"

And for other in-depth information check official documentation[github.com].
71 Comments
4GClaroARG 26 Aug, 2024 @ 8:54am 
I remember that in Garrys Mod I had solved this problem by compressing the audio file directly into the map's .rom file. I'll have to see if in Killing Floor something similar can be done with the map creation tool.
4GClaroARG 26 Aug, 2024 @ 8:52am 
Thanks for the info, but if I do what that link says, my server will lose the exp and achievement gains. Although it could be useful for my secondary modeled server.
Vel  [author] 26 Aug, 2024 @ 3:28am 
I think .ogg are the only ones you cannot compress to be downloaded by the redirect server. (I might be wrong tho)

It Might be better to ask your players to download the .ogg separatly or just skip the music all together :zageyes:
4GClaroARG 25 Aug, 2024 @ 10:55pm 
Hi, how do I get maps with .ogg music files to download? The map works fine, but it won't download the .ogg music files.
Vel  [author] 27 Dec, 2023 @ 3:27pm 
@RKT

I am not sure about this, but doesn't the game automatically generate the .ucl for the files when you run it at least once? if not - try to search the mutator name on google and you will for sure find it somewhere on some random ass KF website or forum.
DaPope 28 Feb, 2023 @ 10:00am 
I get the connection errors when i use WinSCP as well as the disk quota error, I also tried uploading the files on the 000webhost portal and I get the disk quota error there too.
I'm thinking of trying out Apache HTTP Server and seeing if I get any luck with that.
Vel  [author] 28 Feb, 2023 @ 1:21am 
FYI: FileZilla or WinSCP are great but not really required, you can also try uploading your files directly from the 000webhost portal, this way you won't have any connection errors.
Vel  [author] 28 Feb, 2023 @ 1:19am 
Normal hosters (GDrive, OneDrive etc...) will not work because they are not http web servers.

I haven't checked if 000webhost is problematic now but I never encountered those issues before, do you mean its giving connection errors in-game or in the site?
DaPope 27 Feb, 2023 @ 6:42pm 
I made sure that UseCompressed was set to True,
I tried setting up the other redirect URL through 000webhost in your guide.
I set up the site and application, but i keep either getting connection timeouts or a message saying disk quota exceeded even though i am nowhere near the 1GB limit.
Do you have any other recommended redirects/file server managers?
Would Google Drive work?