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…
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…
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…
Component Versioning: JsonUpgrader for Breaking Property Changes in s&box
s&box Component Versioning lets you define upgraders for breaking changes like property renames or data structure changes. Upgrades are chained — if a component…
Sandbox: SaveSystem — scene diff save/load with versioning and ISaveEvents
Sandbox SaveSystem — Scene Diff Save/Load The captures the difference between the current scene state and the original scene file. This means saves are compact …
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…
FileSystem: Mounted, Data, OrganizationData, Cache, and Memory Filesystems
FileSystem: Accessing Game Files in s&box s&box provides several filesystem access points through the static class. Available Filesystems Reading and Writing Fi…
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: 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…
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, …
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…
File System: Sandboxed Virtual Filesystems for Data Persistence
Standard .NET access is restricted in s&box. Instead, use the provided virtual filesystems that sandbox access to specific game directories. Available File Syst…
CleanupSystem: Map reset and baseline restoration
CleanupSystem: Map Reset and Baseline Restoration This example shows the CleanupSystem which tracks the baseline scene state and allows resetting the map to its…
s&box SaveSystem: Scene save/load with metadata and event hooks
SaveSystem API Reference SaveSystem is a GameObjectSystem that captures differences between the current scene state and the original scene, enabling save/load f…
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: ISpawner interface — custom spawner pattern with ISpawnEvents
ISpawner Interface — Custom Spawner Pattern The interface defines the contract for anything that can be spawned via the spawn menu. Implementations include , , …