Hextorio - Build in hexagons


Expand your hex territory. Loot dungeons. Complete quests. Level up every item in the game. Trade your way to victory. Get rich.

Overhaul
12 days ago
2.0 - 2.1
6.54K
Factorio: Space Age Icon Space Age Mod
Transportation Logistics Combat Enemies Environment Mining Manufacturing Storage

b Freeze on landing on Aquilo

a month ago
(updated a month ago)

Patch
File: mods\hextorio\api\terrain.lua
153: function terrain.get_surface_transformation(surfaceID)
- 174: if not transformation.scale then
+ 174: if not transformation.scale or transformation.scale <= 0 then

a month ago
(updated a month ago)

That doesn't make any sense. The root cause is transformation scale somehow becoming non-positive (scale < 8) on Aquilo. That's not the entire fix I'd put in for this, even though the safeguard is a good idea anyway. Transformation scale being out of bounds, which are currently defined by the mod setting prototypes, should result in an error being logged. Do you have any reproducible steps to create this zero/negative scale? I was unable to reproduce this with vanilla Hextorio on fresh new games nor migrated old saves.

a month ago
(updated a month ago)

Do you have any reproducible steps to create this zero/negative scale?

Unfortunately not. I had this problem when landing; I'd reset all the settings, but nothing helped. Every time chunks were generated, it would freeze, so I used the log entries to pinpoint where it was getting stuck and changed that line. I can't rule out the possibility that I changed something else while debugging, but I don't remember what it was.

I just thought of something:
transformation.scale was 0 and division results in inf values, which caused the error.

a month ago
(updated a month ago)

transformation.scale was 0

Yeah, that's the weird part. I looked through the code and did not see a way that it could've ever become zero. But you're right, a division by zero might have led to an unbounded search, and thus freeze. So, this would be even better handled in the tile generation code to cap out at large but processable ranges in the case of zero or near-zero values being fed to it.

14 days ago

I figured out at least one way that scale was getting set to zero. It was sometimes happening for space platforms. Got that patched out.

5 days ago

thx. I haven't been able to test it yet; I accidentally overwrote the save file.

New response