• Fastdl vs workshop
    4 replies, posted
I've never tried FastDL, only workshop. What do you prefer as a server owner? I have multiple servers and I would like to have new players connect to my servers faster.. Thanks.
FastDL is faster better, and easier to update as a server owner. The only downside is that you need a webhost for it. Still worth it tho.
[QUOTE=YourStalker;47523596]FastDL is faster better, and easier to update as a server owner. The only downside is that you need a webhost for it. Still worth it tho.[/QUOTE] I have a web host c: Can you recommended a guide? I've found a few but none of them go in depth. Thanks
[QUOTE=ragegriffith;47527935]I have a web host c: Can you recommended a guide? I've found a few but none of them go in depth. Thanks[/QUOTE] [QUOTE]This guide assumes you know about where things go on a server and how to use basic FTP functionality. Fast Download URLS and setup. First off, You need a half decent FTP client. Personally, I use Filezilla. You can get it at [url]http://filezilla-project.org/[/url]. This guide assumes you have a Fast dl/webserver to use with FTP access. Config Setup Alright first off, we need to tell Gmod where to go and fetch these files. To do this, go to your servers FTP directory and go find the addons folder. It can vary how many folders you have to go through. If you have a rented server from a host, you'll probably have something like IP:PORT/[color=red]Orangebox/[/color]Garrysmod/addons-Materials-Models etc. Some hosts skip the parts in red cause they're lazy, but if running a dedi, then you should already know the GMod path. Anyway, navigate to your cfg folder and open/right-click > View/Edit in filezilla. At the bottom of the file add this line sv_downloadurl "[color=red]http://www.myurl.co.uk/garrysmod/[/color]" Change the bolded part to the URL which is something like [url]http://www.URL-HERE.co.uk/garrysmod/[/url]. Save and upload it, and with any luck it should now have defined the url to use for sending clients to download stuff. Note the garrysmod part on the end. When connecting via FTP to the webserver you will usually end up at the root. From there on, make a garrysmod folder (right click > new/create directory) - That is where everything that needs to be uploaded will be heading into, almost like a mirror of the game server. LUA Files In order for people to download the lua files properly, they need to be taken from the game server's cache, downloaded, and reuploaded to the fast download. For example, I have my URL set as [url]http://kazuos-server.ukgame.co.uk/[/url]. Within that on the FTP [which is how you upload the files] I have a folder called garrysmod, and within that, a cache folder, so the end url looks like [url]http://kazuos-server.ukgame.co.uk/garrysmod/cache[/url]. You have to redownload and reupload it every time you make a clientside lua modification to the server, usually every time you update an addon or gamemode. In step form. 1. Create a folder in your client gmod directory called "cache fast dl" 2. Go to your game servers' FTP, and go into the garrysmod/cache folder. Copy the dua folder into the cache fast dl folder you created in the last step and download it to there. 3. Once that is done, connect to your fast dl FTP. Make sure you have it set up so at the root, you can see a folder called garrysmod and within that, a cache folder. Upload the recently created dua folder to to WITHIN the cache folder. 4. Hey presto, providing you've set up the url location in one of the configs correctly, people can now download lua files faster. Materials/Models/Sounds within Addons/Game modes So, say for example you want people to download new wiremod models so they don't b*tch about errors and sh*t. Instead of manually adding each and every file with resource.AddFile, there's some coding you can use. [lua] local ClientResources = 0; local function ProcessFolder ( Location ) for k, v in pairs(file.Find(Location .. '*')) do if file.IsDir(Location .. v) then ProcessFolder(Location .. v .. '/') else local OurLocation = string.gsub(Location .. v, '../addons/wire/', '') if !string.find(Location, '.db') then ClientResources = ClientResources + 1; resource.AddFile(OurLocation); end end end end if !SinglePlayer() then ProcessFolder('../addons/wire/models/'); ProcessFolder('../addons/wire/materials/'); ProcessFolder('../addons/wire/sound/'); end [/lua] That's just an example. For gamemodes, it's slightly different. For example, in the Resident Evil Garrysmod gamemode, in resources.lua, [lua] local ClientResources = 0; local function ProcessFolder ( Location ) for k, v in pairs(file.Find(Location .. '*')) do if !string.find(Location, ".svn") then if file.IsDir(Location .. v) then ProcessFolder(Location .. v .. '/') else local OurLocation = string.gsub(Location .. v, '../gamemodes/' .. GM.Path .. '/content/', '') if !string.find(Location, '.db') then ClientResources = ClientResources + 1; resource.AddFile(OurLocation); end end end end end GM.Path = "RE"; if !SinglePlayer() then ProcessFolder('../gamemodes/' .. GM.Path .. '/content/models/'); ProcessFolder('../gamemodes/' .. GM.Path .. '/content/materials/'); ProcessFolder('../gamemodes/' .. GM.Path .. '/content/sound/'); end [/lua] I've bolded parts that can/need to be changed before they will work. You can choose to just dump them in the autorun folder with different names, or you can put them in the addon/gamemode that has content being downloaded respectively, named resources.lua [when it comes to addons, just put it in AddonName/lua/autorun] So far, that's got them queued for download, but it's no good if the files themselves aren't on the fast dl! Because of the way GMOD/Source handles the download URL, it expects all the content and stuff to be rooted in the garrysmod folder (or so I've experienced) e.g. garrysmod/materials, garrysmod/models etc. NOT WITHIN AN ADDONS FOLDER ON THE URL. The only time you should stick something in addons on the webserver is when a map refuses to download via the first method. Basically, all you need to do is go to each addon that has content queued on the gameserver [or for streamlining, if the server is using the same stuff as your client, then skip this next part] and copy/download the materials/models/sounds from within them to your client. From there, Upload those folders to the fast download within the garrysmod folder, so you got garrysmod/materials, garrysmod/models etc. If the content you're uploading sits on the gameserver in the materials and models folder rooted on garrysmod, then you just need to mirror them onto the fast download. With any luck, You're now all set to work. NOTE. Do not try and add too many addons to the queue with the LUA coding, otherwise the table gets overloaded, and your server will refuse to start. I believe this guide is done. I might add to it and supply images, but it's done for now. Made 100% by me, myself and I.[/QUOTE]
[QUOTE=James xX;47528291][/QUOTE] Thanks!
Sorry, you need to Log In to post a reply to this thread.