Content Patcher

Content Patcher

378k Downloads

[Lookup Anything] gift tastes are wrong in rare cases

Pathoschild opened this issue ยท 2 comments

commented

The gift tastes shown for an item or NPC are usually correct, but are wrong in a few cases. For example, Lookup Anything says Vincent likes Jelly but he actually hates it.

commented

Applicable gift tastes for Jelly:

  • Vincent likes item ID.
  • Vincent hates category.
  • Universal like for category.

Here's the mod's current algorithm, which is incorrectly marks it liked:

/// The game decides a villager's gift taste using a complicated algorithm which boils down to the first match out of:
///   1. A villager's personal taste by item ID.
///   2. A universal taste by item ID.
///   3. A villager's personal taste by category.
///   4. A universal taste by category (if not neutral).
///   5. If the item's edibility is less than 0 (but not -300), hate.
///   6. If the item's price is less than 20, dislike.
///   7. If the item is an artifact...
///      7a. and the NPC is Penny, like.
///      7b. else neutral.
/// 
/// For each rule, their tastes are checked in this order: love, hate, like, dislike, or
/// neutral. (That is, if an NPC both loves and hates an item, love wins.)
commented

Fixed in the upcoming 1.6 release via 8c37f1d. The game now defers more to the game code when determining gift tastes, which is slower but more accurate.