Tutorial: Adding a custom NPC to NPC Adventures

From Stardew Modding Wiki
Jump to navigation Jump to search

Please note that there are no current plans to update NPC Adventures to 1.6 and this tutorial may be obsolete.

(This article is not yet complete.)

So, you've just finished your custom NPC. Congrats! Or perhaps you're looking to port an existing one. Adding your NPC to NPC Adventures is a great way to make your NPC more immersive and leave a greater impact on the user. Nearly all of the information here is taken from Purrplingcat's own documentation, but this tutorial attempts to make it easier for newer modders to understand.

Future infobox info: ArcaneDescent, May 17 2021

What is NPC Adventures?

NPC Adventures is a mod developed by Purrplingcat that allows you to adventure with NPCS. It ads primary support for vanilla NPCs, with the ability to add content packs for support for Custom NPCs. The mod is currently abandoned, however works in 1.5, although functionality and updates in future game updates is uncertain.

Getting Started

A content pack for NPCA is the same as any other content pack; you'll need a manifest.json and a content.json. If you've already made an NPC mod, then you know how the basics work, but for anyone new to modding, this is how it starts:

- Make sure you're familiar with basic Content Patcher formatand JSON format.

- Create a folder somewhere with easy access, such as your desktop or documents folder, and name it the name of your mod (ex. Shouko to NPC Adventures, or abbreviate it as such: [NPCA]Shouko)

-Inside the folder, create 2 .txt files; manifest and content. rename the file type to .json instead of .txt. These files can still be edited with notepad or your default text editor, although text editors such as notepad++ or sublime.

- Open the manifest.json file. paste this in there(taken from the SDV wiki and the NPCA documentation).

{
  "Name": "Your Project Name",      //the name of your mod
  "Author": "your name",            //your online username, or whatever name you want to be known by
  "Version": "1.0.0",               //your current mod version. use 1.0.0 for initial release, and increase it as you update.
  "Description": "One or two sentences about the mod.",  //brief description of your mod
  "UniqueID": "<your name.<your project name>",         //the ID SMAPI uses to identify your mod. Usually written as <username>.<modname>.
  "MinimumApiVersion": "3.10.1",         // as of writing, the current SMAPI version is 3.10.1, update to reflect the current version of SMAPI
  "UpdateKeys": [],                 //when you're ready to post your mod to nexus start by making a mod post, then take the 4 numbers at the end of the URL and paste them in between []
  "ContentPackFor": {                           //The mod that this content pack was made for. IN this case, NPC Adventures.
    "UniqueID": "purrplingcat.npcadventure",
    "MinimumVersion": "0.13.0"
  }
}

- Replace any information with your own. - Open content.json. Paste this in there(Taken from the NPCA documentation). Feel free to change the file path, but make sure that the file path in the folder also reflects what's written in the content.json.

{
  "Format": "1.4",
  "Changes": [
    {
      "Target": "Data/CompanionDispositions",
      "FromFile": "assets/data/companionDispositions.json"
    },
    {
      "Target": "Dialogue/NPC", // target will be created if they don't exists, replace NPC with your NPC name
      "FromFile": "assets/dialogues/NPC.json",
      "LogName": "NPC's dialogue" // Optional. Can be used for edit action too
    }
  ]
}