- Mar 1, 2012
- Reaction score
- First Language
- Primarily Uses
FyxInputWhat? Another input module?
Yep, another, but not a normal one, by far. This one has features unknown to the RPG Maker community, until now.
Alright, what's the bells and whistles then?
The features follow below:
- Key input processing: press?, trigger?, release?, and repeat?
- You can disable RPG Maker keys, like F1, F12, Alt + Enter, etc. Best. Thing. Ever.
- Mouse support! Not for the actual game, in windows, but its there to be built from!
- It's faster and more efficient. The OS does a lot of the leverage-ing.
- Much more! Check the spoiler:
- Ability to manually check key states if you want.
- It's written in C. *** See below for details.
- The keys disabled still get passed to the engine, so you can use them for whatever!
- You can disable keys in-game too, using an add on.
- Simulate keystrokes, and mouse buttons, but not to the system; just to the game. Safety first.
- Key-To-Text processing. Currently, just English. I plan on adding Keyboard mapping (region specific characters, etc).
- Game instance specific. Does not get confused when another instance of the game is open. *** See below for details.
What does "Written in C" mean?
For those who don't know, C is the language Ruby is written in (Ruby is the language RGSS is written in). Using a system Wanabe from github wrote (and I fixed up), I've recreated loading C extensions into Ruby!
...game instance specific?
When most scripts are written for RPG Maker that use any API calls that would otherwise be process specific, they don't map the results to the specific process they are running in; if multiple copies of the same game are open, chances are one of the game's new script won't work, cause it got some other instance's id.
FindWindow(), a Win32API method found in user32.dll, finds a window by it's class and caption. For any RM game, that would be "RGSS Player", and the ini file's Title variable, respectively. However, when multiple instances get opened, things go awry. To fix this, I let the OS step through the windows until it reaches the game's process id, and it selects the first window from that, aka. the game window. This pretty much fool proofs finding the handle to the game window. For programmers who use this system, just use RPG::HWND to get the game's window handle.
Where's the goods?
Okay, okay. Enough wasting your time with talk and text. Here's the link:
The demo shows off most of the things useful from this script. Many peoples' pet pieve of the F1 / F12 keys is now dead. Can't stress how nice that is to say :B
How do I use this right?
Well, for starters, you'll find a dll in the main folder of the game called 'mscvrt-ruby191.dll'. This is LoadSo, or the majority of it. LoadSo allows C extensions to be loaded into RGSS again, so that's necessary.
Furthermore, there is a file called 'fyxinput.so' alongside this dll. That is needed.
Finally, just make sure the LoadSo script and FyxInput script, and any addons from the demo are installed. That means all of this:
- Two or more scripts from the demo.
What if I have suggestions? Any future plans for this?
By all means, let me know! I want to further this project and make it super-efficient, which means I'm definitely not done yet, so ask and ye might receive.
Here are some ideas for the future:
- Region-Based KeyToText
- Raise efficiency even more. This system was just created, now it must be optimized!
- AddOns! I want to write mouse compatibility for RGSS' windows, etc, but that will come in time.
- GamePad support. Not sure to what level.
This script is free to use non-commercially. You'll have to contact me should you wish to use it in your commercial game.
Fyx Per-Scene Key Disable
Last edited by a moderator: