Building an attack series for PS4

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

Building an attack series for PS4

Postby xxDrDoom » Thu Feb 23, 2017 2:04 am

Hi,

I'm trying to build an attack rotation that a single PS4 button to be pushed (it can be any button) and a series of PS4 button presses occurs. I wrote something, which isn't elegant and isn't working, but am posting what I'm trying to accomplish. This is for the Elder Scrolls Online.

The commands are:

Liquid > Blockade > Swap > Curse > Scamp > 5 Spams > Swap
Liquid > Blockade > Swap > Scamp > 2 Spams > Curse > 3 Spams > Swap
Liquid > Blockade > Swap > Scamp > 5 Spams
Curse > Swap > Liquid > Blockade > Swap > Scamp > 6 Spams

Where swap = bar swap and spam = spammable attack.

These are the skills translated into PS4 strokes. It would be:

Square > Triangle > left DPad > Square > Triangle > 5 Circle > left DPad
Square > Triangle > left DPad > Triangle > 2 Circle > Square > 3 Circle > left DPad
Square > Triangle > left DPad > Triangle > 5 Circle
Square > left DPad > Square > Triangle > left DPad > Triangle > 6 Circle

I can go into the logic if needed, but this rotation is used to get maximum DPS on critters in the game.

To make it a little more complex, after each Square, Circle or Triangle (not after the DPad), I would like to insert an R2 500ms after the button press (global timer for button presses). The R2 can be 100ms long or longer, but prefer 50 to 100 ms. Anyone that can assist, it will be much appreciated.

DD
User avatar
xxDrDoom
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Dec 22, 2016 12:58 am

Re: Building an attack series for PS4

Postby J2Kbr » Thu Feb 23, 2017 5:28 pm

Definitively an script can be coded to reproduce this button sequence, please let me know if this
Code: Select all
Square > Triangle > left DPad > Square > Triangle > 5 Circle > left DPad
Square > Triangle > left DPad > Triangle > 2 Circle > Square > 3 Circle > left DPad
Square > Triangle > left DPad > Triangle > 5 Circle
Square > left DPad > Square > Triangle > left DPad > Triangle > 6 Circle

is an single and continuous sequence, or you need separated combos for each line? Thanks.
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: Building an attack series for PS4

Postby xxDrDoom » Thu Feb 23, 2017 6:03 pm

Thanks for responding. This would be a single and continuous sequence. It's basically a full rotation of many skills. I would then repeat this sequence over and over until the boss is dead.
User avatar
xxDrDoom
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Dec 22, 2016 12:58 am

Re: Building an attack series for PS4

Postby J2Kbr » Thu Feb 23, 2017 7:29 pm

Alright, hopefully I got it right. To start/stop press the PS4 touchpad.

You can customize the timing on the defines.

Code: Select all
define TIME             = 50;
define R2_TIME          = 50;
define TIME_BEFORE_R2   = 500;
 
int toggle;
 
main {
    if(event_press(PS4_TOUCH)) {
        toggle = !toggle;
    }
    if(toggle) {
        combo_run(AttackSerie);
    }
}
 
combo AttackSerie {
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > 5 Circle
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > 2 Circle
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > 3 Circle
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > 5 Circle
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Square
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    // > Triangle
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    // > 6 Circle
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME);
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
}
 
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: Building an attack series for PS4

Postby xxDrDoom » Thu Feb 23, 2017 7:46 pm

Thanks! This makes sense and is similar to what I've done. But yours is much more elegant. :)

A couple of questions.

So if I hit the touchpad, the series will repeat until i hit the touchpad again? Or does it run once and reset? If the former, this is awesome. If not, then how could I set this up to loop? In looking at the code, it appears it just keeps going, but don't know the toggle command toggle.
Of course the touchpad has a task it does already in the game. Can I assign something different. Like L3 or right dpad? Since the first item in the rotation is the square key, could I use it as the toggle. Or will this cause a loop issue of some kind?

Thanks again
User avatar
xxDrDoom
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Dec 22, 2016 12:58 am

Re: Building an attack series for PS4

Postby J2Kbr » Thu Feb 23, 2017 7:55 pm

You are welcome.

xxDrDoom wrote:So if I hit the touchpad, the series will repeat until i hit the touchpad again?

Correct, this is how it is programmed.

xxDrDoom wrote:but don't know the toggle command toggle.

Actually "toggle" is an variable, not an command.

xxDrDoom wrote:Can I assign something different. Like L3 or right dpad?

yes, definitively. just update the reference PS4_TOUCH to PS4_L3, or any other. :joia:
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: Building an attack series for PS4

Postby xxDrDoom » Thu Feb 23, 2017 8:07 pm

Just tried it and it works perfectly. I think I need to adjust the timing a little as some of the circles aren't registering. WIll have to look up the global cool down for that skill. Thank you again!
User avatar
xxDrDoom
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Dec 22, 2016 12:58 am

Re: Building an attack series for PS4

Postby J2Kbr » Thu Feb 23, 2017 8:41 pm

glad I could help! :)
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: Building an attack series for PS4

Postby xxDrDoom » Fri Feb 24, 2017 2:03 am

Back again. In order to make this beast more manageable, I tried something new. But it isn't working. Can you take a look please and offer suggestions. I'm trying to take each of the PS4 keys and turn them into callable functions. Thanks for taking a look. I'm guessing I'm getting stuck in a loop, but haven't coded in quite a few years and probably don't understand the syntax well enough.

Code: Select all
define TIME             = 50;
define R2_TIME        = 50;
define TIME_BEFORE_R2   = 550;
 
int toggle;
 
main {
    if(event_press(PS4_RIGHT)) {
        toggle = !toggle;
    }
    if(toggle) {
        combo_run(AttackSerie);
    }
}
combo RUN_CIRCLE {
    set_val(PS4_CIRCLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
 
    set_val(PS4_L2, 100);
    wait(R2_TIME); wait(TIME);
 
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    combo_stop(RUN_CIRCLE);
    }
combo RUN_TRIANGLE {
    set_val(PS4_TRIANGLE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
 
    set_val(PS4_L2, 100);
    wait(R2_TIME); wait(TIME);
 
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    combo_stop(RUN_TRIANGLE);
    }
 
combo RUN_SQUARE {
    set_val(PS4_SQUARE, 100);
    wait(TIME); wait(TIME_BEFORE_R2);
 
    set_val(PS4_L2, 100);
    wait(R2_TIME); wait(TIME);
 
    set_val(PS4_R2, 100);
    wait(R2_TIME); wait(TIME);
    combo_stop(RUN_SQUARE);
    }
 
combo RUN_LEFT_DPAD {
// > left DPad
    set_val(PS4_LEFT, 100);
    wait(TIME); wait(TIME);
    combo_stop(RUN_LEFT_DPAD);
    }
 
combo AttackSerie {
    // > Square
    combo_run(RUN_SQUARE);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Square
    combo_run(RUN_SQUARE);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > 5 Circle
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Square
    combo_run(RUN_SQUARE);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > 2 Circle
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
 
    // > Square
    combo_run(RUN_SQUARE);
 
    // > 3 Circle
 
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Square
    combo_run(RUN_SQUARE);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > 5 Circle
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
 
 
    // > Square
    combo_run(RUN_SQUARE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Square
    combo_run(RUN_SQUARE);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > left DPad
    combo_run(RUN_LEFT_DPAD);
 
    // > Triangle
    combo_run(RUN_TRIANGLE);
 
    // > 6 Circle
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
    combo_run(RUN_CIRCLE);
}
User avatar
xxDrDoom
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Dec 22, 2016 12:58 am

Re: Building an attack series for PS4

Postby xxDrDoom » Fri Feb 24, 2017 2:10 am

In reading the users guide, should I be using a call command of the combos? I'll try that.
User avatar
xxDrDoom
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Dec 22, 2016 12:58 am

Next

Return to Titan One Device

Who is online

Users browsing this forum: punkteer and 109 guests