[Rseding91] [2.0.50] CustumInputEvent/InputAction for fast-transfer inconsistent in multiplayer
Posted: Sun May 18, 2025 3:57 pm
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.
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.