Jump to content


Photo

Gamepad Extender VX

WolfPad gamepad input controller multiplayer vibration

  • Please log in to reply
5 replies to this topic

#1 Lone Wolf

Lone Wolf

    Tsundere

  • Early Adopter
  • 248 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 13 June 2012 - 07:33 PM

Gamepad Extender
VX Edition - 1.0a
by Lone Wolf

Introduction:
A port of my previous Gamepad Extender script, now for VX. This script provides an alternate gamepad interface, giving scripters access to all 16 buttons on a modern gamepad, as well as dual-analog sticks, analog triggers, and force-feedback controls. Also enables multiplayer for up to four players with compatible gamepads.

Features:

  • Doubles the number of available buttons.
  • Easy access to analog sticks and triggers.
  • Basic force-feedback control.
  • Support for up to four controllers simultaneously.

Video:
See other thread.

How to Use:

  • Paste in Materials (or Modules) section.
  • Configure to your liking.

Demo:
None. It's a scripting tool only.

Script:

Spoiler


FAQ:

Q: "Not plug-and-play"? What does that mean?

A: Rather than risk the core instability caused by overwriting the default input module, I wrote a new module for handling gamepad-specific functions, so your scripts (and the defaults) will need to point to the new module for those features (like the extra buttons) to work. A couple minutes and CTRL+SHIFT+F are all you need.


Q: What controllers will work?
A: Any PC-specific USB controller made in the last five years should work without issue. Older controllers, console controller adapters, etc. will need XInput drivers or an XInput emulator. Google is your friend.

Q: No Guide button?
A: No Guide button. It uses a separate interface from XInput and is generally reserved by the system.

Q: Can you make this work in...?
A: This is the VX version. The VXAce version can be found here. I am not planning any further (back)ports at this time.

Credit and Tanks:
-Lone Wolf
-An old forum post on Win32API I clearly should have bookmarked.

Author's Notes:
-This script is an advanced scripting tool, meant to enable functionality not possible in the standard libraries. It will do only as much as your own RGSS knowledge allows.

-Although all core functionality remains the same, some features and calls function differently in this version due to language differences between RGSS2 and RGSS3. See the comments for details.

-This script is still a work-in-progress. Feel free to suggest features and fixes.

Updates:

(2/15/13) - Fixed a syntax error caused by IP.Board's auto-formatting of code blocks.
(7/25/12) - Fixed an issue with incorrect packet handling on certain drivers.
(6/13/12) - First VX version.


Edited by Lone Wolf, 15 February 2013 - 01:12 PM.


#2 jesse120

jesse120

    Master Eventer, Novice Scripter, Pathetic Spriter

  • Members
  • 5 posts
  • Primarily UsesRMVX

Posted 13 June 2012 - 11:20 PM

Thank you for converting this but I have a problem. When I push down on the analog stick the character moves down(that's normal) but when I push the stick up he moves down.... What??? Why??
Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number 10519195120
I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.
Also please don't put this number on any of your own posts or topics
The ultimate video game
Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list
If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.

#3 Lone Wolf

Lone Wolf

    Tsundere

  • Early Adopter
  • 248 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 13 June 2012 - 11:44 PM

That's... definitely not an issue with my script. Open up game controller properties in the Control Panel under devices and see that the stick is calibrated properly. You may also want to try changing MOVE_WITH_STICK to false in the PadConfig section.

#4 Adon

Adon

    ADONKADONK

  • Members
  • 59 posts
  • LocationMichigan
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 July 2012 - 08:49 AM

A question, if the player is using a controller that doesn't have a rumble pack, will there be problems in game? I personally do not have a controller that doesn't rumble, so I can't really test it.

#5 Lone Wolf

Lone Wolf

    Tsundere

  • Early Adopter
  • 248 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 09 July 2012 - 07:56 PM

With the way XInput works, motor information is sent no matter what, and controllers that can't handle it simply won't do anything with it. No errors whatsoever and no additional checks required. The flip-side is there's no way to check if a controller is vibration-enabled, so just program as if everyone's controller is and the people with $10 dollar gamepads will get over themselves.

#6 Lone Wolf

Lone Wolf

    Tsundere

  • Early Adopter
  • 248 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 25 July 2012 - 09:46 AM

Update released. This should fix any issues with Input.trigger? handling on picky driers (like the ones I was using). That nobody caught it before me shows how much this is being used. Ah, well.





Also tagged with one or more of these keywords: WolfPad, gamepad, input, controller, multiplayer, vibration

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users