cant get negative value for sixaxis remap, only + side

Gtuner Plugins support. MaxAim, MaxRemapper, Combo Magick, Game Rec.

cant get negative value for sixaxis remap, only + side

Postby silver237 » Mon Dec 01, 2014 8:24 pm

I can't figure out how to map accx for the negative value...only the positive or left turn value. ...since the accel functions only have one button to map in max aim DI...how do I map both accX +&- values to analog stick left & right? I'm using this on ps3 and a custom built arcade box...

Everything works very well... but i feel i may need a script that I can map +&- sides for acc: x, y & z (6 total directions) to any buttons or sticks as needed. But....I just don't know how to code.
User avatar
silver237
Sergeant
Sergeant
 
Posts: 8
Joined: Mon Dec 01, 2014 6:48 pm

Re: cant get negative value for sixaxis remap, only + side

Postby J2Kbr » Mon Dec 01, 2014 9:52 pm

yes, a script will be needed for that. I can help you making the script. Please attach your MaxAim layout (File -> Export Layout) and describe what are the mappings you need to make.

And, if possible, the "use case", just for me understand the context. Thanks.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: cant get negative value for sixaxis remap, only + side

Postby silver237 » Tue Dec 02, 2014 2:30 am

So im trying to remap:
accel X axis to right & left; then accel Y for up & down onto the RIGHT analog stick.

I also would like to be able to have the code built so I could remap the +/- sides for accel X/Y or Z axis to any buttons OR analog stick directions anytime i need to for any game. That part i could do at least once the frame of the code is built...i would just switch/add the names of the button or stick direction as needed per axis.


However... I still dont know what you mean by:
"And, if possible, the "use case", just for me understand the context. "

If you mean what game im playing it with or what inspired the need for the code..... its Killzone 2...where the R1/R2 is held then rotate the PS3 controller right then left to set a charge bomb.

Thanks millions for your help !! =)
Attachments
System Remapping (PS3).glf
I put at least one Right analog stick direction for accel X&Y just to get an idea of mapping
(7.5 KiB) Downloaded 200 times
User avatar
silver237
Sergeant
Sergeant
 
Posts: 8
Joined: Mon Dec 01, 2014 6:48 pm

Re: cant get negative value for sixaxis remap, only + side

Postby J2Kbr » Tue Dec 02, 2014 2:56 pm

Alright, this is the script I made:

Code: Select all
main {
    // Combine lRz+ (binded to CEMU_EXTRA5) and lRz- (binded to CEMU_EXTRA6)
    // and put the result in PS3_ACCX.
    set_val(PS3_ACCX, get_val(CEMU_EXTRA5) + get_val(CEMU_EXTRA6));

    // Combine lZ+ (binded to CEMU_EXTRA7) and lZ- (binded to CEMU_EXTRA8)
    // and put the result in PS3_ACCY.
    set_val(PS3_ACCY, get_val(CEMU_EXTRA7) + get_val(CEMU_EXTRA8));
}


And here your layout updated:
System Remapping (PS3).glf
(7.5 KiB) Downloaded 194 times


I was not able to test (I don't have this game) but it should be working. I assumed your right analog stick is on the DirectInput LZ and LRz.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: cant get negative value for sixaxis remap, only + side

Postby silver237 » Fri Dec 05, 2014 3:51 am

i'll try to explain what is happening as best I can. I ran the code, runs fine. However for extra 5&6 or 7&8 as i map the 4 directions, it still shows +100 max for BOTH directions of either X or Y axis when i move the analog stick. Still no sign of -100 max side of the Accel.

...but here is the weird thing, if I map say for example: ONLY ONE direction of the analog stick to BOTH 5&6 extras OR BOTH 7&8 extras...half that direction is 26 up to 126 POSITIVE then as i get to the middle of THAT SAME DIRECTION (as its analog spring like motion) it then flips into NEGATIVE 128 down to 56 at the end of that same full direction; as per the device monitor.

So say for example I choose analog stick "up" to map BOTH + & - X axis accel....if you start to push upward, it shows/slides #s in the device monitor starting at 24+ up to 126+ , then keep pushing the rest of the way up & it breaks over into -128 down to about -56 value in the device monitor at full upward hold of the analog stick. ODD! How would we fix this to where its more normal 4 way direction for + & - per axis ?? You can try this yourself & probably see what im talking about.

(btw..it does NOT do this odd thing when your code is NOT activated)
User avatar
silver237
Sergeant
Sergeant
 
Posts: 8
Joined: Mon Dec 01, 2014 6:48 pm

Re: cant get negative value for sixaxis remap, only + side

Postby J2Kbr » Fri Dec 05, 2014 10:29 am

Originally I made the script out of my head. The version below I tested using a controller, it should be working now!!

Code: Select all
main {
    // Combine lRz+ (binded to CEMU_EXTRA5) and lRz- (binded to CEMU_EXTRA6)
    // and put the result in PS3_ACCX.
    set_val(PS3_ACCX, get_val(CEMU_EXTRA5) + inv(get_val(CEMU_EXTRA6)));
    set_val(CEMU_EXTRA5, 0);
    set_val(CEMU_EXTRA6, 0);

    // Combine lZ+ (binded to CEMU_EXTRA7) and lZ- (binded to CEMU_EXTRA8)
    // and put the result in PS3_ACCY.
    set_val(PS3_ACCY, get_val(CEMU_EXTRA7) + inv(get_val(CEMU_EXTRA8)));
    set_val(CEMU_EXTRA7, 0);
    set_val(CEMU_EXTRA8, 0);
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to Gtuner Plugins Support

Who is online

Users browsing this forum: No registered users and 86 guests