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 "struct" 38 results closeClear
menu_bookDocumentation
May 4, 2026

RealTime vs Time: Wall-Clock vs Scene Time — RealTimeSince, RealTimeUntil, GlobalNow, and SmoothDelta

RealTime vs Time: Wall-Clock vs Scene Time — When to Use Each s&box has two time systems. Choosing the wrong one is a common source of bugs. Time (Scene Time) ,…

codeAPI Reference
May 12, 2026

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 -…

menu_bookDocumentation
May 20, 2026

Sync Properties: Automatic Property Replication with [Sync] Attribute

Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. Only the owner of the object can change…

terminalCode Example
May 3, 2026

BaseWeapon and BaseCarryable Weapon Framework

BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…

terminalCode Example
May 3, 2026

BanSystem Pattern for Player Management

BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…

menu_bookDocumentation
May 3, 2026

Shaders in s&box - HLSL and Shading Models

Shaders in s&box - HLSL and Shading Models Write custom shaders in HLSL with Source 2's shading models, render states, and GPU instancing support. Shader Develo…

menu_bookDocumentation
May 3, 2026

Custom Editors

Custom Editors Create custom editor widgets for your classes, structs, and assets. ControlWidget (Property Editor) Create custom property editors using : Attrib…

terminalCode Example
May 4, 2026

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 …

codeAPI Reference
May 4, 2026

s&box DamageInfo: Extensible Damage Data Class and IDamageable Interface

s&box DamageInfo: Extensible Damage Data Class is a class (not a struct) so it can be subclassed for game-specific damage types. Definition Usage IDamageable In…

terminalCode Example
May 4, 2026

Sandbox: BaseBulletWeapon — hitscan shooting with BulletConfiguration, recoil, and IronSightsWeapon

BaseBulletWeapon — Hitscan Shooting with Recoil and Camera Noise extends and implements hitscan bullet firing with configurable aim cone, recoil, and camera noi…

menu_bookDocumentation
May 4, 2026

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.…

menu_bookDocumentation
May 20, 2026

Sync Properties: Networked State with Change Detection and Collections

The attribute on a Component property sends its latest value to other players each time it changes. Only the owner of the object can change synced properties. B…

menu_bookDocumentation
May 5, 2026

Sync Properties - Complete Networking Guide

Sync Properties Sync Attribute Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. These pr…

menu_bookDocumentation
May 5, 2026

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…

codeAPI Reference
May 12, 2026

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…

codeAPI Reference
May 12, 2026

s&box ClientInput: Input scope for controlled objects

Client input scope struct for routing input to controlled objects. Used by ControlSystem to redirect player input during chair/vehicle control. Static Propertie…

groupsCommunity
May 3, 2026

Project Structure Recommendations

Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…

terminalCode Example
May 3, 2026

Razor Panel Structure and Syntax

Razor Panel Structure s&box uses Razor syntax for UI panels with files and optional stylesheets. Basic Panel Component File Structure The Element The element is…