PDA

View Full Version : SFV Trials



tencubed42
26th August 17, 00:49
I modified a script from FalconPunch to better suit being used for trials. I started with Ryu Vol. 1 trials 1-10. I plan to do the rest in my free time, so I thought I'd share. To activate the trial scripts:



Trial 1: Left Stick Up
Trial 6: Right Stick Up


Trial 2: Left Stick Right
Trial 7: Right Stick Right


Trial 3: Left Stick Down
Trial 8: Right Stick Down


Trial 4: Left Stick Left
Trial 9: Right Stick Left


Trial 5: Left Stick Button
Trial 10: Right Stick Button



I tested these on PC. I don't have a PS4, so I can't test them there. They should work, though. If one doesn't work the first time, try again sometimes that happens for whatever reason.


/////////////////////////////////////////////////////////////////////////////////
// MODIFIED SCRIPT UPLOADED BY FALCONPUNCH //
// MODIFIED FOR USE IN TRIALS BY TENCUBED42 //
/////////////////////////////////////////////////////////////////////////////////
// //
// RYU VOLUME 1 TRIALS 1 - 10 //
// //
/////////////////////////////////////////////////////////////////////////////////


define P1 = 20;
define P2 = 17;
define P3 = 3;
define P4 = 6;
define K1 = 19;
define K2 = 18;
define K3 = 4;
define K4 = 7;
define DUP = 13;
define DDOWN = 14;
define DLEFT = 15;
define DRIGHT = 16;
define START = 2;
define SELECT = 1;
define RESET = 5;
define frame = 17;


define VTrigger = 36;
define VSkill = 37;
define Throw = 38;
define PPP = 39;
define KKK = 40;

define EOC = 254; // End of Combo
define EOD = 255; // End of Data Segment

define Trial_1_v1 = 1;
define Trial_2_v1 = 2;
define Trial_3_v1 = 3;
define Trial_4_v1 = 4;
define Trial_5_v1 = 5;
define Trial_6_v1 = 6;
define Trial_7_v1 = 7;
define Trial_8_v1 = 8;
define Trial_9_v1 = 9;
define Trial_10_v1 = 10;
define Trial_1_v2 = 11;
define Trial_2_v2 = 12;
define Trial_3_v2 = 13;
define Trial_4_v2 = 14;
define Trial_5_v2 = 15;
define Trial_6_v2 = 16;
define Trial_7_v2 = 17;
define Trial_8_v2 = 18;
define Trial_9_v2 = 19;
define Trial_10_v2 = 20;


data(
Trial_1_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames
1,DRIGHT,100,20, //Walk forward. 20 frames.
2,DRIGHT,100,DUP,100,30,0,1, //jump in. 30+1 frames.
1,P3,100,10,0,20, //j.FP 10+20 frame.
1,P2,100,10,0,10, //Jodan Target Combo. pt 1. 10+10 frames.
1,P3,100,7,0,10, //Jodan Target Combo. pt 2. 10+10 frames.
1,K3,100,12,0,1, //Jodan Target Combo. pt 3. 10+10 frames.
EOC,


Trial_2_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2, //Dash Forward. 2+2, 2+2 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,20, //Dash Forward. 2+1, 2+20 frames.
2,DDOWN,100,K2,100,4, //c.mk x lt.Fireball Pt1 4 frames.
3,K2,0,DDOWN,100,DRIGHT,100,3, //c.mk x lt.Fireball Pt2 3 frames.
3,DDOWN,0,DRIGHT,100,P1,100,3,0,1, //c.mk X lt.Fireball Pt3 3+1 frames.
EOC,


Trial_3_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames.
1,DRIGHT,100,20, //Walk forward. 20 frames.
2,DRIGHT,100,DUP,100,30,0,1, //Jump in. 30+1 frames.
1,P3,100,10,0,20, //J.FP 10+20 frames.
1,P2,100,3,0,22, //S.MP 3+22 frames.
2,DDOWN,100,K2,100,4, //C.MK x lt.Fireball. Pt1 4 frames.
3,K2,0,DDOWN,100,DRIGHT,100,3, //C.MK x lt.Fireball. Pt2 3 frames.
3,DDOWN,0,DRIGHT,100,P1,100,3,0,1, //C.MK x lt.Fireball. Pt3 3+1 frames.
EOC,


Trial_4_v1,
1,RESET,100,1,0,50, //Reset trial, and wait 50 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2, //Dash Forward. 2+2, 2+2 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,20, //Dash Forward. 2+2, 2+20 frames.


1,DUP,100,9,0,2, //Neutral jump. 9+2 frames.
1,P2,100,5,0,5, //J.MP x Air Tatsu. Pt1 5+5 frames.
1,DDOWN,100,3, //J.MP x Air Tatsu. Pt2 3 frames.
2,DDOWN,100,DRIGHT,100,3, //J.MP x Air Tatsu. Pt3 3 frames.
3,DDOWN,0,DRIGHT,100,K1,100,3,0,1, //J.MP x Air Tatsu. Pt4 3+1 frames.
EOC,


Trial_5_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2, //Dash Forward. 2+2, 2+2 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,20, //Dash Forward. 2+2, 2+20 frames.
1,K3,100,40, //S.FK CC. 40 Frames.
1,DDOWN,100,3, //Lt.Tatsu. Pt1 3 frames.
2,DDOWN,100,DLEFT,100,3, //Lt.Tatsu. Pt2 3 frames.
3,DDOWN,0,DLEFT,100,K1,100,3,0,1, //Lt.Tatsu. Pt3 3+1 frames.
EOC,


Trial_6_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames.
1,DRIGHT,100,20, //Walk Forward. 20 frames.
2,DRIGHT,100,DUP,100,30,0,1, //Jump in. 30+1 frames.
1,P3,100,10,0,20, //J.FP 10+20 frames.
2,DLEFT,100,K3,100,44,0,2, //Axe Kick. 44+2 frames.
1,DRIGHT,100,3,0,2, //M.DP Pt1 3+2 frames.
1,DDOWN,100,3, //M.DP Pt2 3 frames.
3,DDOWN,100,DRIGHT,100,P2,100,3,0,1, //M.DP Pt3 3+1 frames.
EOC,

Trial_7_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames.
1,DRIGHT,100,20, //Walk Forward. 20 frames.
2,DRIGHT,100,DUP,100,30,0,1, //Jump In. 30+1 frames.
1,P3,100,10,0,20, //J.FP 10+20 frames.
2,DDOWN,100,P3,100,4,0,2, //C.FP x M.DP x CA Pt1 4+2 frames.
1,DRIGHT,100,3,0,2, //C.FP x M.DP x CA Pt2 3+2 frames.
1,DDOWN,100,3, //C.FP x M.DP x CA Pt3 3 frames.
3,DDOWN,100,DRIGHT,100,P2,100,3, //C.FP x M.DP x CA Pt4 3 frames.
3,DDOWN,0,P2,0,DRIGHT,100,3,0,2, //C.FP x M.DP x CA Pt5 3+2 frames.
1,DDOWN,100,3, //C.FP x M.DP x CA Pt6 3 frames.
2,DDOWN,100,DRIGHT,100,3, //C.FP x M.DP x CA Pt7 3 frames.
3,DDOWN,0,DRIGHT,100,P1,100,3,0,1, //C.FP x M.DP x CA Pt8 3+1 frames.
EOC,

Trial_8_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames.
1,DRIGHT,100,20, //Walk forward. 20 frames.
2,DRIGHT,100,DUP,100,30,0,1, //Jump In. 30+1 frames.
1,P3,100,10,0,20, //J.FP 10+20 frames.
2,DDOWN,100,P3,100,4,0,2, //c.FP 4+2 frames.
1,VTrigger,100,60,0,10, //V-trigger 60+10 frames.
1,P2,100,2, //S.Mp x lt.Fireball x CA Pt1 2 frames.
1,DDOWN,100,3, //S.Mp x lt.Fireball x CA Pt2 3 frames.
2,DDOWN,100,DRIGHT,100,3, //S.Mp x lt.Fireball x CA Pt3 3 frames.
2,DDOWN,0,DRIGHT,100,3, //S.Mp x lt.Fireball x CA Pt4 3 frames.
2,DRIGHT,100,P1,100,3, //S.Mp x lt.Fireball x CA Pt5 3 frames.
1,DDOWN,100,3, //S.Mp x lt.Fireball x CA Pt6 3 frames.
2,DDOWN,100,DRIGHT,100,3, //S.Mp x lt.Fireball x CA Pt7 3 frames.
3,DDOWN,0,DRIGHT,100,3, //S.Mp x lt.Fireball x CA Pt8 3 frames.
2,DRIGHT,100,P1,100,3,0,1, //S.Mp x lt.Fireball x CA Pt9 3+1 frames.
EOC,


Trial_9_v1,
1,RESET,100,1,0,60, //Reset trial, and wait 60 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2, //Dash Forward. 2+2, 2+2 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2,0,20, //Dash Forward. 2+2, 2+20 frames.
1,K3,100,4,0,2, //S.FK CC. 4+2 frames.
1,VTrigger,100,60,0,20, //V-Trigger 56+3 frames.
2,DRIGHT,100,P3,100,56,0,3, //Solar Plexus. 56+3 frames.
1,DRIGHT,100,3,0,3, //c.Mp x DP x CA Pt1 3+3 frames.
2,DDOWN,100,P2,100,4, //c.Mp x DP x CA Pt2 4 frames.
3,P2,0,DDOWN,100,DRIGHT,100,3, //c.Mp x DP x CA Pt3 3 frames.
3,DDOWN,100,DRIGHT,100,P3,100,3, //c.Mp x DP x CA Pt4 3 frames.
3,DDOWN,0,P3,0,DRIGHT,100,3, //c.Mp x DP x CA Pt5 3 frames.
1,DDOWN,100,3, //c.Mp x DP x CA Pt6 3 frames.
2,DDOWN,100,DRIGHT,100,3, //c.Mp x DP x CA Pt7 3 frames.
3,DDOWN,0,DRIGHT,100,P1,100,3,0,1, //c.Mp x DP x CA Pt8 3+1 frames.
EOC,


Trial_10_v1,
1,RESET,100,1,0,50, //Reset trial, and wait 60 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2, //Dash Forward. 2+2, 2+2 frames.
1,DRIGHT,100,2,0,2,1,DRIGHT,100,2,0,2,0,20, //Dash Forward. 2+2, 2+20 frames.
1,K3,100,50, //S.fp CC 50 frames.
2,K3,0,DRIGHT,100,5, //Micro-step. 5 frames.
2,DRIGHT,0,P3,100,4,0,2, //s.Fp 4+2 frames.
1,VTrigger,100,60,0,14, //V-Trigger. 60+14 frames.
2,DLEFT,100,K3,100,33,0,23, //Axe Kick. 33+23 frames.
1,K1,100,4, //s.lk 4 frames.
2,K1,0,DDOWN,100,3, //lt.Tatsu pt1 3 frames.
2,DDOWN,100,DLEFT,100,3, //lt.Tatsu pt2 3 frames.
3,DDOWN,0,DLEFT,100,K1,100,3,0,28, //lt.Tatsu pt3 3+28 frames.
1,DDOWN,100,3, //CA. pt1. 3 frames.
2,DDOWN,100,DRIGHT,100,3, //CA. pt2. 3 frames.
2,DDOWN,0,DRIGHT,100,3, //CA. pt3. 3 frames.
1,DDOWN,100,3, //CA. pt4. 3 frames.
2,DDOWN,100,DRIGHT,100,3, //CA. pt5. 3 frames.
3,DDOWN,0,DRIGHT,100,P1,100,3, //CA. pt6. 3 frames.
EOC,
EOD );

//block output to game for these buttons.
unmap 8; //PS=L3, XB=LS
unmap 12; //Left Stick Y Axis
unmap 11; //Left Stick X Axis
unmap 10; //Right Stick Y Axis
unmap 9; //Right Stick X Axis


int i = -1, b, v;
int button_1, button_2, button_3, button_4, button_5;
int value_1, value_2, value_3, value_4, value_5;
int wait_time;
int vol=0;


main {
// If there is a combo to be executed
if(i >= 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;
}
}


// Make sure the user inputs does not interfere in the combo
set_val(P1, 0);
set_val(P2, 0);
set_val(P3, 0);
set_val(P4, 0);
set_val(K1, 0);
set_val(K2, 0);
set_val(K3, 0);
set_val(K4, 0);
set_val(DUP, 0);
set_val(DRIGHT,0);
set_val(DDOWN,0);
set_val(DLEFT,0);
}
else {
if(get_val(SELECT)){
if(vol == 0){vol=10;}
else{vol=0;}
}
// LS UP
if (get_val (12)<= -60) {
i = get_combo_index(Trial_1_v1);
}

// LS RIGHT
if (get_val (11)>= 60) {
i = get_combo_index(Trial_2_v1);
}

// LS DOWN
if (get_val (12) >= 60) {
i = get_combo_index(Trial_3_v1);
}

//LS LEFT
if (get_val (11)<= -60) {
i = get_combo_index(Trial_4_v1);
}

// LEFT Stick Pressed
if (get_val (8)) {
i = get_combo_index(Trial_5_v1);
}

// RS UP
if (get_val (10) <= -60) {
i = get_combo_index(Trial_6_v1);
}

// RS RIGHT
if (get_val (9) >= 60) {
i = get_combo_index(Trial_7_v1);
}

// RS DOWN
if (get_val (10) >= 60) {
i = get_combo_index(Trial_8_v1);
}

// RS LEFT
if (get_val (9) <= -60) {
i = get_combo_index(Trial_9_v1);
}


// RIGHT Stick Pressed
if (get_val (5)) {
i = get_combo_index(Trial_10_v1);
}
}
}

// 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();
}

// Returns the starting index of a combo
function get_combo_index(combo_id) {
i = 0;
combo_id=combo_id + vol;
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(dbyte(i) > 35 && b != 0){
set_special(dbyte(i),dbyte(i + 1)); i = i + 2;
}
else{
if(b >= 1) {
button_1 = dbyte(i); i = i + 1;
value_1 = dbyte(i); i = i + 1;
} else { button_1 = -1; value_1 = 0; }

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

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

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

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

wait_time = frames(dbyte(i)); i = i + 1;

if(wait_time < 0) wait_time = 0;
else if(wait_time > 2530) wait_time = 2530;

return(TRUE);
}

// Set the buttons and values, function used on the combos.
function set_buttons_values() {
if(button_1 != -1) set_val(button_1, value_1);
if(button_2 != -1) set_val(button_2, value_2);
if(button_3 != -1) set_val(button_3, value_3);
if(button_4 != -1) set_val(button_4, value_4);
if(button_5 != -1) set_val(button_5, value_5);
}
function frames(iframes){
return iframes * frame;
}
function set_special(move,value){
if(move == VTrigger){
button_1 = P3; value_1 = value;
button_2 = K3; value_2 = value;
}
if(move == VSkill){
button_1 = P2; value_1 = value;
button_2 = K2; value_2 = value;
}
if(move == Throw){
button_1 = P1; value_1 = value;
button_2 = K1; value_2 = value;
}
if(move == PPP){
button_1 = P1; value_1 = value;
button_2 = P2; value_2 = value;
button_3 = P3; value_3 = value;
}
if(move == KKK){
button_1 = K1; value_1 = value;
button_2 = K2; value_2 = value;
button_3 = K3; value_3 = value;
}
}
function set_trace(value){
if(get_val(TRACE_1) == 0){ set_val(TRACE_1,value); return}
if(get_val(TRACE_2) == 0){ set_val(TRACE_2,value); return}
if(get_val(TRACE_3) == 0){ set_val(TRACE_3,value); return}
if(get_val(TRACE_4) == 0){ set_val(TRACE_4,value); return}
if(get_val(TRACE_5) == 0){ set_val(TRACE_5,value); return}
if(get_val(TRACE_6) == 0){ set_val(TRACE_6,value); return}
return;
}