auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
Results for "Static" 149 results closeClear
terminalCode Example
May 12, 2026

Drag-and-drop system with static instance pattern

Drag-and-Drop System with Static Instance Pattern This example shows a drag-and-drop system using a static instance pattern for global state management and visu…

terminalCode Example
May 5, 2026

ConVar and ConCmd — console variables and commands with flags and game settings

ConVar and ConCmd — Console Variables and Commands and are s&box attributes for exposing variables and commands to the developer console. Console Commands Conso…

menu_bookDocumentation
May 20, 2026

Console Variables and Commands: ConVar and ConCmd with Flags

Console variables () and commands () let you create tweakable settings and runnable commands accessible from the s&box console. Console Commands Static methods …

menu_bookDocumentation
May 20, 2026

Console Variables and Commands: ConVar and ConCmd Runtime Configuration

s&box provides console variables () and console commands () for runtime configuration and debugging. Console Commands Static methods with attribute: Server Comm…

terminalCode Example
May 3, 2026

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…

menu_bookDocumentation
May 4, 2026

Code Upgrader Diagnostics: SBOX001-SBOX007 and SB3000 Roslyn Analyzer Warnings

Code Upgrader Diagnostics: s&box Roslyn Analyzer Warnings s&box ships a Roslyn analyzer () that warns about deprecated patterns and auto-fixes them. These appea…

codeAPI Reference
May 3, 2026

LimitsSystem Per-Player Spawn Limits

LimitsSystem Per-Player Limits Enforces configurable spawn limits per player with automatic tracking via ISpawnEvents. Key Features Per-player tracking via Stea…

codeAPI Reference
May 12, 2026

s&box Ownable: Ownership tracking component

Ownable Component API Reference Ownable is a Component that tracks which Connection (player) spawned a GameObject, enabling prop protection and ownership checks…

codeAPI Reference
May 12, 2026

s&box LimitsSystem: Spawn and tool limits

LimitsSystem GameObjectSystem API Reference LimitsSystem enforces configurable limits on spawning and tool usage. Maintains a per-player tracked object list pop…

terminalCode Example
May 10, 2026

s&box JSONObject Save Data Helper for Components

This s&box-focused sample shows how to programmatically construct and deconstruct JSON for component save data. It is useful for player saves, world unlock stat…

menu_bookDocumentation
May 4, 2026

ConVar and ConCmd: Console Variables and Commands in s&box

ConVar and ConCmd: Console Variables and Commands s&box uses and attributes on static properties and methods to expose them to the console system. ConVar (Conso…

terminalCode Example
May 4, 2026

Sandbox: LimitsSystem — server-side per-player spawn and tool limits via ConVars

LimitsSystem — Server-Side Spawn and Tool Limits is a that enforces configurable per-player limits on props, constraints, and tool entities. It listens to and .…

terminalCode Example
May 10, 2026

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…

menu_bookDocumentation
May 12, 2026

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…

menu_bookDocumentation
May 12, 2026

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…

menu_bookDocumentation
May 5, 2026

Hotloading — live code reloading, IL fast path, and common pitfalls

Hotloading — Live Code Reloading s&box recompiles and live-reloads your assembly whenever you save a or file. You don't need to restart the editor for most chan…

codeAPI Reference
May 12, 2026

s&box SaveSystem: Scene save/load

SaveSystem GameObjectSystem API Reference SaveSystem is a saving/loading system that captures the differences between the current scene state and the original s…

menu_bookDocumentation
May 5, 2026

RPC Messages - s&box Documentation

RPC Messages Components can contain RPCs. An RPC is a function that when called, is called remotely too. Supported RPC arguments are the exact same as Sync prop…

codeAPI Reference
May 3, 2026

Player Component with Static Accessors

Player Component Main player component that manages health, damage, camera, and interfaces with the inventory system. Static Accessors Key Properties HUD Visibi…

codeAPI Reference
May 12, 2026

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…