T2:How can I substitute DD for Stickize() on the Wiimote?

Wiimote Tutorials, Configurations and GPC Scripts (mimicking FPS like in nintendo wii/wiiu).

Moderator: OFC-Giorgio

T2:How can I substitute DD for Stickize() on the Wiimote?

Postby TopSteer » Tue Jul 17, 2018 12:28 am

I am working on converting a Wiimote script by Robsterman02 (which uses some code written by Wimot3) into the base for an IRpointer aiming script for Sleeping Dogs.

The original script uses the Stickize() function, which has been deprecated in Titan Two.
I cannot find any scripts previously written for T2 which use the new DD feature for the Wiimote IR pointer, and I am afraid I do not know how to script that from scratch, myself.

Does anyone have a script which uses Diagonal Dampening functions with the WiiMote?

Thank you!

-TopSteer

ps. I saw someone mentioned in another post that J2Kbr might be willing to send the original, non-supported code for Stickize() if someone wanted to use it on the T2. Is that a possibility?
Wheels: :smile0902:
Logitech G29 (released 2015) with Driving Force Shifter
Thrustmaster Ferrari Red Legend Edition (released 2013)
Logitech Driving Force (released 2002)
User avatar
TopSteer
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Thu Jun 07, 2018 4:23 am

Re: T2:How can I substitute DD for Stickize() on the Wiimote

Postby J2Kbr » Tue Jul 17, 2018 6:44 am

TopSteer wrote:ps. I saw someone mentioned in another post that J2Kbr might be willing to send the original, non-supported code for Stickize() if someone wanted to use it on the T2. Is that a possibility?

Sure. :) Here it is:
Code: Select all
void stickize(int idx, int idy, int rad) {
    int val_x = (int) get_val(idx);
    int val_y = (int) get_val(idy);
 
    int abs_val_x = abs(val_x);
    int abs_val_y = abs(val_y);
 
    int h = (((abs_val_x > abs_val_y) ? abs_val_x : abs_val_y) * rad) / 100;
    int H = (int) round(sqrt((fix32)(pow(abs_val_x, 2) * pow(abs_val_y, 2))));
 
    if(H > h) {
        set_val(idx, (val_x * h) / H);
        set_val(idy, (val_y * h) / H);
    }
    return;
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 17911
Joined: Tue Mar 18, 2014 1:39 pm

Re: T2:How can I substitute DD for Stickize() on the Wiimote

Postby TopSteer » Wed Jul 18, 2018 9:06 pm

Thanks a lot!
I will implement this tonight.
Wheels: :smile0902:
Logitech G29 (released 2015) with Driving Force Shifter
Thrustmaster Ferrari Red Legend Edition (released 2013)
Logitech Driving Force (released 2002)
User avatar
TopSteer
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Thu Jun 07, 2018 4:23 am

Re: T2:How can I substitute DD for Stickize() on the Wiimote

Postby WorldBreaker78 » Sun Aug 05, 2018 3:24 am

TopSteer wrote:Thanks a lot!
I will implement this tonight.


Hello Topsteer did you the stickize script work? I am using the wiimote on T2 and cant get a script that gets the wiimote to move ir could you help me
User avatar
WorldBreaker78
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Sun Dec 13, 2015 5:26 pm

Re: T2:How can I substitute DD for Stickize() on the Wiimote

Postby teddy18 » Sun Oct 07, 2018 7:27 pm

J2Kbr wrote:
TopSteer wrote:ps. I saw someone mentioned in another post that J2Kbr might be willing to send the original, non-supported code for Stickize() if someone wanted to use it on the T2. Is that a possibility?

Sure. :) Here it is:
Code: Select all
void stickize(int idx, int idy, int rad) {
    int val_x = (int) get_val(idx);
    int val_y = (int) get_val(idy);
 
    int abs_val_x = abs(val_x);
    int abs_val_y = abs(val_y);
 
    int h = (((abs_val_x > abs_val_y) ? abs_val_x : abs_val_y) * rad) / 100;
    int H = (int) round(sqrt((fix32)(pow(abs_val_x, 2) * pow(abs_val_y, 2))));
 
    if(H > h) {
        set_val(idx, (val_x * h) / H);
        set_val(idy, (val_y * h) / H);
    }
    return;
}



I Copy the Script but it dont work is broken script
User avatar
teddy18
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 259
Joined: Sun Jul 19, 2015 4:18 pm

Re: T2:How can I substitute DD for Stickize() on the Wiimote

Postby J2Kbr » Tue Oct 09, 2018 3:19 pm

the above code is just the function, copy-paste it to your main script and call the function within the main block:
Code: Select all
stickize(STICK_1_X, STICK_1_Y, 142);
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 17911
Joined: Tue Mar 18, 2014 1:39 pm


Return to Wiimote, Nunchuk, Classic Controller & Sensorbar

Who is online

Users browsing this forum: No registered users and 23 guests