REQUEST Mod Request: Additional Crafting Recipes

Discussion in 'Mods' started by Syvkal, Nov 11, 2018.

  1. Syvkal

    Syvkal Void-Bound Voyager

    I was looking at this old WIP mod for making custom recipes.
    However, even if it was updated for v1.3, it doesn't allow you to make additional/separate recipes for existing items.

    I was wondering if someone could make a mod to add alternate ways of crafting the same item.
    For example:
    Mega Bomb - Gold Ore (4), Solar Essence (1), Void Essence (1)
    Mega Bomb - Bomb (2), Solar Essence (1), Void Essence (1)

    Or if you know a mod that already does this, that would be great too.
    Cheers!
     
    • foggywizard

      foggywizard Big Damn Hero

      Content Patcher allows you to add new crafting recipes, based on how it natively handles code changes. It's how I made Mushroom Boxes craftable.
      Here's the bit of it that specifically targets adding them as a recipe as an example-
      For what you're trying to do, you'd put something like this, since you're wanting a second Mega Bomb recipe
      Note that I added a word there to Mega Bomb, this is to give it a unique crafting id instead of replacing Mega Bomb's current recipe. And the Mining 8 tag at the end there means you'll get the recipe at the same time as the other Mega Bomb.
       
      • Syvkal

        Syvkal Void-Bound Voyager

        Thanks so much for the reply!

        Could you help me out a bit by explaining a few things?

        What are the Home/Field tags for?
        What is the true/false flag for?
        What is "l 2" at the end of your Mushroom Box example?

        And... Do you only get these recipes when you level up? Because I can't get any of them to work.
        Is there any way to make a recipe you start with? I would like to at least test them out first.

        Cheers!

        :EDIT:
        I unpacked the vanilla CraftingRecipes file, so I figured out how to make recipes appear from the start now.
        I think true/false is for BigCraftables?
        However, I cannot get the "alt" flag at the end of the names to work at all...

        :EDIT:
        Ok, It seems I am unable to create new recipes, or change the requirements for obtaining existing recipes...
         
          Last edited: Dec 3, 2018
        • foggywizard

          foggywizard Big Damn Hero

          I just used "l 2" because that's what was on the furnace, which was given by an event. True False is indeed for BigCraftables. You'll only get them when you level up, unfortunately. I've not found a way to make you start with them. Which is why the Mushroom Boxes were based on level up until I made an event for them. Content Patcher 1.6 is going to add level requirement conditions though, which will let you make a short event that adds them if you're already x level or higher. I plan on making something along these lines once it comes out. :DD
           
          • foggywizard

            foggywizard Big Damn Hero

            For a simple co
            ntent.json, something like:
            Code:
            {
                "Format": "1.4",
            
                "Changes": [
                                {
                    "Action": "EditData",
                    "Target": "Data/CraftingRecipes",
                    "Entries": {
                                 "Mega Bomb alt": "287 2 768 1 769 1/Field/288/false/l 2",
                        },
                    },
                        {
                        "Action": "EditData",
                        "Target": "Data/Events/Farm",
                        "Entries": {
                            "9925535/t 600 2600": "continue/64 15/farmer 64 16 2/message \"You just realized there's another way to make a recipe you know.\"/pause 800/itemAboveHead/playSound getNewSpecialItem/addCraftingRecipe Mega Bomb alt/pause 3300/message \"Learned how to craft 'Mega Bombs' a new way.\"/end"
                        }
                    },
                ]
            }
            Will add an event that will immediately gives you the recipe for "Mega Bomb alt" once you walk out of your FarmHouse. Here's proof that it worked: 413150_20181203154120_1.png
            Just replace "Mega Bomb alt" in the
            Code:
            /addCraftingRecipe Mega Bomb alt/
            with whatever the recipeid is for whatever recipe you've made....I do seem to have messed up with the item requirements and accidentally put in a mega bombs instead of regular bombs for what you need to craft it though in the example pic though.:facepalm:
             
              Last edited: Dec 3, 2018
            • Syvkal

              Syvkal Void-Bound Voyager

              Alright, I got it working!
              Final two questions... (And thanks again for all the help!)

              What does the "9925535/t 600 2600" signify at the start of the custom event you provided?

              And, is there any reason your alt recipe is seemingly sorted correctly, whereas mine was added to the end of the list?
              (I made an alt recipe for a Quality Sprinkler)
               
                Last edited: Dec 4, 2018
              • foggywizard

                foggywizard Big Damn Hero

                My recipe was at the end of the list as far as I could tell. It certainly wasn't put with the bombs. It was actually placed just before my mod that replicates Better Transmutation, specifically before the reversing recipes, which were themselves add-ins.
                "9925535/t 600 2600" is the EventID (which is how the game knows which events you've seen and haven't seen, you do need one for each event), and the time it can occur (in this case, from 6am to 2am).
                 

                Share This Page