Mega Black Market


Mega Black Market is a Factorio mod that introduces an advanced economic system, allowing players to buy and sell items, fluids, and energy through a universal black market.

Utilities
9 months ago
2.0
3.01K
Circuit network Power Storage

b Multiplayer Unplayable

3 months ago
(updated 3 months ago)

Hello.

I will start by importing the text from the log regarding the event, followed up by what the issue is as I observed it, followed up by the method to perfectly recreate it every time.


727.706 Error MainLoop.cpp:1508: Exception at tick 636166: The mod Mega Black Market (1.2.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event MegaBlackMarket::on_gui_click (ID 1)
MegaBlackMarket/control.lua:1274: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
MegaBlackMarket/control.lua:1274: in function 'set_content_visible'
MegaBlackMarket/control.lua:2136: in function <MegaBlackMarket/control.lua:2093>
727.706 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod Mega Black Market (1.2.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event MegaBlackMarket::on_gui_click (ID 1)
MegaBlackMarket/control.lua:1274: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
MegaBlackMarket/control.lua:1274: in function 'set_content_visible'
MegaBlackMarket/control.lua:2136: in function <MegaBlackMarket/control.lua:2093>"
727.707 Info ServerMultiplayerManager.cpp:808: updateTick(636166) changing state from(InGame) to(Failed)
727.707 Info SteamContext.cpp:456: Leaving lobby...
737.024 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
737.024 Info ServerMultiplayerManager.cpp:808: updateTick(636166) changing state from(Failed) to(Closed)
737.024 Info ServerMultiplayerManager.cpp:166: Deleting active scenario (global = true).
737.117 Info UDPSocket.cpp:232: Closing socket
737.118 Info UDPSocket.cpp:262: Socket closed


Summary + Recreation:
So, no immediate crashes or fails, however, just like a few other mods which share some sort of "real-time" UI with other players simultaneously, if both of us, e.g. use the "Price Checker", then only one of us is able to swap between tabs/categories and the other's UI is being "controlled" by the last person to open up the UI regardless of host/guest status.

The problem occurs when one of us opens up the "Buy Chest" and presses the empty box icon (where you select specific item to purchase), whereafter the other player opens up the Price Checker (presumably any UI which differentiate, e.g. shop and sell menu, buy and price checker menu, etc) and then starts browsing between items and tabs/categories, it manages a few clicks but after enough browsing by the person who opened the price checker afterwards, it immediately gets hit by that unrecoverable error message. I have tested it 6 times now in different scenarios and troubleshooted it a bit and confirmed it is only that which causes the error, personally the inability for both players to utilize the UI is acceptable since we are just two frends, although having an option to separate our money between players would be very nice.

I might as well ask now that I can, is it multiplayer viable? Has it ever been multiplayer viable? Should I rollback to an older version? Is there anything I could personally do since the construction of the mod seems to me (a total noob when it comes to modding) as if its not made at all with multiplayer in mind.

Any help/advice/updates are very much appreciated! Other than that, thank you for the awesome mod! <3

New response