RELEASED StackSplitX - Item stack splitting

Discussion in 'User Interface' started by TheCatMan, Dec 24, 2016.

  1. TheCatMan

    TheCatMan Void-Bound Voyager

    Download this mod from Nexus Mods.

    This mod lets you split stacks/buy items in a custom amount by overriding the default Shift+Right-Click behaviour.

    [​IMG]

    Usage
    To open the split menu simply Shift+Right-Click an item. You can then enter the desired number of items to pick up, buy, sell, move etc.

    When the split menu is open you can do most common text navigation and manipulation operations:
    • Backspace to delete a character left of the caret (or all text if it's highlighted).
    • Delete to delete a character right of the caret (or all text if it's highlighted).
    • Left/Right Arrow to move the caret left and right.
    • Home to move the caret to the beginning of the text.
    • End to move the caret to the end of the text.
    • Ctrl+A to highlight all the text.
    To submit the number simply press Enter or click the OK button.

    While the split menu is open you can click anywhere else to 'cancel' the operation, causing the default shift+right-click behaviour to be used.

    Compatible menus
    This mod should work for all menus that it would be useful for, though it's possible I missed some so if that's the case please let me know.
    Currently works with:
    • Player inventory
    • Crafting menu (from inventory as well as cooking)
    • Shop menus (buying and selling)
    • Item grab menus (chests, shipping bin)
    • Junimo Note Menus (Community center bundles)

    Requirements
    This mod works with the most recent version of Stardew Valley (last tested with 1.1).
    This mod requires SMAPI 1.4 or higher to run.
    For instructions on installing SMAPI view this help page.

    Installation
    1. Download the latest release here.
    2. Unzip the contents into your Mods folder which is located in the same directory as your Stardew Valley.exe and StardewValleyModdingAPI.exe.
    For more information on installing and using mods see this page.

    To uninstall this mod you can simply delete the "StackSplitX" folder from your Mods directory.

    You can view the source for this mod here.
    Nexus mods page.
     
      Last edited: May 8, 2017
      xsamplek77, Exiom and alumie711 like this.
    • lapetitevalerie

      lapetitevalerie Orbital Explorer

      It's so useful, this mod missed me so much !!
      Thanks <3
       
        TheCatMan likes this.
      • Exiom

        Exiom Void-Bound Voyager

        You sir are a legend, may the immersion be with you :cool: .
         
          TheCatMan likes this.
        • HopeWasHere

          HopeWasHere Existential Complex

          Hey, I love your mod, but I think I'm doing something wrong. For some reason when I Shift+Right Click in the cheats menu it grabs 999, then when I do it in a store it grabs 5, then when grabbing items from a chest it grabs all that are available. No split menu appears. Not sure what would be causing this error or how I can fix it.
           
          • TheCatMan

            TheCatMan Void-Bound Voyager

            That is strange, I just tried it out with the cheat menu installed and everything seems to work normally. Could you post your error log? You can find it via http://canimod.com/guides/smapi-faq#where-is-my-error-log. You can just attach it to your reply or copy & paste the contents somewhere like pastebin.
             
            • HopeWasHere

              HopeWasHere Existential Complex

              Here it is, but I didn't see any errors pertaining to this mod any of the times I booted it up. So I don't know how helpful it will be...
               

                Attached Files:

              • TheCatMan

                TheCatMan Void-Bound Voyager

                Are you able to reproduce the issue then post your error log from that play session when the issue occurred again? I'm testing it with the Shop Expander mod right now and I'm noticing some strange behavior, but not to the degree where it's not working at all.

                Edit: The strange behavior is due to Shop Expander adding stacks of 10 to the shop, and StackSplitX buys the amount entered multiplied by the stack amount, so in this case it's multiplied by 10. This is probably not desired, but it's also how the crafting menu works with it. I can probably change it for the shop though as it probably doesn't matter if you don't adhere to the size of the stack in the shop.
                 
                  Last edited: Jan 18, 2017
                • TheCatMan

                  TheCatMan Void-Bound Voyager

                  Can you also upload a screenshot of your Mods folder? Or give me a list of all the mods your using?
                   
                  • HopeWasHere

                    HopeWasHere Existential Complex

                    Sorry it took me a bit. Thanks again for looking over this for me :)
                     

                      Attached Files:

                    • TheCatMan

                      TheCatMan Void-Bound Voyager

                      Actually it might be easiest for me to replicate it if you zip up your mods folder and upload it. Then I can try it out with your exact setup.
                       
                      • HopeWasHere

                        HopeWasHere Existential Complex

                        That probably would be easier, here you go
                         

                          Attached Files:

                        • TheCatMan

                          TheCatMan Void-Bound Voyager

                          Hmm I'm not able to reproduce the issue even with your mods. If you run into the issue again, exit the game immediately and upload your log file here. You can also try updating your mods as a lot of them are out of date.
                           
                          • HopeWasHere

                            HopeWasHere Existential Complex

                            Alright, I'll give it a try. Thanks again
                             
                              TheCatMan likes this.
                            • HopeWasHere

                              HopeWasHere Existential Complex

                              So I haven't updated anything yet, just wanted to give it another go. Started up a new game and the same thing happened. Here's the error log, but I don't think it's much different than before.
                              I'll start updating the mods now and see if that's the problem

                              Edit: Quick question, how can you tell which mods are outdated? I can't seem to see it anywhere...
                               

                                Attached Files:

                                Last edited: Jan 18, 2017
                              • TheCatMan

                                TheCatMan Void-Bound Voyager

                                You can generally tell because there will be warnings or errors regarding them in the logs. Other than that you just have to periodically check where you downloaded the mods from to see if there's a new version.
                                 
                                • TheCatMan

                                  TheCatMan Void-Bound Voyager

                                  Last edited: Apr 3, 2017
                                • TheCatMan

                                  TheCatMan Void-Bound Voyager

                                  Updated to be compatible with SMAPI 2.0.
                                   
                                  • CarlosRojas

                                    CarlosRojas Void-Bound Voyager

                                    It is not working for version 1.5, it does not divide correctly ... and sometimes it duplicates resources.
                                    Here I leave a video that someone created about that error ... (I hope nothing happens by leaving the video here)



                                    Hope a solution is found soon ...
                                     
                                    • fantuanmei

                                      fantuanmei Void-Bound Voyager

                                      1游戏1.5版本用不了。弹窗错误。

                                      1 version 1.5 of the game is not available. The pop-up window is wrong.

                                      无法使用。


                                      [StackSplitX] This mod failed in the Input.ButtonPressed event. Technical details:
                                      System.NullReferenceException: 未将对象引用设置到对象的实例。
                                      在 StackSplitX.MenuHandlers.InventoryHandler.SplitSelectedItem(Int32 stackAmount) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 153
                                      在 StackSplitX.MenuHandlers.InventoryHandler.CancelSplit() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 161
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\CraftingMenuHandler.cs:行号 56
                                      在 StackSplitX.MenuHandlers.GameMenuHandler.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\GameMenuHandlers\GameMenuPageHandler.cs:行号 16
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.HandleInput(SButton button) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 227
                                      在 StackSplitX.StackSplitX.OnButtonPressed(Object sender, ButtonPressedEventArgs e) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 31
                                      在 StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) 位置 C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:行号 125
                                      [StackSplitX] This mod failed in the Input.ButtonPressed event. Technical details:
                                      System.NullReferenceException: 未将对象引用设置到对象的实例。
                                      在 StackSplitX.MenuHandlers.InventoryHandler.SplitSelectedItem(Int32 stackAmount) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 153
                                      在 StackSplitX.MenuHandlers.InventoryHandler.CancelSplit() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 161
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\CraftingMenuHandler.cs:行号 56
                                      在 StackSplitX.MenuHandlers.GameMenuHandler.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\GameMenuHandlers\GameMenuPageHandler.cs:行号 16
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.HandleInput(SButton button) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 227
                                      在 StackSplitX.StackSplitX.OnButtonPressed(Object sender, ButtonPressedEventArgs e) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 31
                                      在 StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) 位置 C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:行号 125
                                      [StackSplitX] This mod failed in the Input.ButtonPressed event. Technical details:
                                      System.NullReferenceException: 未将对象引用设置到对象的实例。
                                      在 StackSplitX.MenuHandlers.InventoryHandler.SplitSelectedItem(Int32 stackAmount) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 153
                                      在 StackSplitX.MenuHandlers.InventoryHandler.CancelSplit() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 161
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\CraftingMenuHandler.cs:行号 56
                                      在 StackSplitX.MenuHandlers.GameMenuHandler.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\GameMenuHandlers\GameMenuPageHandler.cs:行号 16
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.HandleInput(SButton button) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 227
                                      在 StackSplitX.StackSplitX.OnButtonPressed(Object sender, ButtonPressedEventArgs e) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 31
                                      在 StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) 位置 C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:行号 125
                                      [StackSplitX] This mod failed in the Input.ButtonPressed event. Technical details:
                                      System.NullReferenceException: 未将对象引用设置到对象的实例。
                                      在 StackSplitX.MenuHandlers.InventoryHandler.SplitSelectedItem(Int32 stackAmount) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 153
                                      在 StackSplitX.MenuHandlers.InventoryHandler.CancelSplit() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\ItemGrabMenuHandler.cs:行号 161
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\CraftingMenuHandler.cs:行号 56
                                      在 StackSplitX.MenuHandlers.GameMenuHandler.CancelMove() 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\GameMenuHandlers\GameMenuPageHandler.cs:行号 16
                                      在 StackSplitX.MenuHandlers.BaseMenuHandler`1.HandleInput(SButton button) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 227
                                      在 StackSplitX.StackSplitX.OnButtonPressed(Object sender, ButtonPressedEventArgs e) 位置 C:\SDV_Modding\ModUpdates\StackSplitX\StackSplitX\MenuHandlers\BaseMenuHandler.cs:行号 31
                                      在 StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) 位置 C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:行号 125
                                       

                                        Attached Files:

                                        Last edited by a moderator: Apr 28, 2021

                                      Share This Page