npchelper is a command-line tool for people who make NPC mods. It creates starter packs, checks packs the way the game reads them, and packages packs for release. It works on the same content-pack format as hand-written packs, so you can mix both.
Install#
The tool is a .NET tool installed from NuGet.
dotnet tool install -g NpcHelper.StardewValley.Cli
To update it later:
dotnet tool update -g NpcHelper.StardewValley.Cli
Check that it works:
npchelper --help
Use npchelper <command> --help for the options of one command.
Commands#
npchelper new pack#
Creates a new content pack that you edit by hand.
npchelper new pack "[HP] MyPack" --id Me.MyPack --npc Rei
- The first argument is the folder to create.
--idis the pack's unique ID, written intomanifest.json.--npcnames the first NPC. The pack includes a starter NPC file and valid placeholder images, so it loads straight away.
npchelper new npc#
Adds another NPC to an existing pack.
npchelper new npc "[HP] MyPack" Alex
npchelper new translation#
Creates a translation content pack for an existing NPC. It writes the correct layout and sets Locales and Translates in mod.toml. Run npchelper new translation --help for its options.
npchelper new dll-mod#
Creates a C# SMAPI mod that defines NPCs in code. See C# SDK.
npchelper new dll-mod MyMod --id Me.MyMod --npc Rei
npchelper validate#
Checks a pack the way the game will read it and prints every error and warning.
npchelper validate "[HP] MyPack"
It reports bad values, unknown keys, and the pack-structure mistakes listed in Pack structure, including misnamed folders and files, language folders such as th_TH, and translations for an NPC that does not exist.
It also checks packs that change an NPC from another mod. For an outfit pack or a portrait pack it lists what the pack changes, for example Outfit pack for Rei: sprites Beach_Summer; portraits Beach_Summer., and warns when mod.toml sets PortraitScale but the pack has no portraits. A pack that adds its own NPC is not treated as an outfit pack for that NPC, so its own sprites/ and portraits/ are not reported as one.
Options:
--base <folder>is the folder of the pack that adds the NPC. For a translation pack it reports keys that do not exist there and how much is still untranslated. For a translation, outfit or portrait pack it also checks thatmanifest.jsonlists that pack inDependencies.--locale thloads the NPC with that language applied.--strictmakes warnings fail the command, which is useful in a build script.
npchelper inspect#
Shows how a pack is understood: each NPC is described in plain sentences, followed by a checklist of what it has and what it still needs.
npchelper inspect "[HP] MyPack"
== Rei
Rei is a cheerful woman.
Birthday: Summer 12. Lives in Hospital at tile 9, 7, facing down.
Can be befriended, romanced and married.
Gift tastes: 4 loved, 4 liked, 3 disliked, 3 hated, 3 neutral.
What it has:
[x] Basics: Sprite sheet
[ ] Movie theater: Movie reactions (extra). Add a [Movies] table ...
Needed: 4/4. Recommended: 9/9.
Each line of the checklist is marked needed (without it the NPC is invisible, silent or unusable), recommended (it works, but feels unfinished next to the game's villagers) or extra (what the larger mods give every NPC), and says what to add and where. needed items that are not images are also warnings when the game loads the pack. Options:
--npc Reishows one NPC.--locale thapplies that language first.--rawalso prints the schedule the way the game reads it.
npchelper pack#
Creates a zip of a pack for upload.
npchelper pack "[HP] MyPack"
It refuses to package a pack that has structure problems. Add --force to package it anyway. It works for NPC packs, translation packs, outfit packs and portrait packs.
A typical workflow#
npchelper new pack "[HP] MyPack" --id Me.MyPack --npc Rei- Edit the TOML files and replace the placeholder images.
npchelper validate "[HP] MyPack"until clean.- Copy the folder into
Modsand test in the game. npchelper pack "[HP] MyPack"and upload the zip.
See Test and publish.