Integrating SteamInput with RPGMaker VXAce

What I'm directly trying to do is get a single, consistent and remappable controller scheme\system that reliably supports all controller types. It seems like various folks have solved various parts of the problem, but there isn't a great uniform solution that handles all controller types. Notably, I think VX Ace natively supports PS controllers, but not XBox. Wolfpad supports XInput == Xbox controllers (and most other generic ones), but not PS.

What I've done is glued Zale's key management system to Wolfpad, layered on top of the native VX Ace input, which gives me support for all controller types (I think - hard to fully test). But, it's pretty Frakenstein. More importantly, I do not know how to create a single unified control remapping UI b/c VX Ace's native stuff uses a Win32 popup and does its key mapping internally. So, I can't trigger the popup from in-game UI, nor can I read the mapped values to drive my other input mechanisms from their UI, as far as I know.

To that end, SteamInput seemed like it might be an interesting option. If anyone has thoughts or recommendations about a different approach, I am all ears 🙂

Assuming SteamInput isn't insane, does anyone have rough advice about how integrating it would look? As far as I can tell, SteamInput is part of SteamWorks, which is effectively a dll that I'd drop into my game install dir. Then (I think?) I could use the native interop stuff (which many of the other input solutions use) to make calls into that dll, a la

Win32API.new("XINPUT9_1_0", "XInputSetState", "IP", "V")

And from there on out, it's a bunch of steam specific call patterns. Has anyone looked into this? I am a developer, but I don't work much in ruby outside of what I've done in VX Ace, so Ruby\Win32 interop is a little outside my area of expertise. Any suggestions, thoughts or ideas about whether I'm headed off into crazy town would be greatly appreciated.

FWIW, if folks can help me get this thing working, I am more than happy to release it on the forums for other people to use. There is a solution already for MV, but it's using jscript.
In case anyone else ever finds this: after mixed success, I've decided to abandon the effort. I have succeeded at initializing the steam APIs, detecting controllers (oddly unreliably) and reading the steam bindings. However, I couldn't get the actual read input routine to return something I could sensibly unmarshall, and (worse) it became increasingly unclear how you'd even bind Steam Input to keyboard commands. Since the entire point (for me) was to replace the slapdash conglomeration of RPGMaker and custom scripts I have reading input with a single, reliable thing, the project seems fairly pointless if I'd still need to read keyboard input myself.

All that said, if anyone else has a burning desire to pick up the project, message me and I'm happy to send you the code I have so far as a starting point. FWIW, this script will never be plug-and-play because Steam Input requires a ton of per-game setup before you can use it. But, if it seems right for your game, I'm happy to offer what I've got.

I also have an input reading script that integrates a heavily modified version of Zale's stuff with Wolfpad, layering legacy RPGMaker input (for PS controllers) and allows for dynamic key binding (which is, AFAICT, about the best you can do short of something like SteamInput). If you think you'd like to make use of that, lemme know and I can try and package it up in a consumable form.

Original thread: https://forums.rpgmakerweb.com/threads/integrating-steaminput-with-rpgmaker-vxace.142931/