LocalData persistence for server-side data
LocalData Persistence in s&box LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban lists, …
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.…
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…
BanSystem Pattern for Player Management
BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…
s&box MorphState: Morph value persistence
MorphState Component API Reference MorphState persists morph values on a GameObject so they survive over the network and duplication. Type Signature Properties …
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…
s&box BanSystem: Player ban management
BanSystem GameObjectSystem API Reference BanSystem holds a banlist and can ban users. Implements INetworkListener to reject banned connections. Bans are persist…
Extensible Player Data Save Hooks for World Components
This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…
s&box ICookieSource: Cookie persistence interface
ICookieSource API Reference ICookieSource is an interface for components that want to save their properties as cookies (persistent user preferences stored in Ga…
s&box GamePreferences: ConVar-based user settings with attributes
GamePreferences API Reference GamePreferences is a static class for defining user preferences using ConVar attributes with automatic persistence. Type Signature…
s&box BanSystem: Ban list management with persistence
BanSystem API Reference BanSystem is a GameObjectSystem that manages a ban list with LocalData persistence and connection blocking. Type Signature Key Methods -…
Hotloading - s&box Documentation
Hotloading Whenever you save a code file in your project (.cs or .razor files), we recompile and attempt to live-reload the changed assembly. This lets you quic…
Game Static Class: ActiveScene, ChangeScene, TypeLibrary, Cookies, and Core State Properties
Game Static Class: ActiveScene, ChangeScene, TypeLibrary, and Core State The static class is the primary entry point for global game state in s&box. Core State …
s&box GamePreferences: User preferences
GamePreferences Static Class GamePreferences is a static class that defines the local user's preferences for the game. These ConVars control player-specific set…
Sandbox.Storage
Sandbox.Storage Save and load player data. Overview Storage provides persistent storage for player data, save games, and settings with automatic Steam Cloud syn…
s&box PhysicalProperties: Physical property persistence
PhysicalProperties Component API Reference PhysicalProperties is a Component that persists physical properties (mass, gravity, health) across duplication and ne…
CleanupSystem Pattern for Map Reset and Scene Management
CleanupSystem - Scene State Management and Map Cleanup A that captures the baseline scene state and allows resetting the map to its original state. Removes spaw…
Sandbox: Full codebase architecture — systems, player components, weapons, tools, NPCs
Sandbox Codebase Architecture Overview The Facepunch Sandbox game is a large reference implementation. Here's a map of the major systems and how they connect. C…
RadiusDamage — explosion area damage with IDamageable, occlusion, and physics force
RadiusDamage Component is a built-in s&box component that applies damage to all objects within a sphere. It integrates with the system and can apply outward phy…
Clutter System — scattering grass, rocks, and debris with GPU instancing
Clutter System — Scattering Grass, Rocks, and Debris The Clutter System scatters large amounts of small objects (grass, rocks, debris) across a scene using GPU-…