M
Mongre
Guest
Want to figure out how to get maps on your HL2DM server to download from an HTTP?
(Originally by MajorPain-CELL-)
After much research and agony, I have finally figured out and mastered the sv_downloadurl.
Please pay attention because Im only saying this one time. LOL
Getting your clients to be able to download maps from a remote site or server is pretty easy to set up. The first thing you need to do is create a folder called server-files in the root directery of the HTTP server or FTP server thats going to host your maps.
The second thing you need to do is create your folders inside the server-files folder. (VERY IMPORTANT) Make sure that you keep the directory structure the same as the directory structure on your game server. You should have the following folders: maps, materials, sound. You may have additional folders depending on the map or if your running a mod, but The three folders I mentioned are all you need for most maps.Also make sure to keep all your folder names and file names lowercase.
Next: upload your maps and files to the folders they go into making sure to put them in thier corisponding folders. So if you have a map that comes with added textures and sounds make sure you upload the sounds to the sound folder ect. Be careful when uploading the files via ftp. Do NOT overwrite folders that already have files in them or you will lose maps and nuts you might have uploaded previously. For example open the sound folder on both the PC yer on and on the remote system then copy them over.
The next thing you need to do is add the next four lines to you server.cfg
sv_allowupload 1
sv_allowdownload 1
sv_send_resources 1
sv_send_logos 1
sv_downloadurl "http://yoursitename/server-files"
You also need to make sure that the sv_downloadurl is entered in the exact format listed above including the quotation marks! All the tutorials I read were not very clear on this and I spent a long time jerkin around for nothing.
O.K. now im going to explain how to get your clients/gamers to be able to download all the extra files and resources that accompany the .bsp
The only thing you need is to have a .res file in the map folder, and the server will automatically read this file and dish out the needed goodies. Below is a brief explanation of what a res file is and an example of whats inside it.
What is a .res file?
A RES file is simply a text file, containing a list of other files. The RES file goes along with your compiled BSP file. A RES file is used to instruct the Half-Life server to send the specified files to clients that do not have your custom art or sounds. The RES file must be named just like your BSP file, except with a .RES extension. So if your map was named cs_mymap.bsp, you would create a RES file called cs_mymap.res. The RES file must be in the same directory as your BSP... in other words, the maps directory.
It works like this:
1.The server changes to your custom map, or a client connects while your map is on
2.The server looks for a RES file that matches the name of the BSP
3.The server loads the RES file and looks for images/sounds/stuff that need to be sent to clients
4.If the client machine does not have the specified file(s) (or the file(s) are not the same date/size,) the server will send them to the client
5.Once ALL files referenced in the RES file are downloaded by the client, the client connects and is able to play.
Below is an example of what a .res file looks like should you choose to make yer own.
I chose to download and use a .res making utility which I will make available to you via the link here ---->http://shellbase.org/server-files/resMaker.rar
This is a great little program that will save your ass!
You will need to have .NET Framework 1.1 installed on windows for this program to work properly. You can get this if you don't have it by using the windows update function.
When you open the program, you have 2 buttons you can press. Press the one that says "Browse..." and choose the folder in which your maps and materialsand whatever folders reside.
Do not select the maps folder itself, select the
folder it is inside of.
After that, click the "Create .RES File" button.
You're done
It will automatically place your new .res file into the folder with you map. Now just upload the new map to both yer game server and web server. Remember that the file structure must be the same on both servers. That means the .res file needs to be in the maps folder on both servers.
.res file example from a map called obj_kinyoenta_evolution.bsp
"resources"
{
"sound/kinyoenta/gappoi-outbreak.mp3" "file"
"sound/kinyoenta/hxnxzxwx.mp3" "file"
"materials/decals/kinyoenta/kinyo_decal1.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal1.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal2.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal2.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal3.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal3.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal4.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal4.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal5.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal5.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal6.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal6.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal7.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal7.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal8.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal8.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal9.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal9.vtf" "file"
"materials/decals/kinyoenta/kinyo_decala.vmt" "file"
"materials/decals/kinyoenta/kinyo_decala.vtf" "file"
"materials/decals/kinyoenta/kinyo_decalb.vmt" "file"
"materials/decals/kinyoenta/kinyo_decalb.vtf" "file"
"materials/decals/kinyoenta/kinyo_decalc.vmt" "file"
"materials/decals/kinyoenta/kinyo_decalc.vtf" "file"
}
As you can see it's basically a pointer so the server knows where the resources are located. Notice the directory structure layout in the .res file. This is why it is so important to make sure everything is in it's proper place on BOTH servers.
I took some screen shots of my file server and my game server so you could see the simalarities in the directory tree.
Notice how the game server has the same folders as the server where Im redirecting my clients. I keep mentioning this because not having your files and directories exactly the same on both servers is the only reason why your re-direct will not work!!!!!!!!!!!!!
This is my first tutorial so I hope I went into enough detail for you all to get yer Fast map downloads running. I normally don't do alot of explaining, but I felt someone needed to lay it all out there properly, and I hope this saves you all from the Hell I went through.
Now go out and make me proud!
(Originally by MajorPain-CELL-)
After much research and agony, I have finally figured out and mastered the sv_downloadurl.
Please pay attention because Im only saying this one time. LOL
Getting your clients to be able to download maps from a remote site or server is pretty easy to set up. The first thing you need to do is create a folder called server-files in the root directery of the HTTP server or FTP server thats going to host your maps.
The second thing you need to do is create your folders inside the server-files folder. (VERY IMPORTANT) Make sure that you keep the directory structure the same as the directory structure on your game server. You should have the following folders: maps, materials, sound. You may have additional folders depending on the map or if your running a mod, but The three folders I mentioned are all you need for most maps.Also make sure to keep all your folder names and file names lowercase.
Next: upload your maps and files to the folders they go into making sure to put them in thier corisponding folders. So if you have a map that comes with added textures and sounds make sure you upload the sounds to the sound folder ect. Be careful when uploading the files via ftp. Do NOT overwrite folders that already have files in them or you will lose maps and nuts you might have uploaded previously. For example open the sound folder on both the PC yer on and on the remote system then copy them over.
The next thing you need to do is add the next four lines to you server.cfg
sv_allowupload 1
sv_allowdownload 1
sv_send_resources 1
sv_send_logos 1
sv_downloadurl "http://yoursitename/server-files"
You also need to make sure that the sv_downloadurl is entered in the exact format listed above including the quotation marks! All the tutorials I read were not very clear on this and I spent a long time jerkin around for nothing.
O.K. now im going to explain how to get your clients/gamers to be able to download all the extra files and resources that accompany the .bsp
The only thing you need is to have a .res file in the map folder, and the server will automatically read this file and dish out the needed goodies. Below is a brief explanation of what a res file is and an example of whats inside it.
What is a .res file?
A RES file is simply a text file, containing a list of other files. The RES file goes along with your compiled BSP file. A RES file is used to instruct the Half-Life server to send the specified files to clients that do not have your custom art or sounds. The RES file must be named just like your BSP file, except with a .RES extension. So if your map was named cs_mymap.bsp, you would create a RES file called cs_mymap.res. The RES file must be in the same directory as your BSP... in other words, the maps directory.
It works like this:
1.The server changes to your custom map, or a client connects while your map is on
2.The server looks for a RES file that matches the name of the BSP
3.The server loads the RES file and looks for images/sounds/stuff that need to be sent to clients
4.If the client machine does not have the specified file(s) (or the file(s) are not the same date/size,) the server will send them to the client
5.Once ALL files referenced in the RES file are downloaded by the client, the client connects and is able to play.
Below is an example of what a .res file looks like should you choose to make yer own.
I chose to download and use a .res making utility which I will make available to you via the link here ---->http://shellbase.org/server-files/resMaker.rar
This is a great little program that will save your ass!
You will need to have .NET Framework 1.1 installed on windows for this program to work properly. You can get this if you don't have it by using the windows update function.
When you open the program, you have 2 buttons you can press. Press the one that says "Browse..." and choose the folder in which your maps and materialsand whatever folders reside.
Do not select the maps folder itself, select the
folder it is inside of.
After that, click the "Create .RES File" button.
You're done
It will automatically place your new .res file into the folder with you map. Now just upload the new map to both yer game server and web server. Remember that the file structure must be the same on both servers. That means the .res file needs to be in the maps folder on both servers.
.res file example from a map called obj_kinyoenta_evolution.bsp
"resources"
{
"sound/kinyoenta/gappoi-outbreak.mp3" "file"
"sound/kinyoenta/hxnxzxwx.mp3" "file"
"materials/decals/kinyoenta/kinyo_decal1.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal1.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal2.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal2.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal3.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal3.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal4.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal4.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal5.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal5.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal6.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal6.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal7.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal7.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal8.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal8.vtf" "file"
"materials/decals/kinyoenta/kinyo_decal9.vmt" "file"
"materials/decals/kinyoenta/kinyo_decal9.vtf" "file"
"materials/decals/kinyoenta/kinyo_decala.vmt" "file"
"materials/decals/kinyoenta/kinyo_decala.vtf" "file"
"materials/decals/kinyoenta/kinyo_decalb.vmt" "file"
"materials/decals/kinyoenta/kinyo_decalb.vtf" "file"
"materials/decals/kinyoenta/kinyo_decalc.vmt" "file"
"materials/decals/kinyoenta/kinyo_decalc.vtf" "file"
}
As you can see it's basically a pointer so the server knows where the resources are located. Notice the directory structure layout in the .res file. This is why it is so important to make sure everything is in it's proper place on BOTH servers.
I took some screen shots of my file server and my game server so you could see the simalarities in the directory tree.


Notice how the game server has the same folders as the server where Im redirecting my clients. I keep mentioning this because not having your files and directories exactly the same on both servers is the only reason why your re-direct will not work!!!!!!!!!!!!!
This is my first tutorial so I hope I went into enough detail for you all to get yer Fast map downloads running. I normally don't do alot of explaining, but I felt someone needed to lay it all out there properly, and I hope this saves you all from the Hell I went through.
Now go out and make me proud!