SMAPI
About SMAPI
Modding docs
Tools
Mod compatibility
Log parser
JSON validator
JSON validator
Upload a JSON file
Choose the JSON format:
None
SMAPI: manifest
SMAPI: translations (i18n)
Content Patcher
Drag the file onto this textbox
(or
choose a file
)
:
{ "Format": "2.9.0", "$schema": "https://smapi.io/schemas/content-patcher.json", "Changes": [ /* Hello! Congrats on starting to mod :) We're going to start with the Portraits! For now, the it's gonna be the seasonal portraits, or the stuff your character will look like for each season, not including their ginger island outfits. ⠀⠀⠀⠀⠀⠀⣀⡀⠀⣀⡸⠿⣀⣀⣀⠀⢀⣀ ⠀⠀⠀⠀⢠⣤⠛⢣⣤⠛⠃⠀⠛⢻⣿⣤⡜⠛⣤⡄ ⠀⠀⠀⠀⢸⣿⣶⡎⠉⠀⠀⠀⠀⠈⠉⠉⠁⠀⣿⡇ ⠀⢀⣀⣿⡿⠿⠀⠀⠀⠿⠇⠀⠀⠀⠀⠀⠸⠿⠀⢿⣿ ⣤⡜⠛⣿⡇⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⡀⠀⢸⣿⣤⡄ ⠉⢱⣶⣿⣷⣶⠀⢰⣶⠀⠈⠻⠶⠶⠶⠶⠛⠁⠀⢸⣿⠉⢱⣶ ⠿⢿⣿⣀⣸⣿⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⢀⣀⣿⡇ ⠀⠘⠛⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠀⢸⣿⠛⠃ ⠀⢰⣶⠉⢹⣿⣿⣷⣶⠀⠀⠀⣶⡆⠀⠀⠀⠀⣶⡎⠉⣶⡆ ⠀⠀⠀⠿⢿⣿⣀⣸⣿⣿⣿⣿⣀⣀⣀⣀⡸⠿⣿⡿⠿ ⠀⠀⠀⠀⠘⠛⣿⡟⠛⣿⣿⣿⠛⢻⣿⠛⢣⣤⠛⠃ ⠀⠀⠀⠀⠀⠀⠉⠁⠀⠉⠉⠉⣶⡎⠉⠀⠈⠉ (Puffer here for separation <3) */ // The first step is to "Load" your new assets, this is just adding the assets to where the game can use them. Action is always "Load". // The target could techniclly be any number of things, but since we're editing specifclly how an NPC looks, it's most simple to use {{ModID}}/Portaits/<NPCINTERANLID> // You can find NPC internal ID by, for vanilla character, going into "Data/Characters.json" and copying the header of the block (I.e. for Abigail it would be "Abigail") // For custom characters, is it the same idea, just located differently. It would be inside an "EditData" adding the character, under "Entries" // The "FromFile" is very specific and needs to match the exact file structure you have. so for this example, this would be files named `<NPCINTERANLID>_spring`, `<NPCINTERANLID>_summer` etc that would be inside the folders "Assets/Portaits" // the {{TargetWithoutPath}} is a Token that takes the value from the target after the last "/", which in this case would be `<NPCINTERANLID>_spring`, `<NPCINTERANLID>_summer` etc { "Action": "Load", "Target": "{{ModID}}/Portraits/<NPCINTERANLID>_spring, {{ModID}}/Portraits/<NPCINTERANLID>_summer, {{ModID}}/Portraits/<NPCINTERANLID>_fall, {{ModID}}/Portraits/<NPCINTERANLID>_winter", "FromFile": "Assets/Portraits/{{TargetWithoutPath}}.png" }, { //Here we'll use the 'EditImage' action which is... exactly what it sounds like. It tells the game to edit an image 'Loaded' (see above code block) by the game "Action": "EditImage", //There are some ✨extra-fancy✨ things you can do with this action (overlaying, replacing only a specifc part of a game image etc,) but we're just doing a basic image replacement right now! // // //This tells the game where to insert the new asset (as defined in the next key after this): "Target": "Portraits/npcID", //replace 'npcID' with the internal name of the character (ie the name the game code referes to them as, there's a list at the end of this code) // // //This tells the game to use the image in the folder named Assets, named '(enter your npc's ID)_(enter current season)' "FromFile": "Assets/npcID_{{season}}.png" //replace 'npcID' with what you named the PNG in 'assets'. {{season}} will be replaced by the current season-game, so the image that the game selects will be based on the current season }, ] }
Click this button: