Skip to content

Class Generator

Create specialized battalions inside a faction, such as medics, officers, or other role-focused subgroups. Classes are the right layer for role-specific models, weapons, bodygroups, permissions, limits, and spawn behavior without changing character-specific data more than necessary.

Output Location:

garrysmod/gamemodes/[schema folder]/schema/definitions/sh_classes.lua

You can also add callback fields like OnCanBe, OnSet, OnTransferred, OnLeave, OnSpawn, or any custom logic manually after generation. You can find those in Class Definitions.

The constant name you want to assign to the registered class index.
The faction this class belongs to.
Players need to be whitelisted before they can join this class.
Automatically assigned to new characters in this faction. Only one class per faction should have this set.
How many players can be in this class at once. 0 means unlimited.
The model or models this class can use. Each entry is split into a model row and a second row for the skin/bodygroup rules tied to that model.
Use three numbers from 0 to 255. Leave empty to use the faction color.
Default skin number for this class.
Bodygroup values this class should use by default. You can retrieve these in-game with the `viewbodygroups` UI, which includes a copy option.
Material overrides this class should use by default.
Logo shown for this class. You can use a material path or a web URL.
Character size. Leave empty for normal size.
Health for this class.
Armor for this class.
How much this class gets paid each paycheck.
How often this class gets paid. Leave empty to use the faction or server salary timer.
Blood color used for this class. Leave default for normal human characters.
Run speed multiplier. Use 1 for normal speed.
Walk speed multiplier. Use 1 for normal speed.
Jump multiplier. Use 1 for normal jump height.
Weapons this class receives on spawn.
If true, this class is not shown as a row in the scoreboard.
Members of this class can invite players to the faction.
Members of this class can invite players to classes.
How NPCs react to this class.
Command names that members of this class can execute, bypassing normal privilege checks.

Generated Code