Making a Game pack

Titan One general support. Questions, firmware update, feature request.

Making a Game pack

Postby Relentless Gaming » Sat Feb 06, 2016 1:02 pm

Is there a way that i can make my own game pack
User avatar
Relentless Gaming
Sergeant First Class
Sergeant First Class
 
Posts: 17
Joined: Sun Jan 31, 2016 12:16 am

Re: Making a Game pack

Postby bonefisher » Sat Feb 06, 2016 1:31 pm

Through Visual Scripting
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Making a Game pack

Postby Relentless Gaming » Sat Feb 06, 2016 1:55 pm

bonefisher wrote:Through Visual Scripting

Oh okay thanks
User avatar
Relentless Gaming
Sergeant First Class
Sergeant First Class
 
Posts: 17
Joined: Sun Jan 31, 2016 12:16 am

Re: Making a Game pack

Postby bonefisher » Sat Feb 06, 2016 2:23 pm

Your Welcome!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Making a Game pack

Postby J2Kbr » Mon Feb 08, 2016 11:42 am

The visual script does not have all statements/procedure/functions to make a full gamepack. Here is a skeleton code of a gamepack, understand this code is essential to be able to make a gamepack.

Code: Select all
//ID:   000000
//VER:  1.0
//MFW:  0200
//NAME: Base Structure of a Gamepack
/* =============================================================================
 * Copyright (c) 2015 ConsoleTuner
 *
 * Authors:
 * J2K      - Jefferson Koppe, [email protected]
 *
 * Changes:
 * 10-Nov-2015 [J2K]: File created
 * -----------------------------------------------------------------------------
 *     
 * CLASSES and MODs definitions here
 *
**/


/* -----------------------------------------------------------------------------
 *  DEFINES
**/


// Menu System
define MENU_ITEMS      =    1; // Total of CLASSES
define I001_OPTIONS    =    2; // TOTAL of MODs in CLASS 1


// Menu Buttons
define MENU_BUTTON     =    1; // SELECT
define MENU_ENTER      =    2; // START
define MENU_NEXT       =   20; // SQUARE
define MENU_PREV       =   19; // CROSS
define MENU_OPT_NEXT   =   17; // TRIANGLE
define MENU_OPT_PREV   =   18; // CIRCLE

// Persistent Vars
define PVAR_CLASS1     = SPVAR_1; // Persistet variable for CLASS 1


/* -----------------------------------------------------------------------------
 *  DATA SEGMENT
**/

data (
    MENU_ITEMS,
    I001_OPTIONS
);

/* -----------------------------------------------------------------------------
 *  VARIABLES
**/

int menu_activated = 0;
int menu_ledtm, menu_item = 1, menu_option = 0; // menu_option indexes next vars
int i001_option;

T0; // Titan One Exclusive Content

/* -----------------------------------------------------------------------------
 *  INITIALIZATION
**/

init {
    combo_restart(InitLED);
    // Load Menu Options
    i001_option = get_pvar(PVAR_CLASS1,     0, I001_OPTIONS, 0);
}

/* -----------------------------------------------------------------------------
 *  MAIN SCRIPT
**/

main {
    if(get_controller() == PIO_WII) {
        swap(WII_A, WII_B); // Wii U Pro button layout fix
    }
    if(MenuSystem()) {
        if(i001_option) {
            //
            // Run the active MOD of CLASS 1 here
            //
        }
    }
    if(get_console() == PIO_PS4) {
        block(MENU_BUTTON, 400);
    }
}

/* -----------------------------------------------------------------------------
 *  COMBOS
**/

combo InitLED {
    wait(140);
    set_ledx(LED_4, 0);
}

/* -----------------------------------------------------------------------------
 *  FUNCTIONS
**/

function MenuSystem() {
    if(get_val(MENU_BUTTON)) {
        if(menu_activated) {
            // Menu items navigation
            if(event_press(MENU_NEXT) && menu_item < MENU_ITEMS) {
                menu_item = menu_item + 1;
                MenuResetLED(1);
            } else if(event_press(MENU_PREV) && menu_item > 1) {
                menu_item = menu_item - 1;
                MenuResetLED(1);
            }
            // Menu item options navigation
            menu_option = menu_option[menu_item];
            if(event_press(MENU_OPT_NEXT) && menu_option < dbyte(menu_item)) {
                menu_option = menu_option + 1;
                menu_option[menu_item] = menu_option;
                MenuResetLED(3);
            } else if(event_press(MENU_OPT_PREV) && menu_option > 0) {
                menu_option = menu_option - 1;
                menu_option[menu_item] = menu_option;
                MenuResetLED(3);
            }
            // LED Feedback
            if(!get_ledx()) {
                if(menu_activated == 1 || menu_activated == 3) { menu_ledtm = menu_ledtm - get_rtime(); if(menu_ledtm <= 0) menu_activated = menu_activated + 1; }
                else if(menu_activated == 2) { set_ledx(LED_4, menu_item); menu_ledtm = 300; menu_activated = 3; }
                else if(menu_activated == 4) { if(menu_option) set_ledx(LED_3, menu_option); menu_ledtm = 600; menu_activated = 1; }
            }
        } else {
            if(get_val(MENU_ENTER) && get_ptime(MENU_ENTER) >= 1200) {
                block_rumble();
                MenuResetLED(1);
            }
        }
        set_val(MENU_BUTTON,   0);
        set_val(MENU_ENTER,    0);
        set_val(MENU_NEXT,     0);
        set_val(MENU_PREV,     0);
        set_val(MENU_OPT_NEXT, 0);
        set_val(MENU_OPT_PREV, 0);
        return(0);
    } else {
        if(menu_activated) {
            menu_activated = 0;
            // Save Menu Options
            set_pvar(PVAR_CLASS1,     i001_option);
            combo_restart(InitLED);
            reset_rumble();
        }
    }
    return(1);
}

function MenuResetLED(pos) {
    set_ledx(LED_NONE, 0);
    menu_activated = pos;
    menu_ledtm = 600;
}
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: Making a Game pack

Postby Relentless Gaming » Tue Feb 09, 2016 10:18 pm

J2Kbr wrote:The visual script does not have all statements/procedure/functions to make a full gamepack. Here is a skeleton code of a gamepack, understand this code is essential to be able to make a gamepack.

Code: Select all
//ID:   000000
//VER:  1.0
//MFW:  0200
//NAME: Base Structure of a Gamepack
/* =============================================================================
 * Copyright (c) 2015 ConsoleTuner
 *
 * Authors:
 * J2K      - Jefferson Koppe, [email protected]
 *
 * Changes:
 * 10-Nov-2015 [J2K]: File created
 * -----------------------------------------------------------------------------
 *     
 * CLASSES and MODs definitions here
 *
**/


/* -----------------------------------------------------------------------------
 *  DEFINES
**/


// Menu System
define MENU_ITEMS      =    1; // Total of CLASSES
define I001_OPTIONS    =    2; // TOTAL of MODs in CLASS 1


// Menu Buttons
define MENU_BUTTON     =    1; // SELECT
define MENU_ENTER      =    2; // START
define MENU_NEXT       =   20; // SQUARE
define MENU_PREV       =   19; // CROSS
define MENU_OPT_NEXT   =   17; // TRIANGLE
define MENU_OPT_PREV   =   18; // CIRCLE

// Persistent Vars
define PVAR_CLASS1     = SPVAR_1; // Persistet variable for CLASS 1


/* -----------------------------------------------------------------------------
 *  DATA SEGMENT
**/

data (
    MENU_ITEMS,
    I001_OPTIONS
);

/* -----------------------------------------------------------------------------
 *  VARIABLES
**/

int menu_activated = 0;
int menu_ledtm, menu_item = 1, menu_option = 0; // menu_option indexes next vars
int i001_option;

T0; // Titan One Exclusive Content

/* -----------------------------------------------------------------------------
 *  INITIALIZATION
**/

init {
    combo_restart(InitLED);
    // Load Menu Options
    i001_option = get_pvar(PVAR_CLASS1,     0, I001_OPTIONS, 0);
}

/* -----------------------------------------------------------------------------
 *  MAIN SCRIPT
**/

main {
    if(get_controller() == PIO_WII) {
        swap(WII_A, WII_B); // Wii U Pro button layout fix
    }
    if(MenuSystem()) {
        if(i001_option) {
            //
            // Run the active MOD of CLASS 1 here
            //
        }
    }
    if(get_console() == PIO_PS4) {
        block(MENU_BUTTON, 400);
    }
}

/* -----------------------------------------------------------------------------
 *  COMBOS
**/

combo InitLED {
    wait(140);
    set_ledx(LED_4, 0);
}

/* -----------------------------------------------------------------------------
 *  FUNCTIONS
**/

function MenuSystem() {
    if(get_val(MENU_BUTTON)) {
        if(menu_activated) {
            // Menu items navigation
            if(event_press(MENU_NEXT) && menu_item < MENU_ITEMS) {
                menu_item = menu_item + 1;
                MenuResetLED(1);
            } else if(event_press(MENU_PREV) && menu_item > 1) {
                menu_item = menu_item - 1;
                MenuResetLED(1);
            }
            // Menu item options navigation
            menu_option = menu_option[menu_item];
            if(event_press(MENU_OPT_NEXT) && menu_option < dbyte(menu_item)) {
                menu_option = menu_option + 1;
                menu_option[menu_item] = menu_option;
                MenuResetLED(3);
            } else if(event_press(MENU_OPT_PREV) && menu_option > 0) {
                menu_option = menu_option - 1;
                menu_option[menu_item] = menu_option;
                MenuResetLED(3);
            }
            // LED Feedback
            if(!get_ledx()) {
                if(menu_activated == 1 || menu_activated == 3) { menu_ledtm = menu_ledtm - get_rtime(); if(menu_ledtm <= 0) menu_activated = menu_activated + 1; }
                else if(menu_activated == 2) { set_ledx(LED_4, menu_item); menu_ledtm = 300; menu_activated = 3; }
                else if(menu_activated == 4) { if(menu_option) set_ledx(LED_3, menu_option); menu_ledtm = 600; menu_activated = 1; }
            }
        } else {
            if(get_val(MENU_ENTER) && get_ptime(MENU_ENTER) >= 1200) {
                block_rumble();
                MenuResetLED(1);
            }
        }
        set_val(MENU_BUTTON,   0);
        set_val(MENU_ENTER,    0);
        set_val(MENU_NEXT,     0);
        set_val(MENU_PREV,     0);
        set_val(MENU_OPT_NEXT, 0);
        set_val(MENU_OPT_PREV, 0);
        return(0);
    } else {
        if(menu_activated) {
            menu_activated = 0;
            // Save Menu Options
            set_pvar(PVAR_CLASS1,     i001_option);
            combo_restart(InitLED);
            reset_rumble();
        }
    }
    return(1);
}

function MenuResetLED(pos) {
    set_ledx(LED_NONE, 0);
    menu_activated = pos;
    menu_ledtm = 600;
}

Thank you for all your help I appreciate it
User avatar
Relentless Gaming
Sergeant First Class
Sergeant First Class
 
Posts: 17
Joined: Sun Jan 31, 2016 12:16 am


Return to Titan One Device

Who is online

Users browsing this forum: Philberhane, pmcc93, zumblezz and 118 guests