About this mod
This change allows you (mod authors, mainly) to override which portrait is shown when an NPC receives a gift they love or hate, rather than being forced into the "Happy" or "Sad" portraits.
- Requirements
- Permissions and credits
You know how when you gift an NPC something they hate, they always react with their "Sad" portrait? And likewise with loved gifts and their "Happy" portrait? Well, I was working on making a custom NPC and I decided that I didn't want them to look so sad just because someone gave them a gift they didn't like. I found out the game hardcoded the portrait selection depending on what the NPC's gift taste was. So I changed that. So with this mod, using the same portrait commands you would normally use when defining your NPC's custom dialogue (or editing an existing NPC's dialogue, of course), you can specify which portrait on the sprite sheet you want to be shown for a specific gift taste. You are not limited to the default aliased expressions either, you are free to use $1 through $99 if you want in order to select the correct portrait.
Aside from the obvious intention of allowing specific portrait selection for gift tastes in general, it should also be possible to use Content Patcher with some "When" conditions to load gift response dialogue with different portrait commands in them, allowing you to choose which portraits to be used for each taste category according to whatever criteria you see fit.
Please note that this won't allow you to set portraits according to specific items or categories, only tastes. That is, you can choose a portrait that will show for every "Loved" gift they receive, but you can't choose a specific portrait for a Rabbit's Foot. For that, I would recommend Custom Gift Dialogue Utility, which my mod is compatible with. It can fulfill the same purpose without needing my mod at all if you only wanted different portraits for specific items, but I created this one to suit my personal needs which require changing portraits more generally.
Also, if the line of dialogue does not include a portrait command, it will fall back to the default Stardew Valley behaviour and show the happy and sad portraits for loved and hated gifts respectively. So if you are not a mod author or do not edit the dialogue in your game, this mod will do nothing for you on its own.