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 "stats" 27 results closeClear
terminalCode Example
May 3, 2026

Stats API

Track player statistics with the Stats service. Recording Stats Reading Stats Stat Types Batching Stats are automatically batched and sent periodically. Call as…

menu_bookDocumentation
May 5, 2026

Achievements - s&box Services Documentation

Achievements s&box provides an achievements system that integrates with Steam. Achievements can be unlocked automatically based on stats or manually via code. S…

menu_bookDocumentation
May 20, 2026

Stats Service: Recording and Reading Player Statistics in s&box

Games can record per-player stats using . Stats can be queried individually, per-player, or globally. Recording Stats Increment a counter: Set a value directly:…

menu_bookDocumentation
May 3, 2026

Backend Services - Achievements, Leaderboards, Stats

Backend Services - Achievements, Leaderboards, Stats Integrate Steam backend services for player progression, competition, and analytics. Achievements Track and…

terminalCode Example
May 3, 2026

Achievements and Services

s&box provides built-in services for achievements, stats, and leaderboards. Achievements Unlock an Achievement Achievement Types Stat-based - Auto-unlock when s…

menu_bookDocumentation
May 20, 2026

Achievements: Score-Based and Stat-Based Player Unlocks

s&box achievements allow players to unlock rewards with configurable scores. The API lives in . Score Each achievement has a score (5-100). Low values for easy …

menu_bookDocumentation
May 20, 2026

Leaderboard Web API: Public REST Endpoint with Aggregation and Filtering

The s&box leaderboard Web API is publicly accessible for querying player rankings based on stats. Endpoint Parameters stat — stat name to base the leaderboard o…

codeAPI Reference
May 3, 2026

PlayerData Component for Stats and Respawn

PlayerData Component Persistent player data component tracking stats (kills, deaths), respawn state, and providing connection lookup. Key Properties Connection …

menu_bookDocumentation
May 20, 2026

Leaderboards: Stat-Based Rankings with Filtering, Centering, and Aggregation

Leaderboards in s&box are stats aggregated and ordered. They use the same stat system and provide filtering, sorting, and centering options. Basic Example By de…

groupsCommunity
May 3, 2026

Debugging and Profiling Tips

Debugging and Profiling Tips Community guide for debugging s&box games based on official tools and developer recommendations. Console Commands Useful built-in c…

terminalCode Example
May 12, 2026

s&box achievement unlocking with Rpc.FilterInclude targeting

s&box Achievement Unlocking with Rpc.FilterInclude This example shows achievement unlocking using s&box's Services.Achievements, Services.Stats, and Rpc.FilterI…

menu_bookDocumentation
May 12, 2026

Rpc.FilterInclude for targeted RPC broadcasting

Rpc.FilterInclude for Targeted RPC Broadcasting Rpc.FilterInclude is a using statement in s&box that restricts RPC broadcasts to specific connections only. This…

menu_bookDocumentation
May 4, 2026

Engine Frame Loop Order: FrameStart, Scene Tick, and FrameEnd Sequence

Engine Frame Loop Order The s&box engine frame loop runs in a specific order each frame. Understanding this is important for knowing when your code runs relativ…

codeAPI Reference
May 12, 2026

s&box IKillSource: Kill feed attacker interface

IKillSource Interface API Reference IKillSource is an interface for Components that can appear as an attacker in the kill feed. Implement on Player, Npc, explos…

codeAPI Reference
May 12, 2026

s&box PlayerFallDamage: Fall damage component

PlayerFallDamage Component API Reference PlayerFallDamage is a Component that applies fall damage to the player when they land. It implements Local.IPlayerEvent…

menu_bookDocumentation
May 20, 2026

Leaderboards: Stats Aggregation with Country, Date, and Centering Filters

Leaderboards in s&box are stats aggregated and ordered. They use the API. Basic Usage By default, leaderboards aggregate using sum and order descending. Filteri…

menu_bookDocumentation
May 3, 2026

Property Attributes for Editor Inspector

Property Attributes for Editor Inspector Property attributes customize how fields appear and behave in the s&box editor inspector. Organization Attributes Visib…

menu_bookDocumentation
May 4, 2026

Networking Static Class: IsHost, IsClient, CreateLobby, Connect, SetData, and Debug Convars

Networking Static Class: IsHost, IsClient, CreateLobby, Connect, and Server Data The static class manages the multiplayer session in s&box. Session State Note: …

codeAPI Reference
May 3, 2026

LinkedGameObjectBuilder for Finding Connected Objects

LinkedGameObjectBuilder Utility class for building a set of connected GameObjects by traversing physics joints, constraints, and manual links. Class Definition …

codeAPI Reference
May 3, 2026

ToolMode Base Class for Toolgun Modes

ToolMode Base Class Abstract base class for creating toolgun modes in s&box. Handles input registration, action dispatch, and HUD rendering. Class Overview Acti…