RELEASED [SMAPI] Shop Expander 1.6.0b

Add items to shops, buy in bulk!

  1. zarzaz

    zarzaz Subatomic Cosmonaut

    Hi i have problem to add item.
    I try add Hay to Pierre shop but i have error.
    SE.png objid.png
    But item 178 exist in ObjectInformation.xnb
     
    • Xuomi

      Xuomi Phantasmal Quasar

      @zarzaz The error isn't that the object doesn't exist, it's that it doesn't have a value. You need to change the Objectinformation.xnb so it does have a value. Change the zero to a different number.
       
      • zarzaz

        zarzaz Subatomic Cosmonaut

        How i miss that? Im noob in modding. It works now but have another isuue:
        hay 1.png hay 2.png
        Somethig goes wrong. Now i have 2 different items instead of different amount of one item.
         
        • Xuomi

          Xuomi Phantasmal Quasar

          @zarzaz That's because you changed the code for it. One stack has the old format, the other has the new. You'll have to get rid of the old stack.
           
          • zarzaz

            zarzaz Subatomic Cosmonaut

            But how? in config i have :

            {
            "Owner": "Marnie",
            "Item": 178,
            "Amount": 333,
            "Conditions": "year>1"
            },
             
            • Entoarox

              Entoarox Oxygen Tank

              You have an old placeholder item that somehow did not revert correctly, destroy it or the game crashes when you try to sleep,simply as that.
               
              • Entoarox

                Entoarox Oxygen Tank

              • zcsnightmare

                zcsnightmare Scruffy Nerf-Herder

                Cool mod, I was fooling around with this one on Nexus (Generic Shop Extender) then I found yours here.

                Was trying to add some additional weapons to Marlon's shop, but no luck and I'm no coder. Have a texture mod dependent upon Omegasis' Custom Shops Redux to add new weapons to the game, which works as intended, but it can only be used by pressing a hotkey to open a GUI instead of it being added to a shop's inventory. Would be more natural and immersive to buy directly from a shopkeeper. (Also, Custom Shops is being overwritten by Longevity mod, thus causing compatibility issues for some users)

                Adding new weapons also show up in the Item Spawner mod. Figured it could be a conflict with the item numbers. Tried changing those, but they don't seem to be linked with the image of the weapons, descriptions, etc.

                Just tossing this out there, in case either of those two mods could be useful if you were interested in finding a way to implement new items into shops' inventories. :)
                 
                • Entoarox

                  Entoarox Oxygen Tank

                  Weapons dont work the same as normal items, so SE doesnt support them, adding support for weapons and such would require a large recode of how SE loads shop data....
                   
                  • KuroKunoichi13

                    KuroKunoichi13 Aquatic Astronaut

                    Hi, so, I'm terrible with coding and can't get the stuff to run on my computer so I can add items myself, does anyone have a config file they'd be willing to share? The mod seems to work; in Pierre's shop, though, there's a lot of Error Item or whatever slots instead of items I can actually purchase. I'm pretty sure this is because I don't have any items in the config. I appreciate the help!
                     
                    • Honor Shipping

                      Honor Shipping Big Damn Hero

                      I don't have this mod myself (been reading through the thread to see if it's something I want, so far so good ;)), But I would assume there'd be something along the lines of a config file you could open up in notepad/wordpad, and you'd just plop the item names and quantities in there). I can download it real fast and see; I'll probably have ended up using this anyways.

                      EDIT:
                      I've downloaded it, and it appears that you put things into the "dependencies" part of the manifest JSON file, which you can just open in notepad if it doesn't do that by default. Lemme screw around with it a bit and see how it works.

                      EDIT #2:
                      Opened the game before messing with the manifest. Running the game first adds a config file, apparently. Will look into how this works.

                      EDIT #3:

                      After the last default addition in the config file, there's a bunch of brackets:
                      }
                      ]
                      }

                      It looks like you'd change it to:
                      },
                      {

                      ]
                      }

                      After that you'd change it to:

                      },
                      {
                      "Owner": "[insert the name of a shop owner (ie Pierre, Robin, Willy, etc.)]",
                      "Item": [insert the ID for the item you want to add (will link later)],
                      "Amount": [insert desired quantity of item],
                      "Conditions": "[See bottom of edit*]"
                      }
                      ]
                      }

                      Item IDs: https://pastebin.com/TBsGu6Em (I have adblocker on, and it says it's blocking 38 ads from that page, so I'm not entirely sure it's a good idea to go there without it, but I'd assume most people here have decent anti-virus/malware/whatever. Pretty sure they're just banner ads, though).

                      *Conditions seem to be the timeline requirements for the item to appear in the shop. If you wanted just a general year it appeared, you'd put in:

                      "year=n", where 'n' is the numerical value for what year you're wanting to put it. No tricks, they just go in order, from 1 to whatever.

                      Similarly, you could put in an even broader requirement, such as after a certain year has passed, which would look like:

                      "year>n", where 'n' is, once again, the numerical value for the desired year. Like "year=n", it's just 1 to whatever.

                      You can also specify a season, which would look like:

                      "year=n,[season]", n is the same thing as before, and month is, well, the desired season.

                      You can also do:

                      "year>n,[season]"

                      I'm not seeing any "year<n", but I doubt you'd need that anyways. Also not sure if "year=>n" or "year>=n" would work. Let's say n=1. Those would say that the item is available in any year that is year one or later. I suppose you could say "year>1,spring" to get it as early as possible and have it never disappear from the shop UI due to time, but it wouldn't appear until Summer of Year 1.


                      It seems you can also put in when a new part of the map becomes available, like when you can get to the spa, which would be "earthquake" (Only even know that because of the config file, you'd have to look up other events in the code. There's probably another pastebin for that, though).
                       
                        Last edited: Dec 16, 2017
                      • Entoarox

                        Entoarox Oxygen Tank

                        Very well explained for someone who just had a look at the config file! :)
                        You made some big mistakes, but that is understandable for someone just trying to figure it out by looking at how it was used.
                        Anyway, I have a file available where I have explained the whole condition mechanic: https://github.com/Entoarox/StardewMods/blob/master/Framework/About/ConditionDocumentation.md

                        This you see, is not the only mod that uses it, as I specifically designed the conditions system as a way of letting users define requirements without needing to know code in any way :)
                         
                        • Honor Shipping

                          Honor Shipping Big Damn Hero

                          Thank you~! That file is extremely helpful; If I had found it earlier my post from before would just be linking to that, heheh.
                           
                          • Pathoschild

                            Pathoschild Tiy's Beard

                            Shop Expander 1.6.1 is now available! (For Stardew Valley 1.3.30+ only.)

                            Release notes:
                            • Updated for Stardew Valley 1.3.
                            • Fixed Linux/Mac compatibility.
                            • Removed custom update checks; replaced by standard SMAPI update alerts.
                            • Refactored internally.
                            (It's only on Nexus since I don't have access to update the Chucklefish mod page, but Entoarox is welcome to upload it here too.)
                             
                            • Pathoschild

                              Pathoschild Tiy's Beard

                            Share This Page