PDA

View Full Version : Can I please get assistants for Script Manipulator?



rocrob123
21st July 18, 14:29
how do you do combo runs in Script manipulator? I'm trying to create 6 different basic UFC 3 combos where I can activate one with dpad up, dpad down, dpad right, dpad left and 2 other combos for L3 and TOUCHPAD.


combo combo1 {
set_val(PS4_CROSS, 100);
set_val(PS4_SQUARE, 100);
wait(140);
set_val(PS4_CROSS, 0);
set_val(PS4_SQUARE, 100);
wait(10);
set_val(PS4_SQUARE, 0);
wait(120);
set_val(PS4_TRIANGLE, 100);
set_val(PS4_CIRCLE, 100);
wait(130);
set_val(PS4_TRIANGLE, 100);
set_val(PS4_CIRCLE, 0);
wait(10);
set_val(PS4_TRIANGLE, 0);
wait(240);
set_val(PS4_SQUARE, 100);
wait(10);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 100);
wait(70);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 0);
wait(20);
set_val(PS4_L1, 0);
wait(170);
set_val(PS4_TRIANGLE, 100);
wait(10);
set_val(PS4_TRIANGLE, 100);
set_val(PS4_CIRCLE, 100);
wait(120);
set_val(PS4_TRIANGLE, 0);
set_val(PS4_CIRCLE, 0);
}


combo combo2 {
set_val(PS4_TRIANGLE, 100);
wait(110);
set_val(PS4_TRIANGLE, 0);
wait(120);
set_val(PS4_L1, 100);
wait(30);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 100);
wait(90);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 0);
wait(40);
set_val(PS4_L1, 0);
wait(100);
set_val(PS4_TRIANGLE, 100);
wait(10);
set_val(PS4_L2, 100);
set_val(PS4_TRIANGLE, 100);
wait(70);
set_val(PS4_L2, 100);
set_val(PS4_TRIANGLE, 0);
wait(80);
set_val(PS4_L2, 0);
wait(110);
set_val(PS4_L1, 100);
wait(20);
set_val(PS4_L1, 100);
set_val(PS4_CROSS, 100);
wait(100);
set_val(PS4_L1, 100);
set_val(PS4_CROSS, 0);
wait(690);
set_val(PS4_L1, 0);
}


combo combo3 {
set_val(PS4_L2, 100);
wait(30);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 100);
wait(150);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 0);
wait(40);
set_val(PS4_L1, 100);
set_val(PS4_L2, 0);
wait(220);
set_val(PS4_L1, 100);
set_val(PS4_TRIANGLE, 100);
wait(120);
set_val(PS4_L1, 100);
set_val(PS4_TRIANGLE, 0);
wait(130);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 100);
wait(80);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 0);
wait(310);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_TRIANGLE, 100);
wait(110);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_TRIANGLE, 0);
wait(450);
set_val(PS4_L1, 0);
set_val(PS4_L2, 100);
wait(20);
set_val(PS4_L2, 0);
}

combo combo4 {
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 100);
wait(120);
set_val(PS4_L1, 100);
set_val(PS4_SQUARE, 0);
wait(30);
set_val(PS4_L1, 0);
wait(160);
set_val(PS4_L2, 100);
wait(10);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
wait(10);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_TRIANGLE, 100);
wait(100);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_TRIANGLE, 0);
wait(120);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 100);
wait(80);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 0);
wait(70);
set_val(PS4_L1, 100);
set_val(PS4_L2, 0);
wait(50);
set_val(PS4_L1, 100);
set_val(PS4_TRIANGLE, 100);
wait(80);
set_val(PS4_L1, 100);
set_val(PS4_TRIANGLE, 0);
wait(820);
set_val(PS4_L1, 0);
}


combo combo5 {
set_val(PS4_CROSS, 100);
set_val(PS4_SQUARE, 100);
wait(120);
set_val(PS4_CROSS, 0);
set_val(PS4_SQUARE, 100);
wait(10);
set_val(PS4_SQUARE, 0);
wait(90);
set_val(PS4_TRIANGLE, 100);
wait(90);
set_val(PS4_TRIANGLE, 0);
wait(150);
set_val(PS4_L2, 100);
wait(10);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
wait(20);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 100);
wait(100);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 0);
wait(110);
set_val(PS4_L1, 0);
set_val(PS4_L2, 0);
wait(160);
set_val(PS4_CIRCLE, 100);
wait(100);
set_val(PS4_CIRCLE, 0);
}


combo combo6 {
set_val(PS4_SQUARE, 100);
wait(130);
set_val(PS4_SQUARE, 0);
wait(100);
set_val(PS4_CIRCLE, 100);
wait(20);
set_val(PS4_TRIANGLE, 100);
set_val(PS4_CIRCLE, 100);
wait(140);
set_val(PS4_TRIANGLE, 0);
set_val(PS4_CIRCLE, 100);
wait(20);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_L2, 100);
wait(10);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
wait(30);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 100);
wait(110);
set_val(PS4_L1, 100);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 0);
wait(50);
set_val(PS4_L1, 0);
set_val(PS4_L2, 100);
wait(10);
set_val(PS4_L2, 0);
wait(120);
set_val(PS4_CIRCLE, 100);
wait(100);
set_val(PS4_CIRCLE, 0);
}

justframe
21st July 18, 21:01
how do you do combo runs in Script manipulator?

It looked like you did everything right in that injustice script you posted so I don't know how much more help you need but here you go.

Take the combos you made and go into the fighting games tab of script manipulator. Choose the "convert combo to data segment" tool just under the fighting game tab at the top and copy/paste the combos you want to convert into the smaller box on the left side. Then click "convert to data-standard method".

Script manipulator will then convert the combos into data segments- you can see the converted combos in the bigger box on the right side. Copy the entire script in that box and paste it into a blank script in CronusPro.

From here you need to make a few changes for the script to work correctly. Go to the main section of the script and delete the lines at the top labelled "determine back and forward". then paste this in its place:

// Determine Back and Forward if(get_val(PS4_LX) > 80) {
back = LEFT; forward = RIGHT;
} else if(get_val(PS4_LX) < -80) {
back = RIGHT; forward = LEFT;
}//----------------------------------------------

These lines are what allows the script to work whether your character is on the right or left side of the screen by moving the left stick to the right or left. I dont play UFC3 so I don't know if the left stick is what you use to move or if this line is even needed, you may just want to delete it completely.

Next you need to add cancel lines- these will give you a way to stop the combo if you miss/it gets blocked etc. You can just paste this into the main section, below the lines of code marked "if there is a combo to be executed":

// CANCEL combos condition-----------------------------------------
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_L1) && !get_val(PS4_L2) && !get_val(PS4_R1) && !get_val(PS4_R2) ) {
i = -1;
combo_stop(execute_step);
}
}
These lines of code say to cancel the combo if you let go of a stick direction or one of the shoulder buttons. If you wanted your combos to activate with d-pad directions, you would change the lines that say "if (!get_val(PS4_L1)" to "if (!get_val(PS4_LEFT)". Do this for up, right and down and add a new one for PS4_TOUCH.

The last thing you need to do is add in the lines that activate the combos. The format for doing this is different for combos that have been converted into data. They look like this:

// Left Stick LEFT
if (get_val (PS4_R1)) { //combo combo1
cancel=2;
i = get_combo_index(combo1);
}
Copy/paste the above lines between the sections marked "edit this part of script for combo run" and "end editing here". You will need to make one for every combo you've put in the script. Once you've done that you'll need to edit each one slightly.

First change the line that says "if (get_val (PS4_R1))" to whatever button you want the combo to run from. If instead of making it activate with R1 you want to make it activate with L1, you would change the PS4_R1 part to PS4_L1.

If you choose to activate the combo with a shoulder button, leave the line that says "cancel==2" alone. If you want to activate the combo from a stick direction, change it to "cancel==1".

In the line that says "i=get_combo_index(combo1);" change combo1 to the name of the combo.

Do this for all the combos you want to put in the script. Once you've done that you have a finished script.

justframe
21st July 18, 21:34
Here are your combos converted into data w/ script manipulator. You can compare this to what you make yourself and see if you're getting it right:
// Script was generated with < Script Manipulator > ver. 13.6 Date :07/21/18 Time: 5:11:17 PM//------------------------------------------------------------------------

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
//-----------------------------------------------------


define combo1 = 0;
define combo2 = 1;
define combo3 = 2;
define combo4 = 3;
define combo5 = 4;
define combo6 = 5;
data(
combo1,
2,BTN3,
BTN4,
14,
1,BTN4,
1,
0,12,
2,BTN1,
BTN2,
13,
1,BTN1,
1,
0,24,
1,BTN4,
1,
2,BTN7,
BTN4,
7,
1,BTN7,
2,
0,17,
1,BTN1,
1,
2,BTN1,
BTN2,
12,
EOC,
combo2,
1,BTN1,
11,
0,12,
1,BTN7,
3,
2,BTN7,
BTN4,
9,
1,BTN7,
4,
0,10,
1,BTN1,
1,
2,BTN8,
BTN1,
7,
1,BTN8,
8,
0,11,
1,BTN7,
2,
2,BTN7,
BTN3,
10,
1,BTN7,
69,
EOC,
combo3,
1,BTN8,
3,
3,BTN7,
BTN8,
BTN4,
15,
2,BTN7,
BTN8,
4,
1,BTN7,
22,
2,BTN7,
BTN1,
12,
1,BTN7,
13,
2,BTN7,
BTN4,
8,
1,BTN7,
31,
3,BTN7,
BTN8,
BTN1,
11,
2,BTN7,
BTN8,
45,
1,BTN8,
2,
EOC,
combo4,
2,BTN7,
BTN4,
12,
1,BTN7,
3,
0,16,
1,BTN8,
1,
2,BTN7,
BTN8,
1,
3,BTN7,
BTN8,
BTN1,
10,
2,BTN7,
BTN8,
12,
3,BTN7,
BTN8,
BTN4,
8,
2,BTN7,
BTN8,
7,
1,BTN7,
5,
2,BTN7,
BTN1,
8,
1,BTN7,
82,
EOC,
combo5,
2,BTN3,
BTN4,
12,
1,BTN4,
1,
0,9,
1,BTN1,
9,
0,15,
1,BTN8,
1,
2,BTN7,
BTN8,
2,
3,BTN7,
BTN8,
BTN4,
10,
2,BTN7,
BTN8,
11,
0,16,
1,BTN2,
10,
EOC,
combo6,
1,BTN4,
13,
0,10,
1,BTN2,
2,
2,BTN1,
BTN2,
14,
1,BTN2,
2,
0,6,
1,BTN8,
1,
2,BTN7,
BTN8,
3,
3,BTN7,
BTN8,
BTN4,
11,
2,BTN7,
BTN8,
5,
1,BTN8,
1,
0,12,
1,BTN2,
10,
EOC,
EOD );
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;

main {


// Determine Back and Forward
if(get_val(PS4_LX) > 80) {
back = LEFT; forward = RIGHT;
} else if(get_val(PS4_LX) < -80) {
back = RIGHT; forward = LEFT;
}//----------------------------------------------



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

// CANCEL combos condition-----------------------------------------
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_LEFT) && !get_val(PS4_RIGHT) && !get_val(PS4_UP) && !get_val(PS4_DOWN) && !get_val(PS4_L3) && !get_val(PS4_TOUCH) ) {
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);
set_val(PS4_TOUCH , 0);
set_val(PS4_L3 , 0);

// if no combo execute - look for combo activation
} else {
// EDIT THIS PART OF SCRIPT for combo run ---------------------------
//////////////////////////////////////////////////////////////////////////
// D-pad LEFT
if (get_val (PS4_LEFT)) { //combo1
cancel=2;
i = get_combo_index(combo1);
}
// D-pad RIGHT
if (get_val (PS4_RIGHT)) { //combo2
cancel=2;
i = get_combo_index(combo2);
}
// D-pad UP
if (get_val (PS4_UP)) { //combo3
cancel=2;
i = get_combo_index(combo3);
}
// D-pad DOWN
if (get_val (PS4_DOWN)) { //combo4
cancel=2;
i = get_combo_index(combo4);
}
// Press L3
if (get_val (PS4_L3)) { //combo5
cancel=2;
i = get_combo_index(combo5);
}
// Press TOUCH
if (get_val (PS4_TOUCH)) { //combo6
cancel=2;
i = get_combo_index(combo6);
}
// 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 combos are activated with up, right, left, and down on d-pad as well as L3 and touchpad.

rocrob123
21st July 18, 21:50
How do you learn all of this like wtf man and I didn't really made that injustice 2 script. I just edited the combo then put my own.

justframe
21st July 18, 23:19
The online manual will help a lot. You can find it at the top of the forum under manuals. If you go to the GPC guide section of the manual it will tell you nearly everything you need to know. Aside from that it just takes time and practice. Keep in mind that what you're doing when you make a script is writing in an actual programming language. Its simplified compared to something like c++ but it still takes time to learn.