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.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🏷️ Loadout2 views

TPG.Economy.Charge

TPG

SVerified

Deduct a cost if the player can afford it, and notify them of the charge. Unlike `ECON.Reward`/`ECON.Penalize`, this does NOT check `ECON.Active` itself -- every current call site (dupe purchases, gear, stock vehicles) already gates the call on the economy being active, but a future caller that forgets to check `ECON.Active` first would still successfully charge the player's wallet. the player is invalid or can't afford it.

TPG.Economy.Charge(ply, cost, reason)
3 params→ 1 return🏷️ Economy3 views

tpg.weapon.pointtool:DrawHUD

TPG

CVerified

Draws the bottom-centre "POINT TOOL / PLACING <type>" panel in TPG's red theme, plus the LMB/RMB/R hint line.

SWEP:DrawHUD()
0 params🏷️ Weapon Pointtool1 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🏷️ Ace1 views

TPG.ACE.GetPlayerContraptions

TPG

SVerified

All contraptions with at least one entity owned by this player. Backed by the per-tick `ContraptionMap` cache; ownership is per-owner entity, deduped, so a contraption with entities owned by two different players is credited to both. or owns nothing.

TPG.ACE.GetPlayerContraptions(ply)
1 params→ 1 return🏷️ Ace1 views

TPG.UI.BelowObjectives

TPG

CVerified

Bottom of the point-pip row, for whatever stacks below it (the compass). Falls back to the bottom of the score panel when there are no points to show pips for at all -- checked against the cached objective count, so it reflects the same 0.5s-stale list `UpdateObjectiveCache` maintains.

TPG.UI.BelowObjectives()
0 params→ 1 return🏷️ Hud1 views