Outer Rim


Extends the gameplay on Aquilo, Paracelsin,Carna, Secretas and Frozeta. Creates more connections between the planets in this region, and adds a few new technologies to them.

Content
12 days ago
2.0 - 2.1
6.17K
Factorio: Space Age Icon Space Age Mod
Planets Transportation Logistics Trains Character Environment Mining Fluids Manufacturing Power

g Krastorio 2 compat file is disabled and contains two bugs (2.3.2)

12 days ago
(updated 12 days ago)

prototypes/compat/krastorio2.lua never runs. The only require for it is commented out at data-final-fixes.lua:2. If you uncomment that line, the file fails with two separate errors.

Reproduction: uncomment data-final-fixes.lua:2. The load fails at line 95. Apply the fallback shown below, and the load then fails at line 250.

Bug 1 — wrong prototype type for galvanization-science-pack

Line 95 reads the pack from data.raw.tool:

order = data.raw.tool["galvanization-science-pack"].order

Paracelsin declares that pack as type = "item" in prototypes/items.lua:223, not as a tool. The lookup returns nil.

outer-rim/prototype/compat/krastorio2.lua:95: attempt to index field 'galvanization-science-pack' (a nil value)

Line 103 does the same for golden-science-pack, and that line works, because secretas declares that pack as type = "tool". A fallback fixes line 95:

order = (data.raw.tool["galvanization-science-pack"] or data.raw.item["galvanization-science-pack"]).order

Bug 2 — undefined global spacecraft

Line 224 assigns to spacecraft.ingredients. The variable spacecraft never receives a value. A search of every .lua file in the mod finds no spacecraft = and no local spacecraft =.

outer-rim/prototype/compat/krastorio2.lua:250: attempt to index global 'spacecraft' (a nil value)

The sibling variables at lines 4, 26, 57, 176, and 177 use one pattern, so a line like this looks missing:

local spacecraft = data.raw.recipe["outer-rim-spacecraft-science-pack"]

I could not tell which recipe it should name. outer-rim-spacecraft-research-data at line 246 is the only outer-rim-spacecraft* string in the mod, and no file declares it as a prototype. The spacecraft tier appears to be absent from 2.3.2.

Line 224 sits at top level. Every user who runs Krastorio 2 reaches it.

Limit of this report

I never got past line 250. Lines 250 to 324 have not executed in my testing. I cannot say that the file works after you fix both bugs. Note that lines 318 to 321 read data.raw.recipe["nitric-acid-barrel"], data.raw.recipe["nitrogen-barrel"], and data.raw.tile["nitrogen-lake"] without a nil check. I did not confirm that those three resolve.

Why this affects other mods

Other mods treat the presence of outer-rim as proof that outer-rim supplies the Krastorio research data items. xy-k2so-enhancements-nulls-fork skips its own xy-golden-research-data and xy-galvanization-research-data when outer-rim is enabled. k2so-cubium-compatibility-fork then selects outer-rim-golden-research-data for a recipe. That item never exists, and the game fails to load:

Error in assignID: item with name 'outer-rim-golden-research-data' does not exist.
At ROOT.recipe.golden-science-pack-cubic.ingredients[1].name

This last error happens with an unmodified outer-rim. It needs no edit to reproduce.

Please either repair the compat file or remove it from the mod. The dead file leads other authors to assume that Krastorio 2 support is present.

Version: outer-rim 2.3.2, Factorio 2.1.14, Krastorio2 2.1.2, Krastorio2-spaced-out 2.0.15.

12 days ago

It being disabled is intentional, the patches for that are a work in progress because it needs more work.
That file was also just not removed, and was never tested.

The tests for that layer are here, marked as deprecated because it is not ready.
https://mods.factorio.com/mod/krastorio-planetary-fixes

12 days ago

ok, that's what I figured/was afraid of. Hopefully you get around to working on the compatibility soon-ish :)

12 days ago
(updated 12 days ago)

If you come to our discord (not an advertisement, genuinely makes it easier for me), then I'm responding to reports faster.
That mod has some of the changes that were in the compat, and the current last version was not crashing with maraxsis. Also does some generic fixes that pulled Muria and Corrundum to have baseline compatibility without explicit support.

New response