Compare commits

..

7 commits

Author SHA1 Message Date
Simon Brodtmann
4590fa6b98 Fix hand craft only recipe name 2025-11-05 17:24:33 +01:00
Simon Brodtmann
8044c9d846 2.0.3 2025-11-05 10:12:25 +01:00
Simon Brodtmann
46e9a0ce4e Fix early game technologies with AAI Industry 2025-11-05 09:44:29 +01:00
Simon Brodtmann
6c0876d0c8 Fix early game technologies with Krastorio 2025-11-05 00:22:10 +01:00
Simon Brodtmann
1b5895b421 Fix hand craft only recipe name 2025-11-04 23:55:58 +01:00
Simon Brodtmann
c3c414f36a Fix early game technologies with bzfoundry 2025-11-04 23:34:11 +01:00
Simon Brodtmann
3ba05c70c2 Fix early game technologies with only bzgas 2025-11-04 23:17:13 +01:00
12 changed files with 76 additions and 49 deletions

View file

@ -1,4 +1,9 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 2.0.3
Date: 05.11.2025
Bug Fixes:
- Fix early game progression
---------------------------------------------------------------------------------------------------
Version: 2.0.2 Version: 2.0.2
Date: 22.10.2025 Date: 22.10.2025
Bug Fixes: Bug Fixes:

View file

@ -18,7 +18,7 @@ util.add_ingredient("electronic-circuit", "bakelite", amt)
util.set_icons("electronic-circuit", nil) util.set_icons("electronic-circuit", nil)
if util.me.handcraft() then if util.me.handcraft() and not mods["aai-industry"] then
data:extend({{ type = "recipe-category", name = "handcraft-only" }}) data:extend({{ type = "recipe-category", name = "handcraft-only" }})
for i, character in pairs(data.raw.character) do for i, character in pairs(data.raw.character) do
if character and character.crafting_categories then if character and character.crafting_categories then
@ -27,6 +27,7 @@ if util.me.handcraft() then
end end
local hcec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"]) local hcec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"])
hcec.name = "electronic-circuit-handcraft-only" hcec.name = "electronic-circuit-handcraft-only"
hcec.localised_name = { "item-name.electronic-circuit" }
data:extend({hcec}) data:extend({hcec})
util.set_icons("electronic-circuit-handcraft-only", util.set_icons("electronic-circuit-handcraft-only",
{ {

View file

@ -2,19 +2,23 @@ require("stacking")
require("modules") require("modules")
require("compatibility/ir2") require("compatibility/ir2")
local util = require("__bzgas2__/data-util") local util = require("data-util");
-- core mining balancing -- core mining balancing
util.set_product_amount("se-core-fragment-omni", "gas", 24) util.set_product_amount("se-core-fragment-omni", "gas", 24)
-- Fix basic chemical plant fuels for K2 -- Fix basic chemical plant fuels for K2
if mods.Krastorio2 and if mods.Krastorio2 and
data.raw["assembling-machine"]["basic-chemical-plant"] and data.raw["assembling-machine"]["basic-chemical-plant"] and
data.raw["assembling-machine"]["basic-chemical-plant"].energy_source and data.raw["assembling-machine"]["basic-chemical-plant"].energy_source and
data.raw["assembling-machine"]["basic-chemical-plant"].energy_source.fuel_categories then data.raw["assembling-machine"]["basic-chemical-plant"].energy_source.fuel_categories then
table.insert(data.raw["assembling-machine"]["basic-chemical-plant"].energy_source.fuel_categories , "kr-vehicle-fuel") table.insert(data.raw["assembling-machine"]["basic-chemical-plant"].energy_source.fuel_categories , "kr-vehicle-fuel")
end end
if mods["aai-industry"] and not mods["Krastorio2"] then
util.remove_prerequisite("basic-chemistry", "basic-fluid-handling")
end
-- Vanilla burner phase tweaks -- green circuits after electronics -- Vanilla burner phase tweaks -- green circuits after electronics
-- Electronic circuit recipe set below in compatibility script -- Electronic circuit recipe set below in compatibility script
if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum2 and not mods["bzcarbon2"] then if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum2 and not mods["bzcarbon2"] then
@ -30,22 +34,31 @@ if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum2 and
util.add_ingredient("repair-pack", "copper-cable", 6) util.add_ingredient("repair-pack", "copper-cable", 6)
util.set_ingredient("repair-pack", "iron-gear-wheel", 3) util.set_ingredient("repair-pack", "iron-gear-wheel", 3)
-- New for 2.0 (Evilpla)
util.remove_prerequisite("automation", "automation-science-pack")
util.set_tech_trigger("automation", { type = "mine-entity", entity = "coal" })
util.set_tech_trigger("gas-extraction", { type = "craft-item", item = "copper-plate" })
util.set_tech_trigger("basic-chemistry", { type = "mine-entity", entity = "gas" })
util.set_tech_trigger("bakelite", { type = "craft-fluid", fluid = "formaldehyde" })
util.set_tech_trigger("electronics", { type = "craft-item", item = "bakelite" })
util.add_effect("electronics", { type = "unlock-recipe", recipe = "long-handed-inserter" }) util.add_effect("electronics", { type = "unlock-recipe", recipe = "long-handed-inserter" })
util.remove_recipe_effect("electronics", "copper-cable")
util.remove_recipe_effect("electronics", "lab")
util.remove_recipe_effect("electronics", "small-electric-pole")
util.remove_recipe_effect("automation", "long-handed-inserter") util.remove_recipe_effect("automation", "long-handed-inserter")
util.set_enabled("electronic-circuit", false)
util.set_enabled("inserter", false)
util.set_enabled("copper-cable", true)
util.set_enabled("lab", true)
util.set_enabled("small-electric-pole", true)
util.remove_prerequisite("automation-science-pack", "electronics")
local electronics = data.raw.technology["electronics"]
electronics.research_trigger = nil
electronics.unit = {
count = 10,
time = 10,
ingredients = {{ "automation-science-pack", 1 }}
}
util.remove_prerequisite("fast-inserter", "automation-science-pack")
util.remove_prerequisite("lamp", "automation-science-pack")
util.remove_prerequisite("logistic-science-pack", "automation-science-pack")
util.add_prerequisite("fast-inserter", "electronics")
util.add_prerequisite("lamp", "electronics")
util.add_prerequisite("logistic-science-pack", "electronics")
-- TODO: cleanup
-- util.add_unlock_force("electronics", "electronic-circuit")
-- util.add_effect("electronics", { type = "unlock-recipe", recipe = "inserter" })
-- util.set_enabled("electronic-circuit", false)
-- util.set_enabled("inserter", false)
-- util.add_prerequisite("logistic-science-pack", "electronics")
end end
if not mods.bzaluminum2 and not mods["bzcarbon2"] then if not mods.bzaluminum2 and not mods["bzcarbon2"] then
util.replace_ingredients_prior_to("electronics", "electronic-circuit", "copper-cable", 2) util.replace_ingredients_prior_to("electronics", "electronic-circuit", "copper-cable", 2)

View file

@ -1267,13 +1267,4 @@ function util.set_vtk_dcm_ingredients()
end end
end end
-- Set technology trigger
function util.set_tech_trigger(technology_name, trigger)
local technology = data.raw.technology[technology_name]
if technology then
technology.unit = nil
technology.research_trigger = trigger
end
end
return util return util

View file

@ -1,7 +1,7 @@
require("prototypes/gas") require("prototypes/gas")
require("prototypes/gas-extractor") require("prototypes/gas-extractor")
require("prototypes/formaldehyde")
require("prototypes/phenol") require("prototypes/phenol")
require("prototypes/formaldehyde")
require("prototypes/bakelite") require("prototypes/bakelite")
require("prototypes/basic-chemical-plant") require("prototypes/basic-chemical-plant")
require("prototypes/k2-recipe") require("prototypes/k2-recipe")

View file

@ -1,6 +1,6 @@
{ {
"name": "bzgas2", "name": "bzgas2",
"version": "2.0.2", "version": "2.0.3",
"factorio_version": "2.0", "factorio_version": "2.0",
"title": "Natural Gas", "title": "Natural Gas",
"description": "Adds a natural gas resource, along with early game plastic.", "description": "Adds a natural gas resource, along with early game plastic.",

View file

@ -17,10 +17,9 @@ data:extend(
{ {
icon = "__bzgas2__/graphics/icons/gas.png", icon = "__bzgas2__/graphics/icons/gas.png",
icon_size = 128, icon_size = 128,
scale = 0.7, scale = 1.4,
} }
}, },
effects ={},
prerequisites = {"kr-matter-processing"}, prerequisites = {"kr-matter-processing"},
unit = unit =
{ {
@ -41,8 +40,8 @@ local gas_ore_matter =
material = { type = "fluid", name = "gas", amount = 100 }, material = { type = "fluid", name = "gas", amount = 100 },
matter_count = 5, matter_count = 5,
energy_required = 1, energy_required = 1,
needs_stabilizer = false, need_stabilizer = false,
unlocked_by = "gas-matter-processing" unlocked_by_technology = "gas-matter-processing"
} }
matter.make_recipes(gas_ore_matter) matter.make_recipes(gas_ore_matter)
end end

View file

@ -1,5 +1,14 @@
local util = require("data-util"); local util = require("data-util");
local prereq = {"basic-chemistry"}
if mods["Krastorio2"] then
table.insert(prereq, "steel-processing")
elseif mods["bzfoundry2"] then
table.insert(prereq, "foundry")
elseif mods["aai-industry"] then
table.insert(prereq, "automation")
end
data:extend({ data:extend({
{ {
type = "item", type = "item",
@ -15,7 +24,6 @@ data:extend({
name = "bakelite", name = "bakelite",
category = "chemistry", category = "chemistry",
main_product = "bakelite", main_product = "bakelite",
allow_productivity = true,
enabled = false, enabled = false,
ingredients = { ingredients = {
{type = "item", name = util.me.use_phenol() and "phenol" or "coal", amount = 1}, {type = "item", name = util.me.use_phenol() and "phenol" or "coal", amount = 1},
@ -31,7 +39,7 @@ data:extend({
name = "bakelite", name = "bakelite",
icon = "__bzgas2__/graphics/technology/bakelite.png", icon = "__bzgas2__/graphics/technology/bakelite.png",
icon_size = 256, icon_size = 256,
prerequisites = {"basic-chemistry"}, prerequisites = prereq,
effects = { effects = {
{type = "unlock-recipe", recipe = "bakelite"}, {type = "unlock-recipe", recipe = "bakelite"},
}, },

View file

@ -1,4 +1,4 @@
local util = require("data-util") local util = require("data-util");
-- data:extend({ -- data:extend({
-- { -- {
@ -7,11 +7,15 @@ local util = require("data-util")
-- } -- }
-- }) -- })
local prereq = {"gas-extraction"}
if mods["Krastorio2"] then
table.insert(prereq, "automation-science-pack")
end
data:extend({ data:extend({
{ {
type = "fluid", type = "fluid",
name = "formaldehyde", name = "formaldehyde",
subgroup = "fluid",
default_temperature = 25, default_temperature = 25,
heat_capacity = "0.1kJ", heat_capacity = "0.1kJ",
fuel_value = "0.5kJ", fuel_value = "0.5kJ",
@ -41,7 +45,7 @@ data:extend({
name = "basic-chemistry", name = "basic-chemistry",
icon = "__bzgas2__/graphics/technology/formaldehyde.png", icon = "__bzgas2__/graphics/technology/formaldehyde.png",
icon_size = 256, icon_size = 256,
prerequisites = {"gas-extraction"}, prerequisites = prereq,
effects = { effects = {
{type = "unlock-recipe", recipe = "basic-chemical-plant"}, {type = "unlock-recipe", recipe = "basic-chemical-plant"},
{type = "unlock-recipe", recipe = "formaldehyde"}, {type = "unlock-recipe", recipe = "formaldehyde"},

View file

@ -1,4 +1,4 @@
local util = require("data-util") local util = require("data-util");
local futil = require("util") local futil = require("util")
local ge_ingredients = { local ge_ingredients = {
@ -13,7 +13,10 @@ if mods.Krastorio2 then
ge_prereq = {"kr-stone-processing"} ge_prereq = {"kr-stone-processing"}
elseif mods["aai-industry"] then elseif mods["aai-industry"] then
table.insert(ge_ingredients, {type="item", name="sand", amount=10}) table.insert(ge_ingredients, {type="item", name="sand", amount=10})
ge_prereq = {"sand-processing"} ge_prereq = {"sand-processing", "basic-fluid-handling"}
elseif data.raw.item["silica"] and data.raw.technology["silica-processing"] then
table.insert(ge_ingredients, {type="item", name="silica", amount=20})
ge_prereq = {"silica-processing"}
end end
drilling_rig_circuit_connector_definitions = circuit_connector_definitions.create_vector drilling_rig_circuit_connector_definitions = circuit_connector_definitions.create_vector
@ -43,7 +46,7 @@ data:extend({
type = "recipe", type = "recipe",
name = "gas-extractor", name = "gas-extractor",
results = {{ type = "item", name = "gas-extractor", amount = 1}}, results = {{ type = "item", name = "gas-extractor", amount = 1}},
enabled = false, enabled = false, -- TODO change
ingredients = ge_ingredients, ingredients = ge_ingredients,
}, },
{ {
@ -84,12 +87,11 @@ data:extend({
}, },
output_fluid_box = output_fluid_box =
{ {
volume = 100, volume = 1000,
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
pipe_connections = pipe_connections =
{ {
{ {
flow_direction = "output",
direction = defines.direction.north, direction = defines.direction.north,
positions = { {0, -1}, {1, 0}, {0, 1}, {-1, 0} } positions = { {0, -1}, {1, 0}, {0, 1}, {-1, 0} }
} }

View file

@ -1,6 +1,6 @@
local resource_autoplace = require('resource-autoplace') local resource_autoplace = require('resource-autoplace');
local util = require("data-util") local util = require("data-util");
local futil = require("util") local futil = require("util")
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["gas"] = {} data.raw.planet.nauvis.map_gen_settings.autoplace_controls["gas"] = {}
@ -104,7 +104,6 @@ data:extend({
{ {
type = "fluid", type = "fluid",
name = "gas", name = "gas",
subgroup = "fluid",
default_temperature = 25, default_temperature = 25,
heat_capacity = "0.1kJ", heat_capacity = "0.1kJ",
fuel_value = "1000kJ", fuel_value = "1000kJ",

View file

@ -1,4 +1,4 @@
local util = require("data-util") local util = require("data-util");
if util.me.use_phenol() then if util.me.use_phenol() then
@ -66,8 +66,13 @@ if data.raw.item[mods["Krastorio2"] and "kr-coke" or "coke"] then
} }
}) })
end end
if mods.Krastorio2 then
util.add_effect("basic-chemistry", {type="unlock-recipe", recipe="phenol"}) util.add_effect("steel-processing", {type="unlock-recipe", recipe="phenol"})
elseif data.raw.item["foundry"] then
util.add_effect("foundry", {type="unlock-recipe", recipe="phenol"})
else
util.add_effect("basic-chemistry", {type="unlock-recipe", recipe="phenol"})
end
if mods.Krastorio2 then if mods.Krastorio2 then
light_oil_icon = { icon = "__Krastorio2Assets__/icons/fluids/light-oil.png", icon_size = 64, icon_mipmaps = 4, scale=0.25, shift={-8,-8}} light_oil_icon = { icon = "__Krastorio2Assets__/icons/fluids/light-oil.png", icon_size = 64, icon_mipmaps = 4, scale=0.25, shift={-8,-8}}