Modding Help Help with making a Custom Machines Redux mod

Discussion in 'Mods' started by foggywizard, Sep 18, 2018.

  1. foggywizard

    foggywizard Big Damn Hero

    I've been rather peeved about not being able to have more mushroom boxes, especially when I'm using mods that make the Farm Cave bigger. Now, there is currently a nifty json assets mod that adds all of the forage items as crops, so I could probably just make the Farm Cave farmable and plant the mushrooms there, since as and indoor location it should act like a greenhouse, but that also means the items harvested would be set, instead of random from percentage chance. Not like the actual mushroom boxes at all. So I had the dubious idea of replicating them as a custom machine, but things aren't exactly going well. I've tried looking at the json guide for making the mod, but things aren't coming along well.

    It...works, technically. It produces all of the mushrooms by random, although not by percentage chance, like would better match the vanilla boxes. But I have a major problem where all the mushrooms produced are named "Red Mushroom", despite being treated by the game as the mushrooms that they clearly are (the Purple Mushrooms still work for recipes, and can be used in the community bundles, for example), and can't be stacked with other mushrooms of their type because of it. On top of that, I can't seem to get it to use the sprite with mushrooms as the ready for harvest sprite. It either keeps being the empty box or invisible until harvested.

    If anyone can help, here's the json and png:
     

      Attached Files:

    • foggywizard

      foggywizard Big Damn Hero

      Mushroom box is now using the proper ready indicator. Same mushroom being named all the same issue though. They're morels this time.
       
      • Coolwyngs

        Coolwyngs Giant Laser Beams

        This looks like it will be amazing. Good luck with it. I can't wait for this to be working I would get this in a second!
         
        • foggywizard

          foggywizard Big Damn Hero

          I mean, I can post it as is. It *works* as is. I just don't know how to solve the name issue. I suppose I could try and find out what the category is for mushrooms if there even is one, but for now I'm just putting the mis-named mushrooms in their own chest for them to use for whatever later. Here's the file for those that don't mind the misnaming (it keeps them from stacking with others unless they're named the same!). Seriously though, if anyone knows how to fix that issue, I am all ears.
           

            Attached Files:

            Last edited: Sep 20, 2018
            Coolwyngs and HopeWasHere like this.
          • foggywizard

            foggywizard Big Damn Hero

            There is, in fact, not a category for mushrooms specifically. At least not one that will allow me to figure out what it is, since it's not above -99 if it does exist. I've tried looking at different files to see if I can find out how the game's mushroom box specifically is coded, but besides bigcraftableinformation, which simply contains the strings in how it behaves as a big craftable (in general: things like is it moveable, is it a craftable, nothing on how the craftable itself works), I've found nothing. I might just make a mod to make the mushroom boxes movable and make a custom shops redux shop to add in the vanilla mushroom boxes.
             
            • Kadyen

              Kadyen Scruffy Nerf-Herder

              Just a small question aside, does anybody know if it's possible to set at which rate each output appear ?
              Like in this case, a 90% probability of a common shroom, 5% of a blue one, etc...

              (Asking for another project X3)
               
              • foggywizard

                foggywizard Big Damn Hero

                If that is a possibility, I have not figured it out. I only know how to set it to random, and even then, it has its bugs. The name bug doesn't seem to be fixable on my end though.
                 

                Share This Page