Garry's Mod

Garry's Mod

Not enough ratings
How to create your own theme. [PvP Registrator]
By Quay Brothers
Guide to creating visual themes for PvP Registrator addon.


   
Award
Favorite
Favorited
Unfavorite
Beginning
To begin with, I want to say: this text is exactly as good as Google translator translates. Please leave a comment if something is not clear.

So.. In the beginning, you will need to download an archive with an example-theme, it is an addon that you will edit and upload to the workshop.
Download Archive (DropBox) [www.dropbox.com]
Image Editing
Let's get started.
The first thing you should pay attention to is the .png images that are in the directory:"MyTheme\materials\vgui\MyTheme\".There you will find 4 files.
You must change these files respecting the approximate position of the text and linings
(Please don't change the resolution of these images).

This is what the top and bottom layers look like:
Please note that the field with hitboxes has a lining, in fact we have a PNG image with holes in the form of a miniature of the player, and when the player is killed, a square is drawn under them, in the right places. Therefore, when changing the player’s miniature, you need to try not to miss (it’s better not to change his shape).





How it looks with the picture:













As for the rest of the images, everything is much simpler with them, they do not have a bottom layer, only a top one. (do not forget about the same image but without the hitbox field ("MyTheme4.png") , it is needed for those cases when the player unchecks the "Show Hitbox Field")

After you have edited all the images, you must come up with original names for your images and an original name for the folder in which they are located.
Theme Properties
Once you have edited the images, you must assign a name and other options to your theme.
You need to open the file located in this directory:"MyTheme\lua\autorun\MyTheme.lua"
(You don't need to rename this file, but you can if you want.)

File contents:

All you have to do is assign your values.

Name = " " - You need to give an original name for your theme, you don't need to use spaces or characters from other languages.

Author = " " - You can fill in this field however you want :)

Next, you need to specify the paths to the images that you changed. You changed their name and folder name, right?

roundcellsscoretable = 12 - This value determines how round the corners of the cells in the miniature score table will be. 0 - square. 12 is optimal for rounded corners.

attencioncolor = Color(255,165,0) - This value determines the color of certain elements such as the hitbox and the "+1" next to the frags. it is orange by default. You can change it by changing the RGB color table. For example Color(0,0,0) for black.

hitboxliningcolor = Color(160,160,160) - Back layer color under thumbnail player hitboxes.

textcolor = Color(160,160,160) - The color of all text.
Testing
After you have completed all the previous steps, you should test your theme.
To do this, place the entire folder in the directory:
"...\Steam\steamapps\common\GarrysMod\garrysmod\addons\".
After that, restart the game. Your theme should appear in the list of available themes.
Publication
There are many ways you can upload your addon to the Steam Workshop. I am using GMPT.
All you need to do is select "Create" , select folder:"...\Steam\steamapps\common\Ga
rrysMod\garrysmod\addons\MyTheme" , fill in some fields and upload it!
Adding to the collection
Once you've uploaded your addon, write about it below in the comments and I'll add it to the theme collection for quick access from the game.