Skip to content

Repository files navigation

SmelterWorks Vintage Story Mod Scaffold

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.

Generate a mod

Cookiecutter (recommended)

pipx install cookiecutter
cookiecutter gh:SmelterWorks/Mod-Scaffold
# or from a local clone:
cookiecutter /path/to/SmelterWorks-Mod-Scaffold

Answer the prompts (mod_name, mod_id, side, Harmony, versions). Output is a new folder named after project_slug.

GitHub template

  1. Click Use this template on the GitHub repo (enable Template repository in Settings).
  2. Clone the new repo (it still contains the cookiecutter tree).
  3. Generate the mod:
./scripts/generate-local.sh --no-input
# or interactive:
./scripts/generate-local.sh

Move or push the generated folder as the real mod repository. The scaffold repo stays the cookiecutter source.

What you get

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 .csproj does not ProjectReference Core (avoids CS0436).
  • Pack script rejects stray Core DLLs and game assemblies.

After generation

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 dist

Install the zip into the game data Mods/ folder, not the install-tree Mods/ next to VSSurvivalMod.

Options

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

Template notes

GitHub Actions expressions in generated workflows are escaped for cookiecutter ({{ '${{ ... }}' }}). Setup action and pack script are copied without Jinja rendering so bash [[ ]] stays intact.

Agent skills

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.

License

0BSD for this scaffold repository. Generated mods pick their own license via the license prompt. That choice is independent of the scaffold license.

About

Vintage Story Mod Cookie Cutter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages