MV Input Spam when Holding a Button (Octobattle)

Hi all,

Firstly I definitely posted this the wrong place earlier and I don't know how to delete it...
I'm really sorry about that and I hope someone can point me towards how I can do that so there isn't a duplicate post!

So, recently got back into RPG Making, and installed Yanfly's GamepadConfig plugin.
My issue is what when I hold any button down, it spams the input of that button infinitely until I let it go. As a result I can zoom through menus at lightspeed and very easily misclick options.
But the real problem comes from the fact that I'm using Olivia's Octobattle system. I've got Page Up / Down set to the Left and Right trigger on my gamepad, but when I press either trigger even a tiny bit to increase my Boost level, it maxes it out all the way as if I'd pressed it like 5 times.
This is obviously for the same reason as above, the input spam when holding a button down.

How do I prevent this input spam in all cases?
Thanks in advance for the help!

Edit: Here are video examples I made later in the thread for those newly joining


Have you tried looking for an alternative gamepad config plugin, to see if that helps? E.g.

Firstly I definitely posted this the wrong place earlier and I don't know how to delete it...
It's better to avoid posting multiple threads for one problem. In this case, since your older thread in MV Support has no replies, I'll go ahead and delete it.

In future, you can just click the Report button on your post and leave a reason explaining that you'd like your thread moved:

report.png

Reporting a post brings it to the attention of the moderators, who can move threads around. 👋
For that matter, does it behave differently without any config plugin installed? MV does have native gamepad support for you to test with.
For that matter, does it behave differently without any config plugin installed? MV does have native gamepad support for you to test with.
It's still happening even without the plugin enabled.
I can still hold the A button to spam through menus and pressing the L/R buttons even a tiny bit consumes all Boost Points in the Octobattle system instead of just one
So I guess its reading the inputs too repeatedly instead of just once per press?
What kind of gamepad are you using? Does it have turbo switches or anything like that?
I'm using a Horipad Gamecube Controller for Switch, no turbo. But also have tried with PS4.
But I don't think the type matters because its happening even on Keyboard
Like I can hold down the 'Z' button (which is bound to button A by default I guess), and speed through menus.
I want every click to have to be deliberate.
I think something is wrong with your system/project.

When I start a new project, press Escape to open the menu, then hold down Z or Enter, it will select Items then automatically the first item, however:
- It will not automatically select the actor and use the item; there's nothing infinite
- It is not at all difficult timing to lift my finger in the transition between selecting Items and the list popping up

Do you, by chance, have a high-refresh monitor? I'm not sure if the bugs with refresh rate might also affect a too-high polling rate for input; you could try adding this plugin to your project (even if it doesn't affect you, it fixes the bug for any players you might have):
I've implemented the plugin you suggested and it hasn't made a difference.
I can press and hold Z to zoom through menus still.
Really, its the octobattle boost problem that's the main concern, you're meant to press L or R one time to decrease / increase your boost level by one increment. But pressing R one time very lightly without holding it down at all is acting as I've spammed the button and is increasing my boost to maximum with one press.

This then makes it impossible to tactically choose to only use one or two boost points if you have more, since the input is just reading 3 times from one press.
This particular issue with boosting doesn't effect keyboard, weirdly, but occurs with a gamepad, even with this new plugin installed.

The 'zooming through menus' issue is I assume the exact same thing, and while I definitely want it gone because that effects keyboards as well (although you do deliberately have to hold it for it to occur with a keyboard) my priority is definitely fixing it for the boost system, because that's core gameplay.
Both aren't great cause one makes a gameplay loop very hard to interact with, and the other is a UX thing that im just personally not a fan of and want to prevent.
Press F2 and check the fps counter. What is the number you see there?
Press F2 and check the fps counter. What is the number you see there?
1723760110694.png


60, and it doesn't seem to dip below or climb above that.
OK then we rule out high refresh rate monitor.


Here's an video example of what's happening if it helps understand the problem better.
To start with, I'm pressing and holding the key on my keyboard that is assigned to R, and you can see it slowly increments with a delay.
After that, I then press but do not hold the button on my gamepad that is assigned to R, and you can see it just uses every boost point at once, instead of only one like it should.

What should happen is:
-If button is pressed once, raise boost by 1.
-If button is held, slowly increment boost.

What is happening (with gamepad):
-if button is pressed once, consumes all boost immediately.
-if button is held, consumes all boost immediately.




And here's what's happening in menus.
I can press and hold to just zoom through everything.
Same with exiting menus.
I'm joining in, I have the same issue. I have made an event using the galv bar plugin where the player has to repeatedly hit a button.... and a tester noticed that you can press it just once and it'll fill the bar automatically.

I think it is something that can be fixed via a common event (such as if enter is pressed then wait x frames) but I'm not sure. I fear it's something related to the game not detecting the release of the input, basically working like a turbo controller.
I know this is unlikely, but can you check the two properties in the console?

Input.keyRepeatInterval
Input.keyRepeatWait

Usually Input.keyRepeatWait is 24 and Input.keyRepeatInterval is 6. You can change the number to bigger values to see if it is better.

For example:
Input.keyRepeatInterval = 60
I know this is unlikely, but can you check the two properties in the console?

Input.keyRepeatInterval
Input.keyRepeatWait

Usually Input.keyRepeatWait is 24 and Input.keyRepeatInterval is 6. You can change the number to bigger values to see if it is better.

For example:
Input.keyRepeatInterval = 60
Not sure if I did it right but it didn't seem to work for me. You can still keep the button pressed for multiple inputs
Well naturally when you pressed a button it should repeat but the repeating speed is not too fast.
Like 10 times per second? Just like typing something in a text box.
You can also change Input.keyRepeatWait to a high value too see if it makes any difference.

Input.keyRepeatWait = 10000
I don't have a gamepad to test with myself, but here are some ideas:
  1. If the issue only occurs with a gamepad, do you happen to have any other gamepads (make/model) that you can test with, to see if the problem persists? E.g. I believe Xbox controllers are widely supported on modern PCs. Less common gamepads, particularly older models, are less likely to be correctly supported.

  2. Do you see the same kind of problem in a new project, with no plugins? E.g. a plugin may have mistakenly used an isPressed check instead of isRepeated. If it only occurs with plugins enabled, that suggests it's a plugin issue.

  3. Do you see the same problem in other games?
    • If it only seems to occur in RPG Maker MV/Z games (which, to be clear, are browser-based regardless of deploy target), it may be related to the way their core scripts, and/or the plugins used, process those inputs.
    • If it occurs in HTML/browser games in general, the problem may be that your gamepad doesn't work nicely with the browser's Gamepad API. There might be a general solution via 3rd-party software, or specific, per-game solutions.
    • If it occurs in non-HTML games too, it may be a quirk of your gamepad, or some background software you're using that intercepts/interprets the gamepad input signals.
I don't have a gamepad to test with myself, but here are some ideas:
  1. If the issue only occurs with a gamepad, do you happen to have any other gamepads (make/model) that you can test with, to see if the problem persists? E.g. I believe Xbox controllers are widely supported on modern PCs. Less common gamepads, particularly older models, are less likely to be correctly supported.

  2. Do you see the same kind of problem in a new project, with no plugins? E.g. a plugin may have mistakenly used an isPressed check instead of isRepeated. If it only occurs with plugins enabled, that suggests it's a plugin issue.

  3. Do you see the same problem in other games?
    • If it only seems to occur in RPG Maker MV/Z games (which, to be clear, are browser-based regardless of deploy target), it may be related to the way their core scripts, and/or the plugins used, process those inputs.
    • If it occurs in HTML/browser games in general, the problem may be that your gamepad doesn't work nicely with the browser's Gamepad API. There might be a general solution via 3rd-party software, or specific, per-game solutions.
    • If it occurs in non-HTML games too, it may be a quirk of your gamepad, or some background software you're using that intercepts/interprets the gamepad input signals.
Img.jpg

In my case is not a problem of gamepad plugins, I have none of those atm and it does it using keyboard.
I'd like to try the "if repeated" instead of "if pressed" but I can't find the option in the menus, is it script only or am I missing something?
In my case is not a problem of gamepad plugins, I have none of those atm and it does it using keyboard. I'd like to try the "if repeated" instead of "if pressed" but I can't find the option in the menus, is it script only or am I missing something?
It was added as a branch option in MZ. In MV, you can use Branch -> Script: Input.isRepeated("ok").

Alternatively you could use a variable to manually count the frames. This kind of idea:
  • If [OK] is pressed:
    • If Variable > 0:
      • Variable -= 1.
    • Else If Variable < 0:
      • Variable += 1
    • Else If Variable = 0:
      • (Your stuff goes here.)
      • Variable = 6.
  • Else:
    • Variable = -24.
I don't have a gamepad to test with myself, but here are some ideas:
  1. If the issue only occurs with a gamepad, do you happen to have any other gamepads (make/model) that you can test with, to see if the problem persists? E.g. I believe Xbox controllers are widely supported on modern PCs. Less common gamepads, particularly older models, are less likely to be correctly supported.

  2. Do you see the same kind of problem in a new project, with no plugins? E.g. a plugin may have mistakenly used an isPressed check instead of isRepeated. If it only occurs with plugins enabled, that suggests it's a plugin issue.

  3. Do you see the same problem in other games?
    • If it only seems to occur in RPG Maker MV/Z games (which, to be clear, are browser-based regardless of deploy target), it may be related to the way their core scripts, and/or the plugins used, process those inputs.
    • If it occurs in HTML/browser games in general, the problem may be that your gamepad doesn't work nicely with the browser's Gamepad API. There might be a general solution via 3rd-party software, or specific, per-game solutions.
    • If it occurs in non-HTML games too, it may be a quirk of your gamepad, or some background software you're using that intercepts/interprets the gamepad input signals.
  • I don't have an Xbox Controller but I've tested with PS4 and Switch as well as my Gamecube controller and the problem is occurring with all three.
  • I can't test this issue without plugins because the issue I'm having is specifically with the Olivia Octobattle plugin, as you can see in the video I posted, its using all of the boost points at once instead of just one at a time with only one button press.
  • I haven't had an opportunity to look at other games that use this battle system to compare mine with.
SIDD (who recently joined in on this thread) seems to be having a totally different issue from me, as they are using events. I'm working with the Octobattle Plugin and in particular its boost system.

I'm curious to know ATT_Turan's opinion on this after seeing the videos, I feel like I did a poor job of describing my issue earlier on.

Original thread: https://forums.rpgmakerweb.com/threads/input-spam-when-holding-a-button-octobattle.171083/