From ed790dc9144c2ac2d15ae11b1be95d4f4f3ff2f0 Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Thu, 19 Mar 2026 07:50:35 +0100 Subject: [PATCH 1/8] Upload files to "lignumis/prototypes/compatibility" --- lignumis/prototypes/compatibility/k2so.lua | 102 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/lignumis/prototypes/compatibility/k2so.lua b/lignumis/prototypes/compatibility/k2so.lua index 88637a9..ac1affb 100644 --- a/lignumis/prototypes/compatibility/k2so.lua +++ b/lignumis/prototypes/compatibility/k2so.lua @@ -2,6 +2,52 @@ local Technology = require("__cf-lib__/data/Technology") if not mods["Krastorio2-spaced-out"] then return end +local data_util = require("__Krastorio2-spaced-out__/data-util") + +data:extend({ + { + type = "tool", + name = "gold-tech-card", + localised_description = { "item-description.science-pack" }, + icon = Lignumis.graphics .. "technology/lig-gold-science-pack-tech.png", + icon_size = 128, + subgroup = "science-pack", + order = "b09[gold-tech-card]", + stack_size = 200, + weight = 1 * kg, + durability = 1, + durability_description_key = "description.science-pack-remaining-amount-key", + durability_description_value = "description.science-pack-remaining-amount-value", + default_import_location = "lignumis" + } +}) + +data_util.make_tech_card("gold-tech-card", { + { type = "item", name = "gold-plate", amount = 10 }, + { type = "item", name = "gold-cable", amount = 10 } +}) + +data:extend({ + { + type = "technology", + name = "gold-tech-card", + icon = Lignumis.graphics .. "technology/lig-gold-science-pack-tech.png", + icon_size = 128, + unit = { + time = 45, + count = 500, + ingredients = { + { "production-science-pack", 1 }, + { "utility-science-pack", 1 } + } + }, + prerequisites = { "gold-fluid-handling", "utility-science-pack" }, + effects = { + { type = "unlock-recipe", recipe = "gold-tech-card" } + } + } +}) + data.raw.recipe["burner-inserter"].ingredients = { { type = "item", name = "wooden-gear-wheel", amount = 1 }, { type = "item", name = "lumber", amount = 1 } @@ -41,4 +87,58 @@ if settings.startup["kr-realistic-weapons"].value then pistol_attack.ammo_category = nil table.insert(pistol_attack.ammo_categories, "bullet") data.raw.recipe["firearm-magazine"].enabled = false -end \ No newline at end of file +end + +if settings.startup["lignumis-technology-progression"].value + and settings.startup["lignumis-k2so-gold-tech-card"].value +then + for _, technology in pairs(data.raw.technology) do + if technology.unit + and technology.unit.ingredients + and not technology.lignumis_skip_science_packs + and not table.contains(Lignumis.science_blacklist, technology.name) + and not table.contains(Lignumis.science_pack_whitelist, technology.name) + then + local has_whitelisted_pack = false + local has_wood_pack = false + local has_steam_pack = false + + for _, ingredient in pairs(technology.unit.ingredients) do + local ingredient_name = ingredient[1] or ingredient.name + + if ingredient_name == "wood-science-pack" then + has_wood_pack = true + elseif ingredient_name == "steam-science-pack" then + has_steam_pack = true + elseif table.contains(Lignumis.science_pack_whitelist, ingredient_name) then + has_whitelisted_pack = true + end + end + + if has_whitelisted_pack and has_wood_pack and has_steam_pack then + local ingredients = {} + + for _, ingredient in pairs(technology.unit.ingredients) do + local ingredient_name = ingredient[1] or ingredient.name + + if ingredient_name ~= "wood-science-pack" and ingredient_name ~= "steam-science-pack" then + table.insert(ingredients, ingredient) + end + end + + table.insert(ingredients, { "gold-tech-card", 1 }) + technology.unit.ingredients = ingredients + + if technology.prerequisites and not table.contains(technology.prerequisites, "gold-tech-card") then + table.insert(technology.prerequisites, "gold-tech-card") + end + end + end + end + + for _, lab in pairs(data.raw.lab) do + if lab.inputs and not table.contains(Lignumis.lab_blacklist, lab.name) and not table.contains(lab.inputs, "gold-tech-card") then + table.insert(lab.inputs, "gold-tech-card") + end + end +end -- 2.39.5 From 9f81c1183867df56b6c80e624b28ae4dc7ebaf13 Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Thu, 19 Mar 2026 07:51:15 +0100 Subject: [PATCH 2/8] Upload files to "lignumis/locale/en" --- lignumis/locale/en/strings.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 347eb78..4f82ad9 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -86,6 +86,7 @@ basic-circuit-board=Basic circuit board crushed-gold-ore=Crushed gold ore steam-science-pack-spoiled=Science flask with water gold-module-3=Golden module +gold-tech-card=Gold tech card [item-description] wooden-wall=Use wooden walls to protect your base from the locals and to reduce noise levels. @@ -93,6 +94,7 @@ stone-wall=Better acoustic and physical protection than the wooden counterpart. gold-stromatolite-seed=Plant the seed to grow gold stromatolites. They house bacteria that enrich gold from the ground.\n__REMARK_COLOR_BEGIN__Expected yield:__REMARK_COLOR_END__ 1.5 [item=gold-ore]/m steam-science-pack-spoiled=Spoiled steam science pack. Put it in a furnace to bring it to the right temperature. gold-module-3=When you mastered quality assembling, this pristine module is unlocked, enabling you to craft the finest items available. +gold-tech-card=Advanced research data card based on Lignumis gold processing. produces-noise=Produces __1__ noise/m consumes-noise=Consumes __1__ noise/m @@ -155,6 +157,7 @@ basic-ore-crushing=Basic ore crushing astroponics-productivity=Astroponics productivity experienced-quality-assembling=Experienced quality assembling gold-module=Golden module +gold-tech-card=Gold tech card [technology-description] wood-science-pack=Allows research of basic technologies based on wood products. @@ -176,6 +179,7 @@ active-noise-cancelling=Helps handling noise. quality-assembler=High-end assembler to craft only the finest quality machines using a special resource only found on Lignumis. automation-science-pack=Leave Lignumis to enable advanced technology research. gold-module=Master quality assembling, to unlock a pristine module, enabling you to craft the finest items available. +gold-tech-card=Allows the creation of Gold Tech Cards, which will replace Steam and Wood Science from this point onwards. [modifier-description] basic-gun-turret-attack-bonus=Basic gun turret damage: +__1__ @@ -206,6 +210,7 @@ lignumis-infinite-astroponics-productivity-research=[color=green][font=heading-2 lignumis-electric-lumber-mill=[color=green][font=heading-2]Easy[/font][/color] Electric lumber mill lignumis-sciences-spoil=[color=red][font=heading-2]Hard[/font][/color] Lignumis science packs spoil lignumis-basic-circuit-board=[color=gray][font=heading-2]Deprecated (please enable)[/font] Enable basic circuit board[/color] +lignumis-k2so-gold-tech-card=[color=orange][font=heading-2]Overhaul[/font][/color] [item=gold-tech-card] Replace Steam and Wood Science with Gold Tech Cards (Krastorio 2) [mod-setting-description] lignumis-belt-progression=Yellow belts will require wood belts to craft. @@ -223,6 +228,7 @@ lignumis-double-rocket=The provisional rocket can carry 80 instead of 40 slots. lignumis-sciences-spoil=Both wood science packs and steam science packs spoil for additional difficulty. lignumis-infinite-astroponics-productivity-research=Productivity research for Astroponics is infinite instead of being capped to level 5 (which results in 50% productivity). lignumis-electric-lumber-mill=The lumber mill will consume electricity instead of burner fuel and will be unlocked after researching electricity. +lignumis-k2so-gold-tech-card=When Krastorio 2 Spaced Out is installed, late-game technologies that would require Wood and Steam Science Packs instead require Gold Tech Cards crafted from Lignumis gold. Requires progressive technologies to be enabled. [autoplace-control-names] lignumis_enemy_base=Lignumis enemy bases -- 2.39.5 From 856232ea768190aae7c25a63f52fac8a144afbb9 Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Thu, 19 Mar 2026 07:53:21 +0100 Subject: [PATCH 3/8] Upload files to "lignumis" --- lignumis/settings.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lignumis/settings.lua b/lignumis/settings.lua index 87f9608..f6ac689 100644 --- a/lignumis/settings.lua +++ b/lignumis/settings.lua @@ -136,6 +136,18 @@ if mods["astroponics"] then }) end +if mods["Krastorio2-spaced-out"] then + data:extend({ + { + type = "bool-setting", + name = "lignumis-k2so-gold-tech-card", + setting_type = "startup", + default_value = true, + order = "b[overhaul]-z[mods]-a" + } + }) +end + if mods["aai-industry"] then force("lignumis-inserter-progression", false) force("lignumis-assembler-progression", false) -- 2.39.5 From a88bbad116d380da96c9368793f1b67e9f4925dd Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Thu, 19 Mar 2026 08:27:41 +0100 Subject: [PATCH 4/8] Upload files to "lignumis/locale/en" --- lignumis/locale/en/strings.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 4f82ad9..7d81b84 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -86,6 +86,7 @@ basic-circuit-board=Basic circuit board crushed-gold-ore=Crushed gold ore steam-science-pack-spoiled=Science flask with water gold-module-3=Golden module +gold-research-data=Gold research data gold-tech-card=Gold tech card [item-description] @@ -118,6 +119,7 @@ active-noise-cancelling=Active noise cancelling casting-gold=Casting gold gold-ore-crushing=Gold ore crushing processing-unit-gold=Processing unit (gold) +gold-research-data=Gold research data burner-lamp-burning=Generating light refresh-steam-science-pack=Refresh steam science pack @@ -125,6 +127,7 @@ refresh-steam-science-pack=Refresh steam science pack moist-stromatolite-remnant-desiccation-without-steam=Used for balancing the production of steam. gold-stromatolite-seed-to-peat=Used for voiding excess gold stromatolite seeds. refresh-steam-science-pack=Heats a science flask with water to the right temperature to be used as steam science pack. +gold-research-data=Refines Lignumis gold into research data. Can only be produced on Lignumis. electronic-circuit-iron=Inefficient alternative recipe that doesn't require wood ingredients. [technology-name] -- 2.39.5 From f0dd72601844e73ab59f3f8535d9459c11830688 Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Thu, 19 Mar 2026 08:28:03 +0100 Subject: [PATCH 5/8] Upload files to "lignumis/prototypes/compatibility" --- lignumis/prototypes/compatibility/k2so.lua | 99 ++++++++++++++++++++-- 1 file changed, 92 insertions(+), 7 deletions(-) diff --git a/lignumis/prototypes/compatibility/k2so.lua b/lignumis/prototypes/compatibility/k2so.lua index ac1affb..7dc2b2b 100644 --- a/lignumis/prototypes/compatibility/k2so.lua +++ b/lignumis/prototypes/compatibility/k2so.lua @@ -5,12 +5,23 @@ if not mods["Krastorio2-spaced-out"] then return end local data_util = require("__Krastorio2-spaced-out__/data-util") data:extend({ + { + type = "item", + name = "gold-research-data", + icon = Lignumis.graphics .. "icons/gold-research-data.png", + icon_size = 64, + subgroup = "science-pack", + order = "a09[gold-research-data]", + stack_size = 200, + weight = 1 * kg, + default_import_location = "lignumis" + }, { type = "tool", name = "gold-tech-card", localised_description = { "item-description.science-pack" }, - icon = Lignumis.graphics .. "technology/lig-gold-science-pack-tech.png", - icon_size = 128, + icon = Lignumis.graphics .. "icons/gold-tech-card.png", + icon_size = 64, subgroup = "science-pack", order = "b09[gold-tech-card]", stack_size = 200, @@ -18,13 +29,53 @@ data:extend({ durability = 1, durability_description_key = "description.science-pack-remaining-amount-key", durability_description_value = "description.science-pack-remaining-amount-value", + pictures = { + layers = { + { + filename = Lignumis.graphics .. "icons/gold-tech-card.png", + size = 64, + scale = 0.5 + }, + { + filename = Lignumis.graphics .. "icons/gold-tech-card-light.png", + size = 64, + scale = 0.5, + draw_as_light = true + } + } + }, default_import_location = "lignumis" } }) data_util.make_tech_card("gold-tech-card", { - { type = "item", name = "gold-plate", amount = 10 }, - { type = "item", name = "gold-cable", amount = 10 } + { type = "item", name = "gold-research-data", amount = 5 } +}) + +data:extend({ + { + type = "recipe", + name = "gold-research-data", + category = "crafting", + enabled = false, + energy_required = 20, + ingredients = { + { type = "item", name = "gold-plate", amount = 10 }, + { type = "item", name = "gold-cable", amount = 10 } + }, + results = { + { type = "item", name = "gold-research-data", amount = 5 } + }, + surface_conditions = { + { + property = "pollutant-type", + min = 3, + max = 3 + } + }, + allow_productivity = true, + main_product = "gold-research-data" + } }) data:extend({ @@ -37,12 +88,13 @@ data:extend({ time = 45, count = 500, ingredients = { - { "production-science-pack", 1 }, - { "utility-science-pack", 1 } + { "wood-science-pack", 1 }, + { "steam-science-pack", 1 } } }, - prerequisites = { "gold-fluid-handling", "utility-science-pack" }, + prerequisites = { "gold-fluid-handling", "kr-advanced-lab" }, effects = { + { type = "unlock-recipe", recipe = "gold-research-data" }, { type = "unlock-recipe", recipe = "gold-tech-card" } } } @@ -141,4 +193,37 @@ then table.insert(lab.inputs, "gold-tech-card") end end + + local utility_science = data.raw.technology["utility-science-pack"] + if utility_science and utility_science.unit and utility_science.unit.ingredients then + local ingredients = {} + + for _, ingredient in pairs(utility_science.unit.ingredients) do + local ingredient_name = ingredient[1] or ingredient.name + + if ingredient_name ~= "wood-science-pack" and ingredient_name ~= "steam-science-pack" then + table.insert(ingredients, ingredient) + end + end + + local has_gold_card = false + for _, ingredient in pairs(ingredients) do + local ingredient_name = ingredient[1] or ingredient.name + if ingredient_name == "gold-tech-card" then + has_gold_card = true + break + end + end + + if not has_gold_card then + table.insert(ingredients, { "gold-tech-card", 1 }) + end + + utility_science.unit.ingredients = ingredients + + utility_science.prerequisites = utility_science.prerequisites or {} + if not table.contains(utility_science.prerequisites, "gold-tech-card") then + table.insert(utility_science.prerequisites, "gold-tech-card") + end + end end -- 2.39.5 From a100862e87a238ee1dde6f8effc82af1dd339ffa Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Sun, 22 Mar 2026 06:36:43 +0100 Subject: [PATCH 7/8] Update lignumis/prototypes/compatibility/k2so.lua Some refactoring. Decided to remove the technology entirely and have it be unlocked with Advanced Labs. Needed to directly fix Production Science research as well, since it was erroneously still requiring Steam and Wood. Once Optimization Science shows up, Steam/Wood should already be replaced with Gold Tech Cards. --- lignumis/prototypes/compatibility/k2so.lua | 159 +++++++++------------ 1 file changed, 64 insertions(+), 95 deletions(-) diff --git a/lignumis/prototypes/compatibility/k2so.lua b/lignumis/prototypes/compatibility/k2so.lua index 7dc2b2b..8067db5 100644 --- a/lignumis/prototypes/compatibility/k2so.lua +++ b/lignumis/prototypes/compatibility/k2so.lua @@ -78,27 +78,9 @@ data:extend({ } }) -data:extend({ - { - type = "technology", - name = "gold-tech-card", - icon = Lignumis.graphics .. "technology/lig-gold-science-pack-tech.png", - icon_size = 128, - unit = { - time = 45, - count = 500, - ingredients = { - { "wood-science-pack", 1 }, - { "steam-science-pack", 1 } - } - }, - prerequisites = { "gold-fluid-handling", "kr-advanced-lab" }, - effects = { - { type = "unlock-recipe", recipe = "gold-research-data" }, - { type = "unlock-recipe", recipe = "gold-tech-card" } - } - } -}) +Technology:new("kr-advanced-lab") + :addRecipe("gold-research-data") + :addRecipe("gold-tech-card") data.raw.recipe["burner-inserter"].ingredients = { { type = "item", name = "wooden-gear-wheel", amount = 1 }, @@ -141,89 +123,76 @@ if settings.startup["kr-realistic-weapons"].value then data.raw.recipe["firearm-magazine"].enabled = false end -if settings.startup["lignumis-technology-progression"].value - and settings.startup["lignumis-k2so-gold-tech-card"].value -then - for _, technology in pairs(data.raw.technology) do - if technology.unit - and technology.unit.ingredients - and not technology.lignumis_skip_science_packs - and not table.contains(Lignumis.science_blacklist, technology.name) - and not table.contains(Lignumis.science_pack_whitelist, technology.name) - then - local has_whitelisted_pack = false - local has_wood_pack = false - local has_steam_pack = false +if not (settings.startup["lignumis-technology-progression"].value and + settings.startup["lignumis-k2so-gold-tech-card"].value) then + return +end - for _, ingredient in pairs(technology.unit.ingredients) do - local ingredient_name = ingredient[1] or ingredient.name +local function upgrade_to_gold_card(tech) + if not (tech and tech.unit and tech.unit.ingredients) then return end - if ingredient_name == "wood-science-pack" then - has_wood_pack = true - elseif ingredient_name == "steam-science-pack" then - has_steam_pack = true - elseif table.contains(Lignumis.science_pack_whitelist, ingredient_name) then - has_whitelisted_pack = true - end - end + local new_ingredients = {} + local changed = false - if has_whitelisted_pack and has_wood_pack and has_steam_pack then - local ingredients = {} - - for _, ingredient in pairs(technology.unit.ingredients) do - local ingredient_name = ingredient[1] or ingredient.name - - if ingredient_name ~= "wood-science-pack" and ingredient_name ~= "steam-science-pack" then - table.insert(ingredients, ingredient) - end - end - - table.insert(ingredients, { "gold-tech-card", 1 }) - technology.unit.ingredients = ingredients - - if technology.prerequisites and not table.contains(technology.prerequisites, "gold-tech-card") then - table.insert(technology.prerequisites, "gold-tech-card") - end - end + for _, ing in pairs(tech.unit.ingredients) do + local name = ing[1] or ing.name + if name == "wood-science-pack" or name == "steam-science-pack" then + changed = true + else + table.insert(new_ingredients, ing) end end - for _, lab in pairs(data.raw.lab) do - if lab.inputs and not table.contains(Lignumis.lab_blacklist, lab.name) and not table.contains(lab.inputs, "gold-tech-card") then - table.insert(lab.inputs, "gold-tech-card") - end + local has_gold = false + for _, ing in pairs(new_ingredients) do + if (ing[1] or ing.name) == "gold-tech-card" then has_gold = true break end end - local utility_science = data.raw.technology["utility-science-pack"] - if utility_science and utility_science.unit and utility_science.unit.ingredients then - local ingredients = {} + if not has_gold then + table.insert(new_ingredients, {"gold-tech-card", 1}) + changed = true + end - for _, ingredient in pairs(utility_science.unit.ingredients) do - local ingredient_name = ingredient[1] or ingredient.name - - if ingredient_name ~= "wood-science-pack" and ingredient_name ~= "steam-science-pack" then - table.insert(ingredients, ingredient) - end - end - - local has_gold_card = false - for _, ingredient in pairs(ingredients) do - local ingredient_name = ingredient[1] or ingredient.name - if ingredient_name == "gold-tech-card" then - has_gold_card = true - break - end - end - - if not has_gold_card then - table.insert(ingredients, { "gold-tech-card", 1 }) - end - - utility_science.unit.ingredients = ingredients - - utility_science.prerequisites = utility_science.prerequisites or {} - if not table.contains(utility_science.prerequisites, "gold-tech-card") then - table.insert(utility_science.prerequisites, "gold-tech-card") + if changed then + tech.unit.ingredients = new_ingredients + tech.prerequisites = tech.prerequisites or {} + if not table.contains(tech.prerequisites, "kr-advanced-lab") then + table.insert(tech.prerequisites, "kr-advanced-lab") end end end + +for name, tech in pairs(data.raw.technology) do + if tech.unit and tech.unit.ingredients + and not tech.lignumis_skip_science_packs + and not table.contains(Lignumis.science_blacklist, name) + and not table.contains(Lignumis.science_pack_whitelist, name) then + + local has_wood = false + local has_steam = false + local has_white = false + for _, ing in pairs(tech.unit.ingredients) do + local n = ing[1] or ing.name + if n == "wood-science-pack" then has_wood = true + elseif n == "steam-science-pack" then has_steam = true + elseif table.contains(Lignumis.science_pack_whitelist, n) then has_white = true end + end + + if has_wood and has_steam and has_white then + upgrade_to_gold_card(tech) + end + end +end + +-- Special Cases needing fixing +upgrade_to_gold_card(data.raw.technology["production-science-pack"]) +upgrade_to_gold_card(data.raw.technology["utility-science-pack"]) + +-- Make sure gold tech card is in the labs, same code as in vanilla-updates.lua +for _, lab in pairs(data.raw.lab) do + if lab.inputs and not table.contains(Lignumis.lab_blacklist, lab.name) then + if not table.contains(lab.inputs, "gold-tech-card") then + table.insert(lab.inputs, "gold-tech-card") + end + end +end \ No newline at end of file -- 2.39.5 From f21804f5272b11dd59d5b2b6dc206071333768c0 Mon Sep 17 00:00:00 2001 From: Jiopaba Date: Sun, 22 Mar 2026 06:38:58 +0100 Subject: [PATCH 8/8] Update lignumis/locale/en/strings.cfg --- lignumis/locale/en/strings.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 7d81b84..91a2930 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -160,7 +160,6 @@ basic-ore-crushing=Basic ore crushing astroponics-productivity=Astroponics productivity experienced-quality-assembling=Experienced quality assembling gold-module=Golden module -gold-tech-card=Gold tech card [technology-description] wood-science-pack=Allows research of basic technologies based on wood products. @@ -182,7 +181,6 @@ active-noise-cancelling=Helps handling noise. quality-assembler=High-end assembler to craft only the finest quality machines using a special resource only found on Lignumis. automation-science-pack=Leave Lignumis to enable advanced technology research. gold-module=Master quality assembling, to unlock a pristine module, enabling you to craft the finest items available. -gold-tech-card=Allows the creation of Gold Tech Cards, which will replace Steam and Wood Science from this point onwards. [modifier-description] basic-gun-turret-attack-bonus=Basic gun turret damage: +__1__ -- 2.39.5