Include player information in errors

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 151
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Include player information in errors

Post by PennyJim »

I've seen a handful of mod bug reports where a player related event errors on a server, and people struggle to really explain what would have caused it because they aren't sure who caused it.

I'm proposing that for events related to a player (any that have a player_index), the ID and username of the player gets listed alongside the event ID.
I think this might also help with Crashes if you can do something similar there.

I'm imagining something like this:
Error while running event MouseOverConstruction::on_selected_entity_changed (ID 61, PlayerID 2: PennyJim)
Maybe the player's username should stand out a little more so people can spot it and then try and think of how they would have caused it in the moment. I would hope that the natural pattern recognition that is in overdrive for your own name would spot it, but who knows.

I think having both the user index and the username is important because the dev reacting to it likely wants the former, and the user needs the latter to give it context.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 376
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Include player information in errors

Post by protocol_1903 »

+1, very useful for serverlogging errors
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Post Reply

Return to “Modding interface requests”