Heavily Optimized RGSS Input System + Addons

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
Heavily Optimized Input System
By Dekita @ www.dekyde.com​
 ​
 ​
Features:

  • Optimized for use with RPG Maker Vx Ace
  • Mouse click && scroll detection
  • Removal of F key binds
  • Cheat system
  • Keylogger
  • More..

Detailed Features:

The purpose of this system is to create a more flexible && efficient Input module. One that is capable of detecting normal ace keys as well as custom user defined keys that can be added with ease.

Many (other) input scripts use loops(x256 - one for each key), and then within each loop iteration, they also perform calls to dlls to obtain keystates / asynckeystates etc. Furthermore, some of the other available input scripts I have found have iterated over a hash as well as a loop, which is just raw insanity...

Prior to version 1.7, this system did not use ANY of those techniques, yet still managed to obtain all required keypress information from one simple dll call per update (rather than the aforementioned hash && loop). As of version 1.7+ this system uses a custom dll in place of the previous user32 dll. The v1.7+ dll allows for MUCH more control over everything input related, compared to the previous versions of this system.

Many many new script calls have been created, and also almost every method has been rewritten with pure performance in mind - whilst keeping a sufficient level of control for the developer. Additionally, f1, f2, f12 and alt+enter keybinds can now be fully removed! This is one of the VERY few input systems that can do such things!!

And if that wasn't enough, this system also allows you to have 'cheat codes' that run any piece of code you want (calls code as a proc). The code is activated when all required keys have been entered in their correct order. I have set up many possible 'default cheats' such as; gain 9999 gold, gain all items, gain all weapons, gain all armors, max all party members stats, instant win battle, instant run from battle, walk through walls, resist death status, resist any other status, resist all status effects, 'open notepad file', 'load naughty webpage cheat', and of course, the all important 'bonus cheat' that can be used as a game completion code. Of course, you (the script user) can add onto this list of cheats as you wish.

All the cheat codes supplied within this script either perform script calls that are already within the RPG Maker VX Ace Engine or create a new method to efficiently perform the task with the script calls already supplied within the maker. Very few methods are aliased and none that should cause any kind of severe incompatibilities.

Credits:

Copyright © 2015 - Dekyde Studios
Dekyde Studios Developer: Dekita

 ​
Don't forget to show the love and hit that like button --> ^_^​
 

Mireneye

High Chromancer
Veteran
Joined
Dec 22, 2013
Messages
143
Reaction score
20
Primarily Uses
Just a heads up that the webpage says that you can try it for free or pay what you want. At the moment It's impossible to pay nothing for it. Not sure how you want to handle it. I'd love to try this out for my project. 
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
What a Heavily Long Download Process. ( ͡° ͜ʖ ͡°)

II. System Requirements:

------------------------

RPG Maker VX Ace.
YAY! My PC can handle this! ( ͡° ͜ʖ ͡°)

 

Okay, jokes aside~

Um... I totally got confused by all that stuff.

Do I need all of this? These files and stuff look kinda scary...

I want to be able to use more keys on keyboard (also remove 'F' keys) and that'd be great if I could use multiple gamepads (but that's optional). Can I use one or two scripts or I need to use all the scary looking dll files and such?

Just a heads up that the webpage says that you can try it for free or pay what you want. At the moment It's impossible to pay nothing for it. Not sure how you want to handle it. I'd love to try this out for my project. 
It is possible to download - in the price put "0" or donate if you want and then it will ask you for an e-mail address (which I totally disliked, since I just want to try this out)  *checking for spam... I see what you did there, well I don't need any of this for now *clicks unsub* (sorry, don't take it personal - I'm always getting rid of these things, thanks for putting that option in easy-to-find place)~ okay~* and then you'll be able to download. (=
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
As Rikifive mentioned, you can enter 0 to get the system. :)

The email address requirement, which can be bypassed by putting any old fake address, is mostly for those who want to keep up with any updates etc that I release. :D

If you are unsure of things, look in the demo project. That should make it seem a little less scary, and its also easy to see which scripts are required by others.. For example, if you only want to remove the f Keybinds all you need is the keycodes module, the main input module, and the footer script (or you could just use my game launcher which also removes default keybinds).

Hope that answers any questions/queries. :D
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Okay, I got this to work ~ so basically when I want to have more keys available then I need these:

> Dekyde (Kore) # What changes that provides?

> Dekyde::Keys # these two

> Dekyde::Input # are obvious

> Dekyde::Input::Footer # How does that work, why do I exactly need that?

> the DEK_Input.dll file # Would it be possible to run that file from 'System' folder to not have that floating around?

Right? What the dll file does exactly and how that all affects my game? Sorry for stupid questions I just want to understand how it works and what I'm putting in my game.

And in here:

#----------------------------------------------------------------------------- # RPG Maker Vx Ace Default Key 'Bindings'.. #----------------------------------------------------------------------------- # You shouldn't really change these unless you know what you are doing. # Just in case you do want to modify these, the format is shown below; # NAME = [array, of, virtual, key, codes] #----------------------------------------------------------------------------- DOWN = [*VK_DOWN] # Down arrow UP = [*VK_UP] # Up arrow LEFT = [*VK_LEFT] # Left arrow RIGHT = [*VK_RIGHT] # Right arrow A = [*VK_SHIFT] # ANY SHIFT key B = [*VK_X, *VK_ESCAPE, *VK_NUMPAD0] # X key, Escape, Numpad-0 C = [*VK_RETURN, *VK_SPACE, *VK_Z] # Return, Spacebar, Z key X = [*VK_A] # A key Y = [*VK_S] # S key Z = [*VK_D] # D key L = [*VK_Q] # Q key R = [*VK_W] # W key SHIFT = [*VK_SHIFT] # ANY SHIFT key CTRL = [*VK_CONTROL] # ANY CTRL key ALT = [*VK_MENU] # ANY ALT key F5 = [*VK_F5] # F5 key F6 = [*VK_F6] # F6 key F7 = [*VK_F7] # F7 key F8 = [*VK_F8] # F8 key F9 = [*VK_F9] # F9 key Can I modify / add more keys?

I'm asking, because the note above isn't that happy, seeing me trying to edit anything, so instead of testing and changing stuff around I thought it'll be better to ask you.

And to refer these keys in scripts I can simply use for example :Q :U :A :C :K etc. like other basic controlls?

Hmm... if yes, then it'll be great.

Also, how about using two controllers? Does that help the engine to notice, that I plugged in the second controller? Can I set different keys for controllers? If yes, then I'll be glad, that I didn't lied in that e-mail address input. ( ͡° ͜ʖ ͡°)

Basically something like this (my current settings)

P1 uses arrow keys to move and space to interact

P2 uses WSAD keys to move and Q to interact

And - when 1st controller will be plugged in, P1 can use either arrow keys or pad to move (pad has the same keys as in keyboard)

~ when 2nd controller will be plugged in, P2 can do the same as P1. # this is what I need, since it cannot be done by default

(Yes, I'm making a local multiplayer game and that feature would be nice to have)

Thank you for your time.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
The core script is actually not required by this system anymore - thanks for pointing that out. It will likely be removed from future updates of this system. :)

As you noticed, the keys module and main input module are the most obvious ones that would be required. The footer script is simply used to initialize the system after everything else has been defined, to reduce risk of people placing the scripts in an incorrect order. :D

If you wanted to hold the input dll within the system folder, that is fine, you just have to change the line within the main input script to properly direct the system to search that folder. What to do is make these changes - which will be in the next released update:

Change 1 - around line 158 of the main input script:

def setup_dll @@___dll ||= DL::dlopen(const_get:)DLL_Name)) @@___set ||= DL::CFunc::new(@@___dll['SetupInput']) @@___upd ||= DL::CFunc::new(@@___dll['UpdateInput']) end private :setup_dllChange 2 - at the top of the footer script:

#----------------------------------------------------------------------------- # Determines dll location: #----------------------------------------------------------------------------- DLL_Name = 'System/DEK_Input' #----------------------------------------------------------------------------- # !!!! DONT MODIFY BELOW !!!! #-----------------------------------------------------------------------------The dll file, to keep it simple, contains everything that makes the system work.. To expand a little further, the ruby variables are created and then passed into the dll, where they can be altered at the exact time of a keypress, which ruby can then keep track of.. The dll hooks into the game exe and restricts certain keys from ever reaching the game, such as F12, and also keeps a track of mouse movement, which the ruby inside ace can interact with, and thus, bring undelayed mouse support to ace!

With regards to controllers, thats something i have considered in the past, but never bothered adding. Might be something for a future update though. :)

For the addition of new custom keybinds, its possible, but fairly pointless. For ease of use, you can just pass a keycode key constant name directly, such as this:

Input.trigger?:)VK_A)Input.press?:)VK_A)Input.repeat?:)VK_A)Input.release?:)VK_A)The main reason those default ace keybinds are there, is to stop any errors happening from the default scripts. :)

If you wanted to implement a two player system, where two players can move freely on the map, that would have to be coded separately, but this system would provide the ability to allocate custom keys for each player, just not controller keys. :)
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Core

*removes the core*

*playtests*

*game crashes*

Actually, the game crashes without the core, so there is something to keep from there. ( ͡° ͜ʖ ͡°)

 
Footer
Oh I see, that's good. (=
 
.dll File Direction And Its Purpose
That did the thing, thank you. I like to have stuff sorted.
And nothing bad will happen after compressing?
 
So... nothing scary I guess? ( ͡° ͜ʖ ͡°)
 
Controllers?
If you could do that, I'd be more than happy. I'd really love to have that function.
Imagine how a little kid looks like when you give him sweets ヽ༼ຈل͜ຈ༽ノ - that's how I'd look like. 

Custom Keybinds

Oh I understand now. That's convinient.

So... I guess your script(s) do(es) the things I want. At first I was checking that thread multiple times and I was unsure of it, since it looked too serious/complex at the beginning, but thanks to Tsukihime I gave that a closer look and that turned out good as we can see. (=

Local Multiplayer

Don't you worry about that, I have everything prepared and working! =3

That's why I need more keys - just to be able to bind controls more properly.

And the main feature I'd love to have - Multiple gamepads.

Please, if you can, I really would be more than happy and your script would totally fulfill my needs. I'd be absolutely thankful, so please consider adding that feature.

Useless Comment

That's all I think, I'm glad you solved my problems. Great script(s)! ... and .dll! ( ͡° ͜ʖ ͡°)

Perhaps I should subscribe you to know if perhaps you'll decide to add that feature? ( ͡ᵔ ͜ʖ ͡°) Nah, I'm rarely checking e-mail, that's why I'm getting rid of these things, but I'll follow this topic. ( ͡° ͜ʖ ͡°)
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
oh, I see.. Then yea, the kore script is required to provide the dll with the required hwnd parameter, forgot all about that :D

And actually, this system has received quite a few donations since I made it free to use, so providing that continues, I will likely reward those donations by upgrading and expanding the system further. :)
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
oh, I see.. Then yea, the kore script is required to provide the dll with the required hwnd parameter, forgot all about that :D

And actually, this system has received quite a few donations since I made it free to use, so providing that continues, I will likely reward those donations by upgrading and expanding the system further. :)
I wish I had money to donate you as well, especially when there would be added multiple controller support, ( ͡° ͜ʖ ͡°) but I can't due to rl things. ( ͡° ʖ̯ ͡°) (and that's not because of my age ~ but of different location/currency and other difficulties)

I wish you the best though! (=
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
Tis all good, donations are not a requirement after all. ^_^

Just mentioning, the reason I released this update was due to the previous donations I had received, I felt it would be nice to award that kinda behavior :D
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
What are the terms of use of this script? I know your old ones were not free to use for commercial games so asking to be safe before I check it out.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
This particular system is free to use commercially. Full terms are in the script pack. :)
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Good to know. Just wanted to be sure before testing it out. Not sure if I'll use it in my first project due to how far along it is, but it sounds nice and will probably make it into my second.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Last time I checked your input script, it actually lowered my FPS quite a lot (got around 10-15 less), but this updated one is much better, no FPS drop at all. *-*

That HUD thingy with the mouse click function, it needs two clicks to bring up any of the menus. Is that intended or a bug? Not that I use mouse control, I'm just curious. 

I already set my game up with an in-game keyboard setting menu and I am lazy to change all the key checks again in the scripts (although I see it uses the default Input methods, so it wouldn't take that long), so I will most probably not use this one for that project, but it is certainly good to know that another keyboard input script is available with the disable Fx keys functions. I just hope I won't get that nasty bug with this one like I did with FenyxFireX's input script. 

And it's free to use as well, pretty cool! Thanks for sharing this with us!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
For the addition of new custom keybinds, its possible, but fairly pointless. For ease of use, you can just pass a keycode key constant name directly, such as this:
I do think it's not pointless, given that you would allow the user to set their own keybindings... I'm actually thinking of making it load the keybindings from an external options file so users can set their own keybindings. I'm still thinking how to do the options in the correct format in my game manager program though. :)

If you're going for a fixed keybinding, then yeah you could just use the keycodes directly.

This is of course unless you want to set up your key checks to load the keycodes from an external file instead. XD

so basically instead of doing something like:

Code:
def setup_keybindings  :A = #load from optionsendInput.press?(:A)
You'd do something like
Code:
Input.press?(load_from_options_file)
Personally, I'd prefer the keybindings so that the bindings are already saved into memory rather than loading the bindings everytime a key check is done.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
For the addition of new custom keybinds, its possible, but fairly pointless. For ease of use, you can just pass a keycode key constant name directly, such as this:

Input.trigger?:)VK_A)Input.press?:)VK_A)Input.repeat?:)VK_A)Input.release?:)VK_A)The main reason those default ace keybinds are there, is to stop any errors happening from the default scripts. :)
If multiple keys are bound to the same virtual keymap (eg: Z and Enter both do the same thing), it would be better to map it to a common binding rather than performing individual checks.

I'd rather just check whether :C has been pressed, rather than checking whether the Z key was pressed or the enter was pressed or the gamepad X was passed, or any number of alternate input methods that may be available.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
@Sixth - it should only require one click, I'll look into it. :)

@Engr. - thats a fair point.. Perhaps I'll write an addon to do that :D

Additionally, my dev control scripts, found here, contains an awesome ini file script, for reading from / writing to ini files. Not made a forum thread for those yet.. ^_^

@Tsuki - Yes, I do agree that if there was multiple keycodes to be checked, it would be easier to just create a simple shared constant (or binding, if you wanna look at it that way). :D
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
This particular system is free to use commercially. Full terms are in the script pack. :)
So this(-ese) is(are) (a) must-have script(s) and .dll. ( ͡° ͜ʖ ͡°) Ah forget

So this is a must-have system. ( ͡° ͜ʖ ͡°)

So I got confused - it is better to do something like this?:

DOWN = [*VK_DOWN] # Down arrow UP = [*VK_UP] # Up arrow LEFT = [*VK_LEFT] # Left arrow RIGHT = [*VK_RIGHT] # Right arrow A = [*VK_SHIFT] # ANY SHIFT key B = [*VK_X, *VK_ESCAPE, *VK_NUMPAD0] # X key, Escape, Numpad-0 C = [*VK_RETURN, *VK_SPACE, *VK_Z] # Return, Spacebar, Z key X = [*VK_A] # A key Y = [*VK_S] # S key Z = [*VK_D] # D key L = [*VK_Q] # Q key R = [*VK_W] # W key P = [*VK_P] # P key (NEW!) O = [*VK_O] # O key (NEW!) I = [*VK_I] # I key (NEW!) # and so on.. SHIFT = [*VK_SHIFT] # ANY SHIFT key CTRL = [*VK_CONTROL] # ANY CTRL key ALT = [*VK_MENU] # ANY ALT key F5 = [*VK_F5] # F5 key F6 = [*VK_F6] # F6 key F7 = [*VK_F7] # F7 key F8 = [*VK_F8] # F8 key F9 = [*VK_F9] # F9 key And refer to these keys using: Input.press?( :p ) etc. rather than Input.press?:)VK:p) ?

Yeah, there for sure is such a key. I meant:

And refer to these keys using: Input.press?() etc. rather than Input.press?:)VK:p) ?Also, Can I replace all the key bindings?

For example:

#NOPE X = [*VK_A] # A key#NOPE Y = [*VK_S] # S key#NOPE Z = [*VK_D] # D key#NOPE L = [*VK_Q] # Q key#YES X = [*VK_X] # A key - lol not anymore#YES Y = [*VK_Y] # S key - lol not anymore#YES Z = [*VK_Z] # D key - lol not anymore#( ͡° ͜ʖ ͡°) L = [*VK_L] # Q key - lol not anymoreOf course I know the game will go crazy without changing settings in all of the scripts, but it's doable - would that work? That would made my life easier.
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
For the default keybindings, yes, they can be replaced, but not fully removed, well, thats not true...

The constant MUST exist, but the array of keycodes can be empty, so the following is valid:

A = [] # Used to be: ANY SHIFT key B = [] # Used to be: X key, Escape, Numpad-0 C = [] # Used to be: Return, Spacebar, Z keyBut of course, then the default scripts, which use those keys to perform processing, such as command confirmation etc, would not be able to process, but if you are adding new keys to be used, as shown here:

A = [:VK_A] # Used to be: ANY SHIFT key B = [:VK_B] # Used to be: X key, Escape, Numpad-0 C = [:VK_C] # Used to be: Return, Spacebar, Z keyThen the user would have to press the A, B and C keys to trigger the respective in game keybind. Although, the C keybind is what triggers command confirmation, so that may be left to use the enter key, but these are just examples after all :D

Other than that, you should not need to alter any other scripts. ^_^

Additionally, if you are changing those default keybinds, I would recommend the use of my game launcher, which removes the game system menu, which offers a properties option, which shows keybinds which are would have been made invalid.. That can be found here.
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
I'll try few things - nothing worse than game crash can't happen. ^^

Um, the game launcher seems to do pretty the same things as this one... or not? I can change everything in base scripts, so I'll be okay w/o that right? I was never up to downloading/having any third party things, not just in RM, so I think I'll refuse on that one.

Let's crash my game then! =3
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top