[RM2K3] XINPUT/XBOX 360 CONTROLLER INTEGRATION

Posts

Pages: 1
I've posted about this plugin randomly a few times before, and figure it'll get more exposure here as opposed to a plugin submission (plus I'm switching everything over to github for my own sanity). So without further adieu, here it is!


XInput/Xbox 360 Controller Integration======================================
v1.2
For RPG Maker 2003 with DynRPG v0.20 or higher
By PepsiOtaku


This plugin enables full support for Xinput-based controllers, including the Xbox 360 controller family (guitars, drums, dance pads, etc).
Wireless controllers require the Xbox 360 Wireless Gaming Receiver for Windows
http://www.amazon.com/Xbox-360-Wireless-Gaming-Receiver-Windows/dp/B000HZFCT2/

Wired controllers work as-is assuming you have the drivers installed. They are found here:
http://www.microsoft.com/hardware/en-us/d/xbox-360-wireless-controller-for-windows

This plugin supports key-bindings via virtual keycodes set in DynRPG.ini. See virtual_keycodes.txt for a full list of values.
It also has full rumble support, set via comment command, with numerous settings. See Installation section below for more details
about the keybindings.

Also, the Guide button is SUPPORTED. Microsoft doesn't allow for this out of the box, but there are ways to circumvent that.
However, it is recommended to disable Microsoft's "XboxStat.exe" process (battery popup) in the task manager to remove any conflicts
between the key binding you define, and the battery popup.
You can also disable it completely via msconfig (Start > Run > "msconfig" > Startup Tab > Uncheck XboxStat.exe). I'm working on a better solution for a future version of this plugin. You can also choose not to set any keybindings for it.

The Guide button also integrates with my Game Jolt (www.gamejolt.com) plugin as its default value to call the game jolt menu
is set to Shift-Tab. In that menu, you'll see achivements & leaderboards (like Steam or Google Play).
As of 3/4/15, the plugin is not yet released, but is VERY close. I just need to fix one bug and do some beta testing for it. Stay tuned!

NOTE: Xbox One controllers do not work with windows yet. If/when they do, I'll look into supporting them.


Download:
https://github.com/rewrking/xbx_controller
Edit: It can be found here now: https://github.com/rewrking/DynRPG-plugin-archive

See the readme for the full details, installation instructions, and run-down of comment commands (there's 7). It's capable of a ton of neat little things that are all explained there.

Assuming you followed the directions correctly, it should work with default keybindings out of the box. Feel free to ask me any questions!


What the plugin doesn't do yet:
-Right now, analog sticks are bound to keys like a D-Pad would be. I need to add a way to pass the analog axis to variables if you want that sort of thing. It would allow for that whole analog precision thing, but it would take a helluva game to require something like that. I'll add it when I have time though...

-At the moment, it only supports 1 player, but it should be fairly easy to add more. Again... that whole time thing...


What this plugin will never do:
-Xinput virtual keyboard stuff... Xinput has its own keyboard key detection, but it's not really needed since 2k3 has a keypress detection function, and WINAPI has keypress detection functions

- I think Xinput also has some kind of legacy controller support, but that might be a lot of work to add that in since it uses different byte values and stuffs. I don't even know how I would test it.
Awesome XD

how about some generic old school usb controller? would that work too?
Great question -- No. The controller is most likely DirectInput based, so it would need a way to convert DirectInput calls to Xinput. Maybe try this?
http://www.umnotablogger.com/gamebox/content/1122-tutorial-how-to-make-your-generic-controller-emulate-the-xbox-360-controller.html

I have to learn more about DirectInput myself, but I can probably try to add support for that at some point.
Actually, logitech controllers seem to work anyway. At least, on XP from what I've seen. I vaguely remember playing Oracle of Tao with this. The buttons were a bit funny, but it seemed mostly okay.
Yeah, I remember using an old USB controller to play rm2k3 games as well. I can't remember the brand, not sure if that matters. I do remember the buttons being a bit odd, because you couldn't configure them obviously, but it worked like a charm. I'm guessing DirectInput is windows/PC default driver for such things?
Yeah, DirectInput is depreciated (out of date essentially) now that XInput exists. DirectInput basically hasn't been changed since DX8.
Hey guys. I updated the plugin with some important stuff:
1.2 - Fixed some bugs with Analog stick mapping, added Analog axis output to variables (works just like the trigger axis)
1.1 - Added onDrawScreen handling for input as well, for future plugins that use scene numbers greater than 8 (for my Game Jolt plugin)[/quote
The link is broken!
Pages: 1