Garry's Mod

Garry's Mod

113 ratings
How to put a map on the Gmod Workshop [Windows] [Outdated]
By Vizzys
A guide to uploading your garrysmod maps to the steam workshop from start to finish.
   
Award
Favorite
Favorited
Unfavorite
Gathering the Tools
Guide is outdated, use the gui tool at bottom
Welcome to my first guide ;)
If you wish to upload a map on the Garrysmod workshop you will need the following command line tools and files made by Garry Newman himself.
  • gmad.exe
  • addon.json
  • gmpublish.exe
  • steam_api.dll

You can find gmad.exe, gmpublish.exe and steam_api.dll already in your /steamapps/common/garrysmod/bin/ folder.

UPDATE: 12/02/2015 - The Garrysmod devs have contacted me and asked to stop hosting their files because it will conflict with an upcoming update. In the mean time I suggest skipping down to the bottom of the guide and using the GUI method

Adding your .bsp
At this point you will also need to add the .bsp map you wish to upload to the folder I have named youraddonname/maps
You may also rename the folder youraddonname to whatever you wish, it is merely an example folder name. Do not rename the folder named maps.


Creating addon.json file
first create a folder called workshop
then create a folder inside that with your addon name
now create a new file named addon.json
place the addon.json file in /youraddonname/ folder

this file tells the workshop about your map name and such as you upload it

Right click the file and open/edit with notepad

or download notepad++ and open it with that



Here is a picture of what should be inside

Here is an url with a list of values it accepts if you wish to change them:

facepunch.com gmad.exe discussion[facepunch.com]

These values CANNOT be edited once you have your file on the workshop, so be careful. Read the link for in depth info
Setting up file permisson
Now that you have the files we need to make sure they have proper permission on your computer.

Right click gmad.exe and click the compatibility tab
Check the box that says run file as administrator.
Now do the same for gmpublish.exe

These files need to be ran as administrator to function correctly.

Here is a picture as reference so you can check that you are doing it right


Press Ok
Creating a .gma file
Addons for garrysmod are held in a custom format called .gma

To upload files onto the steam workshop you need to convert content into one of these files.

This is done with gmad.exe

Unfortunately if you double click gmad.exe you may see a screen popup then close suddenly.

This is because it is a command line tool and it needs parameters given in order to function correctly.

Step 1.
Navigate to the folder gmad.exe is in with command line.

If you do not know how to navigate windows via command line, that's ok.
Hold the Shift key on your keyboard and right click the workshop folder like so:

Click the text that says open command window here.

Step 2.
A command line box pops up to the folder location gmad.exe and such are in.
Boy this is handy.

Now type the following into the command line:

gmad.exe create -folder "C:\Users\USERNAME\Desktop\workshop\youraddonname" -out "C:\Users\USERNAME\Desktop\workshop\youraddonname"

'USERNAME' being your windows username.
Your hard drive might also not be C:\ as mine, make sure its correct.


When you think the paths are all correct press ente
r and it will compress your map into .gma
This may be fast or slow depending on map size.

If successful you will find a .gma in the workshop folder
Create a preview icon image
When you view an item on the steam workshop it has a thumbnail preview image.

You will need to create or find one.

Any image, in .jpg or .gif format
The only requirement that I know is it MUST be 512x512 pixels. And probably not too big filesize.

Open up Paint or Photoshop and get crackin. (note: gimp causes issues sometimes)

I have included an example "image.jpg" in the workshop folder.
Use it if you wish, I dont mind.



UPDATE: 12/8/2014
gmpublish.exe can now update the workshop icon with the following command:
gmpublish.exe update -id 1337 -addon path/to/gma.gma -icon path/to/image512x512.
jpg

Publishing your .gma file with gmpublish
So now you have created your .gma and a preview image, congrats.

But WHAT NOW

now you need to upload it using gmpublish.exe

Open the workshop folder in command line once again.

type the following:

gmpublish create -addon "C:\Users\USERNAME\Desktop\workshop\youraddonname.gma" -icon "C:\Users\USERNAME\Desktop\workshop\image.jpg"
again:
'USERNAME' being your windows username.
Your hard drive might also not be C:\ as mine, make sure its all correct.

STEAM MUST BE RUNNING FOR THIS TO WORK

Assuming all goes well, it will compress your file and upload it.

This will take a long time

Here is an example of what you will see if all goes well:


If things do not go well, you probably have the paths incorrect or steam not running. or your internet went out or something during the upload.

Here is the gmpublish link so you can ask facepunch for help.
http://facepunch.com/showthread.php?t=1244179

You are almost done! Keep readin
Making your file public
When you upload a file to the steam workshop by default it is set to private meaning only you can subscribe and make sure it works.

Here is a pic showing you how to change that from the workshop area of steam:


Choose public and now the file will appear on the steam workshop!

You can now link all your friends and show them your new map, they too can subscribe and play it!
Updating your published map
updating
Not only can you publish addons with gmpublish you can also update them using the -update flag. just be sure to include your updated .gma.

An example:
gmpublish update -addon "C:\Dropbox\tests\workshop\out2.gma" -id "123456" -changes "Fixed something"
id being your items workshop id in the steam address bar
changes being a changelog (can be changed at any time via workshop page)


UPDATE: 12/8/2014
gmpublish.exe can now update the workshop icon with the following command:
gmpublish.exe update -id 1337 -addon path/to/gma.gma -icon path/to/image512x512.
jpg
Alternative GUI Tool Method
GUI tool

A GUI for gmad and gmpublish has been constructed, here is the link:

https://sourceforge.net/projects/garrysmodpublishtool/

or google search gmpu 2.2


I did not make this program, please do not ask me to support it
this program requires sun java is installed, make sure you have it

For extra workshop help add a comment below, I may reply.
212 Comments
Viro 31 Oct, 2021 @ 3:04am 
the bosnian community is even smaller
Viro 31 Oct, 2021 @ 3:04am 
Beigol say that to me a bosnian
义がSpyあい义 19 Sep, 2020 @ 8:10am 
outdated
ZeqMacaw 3 Jan, 2020 @ 5:11am 
Another alternative GUI tool: Crowbar (Publish tab)
Flakey 3 Jan, 2020 @ 5:01am 
Hey Cmd How about a nice game called FAK YOU!
Rubat 8 Jun, 2018 @ 8:30am 
And what if he writes that some error in the publication, and at the end (9)?
𝔹𝔸ℕ𝕀𝔻𝕆 9 Apr, 2018 @ 4:58pm 
Ty
=-[Plush Companion Cube]=-™ 10 Mar, 2018 @ 3:23pm 
wont fucking work
beigol 28 May, 2017 @ 7:36pm 
But you can do it with google translate, The spanish community is poor
Vizzys  [author] 28 May, 2017 @ 6:44pm 
sorry I dont know spanish. use gmpu 2.2
its easy