RELEASED [SMAPI] Shop Expander 1.6.0b

Add items to shops, buy in bulk!

  1. Entoarox

    Entoarox Oxygen Tank

    Entoarox submitted a new mod:

    Shop Expander - Add items to shops, buy in bulk!

    Read more about this mod...
     
      Davrial and chenjohn0329 like this.
    • Entoarox

      Entoarox Oxygen Tank

      General Chaos likes this.
    • BrandonPotter0

      BrandonPotter0 Big Damn Hero

      While the idea of this mod, with the Framework is a neat idea, it doesnt work for me sadly. I tried to edit the config file to add the items I want to shops, but the game crashes whenever I try to scroll in a shop. And my Config file was overridden. I didn't want items in Bulk, but it seems to add those entries back in...

      Currently using the latest version of Stardew Valley and SMAPI 1.5

      This is what my config file looks like:
      {
      "objects": [
      {
      "Owner": "Robin",
      "Item": 330,
      "Amount": 1,
      "Conditions": "year=1"
      },
      {
      "Owner": "Robin",
      "Item": 709,
      "Amount": 1,
      "Conditions": "year=1"
      },
      {
      "Owner": "Clint",
      "Item": 386,
      "Amount": 1,
      "Conditions": "year=2"
      },
      {
      "Owner": "Pierre",
      "Item": 599,
      "Amount": 1,
      "Conditions": "year=1"
      },
      {
      "Owner": "Pierre",
      "Item": 621,
      "Amount": 1,
      "Conditions": "year=2"
      }
      ]
      }

      Is there a way to keep my config file from getting overwritten/Added to?
       

        Attached Files:

        Last edited: Jan 12, 2017
      • Entoarox

        Entoarox Oxygen Tank

        This is unfortunately a bug in SMAPI's new config system, it is known and SMAPI 1.6 will fix it.
         
        • JoshuaVH

          JoshuaVH Space Hobo

          Is there a way to edit the inventory of the casino shop? (So that you could perhaps get a way to exchange qi coins to gold)
           
          • Entoarox

            Entoarox Oxygen Tank

            Any items sold in the casino shop would cost Qi coins, the coinage used by any shop is a property of the shop itself, not the items within it.
             
            • JoshuaVH

              JoshuaVH Space Hobo

              Okay a new idea then. Since the Qi coins cost 1000 Gold per 100 Qi coins, Could you add a gold bar into the casino shop that would cost 25 Qi Coins. (Gold bars sell for 250 and that way when you buy 100 Qi coins worth of gold bars you get 1000 Gold and thus it is equal to the original Qi coins - Gold exchange rate).
               
              • Entoarox

                Entoarox Oxygen Tank

                I have added support for the casino shop in the source as owned by `MisterQi`, the next release, likely some time after SMAPI 1.6 will thus include that as a editable shop.
                 
                • BrandonPotter0

                  BrandonPotter0 Big Damn Hero

                  Just tried this mod out with the new 1.6 beta, and this mod DOES work with it. Only issue Im having, is that all teh names of the groups of 50 items's names start with a number. No clue as to why. Perhaps theres something that has to be updated for the new SMAPI.
                   
                    Last edited: Jan 16, 2017
                  • Entoarox

                    Entoarox Oxygen Tank

                    No, that is due to how Shop Extender adds items to shops, it appends the amount you buy at once to the names.
                     
                    • BrandonPotter0

                      BrandonPotter0 Big Damn Hero

                      Are you sure? Cause theres items in there that shouldnt be there. And when I try to buy a 2nd stack of Melon seeds, teh game freezes, and the consoles goes apeshit.

                      I uploaded the error log, and a screenshot. The screenshot says 42 when theres only a stack of 10 items....
                       

                        Attached Files:

                        Last edited: Jan 17, 2017
                      • Entoarox

                        Entoarox Oxygen Tank

                        That does indeed look like a bug happened somewhere, let me go in and see if I can fix that...
                         
                        • Entoarox

                          Entoarox Oxygen Tank

                          Entoarox updated Shop Expander with a new update entry:

                          fixes and stuffs!

                          Read the rest of this update entry...
                           
                          • TenkoKuugen

                            TenkoKuugen Scruffy Nerf-Herder

                            Updated to SMAPI 1.6
                            Updated to 1.5 of the mod

                            Still crashes when you try to view custom items. Definitely not a SMAPI problem then.

                            Error log and config file below
                            (You probably need the more crops xnb files to test this ingame)

                            This is basically the error. Looks to me like the dll doesn't know how to pull the graphics from PNGs past a certain count?
                            Code:
                            [15:30:38 ERROR SMAPI] The StardewValley.Menus.ShopMenu menu crashed while drawing itself. SMAPI will force it to exit to avoid crashing the game.
                            System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
                               at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
                               at StardewValley.Menus.ShopMenu.draw(SpriteBatch b)
                               at StardewModdingAPI.Inheritance.SGame.Draw(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Inheritance\SGame.cs:line 771
                            [15:30:41 TRACE Advanced Location Loader] EventFired.MoreEvents_ActionTriggered(Buy)
                             

                              Attached Files:

                            • Entoarox

                              Entoarox Oxygen Tank

                              Let me start by clarifying something: This error has *nothing* to do with the mod directly, rather, it happens in SDV itself, the mod just causes the circumstances that allow for the error to occur there.

                              Now that you have updated and the issue is apparently still there, I am going to spend some time looking if I can figure out what SDV's code is crashing on...

                              Edit: Question, these custom items, do they happen to be ones that are sold in single amounts? Because if so, I think I have sussed out the issue.
                              Edit 2: Also think I sussed out why the names didnt work... >_> a case of numeric addition rather then string addition happening... should also be fixed.
                               
                                Last edited: Jan 17, 2017
                              • Entoarox

                                Entoarox Oxygen Tank

                                Entoarox updated Shop Expander with a new update entry:

                                More bug squashing ahoy!

                                Read the rest of this update entry...
                                 
                                • TenkoKuugen

                                  TenkoKuugen Scruffy Nerf-Herder

                                  Well, yes, I set the config to sell them as 1

                                  I set them to bulks of 42 as a test now, but obviously I can't go and sell expensive Saplings in bulk.
                                  They do show up now, though. So THAT was the error? Makes me want to quadruple facepalm I didn't just try a different quantity.
                                  It looks like I need to adjust costs in objectinformation, though. Vanilla items are sold at x4 their specified in objectinformation.yaml specified value while these seem to be sold at 1x specified cost. Do you know why that happens?
                                   
                                  • Entoarox

                                    Entoarox Oxygen Tank

                                    For people curious, my name generation was done automatically by doing stackAmount + ' ' + Item.Name
                                    The issue here is that because `stackAmount` is a number, it was treating the char (' ') for space as its integer equivalent (32), meaning the code actually resolved (stackAmount + 32).ToString()+Item.Name rather then the stackAmount.ToString() + ' ' +Item.Name I wanted, that has now been fixed though :p
                                     
                                      Last edited: Jan 17, 2017
                                    • Entoarox

                                      Entoarox Oxygen Tank

                                      No idea, I read the sale price of the objects directly from SDV, so I can only assume that SDV does something weird... :S
                                       
                                      • TenkoKuugen

                                        TenkoKuugen Scruffy Nerf-Herder

                                        Okay, I was wrong, it sells mod items at 2x value
                                        Apricot Sapling has a value of 500, is bought for 2000
                                        Mod Sapling has a value of 500, is bought for 1000

                                        I thought it was the longevity mod messing with things but the wiki lists the same price for the Apricot Sapling at the store.
                                         

                                        Share This Page