Go to file
LmeSzinc 9aaadc4136 Upd: [CN] DAILY_QUEST_FULL (#76)
And add logs to _get_quest_reward()
2023-08-31 01:25:10 +08:00
assets Upd: [CN] DAILY_QUEST_FULL (#76) 2023-08-31 01:25:10 +08:00
bin Add ALAS framework 2023-05-14 15:48:34 +08:00
config Add: Link task BattlePass to Dungeon, Assignment, DailyQuest 2023-08-31 01:06:24 +08:00
deploy Opt: Move gui backend to port 22367 and clean up configs 2023-06-17 22:41:56 +08:00
dev_tools Add: battle pass recognition (#49) 2023-08-02 19:07:46 +08:00
module Add: Link task BattlePass to Dungeon, Assignment, DailyQuest 2023-08-31 01:06:24 +08:00
tasks Upd: [CN] DAILY_QUEST_FULL (#76) 2023-08-31 01:25:10 +08:00
.gitattributes Initial commit 2023-05-06 00:00:46 +08:00
.gitignore Initial commit 2023-05-06 00:00:46 +08:00
gui.py Opt: Move gui backend to port 22367 and clean up configs 2023-06-17 22:41:56 +08:00
LICENSE Initial commit 2023-05-06 00:00:46 +08:00
README_en.md Doc: Add minimap tracking doc 2023-08-09 05:58:42 +08:00
README.md Doc: Add minimap tracking doc 2023-08-09 05:58:42 +08:00
requirements-in.txt Add: Minimap tracking 2023-07-30 23:30:17 +08:00
requirements.txt Add: Minimap tracking 2023-07-30 23:30:17 +08:00
src.py Add: Config of Assignment 2023-06-20 21:30:47 +08:00

| English | 简体中文 |

StarRailCopilot

Star Rail Copilot, a bot for Honkai: Star Rail, based on the next generation ALAS framework.

Install

Get source code

SRC is still in development, does not have an auto-installer yet, requires classic python project deployment.

Clone this repository.

git clone https://github.com/LmeSzinc/StarRailCopilot

Enter project directory.

cd StarRailCopilot

Create a python 3.10.10 environment using conda. Let's say the new environment is named src.

Note that we don't maintain requirements for lower or higher python versions, 3.10.10 is recommended.

conda create -n src python==3.10.10

Activate the environment just created.

conda activate src

Install requirements.

pip install -r requirements.txt

Install an Emulator

  1. Download ADB and configure it into environment variables.
  2. Install the game client in emulator, not the desktop client. BlueStacks is recommented.

Why use emulators? If you run a bot on the desktop client, game windows must stay at front. I guess you don't wanna baby-sit there without being able to move the mouse and keyboard while running the bot, so use the emulators.

How's the performance? Lme's 8700k+1080ti using MuMu12 emulator with graphic settings very high gets 40 fps. It shouldn't be a problem to run with maximum graphic settings and 60 fps if you have newer PC specs.

Usage

Still in the environment just now, launch the GUI backend. (running on port 22367 by default)

python gui.py

Access 127.0.0.1:22367 in browser.

Goto SRC settings - Emulator Settings - Serial, fill it according to help texts.

Goto Overview page, click Run button. (SRC will auto launch emulator and game client if they are not running. Emulator launch only supports MuMu family and Nox Player family for now)

Keep the bot running, SRC will auto login and empty trailblaze power when it's recovered. To save resources, set SRC Settings - Optimazation Settings - When Task Queue is Empty to Close Game.

Development

Discord https://discord.gg/aJkt3mKDEr QQ Group 752620927

  • Minimap Tracking

  • Development Docs (menu is on sidebar): Alas wiki (in Chinese). However, there is ton of code newly written, it is recommended to read the source code and historical commits.

  • Development Road Map: #10. Pull Requests are welcomed, just pick the part you interested to work on.

How to add multi-language or multi-server support? Need assets updates, see "Adding a Button" in development docs.

About ALAS

SRC is based on an Azur Lane bot AzurLaneAutoScript. After 3 years of development, ALAS has reached a high degree of completion, but it has also accumulated a lot of shit code that is difficult to change. We hope that Fix these issues on a new project.

  • Update OCR. ALAS has trained multiple models on cnocr==1.2.2, but the dependent mxnet is no longer active, machine learning is developing rapidly, and the speed of new models and the correct rate crushes the old model.
  • Converting setting files into pydantic models. Since the concept of task and scheduler was added, the number of user settings greatly increased. ALAS has built a code generator to implement setting read and update. pydantic will make things more elegantly.
  • Better Assets management. button_extract helps ALAS to easily maintain 4000+ template images, but it has a serious performance issue, and the reminder of multi-server supported is also submerged in a large amount of meaningless logs.
  • Reduced coupling to Azur Lane. The ALAS framework and ALAS GUI have the ability to interface with other games and their not, but the completed MAA plug-in for Arknights and [fgo-py](https: //github.com/hgjazhgj/FGO-py) plug-in under development have found serious coupling problems between ALAS and the Azur Lane game itself.