Change receips of vanilla items

Place to get help with not working mods / modding interface.
Guardian667
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Dec 03, 2017 3:09 pm
Contact:

Change receips of vanilla items

Post by Guardian667 »

Objective
I'm trying to redefine receips of vanilla items by setting the new receip in a data.lua file. This works fine for some items, for others not.

Success example iron-gear-wheel

Code: Select all

data.raw.recipe["iron-gear-wheel"].expensive.ingredients =
{
	{"iron-plate", 10},
	{"copper-plate", 2}
}
Failure example steam-engine

Code: Select all

data.raw.recipe["steam-engine"].expensive.incredients =
{
    {"iron-gear-wheel", 50},
    {"pipe", 15},
    {"iron-plate", 150}
}
Result
Inside the game, in the creafting menu, both items are highlighted as modified by my mod. But only the receip for the iron gear wheel contains the new values.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Change receips of vanilla items

Post by Klonan »

Image
Guardian667
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Dec 03, 2017 3:09 pm
Contact:

Re: Change receips of vanilla items

Post by Guardian667 »

THX for your reply. I'm a foolish dumbass :-D

I'm also working on a program for calculating production costs, which I'm going to use for the balancing process and, no surprise, I have a class named Incredient. Feels like with every line of code my bug count increments ...
Post Reply

Return to “Modding help”