Modding Help Gift Tastes - artisan goods.

Discussion in 'Mods' started by BentFX, Jan 6, 2018.

  1. BentFX

    BentFX Cosmic Narwhal

    Okay, I just recently got my toolchain setup for editing XNB files and am just getting started poking at the game's data. I'm hoping to get some clarity on gift tastes. I've edited NPCGiftTastes.yaml, in NPCGiftTastes.xnb to add Grape Jelly(2398) to Vincent's group of loved gifts, because really, Vincent hates artisan goods, but would recognize that grape jelly is way better than goat cheese or pickled artichokes.
    Code:
    <snip>
    Vincent: "Wow, thank you so much! This is terrific!/221 398 612 2398/For me? Wow, thanks!/18 60 64 70 88 232 233 234 222 223 340 344 402 418/This isn't very fun...$s/-5 -75 -79 -81 80/Yuck, what is this?$s/395 459 2 16 330 -26/Thanks!// " #!String
    <snip>
    Unfortunately, that didn't work. If I just add Jelly(344) it works.
    Code:
    <snip>
    Vincent: "Wow, thank you so much! This is terrific!/221 398 612 344/For me? Wow, thanks!/18 60 64 70 88 232 233 234 222 223 340 344 402 418/This isn't very fun...$s/-5 -75 -79 -81 80/Yuck, what is this?$s/395 459 2 16 330 -26/Thanks!// " #!String
    <snip>
    Is that a limitation of the gift tastes, that you can't specify a specific artisan good that falls within a larger group of items? Is there any way to make it recognize the more specific item?

    I'm sure this has been discussed elsewhere, but I had difficulty drilling down to a direct answer.
     
      Last edited: Jan 6, 2018
      Acerbicon and HopeWasHere like this.
    • Pathoschild

      Pathoschild Tiy's Beard

      Grape Jelly isn't a separate item with its own ID, it's a Jelly item with a custom name and price. Unfortunately it's not possible to match specific Jelly types for gift tastes.
       
        BentFX likes this.
      • BentFX

        BentFX Cosmic Narwhal

        Thanks @Pathoschild. Then I'm pretty confident in assuming the same rule applies to gift tastes for different wine, pickles and juice? (I don't really think I need an answer, if it's the same answer. but I felt compelled to add those words so the answer might show up better in search.)
         
        • Pathoschild

          Pathoschild Tiy's Beard

          Yep. The game has four base items for those: Jelly, Juice, Pickles, and Wine. Those are then customised for the flavours, so they have the same item ID as the base item.
           
          • BentFX

            BentFX Cosmic Narwhal

            Okay, poked at it a bit with list_items in the SMAPI console. They've got like an internal ID that's 4 digit, built off the 3 digit item ID of the base produce. It seems for fruit XXX, 1XXX is the wine and 2XXX is the jelly. and for vegetable XXX, 3XXX is the juice and 4XXX is the pickles. I had kind of had a problem with the term Item ID, until I thought it through. The console command player_add uses that 4 digit id and puts the proper flavor of object into your inventory, but I'd assume that internally the objects are in some kind of list or enum, and the 4th digit is added after the fact.

            I don't really care how it's done, just so long as I know what I can do with it. :D I'm sure I'll understand it better after creating a lemon tree, and making lemonade.

            EDIT: BTW @Pathoschild, I've been a Linux user since the 90's and I've got nothing but gratitude for those who support the community, AND SHARE THEIR SOURCE CODE!!! Thank You! I just got my compiler tools lined up also, but so far about all I've accomplished is "Hello, Stardew Valley" in the console. I'm digging into the SMAPI source trying to not only figure out what it does, but also trying to convince myself that it's just like C++. :)
             
              Last edited: Jan 7, 2018
              Pathoschild likes this.
            • Pathoschild

              Pathoschild Tiy's Beard

              Here's the SMAPI code for those item IDs. The flavoured items don't have their own IDs, so SMAPI generates fake IDs for the console commands. That's why Jelly is #433 (the real ID) and Grape Jelly is #2398 (2000 for generated jelly IDs + grape ID 398). Feel free to come chat in #modding on the Stardew Valley Discord if you have questions; the main modding community is there and very open to helping someone new to Stardew Valley modding. :)
               

              Share This Page