Water As A Resource


Turns Water into a non infinite resource. Water bodies get removed and replaced by solid ground. Offshore Drains allow water & oil to be put back into these depleted areas. 0.8.0 - 1.1 Factorio Compatibility, Multiplayer Multiple Forces Update, Krastorio2 Support, Reworked MapMarkers

9 months ago
0.16 - 1.1
1.96K

b fatal error

2 years ago

Hello. Playing with mods: Krastorio2, Mining-Space-Industries-II, space-exploration, aai-industry, Bio_Industries, and several small mods that do not change the balance of the game and do not affect liquids.
I tried to connect the mod to an existing game and got an error.

The Water As A Resource mod (0.8.6) caused a fatal error.
Please report this bug to the mod author.

Error while running event WaterAsAResource::on_nth_tick(6)
WaterAsAResource/control.lua:1690: attempt to index field '?' (a nil value)
stack trace:
WaterAsAResource/control.lua:1690: in function 'ScanOffshores'
WaterAsAResource/control.lua:1827: in function <WaterAsAResource/control.lua:1823>

2 years ago

Hello GuardTower,

So it's failing at the point of scanning for pumpjacks to track oil production, so i wonder if those mods change the name or mess with pumpjacks in someway, I've played with some of those mods, ill have to check.

Able to provide the save, so I can come up with a fix?

2 years ago
(updated 2 years ago)

Hello,

So after a bit of investigation, looks like its a little of some of my code, but also an issue with the amount of surfaces you have in your game.

So there was a few code errors with how i was trying to cycle through surfaces and pumpjacks, which I got sorted, but would then land on the same error as originally reported.

Well it turns out, you have 28 surfaces in your game, 3 of which are non-existent, surface 12/24/25. You can check yourself, if you run the command /c game.print(#game.surfaces), this will show 28 as the total number, if you then go from /c game.print(game.surfaces[1].name) to /c game.print(game.surfaces[28].name), you'll see many named surfaces which are OK, but 12/24/25 error.

I've tried to ignore them, remove them but to no avail, so unless Space Exploration is able to clean up the errored surfaces, my mod wont be able to work with your save.

Well done on the 812 hour save too, ive only logged 490+ hours in Factorio!

2 years ago

Hello. Thank you very much for your investigation. I will communicate with the author of the "space exploration" mod, because I really like your mod. Thanks.

New response