Modding Help Where are the item prices/inventories for shops??

Discussion in 'Mods' started by scrptrx, Jul 13, 2016.

  1. scrptrx

    scrptrx Void-Bound Voyager

    I've extracted all the XNB files and looked at what I thought would be relevant YAML text, but I can't figure out where shop inventory and prices are stored. It must be a deeper, more complicated thing, yes? Or am I blind and missed one specific file?

    All I want to do is see how complicated it would be to add something to Clint's inventory.
    I'm guessing it's not as easy as editing dialogue. :(
     
    • foghorn

      foghorn Pangalactic Porcupine

      ^The tools are hard-coded, yeah.
       
      • scrptrx

        scrptrx Void-Bound Voyager

        Not tools, but ore. For instance, why in the world doesn't Clint sell iridium ore if he says in the dialogue something about "my iridium axe" or whatever? He clearly works with iridium, and I was interested in adding the ore to his inventory. But like all shop inventory I'm guessing it's like you said, hard-coded.
         
        • foghorn

          foghorn Pangalactic Porcupine

          Not all shop inventory is (the prices for Robin's Rare-As-Hell Furniture You Can Never Get isn't, for example), but Clint's smithy is.
          If you feel adventurous, you can poke around and see how it works.


          Note: It wouldn't be so complicated if you could just purchase new, improved tools outright, without the upgrade/swap-out stuff. 2RPG4ME :)
           
            Last edited: Jul 13, 2016
          • Entoarox

            Entoarox Oxygen Tank

            Shop inventories are not stored in the xnb files because they are hardcoded into the exe file.
            Although it is possible to modify or even replace shop inventories (See my Shop Extender mod if you simply want to add content to shops) this requires a SMAPI mod.
             
              cankersaur, foghorn and scrptrx like this.
            • teseting

              teseting Aquatic Astronaut

              The best way so far seems to be check for a menu change and check if the new menu is the blacksmith menu using the dialogue then make a new menu.
              I made a mod so you can see what you would have to do but this would be incompatible with other mods that would do the same. We need someone makes a proper API.
              https://github.com/falsidge/BlacksmithMenu
               
                cankersaur and foghorn like this.
              • foghorn

                foghorn Pangalactic Porcupine


                I thought I had seen nearly every mod in this forum :O


                Edit: It works great, @teseting ; you might want to put the dll and the manifest in a folder named 'StardewMenu' though. SMAPI has a dress-code now :)
                Image 001 2016 07 13.png
                 
                  Last edited: Jul 14, 2016
                  cankersaur likes this.
                • scrptrx

                  scrptrx Void-Bound Voyager


                  I searched for Shop Extender here and on google and in your profile but found nothing :-/
                   
                  • foghorn

                    foghorn Pangalactic Porcupine

                  • cankersaur

                    cankersaur Pangalactic Porcupine

                    Side note -- I also have a lot of trouble with the search function, so I feel your pain.
                     
                      Kattia and scrptrx like this.
                    • Entoarox

                      Entoarox Oxygen Tank

                      My fault, I said "Shop Extender" while the mod is called "Shop Expander" :rofl:
                       

                      Share This Page