Versions: Cerys 4.24.4, Krastorio2 2.1.2, Krastorio2-spaced-out 2.0.13, Factorio 2.1.9 (Space Age).
Symptom: With K2SO installed, chemical plants running K2 recipes that consume nitric acid (e.g. kr-imersite-crystal) show a permanent "Fluid ingredient shortage" even with full nitric acid pipes connected. The acid in the pipes sits at ~15°C, while the recipe ingredient requires 25–100°C, so the machine refuses it.
Cause: common-data-only.lua sets NITRIC_ACID_NAME = K2_INSTALLED and "kr-nitric-acid" or "nitric-acid", and prototypes/fluid.lua then does a data:extend of a fluid under that name with default_temperature = 15 and none of K2's other fields. Since Cerys lists ? Krastorio2-spaced-out as a dependency, it loads after K2 and this replaces K2's own kr-nitric-acid definition (default_temperature = 25, gas_temperature = 25, max_temperature = 100, auto_barrel = true, K2 icon/colors). Result: all nitric acid produced at default temperature comes out at 15°C below the floor K2 recipes expect — and the fluid's tooltip/icon/colors also lose K2's data.
(The recipe redirection in compat/krastorio-2-data-updates.lua pointing cerys-nitric-acid at kr-nitric-acid works fine; it's only the fluid prototype overwrite that conflicts.)
Suggested fix: in prototypes/fluid.lua, when K2_INSTALLED, skip extending the nitric acid fluid entirely K2 already defines it, and the compat file's recipe redirection is enough. If the 15°C default is wanted for the standalone (non-K2) fluid, keep it only for the "nitric-acid" name. If cold acid is a deliberate Cerys flavor, an explicit temperature on the Cerys recipe outputs within K2's 25–100 range would keep both mods happy.
EDIT:
Found the exact fix: in prototypes/fluid.lua, the nitric acid entry should only be extended when not common_data.K2_INSTALLED. With K2 present, NITRIC_ACID_NAME resolves to kr-nitric-acid, which K2 already defines (default 25°C, max 100°C) — the data:extend replaces K2's definition with the 2-field 15°C one, and K2 recipes then reject all Cerys-produced acid. The recipe redirection in compat/krastorio-2-data-updates.lua is already correct and needs no change; with K2's fluid left intact its outputs arrive at 25°C automatically. Existing saves self-heal (the engine clamps stored fluid temps to the prototype range on load). Verified: restoring K2's fluid table with no other change makes imersite crystal plants work again.
prototypes/fluid.lua
if not common_data.K2_INSTALLED then
data:extend({
{
type = "fluid",
name = "nitric-acid",
subgroup = "fluid",
default_temperature = 15,
base_color = { 0.384, 0.271, 0.792 },
flow_color = { 0.384, 1, 0.792 },
icon = "Cerys-Moon-of-Fulgora/graphics/icons/nitric-acid.png",
icon_size = 64,
icon_mipmaps = 4,
order = "a[fluid]-b[oil]-f[sulfuric-acid]-b[nitric-acid]",
},
})
end
Happy to test a fix. Thanks for Cerys fantastic mod.