Battlefront 2015

GPC2 script programming for Titan Two. Code examples, questions, requests.

Battlefront 2015

Postby ViciousXlV » Fri Jul 10, 2020 8:37 pm

Trying to find the perfect release time for perfect burst of the EE-3 and EE-4 with the game pack any help?
User avatar
ViciousXlV
First Sergeant
First Sergeant
 
Posts: 52
Joined: Mon Mar 11, 2019 9:16 am

Re: Battlefront 2015

Postby Greedoshotlate » Mon Jul 20, 2020 12:10 am

In my SWBF1 script, I used for the EE-3 a hold time of 60 with a release time of 15 for perfect timing. The EE-4 was a hold of 45 and release of 15. Script name is simply SWBF1 and can be found with GTuner Pro. It has a bunch of other goodies in it like an Easy roll/jump combo, easy swap weapon timings like the two you asked about and an easy toggle on/off for the fire modes.


I hope this helped
User avatar
Greedoshotlate
First Sergeant
First Sergeant
 
Posts: 49
Joined: Tue Jun 21, 2016 2:34 pm

Re: Battlefront 2015

Postby Greedoshotlate » Mon Jul 20, 2020 12:57 am

Greedoshotlate wrote:In my SWBF1 script, I used for the EE-3 a hold time of 60 with a release time of 15 for perfect timing. The EE-4 was a hold of 45 and release of 15. Script name is simply SWBF1 and can be found with GTuner Pro. It has a bunch of other goodies in it like an Easy roll/jump combo, easy swap weapon timings like the two you asked about and an easy toggle on/off for the fire modes.


I hope this helped



My script was for the Titan One, I just converted it for the Titan Two. Here it is in case you have a hard time finding it.
Code: Select all
#pragma METAINFO("SWBF1T2", 1, 0, "greedoshotlate")
#include <titanone.gph>
 
/*
Star Wars Battlefront V3.2 by greedoshotlate
https://www.consoletuner.com/gpclib/?s=1547
converted to the Titan Two by greedoshotlate
*/

// GPC Online Library
// swbf1.gpc
 
// GPC Online Library
// SWBF.gpc
// Author: Greedoshotlate with contributions from AKHUGHES90, J2Kbr, & Bonefisher. Big thanks to these guys for all their help.
//==============================================================================         
// COPYRIGHT
 
       // 2017 greedoshotlate from http://www.consoletuner.com. This Script was made and intended for http://www.Consoletuner.com & Titan 0ne ONLY,
       // UNLESS written permission is given by the creator and/or copywritee. 
       // All rights reserved. This material may not be reproduced, displayed, modified or distributed without the express prior written permission
       // of the copyright holder. For permission, contact greedoshotlate via http://www.consoletuner.com/forum
 
//------------------------------------------------------------------------------
// Made for Star Wars Battlefront specifically, (anti-recoil has been optimized for the EE-3.)
//   --------  anything with "//" in front has been disabled, to re-enable it just remove the "//"
define ADS                       = PS4_L2;       // L2 can be changed to L1 for flipped triggers
define FIRE_BUTTON               = PS4_R2;       // R2 can be changed to R1 for flipped triggers
define CROUCH                    = PS4_CIRCLE;   // "Default" button layout is PS4_CIRCLE. "Alternate" button layout is PS4_R3.
define SWITCH                    = PS4_DOWN;
define LX                        = PS4_LX;
define LY                        = PS4_LY;
define RX                        = PS4_RX;
define RY                        = PS4_RY;
define JUMP                      = PS4_CROSS;
define UP                        = PS4_UP;
define DOWN                      = PS4_DOWN;
define LEFT                      = PS4_LEFT;
define RIGHT                     = PS4_RIGHT;
define RELOAD                    = PS4_SQUARE;
 
define ANTI_RECOIL               = 27;           // Change this value to compensate to the vertical recoil
define ANTI_RECOIL_LEFT          = 0;            // Change this value to compensate to the left
define ANTI_RECOIL_RIGHT         = 4;            // Change this value to compensate to the right
 
 
 
 
 
 
// Modz Specific
int InversionON  = TRUE;    // Set this to FALSE if you are not using look inversion enabled in the game setting.  Most people are NOT using look inversion
int AntiRecoilON = FALSE;   // Set this to TRUE if you want Anti-Recoil to be active hen the script is loaded.
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
int SWITCHoNoFF;
int FIREMODE;
int ToggleAntiRecoil;
int AutoRunOnOff;
int run_flag   = FALSE;
int AimAbuse;
 
init {
    SWITCHoNoFF      = get_pvar(SPVAR_1, 1, 2, 1);
    FIREMODE         = get_pvar(SPVAR_2, 1, 2, 1);
    ToggleAntiRecoil = get_pvar(SPVAR_3, 1, 2, 1);
    AutoRunOnOff     = get_pvar(SPVAR_4, 1, 2, 2);
    AimAbuse         = get_pvar(SPVAR_5, 1, 2, 1);
    }
 
main {
          //hair trigger mod
    if ( get_val(ADS) > 1 )
    {
        set_val(ADS, 100);
    }
 
    if ( get_val(FIRE_BUTTON) > 1 )
    {
        set_val(FIRE_BUTTON, 100);
    }
 
        //RapidFire On/Off Toggle. (1 Rumble indicates ON), (Zero Rumbles indicates OFF). Triangle will always turn it back on, if already on Triangle does nothing.
        //                                                 ///////      Up on the D-Pad will still function as an independent Toggle for On/Off capabilities if you uncomment Lines 83-87.
    if (get_val(PS4_TRIANGLE)) {   //Comment out lines 72-77 with "//" to disable Triangle as an On switch if you uncomment lines 83-87 to activate On/Off feature.
        if (SWITCHoNoFF == 1) {
            SWITCHoNoFF = 2;
            set_pvar(SPVAR_1, SWITCHoNoFF);
            combo_run(RumbleNotifier);
        }
    }     //Can be changed from "UP" to any on the d-pad. Uncomment below to activate the full On/Off feature (remove "//" from the lines 83-87 below)
    if (event_press(UP)) {       //Up on D-pad turns off Auto Fire, Triangle turns it back on.
        if (SWITCHoNoFF == 2) {
            SWITCHoNoFF = 1;
            set_pvar(SPVAR_1, SWITCHoNoFF);
        } //else if (SWITCHoNoFF == 1) {
            //SWITCHoNoFF = 2;
            //set_pvar(SPVAR_1, SWITCHoNoFF);
            //combo_run(RumbleNotifier);
        //}
    }       // RapidFire Mode Selector. (1 Rumble= EE3), (2 Rumbles= EE4)
    if (SWITCHoNoFF == 2 && event_press(SWITCH) && get_val(RELOAD)) {
        if (FIREMODE == 2) {
            FIREMODE = 1;                           // EE-3 Rapidfire
            set_pvar(SPVAR_2, FIREMODE);
            combo_run(RumbleNotifier);
        } else if (FIREMODE == 1) {
            FIREMODE = 2;                           // EE-4 Rapidfire
            set_pvar(SPVAR_2, FIREMODE);
            combo_run(DoubleRumbleNotifier);
        } 
    }   
    if ( get_val(FIRE_BUTTON) && FIREMODE == 1 && SWITCHoNoFF == 2)
    {
        combo_run(EE3);
    }
    else if ( get_val(FIRE_BUTTON) && FIREMODE == 2 && SWITCHoNoFF == 2)
    {
        combo_run(EE4);
    }
           // Auto/Easy Roll Activates by pressing Sprint-L3 while strafing Left Or Right, just jumps if going straight (like starting a run normally)
    if(event_press(PS4_L3)) {
        combo_run(roll);
    }
       // Anti-Recoil On/Off Toggle. (1 Rumble indicates On), (Zero Rumble indicates Off).
    if (get_val(LEFT) && event_press(CROUCH)) {                                 
        if (ToggleAntiRecoil == 2) {
            ToggleAntiRecoil = 1;
            set_pvar(SPVAR_3, ToggleAntiRecoil);
        } else if (ToggleAntiRecoil == 1) {
            ToggleAntiRecoil = 2;
            set_pvar(SPVAR_3, ToggleAntiRecoil);
            combo_run(RumbleNotifier);
        }
    }
    if (get_val(RIGHT) && event_press(CROUCH)) {                                 
        if (AimAbuse == 2) {
            AimAbuse = 1;
            set_pvar(SPVAR_5, AimAbuse);
        } else if (AimAbuse == 1) {
            AimAbuse = 2;
            set_pvar(SPVAR_5, AimAbuse);
            combo_run(DoubleRumbleNotifier);
        }
    }
    // Anti-Recoil (While ADS and Firing Only)
     if (ToggleAntiRecoil == 2 && get_val(FIRE_BUTTON) && get_val(ADS)) {
        combo_run(AntiRecoil);
    }   //Turn auto run On/Off by pressing L2 + Left on the D-Pad (1 Rumble indicates Auto Run is On), (Zero Rumble is Off)
        if ((event_press(ADS) && get_val(LEFT)) || (event_press(LEFT) && get_val(ADS))) {
        if (AutoRunOnOff == 1) {
            AutoRunOnOff = 2;
        } else if (AutoRunOnOff == 2) {
            AutoRunOnOff = 1;
        }
        set_pvar(SPVAR_4, AutoRunOnOff);
 
        if (AutoRunOnOff == 1) {
            combo_run(RumbleNotifier);
        }
    }
 
    if (AutoRunOnOff == 1 && !get_val(FIRE_BUTTON) && !get_val(ADS)) {
    if(!run_flag && get_val(12) < -97) {
        run_flag = TRUE;
        combo_run(AutoSprint);
    } else if(get_val(12) > -97) {
        run_flag = FALSE;
    }
 
}
    if(AimAbuse == 2 && get_val(PS4_L2) && get_ptime(PS4_L2) > 200) {
         combo_run(AimAssistAbuse);
     }
}
 
combo    RumbleNotifier      {
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    reset_rumble();
}
combo  DoubleRumbleNotifier  {
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    set_rumble  (RUMBLE_A, 0);
    wait                (300);
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    reset_rumble();
}
combo  TripleRumbleNotifier  {
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    set_rumble  (RUMBLE_A, 0);
    wait                (300);
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    set_rumble  (RUMBLE_A, 0);
    wait                (300);
    set_rumble(RUMBLE_A, 100);
    wait                (300);
    reset_rumble();
}
 
 
combo         EE4            {          // Optimized Rapidfire for the EE-4, Also best for DL-18, Relby V10. (2 Rumbles indicates activation).
    set_val(FIRE_BUTTON, 100);
    wait                 (45);
    set_val  (FIRE_BUTTON, 0);
    wait                 (15);
    set_val  (FIRE_BUTTON, 0);
}
combo         EE3            {          // Optimized RapidFire for the EE-3, works great for most weapons unless listed as optimized with another previous Firemode.
    set_val(FIRE_BUTTON, 100);          //                              (1 Rumble indicates activation).
    wait                 (60);
    set_val   (FIRE_BUTTON,0);
    wait                 (15);
    set_val   (FIRE_BUTTON,0);
}
combo         roll           {          // Optimized for the Auto/Easy Roll feature. Activates jump after your roll.
    set_val     (CROUCH, 100);
    wait                (35);
    wait                (35);
    set_val     (CROUCH, 100);
    wait                (35);
    wait                (35);
    set_val      (JUMP, 100);
    wait                (35);
    wait                (35);
    set_val      (JUMP, 100);
    wait                (35);
    wait                (35);
    }
combo AutoSprint {
    set_val(8, 0);
    wait(100);
    set_val(8, 100);
    wait(200);
}
combo AimAssistAbuse {
     set_val(PS4_L2, 100);
     wait(40);
     set_val(PS4_L2, 0);
     wait(30);
     set_val(PS4_L2, 0);
}
combo AntiRecoil {                                           
// Look Inversion Enabled
    if(get_val(FIRE_BUTTON) && !AntiRecoilON && InversionON) { // Using AntiRecoilON toggle for testing and when using multiple weapons
      anti_recoil = get_val(RY) - ANTI_RECOIL;                // SUBTRACT anti_recoil when LOOK INVERSION is ENABLED Normally.
      if(anti_recoil > 100) anti_recoil = 100;
      set_val(RY, anti_recoil);
      anti_recoil_left = get_val(RX) - ANTI_RECOIL_LEFT;
      if(anti_recoil_left < -100) anti_recoil_left = -100;
      set_val(RX, anti_recoil_left);
      anti_recoil_right = get_val(RX) + ANTI_RECOIL_RIGHT;
      if(anti_recoil_right > 100) anti_recoil_right = 100;
      set_val(RX, anti_recoil_right);
    }
}
 
 
User avatar
Greedoshotlate
First Sergeant
First Sergeant
 
Posts: 49
Joined: Tue Jun 21, 2016 2:34 pm

Re: Battlefront 2015

Postby ViciousXlV » Mon Jul 20, 2020 10:20 pm

I have a few questions regarding ur script you think we can talk on discord?
User avatar
ViciousXlV
First Sergeant
First Sergeant
 
Posts: 52
Joined: Mon Mar 11, 2019 9:16 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 102 guests