Garry's Mod

Garry's Mod

View Stats:
Garry's Mod Server FastDL (PLEASE HELP)
Hey guys, I'm working on FastDL for my server right now. I've heard many things today on how to do this, but even on my last server I don't think I did it correctly. If anyone knows please let me know, otherwise I will post what I would normally do. Note: This is for the non-workshop version of FastDL as most of my addons are not on the workshop.

1. Get the addon(s)
2. Add to server files (I don't know if I put the addon directly into the "addons" folder, or add the included folders into the root of my server. e.g. lua with lua, materials with materials, etc.
3. Use resource generator to get a list of all downloadable files
4. Post the list in my .lua file located in root/lua/autorun/server
5. bzip2 all the downloadable files
6. Upload the materials, resources, sounds, particles, models, maps from my server files to my website / FastDL location.
7. Add link using sv_downloadurl located in server.cfg
8. Restart server, and test by joining.

I'm pretty sure I got everything else right, my main question is Number 2. I don't know what to do with the addons themselves. The only reason I don't want to put into addons folder is because I've gotten weird errors like black sky, no weapons, games don't mount, etc. People were telling me this was caused by having too many addons in the addons folder. Like right now, I want to add 124 workshop addons to my server. But this does not include any player models, or custom addons. Plus, I already having a couple folder in my addons folder such as, darkrpmodification, ULX, and pointshop. If anyone knows how to do this please let me know. Thanks
Last edited by Evolution (The AWP); Feb 12, 2015 @ 5:16pm
< >
Showing 1-12 of 12 comments
bump
Here is my issue, I've narrowed my addons down to 66 Workshop addons. When I join my server I have a broken chat, black sky, weapons are listed as print name, spawn menu won't open, physgun is gray, and I get random LUA errors such as base/lua/cl_user.lua is causing errors which doesn't make any sense as I do not edit that section of my files. Any idea what is causing this?
Spike Mar 3, 2015 @ 3:09am 
tell me if you know how to fix this i got the same problem
I actually did figure out how to fix this, and I will explain how to setup and fix when I get home, which will be in a few hours.
thimblemunch Mar 3, 2015 @ 10:28am 
This is caused by a addon conflicting with another addon. There is a limit of addons, but once you hit that limit, certain addons just won't work. If the sky goes dark and ♥♥♥♥ gets messed up, it's a conflicting addon. Always use codenbug- if you know how...
It was not conflicting addons, it was the same addon conflicting twice, and I will explain why. I'm going to assume a lot of people used YouTube to learn how to make a Gmod server and hookup FastDL/WorkshopDL. Here was my issue.

EVERY tutorial told me I had to extract the addon that I got from Workshop using either Gmad Convert, or Gmad Extractor, and then add the folder to my server addons. While also using +host_workshop_collection and -authkey, so it will download the same addon from your collection. However if you do this, your server tries to add the same addon twice. It adds the Legacy Version(the folder version of your addon) and the Workshop Version(the .gma files in your addons), when the server tries to load the same addon at the same time it conflicts and causes issues. It took me a long time to figure this out, all because people on YouTube are autistic.

So basically to put addons on your server do this. Any custom addons (ones you've made yourself, coderhire, scriptfodder, or any non-workshop addons) that addon goes straight into your addons folder, and then use Fox's resource generator to add them to your resource.lua in lua/autorun/server. That's it, nothing else.

For Workshop addons, make sure ALL the addons you want are in a collection. Make sure your +host_workshop_collection and -authkey are set in your server.cfg(or if you have NFO or something with a similar control panel, add it through that. After that, add the workshop ID's to resource.lua using resource.AddWorkshop("ID Here"). That's it, nothing else. Don't extract the addon or do any ♥♥♥♥♥♥♥♥ like YouTube tells you to. The only time you do that is if you plan to edit the addon, and in that case make SURE you REMOVE it from your collection and from resource.lua otherwise your server will crash.

As long as you follow this you should have no issues at all. I'm currently running on NFO and have 506 Workshop Addons, and 51 Custom/Script Fodder addons. No problems at all.

Sorry for the poorly formated tutorial but I'm trying to do this quite fast as I have other things to do. If you do have any other problems though, please do add me on Steam, and I will help you out the best that I can.

Also, it's -condebug to print your entire server console to a "console.log" file. Very useful for finding errors, however, -condebug doesn't tell you the problem I just explained, I had a friend of mine tell me.
Last edited by Evolution (The AWP); Mar 4, 2015 @ 4:30pm
Oh yeah, if you already have FastDL setup and your server collection made, I would HIGHLY recommened using http://www.configcreator.com/ as this automatically will create a resource.lua file including all of your Workshop addons, and the resource.AddFile for your custom addons. Very useful, and much quicker than doing it manually, believe me.
Adine Feb 2, 2016 @ 11:39pm 
ive been looking and wondering how to make a website and upload the files to it ive been trying to use filezilla but i dont know what im doing please help
inga ingot Apr 26, 2016 @ 6:25am 
Originally posted by Evolution:
It was not conflicting addons, it was the same addon conflicting twice, and I will explain why. I'm going to assume a lot of people used YouTube to learn how to make a Gmod server and hookup FastDL/WorkshopDL. Here was my issue.

EVERY tutorial told me I had to extract the addon that I got from Workshop using either Gmad Convert, or Gmad Extractor, and then add the folder to my server addons. While also using +host_workshop_collection and -authkey, so it will download the same addon from your collection. However if you do this, your server tries to add the same addon twice. It adds the Legacy Version(the folder version of your addon) and the Workshop Version(the .gma files in your addons), when the server tries to load the same addon at the same time it conflicts and causes issues. It took me a long time to figure this out, all because people on YouTube are autistic.

So basically to put addons on your server do this. Any custom addons (ones you've made yourself, coderhire, scriptfodder, or any non-workshop addons) that addon goes straight into your addons folder, and then use Fox's resource generator to add them to your resource.lua in lua/autorun/server. That's it, nothing else.

For Workshop addons, make sure ALL the addons you want are in a collection. Make sure your +host_workshop_collection and -authkey are set in your server.cfg(or if you have NFO or something with a similar control panel, add it through that. After that, add the workshop ID's to resource.lua using resource.AddWorkshop("ID Here"). That's it, nothing else. Don't extract the addon or do any ♥♥♥♥♥♥♥♥ like YouTube tells you to. The only time you do that is if you plan to edit the addon, and in that case make SURE you REMOVE it from your collection and from resource.lua otherwise your server will crash.

As long as you follow this you should have no issues at all. I'm currently running on NFO and have 506 Workshop Addons, and 51 Custom/Script Fodder addons. No problems at all.

Sorry for the poorly formated tutorial but I'm trying to do this quite fast as I have other things to do. If you do have any other problems though, please do add me on Steam, and I will help you out the best that I can.

Also, it's -condebug to print your entire server console to a "console.log" file. Very useful for finding errors, however, -condebug doesn't tell you the problem I just explained, I had a friend of mine tell me.
For WorkshopDL you use workshop.lua in lua/autorun/server, not resource.lua.
Acecool Feb 1, 2019 @ 2:43am 
I know this is late, but for anyone who searches this may help...

A lot of places have resource list GENERATORS which have to be run any time content has changed... My system is automated. All gma files in the addons folder on the server are added to the resource list so clients download them. In addition, all gamemodes/gm_name/content/* content is added too.

If that's not enough, I create a folder in the data folder called fastdl/ - all content files are copied there in their respective folders. They are named blah.ext.txt... A batch file is also created which needs to be renamed from blah.bat.txt to blah.bat and executed as admin....

This batch file renames ALL of the files in the fastdl data folder by removing the txt extension. I am also working on it to automatically compress the files ( using Lua and the batch file will rename those too ). After renaming the files, the files are moved to a folder of your choosing.

The default folder I chose to use is the default WAMP Server folder ( Always test your server using a local SRCDS, including a local HTTP server )...

In short, I make it as easy as possible for you, so when you do want to use this on your production server, you just drag and drop the fastdl/ folder from the final directory path to your ftp online, or keep it on your localhost and use your http://ip/fastdl/ as the url for the downloadurl if you want...

Put into addons, it handles all content, and fastdl files. run the bat file as admin, then drag and drop onto FTP if you have a non-local server... If you have a dedicated box you could do your testing on a dedicated dev server on that box to make it 'easier' for moving the fastdl files, however I recommend always using a local srcds because you can run multiple gmod clients at once, see the console, etc...



One side-note... If you want the client to download a workshop file / id but you don't have the .gma file in your addons folder ( or you extracted it to make changes ) then you can use an empty file named blah_blah_blah_1234567.gma ( make sure the only numbers in the filename are from the id, don't use 1_blah_blah_1234567 otherwise the id will be read as 11234567 ) in the appropriate folder and that will be downloaded....



If I recall correctly, I set up the gamemodes/gm_name/content/ dir to be completely recursed, so you can create a separate folder called workshop/ in there and put the blank file .gmas in there you want downloaded.. At the top of the file, I listed examples of how I added m9k files ( for the models ) to be downloaded by the client ( I removed the Lua files because of coding issues and used my own base to run the models which are excellent )...

Actually, yes... The folder must be named workshop/ inside of gamemodes/gm_name/content/
Or, you can put the files in the addons/ folder... Either works.

This is the current one that's known working: https://www.dropbox.com/s/rxk7xfiuzweig4e/sv_add_gamemode_resources_old.lua?dl=0

And this is the one I'm working on as time permits - it has more comments to help it with teaching, and because it is adding more functionality... This is the one which will have the built in compression, etc...
https://www.dropbox.com/s/nu6emfd6iyspr99/sv_add_gamemode_resources.lua?dl=0


One more side note... Files are ONLY moved to the data/fastdl/ folder if the file has changed, or doesn't exist... So, it is best to not delete the folder...

I will eventually add a command, which, when called, will process everything and make the folders and copy the files and all that -- or convar which when set, will process the data when the server starts up instead of simply adding...

But, as it all happens on startup and since it doesn't output every file to the console ( unless you enable the convar ) the time it takes to process thousands of files is incredibly fast. If you enable debugging, it will take a lot longer as print statements are incredibly expensive to run...


Later, as I mentioned, I will be adding either a command or convar so the data is only processed when you want it to... I may also change it so that it is only processed on first launch ( ie if the server hasn't crashed or restarted then it won't try to copy files over... if it has, then it will ) which isn't difficult to do.. I may simply do this instead.
Bastianvvz Apr 9, 2023 @ 8:22am 
Brothers I need help, apparently I have a problem with the fastdl of my server... when all users try to enter the server they download the list of addons that I have on my server but in the end it always ends up kicking them with the warning "Host error: map is missing"... Please help
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Feb 12, 2015 @ 5:11pm
Posts: 12