Workshop Addon Creation

From Garry's Mod
(Redirected from Workshop/Creating addons)
Jump to: navigation, search

Contents

Creating a Workshop Addon

This article will teach you how to prepare and upload an addon to the Steam Workshop.

Before you begin - Rules

There are a few rules before you start uploading addons.

  • Do not upload multi-part addons. What this means is that if your addon won't fit in a single addon - do not upload it.
  • Avoid requiring other addons. In some cases this is permissible - like if it's an addon for a gamemode. But making a weapon that requires another weapon to function is not allowed. If your addon does require another addon - it shouldn't error if that addon isn't present. It should just do nothing.
  • Erroring addons get removed - This includes Lua errors, missing custom models, sounds or materials.
  • Avoid uploading packs - Unless they're all your work. A pack of your maps is fine. A pack of maps you found that you think are cool is not fine. A pack of your weapons are fine. A pack of cool weapons you downloaded is not fine.
  • Make an effort with the thumb - Addons with blank or irrelevant thumbnails get banned. If you can't be bothered to make an icon for it then don't bother uploading it.
  • Do not reupload addons - Reuploaded addons will be taken down. Search workshop before uploading.
  • Do not release stolen code - All addons that are proven to have stolen code will also be taken down.
  • Do not upload malicious code - All addons containing any sort of exploit or backdoor will be removed.
  • Do not upload game content packs - All addons containing any game content ( for example CS:S, Portal or Half-Life 2 series content packs ) will be removed. Your account can be terminated for this!
  • Do not reupload newer versions of your addons - Update the old one, don't upload a new one. Duplicates will be removed.
  • Do not abuse tags - Mistagged addons will be banned. This is mostly applicable to the gamemode tag, if you are uploading a content pack for your server, tag it as such.
  • Do not advertise your servers in your addons - Workshop is a place for people to get their addons, not an advertising board.

Preparing your addon

To upload an addon to workshop you will need next things:

  • A folder anywhere on your computer containing addon files
  • A 512x512 .jpg icon for your addon.

If you're going to make your addon public, please make sure it's unique and will add something new to Garry's Mod. Don't upload addons you didn't make, even fixed versions, without the author's consent.

Folder with addon files

The structure of addon for Steam Workshop is the same as the classic addon system of Garry's Mod 12, except for those differences:

  • info.txt or addon.txt are not needed
  • You 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 too, except for vehicle scripts


You addon folder structure must look somewhat like this: (below is just an example)

myAddon/
myAddon/lua/autorun/myScript.lua
myAddon/materials/myMaterial.png
myAddon/maps/gm_examplemap.bsp
myAddon/gamemodes/mygamemode/...

myAddon is the folder you will need to input to gmad.exe or any other Workshop uploader and it's name could be anything, addon's name is defined on the Workshop Page for that addon and NOT by the folder name.

The icon

This must be a 512x512 JPG image. If gmpublish.exe does not accept your icon, try resaving it with Paint or Paint.NET.

Do not use an image unrelated to your addon - this is stupid and will get your addon removed. Express your addon in image form. Make it beautiful. Please don't just stitch together something horrible in MS Paint. It should look good, otherwise you'll be making the workshop look dirty. Besides, who wants to download something that looks like a three-year-old made it?

Creating a .gma for upload

This process if very simple, navigate to your gmad.exe in <STEAM LOCATION>/steamapps/common/garrysmod/bin and drag'n'drop your addon folder ( myAddon in this example ) onto GMad.exe.

GMad.exe will now create your .gma. It will place it to the same location where your folder is, with the same name.

Do not move GMad.exe anywhere!

Common Errors

[Files does not pass whitelist]

You have either dragged a wrong folder onto GMad.exe, or your addon contains forbidden files. See above.

Uploading your addon

There are multiple way of doing that, we are going to cover only the most convenient way of doing this, if you are on Windows.

At this point you should have a .gma file and a .jpg file. For the sake of making this easy, rename both files to have the same name, for example myaddon:

  • myaddon.jpg
  • myaddon.gma

Next you want to navigate to your gmpublish folder and create a .bat file there:

gmpublish.exe create -addon %~n1.gma -icon %~n1.jpg

Save it as something like gmpublish_create.bat.

Once you got the .bat file ready, simply drag'n'drop your .gma or your .jpg onto that .bat file. It is essential that both files must have the same name.

Now gmpublish.exe will go through the process of compressing and uploading the addon to Steam Workshop.

Once that process is completed, open your Garry's Mod Steam Workshop, go to "My Shared Files" ( You can also get there from your profile ) and change visibility of your addon to Public.

You are done. Your addon is now live. You can now change the title, description, images and videos for your addon.

Note that rules also apply to your title, description, images, icon and videos:

  • No questionable content
  • No racism or offensive language/material

Common Errors

Compression Failed

This is simple - your addon is too big. 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 than enough.

Ran out of quota

If this happened to you, contact me at robotboy655@facepunchstudios.com.

Alternatives

You can use alternative tools made by community members to create, extract and upload addons to Steam Workshop.

Links to such known tools: ( feel free to expand )

After Going Live

Please make sure your addon isn't creating errors for people. If your addon is creating too many errors it will be removed.

You can check for addon errors by visiting this site.

Personal tools
Navigation