SOLVED: Wii remote/nunchuck ALPHA

Wiimote tutorials, configurations and GPC scripts (FPS like in Nintendo Wii/WiiU).

Moderator: OFC-Giorgio

SOLVED: Wii remote/nunchuck ALPHA

Postby mark » Fri Dec 26, 2014 1:43 am

Hi Guys,

Just wanted to thank the guys responsible for the hard work in getting these scripts going, its much appreciated.

I have looked hi and low for a script with the "alpha" settings, and I cant find one> is there a reason no one has attempted to create one? I wish I knew how to do it, so I can give it a try, but I don't know how. has anyone seen an ALPHAS script for wii remote??

thanks
User avatar
mark
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Sun Dec 14, 2014 1:39 pm

Re: Wii remote/nunchuck ALPHA

Postby OFC-Giorgio » Fri Dec 26, 2014 6:55 pm

Can you describe the alpha settings? I believe it's only a bit different than the bravo settings.
User avatar
OFC-Giorgio
Lieutenant
Lieutenant
 
Posts: 344
Joined: Mon Sep 15, 2014 4:26 pm

Re: Wii remote/nunchuck ALPHA

Postby mark » Fri Dec 26, 2014 7:57 pm

Only difference being on alpha....the -button sets the tactical, and shake nunchuck to reload. Bravo, minus reloads, and tactical is silly......+button and shake/twist remote
User avatar
mark
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Sun Dec 14, 2014 1:39 pm

Re: Wii remote/nunchuck ALPHA

Postby OFC-Giorgio » Sat Dec 27, 2014 2:09 pm

mark wrote:Only difference being on alpha....the -button sets the tactical, and shake nunchuck to reload. Bravo, minus reloads, and tactical is silly......+button and shake/twist remote


In my bravo script all wiimote/nunchuck buttons/moves you mentioned are covered (but mapped to another ps/xbox buttons) except for the nunchuck shake but that is almost the same scripting like the twisting wiimote.
User avatar
OFC-Giorgio
Lieutenant
Lieutenant
 
Posts: 344
Joined: Mon Sep 15, 2014 4:26 pm

Re: Wii remote/nunchuck ALPHA

Postby mark » Sat Dec 27, 2014 2:30 pm

I can see that. I just dont know how to change it! Lol.
I will experiment.
User avatar
mark
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Sun Dec 14, 2014 1:39 pm

Re: Wii remote/nunchuck ALPHA

Postby OFC-Giorgio » Sun Dec 28, 2014 8:43 pm

I am out of wiimote town so will look into it later in 2015 :p
User avatar
OFC-Giorgio
Lieutenant
Lieutenant
 
Posts: 344
Joined: Mon Sep 15, 2014 4:26 pm

Re: Wii remote/nunchuck ALPHA

Postby AKHUGHES90 » Sun Dec 28, 2014 10:07 pm

Post the bravo script for me and I will try to change it for you tonight. I havent scripted for wii mote before but I can probably figure it out.
Image
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
User avatar
AKHUGHES90
Major
Major
 
Posts: 927
Joined: Mon Nov 24, 2014 12:19 am
Location: Springfield, IL USA CST (-6:00)

Re: Wii remote/nunchuck ALPHA

Postby mark » Sun Dec 28, 2014 11:50 pm

here it is, hope it works. I will attach the file as well. I appreciate you looking at it and giving it a try, you guys are all great.
From the wiiu manual:
* Z Button - ADS
* C Button - Crouch/Prone
* Control Stick - Move
* Up on the +Control Pad - Jump
* Right on the +Control Pad - Switch Weapon
* Left on the +Control Pad - Inventory
* Down on the +Control Pad - Melee Attack
* A Button - Use/Sprint/Lock Camera
* - Button - Throw Tacticals
* + Button - Throw Lethals
* 1 Button - Objectives/Menu
* 2 Button - Scoreboard
* B Button (underneath controller) - Fire Weapon
* Shake Nunchuk - Reload

Hold Wii-Left and select with Nunchuck stick up, down, left or right (for
next-killstreak, previous-killstreak, use killstreak, switch to rifle
grenadelauncher attachment respectively).

Bravo settings:
* shake nunchuk / reload is disabled,
* - is used for reload and
* + is still used to throw lethals but + while twisting the wiimote is used
for throwing tacticals
*/

Code: Select all
   define ADS_SENSITIVITY     = 25; // a lower value than the standard 50 value means more sensitive
    define NON_ADS_SENSITIVITY = 35; // a lower value than the standard 50 value means more sensitive

    //define RUMBLE_ENABLED = TRUE; // vibrating enabled
    define RUMBLE_ENABLED = FALSE// vibrating disabled

    define MOVE_LEFT_RIGHT_3STATES         = TRUE;   // stick is only left/neutral/right (horizontal)
    //define MOVE_LEFT_RIGHT_3STATES       = FALSE;  // stick is -100% - 100% (horizontal)
    define MOVE_FORWARD_BACKWARD_3STATES   = TRUE;   // stick is only up/neutral/down (vertical)
    //define MOVE_FORWARD_BACKWARD_3STATES = FALSE;  // stick is -100% - 100% (vertical)

    unmap ALL_REMAPS;
       
    remap  WII_MINUS    -> PS3_SQUARE;   // alpha settings: tactical
    remap  WII_HOME     -> PS3_PS;       // home menu
    remap  WII_PLUS     -> PS3_R2;       // lethal grenade
    remap  WII_ONE      -> PS3_START;    // menu/map
    remap  WII_TWO      -> PS3_SELECT;   // score
    remap  WII_A        -> PS3_L3;       // "use" action difference:
                                         // in wii: A:use/sprint   -:reload
                                         // in ps3: square=use/reload and L3=sprint
                                         // for now: assign the wii A button to sprinting
                                         //          and use the wii minus (reload) button also
                                         //          to use/take dropped care packages
    remap  WII_B        -> PS3_R1;       // fire
    remap  WII_UP       -> PS3_CROSS;    // jump/mantle
    remap  WII_DOWN     -> PS3_R3;       // melee
    remap  WII_RIGHT    -> PS3_TRIANGLE; // switch weapon
    remap  WII_C        -> PS3_CIRCLE;   // crouch/prone
    remap  WII_Z        -> PS3_L1;       // zoom/aiming down the sights (ADS)
    remap  WII_NX       -> PS3_LX;       // move
    remap  WII_NY       -> PS3_LY;       // move
    remap  WII_IRX      -> PS3_RX;       // look
    remap  WII_IRY      -> PS3_RY;       // look

    unmap PS3_ACCX;
    unmap PS3_ACCY;
    unmap PS3_ACCZ;

    // wiimote+nunchuk only buttons:
    // WII_ONE/WII_TWO/WII_ACCX/WII_ACCY/WII_ACCZ/WII_ACCNX/WII_ACCNY/WII_ACCNZ/WII_IRX/WII_IRY

    // Common identical (classic) controller (pro) and wiimote+nunchuk buttons:
    // WII_HOME/WII_MINUS/WII_PLUS/WII_UP/WII_DOWN/WII_LEFT/WII_RIGHT/WII_A/WII_B

    // Overlapping (classic) controller (pro) with wiimote+nunchuk:
    // (classic) controller (pro) button WII_LT = nunchuk WII_C
    // (classic) controller (pro) button WII_ZL = nunchuk WII_Z
    // (classic) controller (pro) button WII_LX = nunchuk WII_NX
    // (classic) controller (pro) button WII_LY = nunchuk WII_NY

    // (classic) controller (pro) buttons that are not used in wiimote+nunchuk mode:
    // WII_RT
    // WII_ZR
    // WII_RX
    // WII_RY
    // WII_X
    // WII_Y
    // used to bind them to PS3 button and force the wii buttons to trigger the PS3 button
    // by the setval commands in the script (see (1) & (2)):

    // (1)
    //Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.
    //phantom buttons choosen by macro or shaking nunchuck
    remap WII_X  -> PS3_LEFT// left
    remap WII_RX -> PS3_RIGHT; // right
    remap WII_Y  -> PS3_UP;    // up
    remap WII_RY -> PS3_DOWN// down
    //Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.

    // (2)
    // dummy mapping for lethal grenades
    remap  WII_RT -> PS3_L2;
   
    // (3)
    // dummy mapping for ps4 touch
    remap  WII_ZR -> PS4_TOUCH;

    int LETHAL_GRENADE         = 0;
    int TACTICAL_GRENADE       = 0;
    int AIMING_DOWN_THE_SIGHTS = 0;

    init
    {
      if(!RUMBLE_ENABLED)
      {
        block_rumble();
      }
    }
    main
    {
       // Console support for PS3, PS4, XBOX360 and XBOX1
       if(get_console() && get_console() != PIO_PS3)
       {
          // PS4, XBOX360 and XBOX1
          swap(WII_B, WII_PLUS);  // R1 <-> R2 swap buttons
          swap(WII_Z, WII_RT);    // L1 <-> L2 swap buttons
          LETHAL_GRENADE         = WII_B;
          TACTICAL_GRENADE       = WII_Z;
          AIMING_DOWN_THE_SIGHTS = WII_RT;
       }
       else
       {  // PS3
          LETHAL_GRENADE         = WII_PLUS;
          TACTICAL_GRENADE       = WII_RT;
          AIMING_DOWN_THE_SIGHTS = WII_Z;
       }
       
       if(get_console() == PIO_PS4)
       {
          swap(WII_TWO, WII_ZR); // SELECT <-> TOUCH CLICK
       }

       // PS3 RXY = Wiimote IRXY by Wiimot3 (Wiimote Fuzzy: adjusted mid point & removed stickize)
       set_val(WII_IRX, inv(get_val(WII_IRX)));
       // PS3 RXY = Wiimote IRXY by Wiimot3 (Wiimote Fuzzy: adjusted mid point & removed stickize)

       // use different sensitivity for ADS (aiming down the sights) and non ADS
       if (get_val(AIMING_DOWN_THE_SIGHTS))
       {
         //set_led(LED_3, 1); // indicate ADS
         sensitivity(WII_IRX , ADS_SENSITIVITY, 100);
         sensitivity(WII_IRY , ADS_SENSITIVITY, 100);
       }
       else
       {
         //set_led(LED_3, 0);
         sensitivity(WII_IRX , NON_ADS_SENSITIVITY, 100);
         sensitivity(WII_IRY , NON_ADS_SENSITIVITY, 100);
       }

       deadzone(WII_IRX, WII_IRY, DZ_CIRCLE, 30);

       // PS3 LXY = Nunchuck NXY by Wiimot3
       //sensitivity(WII_NX , NOT_USE, 150);
       //sensitivity(WII_NY , NOT_USE, 150);
       //deadzone(WII_NX, WII_NY, DZ_CIRCLE, 5);
       // PS3 LXY = Nunchuck NXY by Wiimot3



       // make nunchuck stick 3 states only (per direction):
       // - stick is only left/neutral/right (horizontal)
       if (MOVE_LEFT_RIGHT_3STATES)
       {
         if (get_val(WII_NX) < -20)     
         {   
            set_val(PS3_LX, -100); // left
         }
         else
         if (get_val(WII_NX) > 20)     
         {   
            set_val(PS3_LX, 100); // right
         }
         else
         {
            set_val(PS3_LX, 0);  // neutral
         }
       }

       // - stick is only up/neutral/down (vertical)
       if (MOVE_FORWARD_BACKWARD_3STATES)
       {
         if (get_val(WII_NY) < -20)     
         {   
            set_val(PS3_LY, -100); // up
         }
         else
         if (get_val(WII_NY) > 20)
         {   
            set_val(PS3_LY, 100); // down
         }
         else
         {
            set_val(PS3_LY, 0);   // neutral
         }
       }
       //stickize(WII_IRX, WII_IRY, 129);


       //Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.
       if(get_val(WII_LEFT) && get_val(WII_NX) < -90) set_val(WII_X100);  // left
       if(get_val(WII_LEFT) && get_val(WII_NX) >  90) set_val(WII_RX, 100);  // right
       if(get_val(WII_LEFT) && get_val(WII_NY) < -90) set_val(WII_Y100);  // up
       if(get_val(WII_LEFT) && get_val(WII_NY) >  90) set_val(WII_RY, 100);  // down
       //Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.


       // Bravo settings  + while twisting the wiimote is used for throwing tacticals
       if(get_val(LETHAL_GRENADE) && get_val(WII_ACCX) > 20)
       {
         set_val(LETHAL_GRENADE,     0); // stop/prevent throwing lethal
         set_val(TACTICAL_GRENADE, 100); // throw tactical grenade
       }

       // Toggle hybrid scope by melee button
       if ((get_val(AIMING_DOWN_THE_SIGHTS)) && (get_val(WII_DOWN)))
       {
          set_val(WII_DOWN, 0);
          set_val(WII_A,   100);
       }
       

       // test for wiimote out of reach of sensorbar
       if(wiir_offscreen())
       {
         set_val(WII_IRX, 0); // prevent camera from spinning
         set_val(WII_IRY, 0); // prevent camera from spinning
         set_led(LED_4, 1);   // light led 4 to indicate sensorbar is out of sight
       }
       else
       {
         set_led(LED_4, 0);
       }


       // Empty battery indicator (led 3 on if battery level less or equal 20%)
       if(get_battery() <= 2)
       {
         set_led(LED_3, 1);
       }
       else
       {
        set_led(LED_3, 0);
       }

    } // end of main() function
Attachments
call_of_duty_advanced_warfare_wiimote_script_bravo_settings adjusted ads30_40.gpc
Please use GPC Code function
(14.42 KiB) Downloaded 347 times
User avatar
mark
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Sun Dec 14, 2014 1:39 pm

Re: Wii remote/nunchuck ALPHA

Postby AKHUGHES90 » Mon Dec 29, 2014 3:32 am

No guarantees it will work, but here is what i came up with, I made Tactical Wii_minus and Reload a shake. I can't test it to see how the script reacted to the changes but give it a try and let me know. Just thought i would give it a shot so you don't have to wait for everyone to get back from the holidays. :joia:

Everything should work as expected, but Reload may require the Shake/Twist Motion you mentioned instead of just shake. I didn't see anything in the script bound to just shake so the only way i would know how to change that is if you gave me a Combo Magick combo of the Shake Motion so i know how its defined in the script, Since I don't have a Wii.

Code: Select all
define ADS_SENSITIVITY = 25; // a lower value than the standard 50 value means more sensitive
define NON_ADS_SENSITIVITY = 35; // a lower value than the standard 50 value means more sensitive

//define RUMBLE_ENABLED = TRUE; // vibrating enabled
define RUMBLE_ENABLED = FALSE; // vibrating disabled

define MOVE_LEFT_RIGHT_3STATES = TRUE; // stick is only left/neutral/right (horizontal)
//define MOVE_LEFT_RIGHT_3STATES = FALSE; // stick is -100% - 100% (horizontal)
define MOVE_FORWARD_BACKWARD_3STATES = TRUE; // stick is only up/neutral/down (vertical)
//define MOVE_FORWARD_BACKWARD_3STATES = FALSE; // stick is -100% - 100% (vertical)

unmap ALL_REMAPS;

remap WII_MINUS -> PS3_SQUARE; // alpha settings: tactical
remap WII_HOME -> PS3_PS; // home menu
remap WII_PLUS -> PS3_R2; // lethal grenade
remap WII_ONE -> PS3_START; // menu/map
remap WII_TWO -> PS3_SELECT; // score
remap WII_A -> PS3_L3; // "use" action difference:
// in wii: A:use/sprint -:reload
// in ps3: square=use/reload and L3=sprint
// for now: assign the wii A button to sprinting
// and use the wii minus (reload) button also
// to use/take dropped care packages
remap WII_B -> PS3_R1; // fire
remap WII_UP -> PS3_CROSS; // jump/mantle
remap WII_DOWN -> PS3_R3; // melee
remap WII_RIGHT -> PS3_TRIANGLE; // switch weapon
remap WII_C -> PS3_CIRCLE; // crouch/prone
remap WII_Z -> PS3_L1; // zoom/aiming down the sights (ADS)
remap WII_NX -> PS3_LX; // move
remap WII_NY -> PS3_LY; // move
remap WII_IRX -> PS3_RX; // look
remap WII_IRY -> PS3_RY; // look

unmap PS3_ACCX;
unmap PS3_ACCY;
unmap PS3_ACCZ;

// wiimote+nunchuk only buttons:
// WII_ONE/WII_TWO/WII_ACCX/WII_ACCY/WII_ACCZ/WII_ACCNX/WII_ACCNY/WII_ACCNZ/WII_IRX/WII_IRY

// Common identical (classic) controller (pro) and wiimote+nunchuk buttons:
// WII_HOME/WII_MINUS/WII_PLUS/WII_UP/WII_DOWN/WII_LEFT/WII_RIGHT/WII_A/WII_B

// Overlapping (classic) controller (pro) with wiimote+nunchuk:
// (classic) controller (pro) button WII_LT = nunchuk WII_C
// (classic) controller (pro) button WII_ZL = nunchuk WII_Z
// (classic) controller (pro) button WII_LX = nunchuk WII_NX
// (classic) controller (pro) button WII_LY = nunchuk WII_NY

// (classic) controller (pro) buttons that are not used in wiimote+nunchuk mode:
// WII_RT
// WII_ZR
// WII_RX
// WII_RY
// WII_X
// WII_Y
// used to bind them to PS3 button and force the wii buttons to trigger the PS3 button
// by the setval commands in the script (see (1) & (2)):

// (1)
//Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.
//phantom buttons choosen by macro or shaking nunchuck
remap WII_X -> PS3_LEFT; // left
remap WII_RX -> PS3_RIGHT; // right
remap WII_Y -> PS3_UP; // up
remap WII_RY -> PS3_DOWN; // down
//Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.

// (2)
// dummy mapping for lethal grenades
remap WII_RT -> PS3_L2;

// (3)
// dummy mapping for ps4 touch
remap WII_ZR -> PS4_TOUCH;

int LETHAL_GRENADE = 0;
int TACTICAL_GRENADE = 0;
int AIMING_DOWN_THE_SIGHTS = 0;

init
{
if(!RUMBLE_ENABLED)
{
block_rumble();
}
}
main
{
// Console support for PS3, PS4, XBOX360 and XBOX1
if(get_console() && get_console() != PIO_PS3)
{
// PS4, XBOX360 and XBOX1
swap(WII_B, WII_PLUS); // R1 <-> R2 swap buttons
swap(WII_Z, WII_RT); // L1 <-> L2 swap buttons
LETHAL_GRENADE = WII_B;
TACTICAL_GRENADE = WII_Z;
AIMING_DOWN_THE_SIGHTS = WII_RT;
}
else
{ // PS3
LETHAL_GRENADE = WII_PLUS;
TACTICAL_GRENADE = WII_RT;
AIMING_DOWN_THE_SIGHTS = WII_Z;
}

if(get_console() == PIO_PS4)
{
swap(WII_TWO, WII_ZR); // SELECT <-> TOUCH CLICK
}

// PS3 RXY = Wiimote IRXY by Wiimot3 (Wiimote Fuzzy: adjusted mid point & removed stickize)
set_val(WII_IRX, inv(get_val(WII_IRX)));
// PS3 RXY = Wiimote IRXY by Wiimot3 (Wiimote Fuzzy: adjusted mid point & removed stickize)

// use different sensitivity for ADS (aiming down the sights) and non ADS
if (get_val(AIMING_DOWN_THE_SIGHTS))
{
//set_led(LED_3, 1); // indicate ADS
sensitivity(WII_IRX , ADS_SENSITIVITY, 100);
sensitivity(WII_IRY , ADS_SENSITIVITY, 100);
}
else
{
//set_led(LED_3, 0);
sensitivity(WII_IRX , NON_ADS_SENSITIVITY, 100);
sensitivity(WII_IRY , NON_ADS_SENSITIVITY, 100);
}

deadzone(WII_IRX, WII_IRY, DZ_CIRCLE, 30);

// PS3 LXY = Nunchuck NXY by Wiimot3
//sensitivity(WII_NX , NOT_USE, 150);
//sensitivity(WII_NY , NOT_USE, 150);
//deadzone(WII_NX, WII_NY, DZ_CIRCLE, 5);
// PS3 LXY = Nunchuck NXY by Wiimot3



// make nunchuck stick 3 states only (per direction):
// - stick is only left/neutral/right (horizontal)
if (MOVE_LEFT_RIGHT_3STATES)
{
if (get_val(WII_NX) < -20)
{
set_val(PS3_LX, -100); // left
}
else
if (get_val(WII_NX) > 20)
{
set_val(PS3_LX, 100); // right
}
else
{
set_val(PS3_LX, 0); // neutral
}
}

// - stick is only up/neutral/down (vertical)
if (MOVE_FORWARD_BACKWARD_3STATES)
{
if (get_val(WII_NY) < -20)
{
set_val(PS3_LY, -100); // up
}
else
if (get_val(WII_NY) > 20)
{
set_val(PS3_LY, 100); // down
}
else
{
set_val(PS3_LY, 0); // neutral
}
}
//stickize(WII_IRX, WII_IRY, 129);


//Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.
if(get_val(WII_LEFT) && get_val(WII_NX) < -90) set_val(WII_X, 100); // left
if(get_val(WII_LEFT) && get_val(WII_NX) > 90) set_val(WII_RX, 100); // right
if(get_val(WII_LEFT) && get_val(WII_NY) < -90) set_val(WII_Y, 100); // up
if(get_val(WII_LEFT) && get_val(WII_NY) > 90) set_val(WII_RY, 100); // down
//Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.


// Bravo settings + while twisting the wiimote is used for throwing tacticals
if(get_val(WII_MINUS))
{
set_val(TACTICAL_GRENADE, 100); // throw tactical grenade
}
if(get_val(WII_ACCX) > 20) {
set_val(WII_ACCX, 100)
}

// Toggle hybrid scope by melee button
if ((get_val(AIMING_DOWN_THE_SIGHTS)) && (get_val(WII_DOWN)))
{
set_val(WII_DOWN, 0);
set_val(WII_A, 100);
}


// test for wiimote out of reach of sensorbar
if(wiir_offscreen())
{
set_val(WII_IRX, 0); // prevent camera from spinning
set_val(WII_IRY, 0); // prevent camera from spinning
set_led(LED_4, 1); // light led 4 to indicate sensorbar is out of sight
}
else
{
set_led(LED_4, 0);
}


// Empty battery indicator (led 3 on if battery level less or equal 20%)
if(get_battery() <= 2)
{
set_led(LED_3, 1);
}
else
{
set_led(LED_3, 0);
}

} // end of main() function
Image
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
User avatar
AKHUGHES90
Major
Major
 
Posts: 927
Joined: Mon Nov 24, 2014 12:19 am
Location: Springfield, IL USA CST (-6:00)

Re: Wii remote/nunchuck ALPHA

Postby mark » Tue Dec 30, 2014 2:07 pm

I just gave it a try and it didn't work, perhaps it is a problem on my end saving the file. Do I just copy/paste the modified script into the G-tuner's GPC complier, and save it as a new file? That's what I did.

Sorry for being such a novice on this, appreciate the help.
User avatar
mark
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Sun Dec 14, 2014 1:39 pm

Next

Return to Wiimote, Nunchuk and Sensorbar

Who is online

Users browsing this forum: No registered users and 32 guests