Okay. So i have seen some threads about people’s addons, and how they install them. I will demonstrate a way were you can simply add workshop addons by clicking add to collection.
To start off we need to create your collection. Go to:
Once you have filled out the required info it will say “This collection is not yet published.” This is simple. Click “Subscribed items” tab and choose any addon. You can remove it later if needed. This is just to publish the collection. Once you have clicked a random or an addon you want on your server click save and continue.
It will now ask you for a background image, You can skip this by clicking publish.
Once you publish you should be re-directed to your newly made collection. open a new tab. DONT CLOSE THE TAB YOU MADE YOUR COLLECTION IN.
Now we need to get your Steam AUTH key. This is a key that allows the server to access your collection. This is pretty much a collection password.
We can get that by going here:
You will need to click Generate key. Once its generated your key, Keep the tab open and minimize your window.
Once you have minimized your window go to your garrysmod start file. E.G Windows is launch.bat, Linux is launch.sh.
After you have opened your launch code you need to add the following lines:
Your code should look like this:
srcds.exe -console -game garrysmod +maxplayers 42 +map rp_downtown_v4c -autoupdate
+host_workshop_collection Your Collection ID -authkey Your Auth key here
Now we need to fill some things in. You get your collection ID in the first tab were we made the collection. it is hidden in the link.
So for the collection ID we would enter 195018086
For the AuthKey open the second tab were you generated your authkey and paste it in.
Your server launch should look something like this:
srcds.exe -console -game garrysmod +maxplayers 42 +map rp_downtown_v4c -autoupdate +host_workshop_collection 195018086 -authkey XXXXXXXXXXXXXXXXXXXXXXX
Now that you have done that, Upon server restart your server will download every addon in the collection!!! So you want to add an addon? No problem. Just do this!:
Now a window should popup and your collection should be in there, Check it off and click okay! Thats it!
Now. When a player joins your server, It still isnt added to your FastDL. This is very simple. In your files go to garrysmod>garrysmod>lua>autorun>server. There should be a file called resource.lua. if not create it.
Now you need to paste the following code in:
if (SERVER) then resource.AddWorkshop( "113495466" ) // Example of an ID inputed. resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) resource.AddWorkshop( "" ) end
You can simply add your addons by going to the addon on workshop, and the ID is in the same spot as your collection ID was, Simply copy that id and paste it in the resource.AddWorkshop(“id goes here”)
Once that is done restart your server. IF YOUR SERVER IS BEING HOSTED BY NFO SERVERS, YOU MUST DO A WEBSYNC!!!
I hope you enjoy my second tutorial. This was just for the new people that host servers. I know alot of people have probems with this so i thought i’d explain it!
THANKS TO “CODE_GS” FOR REMINDING ME OF THE FOLLOWING: YOU CANNOT ADD YOUR COLLECTION TO RESOURCE.LUA, YOU MUST ADD EACH ADDON INDIVIDUALLY!!!
DISCLAIMER: There are already wiki’s FOR this topic, But this tutorial is for those who need step by step help installing or making items. DO NOT POST NEGATIVE COMMENTS ABOUT THE CURRENT WIKI’S THAT EXIST.