Page 1 of 1

Can't change pipe recipe?

Posted: Sat Sep 30, 2023 6:59 am
by Doctor_Willis
I'm making a mod that changes the recipes for several items to require coins instead of the default ingredients.

So far I've successfully changed 7 recipes, but I can't get the new pipe recipe to work.
As far as I can tell, I've done it the same way I've done the other 7, and the game recognises that it's from my mod (tooltip says: Base mod > My mod), but the recipe still requires Iron plates.
I tried with different amounts of coins, different ingredients, declaring the result/results, but I still can't figure it out.

Any suggestions?

Code: Select all

local transportBeltRecipe = table.deepcopy(data.raw.recipe["transport-belt"])
transportBeltRecipe.enabled = true
transportBeltRecipe.ingredients = {{"coin", 5}}

local undergroundBeltRecipe = table.deepcopy(data.raw.recipe["underground-belt"])
undergroundBeltRecipe.enabled = true
undergroundBeltRecipe.ingredients = {{"coin", 5}}

local splitterRecipe = table.deepcopy(data.raw.recipe["splitter"])
splitterRecipe.enabled = true
splitterRecipe.ingredients = {{"coin", 5}}

local inserterRecipe = table.deepcopy(data.raw.recipe["inserter"])
inserterRecipe.enabled = true
inserterRecipe.ingredients = {{"coin", 5}}

-- Not working?
local pipeRecipe = table.deepcopy(data.raw.recipe["pipe"])
pipeRecipe.enabled = true
pipeRecipe.ingredients = {{"coin", 1}}

local pipeToGroundRecipe = table.deepcopy(data.raw.recipe["pipe-to-ground"])
pipeToGroundRecipe.enabled = true
pipeToGroundRecipe.ingredients = {{"coin", 5}}

local electricFurnaceRecipe = table.deepcopy(data.raw.recipe["electric-furnace"])
electricFurnaceRecipe.enabled = true
electricFurnaceRecipe.ingredients = {{"coin", 5}}

local steelChestRecipe = table.deepcopy(data.raw.recipe["steel-chest"])
steelChestRecipe.enabled = true
steelChestRecipe.ingredients = {{"coin", 5}}

data:extend{
    transportBeltRecipe,
    undergroundBeltRecipe,
    splitterRecipe,
    inserterRecipe,
    pipeRecipe,
    pipeToGroundRecipe,
    electricFurnaceRecipe,
    steelChestRecipe
}

Re: Can't change pipe recipe?

Posted: Sat Sep 30, 2023 7:10 am
by Bilka
The pipe recipe has recipe difficulty, meaning that you need to change the ingredients and enabled status inside "normal" (and "expensive" if you want to affect expensive mode).

Re: Can't change pipe recipe?

Posted: Sat Sep 30, 2023 7:18 am
by Doctor_Willis
Thanks Bilka. I knew I was missing something!