first part of the script that will make this work, assuming the last part of it works the way i want anyway...
Controller(GamePad) Universal Compatibility Mod
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
first part of the script that
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
updated version, now includes
updated version, now includes hotkey functions.
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
Ok so basically I decided to
Ok so basically I decided to dig around inside the NVSE source files, I ended up finding a reference to a file called DInput.h
Naturally I googled it, and I found a copy of the file which basically seems to find information on which controller the player is using, which version of DirectX they have and manages the buttons. Only issue is, I cannot really read this script at all to be honest.. I only picked up the gist of the functions.
from what i can see I will need to know the script language used, the controller used (?) and also the version of direct x the game supports, which i believe is directx8 (based on info in the NVSE scripts).
I am attaching text from the file to this post in a txt file
I changed the name to add the prefix "thisis" and the extension "h" is in the name rather then where it should be.
I plan on trying to decipher it myself, but if anyone wants to take a crack at it, go ahead.
I have noticed once possible pattern already..
#define DI8DEVCLASS_ALL 0
#define DI8DEVCLASS_DEVICE 1
#define DI8DEVCLASS_POINTER 2
#define DI8DEVCLASS_KEYBOARD 3
#define DI8DEVCLASS_GAMECTRL 4
That block seems to match a game setting that looks something like "fVanityMode", I cant remember the specific line but it seemed to denote if the game was using the keyboard or gamepad mode, i think if we set that line (once i find the actual name for it) to 0, it might allow both the keyboard and gamepad to be active at once. rather than having to swap between them. Ofcourse this is just a wild guess, but its worth looking into i think.
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
I am going to try every scan
I am going to try every scan code at the bottom portion of that txt file until something lights up, Ill post if i find anything.
Edit, actually better idea. I will adapt the control code finder script I have, and change it to search for scan codes with a control associated with it.
From there if any light up I can disable it and see which button it was on the gamepad (if applicable)
if none light up, well in short I try the above line on the documented preset scan codes from the DInput txt file I attached to my previous post and see if disabling the key does anything.
Edit..
have attached the results of the first 6Million ScanCodes, (was going to be 10Million but game froze and stopped the script right between the 6M and 7M progress points I placed in the script..)
I will resume the scancodes from the 6M mark next time, since i know those are done.
Edit...
Nothing was found between 6Million and 10Million. So aside from the ones that popped up in the first 600 (in the text document attached to this post) there appear to be no scan codes associated with a control. That doesnt mean they arent there though, it just means they arent flagged.. which I kind of expected tbh.
At this point I will assume that I will not find them, and will proceed with taking preset scancodes from the DInput.h file I found, and disabling them one by one until a button gets disabled, if a button does get disabled, it should give me somewhat of an idea of where to look for the remaining codes.
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
Important Info (for my set up
Important Info (for my set up atleast) Found
See attached file for my controller subtype and values to look for inside of the DInput.h file
if you want to check my info, here is the page i found it on...
http://msdn.microsoft.com/en-us/library/windows/desktop/hh405052(v=vs.85).aspx
If i can find the corrosponding "key" (inside the DInput file) that goes with the control on the gamepad it should shed some light on this, i hope.
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
JaxFirehart
- Posts: 3003
- Joined: Wed Sep 12, 2012 12:33 am
A55 - Use the edit button.
A55 - Use the edit button. Double posting is against forum rules.
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
Some more important info.
Edit, sorry didnt refresh page before posting this one and missed your message.
I will try to remember about the double post thing.
Some more important info.
This attachment is the XInput.h file
Ok I am going to see if i can piece together all of this new info into a plan.
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
I finally managed to wrap my
I finally managed to wrap my head around how to utilize Luthien's NVSE plugin for this mod, I should be able to finish it soon now.
Truthfully it was a fluke that i figured it out, i was working on my under barrel mod and accidently got it working, now i just need to adapt the method and im good.
Thank you Luthien for all your hard work, this is gona be awesome and finally controllers will get keybind ability.
*Edit*
Hit another snag, Ill post if/when its resolved
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA
-
TJ
- Posts: 2181
- Joined: Mon Sep 17, 2012 1:06 pm
A55K1KA wrote:Truthfully it
[quote=A55K1KA]Truthfully it was a fluke that i figured it out[/quote]
Didn't I pretty much give you a fully functional demo of the mostly complete mod I already did? I've since updated the code and given it to luthien. He should get first crack at releasing a controller mod for Lutana.
My project Dash is on Kickstarter!
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
I believe you did pass
I believe you did pass something like that on to me at one point, though i was abscent minded on the subject back then.. I mean Luthien pretty much spoon-fed me information vital to completing it.
Ive hit a snag in game-mode anyway and cant see anyway around it, I got it to recognise the hotkey setup in MCM but it just wont work in a gamemode setting.
I see your point that I shouldnt slot-in and steal that from Luthien, Ill hold of on this until he's done.
Also when i said "it was a fluke that i figured it out" i wasnt intending to discredit anyones assistance or anything, was more refering to my head finally working correctly and i was able to understand how to use the various functions Luthiens plug-in added.
**Mod on hold for the time being**
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA