Garry's Mod

Creating and uploading addons in WorkShop

Submitted by Boruto_uzumaki, , Thread ID: 192970

Thread Closed
07-01-2021, 11:41 PM
#1
1. Before starting, let's get acquainted with some rules!
Loading add-ons on the one hand is not difficult, but sometimes such a problem can arise as the withdrawal of an add-on from the Steam Workshop due to non-compliance with the rules!



1.1) Screenshots, Pictures and Addon Icons
Your add-on, screenshot or artwork must not violate the Steam Subscriber Agreement.
Your application must not contain offensive content. (For example, racism)

Your application must not contain pornographic material.

You must be the owner of the screenshot, picture and addon. Stolen work (even edited) is not allowed.




CODE OF RULES FROM THE OFFICIAL WIKI WEBSITE GarrysMod:
Your content must be done in GarrysMod (excluding icons). External modifications (Photoshop, etc.) are allowed. If it is not clear whether the content was made in Garrys Mod or not, then in the description you must include a clear indication of what it is!
Don't advertise servers in your artwork. The master class is not a billboard.


SPECIFIC RULES FOR ICONS OF ADDON:
Must be related to the addon / collection
The icon must not be empty
Random icons from google sake or addon downloads are not allowed. You must create it yourself




1.2) Video for addons
Your video must not violate the Steam Subscriber Agreement.
Your application must not contain pornographic material.
You must be the owner of the video. Stolen video (re-upload) is not allowed.




RULE WITH WIKI GarrysMod:
The footage must be done with GarrysMod. External modifications (After Effects, etc.) are not permitted. It should be clear that the video was made with GarrysMod.



1.3) Addons and Collections
The official Steam rules are pretty simple:

Your work must not violate the Steam Subscriber Agreement.
"https://store.steampowered.com/subscriber_agreement/english/"
Your application must not contain offensive content. (For example, racism)
Your application must not contain pornographic material.




HERE IS A HUGE SUMMARY OF RULES FROM WIKI ON GarrysMod:
Avoid requiring other addons. In some cases, this is acceptable if it is a gamemode addon. If your addon really requires another addon, then there should be no bugs in them. Otherwise, your addon will be removed. Your addon should be useful!
Avoid downloading packages unless that's all your job. You should use Workshop Collections instead.
Make an effort and do your cards well - addons with blank or horrible thumbnails will be removed.
No need to download "broken" add-ons, if you have a lot of errors in the files, the add-ons will be removed. These could be Lua bugs, missing custom models, sounds or materials. You should always check your addons!
No need to download multipart addons.
Do not reload add-ons without changes; add-ons reloaded this way will be deleted. Reloading add-ons from WorkShop is strictly prohibited!

Don't upload malicious code! All addons that have malicious code will be removed.
No need to upload malicious code! All addons containing any backdoor will be removed. This includes gaining access to user data (SteamID checks, giving themselves administrator status, RunString, spawning persons, etc.), forcing people to be connected to various malicious servers against their will (virus).
Do not download retail game content! All add-ons containing any content from a paid game (for example, CS: S, Portal or Half-Life 2 games) will be removed. Your account may receive restrictions (VAC-ban) for this!

Don't post duplicates of your addons! It will be removed. If someone re-uploads your addon, it will be removed for copyright infringement!
Don't overuse "tags" for your addon! An addon with many tags will be removed.
Do not download empty addons and plugins that require the user to download something from the description! External links are not allowed.
It is not necessary to download 'Test' addons (Trial versions), but rather work it out properly.
Don't put (web) ads in your addons!



2) Create an addon
You will have to create models and everything you need yourself!
In this video you will learn what you need for your add-on and how to create it (namely, what should be included in it) ... The video is not mine, but I think it can help you!

"https://www.youtube.com/watch?v=4TOJYuP1sAg"
"https://www.youtube.com/watch?v=7Jlag-Emd78&feature=emb_title"



2.1) An excerpt on creating addons or game mods from Wiki
ATTENTION !!! THESE ARE NOT MY WORDS !!! JUST COPYED FROM VICKI !!!
It depends on what exactly you want to create. You can get by with lua scripts alone, you can only use models / textures, or you may need both.
Before creating your own mods for Garry's Mod, you need to understand the lua language.
"http://wiki.garrysmod.com/page/Main_Page" is the official Garry's Mod wiki that contains all the possible lua operators, but this wiki is very crude. In most cases, there is no description, which means it will be difficult to figure it out.

"http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4875.html" - the old official wiki, which may have slightly fewer operators (and some are outdated), but just a sea of description and example codes. there are also lessons on lua
(http://maurits.tv/data/garrysmod/wiki/wi...x7a06.html).
If you are going to do something, I advise you to use both wikis at the same time.
If writing your codes from scratch is hard for you, take a different path. Download something ready-made and try changing it. I myself did exactly that at one time, then I used only the wiki (then there was no new one yet), but right now I can do without everything.
After reading all this, you will probably no longer want to do anything, because the volume of work will seem very large to you. There is nothing of the kind. If you figure it out, it will all be easier than going through Mario.



3) Preparing to download the addon
The structure of the Workshop addon is slightly different from the addon system for Garry's Mod 10-12:
info.txt and addon.txt are not needed
.txt files are limited, excluding transport scripts.
.dll, .htm, .html, .css and .js files are also limited.




The addon folder structure should look like this:
myAddon /
myAddon / lua / autorun / myScript.lua
myAddon / materials / myMaterial.png
myAddon / maps / gm_examplemap.bsp
myAddon / maps / thumb / gm_examplemap.png (the location of gm_examplemap.png in the maps folder is now prohibited)
myAddon / gamemodes / mygamemode / ...


myAddon - folder that will be uploaded to the Workshop, its name can be anything




3.2) Addon preview
The icon must be 512x512 in size and with a JPG extension. Do not use images that are not related to the addon. Describe your addon with an image. Please do not make the image in pint. Make it in GIMP, PhotoShop. The preview should be beautiful and speaking!



3.3) Program for publishing addon
In this tutorial, we will use an unofficial tool to publish addons in the workshop. It's called Garry's Mod Publishing Utility (GMPU) by alatnet.
Official thread on the Facepunch forum [www.facepunch.com]

(the English version can be found in the thread at the link above)
The first time you start the program, it will ask you to specify the paths to the files gmad.exe and gmpublish.exe. Standard file paths:


32-bit system: C: \ Program Files \ Steam \ SteamApps \ common \ GarrysMod \ bin
64-bit system: C: \ Program Files (x86) \ Steam \ SteamApps \ common \ GarrysMod \ bin


After setting the file paths, the main application window opens. Go directly to the settings and be sure to check the boxes "Convert file names to lowercase", "Open browser after add-on is finished", and, if you want, "Automatically delete completed actions".

4) Download addon
We now have everything to download the addon to WorkShop! Now, step by step, we will work a miracleWink)



4.1) Publishing an addon
Step 1. So let's get started. In the Mode section, select [Create]. Then, in the New \ Create GMA \ Update section, find the [Folder] button (opposite File or folder Smile. In the window that opens, select the folder with the add-on. And if you have a ready-made GMA file, then select [File] and in the window that opens, select this very file. Then click on [Download] next to Icon :, and in the window that opens, select the desired icon. If the icon appears in the preview - everything is fine, no - check the log, see what is wrong, fix it and move on.
Step 2. Go to the Addon.json section. In the Title field, enter the name of the add-on (it can be changed later via the add-on page in the workshop), then select the add-on type and tags (maximum 2, so choose the ones that are most suitable for the add-on). Ignore field: do not touch.
Click the "Add to queue" button, click the "Run" button on the top right, and wait for a while. If everything goes well, a tab with your newly downloaded add-on will open in the browser. Subscribe to it, test its work, and if everything is fine, then change the name of the addon (if necessary), add a description, screenshots, video, and put on the addon page:



5) Updating an existing addon
If you have made a fix for your add-on, or added something new to it, you need to update it.
The update procedure is identical to the publication procedure, except that in the Mode section you need to select Update, in the Add-on List section you need to find and select the add-on you want to update, as well as in the Changes field: if you wish, you can describe the changes (the description text can be change in the Changelog tab on the add-on page in the workshop).
The update is complete!



6) Addition. "And I also want to update the add-on icon !!!"
Chances are, you've already noticed that you cannot select a different preview in update mode, although you can technically update it. How so? I answer. This is due to the fact that the latest version of GMPU was released already in 2013, and the ability to update the preview appeared much later. Therefore, we will not be able to update the icon through the program (I would gladly complete everything to my mind, if I had the source code and knowledge of the Java language).
But we need to somehow update the icon, right? How can you do this? It's very simple !!!




6.1) First, we find out the ID of our addon
Method 1. Go to the page of your add-on, and look at the address bar. There will be an address like: _steamcommunity.com_ / sharedfiles / filedetails /? Id = 123456789. The numbers at the end are the ID.
Method 2. Run the command (from the console, the ways to open it are below):
gmpublish.exe list
And find the addon you need there.



6.2) Icon update
Method 1.
Press the Win + R keyboard shortcut. Then write cmd in the window that opens. Next, copy the following command:
32-bit system: cd C: \ Program Files \ Steam \ SteamApps \ common \ GarrysMod \ bin
64-bit system: cd C: \ Program Files (x86) \ Steam \ SteamApps \ common \ GarrysMod \ bin
Method 2. Works on Windows 7 and higher (not sure, please write in the comments)
Go to the Garry's Mod folder, the paths are indicated above. Then press Shift + RMB on an empty space in the folder and select "Open Command Window"! After that we enter the following command (parameters in square brackets are optional):
gmpublish.exe update -id ADDON_ID -icon path \ to \ icon.jpg [-changes "Describe the changes"]
The update is complete!




7) When the addon was added
Please make sure that the addon does not generate errors. If it creates too many errors, then it can be removed.



Sources !!!
Materials from the sites http://wiki.garrysmod.com and http://facepunch.com were used, as well as some guides on Steam !!! https://steamcommunity.com/sharedfiles/f...=124230685 Addons Download Guide !!!

Users browsing this thread: 1 Guest(s)