From 8db4982e5b9a5d945851ce8768cc2c1a1f523c3c Mon Sep 17 00:00:00 2001 From: pla Date: Sat, 1 Nov 2025 13:01:21 +0100 Subject: [PATCH 1/9] Fixing K2 matter stuff (#1) Fixed K2 matter generation Fixed Matter tech icon size Sadly the matter conversion recipe icons are not fixed, because the K2 routine doesn't like the 128px icons Check if Matter recipes already exist, error with Them Thar Hills ![image](/attachments/f1ccec6e-768a-425e-b0dc-1691b8d78037) Co-authored-by: pla Reviewed-on: https://git.cacklingfiend.info/cacklingfiend/bzgold2/pulls/1 Co-authored-by: pla Co-committed-by: pla --- bzgold2/data-util.lua | 15 +++++--- bzgold2/matter.lua | 53 +++++++++++++------------- bzgold2/prototypes/enriched-gold.lua | 4 +- bzgold2/prototypes/enriched-silver.lua | 4 +- 4 files changed, 41 insertions(+), 35 deletions(-) diff --git a/bzgold2/data-util.lua b/bzgold2/data-util.lua index 3825ac6..8c0697f 100644 --- a/bzgold2/data-util.lua +++ b/bzgold2/data-util.lua @@ -115,12 +115,12 @@ end function util.k2matter(params) local matter = require("__Krastorio2__/prototypes/libraries/matter") if mods["space-exploration"] then - params.k2matter.need_stabilizer = true + params.k2matter.needs_stabilizer = true end if not params.k2matter.minimum_conversion_quantity then params.k2matter.minimum_conversion_quantity = 10 end - if not data.raw.technology[params.k2matter.unlocked_by_technology] then + if not data.raw.technology[params.k2matter.unlocked_by] then local icon = "" if params.k2baseicon then icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png" @@ -132,7 +132,7 @@ function util.k2matter(params) { { type = "technology", - name = params.k2matter.unlocked_by_technology, + name = params.k2matter.unlocked_by, icons = { { @@ -163,11 +163,16 @@ function util.k2matter(params) }, time = 45, }, - localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}}, + effects = {}, + -- localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}}, }, }) end - matter.make_recipes(params.k2matter) + if params.k2matter.only_deconversion then + matter.make_deconversion_recipe(params.k2matter) + else + matter.make_recipes(params.k2matter) + end end diff --git a/bzgold2/matter.lua b/bzgold2/matter.lua index 10ea30c..728e9da 100644 --- a/bzgold2/matter.lua +++ b/bzgold2/matter.lua @@ -1,30 +1,31 @@ -- Matter recipes for Krastorio2 if mods["Krastorio2"] then - local util = require("data-util"); + local util = require("data-util") - util.k2matter({ - k2matter = { - material = { type = "item", name = "gold-ore", amount = 30 }, - item_name = "gold-ore", - matter_count = 30, - energy_required = 10, - need_stabilizer = false, - unlocked_by_technology = "gold-matter-processing", - }, - k2baseicon = "stone", - icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1} - }) - - util.k2matter({ - k2matter = { - material = { type = "item", name = "silver-ore", amount = 8 }, - item_name = "silver-ore", - matter_count = 8, - energy_required = 5, - need_stabilizer = false, - unlocked_by_technology = "silver-matter-processing", - }, - k2baseicon = "stone", - icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1} - }) + if not data.raw.recipe["kr-gold-ore-to-matter"] then + util.k2matter({ + k2matter = { + material = { type = "item", name = "gold-ore", amount = 30 }, + item_name = "gold-ore", + matter_count = 30, + energy_required = 10, + needs_stabilizer = false, + unlocked_by = "gold-matter-processing", + }, + icon = { icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 0.5 }, + }) + end + if settings.startup["bzgold-silver"].value then + util.k2matter({ + k2matter = { + material = { type = "item", name = "silver-ore", amount = 8 }, + item_name = "silver-ore", + matter_count = 8, + energy_required = 5, + needs_stabilizer = false, + unlocked_by = "silver-matter-processing", + }, + icon = { icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 0.5 }, + }) + end end diff --git a/bzgold2/prototypes/enriched-gold.lua b/bzgold2/prototypes/enriched-gold.lua index 6190f58..a8d9734 100644 --- a/bzgold2/prototypes/enriched-gold.lua +++ b/bzgold2/prototypes/enriched-gold.lua @@ -1,4 +1,4 @@ -local util = require("data-util"); +local util = require("data-util") if mods.Krastorio2 then @@ -92,7 +92,7 @@ data:extend({ { icon = data.raw.item["gold-ore"].icon, icon_size = data.raw.item["gold-ore"].icon_size, - scale = 0.2, + scale = 0.2 * 64 / (data.raw.item["gold-ore"].icon_size or 64), shift = {0, 4} } }, diff --git a/bzgold2/prototypes/enriched-silver.lua b/bzgold2/prototypes/enriched-silver.lua index c5a8495..0914e19 100644 --- a/bzgold2/prototypes/enriched-silver.lua +++ b/bzgold2/prototypes/enriched-silver.lua @@ -1,4 +1,4 @@ -local util = require("data-util"); +local util = require("data-util") if mods.Krastorio2 and util.me.silver() then data:extend({ @@ -111,7 +111,7 @@ data:extend({ { icon = data.raw.item["silver-ore"].icon, icon_size = data.raw.item["silver-ore"].icon_size, - scale = 0.2, + scale = 0.2 * 64 / (data.raw.item["silver-ore"].icon_size or 64), shift = {0, 4} } }, From 04a1e986ddb5e68f4b0f0c0b6d508de3a7e0fde6 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sat, 1 Nov 2025 13:01:42 +0100 Subject: [PATCH 2/9] Fix booleans being strings --- bzgold2/data-util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bzgold2/data-util.lua b/bzgold2/data-util.lua index 8c0697f..a6fc6c0 100644 --- a/bzgold2/data-util.lua +++ b/bzgold2/data-util.lua @@ -1193,8 +1193,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 :| From db3137985e8f60c9b94be8e428040fc3543ca7a7 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sat, 1 Nov 2025 22:53:22 +0100 Subject: [PATCH 3/9] 2.0.2 --- bzgold2/changelog.txt | 5 +++++ bzgold2/info.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bzgold2/changelog.txt b/bzgold2/changelog.txt index 4d308d3..28f528b 100644 --- a/bzgold2/changelog.txt +++ b/bzgold2/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.2 +Date: 01.11.2025 + Bug Fixes: + - Fix K2 matter integration +--------------------------------------------------------------------------------------------------- Version: 2.0.1 Date: 21.10.2025 Changes: diff --git a/bzgold2/info.json b/bzgold2/info.json index 9cbe7ad..a4698fd 100644 --- a/bzgold2/info.json +++ b/bzgold2/info.json @@ -1,6 +1,6 @@ { "name": "bzgold2", - "version": "2.0.1", + "version": "2.0.2", "factorio_version": "2.0", "title": "Noble Metals", "description": "Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.", From 99cab50b68e9b7a810ec069eaee219d6d139c6a8 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sat, 1 Nov 2025 23:00:22 +0100 Subject: [PATCH 4/9] Forgot thanks --- bzgold2/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bzgold2/changelog.txt b/bzgold2/changelog.txt index 28f528b..fcc1dd7 100644 --- a/bzgold2/changelog.txt +++ b/bzgold2/changelog.txt @@ -2,7 +2,7 @@ Version: 2.0.2 Date: 01.11.2025 Bug Fixes: - - Fix K2 matter integration + - Fix K2 matter integration (thanks pla) --------------------------------------------------------------------------------------------------- Version: 2.0.1 Date: 21.10.2025 From 1a411368c5966868ee50402cd4d56e08c2fa8cac Mon Sep 17 00:00:00 2001 From: pla Date: Fri, 7 Nov 2025 11:41:01 +0100 Subject: [PATCH 5/9] Fix tech coal-liquefaction has no prereq with catalysis off --- bzgold2/prototypes/tech-updates.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bzgold2/prototypes/tech-updates.lua b/bzgold2/prototypes/tech-updates.lua index ad6b5ab..a5a738c 100644 --- a/bzgold2/prototypes/tech-updates.lua +++ b/bzgold2/prototypes/tech-updates.lua @@ -21,6 +21,8 @@ end util.add_unlock("processing-unit", "cpu") util.add_unlock("processing-unit", "mainboard") -util.add_prerequisite("coal-liquefaction", "catalysis") -util.remove_prerequisite("coal-liquefaction", "production-science-pack") -util.remove_prerequisite("coal-liquefaction", "advanced-oil-processing") +if settings.startup["bzgold-catalysis"].value == true then + util.add_prerequisite("coal-liquefaction", "catalysis") + util.remove_prerequisite("coal-liquefaction", "production-science-pack") + util.remove_prerequisite("coal-liquefaction", "advanced-oil-processing") +end From e11da239879f932ca2bd0086f64f136d8bd7d864 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sun, 16 Nov 2025 11:53:15 +0100 Subject: [PATCH 6/9] Fix recipe name of blank-tech-card-silver --- bzgold2/prototypes/recipe-updates.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/bzgold2/prototypes/recipe-updates.lua b/bzgold2/prototypes/recipe-updates.lua index 690c811..93cdc66 100644 --- a/bzgold2/prototypes/recipe-updates.lua +++ b/bzgold2/prototypes/recipe-updates.lua @@ -72,6 +72,7 @@ end if mods.Krastorio2 and util.me.silver() then local tc = futil.table.deepcopy(data.raw.recipe["kr-blank-tech-card"]) tc.name = "blank-tech-card-silver" + tc.localised_name = { "item-name.blank-tech-card" } data:extend({tc}) util.replace_ingredient("blank-tech-card-silver", "copper-cable", "silver-wire") local amt = util.get_amount("kr-blank-tech-card") From 4627a45cdb09def4e1f64398fb9113f2019f318c Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 10 Dec 2025 19:25:46 +0100 Subject: [PATCH 7/9] Cleanup --- bzgold2/data.lua | 3 - bzgold2/prototypes/rich-copper.lua | 374 ++++++++++++++--------------- 2 files changed, 184 insertions(+), 193 deletions(-) diff --git a/bzgold2/data.lua b/bzgold2/data.lua index 727db4a..a109d88 100644 --- a/bzgold2/data.lua +++ b/bzgold2/data.lua @@ -21,8 +21,5 @@ require("compatibility/248k") local util = require("data-util"); -if util.se6() then -end - -- Must be last util.create_list() diff --git a/bzgold2/prototypes/rich-copper.lua b/bzgold2/prototypes/rich-copper.lua index 1402ec7..4aae64d 100644 --- a/bzgold2/prototypes/rich-copper.lua +++ b/bzgold2/prototypes/rich-copper.lua @@ -4,154 +4,149 @@ local futil = require("util"); local util = require("data-util"); if util.me.platinum() or util.me.palladium() then -if mods.Krastorio2 then - -- no rich copper - local rm = futil.table.deepcopy(data.raw.recipe["kr-rare-metals"]) - rm.name = "rare-metals-1" - data:extend({rm}) - util.add_unlock("platinum-processing", "rare-metals-1") - util.add_unlock("palladium-processing", "rare-metals-1") - util.add_icon("rare-metals-1", {icon = "__bzgold2__/graphics/icons/platinum-powder.png", - icon_size = 64, scale = 0.25, shift = {-8,8}}) + if mods.Krastorio2 then + -- no rich copper + local rm = futil.table.deepcopy(data.raw.recipe["kr-rare-metals"]) + rm.name = "rare-metals-1" + data:extend({ rm }) + util.add_unlock("platinum-processing", "rare-metals-1") + util.add_unlock("palladium-processing", "rare-metals-1") + util.add_icon("rare-metals-1", { icon = "__bzgold2__/graphics/icons/platinum-powder.png", + icon_size = 64, scale = 0.25, shift = { -8, 8 } }) - util.multiply_recipe("kr-rare-metals", 2) - util.multiply_recipe("rare-metals-1", 2) - util.multiply_recipe("rare-metals-2", 2) + util.multiply_recipe("kr-rare-metals", 2) + util.multiply_recipe("rare-metals-1", 2) + util.multiply_recipe("rare-metals-2", 2) - util.set_main_product("kr-rare-metals", "kr-rare-metals") - util.set_product_amount("kr-rare-metals", "kr-rare-metals", 6) - util.set_main_product("rare-metals-1", "kr-rare-metals") - util.set_main_product("rare-metals-2", "kr-rare-metals") + util.set_main_product("kr-rare-metals", "kr-rare-metals") + util.set_product_amount("kr-rare-metals", "kr-rare-metals", 6) + util.set_main_product("rare-metals-1", "kr-rare-metals") + util.set_main_product("rare-metals-2", "kr-rare-metals") - - if util.me.platinum() and util.me.palladium() then - util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "platinum-powder", 2, {force=true}) - util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "palladium-powder", 2, {force=true}) - util.replace_some_product("rare-metals-2", "kr-rare-metals", 3, "platinum-powder", 3, {force=true}) - util.replace_some_product("rare-metals-2", "kr-rare-metals", 3, "palladium-powder", 3, {force=true}) - elseif util.me.platinum() then - util.replace_some_product("rare-metals-1", "kr-rare-metals", 3, "platinum-powder", 4, {force=true}) - util.replace_some_product("rare-metals-2", "kr-rare-metals", 6, "platinum-powder", 6, {force=true}) - elseif util.me.palladium() then - util.replace_some_product("rare-metals-1", "kr-rare-metals", 3, "palladium-powder", 4, {force=true}) - util.replace_some_product("rare-metals-2", "kr-rare-metals", 6, "palladium-powder", 6, {force=true}) - end -else - -local results = {} -if util.me.silver() and util.me.platinum() and util.me.palladium() then - results = { - {type="item", name="copper-plate", amount=1}, - {type="item", name="silver-ore", amount=1, probability=0.5}, - {type="item", name="platinum-powder", amount=1, probability=0.25}, - {type="item", name="palladium-powder", amount=1, probability=0.25}, - } -elseif util.me.silver() and util.me.platinum() then - results = { - {type="item", name="copper-plate", amount=1}, - {type="item", name="silver-ore", amount=1, probability=0.67}, - {type="item", name="platinum-powder", amount=1, probability=0.33}, - } -elseif util.me.silver() and util.me.palladium() then - results = { - {type="item", name="copper-plate", amount=1}, - {type="item", name="silver-ore", amount=1, probability=0.67}, - {type="item", name="palladium-powder", amount=1, probability=0.33}, - } -elseif util.me.platinum() and util.me.palladium() then - results = { - {type="item", name="copper-plate", amount=1}, - {type="item", name="platinum-powder", amount=1, probability=0.5}, - {type="item", name="palladium-powder", amount=1, probability=0.5}, - } -elseif util.me.platinum() then - results = { - {type="item", name="copper-plate", amount=2, probability = 0.75}, - {type="item", name="platinum-powder", amount=1, probability=0.5}, - } -elseif util.me.palladium() then - results = { - {type="item", name="copper-plate", amount=2, probability = 0.75}, - {type="item", name="palladium-powder", amount=1, probability=0.5}, - } -else -- should never happen - results = { - {type="item", name="copper-plate", amount=2}, - } -end - - -if data.raw.resource["copper-ore"] then - if mods["space-exploration"] then - -- decrease richness of copper a bit (ok if it stacks with aluminum) - data.raw.resource["copper-ore"].autoplace.richness_expression = - data.raw.resource["copper-ore"].autoplace.richness_expression .. "*(3/4)" + if util.me.platinum() and util.me.palladium() then + util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "platinum-powder", 2, { force = true }) + util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "palladium-powder", 2, { force = true }) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 3, "platinum-powder", 3, { force = true }) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 3, "palladium-powder", 3, { force = true }) + elseif util.me.platinum() then + util.replace_some_product("rare-metals-1", "kr-rare-metals", 3, "platinum-powder", 4, { force = true }) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 6, "platinum-powder", 6, { force = true }) + elseif util.me.palladium() then + util.replace_some_product("rare-metals-1", "kr-rare-metals", 3, "palladium-powder", 4, { force = true }) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 6, "palladium-powder", 6, { force = true }) + end else - log("Replacing vanilla copper-ore autoplace") - local resource_autoplace = require('resource-autoplace'); - data.raw.resource["copper-ore"].autoplace = resource_autoplace.resource_autoplace_settings{ - name = "copper-ore", - order = "b", - base_density = mods.bzaluminum2 and 3 or 4, - has_starting_area_placement = true, - regular_rq_factor_multiplier = 1.1, - starting_rq_factor_multiplier = 1.1, - candidate_spot_count = 22, - } - end -end -if util.se6() then - data:extend({ - { - type = "autoplace-control", - category = "resource", - name = "rich-copper-ore", - richness = true, - order = "zzzzzzzzzzz" - }, - }) -end + local results = {} + if util.me.silver() and util.me.platinum() and util.me.palladium() then + results = { + { type = "item", name = "copper-plate", amount = 1 }, + { type = "item", name = "silver-ore", amount = 1, probability = 0.5 }, + { type = "item", name = "platinum-powder", amount = 1, probability = 0.25 }, + { type = "item", name = "palladium-powder", amount = 1, probability = 0.25 }, + } + elseif util.me.silver() and util.me.platinum() then + results = { + { type = "item", name = "copper-plate", amount = 1 }, + { type = "item", name = "silver-ore", amount = 1, probability = 0.67 }, + { type = "item", name = "platinum-powder", amount = 1, probability = 0.33 }, + } + elseif util.me.silver() and util.me.palladium() then + results = { + { type = "item", name = "copper-plate", amount = 1 }, + { type = "item", name = "silver-ore", amount = 1, probability = 0.67 }, + { type = "item", name = "palladium-powder", amount = 1, probability = 0.33 }, + } + elseif util.me.platinum() and util.me.palladium() then + results = { + { type = "item", name = "copper-plate", amount = 1 }, + { type = "item", name = "platinum-powder", amount = 1, probability = 0.5 }, + { type = "item", name = "palladium-powder", amount = 1, probability = 0.5 }, + } + elseif util.me.platinum() then + results = { + { type = "item", name = "copper-plate", amount = 2, probability = 0.75 }, + { type = "item", name = "platinum-powder", amount = 1, probability = 0.5 }, + } + elseif util.me.palladium() then + results = { + { type = "item", name = "copper-plate", amount = 2, probability = 0.75 }, + { type = "item", name = "palladium-powder", amount = 1, probability = 0.5 }, + } + else + -- should never happen + results = { + { type = "item", name = "copper-plate", amount = 2 }, + } + end -data:extend({ - { - type = "resource", - name = "rich-copper-ore", - icon = "__bzgold2__/graphics/icons/rich-copper-ore.png", - icon_size = 64, icon_mipmaps = 4, - flags = {"placeable-neutral"}, - order="a-b-a", - map_color = {r=0.9, g=0.5, b=0.4}, - tree_removal_probability = 0.7, - tree_removal_max_distance = 32 * 32, - minable = - { - hardness = 1, - mining_particle = "copper-ore-particle", - mining_time = 1, - fluid_amount = 1, - required_fluid = "water", - result = "rich-copper-ore" - }, - collision_box = {{ -0.1, -0.1}, {0.1, 0.1}}, - selection_box = {{ -0.5, -0.5}, {0.5, 0.5}}, + if data.raw.resource["copper-ore"] then + if mods["space-exploration"] then + -- decrease richness of copper a bit (ok if it stacks with aluminum) + data.raw.resource["copper-ore"].autoplace.richness_expression = data.raw.resource["copper-ore"].autoplace.richness_expression .. "*(3/4)" + else + log("Replacing vanilla copper-ore autoplace") + local resource_autoplace = require('resource-autoplace'); + data.raw.resource["copper-ore"].autoplace = resource_autoplace.resource_autoplace_settings { + name = "copper-ore", + order = "b", + base_density = mods.bzaluminum2 and 3 or 4, + has_starting_area_placement = true, + regular_rq_factor_multiplier = 1.1, + starting_rq_factor_multiplier = 1.1, + candidate_spot_count = 22, + } + end + end - autoplace = resource_autoplace.resource_autoplace_settings{ - name = "rich-copper-ore", - autoplace_control_name = util.se6() and "rich-copper-ore" or "copper-ore", - order = "b-z", - base_density = 4, - base_spots_per_km2 = 1, - has_starting_area_placement = false, - regular_rq_factor_multiplier = 1, - starting_rq_factor_multiplier = 1, - }, - - stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80}, - stages = + if util.se6() then + data:extend({ { - sheet = - { + type = "autoplace-control", + category = "resource", + name = "rich-copper-ore", + richness = true, + order = "zzzzzzzzzzz" + }, + }) + end + + data:extend({ + { + type = "resource", + name = "rich-copper-ore", + icon = "__bzgold2__/graphics/icons/rich-copper-ore.png", + icon_size = 64, icon_mipmaps = 4, + flags = { "placeable-neutral" }, + order = "a-b-a", + map_color = { r = 0.9, g = 0.5, b = 0.4 }, + tree_removal_probability = 0.7, + tree_removal_max_distance = 32 * 32, + minable = { + hardness = 1, + mining_particle = "copper-ore-particle", + mining_time = 1, + fluid_amount = 1, + required_fluid = "water", + result = "rich-copper-ore" + }, + collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } }, + selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + + autoplace = resource_autoplace.resource_autoplace_settings { + name = "rich-copper-ore", + autoplace_control_name = util.se6() and "rich-copper-ore" or "copper-ore", + order = "b-z", + base_density = 4, + base_spots_per_km2 = 1, + has_starting_area_placement = false, + regular_rq_factor_multiplier = 1, + starting_rq_factor_multiplier = 1, + }, + + stage_counts = { 15000, 9500, 5500, 2900, 1300, 400, 150, 80 }, + stages = { + sheet = { filename = "__bzgold2__/graphics/entity/ores/hr-rich-copper-ore.png", priority = "extra-high", size = 128, @@ -159,57 +154,56 @@ data:extend({ variation_count = 8, scale = 0.5 } - }, - }, - { - type = "item", - name = "rich-copper-ore", - icon_size = 64, icon_mipmaps=4, - icon = "__bzgold2__/graphics/icons/rich-copper-ore.png", - pictures = { - {filename="__bzgold2__/graphics/icons/rich-copper-ore.png", size=64, scale=0.5}, - {filename="__bzgold2__/graphics/icons/rich-copper-ore-1.png", size=64, scale=0.5}, - {filename="__bzgold2__/graphics/icons/rich-copper-ore-2.png", size=64, scale=0.5}, - {filename="__bzgold2__/graphics/icons/rich-copper-ore-3.png", size=64, scale=0.5}, + }, }, - subgroup = "raw-resource", - order = "t-c-a", - stack_size = 50 - }, -}) + { + type = "item", + name = "rich-copper-ore", + icon_size = 64, icon_mipmaps = 4, + icon = "__bzgold2__/graphics/icons/rich-copper-ore.png", + pictures = { + { filename = "__bzgold2__/graphics/icons/rich-copper-ore.png", size = 64, scale = 0.5 }, + { filename = "__bzgold2__/graphics/icons/rich-copper-ore-1.png", size = 64, scale = 0.5 }, + { filename = "__bzgold2__/graphics/icons/rich-copper-ore-2.png", size = 64, scale = 0.5 }, + { filename = "__bzgold2__/graphics/icons/rich-copper-ore-3.png", size = 64, scale = 0.5 }, + }, + subgroup = "raw-resource", + order = "t-c-a", + stack_size = 50 + }, + }) + data:extend({ + { + type = "recipe", + name = "rich-copper", + localised_name = { "item-name.copper-plate" }, + category = "smelting", + main_product = "copper-plate", + order = "d[copper-plate]", + enabled = false, + icons = { + { icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, icon_mipmaps = 4 }, + { icon = "__bzgold2__/graphics/icons/rich-copper-ore.png", icon_size = 64, scale = 0.25, shift = { -8, 8 } }, + -- {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale=0.125, shift = {8,8}}, + -- {icon = "__bzgold__/graphics/icons/platinum-powder.png", icon_size = 64, scale=0.25, shift = {8,-8}}, + -- {icon = "__bzgold__/graphics/icons/palladium-powder.png", icon_size = 64, scale=0.25, shift = {-8,-8}}, + }, + energy_required = 6.4, + ingredients = { { type = "item", name = "rich-copper-ore", amount = 2 } }, + results = results, + }, + }) + util.add_unlock("platinum-processing", "rich-copper") + util.add_unlock("palladium-processing", "rich-copper") -data:extend({ - { - type = "recipe", - name = "rich-copper", - localised_name = {"item-name.copper-plate"}, - category = "smelting", - main_product = "copper-plate", - order = "d[copper-plate]", - enabled = false, - icons = { - {icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, icon_mipmaps=4}, - {icon = "__bzgold2__/graphics/icons/rich-copper-ore.png", icon_size = 64, scale=0.25, shift = {-8,8}}, - -- {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale=0.125, shift = {8,8}}, - -- {icon = "__bzgold__/graphics/icons/platinum-powder.png", icon_size = 64, scale=0.25, shift = {8,-8}}, - -- {icon = "__bzgold__/graphics/icons/palladium-powder.png", icon_size = 64, scale=0.25, shift = {-8,-8}}, - }, - energy_required = 6.4, - ingredients = {{type="item", name="rich-copper-ore", amount=2}}, - results = results, - }, -}) -util.add_unlock("platinum-processing", "rich-copper") -util.add_unlock("palladium-processing", "rich-copper") - -if util.se6() then - se_resources["rich-copper-ore"] = { - order = "b-z-c", - has_starting_area_placement = false, - base_density = 4, - base_spots_per_km2 = 1, - } -end -end + if util.se6() then + se_resources["rich-copper-ore"] = { + order = "b-z-c", + has_starting_area_placement = false, + base_density = 4, + base_spots_per_km2 = 1, + } + end + end end From ceb4dfe65769b54989e1c4f0551ba429030102c1 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 10 Dec 2025 19:29:59 +0100 Subject: [PATCH 8/9] Fix autoplace of rich-copper-ore --- bzgold2/prototypes/rich-copper.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bzgold2/prototypes/rich-copper.lua b/bzgold2/prototypes/rich-copper.lua index 4aae64d..8406cbf 100644 --- a/bzgold2/prototypes/rich-copper.lua +++ b/bzgold2/prototypes/rich-copper.lua @@ -100,6 +100,7 @@ if util.me.platinum() or util.me.palladium() then end if util.se6() then + data.raw.planet.nauvis.map_gen_settings.autoplace_controls["rich-copper-ore"] = {} data:extend({ { type = "autoplace-control", @@ -111,6 +112,9 @@ if util.me.platinum() or util.me.palladium() then }) end + data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["rich-copper-ore"] = {} + resource_autoplace.initialize_patch_set("rich-copper-ore", true) + data:extend({ { type = "resource", From 9df5d0fcc3a749234a9082a37a6b2d2f6074bb4a Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 10 Dec 2025 19:42:33 +0100 Subject: [PATCH 9/9] 2.0.3 --- bzgold2/changelog.txt | 7 +++++++ bzgold2/info.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bzgold2/changelog.txt b/bzgold2/changelog.txt index fcc1dd7..8287422 100644 --- a/bzgold2/changelog.txt +++ b/bzgold2/changelog.txt @@ -1,4 +1,11 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.3 +Date: 10.12.2025 + Bug Fixes: + - Fix tech coal-liquefaction has no prereq with catalysis off + - Fix recipe name of blank-tech-card-silver + - Fix autoplace of rich-copper-ore +--------------------------------------------------------------------------------------------------- Version: 2.0.2 Date: 01.11.2025 Bug Fixes: diff --git a/bzgold2/info.json b/bzgold2/info.json index a4698fd..c209a62 100644 --- a/bzgold2/info.json +++ b/bzgold2/info.json @@ -1,6 +1,6 @@ { "name": "bzgold2", - "version": "2.0.2", + "version": "2.0.3", "factorio_version": "2.0", "title": "Noble Metals", "description": "Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.",