RELEASED [SMAPI 0.4][SDV 1.07]Custom Shops Redux! v1.2.0 Now with NPC shop examples!

Discussion in 'Mods' started by zipy199522, Apr 25, 2016.

  1. zipy199522

    zipy199522 Pangalactic Porcupine

    Good evening everyone. At this point I don't even know how I'm creating mods so quickly, but I think I'll strike while the iron is hot. Here is my third release of the day, the Custom Shops Mod Redux!

    *UPDATED 5/8/16*

    The custom_shop_mod_redux is a second, much better attempt at adding custom shops into StardewValley!

    ***Not to be confused with the custom_shop_mod which was it's predecessor and was based around the SMAPI console.

    Basically making a custom shop is as simple as following the formatting in the pre-existsing custom_shops in a new text file. (Or by using the super useful Custom Shop Creation Tool)

    You can access these custom shops by pressing a key. (The U key by default, which is configurable in the config file)

    I recommend that you use the Custom Shop Creation Tool that I created for everyone to create your custom shops. The link is down below. Took me a little bit of time to put together, but it works.

    Watch the new video to understand how it works.

    Have fun with this one! I hope to see all of the custom shops that you all put out!

    If you wish to call this mod in your own mod without the menu the code would be

    Custom_Shop_Mod_Redux.Class1.external_shop_file_call(path, filename, merchant_chat, NPC);

    Where path is the directory path of the desired text file, and filename is the name of the file inside of the path directory.
    -Merchant chat is the text the merchant says in the in-shop dialogue box.
    -NPC is the npc that is referenced for the shop's portrait.

    *Note that path will not include the file itself. The code will take care of that for you.

    This would be useful if you want a custom NPC to have a shop but you don't want to have to code in the shop yourself.
    Some goals of mine with this mod:

    1. Get as many different types of items available for selling. (finished)

    2.Create a nice gui interface in Unity for creating custom shops so that modders don't have to deal with my icky formatting rules. The GUI will take care of that for modders. (finished)

    3.Make my code compatible with other mods for modders, so that they can call my shop_command_code and be able to open up a shop from text file with just path information, and file names. (This is next)

    4. Document the mod for future user use.
    Types of Items this mod supports in shops.
    1.Items (like normal inventory items)

    2.Furniture- (windows, tables, chairs, etc)

    3.swords- Swish, swish.

    4.Hats -Got to look cool

    5.Boots - Lace up for adventure.

    6.Wallpapers - Make your house look nice.

    7.Carpets/Flooring - Like animal crossing.

    8.Rings - As long as they aren't evil.

    9.Lamps - Light up the world.

    10.craftables* =*note that there was some....issues adding in craftable objects. They all act like torches when you interact with them. It's kind of hilarious and I don't think I'll change it anytime soon. You can still have objects like the furnace function like normal, by right clicking it with copper. In order to get the smelted copper bar however, you would have to destroy it, as would go for all machines that behave this way. Sorry. On the plus side your scarecrows can be on fire forever.
    Get it Here!

    Link for the Custom Shops Creation Tool.

    Here is an *UPDATED* video on how the mod works.

    Also I have finally finished work on binding a shop to an NPC! Here is that stuff down below:

    Get the NPC_WITH_SHOP example here!

    Also here is yet another video. This time showcasing the NPC (Abigail in this instance) as the custom_shops merchant!

      Last edited: May 9, 2016
    • taintedwheat

      taintedwheat Master Astronaut

      I sat here and watched this, thanks so much. Still kinda confused because I'm just like that but this will really help me make the mod I working on! Thanks so much. The way you have thing set up and explained really helps out people who don't know what they're doing yet. Ahh. This makes me super excited.

      Is it possible then to use this to try to create more furniture and hats? whaaaa
      • EpicAdventure

        EpicAdventure Zero Gravity Genie

        With this mod is possible to add a shop with all items from Pierre/Joja, and just adjust the prices?
        How easy it would be for persons like me, with zero experience in modifying the codes of Stardew Valley?
        • zipy199522

          zipy199522 Pangalactic Porcupine

          I'm glad you enjoyed it! In terms of adding in more furniture and hats using this mod, the answer is....I'm not sure just yet. Using this mod there is a way to buy crafting recipes from this shop and those crafting recipes in turn could make objects that could act like furniture. As for hats I'd have to do a little more digging and see what I can pull up. I'll let you know what I discover along the way. =)

          Actually quite easily! You would need to know all of the items that they sell, and look up the corresponding object_id number that can be found in Stardew Valley/Content/Data/object_information.xnb (or .yaml if you have extracted it using xnb node)

          Then you would use the format of the text files I gave you (as simple as making a new text document) and placing the values in the correct locations! You then would change the price_value in your shop.txt file to whatever you want, and there you go!

          As for modifying the code of Stardew Valley all it takes is some time, experimentation, and determination. I learned a lot just by looking through all of the functions that SMAPI provides and some of the examples other modders have posted. All of my mods have code that is open-source so anyone can read it, so feel free to look at those for an example. It would help looking up some basic tutorials on programming in C# if you don't already know how to, as that will definitely help. Also remember that Google is your best friend. I wish you luck with programming!
          • Zelnite

            Zelnite Big Damn Hero

            This will be useful when you are using the More crops mod :rofl: very nice mod!
            • taintedwheat

              taintedwheat Master Astronaut

              I will probably come back to this when I'm at a closer point to implement this. Is there an easy way/will you make it easy for people too link these custom stores with custom npcs?

              Right now, I'm like on stage/level 1.5 of npc portrait making, not to mention I still have to editing up sprites for it do what I want...
              But this is what I've done so far:

              no name2.png
              • deadrun

                deadrun Void-Bound Voyager

                Super neat! OK I can't wait what other moders do with this and as a person who enjoys certain items earlier (sprinklers) then later this makes my play through just a little bit more legit. I feel so dirty just grabbing things from CJB's item spawner. :D
                • zipy199522

                  zipy199522 Pangalactic Porcupine

                  Actually yes, that's part of the goal for this mod, which is to be able for moders to call my code any way they like to be able to open up a custom shop associated in a text file. That way if they have some code associated with some npc dialogue options, they should be able to open a shop associated with this file. I'm still adding in functionality for the mod right now, and I plan on making a tool to help aid in the creation of custom shops so that it will be fairly easy since I know the formatting can be confusing.

                  Also because you requested it, when I push the next update, Furniture and Hats will be able to be bought from custom_shops along with a plethora of other goodies. Stay tuned to see what is coming in the next update. ;)
                  • taintedwheat

                    taintedwheat Master Astronaut

                    oh goddamn, this is kinda hot --not going to lie. <3 <3 <3 <3

                    Now originally I was just going to just do an NPC for my weed mod. But if you need help creating npc's and that sell things like extra furniture, hats/clothes, i can help design that too. -- And draws up items to go along with it.

                    I actually posted a thread earlier this week looking for people for ideas to add more content for stores because my friend @BoffoBoy wanted to add more storefronts on the townmap since I'm getting a custom place on the map because there's going to be extra room.
                    • dsrules

                      dsrules Subatomic Cosmonaut

                      Damn. DAMN! I've always loved your stuff, but this one is really something special and isn't getting enough attention. I can foresee this opening up a lot of doors for other modders.

                      BUT.. the Custom Shop method is kind of a groaner. It would be amazing if it was much more simplistic, rather than having enter every piece of info in such a long form. "Object ID 475" would be "id 475" or hell, something else that can call upon OBJ ID's and use their name instead. Not sure if this is a temporary/educational config, but whatever you get what I am saying (I've been awake for 4 days)

                      And someone pointed out earlier the possibly of bypassing the menu to access your custom shop, through NPCs or whatever the hell ya want. I hope that happens, the absence of "lore" or actual interaction makes me feel GameSad and just going through a window brings me out of it.

                      But no, no complaints from me, you've done one hell of a job.
                      • zipy199522

                        zipy199522 Pangalactic Porcupine

                        That would be great actually. I'm going to need some extra NPC's and such for proof of concept down the road so that I make sure that my code can be accessed by modders. Adding in more lore to the world would for sure be a great thing, and I think having more custom traveling merchants would be fantastic personally. Or maybe even a flea market holiday where NPC's would sell you certain goodies or something like Animal Crossing.

                        Don't worry about adding in things for the moment. I'm currently working on the infrastructure of the mod to improve on these things and I'm going to be programming a GUI form where the user just has to put in some basic information and the program will take care of all of the heavy lifting and icky form title stuffs. This will ensure that you all will be able to make custom shops with ease without having to obey the laws of the mod.

                        Don't worry I'm working hard to ensure that my code can be accessible to other mods and modders so that they can bind a custom shop to an NPC and so forth.
                        • dsrules

                          dsrules Subatomic Cosmonaut

                          I knew I had faith in you! Looking forward to it. Enjoying it how it is now, anyway. I especially got a kick out of the video where EVERYONE learned something new about the mods game mechanics, haha.
                          • zipy199522

                            zipy199522 Pangalactic Porcupine

                            Hey everyone, just wanted to let you know that I updated the Custom_Shops_Mod_Redux to now include selling to tons of different items. I also uploaded a link to the Custom_Shop GUI creation tool which will allow you to make custom shops with ease!
                            Go grab the update and the creator tool and let me know how things will go! I'm excited to see the results!
                              EpicAdventure likes this.
                            • EpicAdventure

                              EpicAdventure Zero Gravity Genie

                              Weird, with the new version, when I press 'U' a message appears saying:
                              Out of stock.
                              This happens with the two .txt files.
                              • zipy199522

                                zipy199522 Pangalactic Porcupine

                                Ohh yea I forgot to mention that bit. Shop files that were created before the update last night aren't compatible with the newest update. Sorry about this.
                                I updated the text files so that they should work now. Use the creation tool for making new shops. =)

                                Also make sure that custom shops go inside of the custom shops folder inside of the Mods/Custom_shops_Redux/Custom_Shops
                                  Last edited: Apr 26, 2016
                                • taintedwheat

                                  taintedwheat Master Astronaut

                                  I think a pug wearing a monocle might be one of the random store npcs because pugs are the best.
                                    zipy199522 likes this.
                                  • mvhnexus

                                    mvhnexus Pangalactic Porcupine

                                    when using this mod with Chest Label System by OrSpeeder kicks out the renaming the chest to open your mod. so i can't name anything using the U key.

                                    EDIT: also if you open one custom shop, then close it and open another, it shows the first shops stuff then at the buttom shows the other items, then when going back to the first one, it just repeats. i'll put a video here soon about it!

                                      Last edited: Apr 30, 2016
                                      Superior_s and taintedwheat like this.
                                    • DJ_Zapple

                                      DJ_Zapple Pangalactic Porcupine

                                      Huh. This could be handy in making my pizzeria mod dream come true...
                                        mvhnexus and Superior_s like this.
                                      • taintedwheat

                                        taintedwheat Master Astronaut

                                        ooooooh, aaaah. (checking out all the items you have)
                                          mvhnexus likes this.
                                        • mvhnexus

                                          mvhnexus Pangalactic Porcupine

                                          also if you open one custom shop, then close it and open another, it shows the first shops stuff then at the buttom shows the new
                                          lol the paintings and tvs in the list is from me. the new weapons keyblade ones is from domfred908 on nexusmods. :D

                                          Share This Page