Showcase
Showcase is a complete consumer mod in the SSLib repository.
| Source | Demonstrates |
|---|---|
| Plugin.cs | Startup, world events, lookups, and client display |
| ShowcaseContent.cs | Parts, assets, geometry, items, and research |
| ConsoleState.cs | Callbacks, saved/replicated fields, and migration |
Build and install
Showcase uses a project reference to the library. In the SSLib checkout, copy Local.props.example to Local.props and set GamePath. Then run from its root:
dotnet build Examples/Showcase/StellarStriderLib.Showcase.csproj -c Release -p:SD_MODS_DIR=Copy both DLLs into the game's Mods folder and restart:
StellarStriderLib/bin/Release/netstandard2.1/StellarStriderLib.dllExamples/Showcase/bin/Release/netstandard2.1/StellarStriderLib.Showcase.dll
Assets are embedded in the example DLL.
Try it in game
- Unlock Showcase Basics and place the free Showcase White Cube.
- Spend one iron to unlock Showcase Console, then another to place it.
- Use the console's native input field and connect its signal socket.
- Watch its timer overlay, then save/reload and try joining late from a client.
- Remove the console or switch worlds; its display entry should clear.
The optional chip-cost research demonstrates a custom item reference. Your mod needs its own way to obtain that chip. The coolant and gas are also definitions only.
Understand the state schema
| Field | Saved | Replicated |
|---|---|---|
elapsed | Yes | Yes |
sessionTicks | No | Yes |
privateCounter | Yes | No |
Only the server advances these fields. Clients display elapsed; sessionTicks resets on reload, and privateCounter stays private.
The version-2 schema migrates the old seconds field to elapsed. Read ConsoleState.cs for validation, atomic updates, snapshots, and the other example fields.