Skip to content

Commit

Permalink
Merge pull request #560 from LmeSzinc/dev
Browse files Browse the repository at this point in the history
Add Ornament Extraction task | 增加饰品提取任务
  • Loading branch information
LmeSzinc authored Jul 3, 2024
2 parents 4ea4946 + 7f1d0a9 commit f04ddac
Show file tree
Hide file tree
Showing 74 changed files with 1,752 additions and 1,816 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Star Rail auto script | 星铁速溶茶,崩坏:星穹铁道脚本,基于

![gui](https://raw.githubusercontent.com/wiki/LmeSzinc/StarRailCopilot/README.assets/gui_cn.png)


![setting](https://raw.githubusercontent.com/wiki/LmeSzinc/StarRailCopilot/README.assets/setting_cn.png)

## 功能

- **打本**[角色养成规划](https://github.com/LmeSzinc/StarRailCopilot/wiki/Planner_cn),每日副本,双倍活动副本,历战余响。
- **收获**:完成每日任务,收派委托,收取无名勋礼奖励。
- **模拟宇宙**:刷模拟宇宙,使用开拓力刷内圈遗器。
- **后台托管**:自动启动模拟器和游戏,后台托管清体力和每日,通过仪表盘了解资源情况。
- **云游戏**:(仅国服)支持云崩坏星穹铁道。
- **云游戏**:(仅国服)[在云崩坏星穹铁道上运行SRC](https://github.com/LmeSzinc/StarRailCopilot/wiki/Cloud_cn)

## 安装 [![](https://img.shields.io/github/downloads/LmeSzinc/StarRailCopilot/total?color=4e4c97)](https://github.com/LmeSzinc/StarRailCopilot/releases)

Expand All @@ -31,7 +31,7 @@ Discord https://discord.gg/aJkt3mKDEr QQ群 752620927

- [小地图识别原理](https://github.com/LmeSzinc/StarRailCopilot/wiki/MinimapTracking)
- 开发文档(目录在侧边栏):[Alas wiki](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/1.-Start),但很多内容是新写的,建议阅读源码和历史提交。
- 开发路线图:[#10](https://github.com/LmeSzinc/StarRailCopilot/issues/10) ,欢迎提交 PR,挑选你感兴趣的部分进行开发即可。
- 开发路线图:见置顶 issue,欢迎提交 PR,挑选你感兴趣的部分进行开发即可。

> **如何添加多语言/多服务器支持?** 需要适配 assets,参考 [开发文档 “添加一个 Button” 一节](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/4.1.-Detection-objects#%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA-button)
Expand Down
8 changes: 5 additions & 3 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ Star Rail Instant Tea, a bot for Honkai: Star Rail, based on the next generation

![gui](https://raw.githubusercontent.com/wiki/LmeSzinc/StarRailCopilot/README.assets/gui_en.png)

![setting](https://raw.githubusercontent.com/wiki/LmeSzinc/StarRailCopilot/README.assets/setting_en.png)

## Features

- **Dungeons**: [Character Planner](https://github.com/LmeSzinc/StarRailCopilot/wiki/Planner_cn), Dungeons, dungeons at double event, echo of war.
- **Dungeons**: [Character Planner](https://github.com/LmeSzinc/StarRailCopilot/wiki/Planner_en), Dungeons, dungeons at double event, echo of war.
- **Rewards**: Complete daily quests, do assignment, claim nameless horner rewards.
- **Simulated Universe**: Farm SU, farm planers using trailbalze power.
- **AFK Auto Farming**: Automatically launch emulators and games, do dungeons and quests at background, keep track of resources through dashboard.
- **Cloud Gaming**: [CN only] Support Cloud HSR.
- **Cloud Gaming**: [CN only] [Run SRC on cloud HSR](https://github.com/LmeSzinc/StarRailCopilot/wiki/Cloud_cn)

## Install [![](https://img.shields.io/github/downloads/LmeSzinc/StarRailCopilot/total?color=4e4c97)](https://github.com/LmeSzinc/StarRailCopilot/releases)

Expand All @@ -30,7 +32,7 @@ Discord https://discord.gg/aJkt3mKDEr

- Development Docs (menu is on sidebar): [Alas wiki](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/1.-Start) (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](https://github.com/LmeSzinc/StarRailCopilot/issues/10). Pull Requests are welcomed, just pick the part you interested to work on.
- Development Road Map: See pinned issues. 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](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/4.1.-Detection-objects#%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA-button).
Expand Down
8 changes: 5 additions & 3 deletions README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ Star Rail Copilot, un bot para Honkai: Star Rail, basado en la siguiente generac

![gui](https://raw.githubusercontent.com/wiki/LmeSzinc/StarRailCopilot/README.assets/gui_es.png)

![setting](https://raw.githubusercontent.com/wiki/LmeSzinc/StarRailCopilot/README.assets/setting_es.png)

## Características

- **Mazmorras**: [Planificador de personajes](https://github.com/LmeSzinc/StarRailCopilot/wiki/Planner_cn), Mazmorras, y mazmorras en eventos de doble recompensa (materiales de XP de personaje, de conos de luz, rastros, ascensión, artefactos...), ecos de la guerra.
- **Mazmorras**: [Planificador de personajes](https://github.com/LmeSzinc/StarRailCopilot/wiki/Planner_en), Mazmorras, y mazmorras en eventos de doble recompensa (materiales de XP de personaje, de conos de luz, rastros, ascensión, artefactos...), ecos de la guerra.
- **Recompensas diarias**: Se completan las misiones de actividad diarias, la misión diaria, las misiones de Honor Anónimo...
- **Universo Simulado**: Farm SU hasta alcanzar el límite de puntos semanal, farm planars usando poder trazacaminos.
- **Farmeo automático AFK**: El bot lo hace todo de manera automática, abre los emuladores, completa las misiones y realiza las tareas diarias, realice un seguimiento de los recursos a través del panel.
- **Juegos en la nube**: [solo CN] Compatible con Cloud HSR.
- **Juegos en la nube**: [solo CN] [Ejecute SRC en HSR en la nube](https://github.com/LmeSzinc/StarRailCopilot/wiki/Cloud_cn)

## Instalación [![](https://img.shields.io/github/downloads/LmeSzinc/StarRailCopilot/total?color=4e4c97)](https://github.com/LmeSzinc/StarRailCopilot/releases)
Dirígete a la [Guía de Instalación](https://github.com/LmeSzinc/StarRailCopilot/wiki/Installation_en) para consultar cómo hacer la instalación automática, el manual de uso, etc.
Expand All @@ -25,7 +27,7 @@ Discord: https://discord.gg/aJkt3mKDEr

- [Seguimiento del Minimapa](https://github.com/LmeSzinc/StarRailCopilot/wiki/MinimapTracking)
- Documentación para desarrolladores (el menú está en la barra lateral): [Wiki de ALAS](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/1.-Start) (en Chino). Sin embargo, hay un montón de código nuevo, por lo que es recomendado leer el código fuente y el historial de commits.
- Roadmap del desarrollo: [#10](https://github.com/LmeSzinc/StarRailCopilot/issues/10). Los pull requests son bienvenidos. Simplemente, elige la parte en la que estás interesado trabajar.
- Roadmap del desarrollo: Ver issues fijados. Los pull requests son bienvenidos. Simplemente, elige la parte en la que estás interesado trabajar.

> **¿Cómo añadir nuevos idiomas o servidores?** Si necesitas actualizar los recursos del bot, échale un vistazo a ["Añadiendo un Botón" en la documentación para desarrolladores](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/4.1.-Detection-objects#%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA-button).
Expand Down
Binary file added assets/cn/relics/ui/ENHANCE_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/relics/ui/FILTER_CONFIRM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/relics/ui/FILTER_RESET.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/relics/ui/ENHANCE_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/relics/ui/FILTER_CONFIRM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/relics/ui/FILTER_RESET.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/combat/support/FIRST_CHARACTER.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/ornament/combat/SUPPORT_ADD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/ornament/combat/SUPPORT_DISMISS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/ornament/ui/DU_MAIN_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/ornament/ui/DU_MODE_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/ornament/ui/DU_OE_SELECT_CHECK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/relics/ui/ENHANCE_FILTER.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/relics/ui/ENHANCE_GOTO_SALVAGE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/relics/ui/SALVAGE_CHECK_OFF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/relics/ui/SALVAGE_CHECK_ON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/share/relics/ui/SALVAGE_FILTER.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 23 additions & 33 deletions config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
"ScreenshotInterval": 0.2,
"CombatScreenshotInterval": 1.0,
"WhenTaskQueueEmpty": "goto_main"
},
"CloudStorage": {
"CloudRemainSeasonPass": {},
"CloudRemainPaid": {},
"CloudRemainFree": {}
}
},
"Restart": {
Expand Down Expand Up @@ -125,34 +120,6 @@
"Command": "DailyQuest",
"ServerUpdate": "04:00"
},
"AchievableQuest": {
"Complete_1_Daily_Mission": "not_supported",
"Clear_Calyx_Golden_1_times": "not_set",
"Clear_Stagnant_Shadow_1_times": "not_set",
"Clear_Cavern_of_Corrosion_1_times": "not_set",
"In_a_single_battle_inflict_3_Weakness_Break_of_different_Types": "achievable",
"Inflict_Weakness_Break_5_times": "achievable",
"Defeat_a_total_of_20_enemies": "achievable",
"Complete_Forgotten_Hall_1_time": "achievable",
"Complete_Echo_of_War_1_times": "not_set",
"Use_an_Ultimate_to_deal_the_final_blow_1_time": "achievable",
"Salvage_any_Relic": "achievable",
"Use_Consumables_1_time": "achievable",
"Log_in_to_the_game": "achievable",
"Dispatch_1_assignments": "achievable",
"Complete_Divergent_Universe_or_Simulated_Universe_1_times": "not_set",
"Clear_Calyx_Crimson_1_times": "not_set",
"Enter_combat_by_attacking_enemie_Weakness_and_win_3_times": "achievable",
"Use_Technique_2_times": "achievable",
"Destroy_3_destructible_objects": "achievable",
"Obtain_victory_in_combat_with_Support_Characters_1_times": "achievable",
"Level_up_any_character_1_times": "not_supported",
"Level_up_any_Light_Cone_1_times": "not_supported",
"Use_the_Omni_Synthesizer_1_times": "achievable",
"Take_photos_1_times": "achievable",
"Consume_120_Trailblaze_Power": "achievable",
"Level_up_any_Relic_1_times": "not_supported"
},
"DailyStorage": {
"DailyActivity": {},
"DailyQuest": {}
Expand Down Expand Up @@ -204,6 +171,11 @@
"ItemStorage": {
"Credit": {},
"StallerJade": {}
},
"CloudStorage": {
"CloudRemainSeasonPass": {},
"CloudRemainPaid": {},
"CloudRemainFree": {}
}
},
"Freebies": {
Expand Down Expand Up @@ -264,6 +236,24 @@
"DebugMode": false
}
},
"Ornament": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "Ornament",
"ServerUpdate": "04:00"
},
"Ornament": {
"Dungeon": "Divergent_Universe_Eternal_Comedy",
"UseImmersifier": true,
"DoubleEvent": true,
"UseStamina": false
},
"DungeonSupport": {
"Use": "when_daily",
"Character": "FirstCharacter"
}
},
"Daemon": {
"Daemon": {
"Enable": true,
Expand Down
32 changes: 30 additions & 2 deletions deploy/Windows/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,34 @@ def patch_uiautomator2():
https://tool.appetizer.io is added to bypass the wall in China but https://tool.appetizer.io is slow outside of CN
plus some CN users cannot access it for unknown reason.
So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
1. So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
appdir = os.path.join(os.path.expanduser('~'), '.uiautomator2')
to:
appdir = os.path.join(__file__, '../../uiautomator2cache')
And we also remove minicap installations since emulators doesn't need it.
2. And we also remove minicap installations since emulators doesn't need it.
for url in self.minicap_urls:
self.push_url(url)
to:
for url in []:
self.push_url(url)
3. Fix atx_agent_url so ARM Mac can have correct ATX installed
```
@property
def atx_agent_url(self):
files = {
'armeabi-v7a': 'atx-agent_{v}_linux_armv7.tar.gz',
'arm64-v8a': 'atx-agent_{v}_linux_armv7.tar.gz',
'armeabi': 'atx-agent_{v}_linux_armv6.tar.gz',
'x86': 'atx-agent_{v}_linux_386.tar.gz',
'x86_64': 'atx-agent_{v}_linux_386.tar.gz',
}
```
where
'arm64-v8a': 'atx-agent_{v}_linux_armv7.tar.gz',
to
'arm64-v8a': 'atx-agent_{v}_linux_arm64.tar.gz',
"""
init_file = './toolkit/Lib/site-packages/uiautomator2/init.py'
cache_dir = './toolkit/Lib/site-packages/uiautomator2cache/cache'
Expand All @@ -92,6 +109,17 @@ def patch_uiautomator2():
else:
logger.info(f'{init_file} minicap_urls no need to patch')

# Patch atx_agent_url
res = re.search(r"'arm64-v8a': 'atx-agent_\{v}_linux_armv7.tar.gz'", content)
if res:
content = re.sub(r"'arm64-v8a': 'atx-agent_\{v}_linux_armv7.tar.gz'",
"'arm64-v8a': 'atx-agent_{v}_linux_arm64.tar.gz'",
content)
modified = True
logger.info(f'{init_file} atx_agent_url patched')
else:
logger.info(f'{init_file} atx_agent_url no need to patch')

# Patch appdir
if os.path.exists(cache_dir):
res = re.search(r'appdir ?=(.*)\n', content)
Expand Down
15 changes: 14 additions & 1 deletion dev_tools/keywords/dungeon_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def convert_keyword(self, text: str, lang: str) -> str:

def iter_rows(self) -> t.Iterable[dict]:
dungeons = list(super().iter_rows())

# Sort by path
calyx = []
order = [
'Calyx_Golden',
Expand All @@ -108,9 +110,20 @@ def iter_rows(self) -> t.Iterable[dict]:
dungeons = [d for d in dungeons if not condition(d)]
dungeons = calyx + dungeons

# Reverse Divergent_Universe
start = 0
end = 0
for index, dungeon in enumerate(dungeons):
if dungeon['name'].startswith('Divergent_Universe'):
if start == 0:
start = index
end = index + 1
if start > 0 and end > 0:
dungeons = dungeons[:start] + dungeons[start:end][::-1] + dungeons[end:]

# Re-sort ID
self.keyword_index = 0
for row in dungeons:
# Re-sort ID
self.keyword_index += 1
row['id'] = self.keyword_index
yield row
Loading

0 comments on commit f04ddac

Please sign in to comment.