Eli Button Common Events - Assign/bind common events to your keyboard keys!

● ARCHIVED · READ-ONLY
Started by Eliaquim 63 posts Page 1 of 4 View original ↗
  1. aU316Ze.png
    Author: Hakuen Studio

    Introduction

    This plugin lets you bind common events to any keyboard button via plugin parameters or plugin commands!

    Features
    • Bind common events to keys.
    • Remove common events from these keys.
    • Can do it through plugin parameters or plugin commands.
    How to use

    The plugin is totally self-explanatory, but I want to tell you a little tricky about it too.

    ● You can bind some common events to the keys you want through plugin parameters. You see that when you go select the key, there is a dropdown list for each of them.
    Spoiler
    vqezjGw.png

    If you don't want to search/scroll the dropdown list, you can use the text field to put the key there. It's not case sensitive but has to match the keys in the dropdown list.
    Spoiler
    glBPqzU.png

    ● Inside the game, you can use plugin commands to unbind or bind new common events/keys.
    zxCQRZ1.png

  2. Version 2.1.0 - 03/08/2021
    - Add support to bind a common event to gamepad buttons
  3. I'm using this now & it works great.

    I just wish you could disable the menu so you could make your own using the X (Y) Key. I hate the default menu.
  4. cabanas_ds said:
    I'm using this now & it works great.

    I just wish you could disable the menu so you could make your own using the X (Y) Key. I hate the default menu.
    Thanks ^^
    Well, you can disable the menu using the event command. That will not work?
  5. Eliaquim said:
    Thanks ^^
    Well, you can disable the menu using the event command. That will not work?
    I found when you have the menu disabled the X key becomes unassignable to anything else after that but I've learnt to change the main menu to work how I want it now so it's not really a problem.
  6. Version 2.1.1 - 05/03/2021
    - Code clean up
    - Need Eli Book 3.3.0 now.
  7. So I was testing this out for a side project in a very "Diablo" style, which led to me using keyboard 1 and this error...
    error.jpg

    It's quite easy to replicate this error, as I created a new project with only your Book and Button Common Events plugins. I admit I haven't exhaustively gone down the various keys, A works, tab works, numpad 1 works... But 1, 2 and 9 give this error (along with likely the numbers in between).
  8. ImaginaryVillain said:
    So I was testing this out for a side project in a very "Diablo" style, which led to me using keyboard 1 and this error...
    View attachment 194265

    It's quite easy to replicate this error, as I created a new project with only your Book and Button Common Events plugins. I admit I haven't exhaustively gone down the various keys, A works, tab works, numpad 1 works... But 1, 2 and 9 give this error (along with likely the numbers in between).
    Thanks for the report!
    I believe the problem is my function that automatically parses my plugin parameter. So the function is understanding that "1" is 1.
    I will fix that tomorrow ^^
  9. Version 3.0.1 - 08/25/2021
    - Fixed a problem that was causing a crash when trying to map a number keyboard key(1, 2, 3 etc...) to a common event.
    (@ImaginaryVillain so sorry for the lateness of that >.<. If I ever forget again, fell free to send me a message)

    Version 3.0.0 - 08/07/2021
    - Code clean up
    - Changes on the help file.
    - Adapted to work with Eli Book 4.0.0
  10. Version 5.0.0 - 02/05/2022
    • [MV] Ported to MV!
    • Updated terms of use.
  11. Version 5.1.0 - 03/01/2022
    • You can now use \v[id] in the common event arguments of the plugin commands.
    • You can now choose if the common event triggered by the button will run like a regular common event or like a parallel event(can work even when other events are running or the message or choice window is opened).
    • The overwrite parameter now works a little differently:
      • It is not global anymore. Every Button has an overwrite parameter. So you can choose that some buttons will overwrite the default keys others not.
      • If it is true, it will completely remove the original key behavior and attach a common event to it. If it is false, it will only remove the original key function while on the scene map. Meaning you can use X to call a common event on the map, and while inside on the menu, it will still work as cancel.
    • Add compatibility with Eli Extra Trigger: If Extra Trigger is ordered before this plugin, then their button settings will take priority over the Button Common Events. Otherwise, Button Common Events will take priority.
    • Updated help file.
  12. Version 5.2.0 - 04/19/2022
    • Add a new augment on the plugin command to remove the common events from keys that let you restore the previous key behavior, in case it was previously overwritten. For example, the ESC key.
  13. Awesome plugin! :LZSgrin:

    However...
    I do get an error when attempting to remove/revert the 'enter' key:
    Code:
    TypeError: Cannot read property 'oldName' of undefined
    Console Error Log
    1650594116249.png

    Perhaps I'm doing something wrong?
    Plugin Parameter Settings
    1650594254091.png
    Plugin Command to remove and restore 'enter' key
    1650594179586.png
    Event Call to the Plugin Command
    1650594667874.png

    Thanks in advance for any help with this :)
  14. Hi @ct_bolt !
    Yeah, I'm aware of this error! You are not doing something wrong.
    I already fixed, but I will only be able to upload the new version later.
  15. Version 5.2.1 - 04/22/2022
    • Fixed a problem where assigning common events to the default RPG Maker keys(Like X, ESC, Z) was not properly working unless you overwrote it.
    • Fixed a crash that happens when you tried to restore the old behavior of a default key.
    Version 5.2.2 - 04/22/2022
    • Fixed a bug that parallel common events activated by Button Common events were running infinitely.
    • Need Eli Book 5.0.9
  16. Eliaquim said:
    Hi @ct_bolt !
    Yeah, I'm aware of this error! You are not doing something wrong.
    I already fixed, but I will only be able to upload the new version later.
    Awesome! New version is working great now! Great job with this! :cutesmile:
    Thank you for fixing and for creating this plugin :LZSgrin:
  17. I've encountered a bug with this plugin (or a possible incompatibility) that I haven't managed to narrow down yet. But essentially when this plugin is enabled sometimes movements or buttons will continuously input. For instance the player will continuously move down while only being to move right or left, but not up. Eventually it will fix itself and the player will be able to move as normal again.

    This has largely been a gamepad bug as I haven't managed to duplicate it with the keyboard. Unfortunately the bug appears to be incredibly random, so I don't have exact steps to duplicate it as of yet. But I figured I'd mention it just the same, just in case someone else also encountered it.


    Edit: In testing, this error occurs in a new project with blank common events set to the gamepad buttons. The events are set to parallel but not to replace the button's function. There are no other plugins enabled besides your book, and button common events. It appears to be fairly easy to reproduce, just run around hitting the buttons and you'll quickly discover you lose the ability to move in certain directions temporarily.
  18. ImaginaryVillain said:
    I've encountered a bug with this plugin (or a possible incompatibility) that I haven't managed to narrow down yet. But essentially when this plugin is enabled sometimes movements or buttons will continuously input. For instance the player will continuously move down while only being to move right or left, but not up. Eventually it will fix itself and the player will be able to move as normal again.

    This has largely been a gamepad bug as I haven't managed to duplicate it with the keyboard. Unfortunately the bug appears to be incredibly random, so I don't have exact steps to duplicate it as of yet. But I figured I'd mention it just the same, just in case someone else also encountered it.


    Edit: In testing, this error occurs in a new project with blank common events set to the gamepad buttons. The events are set to parallel but not to replace the button's function. There are no other plugins enabled besides your book, and button common events. It appears to be fairly easy to reproduce, just run around hitting the buttons and you'll quickly discover you lose the ability to move in certain directions temporarily.
    Hi there!
    Thanks for the report!

    Let me check If I understand you right and also make some questions:
    1 - Only happens with common events assigned to gamepad buttons.
    2 - The common event is blank. Without any commands.
    3 - The common event itself is set to parallel or it is set as a parallel on the plugin parameters? Or both?
    4 - They do not overwrite the default buttons.
    5 - What type of gamepad you are using? Xbox, Playstation or generic?
    6 - What Rpg maker version?

    If you tested in a blank project, do you mind send me that blank project replicating the error?
  19. Eliaquim said:
    Hi there!
    Thanks for the report!

    Let me check If I understand you right and also make some questions:
    1 - Only happens with common events assigned to gamepad buttons.
    2 - The common event is blank. Without any commands.
    3 - The common event itself is set to parallel or it is set as a parallel on the plugin parameters? Or both?
    4 - They do not overwrite the default buttons.
    5 - What type of gamepad you are using? Xbox, Playstation or generic?
    6 - What Rpg maker version?

    If you tested in a blank project, do you mind send me that blank project replicating the error?


    1. That seems to be the case.
    2. Yes, the test game has blank plugin commands.
    3. I have tried both ways, the error happens either way.
    4. Correct
    5. Two generic controllers, a bluetooth PS-403 and a wired Logitech gamepad F310. Both with Playstation layouts.
    6. The latest MZ. This also happens in the upcoming beta as well.

    Here's the blank project file.

    It's easy to cause the error, just start hitting the buttons repeatedly, especially alternating them while moving. You'll find the characters will suddenly just start going in a specific direction for a random amount of time.

    The regular buttons also repeat, though you won't see that with blank events.
  20. ImaginaryVillain said:
    1. That seems to be the case.
    2. Yes, the test game has blank plugin commands.
    3. I have tried both ways, the error happens either way.
    4. Correct
    5. Two generic controllers, a bluetooth PS-403 and a wired Logitech gamepad F310. Both with Playstation layouts.
    6. The latest MZ. This also happens in the upcoming beta as well.

    Here's the blank project file.

    It's easy to cause the error, just start hitting the buttons repeatedly, especially alternating them while moving. You'll find the characters will suddenly just start going in a specific direction for a random amount of time.

    The regular buttons also repeat, though you won't see that with blank events.
    Hi there!
    Thanks for the report! I think I fixed it!
    But let's confirm that before I release an update.
    On lines 477 and 483, replace this:

    Input._gamepadStates[0].fill(false)

    with this:

    Input._gamepadStates[0][index] = false

    See if it will work on your side, I tested a lot and it seems to solve the issue so far.