WIP SMAPI Extended Fridge Mod!!!

Discussion in 'Mods' started by Crystalmir, Jul 5, 2016.

  1. Crystalmir

    Crystalmir Subatomic Cosmonaut

    I decided to try modding the game fridge after seeing numerous threads that said it wasn't possible to mod it.

    What I need from you

    Peoples willing to backup one of their save and test the mod. I can rebuild it with SMAPI 0.39.x to 0.40.x.

    Please post if you are interested and can test an alpha-version of mod with risks of losing one of your save.


    Page 1 and page 2 of my fridge:

    [​IMG]

    [​IMG][/url]

    Contents in code:

    [​IMG][/url]



    Currently done
    • Fridge allows up to 4 pages of items (so that's 144 items)
    • The fridge and all pages of items works with crafting recipes
    • The content of the fridge is loaded/saved into the normal game save without issues
    • Scroll between pages of items using the arrows keys
    Minor things TODO before release
    • When adding/removing an item display the page the item was added/removed from
    • Detect when the fridge menu is exited
    • Save in a per-save SMAPI config so the user can edit his fridge
    • Display page # above the inventory UI DONE
    • Less fragile fridge detection code
    • Compatibility with gamepad/joystick
    • Rebinding previous page/next page keys
    • Click buttons to change pages DONE
    Future plans
    • Use the same technique to make bigger chests
    • Compatibility with chest labels mod
    • Compatibility with mods that change the ItemGrabMenu
    File
    Release thread: http://community.playstarbound.com/threads/extended-fridge-smapi.117348/
     
      Last edited: Oct 6, 2016
      hilohu, ekffie, Felicity_Bane and 8 others like this.
    • foghorn

      foghorn Pangalactic Porcupine

      Sure, why not. So you're using the in-game save? Neat. I figured there would have to be an external SMAPI save.
       
        Last edited: Jul 5, 2016
      • Jinxiewinxie

        Jinxiewinxie Farmer Fashionista

      • foghorn

        foghorn Pangalactic Porcupine

        SDV 1.07
        SMAPI 0.39.2
        Default Farmhouse (1st upgrade)
        Clean save (Year 1)
        Mods: Extended Fridge, Zoom, TimeSpeed

        I can't get the added pages to cycle, even if I fill up the first page.
         
        • Crystalmir

          Crystalmir Subatomic Cosmonaut

          Right, forgot to do an exception when determining wheter to show the next page.

          If you add one more item by right-clicking on an inventory item it should work because the fridge will have 37 items and the next page currently only show up if the list of items has 1 more items than the total capacity of all the pages filled. Will fix ASAP.
           
            foghorn likes this.
          • foghorn

            foghorn Pangalactic Porcupine

            ^First thing I tried. No go.

            Edit: Works like a charm now.
            [​IMG]
             
              Last edited: Jul 6, 2016
            • Entoarox

              Entoarox Oxygen Tank

              Oh oh, looks like you're not drawing your custom title in the proper event handler!
               
              • Crystalmir

                Crystalmir Subatomic Cosmonaut

                It's just that I am new to the game UI stuff and I didn't place the IClickableMenu.drawBorderLabel correctly on the screen.

                I ended up making a new class called FridgeGrabMenu, based heavily on ItemGrabMenu. So I can have complete control on the way the chest UI looks for the fridge.

                When I'm done the release will probably have the source to what I did + a binary DLL for the menu so that the menu can be used in other mods.

                Thanks for suggesting that I just use pages to display all the items on Discord because
                it turned out to be the simplest way to handle this :)
                 
                  Last edited: Jul 6, 2016
                • Entoarox

                  Entoarox Oxygen Tank

                  Why do you think CA uses that system himself for things that need more space then the screen supplies? :p
                   
                  • Ladysarajane

                    Ladysarajane Phantasmal Quasar

                    I'm very interested in trying this out. Would it matter if we have other mods already installed? One is the chest label mod, but i have not renamed my fridge.
                     
                      cankersaur likes this.
                    • Hitgirl911

                      Hitgirl911 Big Damn Hero

                      This is definitely a wanted mod O.O I'm also interested in trying it out! (Especially since I've been running out of fridge space :rofl:)
                       
                      • taintedwheat

                        taintedwheat Master Astronaut

                        Hey Crystalmir, could you send that over my way when I'm ready? <3
                         
                        • zipy199522

                          zipy199522 Scruffy Nerf-Herder

                          Great work! Now my fridge will never be empty or too full!
                           
                          • Felicity_Bane

                            Felicity_Bane Void-Bound Voyager

                            I'd like to try this out. Thank you for doing this!
                             
                            • Neferatem

                              Neferatem Void-Bound Voyager

                              I'd love to try this. My fridge is way to small!
                               
                              • Acerbicon

                                Acerbicon Scruffy Nerf-Herder

                                Definitely willing to risk any and all of my saves for this endeavor. <3
                                 
                                  Jinxiewinxie likes this.
                                • Crystalmir

                                  Crystalmir Subatomic Cosmonaut

                                  Can you smell this? It's the smell of ozone when you open your BRAND NEW EXTENDED FRIDGE!!!!

                                  0.40.x
                                  0.39.x
                                   
                                  • Felicity_Bane

                                    Felicity_Bane Void-Bound Voyager

                                    It works for me. It's fantastic. Thank you!
                                     
                                    • Hitgirl911

                                      Hitgirl911 Big Damn Hero

                                      Hello! I've been using your mod and it's awesome! However every time I press sort, it crashes.


                                      Sent from my iPad using Tapatalk
                                       
                                      • Crystalmir

                                        Crystalmir Subatomic Cosmonaut

                                        Are you on SMAPI 0.40.x? There's an update for the 0.40.x version of the mod for hat bug in the mod section or on Nexus
                                         
                                          Last edited: Jul 11, 2016

                                        Share This Page