Portal Home > Knowledgebase > Addons > Adding and Using Workshop Addons

Adding and Using Workshop Addons

Want to know how you can make the server and your users download workshop addons? There are a few simple steps to this process to make it happen. Please follow these carefully.

First of all, you would need to compile a collection of addons from the Steam workshop that you would like to have on your server. It is recommended that you place the map that you want to use for the server in the collection too.
To create a collection for Garry's Mod, log into Steam and then click the following link http://steamcommunity.com/workshop/editcollection/?appid=4000 . Follow the steps to create a collection on this page and then proceed to the next step once your finished creating the collection. Please also keep a note of the Collection ID (This is found in your internet browsers address bar. This will look similar to 123456789) after creation as you will need it later on.

Next you would need to add addons to your collection. Visit the page for your Workshop addons one by one. On the addon page you should see be able to see "Add to Collection" under the addon image/s. Click this and then tick the box of the collection, you would like to add this addon to, then click "OK". After clicking on "OK", it will add this specific addon to your collection.

You will need to copy your unique API key from steam for the next part. You can find this key by going to the following link. 

Go into your game control panel (http://uk.vaugaming.com:8880) and select "Command Line Manager". Select the "Custom Commandlines" tab and if you haven't already create a new Commandline. Enter your Steam API in "AuthKey" and insert your collection ID into "CollectionID". 

On the next restart that you initiate, the collection addons will download to your game server and send the data for the addons to the user.

My users are getting errors... what do I do?

If your users are receiving errors, you are going to have to force them to mount the addons. To complete this action, create a new file in the directory "garrysmod/lua/autorun" with the name as resource.lua then edit this file and place this information inside of it.

if SERVER then
   resource.AddWorkshop( "123456789" )

Instead of 123456789, replace these numbers with the ID of the addon you want. You need to repeat the line resource.AddWorkshop for each of the addons in your collection.
You can retreive this ID by viewing an addon and copying the numbers out of your Internet Browser's address bar.

Also Read