How to Upload to the Garrys Mod Workshop
Creating a Workshop Addon
This article will teach you how to set and upload an addon to the Steam Workshop.
Earlier you brainstorm - Rules
There are a few rules before you beginning uploading addons.
Delight see this page for consummate set up of rules: Steam Workshop Rules
The easy style
Y'all tin can use culling tools such as GUIs (graphical user interfaces) made past community members to create, extract and upload addons to Steam Workshop.
Links to such known tools: (experience free to aggrandize)
- gmpublisher (GUI for Windows, macOS and Linux)
- Garry'due south Modernistic Addon Tool (Windows)
- Garry'southward Mod Publishing Utility - Java based GUI wrapper
- gmosh - Command line interface wrapper
- Garry's Modernistic Easy Addon Uploader (for Windows only)
- LuaWorkshopper - Quick tool for Addon making and publishing
- Garry'south Modern 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 Modern'southward shipped tools, gmad.exe and gmpublish.exe.
Preparing your addon
To upload an addon to workshop you will need the post-obit things:
- A binder anywhere on your reckoner containing addon files
- A 512x512 .jpg icon for your addon.
If you're going to brand your addon public, delight brand sure it'southward unique and will add something new to Garry'south Modernistic. Don't upload addons you didn't brand, even fixed versions, without the author'southward consent.
Folder with addon files
The structure of addon for Steam Workshop is the same as the classic addon organisation of Garry's Modernistic 12, except for those differences:
- info.txt or addon.txt are not needed
- You tin can only upload files that would normally be mounted by the game, except for:
- .dll, .exe, .htm, .html, .css and .js files are restricted
- .txt files are restricted as well, except for vehicle scripts
- Total file path whitelist tin can be plant here:
- https://github.com/garrynewman/gmad/blob/master/include/AddonWhiteList.h
Yous addon binder structure must look somewhat similar this: (below is just an instance)
my_addon/ my_addon/lua/autorun/myScript.lua my_addon/materials/myMaterial.png my_addon/maps/gm_examplemap.bsp my_addon/maps/thumb/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/...
Here'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 "s" for sound folder. resource
my_addon is the binder you will need to input to gmad.exe or any other Workshop uploader and it's name could be annihilation, addon'due south name is divers on the Workshop Page for that addon and Not by the folder proper noun.
Case
Sample Addon is the binder you will need to provide to the gmad.exe to convert it to .gma.
Before uploading - test your addon
It is by and large a adept idea to practice a terminal test of your addon before uploading it to workshop to make sure everything works properly.
Doing so is easy, simply put your addon binder (in this example it would be called my_addon) into the game's steamapps/GarrysMod/garrysmod/addons/ binder and load up the game.
The icon
This must exist a 512x512 Baseline JPEG epitome ( Progressive JPEG or a PNG image will NOT work! ). If gmpublish.exe does not take your icon, endeavor reexporting it with Paint or Paint.NET, that should convert it to Baseline. The chroma must be 4:ii:0, for instance Photoshop and GIMP can use 4:ii:2 or iv:4:4, which are not accepted.
Do not employ an image unrelated to your addon - this is stupid and will get your addon removed. Limited your addon in epitome form.
Arrive relevant to your addon. Delight don't just stitch together something horrible in MS Pigment. Information technology should look good, otherwise yous'll be making the workshop look dirty. Besides, who wants to download something that looks like a three-yr-old made it?
addon.json
When creating an addon the binder should have an addon.json - which looks like this..
{ "championship" : "My Server Content", "type" : "ServerContent", "tags" : [ "roleplay", "realism" ], "ignore" : [ "*.psd", "*.vcproj", "*.svn*" ] }
title is the name of your addon.
blazon is the blazon of addon, one of:
"ServerContent" "gamemode" "map" "weapon" "vehicle" "npc" "tool" "effects" "model" "entity"
tags is up to two of these:
"fun" "roleplay" "breathtaking" "motion-picture show" "realism" "cartoon" "water" "comic" "build"
Ignore is a unproblematic wildcard list of files to ignore. Yous can have as many of these as yous desire - and they don't take to be wildcarded, they can be specific files.
Creating a .gma for upload
For Windows, you tin simply navigate to your GMad.exe in <STEAM LOCATION>/steamapps/common/garrysmod/bin and drag'northward'drop your addon folder ( my_addon in this example'' ) onto GMad.exe.
GMad.exe will at present create your .gma. It will place it to the same location where your folder is, with the same name.
Exercise not move GMad.exe anywhere!
Alternatively Y'all can open the command prompt (cmd.exe), cd to the gmod bin binder
(<tt>cd "<STEAM Binder>/steamapps/mutual/garrysmod/bin"</tt>, include quotes), then enter the following command (including quotes):
gmad.exe create -binder "<Full PATH TO ADDON Folder>" -out "<FULL PATH TO OUTPUT .gma FILE>"
Windows users can also create a .bat file to automate this process:
"C:\Program Files (x86)\Steam\steamapps\common\garrysmod\bin\gmad.exe" create -folder %ane pause
Just make sure to insert correct path to your GMad.exe.
Mutual Errors
[Files does not pass whitelist]
You have either dragged a wrong folder onto GMad.exe, your addon contains forbidden files or your addon has incorrect binder structure. See example higher up for right addon binder structure and file whitelist.
Couldn't parse json
Your JSON file is missing or it is invalid. Use any JSON validators to find and set errors.
Uploading your addon
There are multiple ways of doing that, we are going to cover only the about convenient way of doing this, if you are on Windows.
At this bespeak you lot should have a .gma file and a .jpg file. For the sake of making this easy, rename both files to take the aforementioned name, for example my_addon:
- my_addon.jpg
- my_addon.gma
Next you lot want to create a .bat file somewhere and put these commands in the .bat file:
"C:\Plan Files (x86)\Steam\steamapps\common\GarrysMod\bin\gmpublish.exe" create -addon "%~dpn1.gma" -icon "%~dpn1.jpg" pause
Salve it as something similar gmpublish_create.bat.
Once you got the .bat file prepare, simply drag'n'driblet your .gma or your .jpg onto that .bat file. It is essential that both files must have the aforementioned proper name.
Now gmpublish.exe volition 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, go to "My Shared Files" ( You tin as well become there from your profile ) and change visibility of your addon to Public.
You are done. Your addon is now live. You tin can now modify the championship, clarification, images and videos for your addon.
Note that rules likewise utilise to your championship, description, images, icon and videos:
- No questionable content
- No racism or offensive linguistic communication/cloth
Mutual Errors
Compression Failed
This is simple - your addon is too large. This is usually solved by downscaling your .vtf textures. Note that some video cards may not even support 4096x4096 textures! 1024x1024 or 512x512 are usually more plenty.
Make sure that if you are uploading a particularly texture-heavy addon that yous use DXT5 texture compression. DXT5 is exponentially smaller than RGBA or BGRA, saving not but time downloading and uploading only cloud space.
Ran out of quota
If this happened to you, contact robotboy655@facepunchstudios.com for help.
Addon has invalid type!
Your addon.json has the "type" tag set to an invalid value. You can see a list of allowed values in a higher place.
PublishWorkshopFile failed! (8)
This error 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 gear up your addon.json by editing it equally UTF-8 or use a title using simply US-ASCII characters (latin characters with no accents).
This error only happens after the upload considering the addon.json is packed inside of the sent GMA file.
PublishWorkshopFile failed! (9)
An icon must be provided.
PublishWorkshopFile failed! (Ten)
If yous encountered an error with a number that is not listed on this page, yous can find a listing of all Steam related error codes on this handy website: https://steamerrors.com/
Please note - that website is not associated with Steam, Valve or Facepunch in any way, and may be incomplete.
libsteam_api.so: cannot open up shared object file: No such file or directory
This is an error that may happen on Linux when gmpublish fails to notice its Steam API dependency. You can resolve this by copying the libsteam_api.so dependency from the game's bin/ binder to /usr/lib/, or by setting the LD_LIBRARY_PATH environs variable appropriately. See #4542 for more info.
After Going Live
Please make sure your addon isn't creating errors for people. If your addon is creating as well many errors it will be removed.
Y'all tin learn how to update existing workshop addons in this commodity: Workshop Addon Updating
Source: https://wiki.facepunch.com/gmod/Workshop_Addon_Creation
0 Response to "How to Upload to the Garrys Mod Workshop"
Post a Comment