A downloadable RPG Maker Plugin

Download NowName your own price


Introduction

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

Features

  • Bind common events to keyboard keys or gamepad buttons.
  • Remove common events from these keys/buttons.
  • Common events can be parallel types (uninterruptedly) or regular ones.
  • Can do it through plugin parameters or plugin commands.
  • Can choose to overwrite the default key functions.
  • The changes stay on the save file.

How to use / Help File

Terms of use

StatusReleased
CategoryTool
Rating
Rated 5.0 out of 5 stars
(13 total ratings)
AuthorHakuen Studio
Made withRPG Maker
Tagsbutton-common-events, hakuen-studio, mz, plugins, RPG Maker, RPG Maker MV, RPG Maker MZ, rpg-maker-plugin, tools
Average sessionA few seconds
LanguagesEnglish

Download

Download NowName your own price

Click download now to get access to the following files:

MZ - Button Common Events 5.2.3 4 kB
MV - Button Common Events 5.2.3 4 kB

Development log

View all posts

Comments

Log in with itch.io to leave a comment.

Hello

I'm really enjoying using the plugin you made. Thank you for the effort you put into creating such awesome stuff.


There is just one problem.

I'm working on a puzzle game, and I'm using your plugin to help me "load the last save point" by pressing a keyboard button if one get stuck in the middle of a puzzle.


if(DataManager.loadGame(DataManager.latestSavefileId())) {

$gamePlayer.reserveTransfer($gameMap.mapId(),$gamePlayer.x, $gamePlayer.y);

$gamePlayer.requestMapReload();

SceneManager.goto(Scene_Map);

}


Configure the function into a script as above, put it as a common event, and assign this common event to one of the keyboard inputs using your plugin.


This worked fine for the first two times. Oddly enough, not once, but twice. After that, the common event does not work even if I press the keyboard button.

I tried connecting the common event to methods other than keyboard input, and it worked normally.

Just in case, I tried adding a script to assign the common event to the keyboard button again, right after loading, but the result was the same. It runs just twice and then stops.


I would like to ask for advice on whether there is a part of the plugin itself that is causing problems by conflicting with the Loading function or the script I mentioned above.

Hi there!

I think I understood. It is a very specific case. I'm not sure if the problem lies on my plugin, I would have to take a sample project and test it.

But first, try making one of these changes:

1 - Replace DataManager.latestSavefileId() with $gameSystem.savefileId(). See if it will work.

2 - Try using my Check Point plugin to perform the Load with the plugin command instead of your script call.

If none of the solutions works, then I will have to ask for a sample project replicating the issue, so i can test and see the problem here.

(2 edits) (+1)

Wow. I solved it perfectly using both of your advice.


Saving algorithm of my game is like, picking up a slot at the very beginning of the game and overwrite that slot every time after major events happen. (including entering the puzzle zone.) 

Since Autosave and Autoload function of your Check point plugin only use Autosave slot(Slot Id=0), I made some changes to the code you made.

I changed assigned Id for your ExecuteAutosavePlus and ExecuteAutoload function, which is 0 as default, into '$gameSystem.savefileId()' which you mentioned.

And now, whenever I run your Autosave/load function, Not only it works beautifully, but also keyboard assigned for autoload function too works well. 


I wrote the above information in detail to thank you and maybe to help you update your plugin. Maybe you can add the function of Saving in/Loading from the last save file, instead of autosave slot, while you update the Checkpoint plugin. I'm sure there will be someone like me who will find it useful.

Again thank you very much for your kind and dedicated support.

Nice you managed to make it work! I guess you also don't need to change the plugin code, you could use this command that accepts script calls on the argument:

But the important is that it already works for you :)

Hello.

Is this plugin compatible with your jump system plugin?

With that I mean as in both the common event and the jump in the same button, not at once. There are some times where you can use an ability made with a common event pressing 'c', and there are other times where you can jump again with 'c'. The problem is that turning off the jumps with a switch is easy enough, but turning them on doesn't work.

I though it may be because of the common event plugin not turning off, but it does turn off the first time. Testing I made a parallel event that turns on the switch for jumping and turns off the common event with 'BCE keyboard remove c'. That does work and the character jumps. Then I have 2 events that upon interacting one turns off the common event with the same plugin command and turns on jumping and the other turns on the common event with 'BCE Keyboard assign c 2' and turns off jumping. The latter one always work, but once I interact with the same one nothing happens and the character neither jumps or executes the common event.

BTW I'm using RPG Maker MV and the order I have is first Eli Book, then Eli Jump System and then Eli Button Common Events.

Thanks.

Hi there!

Honestly, I don't think I manage to understand what you are saying. 

1 - Do you want to use the keyboard C button for the Default Jump Button(from the jump plugin) and for a Button Common Event to execute a Jump(Or anything else)? If yes, why do you have to use the same button?

2 - Or are you trying to activate the Jump Switch with the common event by pressing C and at that same time, want the player to jump?

3 - If I did manage to understand, I guess if you want to alternate the way the C keyboard button works (Play a common event or Jump), it is better if you just add a conditional branch on the Button Common Event for check if the Disable Jump Switch IS ON. If it is ON, then you play whatever you want on the common event. If not, then the common event will play but do nothing. This way, you don't need to use any plugin command, just change the Disable Jump Switch value to control what the C button does. Example:


Hi,

What I wanted to do was number 1. I wanted to have both abilities on the same button to make the game more 'clean' and simple, but after testing things I opted to use two different buttons. I tried copying your proposal but it still didn't work. Either those two plugins aren't compatible when they are in the same button or I'm very bad at coding.

Either way now I've put them in different buttons and now they work. Thanks for the sugestion and for the plugins :)

Nice you manage to work things out!

But now that I'm thinking better, I guess my solution would not work anyway. I don't believe the buttons could work that way. 

Well  let me know if you need anything :)

Hello Eli, Nice plugin!

Just want to ask if it's possible to run a conditional script check with this plugin? For example, (Input.isPressed('ok')) checks if player pressed the 'ok' button.

I would like to check if player has pressed button [F], if that's possible.

I have seen you explained this conditional script for gamepad control in the older comments, but I am not sure what's the code for keyboard script check.

Thank you very much!

Hi there!

Yes, it is possible to run a conditional check with my plugin. But where you want to run that conditional check? What exactly you are trying to do and what you expect to happen?

Because the thing is, the plugin code already checks if a key/button that holds a common event is pressed. When it is pressed, the plugin runs the common event that this key/button is holding.

So, are you trying to call a common event with the a button, then inside that common event, checks if that same button is being pressed? Or the [F] is another button that you are trying t check on that common event?

Hi,

Sorry, I should have been more clear with my question.

I am trying to set up the conditional check within an event on map. In other words, it is not exactly "common" event, but map-specific or even event-specific.

Map-specific example: If the player is on Map A, pressing [F] will open the current area's map info. Then, when player is on Map B, pressing [F] will trigger another map info, and so on.

Event-specific example: When player is talking to an event, pressing [F] will have a different interaction, pressing [V] will have another interaction.

I think what I am trying to achieve is still feasible with your common event button even without the manual conditional script check, but being able to set up the conditional check script on event would give me better flexibility and easier to organize overall.

That being said, what I need should just be something just like: Input.keyTriggered("f") // to run a conditional check within event. 

Thank you very much!

Got it!

With my plugin, what you can do is the following for Map-specific:

When player press [F] check the MAP ID. If the ID is 20, do something. If ID is 30, do other thing. etc.

With a event-specific:

  1. Assign a common event to the [F] button.
  2. Put that common event to be parallel
  3. On that common event, turns ON a switch.
  4. Set a wait X duration in frames
  5. When the wait is over, turn off the switch you had turned on.

Since the common event is running parallel, when the player interacts with an event during the Wait interval, you can just check if the F Switch is ON, and do what you want to do. Or just activate an specific event when the F Switch is ON, putting that same switch as an event page condition.

What my plugin real does is: Play a common event when an specific key is pressed. The above, is something that you could do using it.

But, if you want to interact with events with different keys, and for each key do something different on that same event, it is best to use my Extra Trigger plugin that does exactly that.

(+1)

Thank you very much! I think that would do the trick!

I will try and work on it.

I have the Eli book and this one installed, and for some reason, my button common events sometimes randomly stop working and I have to reset my game in order for them to work. I have plenty of conditional branches for having access to button common events, such as having some items or switches activated in order to be able to use certain ones, so idk if that has something to do with my issue. I would really be grateful if you could help me with this. :(

Hi there!

I need more information. On your case I believe it will be best a sample project where I can replicate the issue. Because it can be something related to your common event or something else.

Put together a sample project and sent me the link either through here or through PM on the forums.

But I'm out of surgery, maybe will only be able to look into it on friday.

Oh, I think the problem was that I placed the button common events far below Elibook in the plugin list, because now I placed it right below it, and I haven't had any issues recently, but if anything happens, I'll try to notify it. 

Btw I really hope the surgery goes well :( you have my best wishes!

Nice you manage to make it work!

thanks! I'm still recovering, but I believe everything will be allright by now ^^

Have fun!

(+1)

Okay, I'm suffering kind of a weird issue, I don't even know if you are still active in the RPG Maker community, but here goes nothing I suppose.


So, I tried to use the Plugin, but whenever I test the game, it says that I'm missing the EliBook Plugin, which I am not. The EliBook Plugin is on top of the Button Events Plugin, so I dunno what I'm doing wrong.


(+1)

Small update: Fixed the issue, I was using the wrong versions of the plugin, SORRY!

Nice you manager to solve!

And yes, I'm active on the community! ^^

none of my trigger or shoulder button ones seem to be working

ah, it just doesnt work at all...

The plugin Works. Now I need to know what exactly are you doing for it not work. Just saying "is not work" does not help at all. So:

1 What your rpg maker version?

2 Are you using my core plugin above this plugin?

3 Are you using the right plugin version according to your rpg maker version? There is specific version for MV and MZ.

4 How did you setup the button common events? Plugin parameters or plugin command? Can you show a screenshot?

5 When you open the game, please, press F8 or F12, go to the console tab and send me a screenshot of what is there.

i didnt have the book plugin, didnt know i needed it until i tried the mx version and it told me i did

you should probably add that requirement to the product page

(1 edit)

Nice! So it is working?

There is a requirement on the plugin help file(that you can access either by the RPG Maker plugin manager or by the product page "How to use / Help File):

(Somehow the images are not uploading here)

i only needed it for a single common event that turns on a switch (to activate my hookshot)

Does this work with non-English keyboards?

(1 edit)

Hi there!

I think it will work anyway. My keyboard is not English.

But do you mean with something like Chinese characters for example? I guess so too.

In fact, I don't know. You need to test. The thing is, each keyboard key has a code for it on Javascript as you can see on this website:

http://gcctech.org/csc/javascript/javascript_keycodes.htm

I don't know how a Japanese or Chinese keyboard handles this stuff. I will have to do some research

Is it possible to make the character movement a “wasd” button?

Hi there!

Yes it is. Just set one common event for each button with the proper event commands.

sorry.. but i can't see the common id input in the parameters window.. Can u show me how to use this plugin please!.

Hi there!

What do you mean? The common event I'd is just a number. Just put the number of the common event I'd you want.

(+1)

Hey meu brother, obrigado por avisar.
Então mano... continua mesma coisa, acabei de atualizar os dois plugins e continuam sem funcionar.
Vou enviar uma foto...

(1 edit)

Cara, eu tava com o mesmo problema, nada acontecia. Então eu simplesmente abri a janela de escolher os valores pra versão de controle, e assim aparece "[ ]" no valor, e então funcionou normalmente, se quiser tentar aí. Tipo, só abre a opção e fecha que aparece.

(+1)

Ah! realmente agorqa funcionou com sua dica, valeu mano!
Hakuen, só tá funcionando como o SalvadorStudios disse.

Valeu pelo plugin!!

Eli book versão 5.0.9 e Button Common Events versão 5.2.2. Não funcionou?

Você testou em um projeto sem nenhum outro plugin e não funcionou?

Testa nesse projeto e vê funciona:

https://1drv.ms/u/s!Ak26Cghab3Nhhf1zuhQyQAVk7eP6Fg?e=246HhJ

Ah!
Quando eu uso a opção de remover a tecla esc e voltar de fábrica, o menu padrão volta a funcionar com x, mas com o esc não funciona mais.
Por padrão o esc chama o menu principal também, mas mesmo usando a opção de restaurar tecla não chama mais o menu pelo esc.

Opa!

Mas esse é o comportamento esperado. Por padrão, no RPG Maker, o ESC, X, INSERT e NUMPAD 0 tem a mesma função, chamada "escape". Uma outra forma de dizer, é que eles são a mesma tecla. Fazem a mesma coisa. Todos chamam o MENU e também podem ser usados para CANCELAR.

Então se você mapear o ESC para fazer alguma coisa diferente, mas não colocar para ele sobreescrever a função(overwrite = true), todos as teclas que tem a função de "escape" vão ser mapeadas também.

Então se você mapear o ESC e colocar overwrite = false, todas as teclas "escape" também serão alteradas e chamarão o evento comum. O bom disso, é que você poderá restaurar a função dela, já que o overwrite = false e também, ela continuará tendo as suas próprias funções fora da cena do mapa, como por exemplo, cancelar uma janela de escolhas.

Mas, se você mapear o ESC e colocar o overwrite = true, somente o ESC chamará o evento comum. O bom disso é que você só mapeia uma tecla. Mas em compensação, ela perderá a funcionalidade dela inclusive fora da cena do mapa, como também o cancelar na janela de escolhas. 

Tenta baixar essa versão 5.2.2 de novo e vê se vai funcionar. Se não funcionar, você pode restaurar a tecla manualmente com script call:

Input.keyMapper["27"] = "escape"

(3 edits)

Depois que baixei a 5.2.2 de novo deu certo mano!
Valeu!Deixa eu perguntar man, tem algum botão que seja botão direito do mouse?

(+1)

Show!

Pow eu não tinha pensado nisso... Vou tentar implementar os botões do mouse na próxima atualização!

(3 edits)

Hey, I'm trying to use the MV version and it's not working.  It's pratcically a blank project with little to no plugins.

Ideally, I'd really like to have items set to X, but I tried C since I wondered if the overwrite function wasn't working.

Here's some screenshots, this should work fine, but for some reason it doesn't seem to do anything.  I downloaded the plugin today. 4/22

edit : My version of Elis book is old though, I'll try redownloading that and also try a blank project.

edit : I tried that, and even downloading the two most recent versions of both in a blank project it doesn't do anything.




Hi there!

I made an update a few minutes ago. Both on Eli Book (5.0.9) and Button Common Events (5.2.2). See if they will work now!

(1 edit)

At the moment, no, they still don't.

I'm wondering if maybe it's a problem with the version I'm using.  I left this question to a mod on the forums on a thread about updating, I can just copy paste it here.

Regardless I'm downloading the latest version from the official forum thread and hopefully it will do something.  If not I have no idea yet lol ¯\_(ツ)_/¯

edit : I updated and it seemingly did nothing so I don't know

"I am on 1.6.1
After downloading someone elses game, there is a little error pop up whenever I launch the game (it's just a separate little window it doesn't hurt anything). I asked the developer about it, and they said it only does that for older versions.

I've also just now been having problems with a new plugin, and I'm wondering if maybe it's an issue with the version too.

Thing is, I downloaded RPG Maker again just this year, and all of the posts relating to new versions are talking about 2018??
Needless to say I'm really confused. What is the latest version, and is there any way I don't already have it?"

Hi there! I answered you on the other question.

As far as I know, MV version is on 1.6.1 or 1.6.2(which is just a minor change to keep up with the Japanese version).

My plugins need to be on these versions:

Eli book 5.0.9

Button Common Events 5.2.2

I'm on 1.6.1 and here are the versions for both of your plugins.


Still doesn't seem to do anything, here is the setting in the plugin menu, there is nothing on the controller side of things.


One good thing though is at the moment I'm using an event that checks to see if X key is pressed, and I've also disabled the menu, and that's working just fine, so I have a solution for now. :)

I can't see a reason for it not working.

So I will need a sample project from you replicating the issue, so I can take a look and see what is the problem.

(1 edit)

You are using a old version of Eli Book.

The most recent version is 5.0.9. You are using 2.0.0.

The Button common events is on 5.2.2.

See if these versions will work. Here is a sample project:

https://1drv.ms/u/s!Ak26Cghab3Nhhf1zuhQyQAVk7eP6Fg?e=246HhJ

Edit: This sample project is only for MZ :(

I will update here later a MV version.

Hakuen, escrevi no local errado, mas agora estou aqui. Enfim, consegue me ajudar? Eu já tentei mudar entre várias teclas, mas não funciona. Você usa Discord, seria mais fácil contatar por lá.

Tranquilo ^^

Eu to resolvendo aqui. Fui testar o que você e o DecinBR me falaram e consegui fazer funcionar, mas acabei encontrando outros problemas quando uma tecla padrão é mapeada para chamar um evento comum. Então to resolvendo aqui. Hoje ou amanhã lanço uma atualização!

Olá, Hakuen! Eu vi que você atualizou o plugin, mas continua da mesma forma. Simplesmente nada acontece, independente do botão que eu use pra chamar o evento. Tirei prints pra você ver, talvez esteja faltando alguma coisa.

(1 edit)

Vish... Aqui funcionou tudo normal.

Fiz até um projeto te mostrando o resultado:

Compara aí um com o outro pra ver qual o problema. Porque no teu projeto não funciona e porque nesse que te mandei funciona.

[EDIT] Na verdade testa esse aqui com a atualização mais recente do Button Common Events e Eli Book:

https://1drv.ms/u/s!Ak26Cghab3Nhhf1zuhQyQAVk7eP6Fg?e=246HhJ

(2 edits)

Seu projeto funcionou perfeito, eu percebi que para funcionar, precisa abrir a página de comandos do controle, quando o valor fica "[ ]" funciona, mas se não tiver isso, não funciona. Foi o que eu percebi de diferente do seu projeto pro meu, eu mudei e funciona perfeitamente. Muito obrigado!!!

Haaa beleza! Valeu por informar amigo! É que ali precisa ter um valor padrão, e parece que eu esqueci de colocar no arquivo de plugin. Vou atualizar aqui, Valeu!!

E aí brother!
Primeiramente obrigado pelos plugins.
Então mano...

Eu tô usando seu plugin "Button common event" e a segunda opção de "remover"

parece não estar funcionando.

Opa!

Então, como que tu ta fazendo para remover? Pode mostrar uma screenshot?

O botão que você tá tentando remover é algum que o RPG Maker usa por padrão? Pode me falar qual a tecla?

Você usa o comando de remover, e quando você aperta o botão de novo, ele continua funcionando?

Então...

Eu criei um menu alternativo e usei o seu plugin para que quando apertar a tecla "esc" saia do menu, e depois que sai do menu alternativo, eu quero que a tecla "esc" volta a acessar o menu principal, mas nada acontece, mesmo usando a função remover...



Show! Valeu pela informação!

Acabei de atualizar o plugin e corrigi esse problema. Agora, no comando de plugin, você pode escolher se deseja restaurar a tecla ou não. Por padrão ele vai restaurar, mas você pode alterar se quiser!

Atualiza pra versão 5.2.0. Obrigado!

(3 edits)

Valeu man pela atenção e empenho.
Então mano...Atualizei o Elibook pra 5.8 e esse Button pra 5.2.0
Coloquei a tecla control e o z para ativar um evento e simplesmente n acontece nada, antes Funcionava, mas agora não.

Eita. Quando você diz ativar um evento, você diz um evento comum né?

Você tá adicionando as teclas pelo parâmetro de plugin ou por plugin command? Me mostra o screenshot de como você configurou.

Tu também pode me mostrar esse evento comum?

(1 edit)

Hmmm, ya that is a coincidence.

Hi there!

What is a coincidence? =O

(+1)

This is perfect for my new game update v1.3

Nice! Coincidentally, I have released a new version today! Take a look ^^

(+1)

Thank you for this plugin Hakuen Studio.

Hello, does it work on mv?

Hi!

Not, not for now. But I will try to implement it next month

(+1)

Hi, I'm new to trying to make my own game in rpg maker MV, and happened upon your plugins in my search to find tools to make my life easier when working on my game.  what are the odds, that you would be willing to add capabilities to use this for MV?  I am sadly currently unemployed, and unable to even attempt to donate or buy these, and am at the mercy of what I can find for free, but seeing as your so active on replying to comments, I figure I'll try my luck and find out.

Hi there! I will give this a try. I believe it's easy to make it work with MV.

You are amazing! Thank you so very much!

This is awesome! does it work with gamepad? or, are you planning to add gamepad support? (like a full input plugin)

(+1)

Nice suggestion! I will work on that! ^^

Hi! Any progress? :)

Hi there!
I'm sorry! I have forgotten about that, shame on me >.<
I have added this to my to-do list:
https://trello.com/b/ailZLwmT/plugin-dev

I will try to make it this week!

(+1)

Hi there!

I have released the 2.1.0 version which supports assign common events to gamepad buttons too! Thanks for the suggestion and sorry for the lateness xD

Hi! no problem! your work is great :)
I have a question, I was trying to make something like the "key input processing" command, would it be possible with this plugin? Like if I'm making a menu with pictures and I want to go to a new tab by pressing R2, is it possible to make something like this?


(+1)

If you are making a menu with pictures, I presume you are on the scene map. If you are on the scene map, you can use common events.
So you assign a common event to R2(RT) and do your thing there.

As for using it as a script call, like condition check, you need to know the button codes of the gamepad:

  • 0: A
  • 1: B
  • 2: X
  • 3: Y
  • 4: LB
  • 5: RB
  • 6: LT
  • 7: RT
  • 8: select
  • 9: start
  • 10: L3
  • 11: R3
  • 12: up
  • 13: down
  • 14: left
  • 15: right

After that, you can use a script call to check if a button is pressed:

Input._gamepadStates[buttonCode] > If this return true, means that this button was pressed. So for R3, will be:

Input._gamepadStates[11]