T1/CM to Titan Two Script Converter [v0.28r6 - 11/30/2020]

Tutorials, How-tos and FAQs for the Titan Two device.

T1/CM to Titan Two Script Converter [v0.28r6 - 11/30/2020]

Postby Buffy » Wed Mar 13, 2019 12:52 am

Due to an influx of script conversion requests, I have create a java program that converts legacy scripts to be compatible with the T2. There are still some scenarios I'm working on to make the converter have more compatibility. I choose Java for compatibility reasons (JVM runs on Windows/Mac/Linux).

Click here to download

Java download

Install Java first, then to convert a script extract the folder and run the GPC-Converter jar file (Java required). Then select the GPC file to convert. Reload the file to get the converted script. The original script will be renamed to have " - Original" at the end of the file name.

External Tools setup
To setup the converter with GtunerIV's external tools, extract the folder (GPC-Converter) into the GtunerIV directory
Open GtunerIV ->
Tools-> Preferences-> External Tools-> Paste the following line into the box:
Code: Select all
GPC Converter, $DATA_DIR$\GPC-Converter\launcher.bat, "$CURR_FILE$"


After this, just open the GPC file you want to convert with Gtuner, then click the external tool GPC-Converter

NOTE: The script must be able to compile with the T1 or CM software before converting.
Because some scripts contain directions for them inside comment blocks, I advise you keep the old scripts to view the comments and such (in a future update I will set it to keep comments)


Feel free to message me on Discord about any non-working scripts so I can look over them.

GitHub repository: https://github.com/AJSinc/GPC-Converter

Credits to:
DontAtMe and J2Kbr

Info on how to convert your own scripts manually: viewtopic.php?f=26&t=7591
Last edited by Buffy on Sat Nov 09, 2019 10:20 pm, edited 44 times in total.
ConsoleTuner Support Team || Discord || Custom Scripts
User avatar
Buffy
Lieutenant
Lieutenant
 
Posts: 422
Joined: Wed Jul 20, 2016 5:23 am

Re: Titan One to Titan Two Script Converter

Postby UK_Wildcats » Wed Mar 13, 2019 1:48 am

Very cool. Thank you.
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Titan One to Titan Two Script Converter

Postby teddy18 » Wed Mar 13, 2019 10:05 am

Thank you
User avatar
teddy18
Lieutenant
Lieutenant
 
Posts: 346
Joined: Sun Jul 19, 2015 4:18 pm

Re: Titan One to Titan Two Script Converter

Postby JayP » Wed Mar 13, 2019 9:28 pm

Thanks, But how do i download this?
User avatar
JayP
Sergeant
Sergeant
 
Posts: 9
Joined: Wed Mar 06, 2019 10:14 pm

Re: Titan One to Titan Two Script Converter

Postby Buffy » Wed Mar 13, 2019 10:58 pm

JayP wrote:Thanks, But how do i download this?


Sorry, I had the wrong link. Main post has been updated.
ConsoleTuner Support Team || Discord || Custom Scripts
User avatar
Buffy
Lieutenant
Lieutenant
 
Posts: 422
Joined: Wed Jul 20, 2016 5:23 am

Re: Titan One to Titan Two Script Converter

Postby alanmcgregor » Thu Mar 14, 2019 2:00 am

Awesome job Buffy! thanks for share.
User avatar
alanmcgregor
Major
Major
 
Posts: 981
Joined: Tue Mar 27, 2018 8:38 am

I need help for convert script

Postby maury92 » Thu Mar 14, 2019 8:19 am

hello
who knows how to convert this script to titan two?

thank you


Code: Select all
//LAYOUT\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    define FIRE_BTN = XB1_RT;
    define ADS_BTN = XB1_LT;
    define TACTICAL = XB1_LB;
    define LETHAL = XB1_RB;
    define RX = XB1_RX;
    define RY = XB1_RY;
    define LX = XB1_LX;
    define LY = XB1_LY;
    define CROUCH_BTN = XB1_RS;
    define SPRINT_BTN = XB1_LS;
    define RELOAD_BTN = XB1_X
    define JUMP_BTN = XB1_A;
    define MELEE_BTN = XB1_B;
    define SWAP_BTN = XB1_Y;
    define UP = XB1_UP;
    define LEFT = XB1_LEFT;
    define RIGHT = XB1_RIGHT;
    define DOWN = XB1_DOWN;
 
int    ADS_SENS, GEN_SENS=100, HIP_SENS=100, ADS_FIRE_SENS, Use_sens;
int    IN_GAME_SENS=8;
int    ZOOM_SENS;
//Aim Assist:
 
    int AimAssist = TRUE;
    int value   = 0;
    int value2  = 2;
    int delay   = 0;
 
//Rapid Fire:
 
    int RapidFire = TRUE;
    define SPEED = 25;
 
//Dropshot:
 
    int Dropshot = FALSE;
 
//Jumpshot:
 
    int Jumpshot = FALSE
 
//Hold Breath (Snipers):
 
    int HoldBreath = TRUE;
 
//AutoRun:
 
    int AutoRun = TRUE;
 
//AUTOheal
define FIRE__AND_HEAL=TRUE;
 
int    NO__RECOIL__Y;
int    anti_recoil;
int       b_reload;
int    A__R;
int Jitter = FALSE;
int a; int b;   
int rumble_type = RUMBLE_A;                                             
int Notify = TRUE 
init {
 
//--ANTI RECOIL /--------------------------------------
NO__RECOIL__Y = get_pvar(SPVAR_1,-100,100, 35);
ADS_SENS=105-(IN_GAME_SENS*2);
ADS_FIRE_SENS=100-(IN_GAME_SENS*2);
ZOOM_SENS=95-(IN_GAME_SENS*2);
}
 
//MAIN\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

main {
//AutoHeal
if(FIRE__AND_HEAL && event_release (FIRE_BTN))combo_run(Fire_and_Heal);
 
//Anti recoil
if (get_val(ADS_BTN)&& get_val(FIRE_BTN) && A__R) combo_run(no___recoil);    
if (AimAssist)
if(get_val(ADS_BTN)) {
combo_run(LT_C);
}
if(get_val(FIRE_BTN) && get_val(ADS_BTN)) {
combo_stop(LT_C);
combo_run(RT_C);}
 
//Rapidfire       
if(get_val(ADS_BTN) && event_press(RIGHT)){
RapidFire =! RapidFire;
if(RapidFire == TRUE){combo_run(Notify);a=0;b=2;}
if(RapidFire == FALSE){combo_run(Notify);a=2;b=0;}
}
if(RapidFire){
if(get_val(FIRE_BTN)){
combo_run(Rapidfire);}
}
 
//Dropshot
if(get_val(ADS_BTN) && event_press(RELOAD_BTN)){
Dropshot =! Dropshot;
if(Dropshot == TRUE){combo_run(Notify);a=0;b=2;}
if(Dropshot == FALSE){combo_run(Notify);a=2;b=0;}
}
if (Dropshot)
if(get_val(XB1_RT) > 99){
combo_run(DROPSHOT);
}
//JumbShot
if(get_val(ADS_BTN) && event_press(DOWN)){
Jumpshot=! Jumpshot;
if(Jumpshot == TRUE){combo_run(Notify);a=0;b=2;}
if(Jumpshot == FALSE){combo_run(Notify);a=2;b=0;}
}
if (Jumpshot) 
        if(get_val(XB1_RT) > 99){
             combo_run(JUMPSHOT);
        }
 
if (HoldBreath)
if(get_val(XB1_LT)> 90) { set_val(XB1_LS, 100)
}
 
//Autorun
if(get_val(ADS_BTN) && event_press(UP)){
AutoRun =!AutoRun;
if(AutoRun == TRUE){combo_run(Notify);a=0;b=2;}
if(AutoRun == FALSE){combo_run(Notify);a=2;b=0;}
}
if(AutoRun)
if(get_val(LY) <= -20){set_val(XB1_LS, 100);
}
 
//Aim assist
if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
combo_stop(LT_C);
combo_stop(RT_C);
}         
}
//COMBOS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
combo Notify {

if(Notify){set_rumble(RUMBLE_B,65);}
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(550);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
reset_leds();
}
 
combo Fire_and_Heal {
    wait(10);
    if (!get_val (ADS_BTN)|| !get_val (FIRE_BTN))
    set_val(TACTICAL,100);
    wait(40);
}
 
combo Vibrate {
set_rumble(rumble_type, 100);
wait(300);
reset_rumble();
}
combo Jitter {                                
    set_val(LETHAL, 100);
    set_val(FIRE_BTN,100);
    wait(70);
    wait(20);
    set_val(LETHAL, 100);
    set_val(TACTICAL, 100);
    wait(30);
    set_val(TACTICAL, 100);
    wait(10);
    wait(10);
    }
 
   combo LT_C {
       set_val(RY, -25);         
       wait(delay)
       set_val(RX, 25);
       set_val(RY, 15);
       wait(delay)
       set_val(RY, 15);
       wait(delay)                 
       set_val(RX, -25);
       set_val(RY, 15);
       wait(delay)
    }
 
    combo RT_C {
       set_val(RY, -35);             
       wait(delay)
       set_val(RX, 35);
       set_val(RY, 25);
       wait(delay)
       set_val(RY, 25);
       wait(delay)                 
       set_val(RX, -35);
       set_val(RY, 25);
       wait(delay)
    }
 
    combo Rapidfire {
       set_val(XB1_RT,100);
       wait(SPEED);
       set_val(XB1_RT,0);
       wait(SPEED);
    }
 
    combo DROPSHOT {
   set_val(XB1_RS, 100);
   wait(800);
    }
 
    combo JUMPSHOT {
   set_val(XB1_A, 100);
   wait(100);
   wait(300);   
    }
 
    combo no___recoil {
        anti_recoil = get_val(10) + NO__RECOIL__Y;     
        if (anti_recoil > 100) anti_recoil = 100;     
        set_val(10, anti_recoil);
}
 
 
function rumble_A_if_true(var) {
if (var) rumble_type = RUMBLE_A;
else rumble_type = RUMBLE_B;
combo_run(Vibrate);
}
User avatar
maury92
Sergeant
Sergeant
 
Posts: 9
Joined: Fri Jan 25, 2019 9:59 am

Re: I need help for convert script

Postby Scachi » Thu Mar 14, 2019 9:35 am

Fixed
Code: Select all
#include <titanone.gph> 
#define wait(a) wait(a);
//LAYOUT
 
define FIRE_BTN = XB1_RT;
define ADS_BTN = XB1_LT;
define TACTICAL = XB1_LB;
define LETHAL = XB1_RB;
define RX = XB1_RX;
define RY = XB1_RY;
define LX = XB1_LX;
define LY = XB1_LY;
define CROUCH_BTN = XB1_RS;
define SPRINT_BTN = XB1_LS;
define RELOAD_BTN = XB1_X
define JUMP_BTN = XB1_A;
define MELEE_BTN = XB1_B;
define SWAP_BTN = XB1_Y;
define UP = XB1_UP;
define LEFT = XB1_LEFT;
define RIGHT = XB1_RIGHT;
define DOWN = XB1_DOWN;
 
int ADS_SENS, GEN_SENS=100, HIP_SENS=100, ADS_FIRE_SENS, Use_sens;
int IN_GAME_SENS=8;
int ZOOM_SENS;
//Aim Assist:
 
int AimAssist = TRUE;
int value = 0;
int value2 = 2;
int delay = 0;
 
//Rapid Fire:
 
int RapidFire = TRUE;
define SPEED = 25;
 
//Dropshot:
 
int Dropshot = FALSE;
 
//Jumpshot:
 
int Jumpshot = FALSE;
 
//Hold Breath (Snipers):
 
int HoldBreath = TRUE;
 
//AutoRun:
 
int AutoRun = TRUE;
 
//AUTOheal
define FIRE__AND_HEAL=TRUE;
 
int NO__RECOIL__Y;
int anti_recoil;
int b_reload;
int A__R;
int Jitter = FALSE;
int a; int b;
int rumble_type = RUMBLE_A;
int Notify = TRUE;
 
init {
 
//--ANTI RECOIL
NO__RECOIL__Y = get_pvar(SPVAR_1,-100,100, 35);
ADS_SENS=105-(IN_GAME_SENS*2);
ADS_FIRE_SENS=100-(IN_GAME_SENS*2);
ZOOM_SENS=95-(IN_GAME_SENS*2);
}
 
//MAIN
 
main {
//AutoHeal
if(FIRE__AND_HEAL && event_release (FIRE_BTN))combo_run(Fire_and_Heal);
 
//Anti recoil
if (get_val(ADS_BTN)&& get_val(FIRE_BTN) && A__R) combo_run(no___recoil);
if (AimAssist)
if(get_val(ADS_BTN)) {
combo_run(LT_C);
}
if(get_val(FIRE_BTN) && get_val(ADS_BTN)) {
combo_stop(LT_C);
combo_run(RT_C);}
 
//Rapidfire
if(get_val(ADS_BTN) && event_press(RIGHT)){
RapidFire =! RapidFire;
if(RapidFire == TRUE){combo_run(cNotify);a=0;b=2;}
if(RapidFire == FALSE){combo_run(cNotify);a=2;b=0;}
}
if(RapidFire){
if(get_val(FIRE_BTN)){
combo_run(Rapidfire);}
}
 
//Dropshot
if(get_val(ADS_BTN) && event_press(RELOAD_BTN)){
Dropshot =! Dropshot;
if(Dropshot == TRUE){combo_run(cNotify);a=0;b=2;}
if(Dropshot == FALSE){combo_run(cNotify);a=2;b=0;}
}
if (Dropshot)
if(get_val(XB1_RT) > 99){
combo_run(DROPSHOT);
}
//JumbShot
if(get_val(ADS_BTN) && event_press(DOWN)){
Jumpshot=! Jumpshot;
if(Jumpshot == TRUE){combo_run(cNotify);a=0;b=2;}
if(Jumpshot == FALSE){combo_run(cNotify);a=2;b=0;}
}
if (Jumpshot)
if(get_val(XB1_RT) > 99){
combo_run(JUMPSHOT);
}
 
if (HoldBreath)
if(get_val(XB1_LT)> 90) { set_val(XB1_LS, 100);
}
 
//Autorun
if(get_val(ADS_BTN) && event_press(UP)){
AutoRun =!AutoRun;
if(AutoRun == TRUE){combo_run(cNotify);a=0;b=2;}
if(AutoRun == FALSE){combo_run(cNotify);a=2;b=0;}
}
if(AutoRun)
if(get_val(LY) <= -20){set_val(XB1_LS, 100);
}
 
//Aim assist
if(get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value || get_val(RX) < value2 || get_val(RX) > value || get_val(RY) < value2 || get_val(RY) > value) {
combo_stop(LT_C);
combo_stop(RT_C);
}
}
 
//COMBOS
combo cNotify {
if(Notify){set_rumble(RUMBLE_B,65);}
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(550);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
wait(250);
set_led(LED_1, 0);
set_led(LED_2, a);
set_led(LED_3, b);
set_led(LED_4, 0);
wait(250);
reset_leds();
}
 
combo Fire_and_Heal {
wait(10);
if (!get_val (ADS_BTN)|| !get_val (FIRE_BTN))
set_val(TACTICAL,100);
wait(40);
}
 
combo Vibrate {
set_rumble(rumble_type, 100);
wait(300);
reset_rumble();
}
combo cJitter {
set_val(LETHAL, 100);
set_val(FIRE_BTN,100);
wait(70);
wait(20);
set_val(LETHAL, 100);
set_val(TACTICAL, 100);
wait(30);
set_val(TACTICAL, 100);
wait(10);
wait(10);
}
 
combo LT_C {
set_val(RY, -25);
wait(delay)
set_val(RX, 25);
set_val(RY, 15);
wait(delay)
set_val(RY, 15);
wait(delay)
set_val(RX, -25);
set_val(RY, 15);
wait(delay)
}
 
combo RT_C {
set_val(RY, -35);
wait(delay)
set_val(RX, 35);
set_val(RY, 25);
wait(delay)
set_val(RY, 25);
wait(delay)
set_val(RX, -35);
set_val(RY, 25);
wait(delay)
}
 
combo Rapidfire {
set_val(XB1_RT,100);
wait(SPEED);
set_val(XB1_RT,0);
wait(SPEED);
}
 
combo DROPSHOT {
set_val(XB1_RS, 100);
wait(800);
}
 
combo JUMPSHOT {
set_val(XB1_A, 100);
wait(100);
wait(300);
}
 
combo no___recoil {
anti_recoil = get_val(10) + NO__RECOIL__Y;
if (anti_recoil > 100) anti_recoil = 100;
set_val(10, anti_recoil);
}
 
 
function rumble_A_if_true(var) {
if (var) rumble_type = RUMBLE_A;
else rumble_type = RUMBLE_B;
combo_run(Vibrate);
}
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Titan One to Titan Two Script Converter

Postby J2Kbr » Thu Mar 14, 2019 10:49 am

I checked your java code and you are doing lot more than firstly expected. Great work, thank you for sharing. :joia: :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Titan One to Titan Two Script Converter

Postby Buffy » Fri Mar 15, 2019 6:32 am

I've updated the app to fix semicolon related errors, and some "garbage code" fixing (a lot of legacy scripts seemed to have gotten by even with these syntax errors).

If you find any regressions/unexpected functionality in the script due to this change, please message me.

EDIT: I've also changed the app to omit unused combos/functions, as some may cause compile errors.
ConsoleTuner Support Team || Discord || Custom Scripts
User avatar
Buffy
Lieutenant
Lieutenant
 
Posts: 422
Joined: Wed Jul 20, 2016 5:23 am

Next

Return to Tutorials and FAQs

Who is online

Users browsing this forum: No registered users and 42 guests