Yeah, every time you hit "Copy -> Paste" in programming you need to take a step back and think before proceeding.
Controller(GamePad) Universal Compatibility Mod
-
JaxFirehart
- Posts: 3003
- Joined: Wed Sep 12, 2012 12:33 am
-
A55K1KA
- Posts: 120
- Joined: Thu Apr 03, 2014 6:32 am
luthien, dont take this the
luthien, dont take this the wrong way...
but...
I FUCKING LOVE YOU RIGHT NOW! (NO HOMO)
Ill change the script pattern to that, as it was i had to feed the script into the game in 500 ish line chunks, reason being i hit the cap for script size (737 lines)
in short if i were to actually implement my script fully to what i had set up i would actually be running 40+ scripts at once. also the reason why i was doing it the way i was, is because i didnt know enough about scripts to realise there was a different way to go about it.
I guess having a unique mind set has its up and downs lol.
any way thanks for the script adjustment, i will let you know if it turns up any results, or if bethesda softworks tech support sends me the codes before that..( I was planning on this being very slow so i send them an email asking for assistance finding the codes.. figured it wouldnt hurt to have a back up plan in the works too).
Edit..
the attached script has since been changed again, i see what i did wrong, you dont need to point it out lol.
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
Here is the first set of
Here is the first set of results and a txt file showing the script i was using.
basically from the results i can determine one of two things...
That the gamepad controls are not in the range of 0 to 999,999 OR the game was running to slow to accurately measure this correctly.
to put in perspective how slow the game was going during the tests...
Those results show when the script completed its 999,999 loop, each time it did it printed a line saying counter reset.
i was in game for about 5 minutes, everything was delayed by atleast 10 seconds as soon as the script kicked in.
I am going to run it again after dinner with a lower number (ill start around 50k, but ill make multiple esp files so i can swap quickly between scripts after each test).
Also if anyone has a GamePad / Controller and wishes to help me find the codes, please let me know and ill send you a batch of the esp's i make.
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 need a way to make the
I need a way to make the script only check when i press an actual button else i cannot be 100% its not being missed due to lag issues.
I have a plan but i want to run it by someone first, see attached TXT files..
The Reference Notes file is basically just to make understanding the additions a little easier, rather than making you search for their values yourself.
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 new plan, the codes dont
ok new plan, the codes dont seem to exist... ( i have checked the codes up to and including 0 to 999,999 with not a single confirmed code).
so.. I will basically re make the controller as this example indicates.
1st disable all player controls save for movement, aiming and shooting. ( i would rather not deal with variables like those right now)
2nd I would use the bitmask codes from Luthiens NVSE plugin (Link near top of the page) to find any and all controller button presses
3rd I create a proxy link to the normal controls, by basically doing a function if the game finds a combination of the gamepad buttons are being held or pressed. (that will be the framework for my hotkeys aswell as regular controls)
4th I will need a counter measure for the disablecontrols command, since it would no longer work with this set up.
5th Adapt my hotkey script to work with Set Keys, this will allow the player to re position their other modded hotkeys over them and activate it on the hotkey i set up. (for example, i set a hot key for Y on the keyboard, if you were to place lets say the grenade hot key function on that key, you could activate it with my hot key button combination).
thats what i have planned right now, as far as i can see it would be very doable.
if i forgot anything or should add something, please let me know.
@ Luthien or anyone else that knows scripting better than myself for that matter, if you are interested in being a direct part of this, let me know. (more than happy to share the workload and credit those who help in anyway)
Ill be getting started on my plan tonight maybe, if not tomorrow. Ill post if i hit an issue or if anything changes.
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
Found a major flaw already,
Found a major flaw already, disabling player controls doesnt behave as i expected, i still need to get the control codes...
or make some way of making that game think there is no gamepad input and then somehow making it think the gamepad is actually the keyboard... or an extension of the keyboard, which would mean adding new control codes manually which i dont know if that is possible or not.
or a set scancode button, which would be awesome, but again may not be possible..
i am running out of ideas very quickly now..
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 will hate myself a little
I will hate myself a little if this works...
I will DISABLE all the control flags using DisablePlayerControls 1 1 1 1 1 1 1 (the number of 1s was in my head so i will correct that if it was wrong)
That is the ONLY way i can think of to get the controller functions useless.
From there I will quite litterally remake the controls (WITH custom set control codes and scan code if this works)
Basically there is a command to check if a control is linked to anything, I willl place that command into the script that Luthien came up with, which will basically print any and all codes that are NOT Used.
based on the results on that script i will use the SetIscontrol command, and use an empty control code and scancode (a bogus scan code that will never work)
This in essence will create a new control with a dummy or fake key attached. (assuming it accepts the line)
This will then allow you to set a function to the control code i provided (assuming mods have that code built in to its script)
Then all i need to do is expand my hot keys to basically re make EVERY SINGLE controller output in the game. (easy right?)
So... Thoughts? :D
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
Might be worth adding, if
Might be worth adding, if (using the bit mask for luthiens mod) a controller button was pressed i would activate the controls for a brief moment as to allow the command through, i dont think this would ever work otherwise.
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
Current plan (after a long
Current plan (after a long talk with grib and several other modders here)
Disable controls save for movement and looking.
Set my functions to use various keys on the keyboard (only if the controller is active if possible)
Script the keys to be disabled.
make a script that will detect the button press of the controller (requiring Luthiens NVSE plug) and enable the controls associated with it for the duration and then disable them right after.
This in the end if it all works correctly, will allow the keys on the controller to be 100% reconfigured save for the stick layout and most normal controls which would need to be preset (unless i learn how to make a MCM menu).
If anyone has a suggestion or request for a partiular control layout (normal control config) please post here with the specifics on the layout.
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
Created a concept for the
Created a concept for the default controller layout, which basically shows the keys i have changed and the keys i changed with conflict, the keys that the game uses for the keyboard by default.
It should give you guys a general idea of how it will play in the end.
In That It's One Of The Few Things
That One Can Truly Wrap Their Head Around"
-A55K1KA