RELEASED [SMAPI] New machines (flour, sugar, vinegar, rice?)

Discussion in 'Mods' started by Igorious, Mar 31, 2016.

  1. Igorious

    Igorious Sandwich Man

    It's my first mod in my life :)

    I've created some machines to create flour, sugar and vinegar from crops. I think, good farmer should create any item for cooking by himself :)

    I use SMAPI. It's not posible to use only XNB, because all object functions are hardcoded in .exe.
    And I already don't use XNB modification, because I found way to load required resources dynamically. It gives good flexibility during configuration.

    If someone has ideas about machines, I ready to implement them.

    You can find latest version here.

    Quick guide




    Vinegar Jar:

    Keg and Preserve Jar overrides:

    v.0.1. Initial.
    • Added wind-mill for processing wheat to flour.
    • Alert: wind-mill works only at farm location.
    • Added machine «Tank» for processing beet to sugar.
    • Mill can process amaranth and corn.
    • Fixed some issues with mill.
    • Updated image for mill.
    • All resources now loaded dynamically. You can edit almost all mod options via .config file.
    • Added machine «Vinegar Jug» for creating vinegar.
    • All machines now can work in all locations except farmer's house.
    • You can edit all mod options via .config and .png files.
    • Machines now can work in farmer house!
    • Updated images for machines (thanks to Ciriun).
    • Upon requests, added to config processing Wine -> Vinegar.
    • You can use formulae to calculate price, quality and count of products, or set these parameters manually to each item. Warning: Each unique formula adds ~0.25 sec. to mod loading time.
    • Overrided behaviour of Keg. Honey and potato generate unique goods.
    • All configuration files now separated.
    • You can use formulae for count and quality of products in config files.
    • If you try put Beet or Wine to Tank-without-water, you'll get hint.
    • Fixed issue with applying axe to Tank-with-water.
    • Fixed duration of processing Potato/Honey in Keg. Now it corresponds to in-game parameters.
    • Fixed buff names for drinks.
    • You can using other skill in requirements, such as Mining, Foraging, Fishing, Combat and even Luck, or totally disable requirements via setting property IsDefault = "true".
    • Now you can set index of sprite in config files, property ResourceIndex. It will help for adding custom items. All required sprites will be loaded automatically.
    • Added Dryer. 1 Fiber -> 1 day -> 1 Hay.
    • Fixed crash after completing all bundles in room.
    • Updated images of Dryer, Mead and Vodka. Big thanks to @Spudli and @Ankou!
    • Mill, Vinegar Jar, Dryer, and KegOverrider now doesn't use classes. So, behaviour of them dynamically and fully described in configuration files.
    • You can use colored objects as output of machines.
    • Create seed of cactus in Seed-maker, plant it inside greenhouse, wait 15 days, and create tasty juise from fruits!
    • Keg and Preserve Jar now produce colored Jelly, Pickles, Juice and Wine!
    • Full cycle for Cactus: create seeds from wild cactus fruit, plant them and harvest fresh fruits!
    • Fixed crash, if you use machines in buildable locations (e.g. Barn and Coop).
    • Restored «Hops → Pale Ale», «Wheat → Beer» conversions. Applied quality system for them.
    • Fixed issue with getting one colored object from stack.
    • Fixed typos in item names.
    • Fixed issue with no machine interactions in some conditions.
    • Replaced old Wine and Jelly in bundles.
    • New algorithm of coloring works faster and makes less errors.
    • Fixed issue with uncolored items.
    • Fixed issue with unexpeted replacing emeralds by kegs.
    • Fixed issue with wrong items in Shipping collection.
    • Added second try to activate mod after saving.
    • Changed approach to loading mod: from «lazy» to «world-wide».
    • Fixed typo in pickles name («Pickled Z» instead of «Z Pickles»).
    • Added missing shadows to colored items in inventory.
    • You can dry fruits.
    • Rice and Sugar Can can be processed in machines.
    • Fixed issue with wrong order in bumdles.
    • Charcoal Kiln can burn hardwood and fences.
    • You can setup animation after item dropping in .json.
    • Full control about drawing custom items.
    • Added several commands to console.
    • Added support multi-module machines (Separator + Churn/Fermenter).
    • Improved compatibility with Automation mod.
    • Fixed another one error during saving. Thanks to @esawa!

    • Delete old mod files — they are not compatible anymore with new version.
    • Exract archive content and copy it to Mods folder.
    • Start game with SMAPI.
    • Open craft menu. If you have farming skill level 6/7/8/9, you will have access to Dryer/Mill/Tank/Vinegar Jug recipes.
    • Craft machines and place them in your farm.
    • All your old and new Kegs/Preserve Jars now producing color items!
    • If you have cactus fruit, you can create seeds and plant them in greenhouse. 1 seed -> 3 fruits.
    • You can edit all parameters via .json files.
    • Mod requires SMAPI v0.39+.
    • Mod uses CraftableID=164..171, ItemID=900..918, CropID=90, so other mods, that use these IDs, are not compatible. But you can change IDs via .json files before first save.
    • Backup your save files! If you load game after saving without SMAPI, you'll got crash.
    • Seems there's some non-critical issues with Farm Automation Mod compatibility (like old Jellies and Pickles after auto-filing; and new machines don't support auto-filing).
    It's link to sources, if you need: github
      Last edited: Aug 15, 2016
    • aidlien

      aidlien Scruffy Nerf-Herder

      Vinegar should come from the pickle jar as a bonus item when you make pickles. That's close to what happens in real life anyway. And I like the idea of getting two products from one source. Or, if you make a cider press/mill you can put in a fruit and get cider, then put the juice in a pickle jar to make vinegar. That might confuse people though. And you could put beets in the press for sugar syrup, which you could cook to get sugar. You could also put sunflower seeds or poppy seeds in to get oil. If you had a mill, you could make flour from wheat, amaranth, and acorns, polenta/grits, and poppy seeds. (If we could grow rice, you could put it into the pickle pot for vinegar or the mill for another source of flour. If there was sorghum, you could harvest the seeds for milo or put the stalks through the cider press for sugar syrup, and have leftover hay/fodder. If we could grow soybeans, they could be harvested early for hay, eaten fresh like edamame, put through the cider press for soy milk (and cooked into tofu), put through the mill for oil, or put in a pickle jar for miso paste - and instead of vinegar as a bonus item, you'd have soy sauce!) I wish I knew how to help you. I know nothing about coding or making pixel art. I even have trouble installing some of these mods. But I clearly spend too much time thinking about what I would do if I knew how! Good luck - I like how you think!
        009i66 and Vixxi like this.
      • Igorious

        Igorious Sandwich Man

        It will be good, if someone tests my mod :)
        • Igorious

          Igorious Sandwich Man

          It's not so easy. Items in machine are been created immediately after dropping source item. Machine can hold item with single ID.
          Maybe I can hook grabbing event, but it's far future.

          It sounds reasonably. But should we create separate items (like cheese), or use flour as «family» (like wine, jam and pikkle jar)?
            Last edited: Apr 1, 2016
          • james0019

            james0019 Void-Bound Voyager

            tried and tested and it Works!:DD Looking forward to other items. Untitled.png
            • Igorious

              Igorious Sandwich Man

              Thanks for feedback.

              I've read a little information about sugar-beet processing. In real life process requires many water. I've decided to use this info in mod.
              Beet will be processed in tanks (not battle-tanks, but cistern-tank :)), and tanks require water from water-can.
              It's my first experiment with two-state object. I hope, that all will be OK.

              Also I still need good images for machines :)
              • Ciriun

                Ciriun Big Damn Hero

                What would you be looking for in terms of a sprite for the flour mill? I did a Google image search for "flour grinder" and found a fairly wide variety or models. I like the wooden ones myself, like these ones.
                  Igorious likes this.
                • Igorious

                  Igorious Sandwich Man

                  Thanks. I was obsessed by wind-mill, and therefore I didn't considered about other variants. Wooden mill seems a more appropriate.
                  I've tried draw something like machines from your reference.
                  I've understood, how to work with game textures. In version 0.3 of my mod, textures will be loaded dynamically after game start. Now no XNB replacement required. :idea:
                  I still have no idea, how vinegare machine should look.
                  And I still hope, that someone helps me with pixel-art :)
                    Last edited: Apr 2, 2016
                    Katzvielle, Ciriun and taintedwheat like this.
                  • Bunkmaster

                    Bunkmaster Space Spelunker

                    So glad you're taking a stab at this! I've always thought this was something the base game lacked in a big way for self-sufficiency. I have no skills to help you, but I'll be following the progress eagerly.
                    • Ciriun

                      Ciriun Big Damn Hero

                      The image you posted isn't showing up for me. I'd like to help with the pixel art, I just need to know what I'm making first.
                      • Igorious

                        Igorious Sandwich Man

                        Sorry, I've accidentally broken links to images :(

                        All that need is images 16x32 px (width x height) for mill.
                        There are several standart states for machines:
                        1. Main state. Used for inventory and recipe icons, and for non-working machines. It's requred.
                        2. Working state. Used after dropping item into machine (e.g. Furnace). It's optional.
                        3. Ready state. Used after item is ready (e.g. Bee-house). It's optional.
                        First, we need image for main state. Then we can add image for one of working or ready state.
                        It's possible use many images for various animations, but I haven't know yet, how do this.
                        • taintedwheat

                          taintedwheat Master Astronaut

                          dude, really cool job. I think it is great that you're trying you're hardest to make something a cool-ass product that doesn't alter the xnbs. Hella adimirable!

                          I find these mills much prettier than the windmills o:

                          Although, I think the tanks should have more details on them. Idk, a filter-looking thing maybe?
                          • starsong

                            starsong Tentacle Wrangler

                            Some Ideas for vinegar jar




                            Flour mill (traditional hand mill):


                            animation :
                              Igorious likes this.
                            • Ciriun

                              Ciriun Big Damn Hero

                              Wow, I don't know why you're asking for help with the art, yours is great! Better than I would have done. My only critique would be to increase the contrast between colors a little and maybe add a second darker outline. But it really does look good as is.
                              • Igorious

                                Igorious Sandwich Man

                                It's temporary ~5 min sprite. I was not sure, that my idea with two-state object could work. I'll redraw sprites in near future.
                                Now I more focused in code; there are still some issues, that should be fixed.

                                Thank you. It seems not hard to draw jug with tap.

                                Yes, I think about stone-mill too. But I have some doubts: do we need two machines (wooden-mill and stone-mill) with same function?
                                Maybe stone-mill should work somehow worse, e.g. spend more time for processing, drops mixed seeds instead flour with some chance...

                                I ask for help, because I see, that something wrong with my images, but I don't know, how to fix it. And I spend so much time to draw one little picture! :(
                                It will be faster, If I concentrate in code and someone draws images and generates ideas.
                                • skedone

                                  skedone Scruffy Nerf-Herder

                                  never see why this was not already in the game very well done installing now
                                  • Genn Faol

                                    Genn Faol Scruffy Nerf-Herder

                                    Awesome! This is one of the things I was waiting for. xD

                                    You should ask a mod to move your thread to Mod Releases/WIPS under Gameplay mechanics, would be a lot easier to find there.
                                    • Igorious

                                      Igorious Sandwich Man


                                      I still need fix some issues before mark it as Released.
                                      • Genn Faol

                                        Genn Faol Scruffy Nerf-Herder

                                        Yeah, but see, that forum is for WIPs, too, which stands for Work in Progress. A lot of people post there mods there despite still working on them.
                                        • Ciriun

                                          Ciriun Big Damn Hero

                                          If you want help with the art I would be happy to try, but I don't think mine would be anywhere near as good as yours.

                                          Share This Page