Compare commits

..

No commits in common. "main" and "2.0.2" have entirely different histories.
main ... 2.0.2

6 changed files with 68 additions and 110 deletions

View file

@ -1,40 +1,4 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 2.0.9
Date: 02.11.2025
Bug Fixes:
- Fix some technology icons
---------------------------------------------------------------------------------------------------
Version: 2.0.8
Date: 22.10.2025
Changes:
- Fix zeolite recipe for when silica is not present
---------------------------------------------------------------------------------------------------
Version: 2.0.7
Date: 21.10.2025
Changes:
- Switch to bz mods forks
- Add incompatibility with Space Age
---------------------------------------------------------------------------------------------------
Version: 2.0.6
Date: 17.10.2025
Bug Fixes:
- Fix prerequisite for rich-water-filtration when 248k and silicon are active but bzgas is not
---------------------------------------------------------------------------------------------------
Version: 2.0.5
Date: 16.10.2025
Bug Fixes:
- Fix crash when only ChemistryForYou and SE are present
---------------------------------------------------------------------------------------------------
Version: 2.0.4
Date: 16.10.2025
Bug Fixes:
- Fix crash when bzsilicon is present but bzaluminum is not
---------------------------------------------------------------------------------------------------
Version: 2.0.3
Date: 14.10.2025
Bug Fixes:
- Fix lithium with K2
---------------------------------------------------------------------------------------------------
Version: 2.0.2 Version: 2.0.2
Date: 13.10.2025 Date: 13.10.2025
Bug Fixes: Bug Fixes:

View file

@ -855,8 +855,8 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier)
end end
util.remove_prior_unlocks(tech, old) util.remove_prior_unlocks(tech, old)
for i, recipe in pairs(data.raw.recipe) do for i, recipe in pairs(data.raw.recipe) do
if (recipe.enabled and recipe.enabled ~= false) if (recipe.enabled and recipe.enabled ~= 'false')
and (not recipe.hidden or recipe.hidden == true) -- probably don't want to change hidden recipes and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes
and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :( and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :(
then then
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :| -- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|

View file

@ -1,9 +1,8 @@
{ {
"name": "ChemistryForYou2", "name": "ChemistryForYou2",
"version": "2.0.9", "version": "2.0.2",
"factorio_version": "2.0", "factorio_version": "2.0",
"title": "ChemistryForYou", "title": "ChemistryForYou",
"description": "This mod adds more chemistry and is intented to be played with my other mods aswell as K2, SE and BZ.\n\nThis mod is inspired by Brevven's BZ mods.",
"author": "Timeken, cackling fiend", "author": "Timeken, cackling fiend",
"homepage": "https://discord.gg/ufvFUJtVwk", "homepage": "https://discord.gg/ufvFUJtVwk",
"dependencies": [ "dependencies": [
@ -13,15 +12,15 @@
"? BrassTacks-Updated", "? BrassTacks-Updated",
"? bobassembly", "? bobassembly",
"? BrimStuff-Updated", "? BrimStuff-Updated",
"? bzaluminum2", "? bzaluminum",
"? bzchlorine2", "? bzchlorine",
"? bzfoundry2", "? bzfoundry",
"? bzgas2", "? bzgas",
"? bzgold2", "? bzgold",
"? bzlead2", "? bzlead",
"? bzsilicon2", "? bzsilicon",
"? bztin2", "? bztin",
"? bztungsten2", "? bztungsten",
"? Chromium2", "? Chromium2",
"? Cobalt2", "? Cobalt2",
"? GasGasGases2", "? GasGasGases2",
@ -38,7 +37,7 @@
"? space-exploration", "? space-exploration",
"? ShockTurret", "? ShockTurret",
"? Tantalite2", "? Tantalite2",
"? ThemTharHills-Updated", "? ThemTharHills-Updated"
"! space-age" ],
] "description": "This mod adds more chemistry and is intented to be played with my other mods aswell as K2, SE and BZ.\n\nThis mod is inspired by Brevven's BZ mods."
} }

View file

@ -1,7 +1,5 @@
local util = require("data-util") local util = require("data-util")
local lithium = mods["Krastorio2"] and "kr-lithium" or "lithium"
if mods["space-exploration"] then if mods["space-exploration"] then
data:extend({{ data:extend({{
type = "item-subgroup", type = "item-subgroup",
@ -19,7 +17,7 @@ else
end end
if mods["ThemTharHills-Updated"] then if mods["ThemTharHills-Updated"] then
if (mods["bzfoundry2"] and mods["BrassTacks-Updated"]) and (mods["bzlead2"] and mods["bzgold2"]) then if (mods["bzfoundry"] and mods["BrassTacks-Updated"]) and (mods["bzlead"] and mods["bzgold"]) then
data:extend({ data:extend({
{ {
type = "recipe", type = "recipe",
@ -59,13 +57,13 @@ local alumHydroxideSmeltIcon = (mods["Krastorio2"] and
{ icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64}, { icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64},
}) })
if mods["bzaluminum2"] then if mods["bzaluminum"] then
alumHydroxideSmeltIcon = (mods["Krastorio2"] and alumHydroxideSmeltIcon = (mods["Krastorio2"] and
{ {
{ icon = "__bzaluminum2__/graphics/icons/alumina.png", icon_size = 128}, { icon = "__bzaluminum__/graphics/icons/alumina.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/aluminium-hydroxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, { icon = "__ChemistryForYou2__/graphics/icons/aluminium-hydroxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or { } or {
{ icon = "__bzaluminum2__/graphics/icons/alumina.png", icon_size = 128}, { icon = "__bzaluminum__/graphics/icons/alumina.png", icon_size = 128},
}) })
end end
local sodaLimeGlassCategory = "crafting" local sodaLimeGlassCategory = "crafting"
@ -321,7 +319,7 @@ data:extend({
order = "a", order = "a",
enabled = false, enabled = false,
energy_required = 8, energy_required = 8,
ingredients = {{type="item", name="sodium-aluminate", amount=5},(data.raw.item["silica"] and {type="item", name="silica", amount=5}) or {type="item", name="stone", amount=5}, {type="fluid", name="water", amount=100}}, ingredients = {{type="item", name="sodium-aluminate", amount=5},(data.raw.fluid["gas"] and {type="item", name="silica", amount=5}) or {type="item", name="stone", amount=5}, {type="fluid", name="water", amount=100}},
results = {{type="item", name="zeolite", amount=10}}, results = {{type="item", name="zeolite", amount=10}},
}, },
{ {
@ -387,7 +385,7 @@ data:extend({
order = "l", order = "l",
enabled = false, enabled = false,
energy_required = 2, energy_required = 2,
ingredients = {(data.raw.item[lithium] and {type="item", name=lithium,amount = 10 }) or {type="item", name="stone", amount = 10 }, {type="item", name="sodium-hydroxide", amount = 10 }}, ingredients = {(data.raw.item["lithium"] and {type="item", name="lithium",amount = 10 }) or {type="item", name="stone", amount = 10 }, {type="item", name="sodium-hydroxide", amount = 10 }},
results = {{type="item", name="lithium-hydroxide", amount = 10 }}, results = {{type="item", name="lithium-hydroxide", amount = 10 }},
} }
}) })
@ -536,7 +534,7 @@ local science_pack = "__ChemistryForYou2__/graphics/icons/productivity-science-p
science_pack = "__Krastorio2Assets__/icons/cards/production-tech-card.png" science_pack = "__Krastorio2Assets__/icons/cards/production-tech-card.png"
end end
if mods["248k-Redux"] then if mods["248k-Redux"] then
local rich_water_filtration_results = {data.raw.item[lithium] and {type = "item", name=lithium, amount=5} or {type = "item", name="el_lithium_item", amount=5}, {type="fluid", name="water", amount=100}} local rich_water_filtration_results = {data.raw.item["lithium"] and {type = "item", name="lithium", amount=5} or {type = "item", name="el_lithium_item", amount=5}, {type="fluid", name="water", amount=100}}
if data.raw.item["cobaltite-ore"] then if data.raw.item["cobaltite-ore"] then
table.insert(rich_water_filtration_results, { type = "item", name = "cobaltite-ore", amount=1, probability=0.2}) table.insert(rich_water_filtration_results, { type = "item", name = "cobaltite-ore", amount=1, probability=0.2})
end end
@ -667,7 +665,7 @@ data:extend({
order = "n", order = "n",
enabled = false, enabled = false,
energy_required = 10, energy_required = 10,
ingredients = {{ type = "fluid", name = "kr-nitrogen", amount = 50 }, { type = "fluid", name = "kr-oxygen", amount = 150 }},--should be made from Nitric acid but this works for now ingredients = {{ type = "fluid", name = "nitrogen", amount = 50 }, { type = "fluid", name = "kr-oxygen", amount = 150 }},--should be made from Nitric acid but this works for now
results = {{ type = "fluid", name = "nitrate", amount = 100 }}, results = {{ type = "fluid", name = "nitrate", amount = 100 }},
}, },
{ {
@ -846,7 +844,7 @@ if mods["Cobalt2"] then
}) })
end end
if mods["bzsilicon2"] then if mods["bzsilicon"] then
data:extend({ data:extend({
{ {
type = "recipe", type = "recipe",
@ -866,32 +864,28 @@ if mods["bzsilicon2"] then
energy_required = 10, energy_required = 10,
ingredients = {{type="item", name="sodium-aluminate", amount=10}, { type = "fluid", name = "water", amount = 100 }}, ingredients = {{type="item", name="sodium-aluminate", amount=10}, { type = "fluid", name = "water", amount = 100 }},
results = {{type="item", name="silica", amount=10}, {type="item", name="sodium-aluminate", amount=9}, { type = "fluid", name = "water", amount = 90 }} results = {{type="item", name="silica", amount=10}, {type="item", name="sodium-aluminate", amount=9}, { type = "fluid", name = "water", amount = 90 }}
} },
{
type = "recipe",
name = "advanced-silicon-processing",
category = "smelting",
order = "g",
icons = (mods["Krastorio2"] and
{
{ icon = "__bzsilicon__/graphics/icons/silicon.png", icon_size = 64},
{ icon = "__bzaluminum__/graphics/icons/aluminum-plate.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or {
{ icon = "__bzsilicon__/graphics/icons/silicon.png", icon_size = 64},
}),
main_product = mods["Krastorio2"] and "kr-silicon" or "silicon",
subgroup = "intermediate-product",
enabled = false,
energy_required = 10,
ingredients = {{type="item", name="silica", amount=9}, {type = "item", name = "aluminum-plate", amount=12}},
results = {{type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=9}, {type = "item", name = "alumina", amount=6}}
},
}) })
if data.raw.item["aluminum-plate"] then if mods["bzgas"] then
data:extend({
{
type = "recipe",
name = "advanced-silicon-processing",
category = "smelting",
order = "g",
icons = (mods["Krastorio2"] and
{
{ icon = "__bzsilicon2__/graphics/icons/silicon.png", icon_size = 64},
{ icon = "__bzaluminum2__/graphics/icons/aluminum-plate.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or {
{ icon = "__bzsilicon2__/graphics/icons/silicon.png", icon_size = 64},
}),
main_product = mods["Krastorio2"] and "kr-silicon" or "silicon",
subgroup = "intermediate-product",
enabled = false,
energy_required = 10,
ingredients = {{type="item", name="silica", amount=9}, {type = "item", name = "aluminum-plate", amount=12}},
results = {{type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=9}, {type = "item", name = "alumina", amount=6}}
}
})
end
if mods["bzgas2"] then
data:extend({ data:extend({
{ {
type = "recipe", type = "recipe",
@ -900,10 +894,10 @@ if mods["bzsilicon2"] then
order = "a[fluid]-g[formaldaehyde]", order = "a[fluid]-g[formaldaehyde]",
icons = (mods["Krastorio2"] and icons = (mods["Krastorio2"] and
{ {
{ icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128}, { icon = "__bzgas__/graphics/icons/formaldehyde.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/zeolite.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, { icon = "__ChemistryForYou2__/graphics/icons/zeolite.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or { } or {
{ icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128}, { icon = "__bzgas__/graphics/icons/formaldehyde.png", icon_size = 128},
}), }),
main_product = "formaldehyde", main_product = "formaldehyde",
subgroup = "fluid-recipes", subgroup = "fluid-recipes",
@ -933,7 +927,7 @@ if mods["bzsilicon2"] then
}) })
end end
end end
if mods["bzchlorine2"] then if mods["bzchlorine"] then
data:extend({ data:extend({
{ {
type = "recipe", type = "recipe",
@ -942,10 +936,10 @@ if mods["bzchlorine2"] then
order = "s", order = "s",
icons = (mods["Krastorio2"] and icons = (mods["Krastorio2"] and
{ {
{ icon = "__bzchlorine2__/graphics/icons/salt.png", icon_size = 128}, { icon = "__bzchlorine__/graphics/icons/salt.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/sodium-hydroxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, { icon = "__ChemistryForYou2__/graphics/icons/sodium-hydroxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or { } or {
{ icon = "__bzchlorine2__/graphics/icons/salt.png", icon_size = 128}, { icon = "__bzchlorine__/graphics/icons/salt.png", icon_size = 128},
}), }),
main_product = "salt", main_product = "salt",
subgroup = "chemical", subgroup = "chemical",
@ -1154,7 +1148,7 @@ if mods["space-exploration"] then
}) })
util.add_productivity("deep-space-ore-enrichment") util.add_productivity("deep-space-ore-enrichment")
end end
if mods["bztungsten2"] then if mods["bztungsten"] then
local smart_glass_ingredients = {{type="item", name="tungsten-trioxide", amount=10}, {type="item", name=mods["Krastorio2"] and "kr-glass" or "glass", amount=10}} local smart_glass_ingredients = {{type="item", name="tungsten-trioxide", amount=10}, {type="item", name=mods["Krastorio2"] and "kr-glass" or "glass", amount=10}}
if data.raw.item["graphene"] then if data.raw.item["graphene"] then
table.insert(smart_glass_ingredients, {type="item", name="graphene", amount=4}) table.insert(smart_glass_ingredients, {type="item", name="graphene", amount=4})
@ -1198,10 +1192,10 @@ if mods["space-exploration"] then
name = "tungsten-trioxide-smelting", name = "tungsten-trioxide-smelting",
icons = (mods["Krastorio2"] and icons = (mods["Krastorio2"] and
{ {
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128}, { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/tungsten-trioxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, { icon = "__ChemistryForYou2__/graphics/icons/tungsten-trioxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or { } or {
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128}, { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128},
}), }),
category = "smelting", category = "smelting",
subgroup = "chemical", subgroup = "chemical",

View file

@ -17,11 +17,11 @@ if mods["Krastorio2"] then
end end
local saltpeterPrerequ = {"chemical-science-pack"} local saltpeterPrerequ = {"chemical-science-pack"}
if mods["bztin2"] then if mods["bztin"] then
saltpeterPrerequ = {"organic-chemistry"} saltpeterPrerequ = {"organic-chemistry"}
end end
if mods["bzgas2"] and mods["bzsilicon2"] then if mods["bzsilicon"] then
rich_water_filtration_pre = {"water-filtration"} rich_water_filtration_pre = {"water-filtration"}
end end
@ -67,7 +67,7 @@ data:extend(
icons = (mods["Krastorio2"] and icons = (mods["Krastorio2"] and
{ {
{ icon = "__Krastorio2Assets__/icons/items/glass.png", icon_size = 64}, { icon = "__Krastorio2Assets__/icons/items/glass.png", icon_size = 64},
{ icon = "__ChemistryForYou2__/graphics/icons/sodium-carbonate.png", icon_size = 128, scale=0.5, shift= {-24, -24}}, { icon = "__ChemistryForYou2__/graphics/icons/sodium-carbonate.png", icon_size = 128, scale=0.25, shift= {-8, -8}},
} or { } or {
{ icon = "__ChemistryForYou2__/graphics/icons/sodium-carbonate.png", icon_size = 128}, { icon = "__ChemistryForYou2__/graphics/icons/sodium-carbonate.png", icon_size = 128},
}), }),
@ -157,7 +157,7 @@ data:extend(
icons = (mods["BrimStuff-Updated"] and icons = (mods["BrimStuff-Updated"] and
{ {
{ icon = "__base__/graphics/icons/fluid/sulfuric-acid.png", icon_size = 64}, { icon = "__base__/graphics/icons/fluid/sulfuric-acid.png", icon_size = 64},
{ icon = "__BrimStuff-Updated__/graphics/icons/potassium-nitrate.png", icon_size = 64, scale=1, shift= {-24, -24}}, { icon = "__BrimStuff-Updated__/graphics/icons/potassium-nitrate.png", icon_size = 64, scale=0.5, shift= {-8, -8}},
} or { } or {
{ icon = "__base__/graphics/icons/fluid/sulfuric-acid.png", icon_size = 64}, { icon = "__base__/graphics/icons/fluid/sulfuric-acid.png", icon_size = 64},
}), }),
@ -369,7 +369,7 @@ if mods["Krastorio2"] then
} }
} }
}) })
if mods["bzgas2"] then if mods["bzgas"] then
data:extend( data:extend(
{ {
{ {
@ -431,7 +431,7 @@ if mods["Krastorio2"] then
} }
} }
}) })
if mods["bzchlorine2"] then if mods["bzchlorine"] then
util.add_unlock("aluminium-chemistry", "sodium-hydroxide-reaction") util.add_unlock("aluminium-chemistry", "sodium-hydroxide-reaction")
end end
--Apperently I need electrolysis-2 tech for compatibility with EndgameCombat --Apperently I need electrolysis-2 tech for compatibility with EndgameCombat
@ -458,7 +458,7 @@ if mods["Krastorio2"] then
}, },
}) })
end end
if mods["bzsilicon2"] then if mods["bzsilicon"] then
data:extend( data:extend(
{ {
{ {
@ -525,7 +525,7 @@ if mods["Krastorio2"] then
type = "technology", type = "technology",
name = "air-scrubing-oil-processing", name = "air-scrubing-oil-processing",
icons = {{ icon = "__base__/graphics/icons/fluid/light-oil.png", icon_size = 64}, icons = {{ icon = "__base__/graphics/icons/fluid/light-oil.png", icon_size = 64},
{ icon = "__Limestone2__/graphics/icons/limestone-powder.png", icon_size = 64, scale=1, shift= {-24, -24}},}, { icon = "__Limestone2__/graphics/icons/limestone-powder.png", icon_size = 64, scale=0.3, shift= {-8, -8}},},
prerequisites = {"productivity-science-pack", "aluminium-chemistry"}, prerequisites = {"productivity-science-pack", "aluminium-chemistry"},
effects = { effects = {
{ {
@ -617,13 +617,13 @@ if mods["248k-Redux"] then
end end
if mods["ThemTharHills-Updated"] then if mods["ThemTharHills-Updated"] then
if (mods["bzfoundry2"] and mods["BrassTacks-Updated"]) and (mods["bzlead2"] and mods["bzgold2"]) then if (mods["bzfoundry"] and mods["BrassTacks-Updated"]) and (mods["bzlead"] and mods["bzgold"]) then
data:extend( data:extend(
{ {
{ {
type = "technology", type = "technology",
name = "silver-pyrometallurgi", name = "silver-pyrometallurgi",
icon = "__bzgold2__/graphics/icons/silver-ore.png", icon = "__bzgold__/graphics/icons/silver-ore.png",
icon_size = 128, icon_size = 128,
prerequisites = {"productivity-science-pack"}, prerequisites = {"productivity-science-pack"},
effects = { effects = {
@ -700,7 +700,7 @@ if mods["space-exploration"] then
} }
}, },
}) })
if mods["bztungsten2"] then if mods["bztungsten"] then
data:extend( data:extend(
{ {
{ {
@ -858,4 +858,5 @@ if mods["space-exploration"] then
if mods["248k-Redux"] then if mods["248k-Redux"] then
data.raw.technology["nuclear-waste-extraction"].unit.ingredients[#data.raw.technology["nuclear-waste-extraction"].unit.ingredients+1] = {"se-rocket-science-pack", 1} data.raw.technology["nuclear-waste-extraction"].unit.ingredients[#data.raw.technology["nuclear-waste-extraction"].unit.ingredients+1] = {"se-rocket-science-pack", 1}
end end
data.raw.technology["trace-uranium-extraction"].unit.ingredients[#data.raw.technology["trace-uranium-extraction"].unit.ingredients+1] = {"se-rocket-science-pack", 1}
end end

View file

@ -91,7 +91,7 @@ if mods["ShockTurret"] then
} }
end end
if mods["bzgold2"] and mods["ThemTharHills-Updated"] then if mods["bzgold"] and mods["ThemTharHills-Updated"] then
util.add_product("trace-gold-from-copper", { type = "item", name = "platinum-powder", amount=1, probability=0.1}) util.add_product("trace-gold-from-copper", { type = "item", name = "platinum-powder", amount=1, probability=0.1})
util.add_unlock("gold-processing", "platinum-ingot") util.add_unlock("gold-processing", "platinum-ingot")
end end
@ -100,7 +100,7 @@ if mods["LasingAround-Updated"] then
util.replace_ingredient("carbon-dioxide-laser", "petroleum-gas", "carbon-dioxide", 100) util.replace_ingredient("carbon-dioxide-laser", "petroleum-gas", "carbon-dioxide", 100)
end end
if mods["bzgas2"] then if mods["bzgas"] then
util.add_product("gas-reforming", { type = "fluid", name = "carbon-dioxide", amount = 50 }) util.add_product("gas-reforming", { type = "fluid", name = "carbon-dioxide", amount = 50 })
end end
@ -131,7 +131,7 @@ if mods["space-exploration"] then
util.add_product("calcium-plate", { type = "fluid", name = "carbon-dioxide", amount = 10 }) util.add_product("calcium-plate", { type = "fluid", name = "carbon-dioxide", amount = 10 })
end end
if mods["bztungsten2"] then if mods["bztungsten"] then
util.remove_ingredient("se-space-biochemical-laboratory", "graphene") util.remove_ingredient("se-space-biochemical-laboratory", "graphene")
util.replace_ingredient("se-space-biochemical-laboratory", glass_name, "smart-glass", 80) util.replace_ingredient("se-space-biochemical-laboratory", glass_name, "smart-glass", 80)