Tenebris

by Big_J

Adds a new planet, tenebris, a dark planet enshrouded in a thick acidic atmosphere.

Content
3 days ago
2.0
1.79K
Factorio: Space Age Icon Space Age Mod
Enemies Environment Mining Fluids Manufacturing Power

g Fails to load

8 days ago

Wont load with error message:

Failed to load mods: Cannot serialise ttype=function

Mods to be disabled:
• tenebris (0.1.2)

8 days ago
(updated 8 days ago)

This is with only space age and this mod enabled

8 days ago

Getting this error as well, factorio version: 2.0.19

8 days ago

I'm not sure how to fix this - I'd avoid playing on experimental for now, if you want to use the mod.

8 days ago

Okay I can atm tell you that in data.lua if I comment out everything but: require("tenebris.prototypes.tile.tiles-tenebris") then it will give that error, so something in prototypes/tile/tiles-tenebris.lua is causing the isue

8 days ago
(updated 8 days ago)

Okay I have been messing around and playing around with that tiles-tenebris.lua, I got it to start, and work, its the collision-mask that seems to be at fault.

By changing the collision mask under the data:extend
from this ->
"
collision_mask = tile_collision_masks.shallow_water,
"
Into this ->
"
collision_mask = {
layers={
water_tile=true,
resource=true,
floor=true,
}
},
"

That collision mask is taken from tile_collision_masks at the shallow water, so it might be that it returns something else than a table that it expects

Works on latest 0.1.5 and 0.1.3, I have not tested any other versions

8 days ago

This is happening because you're trying to assign something to the result of a function, but forgot to add the '()' to actually call the function, so it's trying to store a reference to the function itself instead. From: https://forums.factorio.com/viewtopic.php?t=104679

8 days ago

and I can verify that just changing

"
collision_mask = tile_collision_masks.shallow_water,
"

into

"
collision_mask = tile_collision_masks.shallow_water(),
"

works as well

8 days ago

Seems that tile_collision_masks.shallow_water becomes a function in the experimental version.

8 days ago
(updated 8 days ago)

Yeah, was changed in 2.0.18 according to the changelog, so it seems that's most likely how they will keep it, thou to make it compatible with both versions you could fx do something like this ->

Create a function
"
local function get_shallow_water_collision_mask()
-- Check if tile_collision_masks.shallow_water is a function (2.0.18 and later)
if type(tile_collision_masks.shallow_water) == "function" then
return tile_collision_masks.shallow_water()
else
return tile_collision_masks.shallow_water
end
end
"

and then just under the collision_mask use that as ->
"
-- Assign collision mask based on the detected format
collision_mask = get_shallow_water_collision_mask()
"

New response