REQUEST Display cabinet

Discussion in 'Mods' started by darkmirror, Mar 28, 2016.

  1. darkmirror

    darkmirror Void-Bound Voyager

    Hey, I was thinking I'm probably not the only one who likes to collect and hold on to rare finds and certain items they come across, so would anyone else think it useful if we could craft like a china cabinet to keep them in and display in our homes? It's no fun just keeping them in chests, I'd like to put some rare finds on display and use them to decorate my home.

    Also it might be kind of cool if you could mount fish and either put them up in your home or sell them as a crafted item.
     
    • Raijyn

      Raijyn Phantasmal Quasar

      It's a good idea, and definitely something I've thought about. It'd be nice to have it in the vanilla game and definitely something worth putting up as a suggestion, but a mod would be great for now. After all, I have all of these 'legendary' fish, and even though they're worth a lot and I could just sell them, it would be nice to display them, as a sign of accomplishment.

      I figure it work similar to the grange that you put your selection of items in at the Stardew Valley Fair, and If it's possible there, I figure there's a way to program/code a placeable item or object to do the same. There could be cabinets, like you've already mentioned, plaques for your proud catches or just for pretty items, wall-mounted shelves... stuff like that.
       
        suzannemonroe likes this.
      • suzannemonroe

        suzannemonroe Scruffy Nerf-Herder

        i would love this! is there someone who can do this? D:
         
        • Sarahfiren

          Sarahfiren Phantasmal Quasar

          I would love to see this too please :nuruawe:
           
          • Hyper_Eclipse

            Hyper_Eclipse Orbital Explorer

            I know this thread is a bit old but I as well would really like to see some sort of display case and/or fishbowls added to the game to keep those prized items or fish.
             
            • Entoarox

              Entoarox Oxygen Tank

              I am afraid that until Farmhand is available, or my attempt on getting it to work in EntoFramework, actual new items are difficult, and advanced items like these completely impossible :(
               
              • TenkoKuugen

                TenkoKuugen Scruffy Nerf-Herder

                New items being difficult I knew, but isn't there an additional crops mod around? How is that one handled?
                 
                • rodrigovaz

                  rodrigovaz Lucky Number 13

                  Crops get "automatically" inserted in the game, you only need a way to get the seeds which can be done very easily by custom seed shops(takes like, 4 lines in SMAPI). Same thing for NPCs, you only need to find a way to place them in game once(three line in smapi), the real problem with these more complex items is that their workings is hardcoded in the game and most of the times, actually split between many different methods. My bet is that doing this is a bit too heavy for the engine to handle but idk, I literally made my first mod for a game yesterday and only started using SMAPI 2 days ago, Idk how computationally heavy doing these things are.
                   
                  • Entoarox

                    Entoarox Oxygen Tank

                    The game already knows how to deal with crops, so adding new crops is easy, but to have a display cabinet would require a new object, because there are no existing display cabinets in the game, and we modders currently cannot interface with the code that is responsible for saving furniture to file, and since we cannot do that, we cannot tell the game how to save our new object, crashing the game.
                     
                    • rodrigovaz

                      rodrigovaz Lucky Number 13

                      Does this implies new furniture isn't possible or just that furniture with special things isn't possible? Like, if I wanted to add another useless plant in a pot, would I be able to?
                       
                      • Entoarox

                        Entoarox Oxygen Tank

                        I honestly do not know... let me have a look for you :)

                        Edit: Yep, looks like you can quite easily add more furniture by editing the texture and furniture data :)

                        Edit 2: Note that "Easily" here means, "if you know what to do", there are quite a few things you need to define in the furniture data so the game knows how to deal with the furniture in question.
                         
                          Last edited: Jan 8, 2017
                        • rodrigovaz

                          rodrigovaz Lucky Number 13

                          I sincerely think furniture is handled just as crops are, In fact, I do believe that ALL items are handled that way, it's just that their usefulness is extremely limited AND hardcoded. E.g: crops are always crops so if you wanted a specific crop to have a different behavior you would need to write it yourself with the API. Furniture is always furniture. Other items are always other items, edibles are just a special case of these other items(they have a field called edibility set to some value that is not -300). Things like furnaces, kegs, torches... are just like furniture but have their functionality hardcoded in the game.
                           
                          • Entoarox

                            Entoarox Oxygen Tank

                            See my 2 edits. :p
                             
                            • rodrigovaz

                              rodrigovaz Lucky Number 13

                              Yep, thought so.

                              I will try to hack something here and see if I can get a item display working.
                               
                              • Entoarox

                                Entoarox Oxygen Tank

                                It wouldnt be able to display more then 1 item at a time, and we have furniture for that already.
                                 
                                • Minakie

                                  Minakie Cosmic Narwhal

                                  "if you know what to do" = there go my hopes of adding my own furniture
                                  I'm used to editing the .png files, but I'm never messing around with code.
                                  Pretty sure a bomb would go off somewhere in the world if I did. xD
                                   
                                    Hyper_Eclipse likes this.
                                  • Entoarox

                                    Entoarox Oxygen Tank

                                    Not code, the data needs to essentially tell the game 2 main things about the object, A: the size (Obviously), and B: If it can rotate, how to rotate it.
                                     
                                    • Igorious

                                      Igorious Sandwich Man

                                      I think, it's possible to use chests as showcases if we override drawing method.
                                      I've not practiced modding last half year, and now I see, that it hasn't become easier. But my old technique with item replacing before saving still should work.

                                      showcase.png
                                      So, it needs to find a chest with reserved ID and replace it with a custom class.
                                      Then to draw «chest» and draw items over «chest».
                                      Maybe it's possible to use StorageContainer to restrict an amount of items.
                                      And, before saving, it needs to replace custom class with Chest class to prevent a crash during serialization.

                                      But I think, it will be too hard to create non-1x1 showcase, like in autumn Stardew Valley Fair (3x3). Or to create wall items, like in Sims for fishes.

                                      Unfortunately, now I have no time to realize this :(
                                       
                                      • Entoarox

                                        Entoarox Oxygen Tank

                                        Single-item displays are already possible though, so going through all the difficulty of editing the chest to work like one is pointless, the real goal was to create a larger display, and that is where the issue happens...
                                         
                                        • Igorious

                                          Igorious Sandwich Man

                                          Do we really need a larger display?
                                          We can create two/three separate items for left edge, right edge, and center to emulate 1xN showcase.

                                          Also, I've thought about usage of Furniture as base object in game and Chest object for saving. It will allow to use showcase on walls, but I'm not sure, that game engine allows to save it correctly after transformation to the Chest.
                                           

                                          Share This Page