Cannot add new recipe

Place to get help with not working mods / modding interface.
Post Reply
TreeFort96
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 27, 2020 4:37 am
Contact:

Cannot add new recipe

Post by TreeFort96 »

(Edit: Figured it out - I assumed [bad move I know...] that all the files in the prototypes was added automatically but nope! I needed to add require to load the file. It works now.)

HI

I'm trying to add a new recipe but it doesn't seem to be working. I've created a new mod to do this, which I'll attach below.

Goal:
I'm trying to make wood craftable, so I can replace that functionality from the defunct Dark Matter Replicators. I've started off trying to make wood craftable with an iron plate for testing purposes.

What I've Done:
Made info.json and data.lua (it's empty).

In prototypes, I made recipes.lua
and have only this:

Code: Select all

data:extend(
{
	{
      type = "recipe",
      name = "wood (recipe)",
      enabled = true,
      ingredients =
      {
        {"iron-plate", 1},
      },
      result = "wood",
      result_count = 3,
      allow_decomposition = true
    }
}
)
The mod loads and I don't see anything in the log file that indicates other wise. However, I don't see this available in the player inventory/crafting window.
So I'm missing something but it isn't clear what and am looking for some help.

Not sure if this will cause an issue but I run a lot of smaller/single mods along with Bobs (only Bobs as The Big One. Angels is too much for me lol I am weak!).

Thanks for the help.
Attachments
wood_1.0.1.zip
(793 Bytes) Downloaded 61 times

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Cannot add new recipe

Post by darkfrei »

TreeFort96 wrote:
Fri Nov 27, 2020 4:58 am

Code: Select all

data:extend(
{
	{
      type = "recipe",
      name = "wood (recipe)",
      enabled = true,
      ingredients =
      {
        {"iron-plate", 1},
      },
      result = "wood",
      result_count = 3,
      allow_decomposition = true
    }
}
)
Don't use space and brackets.

Code: Select all

name = "wood-recipe"
But much better just the same name by the recipe:

Code: Select all

name = "wood"
or what you do:

Code: Select all

name = "iron-plate-to-wood"

Post Reply

Return to “Modding help”