How to Upload an Addon to Gmod
Creating a Workshop Addon
This article will teach you how to set up and upload an addon to the Steam Workshop.
Earlier you begin - Rules
There are a few rules before you outset uploading addons.
Please see this folio for consummate set of rules: Steam Workshop Rules
The easy mode
Yous can employ alternative tools such as GUIs (graphical user interfaces) fabricated by community members to create, extract and upload addons to Steam Workshop.
Links to such known tools: (feel gratis to expand)
- gmpublisher (GUI for Windows, macOS and Linux)
- Garry's Mod Addon Tool (Windows)
- Garry's Modernistic Publishing Utility - Java based GUI wrapper
- gmosh - Command line interface wrapper
- Garry'due south Mod Piece of cake Addon Uploader (for Windows only)
- LuaWorkshopper - Quick tool for Addon making and publishing
- Garry's Mod Workshop Utility (Easy create, upload..etc)
- Crowbar (Unpack, Publish, and Pack) -- Publish to Workshop via Crowbar (Guide)
Alternatively, the guide below describes how to upload addons to the Steam Workshop using Garry's Mod's shipped tools, gmad.exe and gmpublish.exe.
Preparing your addon
To upload an addon to workshop you will need the following things:
- A folder anywhere on your reckoner containing addon files
- A 512x512 .jpg icon for your addon.
If you lot're going to make your addon public, please make sure it'south unique and volition add something new to Garry's Mod. Don't upload addons you didn't brand, fifty-fifty fixed versions
, without the author'south consent.
Folder with addon files
The construction of addon for Steam Workshop is the same as the archetype addon organisation of Garry's Mod 12, except for those differences:
- info.txt or addon.txt are not needed
- You can only upload files that would usually be mounted past the game, except for:
- .dll, .exe, .htm, .html, .css and .js files are restricted
- .txt files are restricted besides, except for vehicle scripts
- Full file path whitelist can exist found here:
- https://github.com/garrynewman/gmad/blob/chief/include/AddonWhiteList.h
Y'all addon folder structure must look somewhat like this: (below is but an example)
my_addon/ my_addon/lua/autorun/myScript.lua my_addon/materials/myMaterial.png my_addon/maps/gm_examplemap.bsp my_addon/maps/pollex/gm_examplemap.png my_addon/gamemodes/mygamemode/mygamemode.txt my_addon/gamemodes/mygamemode/gamemode/stuff.lua my_addon/gamemodes/mygamemode/content/materials/mycontent.vtf my_addon/gamemodes/mygamemode/entities/weapons/weapon_mygun.lua my_addon/gamemodes/mygamemode/...
Hither's all the folder names that your addon may contain, next to the addon.json file:
maps backgrounds gamemodes materials lua scenes models scripts particles sound - This is not a typo, there is no "south" for sound folder. resource
my_addon
is the folder you will need to input to gmad.exe
or any other Workshop uploader and it's name could be annihilation, addon's proper noun is defined on the Workshop Page for that addon and NOT past the folder name.
Example
Sample Addon is the folder you will demand to provide to the gmad.exe
to catechumen it to .gma
.
Before uploading - test your addon
It is generally a proficient idea to do a final exam of your addon earlier uploading it to workshop to make sure everything works properly.
Doing so is easy, just put your addon folder (in this example it would be called my_addon
) into the game's steamapps/GarrysMod/garrysmod/addons/
folder and load upwards the game.
The icon
This must
be a 512x512 Baseline JPEG paradigm ( Progressive JPEG or a PNG prototype will Not piece of work! ). If gmpublish.exe does not have your icon, attempt reexporting information technology with Paint or Paint.NET, that should catechumen it to Baseline. The blush must be iv:2:0, for instance Photoshop and GIMP can use 4:two:2 or four:4:4, which are not accepted.
Do not utilize an epitome unrelated to your addon - this is stupid and will get your addon removed. Limited your addon in prototype form.
Brand information technology relevant to your addon. Please
don't simply stitch together something horrible in MS Pigment. It should look good, otherwise you lot'll be making the workshop look muddy. Likewise, who wants to download something that looks like a three-yr-old fabricated it?
addon.json
When creating an addon the folder should take an addon.json - which looks like this..
{ "title" : "My Server Content", "type" : "ServerContent", "tags" : [ "roleplay", "realism" ], "ignore" : [ "*.psd", "*.vcproj", "*.svn*" ] }
title is the name of your addon.
type is the blazon of addon, one of:
"ServerContent" "gamemode" "map" "weapon" "vehicle" "npc" "tool" "effects" "model" "entity"
tags is upwardly to two of these:
"fun" "roleplay" "scenic" "flick" "realism" "cartoon" "water" "comic" "build"
Ignore is a simple wildcard list of files to ignore. Yous tin have every bit many of these every bit you want - and they don't have to exist wildcarded, they can be specific files.
Creating a .gma for upload
For Windows, you lot can only navigate to your GMad.exe in <STEAM LOCATION>/steamapps/mutual/garrysmod/bin and drag'n'drop your addon binder ( my_addon
in this instance'' ) onto GMad.exe.
GMad.exe will at present create your .gma. It will place it to the same location where your binder is, with the same proper noun.
Do not movement GMad.exe anywhere!
Alternatively You lot can open up the command prompt (cmd.exe), cd to the gmod bin folder
(<tt>cd "<STEAM FOLDER>/steamapps/mutual/garrysmod/bin"</tt>, include quotes), then enter the following command (including quotes):
gmad.exe create -folder "<Full PATH TO ADDON FOLDER>" -out "<Total PATH TO OUTPUT .gma FILE>"
Windows users tin can also create a .bat file to automate this procedure:
"C:\Program Files (x86)\Steam\steamapps\common\garrysmod\bin\gmad.exe" create -folder %1 pause
Only make certain to insert correct path to your GMad.exe.
Mutual Errors
[Files does not pass whitelist]
Y'all have either dragged a incorrect folder onto GMad.exe, your addon contains forbidden files or your addon has incorrect folder construction. See instance in a higher place for correct addon folder structure and file whitelist.
Couldn't parse json
Your JSON file is missing or it is invalid. Utilize any JSON validators to find and fix errors.
Uploading your addon
In that location are multiple means of doing that, we are going to cover only the most user-friendly way of doing this, if you lot are on Windows.
At this betoken you should take a .gma file and a .jpg file. For the sake of making this piece of cake, rename both files to have the aforementioned name, for example my_addon
:
- my_addon.jpg
- my_addon.gma
Next yous desire to create a .bat file somewhere and put these commands in the .bat file:
"C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin\gmpublish.exe" create -addon "%~dpn1.gma" -icon "%~dpn1.jpg" suspension
Save information technology every bit something similar gmpublish_create.bat.
One time you got the .bat file ready, simply drag'n'drop your .gma or your .jpg onto that .bat file. Information technology is essential that both files must have the same proper noun.
Now gmpublish.exe will go through the process of compressing and uploading the addon to Steam Workshop.
One time that process is completed, open up your Garry's Modern Steam Workshop, become to "My Shared Files" ( You can also get in that location from your profile ) and alter visibility of your addon to Public.
You are done. Your addon is now live. Y'all can now change the title, clarification, images and videos for your addon.
Annotation that rules besides apply to your title, description, images, icon and videos:
- No questionable content
- No racism or offensive language/cloth
Common Errors
Pinch Failed
This is simple - your addon is besides large. This is unremarkably solved past downscaling your .vtf textures. Note that some video cards may not even support 4096x4096 textures! 1024x1024 or 512x512 are usually more than enough.
Make sure that if you are uploading a particularly texture-heavy addon that you use DXT5 texture pinch. DXT5 is exponentially smaller than RGBA or BGRA, saving not merely time downloading and uploading but deject space.
Ran out of quota
If this happened to you, contact robotboy655@facepunchstudios.com for assist.
Addon has invalid type!
Your addon.json has the "type" tag set up to an invalid value. You lot can see a list of immune values above.
PublishWorkshopFile failed! (8)
This mistake happens when the addon.json contains invalid UTF-8 sequences. This happens if you use an upload script (.cmd, .bat, etc) that cannot create the addon.json with the UTF-8 character set. Please fix your addon.json by editing it every bit UTF-8 or utilise a championship using only The states-ASCII characters (latin characters with no accents).
This error only happens after the upload because the addon.json is packed inside of the sent GMA file.
PublishWorkshopFile failed! (nine)
An icon must exist provided.
PublishWorkshopFile failed! (X)
If you encountered an error with a number that is non listed on this page, you tin can detect a list of all Steam related error codes on this handy website: https://steamerrors.com/
Please annotation - that website is non associated with Steam, Valve or Facepunch in any way, and may exist incomplete.
libsteam_api.so: cannot open shared object file: No such file or directory
This is an error that may happen on Linux when gmpublish fails to observe its Steam API dependency. Y'all can resolve this by copying the libsteam_api.so
dependency from the game's bin/
folder to /usr/lib/
, or by setting the LD_LIBRARY_PATH
environment variable accordingly. Run into #4542 for more than info.
After Going Alive
Delight make sure your addon isn't creating errors for people. If your addon is creating too many errors it will be removed.
Y'all tin can learn how to update existing workshop addons in this article: Workshop Addon Updating
Source: https://wiki.facepunch.com/gmod/Workshop_Addon_Creation
0 Response to "How to Upload an Addon to Gmod"
Post a Comment