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)
Zotero references script (and app)

A little script (and PyInstaller build) for a very specific, somewhat hack-ish purpose: managing and exporting project references with Zotero and its API.

Marius Rödder 0 Dec 05, 2021
PBN Obfuscator: A overpowered obfuscator for python, which will help you protect your source code

PBN Obfuscator PBN Obfuscator is a overpowered obfuscator for python, which will

Karim 6 Dec 22, 2022
An easy way to access the Scratch API!

The majority of people are likely here because they want to easily access the Scratch API!

rgantzos 0 May 04, 2022
用于导出墨墨背单词的词库,并生成适用于 List 背单词,不背单词,欧陆词典等的自定义词库

maimemo-export 用于导出墨墨背单词的词库,并生成适用于 List 背单词,欧陆词典,不背单词等的自定义词库。 仓库内已经导出墨墨背单词所有自带词库(暂不包括云词库),多达 900 种词库,可以在仓库中选择需要的词库下载(下载单个文件的方法),也可以去 蓝奏云(密码:666) 下载打包好

ourongxing 293 Dec 29, 2022
Goddard A collection of small, simple strategies for Freqtrade

Goddard A collection of small, simple strategies for Freqtrade. Simply add the strategy you choose in your strategies folder and run. ⚠️ General Crypt

Shane Jones 118 Dec 14, 2022
Poetry workspace plugin for Python monorepos.

poetry-workspace-plugin Poetry workspace plugin for Python monorepos. Inspired by Yarn Workspaces. Adds a new subcommand group, poetry workspace, whic

Jack Smith 74 Jan 01, 2023
ToDoListAndroid - To-do list application created using Kivymd

ToDoListAndroid To-do list application created using Kivymd. Version 1.0.0 (1/Jan/2022). Planned to do next: -Add setting (theme selector, etc) -Add f

AghnatHs 1 Jan 01, 2022
Experimental proxy for dumping the unencrypted packet data from Brawl Stars (WIP)

Brawl Stars Proxy Experimental proxy for version 39.99 of Brawl Stars. It allows you to capture the packets being sent between the Brawl Stars client

4 Oct 29, 2021
Python samples for Google Cloud Platform products.

Google Cloud Platform Python Samples Python samples for Google Cloud Platform products. Setup Install pip and virtualenv if you do not already have th

Google Cloud Platform 6k Jan 03, 2023
Live tracking, flight database and competition framework

SkyLines SkyLines is a web platform where pilots can share their flights with others after, or even during flight via live tracking. SkyLines is a sor

SkyLines 367 Dec 27, 2022
Logging-monitoring-instrumentation - A brief repository on logging monitoring and instrumentation in Python

logging-monitoring-instrumentation A brief repository on logging monitoring and

Noah Gift 6 Feb 17, 2022
Python script to autodetect a base set of swiftlint rules.

swiftlint-autodetect Python script to autodetect a base set of swiftlint rules. Installation brew install pipx

Jonathan Wight 24 Sep 20, 2022
Rename and categorize your DMOJ solutions

DMOJ Downloader What is this for? DMOJ lets you download the code for all your solutions, however the files are just named as numbers

Evan Wild 1 Dec 04, 2022
Automate your Microsoft Learn Student Ambassadors event certificate with Python

Microsoft Learn Student Ambassador Certificate Automation This repo simply use a template certificate docx file and generates certificates both docx a

Muhammed Oğuz 24 Aug 24, 2022
Basit bir sunucu - istemci örneği

basitSunucuistemci Aşağıdaki adresteki uygulamadaki process kapanmama sorununun çözülmesi ile oluşturulmuş yeni depo https://github.com/pricheal/pytho

Ali Orhun Akkirman 10 Dec 27, 2022
Lightweight and Modern kernel for VK Bots

This is the kernel for creating VK Bots written in Python 3.9

Yrvijo 4 Nov 21, 2021
A numbers check python package

A numbers check python package

Fayas Noushad 3 Nov 28, 2021
TimeWizard - A script that generates every single Time Wizard EDOPRO lflist possible

EDOPRO F&L list generator This project is just a script that generates every sin

Diamond Dude 2 Sep 28, 2022
A tool for light-duty persistent memoization of API calls

JSON Memoize What is this? json_memoize is a straightforward tool for light-duty persistent memoization, created with API calls in mind. It stores the

1 Dec 11, 2021
[CVPR 2020] Rethinking Class-Balanced Methods for Long-Tailed Visual Recognition from a Domain Adaptation Perspective

Rethinking Class-Balanced Methods for Long-Tailed Visual Recognition from a Domain Adaptation Perspective [Arxiv] This is PyTorch implementation of th

Abdullah Jamal 22 Nov 19, 2022