Sample mods for SandustryModTemplate.
In the template repository, run:
npm run examples
That command clones this repository into examples/ when the folder is not present, then watches the sample mods.
Do not build these folders as a standalone project. The template supplies modkit/ and the build.
Copy a folder from here to src/<your-mod>/ in the template when you want that sample. Start a new mod from src/template/ in the template. Each leaf folder is a separate game mod.
On 0.5.5+, prefer Sandkit hooks and configOverrides over bundle patches; collector-patches is the remaining patch-rewrite sample.
| Folder | What it shows |
|---|---|
overlay-hotkey |
React overlay + Tailwind (Alt+E) |
management-button |
Management-column row |
input-binding |
api.input.registerBinding + bound-key UI |
| Folder | What it shows |
|---|---|
custom-element |
api.elements.register for one powder |
collector-element |
Platinum + Collector admission patches |
custom-terrain |
api.terrains.register for one terrain |
element-reaction |
api.reactions.registerContact |
register-structure |
api.structures.register + mod sprite |
structure-processor |
api.structures.processing.register periodic loop |
mod-assets |
Static mod/ files + assets.getUrl |
| Folder | What it shows |
|---|---|
events |
api.events.on("game:ready") |
triggers-interval |
api.triggers.register repeating callback |
hooks-intercept |
api.hooks.intercept on input:escape |
schedule-idle |
schedule.nextTick + grid.mutate |
i18n |
api.i18n.register + i18n.t |
storage |
api.storage.ensure in the save file |
sprites |
api.sprites.loadFromMod + getById |
ui-prompt |
api.ui.prompt text dialog |
signal-target |
api.signals.targets.register |
player-teleport |
api.player.setPositionAtWorld |
collector-patches |
Collector admission patches (patches.ts) |
worker-api |
Worker-thread sandkit.api |
settings |
All configSchema field types |
| Folder | What it shows |
|---|---|
retro-game |
Retro Console demo |
Integration tests (*.integration.test.ts) run from the template with npm run test:integration -- --examples. Each sample folder has one. Pass the folder name to run one sample:
nr test:integration:view overlay-hotkey
nr test:integration overlay-hotkey