PUBG - PlayerUnknown's Battlegrounds

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

PUBG - PlayerUnknown's Battlegrounds

Postby Scachi » Fri Nov 22, 2019 9:47 pm

A script for PUBG - PlayerUnknown's Battlegrounds, Based on the script PUBG Special by bonefisher (thank you :smile0517:)

Automatically detects crouch/stand/prone to use appropriate recoil. Runtime operations for manual overrides. Press Jump button to reset to standing.

Download
Search for "pubg_scachi" in Gtuner IV "Online Resource" panel.

Modifications
Use AryanX based anti recoil, handle 3 anti recoil times and values per stance instead of one per stance
Support for multiple settings to load via button or key (script editing required)
Optional extra Anti Recoil settings for usage with Rapid Fire
Automatic Stop for Anti Recoil and Rapid Fire by rumble detection
Holster & Run
Configurable key toggles for stuff like script, rapid fire and anti recoil on/off

Runtime Operations
Hold [L2|LT] +
Press [Touch-Click|View] + [CROSS|A] to quickly enable/disable the script.
Press [Touch-Click|View] + DPAD UP to manually set Standing Anti Recoil mode
Press [Touch-Click|View] + DPAD Down to manually set Crouch Anti Recoil mode
Press [Touch-Click|View] + DPAD Left to manually set Prone Anti Recoil mode
Press [Touch-Click|View] + DPAD Right to manually set OTS Anti Recoil mode.
Press [Touch-Click|View] + Fire Trigger to manually set Rapid Fire mode.

Holding down CROUCH > 1000ms will enter vehicle mode / turn the script OFF.
Holding down RELOAD > 1000ms will leave vehicle mode / turn the script ON.

For more information open the Interactive Configuration of the script - By clicking the gear like icon on the slot you installed the script to.

Anti Recoil with multiple times & values
When firing a weapon with complex anti recoil:
The weapon may start with a low recoil first, after a few bullets it gets harder to control and a few more bullets later the recoil increase more or is reducing a bit.
This is what the multiple times and values to configure are for.
1.
Configure the first time "1. Time" to the time when the recoil starts after pressing the fire button
and the "1. Force" for the sticks value to move to compensate the recoil.
2.
When the recoil increases (or changes) after firing for some time try to adjust the "2. Time" to match the overall time of shooting and set the "2. Force" to the recoil.
3.
If the recoil changes again at a later time while firing the same mag adjust the "3. Time" & "3. Force" value pairs to match it.

If there is no change of the recoil over time during firing set all three Force fields to the same value, the times of the 2. and 3. doesn't matter then.

The scripts tries to track the current stance (stand/duck/prone/ots/hip/ads) each one having seperate anti recoil settings that need to be configured.

MULTIPLE CONFIGURATIONS
It is now possible to use multiple configurations to quick select a configuration matching your currently used weapon.
You need to edit the code a bit for that as the anti recoil support for all the different stances takes up to much persistent memory to be included directly in the Interactive Configuration.
You need to:
  1. Click download on the script in the Online Resource
  2. Search for "Multi Config" in the code of the file "PUBG_scachi.gpc":
  3. enable to use button or/and key to select a configuration via change FALSE to TRUE of bKEYCFG or bBTNCFG
  4. modify the buttons or keys in that section if you want to
  5. run the script, start a test game
  6. Now repeat this for all configurations you want to use:
    1. configure all Interactive Configuration settings for your weapons recoil / rapid fire as required,
    2. click Save & Run or OK
    3. click the "Copy Configuration" button the the title bar of the IC
    4. paste that string into the position of the array GIVICFG you want to use this on, replacing the current content of that line (keep the quotes!)
    Important Note:
    ! Loading a configuration will overwrite the current Interactive Cfg Settings !
  7. save the file and reinstall the script onto the T2 slot

These are the mentioned lines you need to find and adjust in the file "PUBG_scachi.gpc":
Code: Select all
/////////////////////////////////////////////////////////////////////////////////
//  Multi Config
/////////////////////////////////////////////////////////////////////////////////
//
// switch active config by ADS + BUTTON_ :
bool bBTNCFG = FALSE; // allow use of multiple configurations by button combination
#define BTN_CFG0 BUTTON_10
#define BTN_CFG1 BUTTON_13
#define BTN_CFG2 BUTTON_11
#define BTN_CFG3 BUTTON_12
//
// switch active config by press of key :
bool bKEYCFG = FALSE; // allow use of multiple configurations by key press
#define KEY_CFG0 KEY_1
#define KEY_CFG1 KEY_2
#define KEY_CFG2 KEY_3
#define KEY_CFG3 KEY_4
#define KEY_CFG4 KEY_5
#define KEY_CFG5 KEY_6
//
const char *GIVICFG[] = {
    // setting 0
    "GIVICFG:0E00210040FF07030278000D0000000A0000010000001000012C10000514100000000E00012C0E0005140E0000000C00012C0C0005140C0000000F00012C0F0005140F0000000096012C01F4000000000000000000000000000000C303E803E80000000096000104010400000104010410000E000C000F0000CC00CC00CC0258",
    // setting 1
    "GIVICFG:0E00210040FF07030278000D0000000A0000010000001A0005141A0008FC1A0000000E00012C0E0005140E0000000C00012C0C0005140C0000000F00012C0F0005140F0000000096012C01F4000000000000000000000000000000C303E803E80000000096000104010400000104010410000E000C000F0000CC00CC00CC0258",
    // setting 2
    "GIVICFG:0E00210040FF07030278000D0000000A00000100000024000514240008FC240000000E00012C0E0005140E0000000C00012C0C0005140C0000000F00012C0F0005140F0000000096012C01F4000000000000000000000000000000C303E803E80000000096000104010400000104010410000E000C000F00010000CC00CC0258",
    // setting 3
    "GIVICFG:0E00210040FF07030278000D0000000A000001000000420005144C0008FC560000000E00012C0E0005140E0000000C00012C0C0005140C0000000F00012C0F0005140F0000000096012C01F4000000000000000000000000000000C303E803E80000000096000104010400000104010410000E000C000F00006600CC00CC0258",
    // setting 4
    "GIVICFG:0E00210040FF07030278000D0000000A000001000000420005144C0008FC560000000E00012C0E0005140E0000000C00012C0C0005140C0000000F00012C0F0005140F0000000096012C01F4000000000000000000000000000000C303E803E80000000096000104010400000104010410000E000C000F00006600CC00CC0258",
    // setting 5
    "GIVICFG:0E00210040FF07030278000D0000000A000001000000420005144C0008FC560000000E00012C0E0005140E0000000C00012C0C0005140C0000000F00012C0F0005140F0000000096012C01F4000000000000000000000000000000C303E803E80000000096000104010400000104010410000E000C000F00006600CC00CC0258",
};
//
bool bUseSpeechNotify = TRUE; // running gtuner IV with T2 prog port connected will do speech output notification via pc soundcard when you select a configuration
 
Last edited by Scachi on Mon Oct 11, 2021 2:09 pm, edited 8 times in total.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: PUBG - PlayerUnknown's Battlegrounds

Postby Mad » Sun Nov 24, 2019 4:52 am

Nice work, appreciate it Scachi.

If you play PUBG definitely give this a go :smile0517:
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: PUBG - PlayerUnknown's Battlegrounds

Postby clairturner13 » Mon Dec 02, 2019 7:43 pm

Tried this with the same values i used on bonefishers and it just kicks way too high especially with x6 on ARs.
User avatar
clairturner13
Master Sergeant
Master Sergeant
 
Posts: 34
Joined: Tue May 15, 2018 12:55 pm

Re: PUBG - PlayerUnknown's Battlegrounds

Postby Scachi » Mon Dec 02, 2019 10:29 pm

clairturner13 wrote:Tried this with the same values i used on bonefishers and it just kicks way too high especially with x6 on ARs.

As mentioned in section "Modifications" in my first post: This script is using a different anti recoil method.
The values used with bones script won't work the same in this script.
Anti Recoil values have always to be tuned in according to your sensitivity and weapons and game..copy paste values from somewhere else won't work most of the time with custom scripts.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: PUBG - PlayerUnknown's Battlegrounds

Postby R1ckJon3z » Sun Dec 08, 2019 4:09 am

This script is really good. The recoil control is very solid. Can you add in the Auto hold breath as an option?

Edit: I was able to put this in as something that's on all the time, but it would be cool to have as an option to toggle on and off.

Also, I have a question. I notice that when I try and throw a nade and am aiming up, it's pulling down for the recoil compensation which is messing up my aim for the throw. Is there a way to have the script toggle off the recoil compensation when a grenade is selected?
User avatar
R1ckJon3z
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 08, 2019 4:00 am

Re: PUBG - PlayerUnknown's Battlegrounds

Postby Scachi » Tue Dec 10, 2019 6:45 pm

R1ckJon3z wrote:This script is really good. The recoil control is very solid. Can you add in the Auto hold breath as an option?

Edit: I was able to put this in as something that's on all the time, but it would be cool to have as an option to toggle on and off.

Also, I have a question. I notice that when I try and throw a nade and am aiming up, it's pulling down for the recoil compensation which is messing up my aim for the throw. Is there a way to have the script toggle off the recoil compensation when a grenade is selected?

Version 1.12: DPad-Right will now enter "grenade mode", that disables anti recoil and rapid fire.
To exit this mode press DPad-Up or weapon change button.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: PUBG - PlayerUnknown's Battlegrounds

Postby R1ckJon3z » Tue Dec 10, 2019 7:33 pm

Thank you very much. I was able to figure it out and get it added into the script and it works exactly as you explained minus the rapidfire, which I don't use, but look forward to your official release. Thanks again!

Here is the code that I added in Main:

Code: Select all
 
//////////////////////////////////////////////////////////////////////////
    //Hold Breathe
    //////////////////////////////////////////////////////////////////////////
    if(get_val(BUTTON_8) && time_active(BUTTON_8) > 150) {
        set_val(BUTTON_7, 100.0);
    }
 
    //////////////////////////////////////////////////////////////////////////
    //Turn off anti-recoil when grenade is equipped and turn back on
    //when you change back to weapon (button Y) (Xbox One)
    //////////////////////////////////////////////////////////////////////////
 
    if (event_active(BTN_DPAD_RIGHT))
    {
        bUseAntiRecoil = TRUE;
        bUseAntiRecoilToggle();
        SetAntiRecoilState(bUseAntiRecoil);
    }
    if (event_active(BTN_CHANGE_WEAPON))
    {
        if(!bUseAntiRecoil)
        {
            bUseAntiRecoil = FALSE;
            bUseAntiRecoilToggle();
            SetAntiRecoilState(bUseAntiRecoil);
        }
 
 
    }
 


Also added the following function:

Code: Select all
 
void SetAntiRecoilState(bool NewRecoilState)
{
    if (NewRecoilState)
    {
        printf("Anti-Recoil: ON");
    }
    else
    {
        printf("Anti-Recoil: OFF");
    }
 
 
}
 
User avatar
R1ckJon3z
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 08, 2019 4:00 am

Re: PUBG - PlayerUnknown's Battlegrounds

Postby Scachi » Thu Dec 12, 2019 11:12 am

Thank you for sharing your code modifications.
I have added auto hold breath with different modes to choose from to version 1.13. It will only work with controller layout type-b at the moment.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: PUBG - PlayerUnknown's Battlegrounds

Postby R1ckJon3z » Thu Dec 12, 2019 2:57 pm

Awesome! Look forward to trying it out today. Thanks! :joia:

Edit: The new features work wonderfully.
Last edited by R1ckJon3z on Thu Dec 12, 2019 7:05 pm, edited 1 time in total.
User avatar
R1ckJon3z
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 08, 2019 4:00 am

Re: PUBG - PlayerUnknown's Battlegrounds

Postby R1ckJon3z » Thu Dec 12, 2019 3:24 pm

Is there a way to define an anti-recoil profile for each weapon or a set of weapons and switch between the profiles as needed? Just curious as I noticed on the description for one of the gamepacks that there was 10 recoil slots that could be cycled with the numpad.
User avatar
R1ckJon3z
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Sun Dec 08, 2019 4:00 am

Next

Return to User's Script Documentation

Who is online

Users browsing this forum: No registered users and 66 guests