Gamepad Extender MVZ

● ARCHIVED · READ-ONLY
Started by Lone Wolf 39 posts Page 2 of 2 View original ↗
  1. I’ve been looking for a game pad plug-in that would work with MOGS chronoengine (abs) for RPG maker MV and how it handles its magic or “skills” system and other functions. Would this be able to implement that? On the keyboard it’s “s” but I want it to be “B” on the controller. Pageup and pagedown are for the items and skills menus, and I’d want those to be mapped to the LB, and RB buttons and so on and so forth. I’ve looked at so many controller plug ins and have even tried creating my own and each one won’t configure the commands I’m trying to implement to each button and Im really struggling because it seems the mapping won’t correspond to the correct keys on the controller or something? For example: both A and B on the controller are just the standard attack. X, and Y are the skills and items menus, and LT and start are the pause menu. I’ve tried different things to try and fix it, or look for something to lead me in the right direction but I’m still not able to implement the functions from the keys to the buttons on the controller if that makes sense?
  2. My plugin preserves the original controller bindings as well as allowing buttons to be referenced on their own, so at the very least Lb and Rb can already be read as PageUp and PageDown. A and B are OK and Cancel, and X and Y are Shift and Menu. So just checking those should be enough.

    As far as input plugins go, this one is pretty much meant to be identical to the core scripts in usage. I'm really not familiar with that particular ABS (I write my own), so I'm not really sure what it requires to configure. Cursory reading on these forums suggests it might be doing its own keyboard checks outside of Input, which would be terrible, so I can't help much there if that's the case.

    Did you already download and see how they work together?
  3. Lone Wolf said:
    My plugin preserves the original controller bindings as well as allowing buttons to be referenced on their own, so at the very least Lb and Rb can already be read as PageUp and PageDown. A and B are OK and Cancel, and X and Y are Shift and Menu. So just checking those should be enough.

    As far as input plugins go, this one is pretty much meant to be identical to the core scripts in usage. I'm really not familiar with that particular ABS (I write my own), so I'm not really sure what it requires to configure. Cursory reading on these forums suggests it might be doing its own keyboard checks outside of Input, which would be terrible, so I can't help much there if that's the case.

    Did you already download and see how they work together?
    Yes I did! I know chronoengine has specific key buttons on the keyboard that work, but implementing those keys into the controller has proven quite difficult. I’m struggling to figure out what I can do to fix my problem. With chronoengine, both “Q” and “W” are the same as “pageup” and “pagedown”. Both are items and skills menus for the engine.
    When testing, I’m trying to change around the layout to be able to detect the LB and RB buttons as Q,W/pageup, pagedown, because as of now on my gamepad they’re “X” and “Y”. For the X and Y buttons I wanted to implement X for attacking, (z key) Y for items (a key)
    B for skills (s key) A for sprinting/ event interaction. (Shift key) LT and RT for dodge and shield (both are with the D key)
    I made custom common events to map out each and every button but I can’t figure out how to implement them to your plugin. As I looked through the help files I got kind of lost figuring out what to do, however I did see that there was an option to bind keys via the parameters in your plugin but for whatever reason I’m not seeing the drop-down menu for the keys, just “analog as digital,” “advanced hold tracking” “advanced keyboard tracking” and “gamepad index”. I’m using RPG Maker MV for my engine.
  4. Gl4ss0nyx said:
    I made custom common events to map out each and every button but I can’t figure out how to implement them to your plugin. As I looked through the help files I got kind of lost figuring out what to do, however I did see that there was an option to bind keys via the parameters in your plugin but for whatever reason I’m not seeing the drop-down menu for the keys, just “analog as digital,” “advanced hold tracking” “advanced keyboard tracking” and “gamepad index”. I’m using RPG Maker MV for my engine.
    I downloaded this plugin and it doesn't look like it lets you reassign buttons from the parameters which means you would have to edit the plugin code (although the terms of use say you can't modify it?). You can do something like this from the engine but the original button functions assigned from the plugin are also in effect, so it ends up doing both whenever you press that button.

    You could also edit what key does what from the ChronoEngine plugin to accommodate the default keybindings for this plugin, but that would affect what key does what playing with the keyboard too
  5. For your test mode switch is anything in it? Also I checked which button presses are what in the WolfPadMVZ plugin and tried to correlate those to the chronoengine functions but I see that ‘cancel’ is B on the game pad and I would want that to be my item skill. However on chronoengine it doesn’t look like it will register the “cancel” button would there be a fix to that? And also for LT and RT it shows just those for controller input. How would I use that to prompt my events (it’s dodge and shield both using the D key)
  6. Gl4ss0nyx said:
    For your test mode switch is anything in it? Also I checked which button presses are what in the WolfPadMVZ plugin and tried to correlate those to the chronoengine functions but I see that ‘cancel’ is B on the game pad and I would want that to be my item skill. However on chronoengine it doesn’t look like it will register the “cancel” button would there be a fix to that? And also for LT and RT it shows just those for controller input. How would I use that to prompt my events (it’s dodge and shield both using the D key)
    The testmode switch is just any switch that is currently active to check for button input. Honestly I would just use Eli/Hakuen Studio's plugin over this one, especially if you can't edit the code in this. This doesn't let you assign common events to buttons, and I don't like having a parallel event running at all times checking for every button.
  7. Woah, hold up now. I'm sensing a reading comprehension failure here.
    AquaEcho said:
    Honestly I would just use Eli/Hakuen Studio's plugin over this one, especially if you can't edit the code in this. This doesn't let you assign common events to buttons, and I don't like having a parallel event running at all times checking for every button.
    You can edit the code all you want, just don't edit it and then redistribute it (outside of your game or script demo package) as your own work. There's also only so far I can support edits to the code, especially if a change breaks something. I've already helpfully redeclared certain core functions to that end, but nothing to solve the problem of mapping a single button to multiple discrete inputs simultaneously. Though, JavaScript being what it is, you can technically just override anything anyway.

    Going into a script thread to tell people to just use something else is also, I dunno, a choice? Though I will concede that if you're trying to do everything through common events, you're better off with something else. This plugin is basically an API improvement, and not for the scripting-averse.
  8. Lone Wolf said:
    Going into a script thread to tell people to just use something else is also, I dunno, a choice? Though I will concede that if you're trying to do everything through common events, you're better off with something else. This plugin is basically an API improvement, and not for the scripting-averse.
    Sorry, this is just the continuation of an ongoing discussion from several other threads Gl4ss0nyx has created or posted in asking for a gamepad plugin that supports ChronoEngine. For this particular use case I think another plugin would be better.
  9. I think the pain point might actually be the ABS plugin in this case. The core scripts don't track inputs by key, they detect input on specific keys (by ID) and map those to button aliases, precisely to allow flexibility. If the ABS allows binding keys beyond that, that would mean it's doing its own input tracking (or has extended Input.keyMapper somehow, the way I did with Input.gamepadMapper).

    Assuming it is working off of the standard keyMapper, then a potential fix would look something like this:
    Code:
    Input.keyMapper[65] = 'skill' // A
    Input.keyMapper[83] = 'item' // S
    
    Input.gamepadMapper[4] = 'skill' // Lb
    Input.gamepadMapper[5] = 'item' // Rb
    (This is, theoretically, a working plugin in 4 lines.)

    This maps the A and Lb buttons to a new input alias, 'skill', and S and Rb to 'item'. Then one could specify 'skill' and 'item' in the ABS config instead of the specific key/button name, and it would effectively treat them as the same input, though that would mean the shoulder buttons are no longer 'pageup' and 'pagedown' in menus.

    This is the best I can do based on my understanding of the situation, but it's technically doable without needing any extra plugins at all.
  10. Okay so I tried this code in a new plug-in script and now x and Y finally aren’t the menus anymore, but now I have no way to access those menus, and I still have no way to use my skills and items via the controller. They still work using the keyboard though do you possibly have anymore advice? I feel like I’ve tried everything and really want to implement controller support in my game if possible. I apologize for so many questions, I’m really passionate about making my game and am trying to learn as much as possible and figure things out the best I can
  11. Only advice I can give now is to try the same technique above for other gamepad buttons, until everything is mapped the way you want. I left my own map object (in my pad plugin) commented with the buttons corresponding to each ID (assuming XInput standard mapping), so just specify the buttons you do want as 'pageup' and 'pagedown' etc. to get that functionality back on another button. Can't write the code for you, but once you understand how simple objects work in JavaScript it should be pretty easy to figure out. Might be better to take further discussion back to general script support, but the good news is that what you want is really not as difficult to implement as you might think.
  12. Lone Wolf said:
    If the ABS allows binding keys beyond that, that would mean it's doing its own input tracking
    The ChronoEngine plugin parameters have you define a key for Skill which it stores in the variable Moghunter.ras_buttonSkill
    Moghunter.ras_buttonSkill = String(Moghunter.parameters['Skill Button'] || 's');
    then later checks if you're pressing the key or button assigned to that variable
    if (Input.isTriggered(Moghunter.ras_buttonSkill)) {return true};

    Same for the other buttons: items, attack, etc.
  13. I'm having an issue with the latest version. Having a Dualsense controller connected via Bluetooth crashes my game. The controller works when plugged in, and DS4 and Xbox controllers work both plugged and via Bluetooth.

    1714146164049.png
  14. Ah. That's a thing. The DualSense reports one fewer button in wireless mode (the mic toggle). I've update the script in the main post to account for that. It should be fixed now for both the DualSense and Edge.
  15. Lone Wolf said:
    Ah. That's a thing. The DualSense reports one fewer button in wireless mode (the mic toggle). I've update the script in the main post to account for that. It should be fixed now for both the DualSense and Edge.
    Looks like the version in the main post now is the initial release, 9/12/2020b, instead of the updated version.
  16. And, fixed. My IDE touched the timestamp on an older copy I keep for legacy reasons, so I didn't realize I was uploading from the wrong folder.

    Version should now be 2/20/2024c for real this time, as it's just a one-line bugfix.
  17. Just to check, I won't lose anything by commenting out console.log(gamepad); right?
    Else it absolutely floods the console making any other use of it impossible.
  18. Social_Knight said:
    Just to check, I won't lose anything by commenting out console.log(gamepad); right?
    Else it absolutely floods the console making any other use of it impossible.
    The console logs are supposed to be commented out anyway. If it's uncommented in the current release, I got sloppy. :eswt:
  19. Figured as much. Just wanted to be sure there wasn't some arcane purpose behind it. :D