Yanfly Button Common Event & Yanfly Keyboard config not working

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
57
Reaction score
15
First Language
German
Primarily Uses
RMMV
Hi there,

I have the exact same problem as mentioned in this thread:


Unfortunately, it seems nobody had an answer to this question.
As I don't wanna necro the old thread, I made a new one.

Is there any possibility to get these 2 plugins work together?
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,308
Reaction score
443
First Language
Dutch
Primarily Uses
RMMV
when looked into the plugin, YEP_KeyboardConfig need to be BELOW YEP_BCE.
also, to alter the buttons, you need to use comment call.

<Config Key: text>
<Config Text: text>
<Config Required>

it uses one of those, if you use the first one, and omit the text, the name of the CE is called.
you need to read the helpfile to understand it though.

It's explained in there.
.
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
57
Reaction score
15
First Language
German
Primarily Uses
RMMV
Thanks, but I think this is not my problem.

If you look into the thread I linked, you can see the positions of the plugins are EXACTLY as they should be.

Unbenannt.png

The common event CAN be used, this is not the problem. But you CAN'T reverse them to normal state.
If you deactivate the Keyboard Config Plugin, everything is fine.
But then you can't remap the keys.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
So...you actually have a different problem? It looks like the thread you linked just says "these two plugins don't work together for me" (vague, I can see why it didn't get a response). Your issue is with the RevertButton and/or SwitchButton plugin commands from YEP_ButtonCommonEvents? :kaoswt:

It looks like YEP_KeyboardConfig deliberately disables those plugin commands:
JavaScript:
if (Imported.YEP_ButtonCommonEvents) {

Input._revertButton = function(button) {
};

Input._switchButton = function(button) {
};

}; // Imported.YEP_ButtonCommonEvents
Maybe there's an alternative approach you can take?
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
57
Reaction score
15
First Language
German
Primarily Uses
RMMV
Ok, you're right, sorry.
The linked thread says there is a problem, and I thought if one would try it, one would see. It's just 2 plugins and I thought Yanflys plugins would be very common. One could just re-build the problem in about 5 min oder so.

So let me clarify:

I like to use Yanflys keyboard plugin because it looks nice when the player wants to remap the keys. I tried other plugins but the layout isn't so nice. And it's easy to use, the player just clicks on the button to remap and gets a list of possible keybindings. -> If there is an alternative plugin with a nice and easy to use layout (so the player doesn't get lost) please tell me :)

In addition, I like to use Yanflys Button Common Events because I want to map some features (for example, press M to get a minimap, or to use a Quick Time Event with pressing keys).
Especially for the QTE - I'd like to turn off the keybindings and use them for the QTE. You don't need to move in the QTE, do you? You don't even can move because I stuck the player as long as the QTE is running.

So, best for me would be if the player can play the game with whatever keys they desire (WASD for example) and then in the QTE, the keybindings would change so I can make the player press keys (like W, or A, or U) to finish the minigame. That's why I wanted to use "reverse all" and "switch all" but they don't work if you use the keyboard plugin.

Thanks for pointing out where in the plugin the problem can be found. I guess the problem wouldn't be solved if I delete theses lines (tbh, I tried it).

Is anyone around who could these two plugins work together? I would even spend some money on it.
Or are there other plugins you could recommend?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
Ah, I see! I think that'll depend on how you're implementing the QTE. Is it a plugin? A looped Autorun event? Some other kind of event set-up? :kaoswt:

It may also depend on which keys you're using for the QTE, since Yanfly's plugin only allows bound keys to be recognised by the game, e.g. you can't just do Conditional Branch > Script > Input.isPressed('m') if the "m" key isn't currently bound to anything. I think this plugin provides full input, but I'm not sure if it's compatible with YEP_KeyboardConfig (if you want to try it, I'd suggest putting it near the top of your load order):

There's an easy way to "disable" unwanted button events: just turn on/off a switch before/after the QTE, and add a Conditional Branch to each event so that they do nothing if the switch is on. :kaothx:
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
57
Reaction score
15
First Language
German
Primarily Uses
RMMV
My QTE is fully evented, I just need the Button Common Events Plugin for it. It's playing in parallel process as soon as you talk to the NPC who starts it.
It doesn't matter what keys I'm using, since Yanflys both plugins don't work together.

Thanks for the DK plugin!
But sadly it does not work with the Button Common Events either :(

I just need the possibility to assign keys (just like Button Common Events) and give the player the chance to remap their keys if they want (just like the Keyboard plugin).
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
If the QTE buttons themselves are fixed then one option could be to redo the QTE event: have it detect the button presses and manually call the appropriate common event, e.g.
Code:
◆If:Button [Up] is pressed down
  ◆Common Event:QTE Button Up
  ◆
:End
◆If:Script:Input.isPressed('w')
  ◆Common Event:QTE Button W
  ◆
:End
Otherwise maybe someone else has some suggestions~ :kaoswt2:
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
57
Reaction score
15
First Language
German
Primarily Uses
RMMV
Thank you for the plugin!
Either I don't know how to use it or it does not work.

I set up a new empty project:

1.png

As I don't know how to setup the plugin, I left it as it was:


2.png

I made a common event to test it:

3.png

Ingame, switch 5 is ON:

4.png

But if I press j, k or l, nothing happens.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
It looks like it lists the DK Tools plugin as a prerequisite, so you could try adding that plugin as well. I'd recommend putting them at the top of your load order: DK Tools, then Full Input, then any other plugins (e.g. Keyboard Config). :)

If that doesn't work out (e.g. I think Yanfly's Keyboard Config might erase unbound keys when exiting the options screen? :kaoeh:) then an alternative could be to add the needed keys to the keyMapper mid-game. You could try this in a Script command at the start of your QTE (no plugins needed):
JavaScript:
// Iterate from ASCII 65 ("A") to 90 ("Z")
// Add any unmapped keys to the keymapper
for (var k = 65; k <= 90; k++) {
    if (!Input.keyMapper[k]) {
        Input.keyMapper[k] = String.fromCharCode(k).toLowerCase();
    }
}
This will add any unmapped A~Z keys to the mapper, so you can check them with the standard functions, e.g. Input.isPressed('f'), Input.isTriggered('g'), etc. (Those functions are part of the base code, no additional plugins required.) Works OK for me, but note that it's temporary, e.g. it won't persist after you close the game. It's probably a good idea to prevent the player from accessing the menu during QTEs. :kaoslp:
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
57
Reaction score
15
First Language
German
Primarily Uses
RMMV
I really appreciate your help, but I've given up.
Have been to much experimenting with alternate plugins (DK, Quasi, DMV Full Keyboard Input, ZE Key Mapper) for days - this is slowing my progress down and is making absolutely no fun at all.

As I wanna stick with Yanflys Keyboard Plugin, I will use the MV internal keys (left, right, Ok and so on).

Thank you very much for your help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I got tired of not having an avatar image. Couldn't think of anything cool. So I'm just using my game's antagonist instead... How original. At least both of our names start with C?
Expectation: Design/dev a game for the game jam | Reality: "These codes suck, why did I do it this way? lemme fix this. Also what if I add feature xyz because... well, I can."
Did my first script call in an event! :kaopride: It's completely useless and just because I thought it'd be cute if looking at clocks in-game made the character say the real-world time, but it's fully functional scripting and I did it all by myself!
Stream will be going live shortly! I will be playing Resident Evil 3 Remake, and then I will be switching to a session of the Interactive Text Adventure! Feel free to drop by!
Spent all day working on something that ultimately has nothing "flashy" to show at the end of it. But that sense of achievement...

Forum statistics

Threads
95,631
Messages
930,564
Members
125,938
Latest member
MartelStef
Top