Garry's Mod

Garry's Mod

92 beoordelingen
How to upload a map for Garry's Mod
Door Grandpa Gropes-A-Lot
When I was trying to upload my map to the workshop, I had major problems. I scoured google for an answer, and I found nothing complete, just parts of the process. Until I found one article and one video on this, so I decided to bring the two guides together.

NO (extra) programs needed, just gmod.

I uploaded the map I made using this exact process, to prove it works.
4
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Please 𝓀𝒾𝓃𝒹𝓁𝓎 GӨ П FЦᄃK YӨЦЯƧΣᄂF
This guide only covers uploading a map, with no custom content shipped with it.
For that you need pakrat, and that's easy enough to use, but do note it has the tendency to break maps occasionally, so don't trust it fully.
Creating addon folders
[1]Go to your desktop, create a folder. I will be referring to it as 'the addon folder'. From here on out, most folders and files names aren't customizable.

[2]Inside of the addon folder, create a new folder, name it 'maps'. Paste your bsp in the maps folder.

[3]Along side the new folder, not in it, right click>new>text document. Call the text document 'addon'. do not change this either.

[4]If you want a thumbnail that appears in the singleplayer menu, create a new folder in the maps folder named 'thumb', create a .png file with the same name as the .bsp file and place it in this folder.

[5]Create a new text file in the addon folder by right clicking the inside of the folder, new, text document.

[6]Inside of the text file, write this[pastes.io], changing the title and tags as they apply. (Alt link here[controlc.com] )
(Alt link 2) here
Website link



[7]Click on file, Save As, change the save as type under where you type the name of the file to 'all files', and type addon.json

  • List of map tags: ordered from most common to least common
  • Fun
  • Roleplay
  • Scenic
  • Movie
  • Realism
  • Cartoon
  • Water
  • Comic
  • Build

[8]Make a 512x512 JPEG image to be the thumbnail for your map, naming it anything you'd like. Then move the JPEG to the desktop, not into the upload folder. Also it can be whatever size you want as long as its even (I think, id do 128,256,512 to be safe.)
Gmad
[1]At this point, your folder should look like this (roughly):

[2]Open the garrysmod directory at "C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin"

[3]Scroll down to gmad.exe, drag the addon folder on top of gmad.

If it appears and closes immediately, with red text and no gma appears on the desktop, retry this guide from here up & refer to the errors section first entry.
Gmpublish/command prompt
[1]Move the JPEG picture to the inside of upload, along side the gma.
(i rename the gma file cause it looks nicer, I seriously doubt its impact on anything.)

[]Now your folder should have:

[1] Maps>testmap.bsp
[2] testmappicture.jpg
[3] testmap.gma
[4] addon.json


[2]Click start>type cmd>right click>run as administrator. Its not absolutely necessary to run as administrator, but there's a good chance if you can't do that, you cant write to the garrysmod directory.

[3]If your game directory and your OS directory is on a different drive (E: & C:, for example), then before you access each drive with each CD command below, you must type the first letter of the drive followed by a colon, ex "E:" before cd E:\.. or "C:" before cd C:\..
cd C:\Program Files (x86)\Steam\steamapps\common\garrysmod\bin
  • Change the (NAME) to your login name.

    gmpublish create -addon "C:\Users\(NAME)\Desktop\upload\testmap.gma" -icon "C:\Users\(NAME)\desktop\upload\testmappicture.jpeg"

  • If your file is named testmappicture.jpg, change this file extension to .jpg.

  • If successful, this will take a few minutes depending on the size of your addon.

[4]If there is red text on the command prompt says your addon is private then it is uploaded, then it is not visible to the public, but is visible to steam mods, apparently.

[5]Go to steam, hover over your name at the top, click 'content', click workshop items, click your addon, scroll down until you see visibility on the right, click the drop down arrow and click public.

Ensure you have agreed to the steam workshop rule thing, it should be an orange bar at the top of the addon page. When its public and you accepted the rules, anyone can download your map to play.
Updating the already uploaded map
[1]Very similar to how to publish it, open up Command Prompt and type cd C:\Program Files (x86)\Steam\steamapps\common\garrysmod\bin

[2]You need to get the ID of your workshop item to update it, open up steam and hover on your name at the top, go into content in the drop down, click workshop items, and click on your map. when you're on the workshop page for your map, it should say in green text at the top of the page that should say something like https://steamcommunity.com/sharedfiles/filedetails/?id=1111111111. Where it replace the (ID) in the command with this number. It must also be public to be updated.

[3]Then type gmpublish update -id (ID) -addon "C:\Users\(NAME)\Desktop\upload\testmap.gma"
Common errors:
Gmad appears for a split second and closes
You have to hit print screen right when it comes up to read it, or record it and pause the video when it appears. Read the error and go from there. Welcome to the source engine.

Could not open the map icon/gma file something like that, in gmpublish.
This is a tricky error, often you don't know what you did to fix it, why it fixed it, or how you'll fix it next time.
[1]You can try to resave the file in paint, overwriting the old file.
  • Open your image in an image editing software, such as paint.
  • Click File>Save
  • Pray
[2]You can also try saving it as a .jpg instead of .jpeg, sometimes that works. Ensure you change the -icon directory for command prompt to say .jpg if you do.
[3]That, or the directory to the image is wrong that you typed into command prompt.
[4]This happens for the gma too, except for the gma the directory is wrong, and is relatively straight forward.

(file) does not pass whitelist
Ensure you only have the files i said to put in upload, any others will whitelist everything. There is a few other things you can include in your addon, such as lua, and custom textures, models, and sounds. Wouldn't it be lovely if this was how you included custom content in your map? Doesn't work, for whatever reason.

Error (finding) json file
For gmad, the directory you told the command prompt is wrong.

Couldn't parse icon/json
There's something wrong with your json file. Ensure its correct, I suppose?
If you cant parse the icon, I honestly forgot why it happens but like you fuced up the picture make sure its 512x512 pixels and like its not png or something

Don't have permission to update your addon or some ♥♥♥♥♥.
Incorrect ID number in the command, or not logged into steam.

Error opening addon (does this file exist?)
Wrong file path in the command line to the .gma file.

Sᘺᗩᘜᘜᖻ
-Grandpa Gropes-A-Lot
380 opmerkingen
Kaylee83 28 apr om 17:33 
for gmpublish, in the cmd console type "cd" then your full folder path to the bin file. for example: cd C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin

then it should work. after that, do this (of course replacing the paths with your addon file paths):
gmpublish.exe create -icon path/to/image512x512.jpg -addon path/to/gma.gma
Tohλms 18 feb om 8:44 
I get this error when running cmd: "'gmpublish' is not recognized as an internal or external command, operable program or batch file."
Mr. System Error 1 dec 2023 om 9:44 
what should i paste in gmad.exe
Yes Man 22 okt 2023 om 12:04 
i ran cmb as admin but it says gmpublish isn't recognized
Grandpa Gropes-A-Lot  [auteur] 27 jul 2023 om 0:41 
I dont know how to make videos, sorry, but when id said Maps>testmap.bsp, i meant that only the bsp goes into that folder, everything else goes into upload. sorry for the confusion.
DeSpecifiedRed 21 jul 2023 om 8:30 
I'm a little confused about the last part of the tutorial (GMpublish/command prompt) could i get help on this. it's just a word soup, and i dont know what I'm trying look for, and what stuff to ignore. and the part when you said
[1] Maps>testmap.bsp
[2] testmappicture.jpg
[3] testmap.gma
[4] addon.json
i couldn't tell if you're trying to say that it's all supposed to go into the "Maps" folder, or if it's supposed to be in different places. anyway, thanks for the help thus far. (a video tutorial would be better, but i understand if you want to)
TUNG TUNG TUNG SAHUR 20 jul 2023 om 16:10 
babe wake up he posted the link
Grandpa Gropes-A-Lot  [auteur] 20 jul 2023 om 15:35 
you need to put a single tab indentation on all lines between the curly brackets, that doesnt paste
Grandpa Gropes-A-Lot  [auteur] 20 jul 2023 om 15:35 
{
"title" : "testmap",
"type" : "map",
"tags" : [ "fun", "build" ],
"ignore" :
[
"*.psd",
"*.vcproj",
"*.svn*"
]
}

hopefully this paste correctly, but this is the contents in the links
Grandpa Gropes-A-Lot  [auteur] 20 jul 2023 om 15:34 
I cant link to anything at all, not even youtube or the steam store, it says at the top of the page;
This item is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
They can absolutely piss off w/ that