[RM2K3 DYNRPG PLUGIN] KEYBOARD & MOUSE INPUT
Posts
Pages:
1
Hello everbody!
This is the first "official" (and hopefully useful) DynRPG plugin of mine.
You can find information about DynRPG here: http://rpgmaker.net/forums/topics/10254/
Source code and a demo project are included in the download.
Download: http://cherrytree.at/download/?did=21
Best regards,
Cherry
This is the first "official" (and hopefully useful) DynRPG plugin of mine.
You can find information about DynRPG here: http://rpgmaker.net/forums/topics/10254/
Source code and a demo project are included in the download.
readme.txt
This DynRPG plugin allows you to use the mouse and all keys in your game.
>>> In the "demo" folder you can find a demo game.
>>> In the "src" folder you can find the source code of this plugin.
INSTALLATION
============
1) Make sure the DynRPG patch is installed at your game: http://cherrytree.at/dynrpg
2) Copy keyboard_mouse_input.dll into your game's DynPlugins folder.
3) Add a section to your game's DynRPG.ini where you can set the options of this plugin (see below).
OPTIONS
=======
You can set the following options in your DynRPG.ini file:
KeyAAASwitch=BBB
----------------
Assigns a switch to a key. The switch will be ON when the key is pressed, otherwise it will be OFF. AAA is the virtual key code of the key, BBB is the switch ID.
For a list of virtual key codes, see here: http://cherrytree.at/misc/vk.htm
Example:
Key65Switch=2
Assigned the "A" key (virtual key code 65) to switch #2.
You may use the same switch for more than one key, in this case the switch will be ON if at least one of the keys is pressed.
MouseXVar=AAA
MouseYVar=BBB
-------------
Assigns two variables (AAA and BBB) to the mouse position (X and Y coordinates).
COMMENT COMMANDS
================
There are also two comment commands which can be used to check one key or all key at once (use them in event comments):
(NOTE: You may use the prefix "V" for parameters to have the value of the parameter read from a variable. You can also use more than one "V" prefix.)
@CheckKey XXX, YYY
------------------
Checks whether the key with virtual key code XXX is pressed and sets the switch whose ID is YYY to ON or OFF accordingly.
Examples:
<> Comment: @CheckKey V3, 4
Checks the key whose virtual key code is stored in variable #3 and writes the result to switch #4.
<> Comment: @CheckKey 68, 101
Checks the "D" key (key code 68) and writes the result to switch #101.
@CheckAllKeys XXX
-----------------
Checks all keys (except for the mouse buttons). If no key is pressed variable #XXX will be set to zero, otherwise to the virtual key code of the key which is pressed.
If more than one key is pressed, the key with the lowest virtual key code is used.
Download: http://cherrytree.at/download/?did=21
Best regards,
Cherry
Let's see if I understand this one. So basically, using this plugin, you can set a switch to key using some kind of coding that I don't know (lol) to any key (I actually need to ask something about that later...) that can be used repeatedly? So in other words, if you use this plugin, you can set it so that the Shift key will turn off or on a switch that controls say...switching parties or something similar?
Well, there are three ways to check keys with this plugin:
1) Using a switch<->key assignment
As explained in the "Options" section, you can, for example, assign key "A" (key code 65, see list) to switch 2. This means, if "A" is held down, switch 2 is automatically set to ON. If "A" is not held down, switch 2 is automatically set to OFF.
"Some kind of coding you don't know" is just a line in the DynRPG.ini configuration file.
2) Using the @CheckKey comment command
Using a comment containing the @CheckKey command (see readme file and demo project) you can check the status of one specific key and set a switch to ON (pressed) or OFF (not pressed) accordingly.
3) Using the @CheckAllKeys comment command
Using a comment containing the @CheckAllKeys command (see readme file and demo project) you can check the status of ALL keys and set a variable to the key code of the currently pressed key (does only make sense if the user shouldn't press more than one key) - you can compare this function to the "Key Input Processing" command of the RPG Maker
To get the mouse position, you have to choose two variables (X and Y), as explained in the "Options" section.
Mouse buttons are handled like keys, by the way. Left mouse button has key code 1, for example.
I'd suggest playing around with the demo project.
1) Using a switch<->key assignment
As explained in the "Options" section, you can, for example, assign key "A" (key code 65, see list) to switch 2. This means, if "A" is held down, switch 2 is automatically set to ON. If "A" is not held down, switch 2 is automatically set to OFF.
"Some kind of coding you don't know" is just a line in the DynRPG.ini configuration file.
2) Using the @CheckKey comment command
Using a comment containing the @CheckKey command (see readme file and demo project) you can check the status of one specific key and set a switch to ON (pressed) or OFF (not pressed) accordingly.
3) Using the @CheckAllKeys comment command
Using a comment containing the @CheckAllKeys command (see readme file and demo project) you can check the status of ALL keys and set a variable to the key code of the currently pressed key (does only make sense if the user shouldn't press more than one key) - you can compare this function to the "Key Input Processing" command of the RPG Maker
To get the mouse position, you have to choose two variables (X and Y), as explained in the "Options" section.
Mouse buttons are handled like keys, by the way. Left mouse button has key code 1, for example.
I'd suggest playing around with the demo project.
This is really interesting! But it doesn't really belong in the Help/Request section of the forum. You're not asking for anything.
This should be submitted as an article/tutorial, or better yet have Kentona create a 2k3 area in the scripts section.
This should be submitted as an article/tutorial, or better yet have Kentona create a 2k3 area in the scripts section.
Yes I know, I was just used to posting these smaller things to this forum because we did it this way in the past, it seems that more people see it this way. Of course it would be nice if we could move it somewhere else where it fits better (even better than game discussion and development...)
Also I had the impression that people don't look into the tutorialsnand/or downloads section that often...
Also I had the impression that people don't look into the tutorialsnand/or downloads section that often...
I dunno if there's stats to back up that statement of people not looking at tutorials section or whatever.
If it's a forum topic it runs the risk of getting buried over time and becomes harder to find. Search function does not find it, but google does.
If it's in the tutorial/article/script section it will be easier to find and they can be grouped together. If there is a listing for 2k3 scripts, DynRPG would be the only ones there and would serve as a very neat place for them all. I just think using the corresponding functions of the site is better. There may be many users who don't look at the forums at all.
In each topic you could include a table of contents with a link to every other topic to add visibility within RMN(or just link to your site).
Regardless of where it is, as long as you have them on your site it should be fine. That way anybody asking for them can be directed to your site. I assume you already do that?
If it's a forum topic it runs the risk of getting buried over time and becomes harder to find. Search function does not find it, but google does.
If it's in the tutorial/article/script section it will be easier to find and they can be grouped together. If there is a listing for 2k3 scripts, DynRPG would be the only ones there and would serve as a very neat place for them all. I just think using the corresponding functions of the site is better. There may be many users who don't look at the forums at all.
In each topic you could include a table of contents with a link to every other topic to add visibility within RMN(or just link to your site).
Regardless of where it is, as long as you have them on your site it should be fine. That way anybody asking for them can be directed to your site. I assume you already do that?
Yes. I will get familiar with the tutorials section and it would be really nice of kentona could add a RM2k3 DynRPG Plugins section, because I am going to create lots of plugins over time. By the way, they are not scripts.
Well, if it is not a script, and it has a download, I'd recommend using the Utilities.
http://rpgmaker.net/engines/rm2k3/utilities/new/
Visibility of Utilities is lower than scripts, but you can have a download with a Utility, and I plan on addressing the visibility issue in an upcoming update of RMN.
http://rpgmaker.net/engines/rm2k3/utilities/new/
Visibility of Utilities is lower than scripts, but you can have a download with a Utility, and I plan on addressing the visibility issue in an upcoming update of RMN.
Well, it's not really an utility either, it's something completely new... and I don't want to upload anything to RMN because of the update problem (and my download counter).
you can post a URL instead of a file (and what update problem?)
EDIT:
and these are totally utilities! An add-on or device for Rm2k3
EDIT:
and these are totally utilities! An add-on or device for Rm2k3
author=Cherry
I fixed a bug: In fullscreen, the mouse coordinates were wrong. Please re-download!
I know this is an old thread, but will this ever be a thing in the steam version of RPG Maker 2003 since DynRPG only works for 1.08 or below?
Even if it's just replacing keys such as C,V,B which are all used for Cancel, and it would be much more useful if they could be assigned to something else.
Pages:
1
















