Cookiecutter template for a single Vintage Story code mod. Produces the Mod / Core / Tests triad, shared MSBuild props, pack script, and GitHub Actions CI that boots Vintage Story reference assemblies.
Agnostic on purpose. Fill in the prompts and you get a buildable repo ready for SmelterWorks or any other org.
pipx install cookiecutter
cookiecutter gh:SmelterWorks/Mod-Scaffold
# or from a local clone:
cookiecutter /path/to/SmelterWorks-Mod-ScaffoldAnswer the prompts (mod_name, mod_id, side, Harmony, versions). Output is a new folder named after project_slug.
- Click Use this template on the GitHub repo (enable Template repository in Settings).
- Clone the new repo (it still contains the cookiecutter tree).
- Generate the mod:
./scripts/generate-local.sh --no-input
# or interactive:
./scripts/generate-local.shMove or push the generated folder as the real mod repository. The scaffold repo stays the cookiecutter source.
MyMod/
MyMod.Core/ # pure logic, unit tested
MyMod.Tests/ # xunit against Core only
build/ # VintageStoryMod.props, AtlasIntegration.props, game-versions.json
scripts/pack-mod.sh
.github/ # CI + VS server setup actions
.agents/ # VS, Core tests, Atlas, writing skills
Directory.Build.props
MyMod.sln
Critical VS packaging rules are baked in:
- Core sources compile into the mod DLL (source linking). Never ship
*.Core.dll. - The mod
.csprojdoes not ProjectReference Core (avoids CS0436). - Pack script rejects stray Core DLLs and game assemblies.
export VINTAGE_STORY="$HOME/.local/share/vintagestory"
dotnet build MyMod/MyMod.csproj -c Release
dotnet test MyMod.Tests/MyMod.Tests.csproj
dotnet format MyMod.sln
./scripts/pack-mod.sh MyMod distInstall the zip into the game data Mods/ folder, not the install-tree Mods/ next to VSSurvivalMod.
| Prompt | Meaning |
|---|---|
side |
Client, Server, or Universal (ModSystem entry points differ) |
needs_harmony |
Adds NeedsHarmony, Harmony host stub, and dispose unpatch |
vs_tested / game_min_version |
CI server version and modinfo dependency |
license |
Mod license written into generated LICENSE (0BSD, MIT, Apache-2.0, ISC, MPL-2.0, GPL-3.0-only, Unlicense, ALL-RIGHTS-RESERVED) |
license_year |
Copyright year in the generated license text |
GitHub Actions expressions in generated workflows are escaped for cookiecutter ({{ '${{ ... }}' }}). Setup action and pack script are copied without Jinja rendering so bash [[ ]] stays intact.
Scaffold: .agents/skills/scaffold-maintainer, .agents/skills/vintage-story-modding, .agents/skills/core-unit-tests, .agents/skills/atlas-integration-tests, plus .agents/skills/no-ai-slop and .agents/skills/rossmann-voice from no_ai_slop_writing_rules.
Generated mods receive the same writing and VS skills, Core unit-test guidance, and Atlas E2E guidance (Pixnop/Atlas). build/AtlasIntegration.props is included so agents can add *.IntegrationTests without inventing package versions.
0BSD for this scaffold repository. Generated mods pick their own license via the license prompt. That choice is independent of the scaffold license.