Changing recipe of base-mod item
Changing recipe of base-mod item
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.
Re: Changing recipe of base-mod item
it is possible, but im not sure how, I think that it is modifying data.raw.recipes.thenameoftherecipe
Re: Changing recipe of base-mod item
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}
Re: Changing recipe of base-mod item
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}
"F**k thy hater"
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com