Changing recipe of base-mod item
Posted: Wed Aug 21, 2013 2:22 pm
Is it possible to change the recipe of a base-mod item with another mod? Like changing the amount of iron-ore needed for iron-plates without copying the whole base-mod.
Code: Select all
local recipe = data.raw.recipe["basic-transport-belt"]
recipe.ingredients[#recipe.ingredients + 1] = {"wood", 1}
slpwnd always comes to the rescue!slpwnd wrote:Exactly if your mod depends on another mod (here the base) then it's data definitions are processed afterwards. That means that at the time of processing your mod data definition the other one (base) has already filled everything. So you can simply change the datat it created. For instance if you decide that you need some wood for the basic transport belt:
The pattern here is: data.raw.["type-of-the-object"]["name-of-the-object"].Code: Select all
local recipe = data.raw.recipe["basic-transport-belt"] recipe.ingredients[#recipe.ingredients + 1] = {"wood", 1}