Adding steam addons to your server AND FastDL

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


Simply add


+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!

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.

You should remind players that collections are not supported by resource.AddWorkshop, and is it really necessary to put if (SERVER) then? Just put it in lua/autorun/server

You can also automate the resource.AddWorkshop to add anything in your collection so that you can manage your server contents entirely via steam.

[editline]15th November 2013[/editline]

http://forum.facepunch.com/showthread.php?t=1298882&p=41831591&viewfull=1#post41831591

Good Job. http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers

why are you always being so aggressive

he went further than that tutorial shows

[editline]15th November 2013[/editline]

is this angst or what

Very true, He may be having a bad day or something. I dont really think about or care too much.

The problems are those:

I am sorry if I seem to be aggressive, but posting tutorials here won’t help that many people because, again, they are buried under endless question threads.

I dont know if you even read the original post. But here. Since you cant read well

“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.”

Its at the very bottom. has always been.

Yes they will be buried, but when people search google on how to use workshop with a Garry’s Mod, this tutorial will show up. Sometimes, it’s better to have multiple sources for help or tutorials.

Exactly my point. Thank you.

Can’t disagree, but this is true only when people actually search before asking questions. And it is easier, at least for me, to link tutorials from wiki instead of going to google and search for the tutorial every time.

I can’t add anything to me steam collection, it’s just stopped, I was able to do it for a while, and now things cannot be added to it, I can’t see what I have added a few days ago! What do I do?

Steam broke it, go complain to them.

resource.AddWorkshop does not require an API key or collection to work, so the only real reason to use one is laziness because of not having to upload them yourself, which is also dangerous because of backdoors. I wouldn’t recommend doing it this way because of the reliability of Steam, and if decompressing an addon, checking through it and then uploading it is too much work, I don’t know if you should be running a server.