An app that mirrors your phone to your compute and maps controller input to the screen

Overview

What is 'Dragalia Control'?

An app that mirrors your phone to your compute and maps controller input to the screen. Inputs are mapped specifically for Dragalia Lost.

How does it work?

  • Detects Android devices and launches an instance of SCRCPY to show the device screen on their PC.
  • Reads controller input from a XBox-like controller and forwards them to the SCRCPY window as useful Dragalia Lost input.

See it in action on YouTube: https://youtu.be/Jt_tPyQo_gA

This targets Windows 10, 64-bit. The buttons are mapped for the Galaxy S9 and Galaxy S10 Plus. For other devices, see the 'What if my device isn't supported?' section.

Since this uses SCRCPY, the requirements are the same. See https://github.com/Genymobile/scrcpy#requirements. This is not optional.

You really want quick turn off (180 and 90).

How to use it

  1. Follow the instructions to enable ADB debugging from https://github.com/Genymobile/scrcpy#requirements. There are a few videos on this as well: https://www.youtube.com/results?search_query=set+up+scrcpy
  2. Download "dragalia_control.zip" from https://github.com/myrhhcaiah/dragalia_control/releases/
  3. Unzip it somewhere.
  4. Open Dragalia Lost on your phone. Yes it needs to be open first.
  5. Run "dragalia_control.exe" from the place you unzipped it.
  6. You'll probably get a prompt on your phone asking you to 'authorize your pc'. Accept.
  7. A very ugly UI should appear with a dropdown list of phones. If you only have one phone, press 'Start'.
  8. It will take a few seconds to start up, but you should see your phone screen in a SCRCPY window.
  9. Pressing your controller buttons should move your mouse around.
  10. Drop into a level and go nuts. Button mappings are described in 'What are the button mappings?' below.

What if my device isn't supported?

You'll want to take screenshots of the game on your phone (Ideally, a normal quest and the skill share menu in Kaleidoscope).

Then you can edit the positions.json file to add support for your device. You can edit an existing entry like this one:

    "2.111": {
        "NOTE": "Galaxy s10+; 1440x3040",
        "C1": [116,260],
        "C2": [116,410],
        "C3": [116,581],
        "C4": [116,725],
        "CENTER": [720,1520],
        "DRAGON": [200,2259],
        "KSS1": [288,1944],
        "KSS2": [586,1944],
        "KSS3": [853,1944],
        "KSS4": [1173,1944],
        "KSS5": [288,2245],
        "KSS6": [586,2245],
        "KSS7": [853,2245],
        "KSS8": [1173,2245],
        "MENU": [1346,234],
        "S1": [512,2601],
        "S2": [800,2601],
        "S3": [1040,2601],
        "S4": [1266,2601],
        "w": 1440,
        "h": 3040
    },

Replace "2.111" with your screen ratio, rounded to three decimal places. If you launch 'dragalia_control.exe' with your device attached, you'll see it there.

Then you want to update 'w' and 'h' to be the width and height of your screenshots.

The rest of the values are coordinate locations. It's the distance from the top left corner to the point on the screen (so, you'll notice that the "MENU" has a high X value and a low Y value; the high X is because it's very far from the left of the screen and the low Y is because it's very close to the top of the screen). I used IrfanView to do these measurements, but it should be possible in any image editor.

The entries "C1", "C2"... are character slots. The buttons on the top left of the screen for switching characters. The entries "S1", "S2"... are skill slots, at the bottom of the screen. The entries "KSS1", "KSS2"... are the skill shares in Kaleidoscope. 1-4 are the top row. 5-8 are the bottom row.

If you end up adding another device successfully, do get in contact with me either here, on youtube or on reddit, I'd be happy to add the position data to the next release.

What are the button mappings?

Note: all actions are performed through manipulating the mouse. There's code to attempt to interleave actions, but you might still get weirdness if you're moving and pressing a skill.

The left stick is for movement. Pressing down quickly will attack. Pressing down for a long time will force strike.

The right stick is for rolling. Flicking the stick quickly will result in a roll. Pressing down will trigger the dragon transformation.

The face buttons (XYAB) are mapped to skills in order (e.g. X = s1, Y = s2, A = s3, B = s4).

When the left shoulder bumper and the left shoulder trigger are held together, the face buttons change to switch characters.

When only the left shoulder bumper is held, the face buttons change to the top row of the Kaleidoscope skill shares.

When only the left shoulder trigger is held, the face buttons change to the bottom row of the Kaleidoscope skill shares.

The Start and Back buttons both map to the Menu button in game.

The right shoulder bumper is for basic attacks. You can hold it down to force strike.

The right shoulder trigger is a debug button. Press it if you've moved the SCRCPY window or if you've updated the positions.json (this will recalculate the app position and the data from positions.json).

What if I don't have an Xbox-like Controller?

Most controllers know how to pretend to be an Xbox Controller. So, if you have a Logitech or something, it probably just works.

If not, there is usually a way to make your controller pretend to be an Xbox Controller. For example, there's an app for Joycons and the Switch Pro Controller: https://github.com/Davidobot/BetterJoy

Related projects and credits

"Dragalia Controller" is a project with a similar intention and almost the same architecture. I ended up taking the window computation code. Check it out here: https://github.com/thinkaliker/dragalia-controller

The bulk of the Android phone interaction is mediated by scrcpy. It's incredible for mirroring your phone to your computer even if you're not doing something weird like this: https://github.com/Genymobile/scrcpy

The Xbox controller detection code is based off of code in 'TensorKart', which is a deep learning MarioKart project: https://github.com/kevinhughes27/TensorKart/

A small amount of code to read in data from the Android device was based on http://ktnr74.blogspot.com/2013/06/emulating-touchscreen-interaction-with.html. Note that the blog is largely concerned with using 'sendevent' for input, which is the first thing I tried.

What else?

  • I'd like to get rid of the debug button; it should be automatic.
  • There's also been reports that the stick isn't completely smooth. It seems like hardware thing, but I'd like to figure out how to alleviate it.
  • Multitouch. Even if you usually play with one finger, being able to move and tap a skill seems like the right thing with a controller.
  • Force striking is awkward. I'd like it to be "flick the right stick with a modifier".
You might also like...
A turtlebot auto controller allows robot to autonomously explore environment.

A turtlebot auto controller allows robot to autonomously explore environment.

This tool for beginner and help those people they gather information about Email Header Analysis, Instagram Information, Instagram Username Check, Ip Information, Phone Number Information, Port Scan

This tool for beginner and help those people they gather information about Email Header Analysis, Instagram Information, Instagram Username Check, Ip Information, Phone Number Information, Port Scan. This tool shows your hostname and public IP first, then user give input and according to option this tool work. This tool work diffrent Oprating system.

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.

uMap project About uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site. Because we think that the more OSM wil

The Google Assistant on a rotary phone

Google Assistant Rotary Phone Shoutout to my dad who had this idea a year ago and I'm only now getting around to doing it. Notes This is the code used

 FileTransfer - to exchange files from phone to laptop
FileTransfer - to exchange files from phone to laptop

A small website I locally host on my network to exchange files from my phone and other devices to my laptop.

Capture screen and download off Roku based devices

rokuview Capture screen and download off Roku based devices Tested on Hisense TV with Roku OS built-in No guarantee this will work with all Roku model

WaterAndScreenBreakReminders - A small python program that reminds to take a water break every 15 minutes and a screen break every 30 minutes A lighweight screen color picker tool
A lighweight screen color picker tool

tkpick A lighweigt screen color picker tool Availability Only GNU/Linux 🐧 Installing Install via pip (No auto-update): [sudo] pip install tkpick Usa

Scientific color maps and standardization tools
Scientific color maps and standardization tools

Scicomap is a package that provides scientific color maps and tools to standardize your favourite color maps if you don't like the built-in ones. Scicomap currently provides sequential, bi-sequential, diverging, circular, qualitative and miscellaneous color maps. You can easily draw examples, compare the rendering, see how colorblind people will perceive the color maps. I will illustrate the scicomap capabilities below.

Releases(1.0.5)
  • 1.0.5(Jan 10, 2022)

    For info about how to use Dragalia Control, check https://github.com/myrhhcaiah/dragalia_control

    Changes in this release:

    • Fixes for UI jankiness (e.g. locking up, nicer shutdown behavior).
    • 'Minitouch' optionally allows for sending Controller Input directly to the phone instead of through the mouse. It should be slightly lower latency and more accurate, but it has a bit of a startup time.
    Source code(tar.gz)
    Source code(zip)
    dragalia_control.1.0.5.zip(42.80 MB)
  • 1.0.3(Jan 4, 2022)

    For info about how to use Dragalia Control, check https://github.com/myrhhcaiah/dragalia_control

    Hotfix (1.04):

    • Fix an issue where rolls were snapping to corners,
    • Fix an issue where the 'drag region' was too large.

    User-facing changes in this release:

    • The debug button (e.g. the right trigger) can now be used to hot reload the posiitons.json. You can now edit the touch data without closing and reopening Dragalia Control. There's also a bunch of logging for it,
    • The right bumper can now be used to force strike.
    • Improve handling rapid movements, esp change in direction. Remember to turn off Quick Turn in game.
    • Improve deadzone handling.
    • Fix an issue where skills weren't being activated if they were pressed too quickly.
    Source code(tar.gz)
    Source code(zip)
    dragalia_control.1.0.4fix.zip(41.13 MB)
  • 1.0.0(Jan 2, 2022)

    THERE WAS A HOTFIX. Download the updated build below.

    What is this?

    The first version of "Dragalia Control":

    • Detects Android devices and launches an instance of SCRCPY to show the device screen on their PC.
    • Reads controller input from a XBox-like controller and forwards them to the SCRCPY window as useful Dragalia Lost input.

    See it in action on YouTube: https://youtu.be/Jt_tPyQo_gA

    This targets Windows 10, 64-bit. The buttons are mapped for the Galaxy S9 and Galaxy S10 Plus. For other devices, see the 'What if my device isn't supported?' section.

    Since this uses SCRCPY, the requirements are the same. See https://github.com/Genymobile/scrcpy#requirements. This is not optional.

    You really want quick turn off (180 and 90).

    How to use it

    1. Follow the instructions to enable ADB debugging from https://github.com/Genymobile/scrcpy#requirements. There are a few videos on this as well: https://www.youtube.com/results?search_query=set+up+scrcpy
    2. Download "dragalia_control.zip" from below.
    3. Unzip it somewhere.
    4. Open Dragalia Lost on your phone. Yes it needs to be open first.
    5. Run "dragalia_control.exe" from the place you unzipped it.
    6. You'll probably get a prompt on your phone asking you to 'authorize your pc'. Accept.
    7. A very ugly UI should appear with a dropdown list of phones. If you only have one phone, press 'Start'.
    8. It will take a few seconds to start up, but you should see your phone screen in a SCRCPY window.
    9. Pressing your controller buttons should move your mouse around.
    10. Drop into a level and go nuts. Button mappings are described in 'What are the button mappings?' below.

    What if my device isn't supported?

    You'll want to take screenshots of the game on your phone (Ideally, a normal quest and the skill share menu in Kaleidoscope).

    Then you can edit the positions.json file to add support for your device. You can edit an existing entry like this one:

        "2.111": {
            "NOTE": "Galaxy s10+; 1440x3040",
            "C1": [116,260],
            "C2": [116,410],
            "C3": [116,581],
            "C4": [116,725],
            "CENTER": [720,1520],
            "DRAGON": [200,2259],
            "KSS1": [288,1944],
            "KSS2": [586,1944],
            "KSS3": [853,1944],
            "KSS4": [1173,1944],
            "KSS5": [288,2245],
            "KSS6": [586,2245],
            "KSS7": [853,2245],
            "KSS8": [1173,2245],
            "MENU": [1346,234],
            "S1": [512,2601],
            "S2": [800,2601],
            "S3": [1040,2601],
            "S4": [1266,2601],
            "w": 1440,
            "h": 3040
        },
    

    Replace "2.111" with your screen ratio, rounded to three decimal places. If you launch 'dragalia_control.exe' with your device attached, you'll see it there.

    Then you want to update 'w' and 'h' to be the width and height of your screenshots.

    The rest of the values are coordinate locations. It's the distance from the top left corner to the point on the screen (so, you'll notice that the "MENU" has a high X value and a low Y value; the high X is because it's very far from the left of the screen and the low Y is because it's very close to the top of the screen). I used IrfanView to do these measurements, but it should be possible in any image editor.

    The entries "C1", "C2"... are character slots. The buttons on the top left of the screen for switching characters. The entries "S1", "S2"... are skill slots, at the bottom of the screen. The entries "KSS1", "KSS2"... are the skill shares in Kaleidoscope. 1-4 are the top row. 5-8 are the bottom row.

    If you end up adding another device successfully, do get in contact with me either here, on youtube or on reddit, I'd be happy to add the position data to the next release.

    What are the button mappings?

    The left stick is for movement. Pressing down quickly will attack. Pressing down for a long time will force strike. The right stick is for rolling. Flicking the stick quickly will result in a roll. Pressing down will trigger the dragon transformation.

    The face buttons (XYAB) are mapped to skills in order (e.g. X = s1, Y = s2, A = s3, B = s4). When the left shoulder bumper and the left shoulder trigger are held together, these buttons change to switch characters. When only the left shoulder bumper is held, these buttons change to the top row of the Kaleidoscope skill shares. When only the left shoulder trigger is held, these buttons change to the bottom row of the Kaleidoscope skill shares.

    The Start and Back buttons both map to the Menu button in game. The right shoulder bumper is for basic attacks. You cannot hold it down to forcestrike. The right shoulder trigger is a debug button. Press it if you've moved the SCRCPY window or if it's otherwise behaving poorly.

    Source code(tar.gz)
    Source code(zip)
    dragalia_control.1.0.2hotfix.zip(41.12 MB)
Owner
null
Script to change official Kali repository to mirrors

Script to change official Kali repository to mirrors. This helps increase packages update and downloading for some user.

Vineet Bhavsar 2 Nov 29, 2021
Generate Gaussian 09 input files for the rotamers of an input compound.

Rotapy Purpose Generate Gaussian 09 input files for the rotamers of an input compound. Distance to the axis of rotation remains constant throughout th

null 1 Jul 16, 2021
Python 3.9.4 Graphics and Compute Shader Framework and Primitives with no external module dependencies

pyshader Python 3.9.4 Graphics and Compute Shader Framework and Primitives with no external module dependencies Fully programmable shader model (even

Alastair Cota 1 Jan 11, 2022
Easily map device and application controls to a midi controller

pymidicontroller Introduction Easily map device and application controls to a midi controller

Tane Barriball 24 May 16, 2022
My HA controller for veg and flower rooms

HAGrowRoom My HA controller for veg and flower rooms I will do my best to keep this updated as I change, add and improve. System heavily uses custom t

null 4 May 25, 2022
Python PID Controller and Process Simulator (FOPDT) with GUI.

PythonPID_Simulator Python PID Controller and Process Simulator (FOPDT) with GUI. Run the File. Then select Model Values and Tune PID.. Hit Refresh to

null 19 Oct 14, 2022
Turn your IPad into a Screen-Slaver with 1 simple Pythonista script

ScreenSlaver Turn your IPad into a Screen-Slaver with 1 simple Pythonista script

null 6 Jul 9, 2022
This python application let you check for new announcements from MMLS, take attendance while your lecturer is sharing QR Code on the screen.

This python application let you check for new announcements from MMLS, take attendance while your lecturer is sharing QR Code on the screen.

wyhong3103 5 Jul 17, 2022
Dockernized ZeroTierOne controller with zero-ui web interface.

docker-zerotier-controller Dockernized ZeroTierOne controller with zero-ui web interface. 中文讨论 Customize ZeroTierOne's controller planets Modify patch

sbilly 209 Jan 4, 2023
Controller state monitor plugin for EVA ICS

eva-plugin-cmon Controller status monitor plugin for EVA ICS Monitors connected controllers status in SFA and pushes measurements into an external Inf

Altertech 1 Nov 6, 2021