NPC Helper 2/Docs

Create an NPC

Kinds of packs

The four kinds of content pack for NPC Helper 2: NPC, translation, outfit and portrait. What each one holds, how NPC Helper 2 tells them apart, and which one to make.

Every mod for NPC Helper 2 is a content pack: a folder with a manifest.json and an NPCs folder. What differs is what is inside NPCs/<Npc>/. There are four kinds, and you do not declare which one you are making. NPC Helper 2 recognises the kind from the folders and files, and says what it found in the log when the game starts.

The four kinds#

NPC pack Translation pack Outfit pack Portrait pack
What it does Adds a new NPC. Translates an NPC's text into another game language. Gives an NPC other clothes, or replaces her sprite. Gives an NPC other faces, for example higher-resolution or redrawn portraits.
What is inside NPCs/<Npc>/ <Npc>.toml, and optionally dialogue, schedule, marriage, events, festivals, sprites/, portraits/, locale/. locale/<code>/*.toml sprites/*.png, and usually portraits/*.png too. portraits/*.png only.
Needs the NPC's own mod installed No. It is the NPC's mod. Yes. Yes. Yes.
NPCs in mod.toml The NPC files, or leave it out. [], ["NPCs/Rei/"], or leave it out. ["NPCs/Rei/"], [], or leave it out. ["NPCs/Rei/"], [], or leave it out.
PortraitScale in mod.toml The scale of all of the NPC's portraits. Not used. The scale of the pack's own portraits. The scale of the pack's own portraits.
Read more Create your first NPC, Pack structure Make a translation pack Make an outfit pack Make a portrait pack

A pack that only changes an existing NPC (a translation, outfit or portrait pack) adds no NPC of its own. It cannot change the NPC's dialogue, schedule, gift tastes or any other data. Translations change the text, and image packs change the pictures. Nothing else.

How NPC Helper 2 tells them apart#

NPC Helper 2 looks at what is in each folder of NPCs/:

It finds The pack is
An NPC file, NPCs/<Npc>/<Npc>.toml An NPC pack.
locale/<code>/ folders A translation pack (or an NPC pack that ships its own languages).
A sprites/ folder with at least one PNG An outfit pack.
A portraits/ folder with at least one PNG and no sprites/ PNG A portrait pack.

One pack can be more than one kind. A translation pack that also carries an outfit is reported twice. A pack that has an NPC file and also locale/ folders is an NPC pack that ships translations.

For a pack that adds no NPC, the log names the kind, the NPC and the files it found:

text
Translation pack for: Rei.
Outfit pack for Rei: sprites Beach_Summer; portraits Beach_Summer. Default replaces the NPC's own image, any other name is an outfit.
Portrait pack for Rei: portraits Default, Marriage. Default replaces the NPC's own image, any other name is an outfit.

A pack that adds no NPC, has no translation, and has no sprites or portraits is reported as a pack that does nothing, with the reason.

What every kind needs#

  • manifest.json with ContentPackFor.UniqueID set to Framework.Mod.NpcHelper. NPC Helper 2 asks SMAPI for its content packs and looks only in those. It does not scan the Mods folder, so a mod that is not a content pack for NPC Helper 2 is never read, even if its folders have the right names.
  • For a pack that changes an NPC from another mod, a required dependency on that mod's UniqueID. SMAPI then loads the NPC's mod first and tells players when it is missing.
  • A folder named exactly like the NPC: NPCs/Rei/ for the NPC Rei. The name is matched without regard to case.
  • NPC Helper 2 2.4.3 or later for an outfit or portrait pack. Set ContentPackFor.MinimumVersion to 2.4.3.

Which one should you make?#

  • You are creating a character: an NPC pack. Start with Create your first NPC.
  • You want the game in another language: a translation pack, or locale/ folders inside your own NPC pack. See Localization.
  • You want an NPC to wear something else in a place, a season or a festival, or you want to redraw her sprite: an outfit pack.
  • You want to give an NPC new portraits and nothing else, for example in high resolution or another art style: a portrait pack.
  • The NPC is yours and you want the outfit to come with her: put the images in your own NPC pack. See Image variants. A separate pack is for someone else's NPC, or for an outfit players can choose to install.

When several packs change the same NPC#

Any number of packs can change one NPC. An image from another pack replaces the NPC's own image of the same name, and when several packs provide the same image NPC Helper 2 chooses one and says which in the log. See Replacing images from other mods.