Hextorio - Build in hexagons


Adds dungeons, quests, an economy/trading system, scaling DPS boss fights, ability to level up items, new music for the title screen, and an extra tier for many things such as belts, modules, combat robots, nauvis ores (endgame), and more. Also divides the planets into hexagons, which contain resources, enemy bases, or profitable trades. Get rich by selling your production, buy hexagons, and plunder the powerful dungeons on every planet!

Overhaul
2 days ago
2.0
4.99K
Factorio: Space Age Icon Space Age Mod
Transportation Logistics Combat Enemies Environment Mining Manufacturing Storage

b Bug: Strongbox appears in unclaimed hex

a month ago

While playing with minimal hex sizes (size=12, stroke=2), I claimed a hex and a strongbox happened to appear in a neighbor cell, which was unclaimed at the time.
My guess is that the spawn logic makes it appear near the core in a fixed radius, independent of the actual hex size

21 days ago

That is correct! It's something I didn't bother generalizing. It's because the modding API's function for finding open positions in the world for spawning entities checks in a rectangular area. I first make it choose a random location within a circular area centered around the hex core (radius of 16 tiles at max), and then I have it search for an open position within a range of 10 tiles from that randomly chosen location around the hex. When hexes are small enough, that will often result in them being put into neighboring hexes. Generalizing this to make them stay within their original hexes could maybe be done by "snapping" positions in the axial coordinate system, and that would work almost all of the time. And while it would almost never really be an issue, the problem of having to find open positions persists (potentially offsetting into a neighboring hex). It's something I could get around to implementing if more people start wanting that for some reason, lol.

New response