NBA2k21 Current Gen - Most Realistic Looking

GPC1 script programming for Titan One. Code examples, questions, requests.

NBA2k21 Current Gen - Most Realistic Looking

Postby sambushme » Thu Nov 26, 2020 6:16 am

This is my first script so I hope everyone enjoys.
I made this script because I didn't really enjoy all of the hate that come with using some of these script. So I decided I would make a script that makes it look a realistic as it could be.

Please try it out and let me know.
The script is for NBA2k21 Current Gen. I will try to make it for Next Gen whenever I get this all to work on the PS%.

Check out the videos if you want to see how it works.
https://www.youtube.com/channel/UC2n...UkQQCOp61UOBA/

If you ever are looking for someone to run Park or Rec with hit me up on Twitter.
https://twitter.com/sambushme

The script is pretty simple really.
///// Game Settings:
Vibration - On
Aiming - On
Meter - On
Shot feedback - On


///// MyCareer :
- hold R2 and L1 until shot is released


///// Online Modes ( Park / Proam ):
- Hold R2 and SQUARE until shot is released


Code: Select all
 
 
/*
 
///// Where's the love?
I am starting all of this from 0. Please join, follow, like and subscribe.
Twitter: https://twitter.com/sambushme
YouTube: https://www.youtube.com/channel/UC2nSIC ... QCOp61UOBA
Squad: If you are on and looking for someone to run with on the PS4. Hit me up on Twitter.
 
///// Instructional Videos:
Gameplay Park: https://youtu.be/gpHQnpSdrsc
Gameplay Park: https://youtu.be/WjhWXjrvOWA
My Build Video: https://youtu.be/jH8RlbU8c7c
My Custom Jumpshot: https://youtu.be/SMTuH4Nd3Tg
 
///// Game Settings:
Vibration - On
Aiming - On
Meter - On
Shot feedback - On
 
///// MyCareer :
- hold R2 and L1 until shot is released
 
///// Online Modes ( Park / Proam ):
- Hold R2 and SQUARE until shot is released
 
*** If you are in an online mode and you have a must need of a green
- hold R2 and L1 until shot is released
 
///// Adjust your aiming steps (recommended):
1: Go to your MyCount and do shoot around or the ball machine
2: Make sure settings are correct in your Controller Settings.
3: Find your green window based off of shot feed back. ( Repeat this step until it is working for you.
    Slighty Left: Hold SQUARE and R2 and push Right on the D-pad once. 
    Slighty Right: Hold SQUARE and R2 and push Left on the D-pad once. 
4: Adjust Shot Release for online lag delay. The mod will automatically release the shot for you when the controller vibrates.
   It is still important to find the delay that best fits your shot.
 
 
 
///// Comments:
This mod has been tested on multiple builds. I recommend at the very losest of a 80 Mid-range or 3PT shot attritube.
2K21's green window is determine by ratings. The higher the attribute the large the window.
I created this mod for all of us. This mod will provide more of a realistic view to anyone they you play online modes with.
When you go to shoot a shot the mod will randomly choose one of the programmed releases.
The mod will automatically move the aiming stick around giving it a much more real look to any of those who are look at your meter.
I do want to make sure it is clear that you will not shoot 100/100 if you are taking bad or contested shots.
The mod will help you shot better but it will not magically give you a higher basketball IQ.
You should still try to play great defense, pass to the open man, and move without the ball.
 
///// Questions:
If you have any question with the mod or need help setting it up.
Message me on Twitter.
 
 
* *********************************************************** */

 
int green_window = 17; // GREENS BABY! ( my green window ) (-10/+10)
int lag_delay = 500;
int release_type;
int min;
int max;
int meter;
int step;
 
main {
 
    // decrease green window offset
    if( get_val( PS4_SQUARE ) == 100 && get_val( PS4_R2 ) && event_press( PS4_LEFT ) ) {
        green_window--;
        combo_run(_change);
    }
 
    // increase green window offset
    if( get_val( PS4_SQUARE ) == 100 && get_val( PS4_R2 ) && event_press( PS4_RIGHT ) ) {
        green_window++;
        combo_run(_change);
    }
 
    // decrease the lag delay if you're getting late or slighty late
    if( get_val( PS4_SQUARE ) == 100 && get_val( PS4_R2 ) && event_press( PS4_UP ) ) {
        lag_delay = lag_delay - 100;
        combo_run(_change);
    }
 
    // increase the lag delay if you're getting early or slighty early
    if( get_val( PS4_SQUARE ) == 100 && get_val( PS4_R2 ) && event_press( PS4_DOWN ) ) {
        lag_delay = lag_delay + 100;
        combo_run(_change);
    }
 
    if( get_rumble( RUMBLE_A ) || get_rumble( RUMBLE_B ) ){
        combo_run( _rumble_release );
    }
 
    // shoot it -  hold square and R2 until release
    if( get_val( PS4_SQUARE ) == 100 && get_val( PS4_R2 ) ) {
        // if controller rumbles trigger L2 and release shot
 
        // get aiming target in the proper place everytime
        set_val(PS4_SQUARE,0);
        set_val(PS4_RY,-100);
        set_val(PS4_RX,0);
        set_val(PS4_RY,100);
 
        // if release_type has been reset run this loop
        if ( release_type == 0 ) {
            // wait for lag
            combo_run(_wait_time);
            // assign a random release type
            release_type = irand( 1 , 6 );
            if ( release_type == 1 ) {
                min = green_window - 6;
                max = green_window + 15;
                meter = max;
                step = 1;
            }
            if ( release_type == 2 ) {
                min = green_window - 15;
                max = green_window + 6;
                meter = min;
                step = 1;
            }
            if ( release_type == 3 ) {
                min = green_window - 15;
                max = green_window + 6;
                meter = max;
                step = 1;
            }
            if ( release_type == 4 ) {
                min = green_window - 15;
                max = green_window + 6;
                meter = min;
                step = 1;
            }
            if ( release_type == 5 ) {
                min = green_window - 6;
                max = green_window + 15;
                meter = max;
                step = 1;
            }
            if ( release_type == 6 ) {
                min = green_window - 15;
                max = green_window + 6;
                meter = min;
                step = 1;
            }
 
        } else {
            // logic used to move the aiming stick back to the green window
            if ( release_type == 1 ) {
                if ( step == 1 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                    }
                } else if ( step == 2 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        min = green_window - 4;
                    }
                } else if ( step == 3 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = green_window + 2;
                    }
                } else if ( step == 4 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                    }
                } else {
                    if ( meter > green_window ){
                        combo_run( _move_meter_down );
                    } else if ( meter < green_window ){
                        combo_run( _move_meter_up );
                    } else {
                        combo_run( _greens );
                    }               
                }
            }
            if ( release_type == 2 ) {
                if ( step == 1 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                    }
                } else if ( step == 2 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = green_window + 4;
                    }
                } else if ( step == 3 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        min = green_window - 2;
                    }
                } else if ( step == 4 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = green_window + 2;
                    }
                } else {
                    if ( meter > green_window ){
                        combo_run( _move_meter_down );
                    } else if ( meter < green_window ){
                        combo_run( _move_meter_up );
                    } else {
                        combo_run( _greens );
                    }               
                }
            }
            if ( release_type == 3 ) {
                if ( step == 1 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = green_window + 5;
                    }
                } else if ( step == 2 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        min = green_window - 5;
                    }
                } else {
                    if ( meter > green_window ){
                        combo_run( _move_meter_down );
                    } else if ( meter < green_window ){
                        combo_run( _move_meter_up );
                    } else {
                        combo_run( _greens );
                    }               
                }
            }
            if ( release_type == 4 ) {
                if ( step == 1 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        min = min / 2;
                    }
                } else if ( step == 2 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = max / 2;
                    }
                } else {
                    if ( meter > green_window ){
                        combo_run( _move_meter_down );
                    } else if ( meter < green_window ){
                        combo_run( _move_meter_up );
                    } else {
                        combo_run( _greens );
                    }               
                }
            }
            if ( release_type == 5 ) {
                if ( step == 1 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = green_window + 5;
                    }
                } else if ( step == 2 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        min = green_window - 2;
                    }
                } else if ( step == 3 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        max = green_window + 2;
                    }
                } else {
                    if ( meter > green_window ){
                        combo_run( _move_meter_down );
                    } else if ( meter < green_window ){
                        combo_run( _move_meter_up );
                    } else {
                        combo_run( _greens );
                    }               
                }
            }
            if ( release_type == 6 ) {
                if ( step == 1 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                        min = green_window - 5;
                    }
                } else if ( step == 2 ) {
                    if ( meter > min ){
                        combo_run( _move_meter_down );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                    }
                } else if ( step == 3 ) {
                    if ( meter < max ){
                        combo_run( _move_meter_up );
                    } else {
                        set_val(PS4_RX, meter);   
                        step++;
                    }
                } else {
                    if ( meter > green_window ){
                        combo_run( _move_meter_down );
                    } else if ( meter < green_window ){
                        combo_run( _move_meter_up );
                    } else {
                        combo_run( _greens );
                    }               
                }
            }
        }
    } else {
        // If square and R2 are not pressed reset release_type
        combo_run(_wait_time);
        release_type = 0;
    }
 
    // if you need a green right now and cant wait
    if( get_val( PS4_L1 ) && get_val( PS4_R2 ) ) {
        // if controller rumbles trigger L2 and release shot
        if( get_rumble( RUMBLE_A ) || get_rumble( RUMBLE_B ) ){
            combo_run( _rumble_release );
        }
        set_val(PS4_RY,-100);
        set_val(PS4_RX,0);
        set_val(PS4_RY,100);
        set_val( PS4_RX, green_window );
    }
 
}
 
// wait for lag
combo _wait_time{
    wait(100);
    wait(lag_delay);
}
 
// controller feed back to let user know their change is working
combo _change{
    set_rumble(RUMBLE_A, 100);
    set_rumble(RUMBLE_B, 100);
    wait(200);
    set_rumble(RUMBLE_A, 0);
    set_rumble(RUMBLE_B, 0):
}
 
// release the shot
combo _rumble_release {
    wait(100);
    wait(lag_delay);
    set_val(PS4_L2, 100):
    set_rumble(RUMBLE_A, 100);
    set_rumble(RUMBLE_B, 100);
    wait(200);
    set_rumble(RUMBLE_A, 0);
    set_rumble(RUMBLE_B, 0):
    set_val(PS4_SQUARE, 0):
    wait(100);
}
 
// aiming stick logic - greens baby!
combo _greens {
    set_val(PS4_RX, green_window);
}
 
// aiming stick logic - _move_meter_down
combo _move_meter_down {
    set_val(PS4_RX, meter);
    meter = meter -1;
}
 
// aiming stick logic - _move_meter_up
combo _move_meter_up {
    set_val(PS4_RX, meter);
    meter = meter + 1;
 
}
 
 
User avatar
sambushme
Private
Private
 
Posts: 1
Joined: Thu Nov 26, 2020 6:09 am

Re: NBA2k21 Current Gen - Most Realistic Looking

Postby Mad » Thu Nov 26, 2020 6:50 am

Awesome, thanks for sharing with us. :joia: :joia:
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 96 guests