PS4 Automation by Using RPA: Can Killer in Dead by Daylight be automated by using UiPath?


This article is to describe how to generate PS4 Bot by using RPA application.



Normally, it is assumed that many bots in PS4 are rialized by non-genuine controllers. Maybe some persons make bots by their own programming application with remote play which is PS4 default feature. In this article, Dead by Daylight (DbD), which is...
an asymmetrical multiplayer (4vs1) horror game where one player takes on the role of the savage Killer, and the other four players play as Survivors, trying to escape the Killer and avoid being caught and killed. (http://www.deadbydaylight.com/en)
, will be used for target game, and RPA will be used to automate killer player in DbD as Bot. Let’s make killer bot and discuss the technical topics and issues.

Note: This article is not recommend to use bot in the game. The purpose of this article is only for learning Automation especially RPA, Machine Learning.

tags: #PS4 #PS4Macro #UiPath #RPA #Automation #Bot #Dead by Daylight


Index

  1. Challenge
  2. Why did I write this topic?
  3. Required Environment
  4. How to Automate Dead by Daylight
  5. Preparation
    1. PS4Macro Configurations
    2. UiPath Configurations
  6. Trial Execution 
  7. Next Plan

1. Challenge

To automate killer player in DbD for PS4. As you know, DbD for PC can be automated more easily. However I just want to generate bot in PS4 because it’s more difficult to control game in PS4 platform.

2. Why did I write this topic?

It's coming from two reasons.

 2-1. Collaboration with RPA and Killer Bots

When the player rank is especially low such as white color or yellow color, many times we meet bot killers which is just attacking repeatedly without walking. As I mentioned, bots are maybe generated by non-genuine controllers. However killer bots generated by RPA or Machine Learning is new concept therefore I want to realize the same action or more.

 2-2. Need to learn each RPA applications

This is my private purpose and the background of this idea. I just changed my job from system engineer of process automation to office/company automation by Machine Learning & RPA. Therefore I have to understand and be familiar with each major RPA applications.

By the way, accidentally my previous job and new job have same target in overview point of view, it is “Improvement by Automation”. However I am thinking that there is big difference in new job, because it relates Human (employees). this point might be difficult for me.

3. Required Environment

PS4 Game: Dead by Daylight (DbD)
Remote Play Environment: PS4 Remote Play/RemotePlay.exe provided by PlayStation officially
Interface: PS4Macro_0_5_2/PS4Macro.exe
RPA: UiPath
PC: Windows 10

DbD, Remote Play, RPA, PC can be prepared easily. I assume only PS4Macro is the issue you may face. The configuration of PS4Macro is described in below paragraph.

4. How to Automate Dead by Daylight

UiPath is running on Windows 10, it will control Remote Play which is for PS4 remote play on PC. However, the Remote Play receives command from PS4 controller connected by USB cable to PC. Therefore PS4Macro which hack command and relocate button commands to keyboard. So, finally UiPath can control Remote Play. This is the plan.

5. Preparation

5-1. PS4Macro Configurations

PS4Macro allocates PS4 controller button to keyboard, and left stick which is for moving killer are assigned to ↑[w], ↓[s], ←[a], and →[d]. Refer to below default mapping.

L LeftA
L RightD
L UpW
L DownS
R LeftJ
R RightL
R UpI
R DownK
R1E
L1Q
L2U
R2O (Attack)
TriangleC
CircleEscape
CrossEnter
SquareV
DPad UpUp
DPad DownDown
DPad LeftLeft
DPad RightRight
L3N
R3M
ShareLControlKey
OptionsZ
PSLShiftKey
Touch ButtonT



[w] which is moving killer to forward is defined on KeyType.(key stroke)
to be added.

5-2. UiPath Configurations

DbD workflow to be automated is considered (just considered) for all states such as going to lobby, Ready, Game. (Each function such as going to lobby screen and ready action have been automated by using OCR function. This is described in last paragraph).

First comment-out is the function for going to lobby. Second one is the function to be ready. Third process is main killer bot function. Detailed process is mentioned in next.

5-2-1. Entire Workflow


I design Killer is running several direction and do the attack action. So, of course while loop is used. To press the key, "TypeInto" is used and it type the key into RemotePlay.exe.

5-2-2. Main Bot Process



In the TypeInto, "wwwwwwwwoooooo" is defined. This is meaning that going to forward [w] as left stick up and then attack [o] as R2 button. Why many times keys are defined because this Type function cannot hold keys. TypeInfo is KeyDown & KeyUp, and it means Press [w] Release[w] Press [w] Release[w] Press [w] Release[w]... 

5-2-3. Loop Action

Loop below steps:
  1. wwwwwwwwoooooo": Go to forward and Attack
  2. "lllllllllllllllllllllllllllllllllllllllllllll": Camera View Change to Right
  3. "oooooo": Attack
  4. "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj": Camera View Change to Left

6. Trial Execution

6-1. Killer bot - only attacking (gif)

Uhm, Killer is not moving smoothly. It’s not continuous behavior. It seems moving based on small many non-continuous commands.


6-1. Killer bot - only attacking (mp4)

After investigation, I understood that KeyDown command which i expected is not defined. Alternatively, KeyType is chosen.

Now, What i need to do is changing the key mapping for foward on PS4Macro to Ctrl because UiPath doesn’t have keyDown function. (it is available only for special keys such as Ctrl, Shift, Alt...)  In my knowledge, Automation Anywhere also doesn’t have it’s function because keydown function is not necessary for normal keys in office purpose.

At this time, i really wanted to use Python because it’s customizable, and I have experience and generate Windows Automation by Python.

The blow configuration is new one.

8-1. Updated Loop Action

8-2. Killer bot - running and attack (gif)

8-3. Killer bot - running and attack (mp4)

Finally by using Ctrl key, KeyDown is available. Now Killer is smoothly moving.

7. Next Plan

What I want to generate for DbD is a bot which automatically run to each generators. Finally, the bot will automatically chase survivers and attack them.

Generator: highlights as red, near Gen is displayed as large
Surviver: No highlight. Clothes, Appearance, hights are different in each player. in addition, they normally hide from rock, wall.
Object: There are many objects such as tree, wood, corn grass, wall, small house, large building, and background.

I think auto-driving algorithms for car might be adapted to this idea. Your ideas and code suggestions are really appreciated! If you want to work this project with me, Let me know your ideas.

Extra Topic

Going to lobby and change status as ready in the lobby have been automated. They are based on OCR function. UiPath monitors bottom right position on screen and check the state. (Actually, each automation has been automated, however entire flow is not automated. This is just study purpose.)










Note: If you have any suggestions or queries drop a comment below 😉

Comments