Compare commits

..

17 commits
2.0.1 ... main

Author SHA1 Message Date
Simon Brodtmann
ddebf18fa8 2.0.9 2025-11-02 18:55:38 +01:00
Simon Brodtmann
cca6d11b90 Fix technology icons 2025-11-02 17:17:17 +01:00
Simon Brodtmann
7f7cec98cc 2.0.8 2025-10-22 23:24:17 +02:00
Simon Brodtmann
eedef2d317 Fix zeolite recipe for when silica is not present 2025-10-22 22:26:48 +02:00
Simon Brodtmann
d134d735f9 Fix booleans being strings 2025-10-22 22:26:27 +02:00
Simon Brodtmann
3120cb7ea2 2.0.7 2025-10-21 15:40:02 +02:00
Simon Brodtmann
adc2cdeea1 Update to bz mods version 2 2025-10-21 14:58:53 +02:00
Simon Brodtmann
06f525b28a 2.0.6 2025-10-17 11:51:23 +02:00
Simon Brodtmann
ec5e590a29 Fix prerequisite for rich-water-filtration when 248k and silicon are active but bzgas is not 2025-10-17 11:48:50 +02:00
Simon Brodtmann
fc2abe9bf4 2.0.5 2025-10-16 10:08:33 +02:00
Simon Brodtmann
413463705e Fix crash when only ChemistryForYou and SE are active 2025-10-16 10:07:54 +02:00
Simon Brodtmann
5573e87b35 2.0.4 2025-10-16 00:32:21 +02:00
Simon Brodtmann
74c3b6868b Fix crash when bzsilicon is present but bzaluminum is not 2025-10-16 00:31:47 +02:00
Simon Brodtmann
55a2bd5174 2.0.3 2025-10-14 12:20:10 +02:00
Simon Brodtmann
b3f7daefd8 Fix lithium with K2 2025-10-13 21:52:06 +02:00
Simon Brodtmann
10b6b7fc21 2.0.2 2025-10-13 18:11:11 +02:00
Simon Brodtmann
a52835dd77 Add missing ingredient types + compatibility fixes 2025-10-13 16:00:31 +02:00
6 changed files with 130 additions and 81 deletions

View file

@ -1,4 +1,46 @@
---------------------------------------------------------------------------------------------------
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
Date: 13.10.2025
Bug Fixes:
- Add missing ingredient types
- Increase mod compatibility
---------------------------------------------------------------------------------------------------
Version: 2.0.1
Date: 10.10.2025
Bug Fixes:

View file

@ -855,8 +855,8 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier)
end
util.remove_prior_unlocks(tech, old)
for i, recipe in pairs(data.raw.recipe) do
if (recipe.enabled and recipe.enabled ~= 'false')
and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes
if (recipe.enabled and recipe.enabled ~= false)
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 :(
then
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|

View file

@ -1,8 +1,9 @@
{
"name": "ChemistryForYou2",
"version": "2.0.1",
"version": "2.0.9",
"factorio_version": "2.0",
"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",
"homepage": "https://discord.gg/ufvFUJtVwk",
"dependencies": [
@ -12,15 +13,15 @@
"? BrassTacks-Updated",
"? bobassembly",
"? BrimStuff-Updated",
"? bzaluminum",
"? bzchlorine",
"? bzfoundry",
"? bzgas",
"? bzgold",
"? bzlead",
"? bzsilicon",
"? bztin",
"? bztungsten",
"? bzaluminum2",
"? bzchlorine2",
"? bzfoundry2",
"? bzgas2",
"? bzgold2",
"? bzlead2",
"? bzsilicon2",
"? bztin2",
"? bztungsten2",
"? Chromium2",
"? Cobalt2",
"? GasGasGases2",
@ -37,7 +38,7 @@
"? space-exploration",
"? ShockTurret",
"? Tantalite2",
"? ThemTharHills-Updated"
],
"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."
"? ThemTharHills-Updated",
"! space-age"
]
}

View file

@ -1,5 +1,7 @@
local util = require("data-util")
local lithium = mods["Krastorio2"] and "kr-lithium" or "lithium"
if mods["space-exploration"] then
data:extend({{
type = "item-subgroup",
@ -17,7 +19,7 @@ else
end
if mods["ThemTharHills-Updated"] then
if (mods["bzfoundry"] and mods["BrassTacks-Updated"]) and (mods["bzlead"] and mods["bzgold"]) then
if (mods["bzfoundry2"] and mods["BrassTacks-Updated"]) and (mods["bzlead2"] and mods["bzgold2"]) then
data:extend({
{
type = "recipe",
@ -57,18 +59,18 @@ local alumHydroxideSmeltIcon = (mods["Krastorio2"] and
{ icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64},
})
if mods["bzaluminum"] then
if mods["bzaluminum2"] then
alumHydroxideSmeltIcon = (mods["Krastorio2"] and
{
{ icon = "__bzaluminum__/graphics/icons/alumina.png", icon_size = 128},
{ icon = "__bzaluminum2__/graphics/icons/alumina.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/aluminium-hydroxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or {
{ icon = "__bzaluminum__/graphics/icons/alumina.png", icon_size = 128},
{ icon = "__bzaluminum2__/graphics/icons/alumina.png", icon_size = 128},
})
end
local sodaLimeGlassCategory = "crafting"
if not data.raw.item["glass"] then
if not data.raw.item["glass"] and not data.raw.item["kr-glass"] then
data:extend({
{
type = "item",
@ -319,7 +321,7 @@ data:extend({
order = "a",
enabled = false,
energy_required = 8,
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}},
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}},
results = {{type="item", name="zeolite", amount=10}},
},
{
@ -385,7 +387,7 @@ data:extend({
order = "l",
enabled = false,
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 }},
}
})
@ -521,11 +523,11 @@ data:extend({
} or {
{ icon = "__ChemistryForYou2__/graphics/icons/glass.png", icon_size = 64},
}),
main_product = "glass",
main_product = mods["Krastorio2"] and "kr-glass" or "glass",
enabled = false,
energy_required = 16,
ingredients = {{type="item", name="sodium-carbonate", amount=10}, (data.raw.item["quicklime"] and {type = "item", name = "quicklime", amount=10}) or {type = "item", name = "stone", amount=5}, (data.raw.item["alumina"] and {type = "item", name = "alumina", amount=1}) or {type = "item", name = "iron-plate", amount=1}},
results = {{type="item", name = "glass", amount=10}}
results = {{type="item", name = mods["Krastorio2"] and "kr-glass" or "glass", amount=10}}
}
})
@ -534,18 +536,18 @@ local science_pack = "__ChemistryForYou2__/graphics/icons/productivity-science-p
science_pack = "__Krastorio2Assets__/icons/cards/production-tech-card.png"
end
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
table.insert(rich_water_filtration_results, {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
if data.raw.item["gold-ore"] then
table.insert(rich_water_filtration_results, {name="gold-ore", amount=1, probability=0.1})
table.insert(rich_water_filtration_results, { type = "item", name = "gold-ore", amount=1, probability=0.1})
end
if data.raw.item["platinum-powder"] then
table.insert(rich_water_filtration_results, {name="platinum-powder", amount=1, probability=0.1})
table.insert(rich_water_filtration_results, { type = "item", name = "platinum-powder", amount=1, probability=0.1})
end
if data.raw.item["palladium-powder"] then
table.insert(rich_water_filtration_results, {name="palladium-powder", amount=1, probability=0.1})
table.insert(rich_water_filtration_results, { type = "item", name = "palladium-powder", amount=1, probability=0.1})
end
data:extend({
{
@ -665,7 +667,7 @@ data:extend({
order = "n",
enabled = false,
energy_required = 10,
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
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
results = {{ type = "fluid", name = "nitrate", amount = 100 }},
},
{
@ -844,7 +846,7 @@ if mods["Cobalt2"] then
})
end
if mods["bzsilicon"] then
if mods["bzsilicon2"] then
data:extend({
{
type = "recipe",
@ -864,7 +866,10 @@ if mods["bzsilicon"] then
energy_required = 10,
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 }}
},
}
})
if data.raw.item["aluminum-plate"] then
data:extend({
{
type = "recipe",
name = "advanced-silicon-processing",
@ -872,10 +877,10 @@ if mods["bzsilicon"] then
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}},
{ 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 = "__bzsilicon__/graphics/icons/silicon.png", icon_size = 64},
{ icon = "__bzsilicon2__/graphics/icons/silicon.png", icon_size = 64},
}),
main_product = mods["Krastorio2"] and "kr-silicon" or "silicon",
subgroup = "intermediate-product",
@ -883,9 +888,10 @@ if mods["bzsilicon"] then
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 mods["bzgas"] then
end
if mods["bzgas2"] then
data:extend({
{
type = "recipe",
@ -894,10 +900,10 @@ if mods["bzsilicon"] then
order = "a[fluid]-g[formaldaehyde]",
icons = (mods["Krastorio2"] and
{
{ icon = "__bzgas__/graphics/icons/formaldehyde.png", icon_size = 128},
{ icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/zeolite.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or {
{ icon = "__bzgas__/graphics/icons/formaldehyde.png", icon_size = 128},
{ icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128},
}),
main_product = "formaldehyde",
subgroup = "fluid-recipes",
@ -927,7 +933,7 @@ if mods["bzsilicon"] then
})
end
end
if mods["bzchlorine"] then
if mods["bzchlorine2"] then
data:extend({
{
type = "recipe",
@ -936,10 +942,10 @@ if mods["bzchlorine"] then
order = "s",
icons = (mods["Krastorio2"] and
{
{ icon = "__bzchlorine__/graphics/icons/salt.png", icon_size = 128},
{ icon = "__bzchlorine2__/graphics/icons/salt.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/sodium-hydroxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or {
{ icon = "__bzchlorine__/graphics/icons/salt.png", icon_size = 128},
{ icon = "__bzchlorine2__/graphics/icons/salt.png", icon_size = 128},
}),
main_product = "salt",
subgroup = "chemical",
@ -1148,8 +1154,8 @@ if mods["space-exploration"] then
})
util.add_productivity("deep-space-ore-enrichment")
end
if mods["bztungsten"] then
local smart_glass_ingredients = {{type="item", name="tungsten-trioxide", amount=10}, {type="item", name="glass", amount=10}}
if mods["bztungsten2"] then
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
table.insert(smart_glass_ingredients, {type="item", name="graphene", amount=4})
end
@ -1192,10 +1198,10 @@ if mods["space-exploration"] then
name = "tungsten-trioxide-smelting",
icons = (mods["Krastorio2"] and
{
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128},
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128},
{ icon = "__ChemistryForYou2__/graphics/icons/tungsten-trioxide.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or {
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128},
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128},
}),
category = "smelting",
subgroup = "chemical",

View file

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

View file

@ -2,6 +2,7 @@ local util = require("data-util")
-- Main vanilla changes
local glass_name = mods["Krastorio2"] and "kr-glass" or "glass"
-- Mod changes
if mods["248k-Redux"] then
@ -90,8 +91,8 @@ if mods["ShockTurret"] then
}
end
if mods["bzgold"] and mods["ThemTharHills-Updated"] then
util.add_product("trace-gold-from-copper", {name="platinum-powder", amount=1, probability=0.1})
if mods["bzgold2"] and mods["ThemTharHills-Updated"] then
util.add_product("trace-gold-from-copper", { type = "item", name = "platinum-powder", amount=1, probability=0.1})
util.add_unlock("gold-processing", "platinum-ingot")
end
@ -99,7 +100,7 @@ if mods["LasingAround-Updated"] then
util.replace_ingredient("carbon-dioxide-laser", "petroleum-gas", "carbon-dioxide", 100)
end
if mods["bzgas"] then
if mods["bzgas2"] then
util.add_product("gas-reforming", { type = "fluid", name = "carbon-dioxide", amount = 50 })
end
@ -130,18 +131,18 @@ if mods["space-exploration"] then
util.add_product("calcium-plate", { type = "fluid", name = "carbon-dioxide", amount = 10 })
end
if mods["bztungsten"] then
if mods["bztungsten2"] then
util.remove_ingredient("se-space-biochemical-laboratory", "graphene")
util.replace_ingredient("se-space-biochemical-laboratory", "glass", "smart-glass", 80)
util.replace_ingredient("se-space-biochemical-laboratory", glass_name, "smart-glass", 80)
util.remove_ingredient("se-space-growth-facility", "graphene")
util.replace_ingredient("se-space-growth-facility", "glass", "smart-glass", 300)
util.replace_ingredient("se-space-growth-facility", glass_name, "smart-glass", 300)
util.remove_ingredient("se-space-mirror", "silver-plate")
util.replace_ingredient("se-space-mirror", "glass", "smart-glass", 8)
util.replace_ingredient("se-space-mirror", glass_name, "smart-glass", 8)
util.remove_ingredient("se-space-mirror-alternate", "silver-plate")
util.replace_ingredient("se-space-mirror-alternate", "glass", "smart-glass", 2)
util.replace_ingredient("se-space-mirror-alternate", glass_name, "smart-glass", 2)
util.add_prerequisite("se-space-biochemical-laboratory","tungsten-chemistry")
end