Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage
BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…
CodeGenerator: Compile-Time Method and Property Wrapping via Attributes
The attribute in s&box lets you create custom attributes that wrap methods and properties at compile time. This is the mechanism behind properties and — you can…
s&box Component Lifecycle: Exact Execution Order and Internal Guards
s&box Component Lifecycle: Exact Execution Order and Internal Guards Derived directly from and in the s&box engine source. Execution Order **** — Called once wh…
BasePickup with ITriggerListener and ICollisionListener
BasePickup Abstract Class Abstract base for item pickups using trigger and collision detection with host-only consumption. Key Patterns **** — trigger volume pi…
Sandbox: CleanupSystem — full scene cleanup and per-player cleanup with Ownable
Sandbox CleanupSystem — Scene Cleanup and Per-Player Cleanup is a that handles cleaning up spawned objects. It distinguishes between "baseline" objects (part of…
Clothing - s&box Assets Documentation
Clothing The clothing system allows players to customize their Citizen character with various wearable items. Create hats, shirts, pants, accessories, and more.…
Sandbox: BaseWeapon — ammo system, reload, shoot delay, and IPlayerControllable
BaseWeapon — Ammo, Reloading, and Firing Pattern extends and adds ammo management, reloading, and a shoot delay system. It implements so it can also be used fro…
LocalData static class: Server-side data persistence
LocalData Static Class API Reference LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban l…
Sandbox: BaseConstraintToolMode — two-stage constraint creation with IToolActionEvents
BaseConstraintToolMode — Two-Stage Constraint Creation Pattern is the base for all two-point constraint tools (Weld, Rope, BallSocket, Elastic, Hydraulic, NoCol…
Sandbox: ThrusterEntity and WheelEntity — contraption propulsion with ClientInput bindings
ThrusterEntity and WheelEntity — Contraption Propulsion Components Both and implement and use properties so players can bind them to keys from a vehicle seat. T…
Sandbox: Map entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport
Sandbox Map Entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport These components implement interactive map elements. They live in the namespace and…
Sandbox.Log
Sandbox.Log Static logging class for console output. Overview Log messages appear in the editor console, in-game console (press ), and log files. Logging Method…
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …
Sandbox: Stacker tool — duplicate objects in a line or arc with StackAlignMode
Stacker Tool — Duplicate Objects in a Line or Arc The Stacker tool clones a selected object N times along a configurable axis with optional rotation and gap. It…
Mapping - s&box Editor Documentation
Mapping s&box includes Hammer, the Source 2 level editor, for creating maps and environments. Build worlds with brushes, props, lighting, and gameplay entities.…
Beams - s&box Rendering Documentation
Beams Beam effects create animated lines between points - useful for lasers, lightning, energy beams, and trails. BeamEffect Component Create beams using the Be…
Sandbox: BanSystem — persistent ban list with INetworkListener.AcceptConnection
Sandbox BanSystem — Persistent Ban List with INetworkListener is a that implements to intercept incoming connections and reject banned players before they join.…
Reporting Errors - s&box Documentation
Reporting Errors How to report bugs and issues with s&box. Issue Tracker Report bugs on the s&box issue tracker: Search existing issues first Create a new issue…
Execution Order - s&box Documentation
Execution Order Understanding the order in which component methods are called. Flowchart Component lifecycle follows a specific order: Constructor — Object crea…
Sandbox: PlayerInventory — weapon slots, pickup, drop, and loadout persistence
Sandbox PlayerInventory — Weapon Slots, Pickup, Drop, and Loadout Persistence manages up to 6 weapon slots, handles pickup/drop logic, and delegates loadout sav…