PDA

View Full Version : justframe.



Disarch
9th December 18, 23:31
justframe do you have the fighterz template? trying to learn to make scripts

Fadexz
10th December 18, 01:55
justframe do you have the fighterz template? trying to learn to make scripts
If you are directly talking to one person try PM-ing them.

Disarch
10th December 18, 02:19
If you are directly talking to one person try PM-ing them.
was going to but i felt like if anyone else might want the template they could just get it from here

justframe
10th December 18, 21:13
If you mean a blank script with all the things I put in the dbfz scripts here's an empty one:
// Script was generated with < Script Manipulator > ver. 13.6 Date :10/06/18 Time: 3:01:07 AM//------------------------------------------------------------------------

define BTN1 = 17; // TRIANGLE, Y
define BTN2 = 18; // CIRCLE, B
define BTN3 = 19; // CROSS, A
define BTN4 = 20; // SQUARE, X
define BTN5 = 3; // R1, RB
define BTN6 = 4; // R2, RT
define BTN7 = 6; // L1, LB
define BTN8 = 7; // L2, LT
define TOUCH = 27; // TOUCH PAD
define UP = 13; // DPAD UP
define DOWN = 14; // DPAD DOWN
define LEFT = 15; // DPAD LEFT
define RIGHT = 16; // DPAD RIGHT
define MOVE_X = 11; // LEFT ANALOG X
define MOVE_Y = 12; // LEFT ANALOG Y
//-----------------------------------------------------
define BACK = 128; // BACK FLAG
define FORWARD = 129; // FORWARD FLAG


// End Flags. 254 and 255 should never be used in the
// data segment for other purposes.
//-----------------------------------------------------
define EOC = 254; // End of Combo
define EOD = 255; // End of Data Segment
//-----------------------------------------------------


int i = -1, b, v;
int back = LEFT, forward = RIGHT;
int button_1, button_2, button_3, button_4, button_5;
int wait_time;
int switch;
int delay_t;
int RUMBLE_TYPE=RUMBLE_A;
int cancel;
int EndOfCombo;
int CanStart;
int SWITCH;
int Switch;
unmap PS4_RX
unmap PS4_RY
unmap PS4_LX
unmap PS4_LY
unmap PS4_SHARE

main {


// Determine Back and Forward
if(event_press(PS4_RIGHT)) {
back = LEFT; forward = RIGHT;
Switch = TRUE;
} else if(event_press(PS4_LEFT)) {
back = RIGHT; forward = LEFT;
Switch = FALSE
}//----------------------------------------------


//TURN character switch on and off
if (event_press(PS4_SHARE)) {
SWITCH = !SWITCH;
}
// Determine Active Character
if (!SWITCH) {
set_led(LED_1, 2);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
if(event_press(PS4_R3)){
load_slot(3);
}
}
else if (SWITCH) {
set_led(LED_1, 0);
set_led(LED_2, 2);
set_led(LED_3, 0);
set_led(LED_4, 0);
}


// Left Stick Functionality
if (get_val (PS4_LX) >= 40) {
back = LEFT; forward = RIGHT;
set_val(forward, 100);

}
if (get_val (PS4_LX) <= -40) {
back = RIGHT; forward = LEFT;
set_val(forward, 100);

}
if (get_val (PS4_LY) >= 40) {

set_val(PS4_DOWN, 100);

}
if (get_val (PS4_LY) <= -40) {

set_val(PS4_UP, 100);

}







// If there is a combo to be executed
if(i >= 0 && delay_t<=0) {
// Execute the combo step-by-step
if(!combo_running(execute_step)) {
if(get_step_values()) {
if(wait_time == 0) {
combo_run(execute_step_no_wait);
} else {
combo_run(execute_step);
}
} else { // the combo finished
i = -1;
}
}
// combo cancel buttons
if(cancel==1){
if ( (abs(get_val (9)) <= 20 && abs(get_val (10)) <= 20) && (abs(get_val (11)) <= 20 && abs(get_val (12)) <= 20) ) {
i = -1;
combo_stop(execute_step);
}
}else if(cancel==2){
if (!get_val(PS4_CIRCLE) && !get_val(PS4_TRIANGLE) && !get_val(PS4_R1) && !get_val(PS4_R2) && !get_val(PS4_SQUARE) ) {
i = -1;
combo_stop(execute_step);
}
}else if(cancel==3){
if (get_val(PS4_CROSS)) {
i = -1;
combo_stop(execute_step);
}

}
// Make sure the user inputs does not interfere in the combo
set_val(BTN1 , 0);
set_val(BTN2 , 0);
set_val(BTN3 , 0);
set_val(BTN4 , 0);
set_val(BTN5 , 0);
set_val(BTN6 , 0);
set_val(BTN7 , 0);
set_val(BTN8 , 0);
set_val(UP , 0);
set_val(DOWN , 0);
set_val(LEFT , 0);
set_val(RIGHT , 0);
set_val(MOVE_X , 0);
set_val(MOVE_Y , 0);

// if no combo execute - look for combo activation
} else {
// EDIT THIS PART OF SCRIPT for combo run ---------------------------
//////////////////////////////////////////////////////////////////////////
if(Switch) {
// Right Stick RIGHT
if (get_val (9) >= 80) {
cancel=1;
i = get_combo_index(FWD_IAD);
}
// Right Stick LEFT
if (get_val (9) <= -80) {
cancel=1;
i = get_combo_index(BACK_IAD);
}
}
else if (!Switch) {
// Right Stick RIGHT
if (get_val (9) <= -80) {
cancel=1;
i = get_combo_index(FWD_IAD);
}
// Right Stick LEFT
if (get_val (9) >= 80) {
cancel=1;
i = get_combo_index(BACK_IAD);
}
}
// Right Stick UP
if (get_val (10) <= -80) {
cancel=1;
i = get_combo_index();
}
// Right Stick DOWN
if (get_val (10) >= 80) {
cancel=1;
i = get_combo_index();
}
// Down + Medium
if (get_val (PS4_DOWN)) {
set_val(PS4_TRIANGLE,0);
cancel=2;
if(get_lval(PS4_TRIANGLE)) i = get_combo_index();
}
// up/forward + heavy
if (get_val (forward) && get_val (PS4_UP)) {
set_val(PS4_CIRCLE,0);
cancel=2;
if(get_lval(PS4_CIRCLE)) i = get_combo_index();
}
// forward + square
if (!get_val (forward) && !get_val (PS4_DOWN) && get_val (PS4_TRIANGLE)) {
set_val(PS4_TRIANGLE,0);
cancel=2;
if(get_lval(PS4_TRIANGLE)) i = get_combo_index();
}
// down + heavy
if (get_val (PS4_DOWN)) {
set_val(PS4_CIRCLE,0);
cancel=2;
if(get_lval(PS4_CIRCLE)) i = get_combo_index();
}

// R1 Dragon Rush
if (get_val (PS4_R1)&& get_ptime (PS4_R1) > 40) {
set_val(PS4_R1,0);
cancel=2;
if(get_lval(PS4_R1)) i = get_combo_index();
}

// end editing here --------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////
}// <combo activation> end
}//<main> block end

// This combo will run a step with wait
combo execute_step {
set_buttons_values();
wait(wait_time);
set_buttons_values();
}

// This combo will run a step without wait
combo execute_step_no_wait {
set_buttons_values();
}


combo RUMBLE_NOTIFICATION {
set_rumble(RUMBLE_TYPE, 100);
wait(300);
reset_rumble ();
}

// Returns the starting index of a combo
function get_combo_index(combo_id) {
i = 0;
while(TRUE) {//-----------------------
v = dbyte(i);
if(v == combo_id) {
return(i + 1);
} else {//====================
while(v != EOC && v != EOD) {//#
i = i + 1;
v = dbyte(i);
}//#
if(v == EOD) break;
else i = i + 1;
}//=============================
}//-----------------------------------
return(-1);
}

// Set the buttons, values and wait time of a step
function get_step_values() {
b = dbyte(i); i = i + 1;
if(b > 5) return(FALSE);

if(b >= 1) {
button_1 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_1 = -1; }

if(b >= 2) {
button_2 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_2 = -1; }

if(b >= 3) {
button_3 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_3 = -1; }

if(b >= 4) {
button_4 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_4 = -1; }

if(b >= 5) {
button_5 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_5 = -1; }

wait_time = dbyte(i); i = i + 1;
wait_time = (wait_time - 1) * 10;
if(wait_time < 0) wait_time = 0;

return(TRUE);
}

// If the step has FORWARD and BACK buttons, set the correct value.
function convert_back_forward(button) {
if(button == FORWARD) {
return(forward);
} else if(button == BACK) {
return(back);
}
return(button);
}

// Set the buttons and values, function used on the combos.
function set_buttons_values() {
if(button_1 != -1) set_val(button_1, 100);
if(button_2 != -1) set_val(button_2, 100);
if(button_3 != -1) set_val(button_3, 100);
if(button_4 != -1) set_val(button_4, 100);
if(button_5 != -1) set_val(button_5, 100);
}

The easiest way to use this would be to copy/paste the int and main sections from this onto the converted data script generated by SM.

Disarch
10th December 18, 21:56
If you mean a blank script with all the things I put in the dbfz scripts here's an empty one:
// Script was generated with < Script Manipulator > ver. 13.6 Date :10/06/18 Time: 3:01:07 AM//------------------------------------------------------------------------

define BTN1 = 17; // TRIANGLE, Y
define BTN2 = 18; // CIRCLE, B
define BTN3 = 19; // CROSS, A
define BTN4 = 20; // SQUARE, X
define BTN5 = 3; // R1, RB
define BTN6 = 4; // R2, RT
define BTN7 = 6; // L1, LB
define BTN8 = 7; // L2, LT
define TOUCH = 27; // TOUCH PAD
define UP = 13; // DPAD UP
define DOWN = 14; // DPAD DOWN
define LEFT = 15; // DPAD LEFT
define RIGHT = 16; // DPAD RIGHT
define MOVE_X = 11; // LEFT ANALOG X
define MOVE_Y = 12; // LEFT ANALOG Y
//-----------------------------------------------------
define BACK = 128; // BACK FLAG
define FORWARD = 129; // FORWARD FLAG


// End Flags. 254 and 255 should never be used in the
// data segment for other purposes.
//-----------------------------------------------------
define EOC = 254; // End of Combo
define EOD = 255; // End of Data Segment
//-----------------------------------------------------


int i = -1, b, v;
int back = LEFT, forward = RIGHT;
int button_1, button_2, button_3, button_4, button_5;
int wait_time;
int switch;
int delay_t;
int RUMBLE_TYPE=RUMBLE_A;
int cancel;
int EndOfCombo;
int CanStart;
int SWITCH;
int Switch;
unmap PS4_RX
unmap PS4_RY
unmap PS4_LX
unmap PS4_LY
unmap PS4_SHARE

main {


// Determine Back and Forward
if(event_press(PS4_RIGHT)) {
back = LEFT; forward = RIGHT;
Switch = TRUE;
} else if(event_press(PS4_LEFT)) {
back = RIGHT; forward = LEFT;
Switch = FALSE
}//----------------------------------------------


//TURN character switch on and off
if (event_press(PS4_SHARE)) {
SWITCH = !SWITCH;
}
// Determine Active Character
if (!SWITCH) {
set_led(LED_1, 2);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
if(event_press(PS4_R3)){
load_slot(3);
}
}
else if (SWITCH) {
set_led(LED_1, 0);
set_led(LED_2, 2);
set_led(LED_3, 0);
set_led(LED_4, 0);
}


// Left Stick Functionality
if (get_val (PS4_LX) >= 40) {
back = LEFT; forward = RIGHT;
set_val(forward, 100);

}
if (get_val (PS4_LX) <= -40) {
back = RIGHT; forward = LEFT;
set_val(forward, 100);

}
if (get_val (PS4_LY) >= 40) {

set_val(PS4_DOWN, 100);

}
if (get_val (PS4_LY) <= -40) {

set_val(PS4_UP, 100);

}







// If there is a combo to be executed
if(i >= 0 && delay_t<=0) {
// Execute the combo step-by-step
if(!combo_running(execute_step)) {
if(get_step_values()) {
if(wait_time == 0) {
combo_run(execute_step_no_wait);
} else {
combo_run(execute_step);
}
} else { // the combo finished
i = -1;
}
}
// combo cancel buttons
if(cancel==1){
if ( (abs(get_val (9)) <= 20 && abs(get_val (10)) <= 20) && (abs(get_val (11)) <= 20 && abs(get_val (12)) <= 20) ) {
i = -1;
combo_stop(execute_step);
}
}else if(cancel==2){
if (!get_val(PS4_CIRCLE) && !get_val(PS4_TRIANGLE) && !get_val(PS4_R1) && !get_val(PS4_R2) && !get_val(PS4_SQUARE) ) {
i = -1;
combo_stop(execute_step);
}
}else if(cancel==3){
if (get_val(PS4_CROSS)) {
i = -1;
combo_stop(execute_step);
}

}
// Make sure the user inputs does not interfere in the combo
set_val(BTN1 , 0);
set_val(BTN2 , 0);
set_val(BTN3 , 0);
set_val(BTN4 , 0);
set_val(BTN5 , 0);
set_val(BTN6 , 0);
set_val(BTN7 , 0);
set_val(BTN8 , 0);
set_val(UP , 0);
set_val(DOWN , 0);
set_val(LEFT , 0);
set_val(RIGHT , 0);
set_val(MOVE_X , 0);
set_val(MOVE_Y , 0);

// if no combo execute - look for combo activation
} else {
// EDIT THIS PART OF SCRIPT for combo run ---------------------------
//////////////////////////////////////////////////////////////////////////
if(Switch) {
// Right Stick RIGHT
if (get_val (9) >= 80) {
cancel=1;
i = get_combo_index(FWD_IAD);
}
// Right Stick LEFT
if (get_val (9) <= -80) {
cancel=1;
i = get_combo_index(BACK_IAD);
}
}
else if (!Switch) {
// Right Stick RIGHT
if (get_val (9) <= -80) {
cancel=1;
i = get_combo_index(FWD_IAD);
}
// Right Stick LEFT
if (get_val (9) >= 80) {
cancel=1;
i = get_combo_index(BACK_IAD);
}
}
// Right Stick UP
if (get_val (10) <= -80) {
cancel=1;
i = get_combo_index();
}
// Right Stick DOWN
if (get_val (10) >= 80) {
cancel=1;
i = get_combo_index();
}
// Down + Medium
if (get_val (PS4_DOWN)) {
set_val(PS4_TRIANGLE,0);
cancel=2;
if(get_lval(PS4_TRIANGLE)) i = get_combo_index();
}
// up/forward + heavy
if (get_val (forward) && get_val (PS4_UP)) {
set_val(PS4_CIRCLE,0);
cancel=2;
if(get_lval(PS4_CIRCLE)) i = get_combo_index();
}
// forward + square
if (!get_val (forward) && !get_val (PS4_DOWN) && get_val (PS4_TRIANGLE)) {
set_val(PS4_TRIANGLE,0);
cancel=2;
if(get_lval(PS4_TRIANGLE)) i = get_combo_index();
}
// down + heavy
if (get_val (PS4_DOWN)) {
set_val(PS4_CIRCLE,0);
cancel=2;
if(get_lval(PS4_CIRCLE)) i = get_combo_index();
}

// R1 Dragon Rush
if (get_val (PS4_R1)&& get_ptime (PS4_R1) > 40) {
set_val(PS4_R1,0);
cancel=2;
if(get_lval(PS4_R1)) i = get_combo_index();
}

// end editing here --------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////
}// <combo activation> end
}//<main> block end

// This combo will run a step with wait
combo execute_step {
set_buttons_values();
wait(wait_time);
set_buttons_values();
}

// This combo will run a step without wait
combo execute_step_no_wait {
set_buttons_values();
}


combo RUMBLE_NOTIFICATION {
set_rumble(RUMBLE_TYPE, 100);
wait(300);
reset_rumble ();
}

// Returns the starting index of a combo
function get_combo_index(combo_id) {
i = 0;
while(TRUE) {//-----------------------
v = dbyte(i);
if(v == combo_id) {
return(i + 1);
} else {//====================
while(v != EOC && v != EOD) {//#
i = i + 1;
v = dbyte(i);
}//#
if(v == EOD) break;
else i = i + 1;
}//=============================
}//-----------------------------------
return(-1);
}

// Set the buttons, values and wait time of a step
function get_step_values() {
b = dbyte(i); i = i + 1;
if(b > 5) return(FALSE);

if(b >= 1) {
button_1 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_1 = -1; }

if(b >= 2) {
button_2 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_2 = -1; }

if(b >= 3) {
button_3 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_3 = -1; }

if(b >= 4) {
button_4 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_4 = -1; }

if(b >= 5) {
button_5 = convert_back_forward(dbyte(i)); i = i + 1;
} else { button_5 = -1; }

wait_time = dbyte(i); i = i + 1;
wait_time = (wait_time - 1) * 10;
if(wait_time < 0) wait_time = 0;

return(TRUE);
}

// If the step has FORWARD and BACK buttons, set the correct value.
function convert_back_forward(button) {
if(button == FORWARD) {
return(forward);
} else if(button == BACK) {
return(back);
}
return(button);
}

// Set the buttons and values, function used on the combos.
function set_buttons_values() {
if(button_1 != -1) set_val(button_1, 100);
if(button_2 != -1) set_val(button_2, 100);
if(button_3 != -1) set_val(button_3, 100);
if(button_4 != -1) set_val(button_4, 100);
if(button_5 != -1) set_val(button_5, 100);
}

The easiest way to use this would be to copy/paste the int and main sections from this onto the converted data script generated by SM.
thank you i tried blanking one of your scripts but i kept getting an error or something just went wrong but i appreciate it!