NpcHelper.StardewValley.Cli 2.5.0.1

dotnet tool install --global NpcHelper.StardewValley.Cli --version 2.5.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local NpcHelper.StardewValley.Cli --version 2.5.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=NpcHelper.StardewValley.Cli&version=2.5.0.1
                    
nuke :add-package NpcHelper.StardewValley.Cli --version 2.5.0.1
                    

NPC Helper Stardew Valley CLI

npchelper helps content-pack authors create, validate, inspect, and package Stardew Valley NPC Helper 2 content. Use it to catch content errors before installing a pack in the game, or to scaffold a C# SMAPI mod project.

What you need

  • .NET 6 runtime or later to run the .NET tool.
  • NPC Helper 2 installed in the game to load the content packs you create.
  • For new dll-mod, the .NET SDK and SMAPI mod development setup.

The CLI package includes the NPC Helper SDK for its commands and generated project templates. Install the SDK package separately only if your own .NET project uses the SDK API.

Install

Install the tool globally:

dotnet tool install --global NpcHelper.StardewValley.Cli

Update it later with:

dotnet tool update --global NpcHelper.StardewValley.Cli

Common commands

Create a starter content pack, validate it, inspect the loaded NPC data, and create a ZIP:

npchelper new pack "[HP] MyPack" --id Me.MyPack --npc Rei
npchelper validate "[HP] MyPack"
npchelper inspect "[HP] MyPack"
npchelper pack "[HP] MyPack"

--id is optional (it defaults to <author>.<pack name>), and none of these commands care where the folder lives: create a pack anywhere, then copy the finished folder into your Mods folder.

Add an NPC to an existing pack:

npchelper new npc "[HP] MyPack" Alex

Translate an NPC that another mod adds. The translation is its own pack, so it needs no changes to the NPC mod and updates on its own:

npchelper new translation "[HP] Rei Thai" --locale th --from "path/to/ReiPack"
npchelper validate "[HP] Rei Thai" --base "path/to/ReiPack"
npchelper pack "[HP] Rei Thai"

--from copies every dialogue line of the NPC into the new pack as the starting text and makes the translation depend on the NPC mod. Without --from, give --npc <Name>. validate --base reports keys that do not exist in the NPC pack (typos) and how much is still untranslated. A pack that has only a manifest and an empty NPCs = [] list, with no NPCs folder, is the manifest half of an older manual translation install; validate recognises it and says so.

validate also checks manifest.json the way SMAPI reads it (required fields, version, and that the pack is a content pack for NPC Helper), since a pack with a bad manifest is silently skipped by the game.

Scaffold a C# SMAPI mod that defines NPCs in code:

npchelper new dll-mod MyNpcMod --id Me.MyNpcMod

Run npchelper <command> --help for options, including locale checks and output paths. Both generated content packs and DLL mods still require the NPC Helper 2 game mod.

Build a multi-project release

Create a release.json next to your project folders:

{
  "version": 1,
  "outputDirectory": "dist",
  "artifacts": [
    {
      "type": "contentPack",
      "source": "mods/characters/Rei/src",
      "fileName": "ReiMod-1.0.0.zip",
      "folderName": "[HP] ReiMod",
      "includeRepositoryLicense": true
    },
    {
      "type": "folderZip",
      "source": "mods/translations/Thai/src",
      "fileName": "Thai-Translation-1.0.0.zip",
      "folderName": "Thai Translation",
      "manifestFolder": "Thai Translation"
    },
    {
      "type": "nuget",
      "project": "development/MyLibrary/MyLibrary.csproj",
      "configuration": "Release"
    }
  ]
}

Run the release from any working directory:

npchelper release path/to/release.json

Paths in the manifest are relative to the manifest file. contentPack validates the pack with the same loader used by NPC Helper before creating its ZIP. folderZip packages a folder without NPC validation, useful for translation-only packs and other mod archives. Both ZIP types use the chosen top-level folder name, skip common build/cache folders (bin, obj, .git, and others), and can relocate a root manifest.json and mod.toml with manifestFolder. licenseFile can add a specified license as LICENSE; includeRepositoryLicense finds a LICENSE in the manifest folder or a parent folder and includes it in the archive.

nuget runs dotnet pack for the specified project and adds its .nupkg and optional .snupkg to the release. All artifacts are built in a temporary staging folder; validation or build failures leave existing release files untouched. After all steps succeed, artifacts with matching names are replaced in the output folder.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.