设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 129|回复: 0

[转载发布] FyxInput

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 12:45:35 | 显示全部楼层 |阅读模式
    FyxInput
    FenixFyreX

    What? 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:
    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.
    Queries from the Features List
    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.
    Technical Description:
    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:
    DEMO 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:

    • msvcrt-ruby191.dll
    • fyxinput.so
    • Two or more scripts from the demo.
    are necessary for this to work properly.

    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.
    Terms Of Use
    This script is free to use non-commercially. You'll have to contact me should you wish to use it in your commercial game.

    Addons
    Fyx Per-Scene Key Disable


    本贴来自国际rpgmaker官方论坛作者:FenixFyreX处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/fyxinput.34073/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 11:39 , Processed in 0.135280 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表