Faction Generator
Define the core groups and teams that players can join on your server.
Overview
Use this tool to generate the Lua structure for your custom faction. Once generated, the code should be placed in a new file within your schema's factions directory.
Recommended Placement:
garrysmod/gamemodes/[schema folder]/schema/factions/[faction_name].lua
The unique identifier for this faction (e.g., FACTION_POLICE)
Logo material path or URL for scoreboard (leave empty for no logo)
Can new characters join this faction by default?
Players can only have one character in this faction?
0 = unlimited, decimals = percentage of server (e.g., 0.1 = 10%)
Hard cap on total characters in this faction (online or offline). Leave empty for no cap.
Add player model paths
Players in this faction can pick a skin for their character during character creation.
Players in this faction can customize bodygroups for their character during character creation.
Whitelist of skin IDs players can select. Leave empty to allow all skins.
Whitelist of bodygroup values players can select, by bodygroup index and allowed values. Leave empty to allow all.
Currency amount per paycheck
Interval in seconds between paychecks (defaults to global salary interval if not set)
Model scale multiplier. Also adjusts view offset proportionally. Leave empty for default (1).
Blood color constant applied on spawn. Leave default unless the faction is non-human.
Add weapon classes
Add item unique IDs
Members are always globally recognized
Faction is globally recognizable to others
Members automatically recognize each other
Faction won't appear in scoreboard categories
Lower numbers appear first in scoreboard (default: 999)
All players can see this faction's classes on the scoreboard
Members of this faction can see every faction's classes on the scoreboard
Map Name, Position Vector, Angle
Map Name (leave empty for all), Position Vector, Angle
NPC class (e.g. npc_combine_s) and disposition (D_LI, D_HT, D_FR, D_NU)
Command names members of this faction can execute