Page 1 of 1

Change a modded recipe with an another mod?

Posted: Sat Jul 04, 2020 12:36 pm
by nt1soc
I am very new in modding and I want to make a mod which changes an another mod recipe if the mod is active.

Code: Select all

if (mods or script.active_mods)["LogisticTrainNetwork"] then
	{
	type = "recipe",
	name = "logistic-train-stop",
	enabled = true,
	ingredients ={},
	energy_required = 0.01,
	result = "logistic-train-stop",
	}
end
I came up with this, but it gives an error in line 2.
Can anyone help?

Re: Change a modded recipe with an another mod?

Posted: Sat Jul 04, 2020 1:33 pm
by DaveMcW

Code: Select all

if (mods or script.active_mods)["LogisticTrainNetwork"] then
  data:extend{
    {
      type = "recipe",
      name = "logistic-train-stop",
      enabled = true,
      ingredients ={},
      energy_required = 0.01,
      result = "logistic-train-stop",
    }
  }
end

Re: Change a modded recipe with an another mod?

Posted: Sat Jul 04, 2020 1:40 pm
by nt1soc
working, thanks

*shameless self plug*
https://mods.factorio.com/mod/FreeRails