Improved Input System

Status
Not open for further replies.

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
Will this work on a usb - controller for pc?
 
Joined
Aug 12, 2012
Messages
164
Reaction score
78
First Language
English
Primarily Uses
usb-controller?

If you're referring to an Xbox360 or PS3 controller being plugged in via usb; yes they will work.

If you're referring to some other controller type; it may work; and if so it'd most likely be using the PS3 Controller Mapping.
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
Last edited by a moderator:
Joined
Aug 12, 2012
Messages
164
Reaction score
78
First Language
English
Primarily Uses
Wait, none of them work? Or just the Logitech Controller?

I'd be far more interested to know what Operating System you're using. XInput came with the DLLs I provided so that shouldn't be an issue.

That said, if it's not working, it's not working. I don't have a Logitech Controller of my own to test with.

One more thing, place this code snippet somewhere in your scripts section. It'll tell you if it's detecting your controller. You'll need to Allow it to show the console though (option is in the Game Menu of the editor).

Code:
class Scene_Base  alias upinput update  def update    upinput    p("XboxControllerConnected = " + Input.xbox360_input.connected?.to_s +      "     PS3ControllerConnected = "  + Input.ps3_input.connected?.to_s)  endend
 

Sakif X9

Level 99 Persona User
Veteran
Joined
Jan 4, 2015
Messages
87
Reaction score
12
First Language
English
Primarily Uses
What are the supported operating Systems? I tried it on Windows 8.1 and it said the dll was missing.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
If a dll is missing, you could possibly download it. Just beware on where you get it,
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
This would be awesome but just can't get it to work. For some reason it just doesn't recognize the controller. Without this script the Xbox 360 controller works fine, with the script the controller stops working. I added the script and put both of the .dll to system folder. Any ideas what could be wrong?
 

diablodevil2

Villager
Member
Joined
Aug 5, 2013
Messages
22
Reaction score
3
First Language
English
Primarily Uses
This would be awesome but just can't get it to work. For some reason it just doesn't recognize the controller. Without this script the Xbox 360 controller works fine, with the script the controller stops working. I added the script and put both of the .dll to system folder. Any ideas what could be wrong?
Yea, likewise. I double checked all the issues that the error message comes up with (Having DX installed, the dll, etc.), and it's just not going. I'm using Windows 7 Ultimate.
 

Tayruu

・ ゚*。・゚(幸)
Veteran
Joined
Apr 27, 2014
Messages
38
Reaction score
63
First Language
English
Primarily Uses
RM2k
This is the same problem I'm having for both 360 and PS3 controllers - even when the DLL seems to be in the right place, it just can't load the DLL. By removing the scripted error message, I get a Runtime Error, LoadLibrary, regarding IsConnected = Win32API.new('System/ps3_controller.dll', 'ConnectedController', '', 'n'), or similar for the 360 controller line. I think it's applied to all the Win32API calls though, not just the "is this connected" check.

I'm also using Windows 7, Home Premium.

I also get an error with evented button checks. I have a parallel process that checks if the C button (keyboard Z) is pressed, and get this error:

Line 1484, NoMethodError occurred.

Undefined method [] for nil:NillClass.

The line is return @@input_mapping[sym][:pc_keyboard].any?{|k| @@keyboard_keys.press?(k)}
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
This is the same problem I'm having for both 360 and PS3 controllers - even when the DLL seems to be in the right place, it just can't load the DLL. By removing the scripted error message, I get a Runtime Error, LoadLibrary, regarding IsConnected = Win32API.new('System/ps3_controller.dll', 'ConnectedController', '', 'n'), or similar for the 360 controller line. I think it's applied to all the Win32API calls though, not just the "is this connected" check.

I'm also using Windows 7, Home Premium.

I also get an error with evented button checks. I have a parallel process that checks if the C button (keyboard Z) is pressed, and get this error:

Line 1484, NoMethodError occurred.

Undefined method [] for nil:NillClass.

The line is return @@input_mapping[sym][:pc_keyboard].any?{|k| @@keyboard_keys.press?(k)}
Try this:

#------------------------------------------------------------------------------|# * Edit module: Input |#------------------------------------------------------------------------------|module Input class << self # Added to map the event key codes to their corresponding key symbols Event_Key_Codes = { 2 => :DOWN, 4 => :LEFT, 6 => :RIGHT, 8 => :UP, 11 => :A, 12 => :B, 13 => :C, 14 => :X, 15 => :Y, 16 => :Z, 17 => :L, 18 => :R } #--------------------------------------------------------------------------| # Alias method: press? | #--------------------------------------------------------------------------| alias press_fix? press? def press?(sym) # Rewritten to convert event key codes to corresponding key symbols first press_fix?(sym.is_a?(Integer) ? Event_Key_Codes[sym] : sym) # end # press? end # selfend # Input
The root cause is the rewritten press? always assumes all of its callers will only pass key symbols to it, but command_111 in fact passes key symbol code(an integer corresponding to its key symbol) instead.
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Added the above Module, Downloaded Direct X, and I have the newest Windows 8 version Laptop. Yet I keep getting;

Screenshot (35).png

Screenshot (36).png

_________________

Don't get me wrong, I turn the controller bits to false, it works perfectly. But when I want to try the controller bits, I get that error [and the Dll's are saved in the system folder]. So ... should I just keep the Controller options as set to false so I  can use the program, or is there a way around this error? 
 
Joined
Aug 12, 2012
Messages
164
Reaction score
78
First Language
English
Primarily Uses
Hello Mods,

Can I ask for this thread to be deleted?

This script only works on certain kinds of PCs. I did have plans to try and improve compatibility with other operating systems but never got around to it.

As a result of not improving script performance. This script is only dead weight and is likely giving a false sense of hope to whoever is looking for such a script and coming across this.

As a result of this, I think it's better to just remove the thread.



Thanks
 

Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
Marked for deletion
DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE

ehm... sorry, I apologize, I couldn't resist... :(
hope you guys don't mind since it's going to be... DLETEEEEEEED
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP
We don't delete topics, so allow me to close this one for you.

Closed at OP's request

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top