[Rseding91] [2.0.50] CustumInputEvent/InputAction for fast-transfer inconsistent in multiplayer

Bugs which we just recently fixed in our development version and will reach you in the next release.
User avatar
_CodeGreen
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Sat Mar 05, 2022 11:30 am
Contact:

[Rseding91] [2.0.50] CustumInputEvent/InputAction for fast-transfer inconsistent in multiplayer

Post by _CodeGreen »

I made a mod a while ago called Force Inventory Insert that lets the player forcibly insert items into the bar portion of an inventory if it's full, that way players don't have to manually move each stack.
I've had a bug reported recently where the mod doesn't work in multiplayer, and after a thorough inspection I've come to the conclusion that this is due to something in the engine, because there should be no difference between singleplayer and hosting a multiplayer game as far as the mod's functionality is concerned.

Here's the way the mod works, as a quick rundown:
I have custom-input prototypes linked to each of the game actions for all of the fast transfer actions.
Taking advantage of the fact that custom-input events happen before the actual action is processed, I can remove the bar from the inventory, let the input action for fast transfer proceed unimpeded, and re-set the bar in the inventory changed event (or next tick if something ever goes wrong).
This works great, and I've taken advantage of this custom-input/input action event ordering for other shenanigans in other mods as well.
However, something is going wrong for these specific input actions, and I have no clue why.

I can't say for sure that this is actually a bug, but it certainly feels like one.
My Mods | If you can't make it perfect, make it adjustable
User avatar
_CodeGreen
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Sat Mar 05, 2022 11:30 am
Contact:

Re: [2.0.50] CustumInputEvent/InputAction for fast-transfer inconsistent in multiplayer

Post by _CodeGreen »

here's a video for clarification, entering singleplayer and testing the mod works, multiplayer and testing the mod doesn't.
I've made sure the custom input events result in the same outcome.

OBS-2025-05-18 08-01-10.mp4
(16.65 MiB) Downloaded 15 times
My Mods | If you can't make it perfect, make it adjustable
Rseding91
Factorio Staff
Factorio Staff
Posts: 15669
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.50] CustumInputEvent/InputAction for fast-transfer inconsistent in multiplayer

Post by Rseding91 »

Thanks for the report. I found the underlying reason this is happening but the fix involves changing how player actions are processed when in multiplayer which has an unknown amount of risk. With that in mind, I'm going to wait until the next stable happens and then put the fix into the experimental after that.
If you want to get ahold of me I'm almost always on Discord.
User avatar
_CodeGreen
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Sat Mar 05, 2022 11:30 am
Contact:

Re: [Rseding91] [2.0.50] CustumInputEvent/InputAction for fast-transfer inconsistent in multiplayer

Post by _CodeGreen »

Sounds good, and yeah I considered poking around myself but decided not to due to the same risk.
Thanks for looking into this!
My Mods | If you can't make it perfect, make it adjustable
Post Reply

Return to “Resolved for the next release”