-----------------------------------------------------------------------------------------------
6. INSTALLING CUSTOM MAPS USING A REDIRECT
-----------------------------------------------------------------------------------------------
Using the Killing Floor SDK the community is able to create its own maps for Admin to host of their servers. These maps can be automatically downloaded by users joining your server with a few easy steps as follows:
1) Download a custom map and place it in your maps folder. In my case I downloaded KF-WestLondonNight.rom and placed it in C:\KS1\maps
2) Go to your system folder and make a .bat with the following code:
Code:
ucc compress ..\maps\<mapname.rom>
Mine is:
Code:
ucc compress ..\maps\KF-WestLondonNight.rom
This will compress the map into into a much smaller size and display .uz2 at the end of the map name.
KF-WestLondonNight.rom was compressed from 10.7 MB > 1.78 MB. This will reduce download time and keep bandwidth to a fraction of what it would have been without compression.
If you want to compress every single map in the map folder then here is a script from
saweet. Even though it will compress the default maps as well, this can still be an efficient script if you have multiple custom maps to compress in one instance.
Make a .bat file containing the following command in your system folder. ie: compress_maps.bat
Code:
for /f "tokens=*" %%a in ('dir /b ..\maps\*.rom') do ucc compress ..\maps\%%a
3) Go to your map folder and you'll see the compressed map as <mapname.rom.uz2>.
4) Remove this compressed map from your map folder and upload it to your third party host. I made a folder in the main web host directory called maps and placed the compressed map in there.
[url]http://www.yourhost.com/maps/[/URL]
5) Go to your KillingFloor.ini and locate [IpDrv.HTTPDownload]
In the RedirectToURL= place the location of the compressed map:
RedirectToURL=http://www.yourhost.com/maps/
Note the forward slash at the end of the redirect link.
By default you will see UseCompression=True is already set.
6) Now you need to add the map to the map list. You can do this manually or through the Web Admin Interface.
I recommend using the Web Admin Interface for your first attempt as it will write a [KFMod.KFMaplist] entry at the bottom of your KillingFloor.ini with maps listed below as follows:
[KFMod.KFMaplist]
MapNum=0
Maps=KF-<Mapname>
Maps=KF-<Mapname>
Maps=KF-<Mapname>
Go to your Web Admin Interface and select Defaults > Maps. Select maps you want added to the map cycle and move them from Maps Not In Cycle > Maps In Cycle using the arrow tabs. Hit the Save button.
7) Restart your map/server and perform a Map Vote for the new map.
Once you have your [KFMod.KFMaplist] entry listed at the bottom of the KillingFloor.ini you can simply update map entries there for new custom maps or continue to use the Web Admin Interface.
If you don't have a host who can store your maps (and mods) then you can at least test the function using
[url]http://www.dropbox.com[/URL] or
[url]http://www.fileden.com[/URL] They both offer FREE hosting and bandwidth although dropbox appears to be the superior option with a 2GB upload limit and unlimited bandwidth. These companies change their plans from time to time so check their current offers.
You can also configure the redirect from your own server PC by installing your own web hosting application, like Apache.
Some maps come bundled with additional files for textures, sound, models, etc. You can also add these to your server redirect area in compressed form. They can all be added to the same redirect folder as the maps. Make sure they are added to the correct folders on the game server in uncompressed form.