Skip to content

Instantly share code, notes, and snippets.

@DaMoggen
Forked from sbaildon/README.md
Last active May 25, 2018 10:31
Show Gist options
  • Save DaMoggen/9557e31891e1958966c9a67b9b2fb889 to your computer and use it in GitHub Desktop.
Save DaMoggen/9557e31891e1958966c9a67b9b2fb889 to your computer and use it in GitHub Desktop.
Yakuza 0 Legend Dragon of Dojima/Mad Dog of Shimano styles AutoHotKey Script

Info

Using the PS4 Remote Play and AutoHotkey for Windows you can automate leveling up the Legend styles for Kiryu (Dragon of Dojima), and Majima (Mad Dog of Shimano). The PS4 Remote Play app allows keyboard emulation for the D-Pad, and "X" button only, but that's all that's necessary for leveling up your skill tree!

It will take approximately 5 minutes per level, anything faster can cause the script to fail

Usage

Prerequisites

Running

  • Download legend.ahk
  • Use remote play to open the Legend style in game.
  • Move the cursor to the first red skill point.
  • Run the script, right click -> "Run Script", or drag the file onto AutoHotkeyU64.exe.
  • Click in the Remote Play app before two seconds have passed.
  • Pressing the Escape key will stop the script.

Notes

You've got 2 seconds from when you run the script to click into the Remote Play app. If this isn't enough, change the number on line 120 to give yourself more time.

You can't use your computer whilst the script is running, because the key presses are sent to the foreground window. (If anyone can get ControlSend to work rather than just Send, that'd be good!)

If you've partially filled out a talent tree already, I recommend that you upgrade it to the next level.

Increase the number 5 on line 122 to the number of levels to acquire before the script needs to be restarted.

If the script is interrupted for any reason, there's a good chance the Remote Play app will stop responding to the D-Pad or the "X" button. Test them out in game before restarting the script. If they don't work, restarting the Remote Play app will fix it.

It's recommended the machine you're remote playing from, and the PS4 are connected to the same network with a cable. Random spikes in latency can mess up the automation. This version of the script is slowed down a little bit compared to what sBaildon provides as these are the times that caused it to work flawlessly for me for about 100 levels straight.

AcquireNode() {
Loop 185 {
Send {Return down}
}
Send {Return up}
Sleep 1500
Loop 35 {
Send {Return down}
}
Send {Return up}
}
PressDPad(DPadKey) {
Loop 25 {
Send {%DPadKey% down}
}
Send {%DPadKey% up}
Sleep 80
}
AcquireNodeAndMove(Direction) {
AcquireNode()
PressDPad(Direction)
}
AcquireFullTree() {
; Start from bottom red
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Left")
; Red left side
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Right")
PressDPad("Right")
; Red right side
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Right")
; Blue outside
AcquireNodeAndMove("Right")
AcquireNodeAndMove("Right")
AcquireNodeAndMove("Down")
; Move to yellow center
PressDPad("Down")
PressDPad("Up")
PressDPad("Up")
PressDPad("Up")
PressDPad("Up")
PressDPad("Up")
; Yellow Tree middle from center
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
; Move to Right yellow
AcquireNodeAndMove("Right")
AcquireNodeAndMove("Right")
; Move to blue and back to yellow
PressDPad("Left")
AcquireNodeAndMove("Right")
AcquireNodeAndMove("Right")
AcquireNodeAndMove("Right")
; Move to left yellow side
PressDPad("Down")
PressDPad("Left")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Left")
; Get center bottom blue orbs
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Left")
; Get in position for blue
PressDPad("Left")
PressDPad("Up")
PressDPad("Up")
PressDPad("Up")
PressDPad("Up")
PressDPad("Up")
; Blue center lines
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Down")
; Blue right lines
AcquireNodeAndMove("Down")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Left")
; Blue left lines
PressDPad("Left")
AcquireNodeAndMove("Left")
AcquireNodeAndMove("Left")
AcquireNodeAndMove("Left")
AcquireNodeAndMove("Up")
; Blue outside
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Up")
AcquireNodeAndMove("Right")
;
; Should be finished now
; Reset cursor to start again
PressDPad("Right")
PressDPad("Down")
PressDPad("Down")
PressDPad("Down")
PressDPad("Down")
}
Sleep 2000
Loop 5 {
AcquireFullTree()
}
TrayTip, Yakuza, Finished
Esc::ExitApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment