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)
Would upload anything I do with/related to brainfuck

My Brainfu*k Repo Basically wanted to create something with Brainfu*k but realized that with the smol brain I have, I need to see the cell values real

Rafeed 1 Mar 22, 2022
Render reMarkable documents to PDF

rmrl: reMarkable Rendering Library rmrl is a Python library for rendering reMarkable documents to PDF files. It takes the original PDF document and th

Robert Schroll 95 Dec 25, 2022
Get a list of all offline/online members in a discord server

Discord server insights Get a list of all offline/online members in a discord server. Uses Selenium to crawl invite links. Config Download Chrome driv

Prakhar Gurunani 3 Oct 21, 2022
The Open edX platform, the software that powers edX!

This is the core repository of the Open edX software. It includes the LMS (student-facing, delivering courseware), and Studio (course authoring) compo

edX 6.2k Jan 01, 2023
a simple proof system I made to learn math without any mistakes

math_up a simple proof system I made to learn math without any mistakes 0. Short Introduction test yourself, enjoy your math! math_up is an NBG-based,

양현우 5 Jun 04, 2021
Fetch PRs from GitHub and analyze which ones are unmergeable

Set up token Generate a personal access token on GitHub. Add repo permissions. export GH_TOKEN="abcdefg" Pull PR data make Usually, GitHub doesn't h

Stefan van der Walt 1 Nov 05, 2021
BasicVSR++ function for VapourSynth

BasicVSR++ BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment Ported from https://github.com/open-mmlab/mmediting De

Holy Wu 34 Nov 28, 2022
Python library for datamining glitch information from Gen 1 Pokémon GameBoy ROMs

g1utils This is a Python library for datamining information about various glitches (glitch Pokémon, glitch maps, etc.) from Gen 1 Pokémon ROMs. TODO A

1 Jan 13, 2022
peace-performance (Rust) binding for python. To calculate star ratings and performance points for all osu! gamemodes

peace-performance-python Fast, To calculate star ratings and performance points for all osu! gamemodes peace-performance (Rust) binding for python bas

9 Sep 19, 2022
Ontario-Covid-Screening - An automated Covid-19 School Screening Tool for Ontario

Ontario-Covid19-Screening An automated Covid-19 School Screening Tool for Ontari

Rayan K 0 Feb 20, 2022
A python tool that creates issues in your repos based on TODO comments in your code

Krypto A neat little sidekick python script to create issues on your repo based on comments left in the code on your behalf Convert todo comments in y

Alex Antoniou 4 Oct 26, 2021
Implementation of the MDMC method to search for magnetic ground state using VASP

Implementation of MDMC method ( by Olga Vekilova ) to search for magnetic ground state using VASP

Utkarsh Singh 1 Nov 27, 2021
Tugas kelompok Struktur Data

Binary-Tree Tugas kelompok Struktur Data Silahkan jika ingin mengubah tipe data pada operasi binary tree *Boleh juga semua program kelompok bisa disat

Usmar manalu 2 Nov 28, 2022
Python dictionaries with advanced dot notation access

from box import Box movie_box = Box({ "Robin Hood: Men in Tights": { "imdb stars": 6.7, "length": 104 } }) movie_box.Robin_Hood_Men_in_Tights.imdb_s

Chris Griffith 2.1k Dec 28, 2022
A bunch of codes for procedurally modeling and texturing futuristic cities.

Procedural Futuristic City This is our final project for CPSC 479. We created a procedural futuristic city complete with Worley noise procedural textu

1 Dec 22, 2021
Automatização completa do site https://blaze.com

PyBlaze Pyblaze possibilita o acesso a api do site blaze utilizando python, retornando os últimos resultados de crashs e doubles. Agora também é possí

Cleiton Leonel 24 Dec 30, 2022
NeoInterface - Neo4j made easy for Python programmers!

Neointerface - Neo4j made easy for Python programmers! A Python interface to use the Neo4j graph database, and simplify its use. class NeoInterface: C

15 Dec 15, 2022
Safely pass trusted data to untrusted environments and back.

ItsDangerous ... so better sign this Various helpers to pass data to untrusted environments and to get it back safe and sound. Data is cryptographical

The Pallets Projects 2.6k Jan 01, 2023
Shared utility scripts for AI for Earth projects and team members

Overview Shared utilities developed by the Microsoft AI for Earth team The general convention in this repo is that users who want to consume these uti

Microsoft 38 Dec 30, 2022
Code and data for learning to search in local branching

Code and data for learning to search in local branching

Defeng Liu 7 Dec 06, 2022