All developer docs

The Proving Ground

A Garry's Mod gamemode built on ACE — a proving ground for Armored Combat Extended gameplay, vehicles and combined-arms combat.

231 functions across 1 namespace · 100% verified · Source

S151 serverC21 clientS59 shared59% typed params0 with usage examples

Recently Updated

tpg.ent.flag.server:SetHome

TPG

SVerified

Sets `.HomePos` and teleports the flag there. Called by the spawner right after `:Spawn()`; also usable to relocate a live flag directly (bypassing the reset/broadcast that `ENT:ReturnHome` does).

ENT:SetHome(pos)
1 params🏷️ Flag2 views

TPG.Colors.Contrast

TPG

SVerified

Black or white, whichever survives on top of the given fill. Standard luminance-weighted formula; ignores `bg.a`, so a translucent panel fill is judged as if it were opaque against whatever it actually sits on.

TPG.Colors.Contrast(bg)
1 params→ 1 return🏷️ Palette2 views

TPG.State.CleanupPlayer

TPG

SVerified

Drop a player's state table. Called from `PlayerDisconnected`, after the carryover has been stashed.

TPG.State.CleanupPlayer(ply)
1 params🏷️ State2 views

TPG.Restrictions.BlockReason

TPG

SVerified

Why a class is restricted, or nil if it is not. Checks the exact-class table first, then the lowercase family patterns.

TPG.Restrictions.BlockReason(class)
1 params→ 1 return🏷️ Entrestrictions3 views

TPG.Loadout.Apply

TPG

SVerified

Strip and re-kit a player: weapons, armor, movement speed and ammo. Not on a team (spectator): only the default weapons and building tools, no team kit, no speed changes. On a team: reads the saved Primary/Secondary/ Special/Armor PData picks (a legacy non-string save falls back to the default loadout), charges premium picks through `TPG.Gear.Claim` if that system is loaded (a denial swaps in the free equivalent and messages why), applies armor stats, computes and sets walk/run speed from the resulting armor + weapon penalties BEFORE handing out any weapon (ACE's weapon base snapshots the owner's speed on Deploy, so setting it after would let a weapon deploy against the stale pre-loadout speed), then gives the actual weapons, tops up their ammo, and hands out a consolation disposable AT only if the Special slot came up empty. Underdog perks (smoke, medkit) are added last. Finishes by publishing `pState.liveLoadout` (what the player is actually carrying, which can differ from the PData picks after a denial), clearing the `rekit` flag, restamping speed via `tpg.loadout.StampSpeed` for weapons that never got a fresh Deploy snapshot, and syncing the gear menu's cooldowns.

TPG.Loadout.Apply(ply)
1 params🏷️ Loadout3 views

TPG.ACE.DebugPlayer

TPG

SVerified

Print a player's contraptions, points, mass and prop count to console. Debug aid, wired to the `tpg_debug_ace` concommand below. Reads points without forcing a refresh, so a value can look stale immediately after an edit.

TPG.ACE.DebugPlayer(ply)
1 params🏷️ Ace3 views