Full Input - All keys of the keyboard and gamepad

● ARCHIVED · READ-ONLY
Started by DK 24 posts Page 1 of 2 View original ↗
  1. Title: Full Input
    Author: DKPlugins
    Version: 5.3.0
    Description:
    All keys of the keyboard and gamepad.

    Features:
    • Checking the press of any key on the keyboard or gamepad
    • Support for gamepad sticks and triggers
    • Enabling switches when you press a key

    Compatibility:
    • RPG Maker MV: 1.5+
    • RPG Maker MZ: 1.0+

    Warning from "Help"

    Default RPG Maker MV/MZ values for Alt, Space, Insert, Q, W, X, Z
    Alt: 'control'
    Space: 'ok'
    Insert: 'escape'
    Q: 'pageup'
    W: 'pagedown'
    X: 'escape'
    Z: 'ok'

    The values of this plugin for Alt, Space, Insert, Q, W, X, Z
    Alt: 'alt'
    Space: 'space'
    Insert: 'insert'
    Q: 'q'
    W: 'w'
    X: 'x'
    Z: 'z'

    # How to set WASD movement #
    Change settings for WASD buttons:
    W: up
    A: left
    S: down
    D: right

    Tested gamepads:
    Xbox One (wired and wireless) - 100%
    PS5 DualSense - 100% (experimental support)

    Instruction from "Help"
    Spoiler
    ###===========================================================================
    ## Added functions
    ###===========================================================================
    Added tracking of gamepad triggers pressing and axis tilts
    Tested on Xbox One Wireless Gamepad
    Use to get values:
    Input.gamepad.lt - left trigger (float value of the force of pressing in the range from 0 to 1)
    Input.gamepad.rt - right trigger (float value of the force of pressing in the range from 0 to 1)
    Input.gamepad.axes - axes (Array with 4 float values)
    The axes have the following structure:
    [X-axis (left stick), Y-axis (left stick), X-axis (right stick), Y-axis (right stick)]

    X-axis (any stick) is -1 when you tilt the stick to the left
    X-axis (any stick) is 1 when you tilt the stick to the right
    Y-axis (any stick) is -1 when you tilt the stick up
    Y-axis (any stick) is 1 when you tilt the stick down

    Input.preferGamepad () - Returns true if the player is playing a gamepad

    Input.isAnyPressed(keys) - Returns true if at least one key is pressed (keys not specified).
    Returns true if at least one key from the keys array is pressed (keys is an array of keys).

    Input.isAnyTriggered(keys) - Returns true if at least one key is pressed and released (keys not specified).
    Returns true if at least one key from the keys array is pressed and released (keys is an array of keys).

    Input.isAnyRepeated(keys) - Returns true if pressing at least one key is repeated (keys not specified).
    Returns true if pressing at least one key from the keys array is repeated (keys is an array of keys).

    Input.isAnyLongPressed(keys) - Returns true if at least one key is pressed for a long time (keys not specified).
    Returns true if at least one key from the keys array is pressed for a long time (keys is an array of keys).

    Input.getPressedTime (keyName) - Returns the time the keyName was pressed in frames.

    Input.virtualClick(keyName) - Emulation of pressing the keyName button.

    Input.resetKeyboardButtons() - Resets the keyboard buttons

    Input.resetGamepadButtons() - Resets the gamepad buttons

    If you create a plugin based on this:
    Before using any function, make sure that the user has installed the plugin:
    if (Imported.DK_Full_Input) {}

    Get plugin version:
    var version = Imported.DK_Full_Input;

    "Help" languages: English, Russian

    Terms of use
    You can:
    -To use the plugin for your non-commercial projects
    -Change code of the plugin

    You cannot:
    -Delete or change any information about the plugin
    -Distribute the plugin and its modifications

    Details on obtaining a commercial license on my website

    Plugin page:
    https://dk-plugins.ru/full-input/
  2. Plugin is publicly available :)
  3. what am I doing wrong here? in order to call the common event this script doesn't seem to do it

    controller control
    Screen Shot 2021-03-28 at 3.48.12 pm.png

    edit: I am having success with the keyboard keys, I can map keys from my keyboard to trigger switches that then trigger common events. However I cannot use my gamepad controller to trigger switches. Only the default buttons work, like they do without the plugin.

    Attemps
    Screen Shot 2021-03-29 at 9.36.01 am.png
    The 'Button Page Up" works. the script doesn't, no matter what gamepad button I try. Have I written the script wrong?

    I have also attempted to do this thru the plugin itself, by activating a switch with no luck.
    Screen Shot 2021-03-29 at 9.36.28 am.png

    somebody please help!
  4. cabanas_ds said:
    what am I doing wrong here? in order to call the common event this script doesn't seem to do it

    controller control
    View attachment 184182

    edit: I am having success with the keyboard keys, I can map keys from my keyboard to trigger switches that then trigger common events. However I cannot use my gamepad controller to trigger switches. Only the default buttons work, like they do without the plugin.

    Attemps
    View attachment 184248
    The 'Button Page Up" works. the script doesn't, no matter what gamepad button I try. Have I written the script wrong?

    I have also attempted to do this thru the plugin itself, by activating a switch with no luck.
    View attachment 184256

    somebody please help!

    ...this is what works best for me but only tested this to respond to this post
    Spoiler
    1617584705698.png
    Helpful?
  5. Hi!

    I have a question...

    When I use conditional branches to check for input from keys that have default RPG Maker uses like Z and Enter, or X and Escape it seems like it'll take input from both? (For example I have conditional branch that reads Input.keyRepeated(88), 88 is the X button, but if I press escape the same conditional branch runs.)

    I might be missing something here... but is there any way I can make this plug in look for, and ONLY look for X?
  6. jjraymonds said:
    Hi!

    I have a question...

    When I use conditional branches to check for input from keys that have default RPG Maker uses like Z and Enter, or X and Escape it seems like it'll take input from both? (For example I have conditional branch that reads Input.keyRepeated(88), 88 is the X button, but if I press escape the same conditional branch runs.)

    I might be missing something here... but is there any way I can make this plug in look for, and ONLY look for X?
    Input.isRepeated('x')
    it works ?
  7. DK said:
    Input.isRepeated('x')
    it works ?
    That string doesn't seem to work for me when I put it into the conditional branch, pressing X doesn't get detected.
  8. jjraymonds said:
    That string doesn't seem to work for me when I put it into the conditional branch, pressing X doesn't get detected.
    Do you have any other keyboard plugins installed?
  9. DK said:
    Do you have any other keyboard plugins installed?
    Ah you know what, I wasn't thinking about that, I am! I'm using the Yanfly button common event plug in as well. It was silly for me to not think about that, everything worked totally fine once I disabled the Yanfly plug-in.

    Unfortunately I need the Yanfly plug in, so I'll work around it.
  10. jjraymonds said:
    Ah you know what, I wasn't thinking about that, I am! I'm using the Yanfly button common event plug in as well. It was silly for me to not think about that, everything worked totally fine once I disabled the Yanfly plug-in.

    Unfortunately I need the Yanfly plug in, so I'll work around it.
    You can configure the switching on of switches when a key is pressed in the plugin settings, and in the common event put a trigger on this switch. Perhaps this will solve your problem?
  11. DK said:
    You can configure the switching on of switches when a key is pressed in the plugin settings, and in the common event put a trigger on this switch. Perhaps this will solve your problem?
    That very well might, I was primarily just running into this issue when working on a QTE mini game. I'll test it out and see if I can get it to work!

    I think I just have one other question now, at first I was shared this plug-in from another user. In the DKTools_Full_Input.js(v3.0), and DKTools.js(v1.1.0) help files it states that it is free to use in non-commercial AND commercial games:

    DKTools.js:
    ### License and terms of use ###



    Recent information about the terms of use: https://dk-plugins.ru/terms-of-use



    You can:

    -Free use the plugin for your commercial and non commercial projects.

    -Translate the plugin to other languages (inform if you do this)

    -Change code of plugin, but you must specify a link to the original plugin



    You can't:

    -Delete or change any information about plugin (Title, authorship, contact information, version and release)

    DKTools_Full_Input.js:
    #### License and terms of use ###



    Recent information about the terms of use: https://dk-plugins.ru/terms-of-use



    You can:

    -Free use the plugin for your commercial and non commercial projects.

    -Translate the plugin to other languages (please, inform, if you do this)



    You can't:

    -Delete or change any information about plugin (Title, authorship, contact information, version and release)

    -Change code of plugin out of border "Plugin settings" and "End of plugin settings" (if you found a bug contact me)

    I noticed at the top of this thread you posted that it was free to use for non-commercial, but for a commercial license I should check out your website. I tried checking out the website but I always get a timeout error.

    I don't know where my friend had gotten the plug-in so I just want to confirm. Are the plug-ins now free for commercial use? Or do I have to pay for a commercial license?
  12. jjraymonds said:
    That very well might, I was primarily just running into this issue when working on a QTE mini game. I'll test it out and see if I can get it to work!

    I think I just have one other question now, at first I was shared this plug-in from another user. In the DKTools_Full_Input.js(v3.0), and DKTools.js(v1.1.0) help files it states that it is free to use in non-commercial AND commercial games:

    DKTools.js:


    DKTools_Full_Input.js:


    I noticed at the top of this thread you posted that it was free to use for non-commercial, but for a commercial license I should check out your website. I tried checking out the website but I always get a timeout error.

    I don't know where my friend had gotten the plug-in so I just want to confirm. Are the plug-ins now free for commercial use? Or do I have to pay for a commercial license?
    This site won't open? https://dk-plugins.ru/terms-of-use/

    The terms of use are indicated in the first post:

    Terms of use
    You can:
    -To use the plugin for your non-commercial projects
    -Change code of the plugin

    You cannot:
    -Delete or change any information about the plugin
    -Distribute the plugin and its modifications
  13. DK said:
    This site won't open? https://dk-plugins.ru/terms-of-use/

    The terms of use are indicated in the first post:

    Terms of use
    You can:
    -To use the plugin for your non-commercial projects
    -Change code of the plugin

    You cannot:
    -Delete or change any information about the plugin
    -Distribute the plugin and its modifications
    The site wouldn't open for me, but I think it is my router/ISP blocking it because I was able to get in on another network.

    Thanks for clarifying, for some reason the files I was given say that they are free for commercial use! I'll probably be picking up a license in the next year or so, no where near close to shipping anything yet! :biggrin:
  14. Hi DK
    I have a question.
    Is there a conditional branch when the right stick of the gamepad is tilted down or up?

    Input.gamepad.axes --axes (Array with 4 float values)?

    I'm worried because I don't know how to do it.
  15. imcatman said:
    Hi DK
    I have a question.
    Is there a conditional branch when the right stick of the gamepad is tilted down or up?

    Input.gamepad.axes --axes (Array with 4 float values)?

    I'm worried because I don't know how to do it.
    Y-axis of right stick is the most recent value in Input.gamepad.axes
    As soon as you begin to deflect the stick upward, this value begins to decrease from 0 to -1, where -1 is the total deflection of the stick. When you move the stick down, the value increases from 0 to 1.

    You can use the following conditions:

    ◆If:Script:Input.gamepad.axes[3] === -1
    ◆Text:None, None, Window, Bottom
    : :Right stick up (full)

    :Else
    ◆If:Script:Input.gamepad.axes[3] === 1
    ◆Text:None, None, Window, Bottom
    : :Right stick down (full)

    :End

    :End
  16. Thanks!
    It reacted as intended!
  17. On the site when I tried to purchase the license it said 35,00$. Does that mean it is going to cost $3,500 or $35.00? I was also wondering if I purchase the license, I would get the plugin?
  18. KazukiT said:
    On the site when I tried to purchase the license it said 35,00$. Does that mean it is going to cost $3,500 or $35.00?
    $35.00
  19. DK said:
    $35.00
    One more question, what controller does it work on? e.g. PS4, Switch and/or Xbox
  20. KazukiT said:
    One more question, what controller does it work on? e.g. PS4, Switch and/or Xbox
    I tested on an Xbox One controller. Handling sticks and triggers works. I will also try to test it on PS5 DualSense.