Hextorio - Build in hexagons


Adds dungeons, quests, an economy and trading system, the ability to level up items in the game, and an extra tier for transport belts, belt capacity, modules, quality, spidertrons, spaceship fuel recipes, chemical fuels, bullet magazines, rockets, combat robots, and nauvis ores (endgame). Also divides the planets into hexagons, which contain resources, enemy bases, or profitable trades. Get rich by selling your excess items, buy hexagons, and plunder the powerful dungeons on every planet!

Content
8 days ago
2.0
917
Transportation Logistics Combat Enemies Environment Mining Storage

b Crush on multiplayer game

2 months ago

Appreciate your good mod. It interests me a lot. But it crashes one or two times per day when running a dedicated server. some errors:
A:Error while running event hextorio::teleport-to-hex-core (ID 216)
hextorio/api/lib.lua:1613: attempt to index field 'surface' (a nil value)
stack traceback:
hextorio/api/lib.lua:1613: in function 'get_hex_core_from_entity'
hextorio/handle_keybinds.lua:18: in function <hextorio/handle_keybinds.lua:8>"
14462.362 Info ServerMultiplayerManager.cpp:808: updateTick(5541630) changing state from(InGame) to(Failed)
14462.378 Quitting: multiplayer error.
2.5092.225 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: dungeons.random_prototype: No dungeon prototypes found for surface platform-B:5092.225 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: dungeons.get_dungeon_at_hex_pos: Could not find a prototype to use.
5102.216 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: dungeons.random_prototype: No dungeon prototypes found for surface platform-3
5102.216 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: dungeons.get_dungeon_at_hex_pos: Could not find a prototype to use.
C:Error while running event hextorio::on_gui_click (ID 1)
hextorio/api/gui.lua:2651: attempt to index field 'surface' (a nil value)
stack traceback:
hextorio/api/gui.lua:2651: in function 'on_hex_core_trade_item_clicked'
hextorio/api/gui.lua:2442: in function 'on_sprite_button_click'
hextorio/api/gui.lua:2255: in function 'on_gui_click'
hextorio/control.lua:325: in function <hextorio/control.lua:324>
20033.492 Info ServerMultiplayerManager.cpp:808: updateTick(4698913) changing state from(InGame) to(Failed)
20033.492 Quitting: multiplayer error.
20033.492 Info GlobalContext.cpp:769: Deleting active scenario.

2 months ago

Sorry for the many crashes. I'm surprised I haven't encountered these myself yet. I'll take a look.

2 months ago

Version 1.0.8 is now released and includes the fix for each of those crashes. Thanks for the report, and thanks for playing the mod!

2 months ago

Thanks for your update. No crash happened after running with 1.0.8 , but there still some errors to report:
A:1473.767 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: Temporary surface does not exist
B:2772.989 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 12041.594858127
2772.989 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 12041.594858127
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 719.2245476753
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 719.2245476753
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 26608.891764984
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 26608.891764984
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 50969.899278379
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 50969.899278379
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 6553.2468398319
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 6553.2468398319
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 3224.811588239
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 3224.811588239
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 13.91030280133
2772.991 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 13.91030280133
2772.992 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 14061.452485436
2772.992 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 14061.452485436
2772.993 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: trades.random_trade_item_names: No items found near value 49329.657268345
2772.993 Script @hextorio/api/lib.lua:357: HEXTORIO | trades.random: Not enough items centered around the value 49329.657268345
C:11176.544 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: quests.get_quests_by_condition_type: No quests found with condition type items-at-rank-2
Hope the mod gets better!

2 months ago

65610.687 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: coin_tiers.normalized: Encountered negative coin value: {0, 0, 0, 0}

78742.030 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: item_ranks.init_item: tried to define rank for coin or non-item: hex-coin

118824.490 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: item_values.get_item_values_for_surface: No item values for surface platform-3
118824.490 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: item_values.get_item_value: No item values for surface platform-3, defaulting to 1

172308.441 Script @hextorio/api/lib.lua:357: HEXTORIO | ERROR: quests.get_quests_by_condition_type: No quests found with condition type items-at-rank-3

2 months ago

Most of those are "fake" errors. e.g. "No quests found with condition type items-at-rank-3" isn't actually an error as I never added any quests for ranking up items to rank 3 (silver stars). The code was written for use under the assumption that I (or anyone else using it) would know beforehand if there are any quests under a certain category before trying to reference which ones they are. And that's a good thing usually. I just never added a complementary function to test whether there are any such quests, something like quests.quests_exist_for_condition_type(condition_type). Then, the "errors" can be silenced without removing that assumption.

That said, only one of those errors looks like a real, critical error to me, the negative coin values one. That sounds to me like I may not have checked whether a coin subtraction operation was valid before doing so (a - b should only happen when a >= b in that context). I'll have to find out where that is. And the "tried to define rank for ... hex-coin" is slightly concerning as it indicates a misuse of data somewhere, but nothing should be broken.

The "no items found near value ..." usually occurs on Aquilo because item values are very spread apart. It means that some hex cores on Aquilo will have fewer trades than normal in them, which is partly a bad thing, but also partly not the worst thing ever because at that point, you can rank anything up to silver rank and find any item you want on Aquilo or any other planet. I should probably just suppress the error and call it a day, lol. No one will know the difference xD!

Thanks again for the reports!

New response