Hello, been playing a while and now having a go at modding Factorio. I am hoping that someone will be able and kind enough to help me with an issue that I have. I have made my own custom mod that adds 4 new technologies to the game. I can post more code as necessary. The issue is it runs alongside Space Exploration.
The issue is when I run the code as a standalone it works and the ingredients required to unlock the tech are correct red and green science as an example. However, with SE installed SE is doing something in the background and casing my mod to require every science in the mod to unlock my tech.
Could you have a look and steer me in the right direction? thank you
I can post the zip files somewhere if that is easier.
Q
code in technology.lua
Code: Select all
data:extend(
{
{
type = "technology",
name = "techliquifraction101",
icon_size = 256, icon_mipmaps = 4,
icon = "__base__/graphics/technology/oil-processing.png",
effects =
{
{
type = "unlock-recipe",
recipe = "liquifraction101"
},
},
prerequisites = {"oil-processing"},
unit =
{
count = 1,
ingredients =
{
{"automation-science-pack", 1}
},
time = 15
},
order = "e-p-b-c"
},
{
type = "technology",
name = "techelectroysis101",
icon_size = 256, icon_mipmaps = 4,
icon = "__base__/graphics/technology/oil-processing.png",
effects =
{
{
type = "unlock-recipe",
recipe = "electroysis101"
},
},
prerequisites = {"logistic-science-pack"},
unit =
{
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 15,
count = 50
},
order = "e-p-b-c"
},
{
type = "technology",
name = "techpyrolysis101",
icon_size = 256, icon_mipmaps = 4,
icon = "__base__/graphics/technology/oil-processing.png",
effects =
{
{
type = "unlock-recipe",
recipe = "pyrolysis101"
},
},
prerequisites = {"logistic-science-pack"},
unit =
{
count = 50,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 15
},
order = "e-p-b-c"
},
{
type = "technology",
name = "techfractionation101",
icon_size = 256, icon_mipmaps = 4,
icon = "__base__/graphics/technology/oil-processing.png",
effects =
{
{
type = "unlock-recipe",
recipe = "fractionation101"
},
},
prerequisites = {"oil-processing"},
unit =
{
count = 5,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 5
},
order = "e-p-b-c"
}
}
)
Code: Select all
data:extend(
{
{
type = "recipe",
name = "pyrolysis101",
category = "smelting",
icon = "__base__/graphics/icons/coal.png",
icon_size = 64, icon_mipmaps = 4,
enabled = false,
energy_required = 3,
ingredients =
{
{type="item", name="wood", amount=1}
},
results=
{
{ name="coal", amount=2}
},
},
{
type = "recipe",
name = "liquifraction101",
category = "chemistry",
enabled = false,
energy_required = 10,
ingredients =
{
{type="item", name="coal", amount=10},
{type="fluid", name="steam", amount=100}
},
results=
{
{type="fluid", name="crude-oil", amount=50},
{type="fluid", name="petroleum-gas", amount=10},
{type="item", name="stone", amount=10}
},
icon = "__base__/graphics/icons/fluid/coal-liquefaction.png",
icon_size = 64, icon_mipmaps = 4,
order = "a[oil-processing]-a[basic-oil-processing]",
subgroup = "fluid-recipes",
crafting_machine_tint =
{
primary = {r = 0.768, g = 0.631, b = 0.768, a = 1.000}, -- #c3a0c3ff
secondary = {r = 0.659, g = 0.592, b = 0.678, a = 1.000}, -- #a896acff
tertiary = {r = 0.774, g = 0.631, b = 0.766, a = 1.000}, -- #c5a0c3ff
quaternary = {r = 0.564, g = 0.364, b = 0.564, a = 1.000}, -- #8f5c8fff
}
},
{
type = "recipe",
name = "electroysis101",
category = "chemistry",
enabled = false,
energy_required = 1,
ingredients =
{
{type="fluid", name="hydrogen101", amount=200},
{type="fluid", name="oxygen101", amount=100}
},
results=
{
{type="fluid", name="water", amount=100}
},
icon = "__base__/graphics/icons/fluid/water.png",
icon_size = 64, icon_mipmaps = 4,
order = "a[oil-processing]-a[basic-oil-processing]",
subgroup = "fluid-recipes",
crafting_machine_tint =
{
primary = {r = 0.768, g = 0.631, b = 0.768, a = 1.000}, -- #c3a0c3ff
secondary = {r = 0.659, g = 0.592, b = 0.678, a = 1.000}, -- #a896acff
tertiary = {r = 0.774, g = 0.631, b = 0.766, a = 1.000}, -- #c5a0c3ff
quaternary = {r = 0.564, g = 0.364, b = 0.564, a = 1.000}, -- #8f5c8fff
}
},
{
type = "recipe",
name = "fractionation101",
category = "chemistry",
enabled = false,
energy_required = 1,
ingredients =
{
{type="fluid", name="petroleum-gas", amount=100},
},
results=
{
{type="fluid", name="hydrogen101", amount=50},
{type="fluid", name="oxygen101", amount=50},
{type="item", name="petcoke101", amount=20}
},
icon = "__base__/graphics/icons/fluid/advanced-oil-processing.png",
icon_size = 64, icon_mipmaps = 4,
order = "a[oil-processing]-a[basic-oil-processing]",
subgroup = "fluid-recipes",
crafting_machine_tint =
{
primary = {r = 0.768, g = 0.631, b = 0.768, a = 1.000}, -- #c3a0c3ff
secondary = {r = 0.659, g = 0.592, b = 0.678, a = 1.000}, -- #a896acff
tertiary = {r = 0.774, g = 0.631, b = 0.766, a = 1.000}, -- #c5a0c3ff
quaternary = {r = 0.564, g = 0.364, b = 0.564, a = 1.000}, -- #8f5c8fff
}
}
})