Turan's Christmas Calendar - Day 7

● ARCHIVED · READ-ONLY
Started by ATT_Turan 72 posts Page 4 of 4 View original ↗
  1. ATT_Turan said:
    There is no "how to do it" - the plugin is not coded to do what @Angy1910 is asking about. It's written to make a button press activate the targeting process of a skill, not move between the window elements of a scene.

    The basic portion of parsing input to defined keypresses is there, but everything else would require completely new code to be written.

    I won't say I'll never consider it as an add-on, but it's not a simple addition or something you can just find a way to manipulate on your own.
    ok...
  2. Thank you for providing the dev volume control! OuOb
  3. Thanks so much for making the keyboard input thing! I needed that badly.
  4. Hello! I know this is a pretty old thread, but I was hoping I could still get help. I put plugged in the keyboard input plug-in, but once I did I started getting an issue where it immediately calls the naming function again. It wasn't doing this before I added the plug-in, so I'm a little confused how it happened, did I perhaps forget to add a supporting plug-in? I'm using RPG Maker MV btw
  5. Lexi_Ludology said:
    I put plugged in the keyboard input plug-in, but once I did I started getting an issue where it immediately calls the naming function again. It wasn't doing this before I added the plug-in, so I'm a little confused how it happened, did I perhaps forget to add a supporting plug-in?
    None of the plugins in this thread have any other plugin dependencies, and the keyboard input plugin doesn't call any scene functions, so I don't see how it's possible for it to cause the problem you describe.

    However, all of the regular processes for getting help apply:
    - Make sure you saved your project and started a new game (not loaded a save) when testing
    - Share screenshots of the event that's causing the problem
    - Describe exactly the sequence of events. I have a mental image from "it immediately calls the naming function again," but that might not actually be what you mean since that's not RPG Maker terminology
    - Look at all other plugins in your project to see if anything else might be trying to change the same code. If you're not sure, you can post a picture of your plugin manager and ask for help
  6. ATT_Turan said:
    None of the plugins in this thread have any other plugin dependencies, and the keyboard input plugin doesn't call any scene functions, so I don't see how it's possible for it to cause the problem you describe.

    However, all of the regular processes for getting help apply:
    - Make sure you saved your project and started a new game (not loaded a save) when testing
    - Share screenshots of the event that's causing the problem
    - Describe exactly the sequence of events. I have a mental image from "it immediately calls the naming function again," but that might not actually be what you mean since that's not RPG Maker terminology
    - Look at all other plugins in your project to see if anything else might be trying to change the same code. If you're not sure, you can post a picture of your plugin manager and ask for help

    Here's my Plugin Manager, yours is the only one I've added on top of the starting ones :yswt:
    Screenshot 2025-11-10 214517.png
    This is the event that calls it:
    Screenshot 2025-11-10 214615.png
    Basically, the issue I have is that, once I press the OK button in the Name Input Processing window by having it selected and hitting "Enter", it enters the text, but then the window for name input processing immediately reappears. When I have my Common Event call in there, it calls the Common Event, and then it reopens the name input processing afterward. I tested it by removing the "Common Event : Check For Spell" line, and it still just keeps doing the same thing. The name input processing window will close upon clicking "OK" and then immediately reopen. Whenever I disable your plug-in, the problem goes away. It seems like maybe there is an issue that causes the "If : Button [Shift] is pressed down" line to be read as "true" indefinitely, as each time the Name Input Processing is pulled up, it also executes the lines after it in the if statement. Sorry, I don't really know RPG Maker terminology, as I'm very new to using RPG Maker, and I usually just end up using whatever programming terminology comes to mind :yswt:
  7. I'll leave it up to Turan to determine if there is a problem here, but a couple things:
    1) my own curiosity, why are you using the script box and placing script comments in there? There is a comment event command you can use. But that's not really relevant, just my own curiosity.

    2) Try replacing the isPressed conditional with the isTriggered conditional. The problem is that when you are running parallel, if you are even a millisecond too slow to lift your finger off the key, then it will still think you are pressing the key.
    isTriggered is not an available option in the conditional branch by itself, you'll need to use the script:
    Input.isTriggered(buttonName)
    so your OK button looks like this:
    • Input.isTriggered('ok')
    and cancel is this:
    • Input.isTriggered('cancel')


    I suspect a lot of the problem comes down to you using a parallel event for this.
    Have you tried just manually triggering the name input box through an activate event just for testing?
  8. TheAM-Dol said:
    I'll leave it up to Turan to determine if there is a problem here, but a couple things:
    1) my own curiosity, why are you using the script box and placing script comments in there? There is a comment event command you can use. But that's not really relevant, just my own curiosity.

    2) Try replacing the isPressed conditional with the isTriggered conditional. The problem is that when you are running parallel, if you are even a millisecond too slow to lift your finger off the key, then it will still think you are pressing the key.
    isTriggered is not an available option in the conditional branch by itself, you'll need to use the script:
    Input.isTriggered(buttonName)
    so your OK button looks like this:
    • Input.isTriggered('ok')
    and cancel is this:
    • Input.isTriggered('cancel')


    I suspect a lot of the problem comes down to you using a parallel event for this.
    Have you tried just manually triggering the name input box through an activate event just for testing?
    1) Thank you for pointing out the comment event command, because I literally just didn't know it existed ;_;

    2) I'm not really sure how to code conditionals in RPG Maker's script, as I have very little experience (basically 0) using RPG Maker's built-in functions in JavaScript. I'm assuming that if statements would look the same as they do in JavaScript?

    if (Input.isTriggered('shift')) {}

    Although I'm unsure how I would put the regular event commands inside of the scripted if statement. Having the name input processing linked to a button-press anywhere in the level is something that is very important to me, so I don't think I could use an Action Button activated event for it, even if that caused the issue I was having to go away. I figured it might possibly be an issue like you mentioned, where, since it is checking for "isPressed", it will trigger for every 6 frames you have it pressed, but I don't think that that is the issue, because I do not have that issue when I have Turan's keyboard plugin turned off.
  9. Lexi_Ludology said:
    I'm assuming that if statements would look the same as they do in JavaScript?
    Well...uh...yes, but sorry, I should have been more clear.
    You can make the standard conditional event command parse a script as it's condition.
    Select the conditional event command, and on tab 4, the very last choice is a "script" selection box. From there you can insert any JS evals.

    In this case, you are evaluating if the key has been triggered, or in other words, been tapped/pressed once. isPressed evaluates whether the key is being pressed - it is continuous.

    There might be an error within the plugin, I'm not sure. Like I said, I'll leave it up to Turan to actually determine that.
    But for now it's good to just try some of these things for debugging.

    So, like I said; try using isTriggered.
    Also, try running the name input from a normal event that runs on activation and not a parallel event. This isn't to fix your problem, it's just to determine the source of the problem.

    edit:
    by the way, speaking of using JS, in the script box event command you can run a
    console.log() command for debugging. Like any console log command, you can pass strings, variables or switches into it to check what is going on.
    pressing f8 or f12 will open the console to read what is being output. Maybe putting a console.log can help you debug some too.
  10. TheAM-Dol said:
    Well...uh...yes, but sorry, I should have been more clear.
    You can make the standard conditional event command parse a script as it's condition.
    Select the conditional event command, and on tab 4, the very last choice is a "script" selection box. From there you can insert any JS evals.

    In this case, you are evaluating if the key has been triggered, or in other words, been tapped/pressed once. isPressed evaluates whether the key is being pressed - it is continuous.

    There might be an error within the plugin, I'm not sure. Like I said, I'll leave it up to Turan to actually determine that.
    But for now it's good to just try some of these things for debugging.

    So, like I said; try using isTriggered.
    Also, try running the name input from a normal event that runs on activation and not a parallel event. This isn't to fix your problem, it's just to determine the source of the problem.
    Ah! Okay, I think I figured out the issue thanks to your suggestions for testing. So, when I used the isTriggered boolean instead of the isPressed boolean, it did seem to mostly resolve my issue. However, I noticed that, once the name input processing tab closed, I was sprinting as if I was holding down the "shift" key. I then tried putting the name input processing on an action event, and I did not have that issue. I think the keyboard plug-in might interact strangely with the regular key input functions in the game. If you're pressing a key when you pull up the name input processing window, then that key's "isPressed" variable is never flipped off. Pressing and releasing the key again updates this and fixes it. There must be some modification that the plug-in makes to the name input processing function that overwrites a part of it that updates the isPressed boolean for each key or something. Thank you very much for helping me troubleshoot this!
  11. Lexi_Ludology said:
    I think the keyboard plug-in might interact strangely with the regular key input functions in the game. If you're pressing a key when you pull up the name input processing window, then that key's "isPressed" variable is never flipped off.
    I will look into this.

    As a side note, one other error in your script calls that @TheAM-Dol didn't catch is you should never use leading zeros when referring to a value. Doing that causes JavaScript to parse it as an octal value, rather than a decimal one.

    That is to say, $gameActors.actor(2) not $gameActors.actor(002)

    You were lucky that the numbers you're using there are small enough to have the same value in octal and decimal, but other numbers would've made your code behave unexpectedly or crash.

    Edit: The first post has been updated with version 1.3 of Keyboard Entry. This resets the state of the Shift key when entering the name processing or number input screens (which you didn't do anything with, but would've had the same niche bug).

    It functions as expected in my testing.
  12. ATT_Turan said:
    As a side note, one other error in your script calls that @TheAM-Dol didn't catch is you should never use leading zeros when referring to a value. Doing that causes JavaScript to parse it as an octal value, rather than a decimal one.

    That is to say, $gameActors.actor(2) not $gameActors.actor(002)

    You were lucky that the numbers you're using there are small enough to have the same value in octal and decimal, but other numbers would've made your code behave unexpectedly or crash.
    Ah, yeah, I do remember seeing someone say something like that somewhat recently. I wrote those lines a month or two ago, so I probably wouldn't have caught that if you didn't point it out :yswt: Thank you! I'm very new to using any kind of software like RPG Maker, so I'm definitely still learning