Merge pull request #1082 from MaaAssistantArknights/feat/global_client

feat: Supports ALL clients
This commit is contained in:
MistEO
2022-07-07 23:10:23 +08:00
committed by GitHub
38 changed files with 16859 additions and 168 deletions

View File

@@ -0,0 +1 @@
Multilingual_PP-OCRv3_det_infer

View File

@@ -0,0 +1 @@
japan_dict.txt

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
japan_PP-OCRv3_rec_infer

View File

@@ -0,0 +1 @@
Multilingual_PP-OCRv3_det_infer

View File

@@ -0,0 +1 @@
korean_dict.txt

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
korean_PP-OCRv3_rec_infer

View File

@@ -0,0 +1 @@
Multilingual_PP-OCRv3_det_infer

View File

@@ -0,0 +1 @@
chinese_cht_dict.txt

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
chinese_cht_PP-OCRv3_rec_infer

View File

@@ -71,12 +71,18 @@ See also: [User Manual](docs/en/USER_MANUAL.md)
Please refer to: [FAQ](docs/en/FAQ.md)
## Supports for overseas servers
## Supports for overseas clients
- YoStarEN Server
Supports basic features like Combat, Recruiting, etc. See also [README](resource/global/YoStarEN/readme.md)
- Other servers
TODO
- EN Client
Supports basic features like Combat, Recruiting, Visiting, Collocting, etc. See also [README](resource/global/YoStarEN/readme.md)
- JP Client
Supports basic features like Combat, etc. See also [README](resource/global/YoStarJP/readme.md)
- KR Client
Supports basic features like Combat, etc. See also [README](resource/global/YoStarKR/readme.md)
- ZH_TW Client
Supports basic features like Combat, etc. See also [README](resource/global/txwy/readme.md)
Due to the small number of overseas clients users and the lack of project manpower, the overseas clients is currently only adapted to basic functions. If you have strong needs, welcome to ask the progress in the [discussions](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions), or join us to make MAA better!
## Associated Projects

View File

@@ -80,9 +80,15 @@ MAA 的意思是 MAA Assistant Arknights
## 外服支持
- 国际服(美服)
支持基本的刷理智、公招识别功能,请参考 [说明](resource/global/YoStarEN/readme.md)
- 其他
计划适配中……
支持基本的刷理智、公招识别、访问好友、领取奖励功能,请参考 [说明](resource/global/YoStarEN/readme.md)
-
支持基本的刷理智功能,请参考 [说明](resource/global/YoStarJP/readme.md)
- 韩服
支持基本的刷理智功能,请参考 [说明](resource/global/YoStarKR/readme.md)
- 繁中服
支持基本的刷理智功能,请参考 [说明](resource/global/txwy/readme.md)
由于外服用户较少及项目人手不足的问题,外服目前都仅适配了基本的功能。若您有强需求,欢迎在 [讨论区](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions) 催更,~~或加入我们一起建设 MAA~~
## 主要关联项目

View File

@@ -79,5 +79,4 @@ Compatible.
1. Download [adb](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) and unzip.
2. Go to `Settings` - `Connection Settings`, and fill in ADB path and address (IP+port is required, e.g. `127.0.0.1:5555`)
**Note:** Some features on mobile phone with non-`16:9` resolution is not stable, especially the Infrastructure. We are working in progress to make it compatible. `16:9` is the most recommended resolution since it is tested stable in most of the time.
You can set resolution with `adb shell wm size` on your phone and change it back later.
**Note:** If your device is non-`16:9` resolution like mobile phone or Android pad, You can set resolution with `adb shell wm size` on your phone and change it back later.

View File

@@ -82,5 +82,4 @@
1. 下载 [adb](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) 并解压
2. 进入软件 `设置` - `连接设置`,填写 adb 路径及地址(需要填写 IP + 端口,例如 `127.0.0.1:5555`
**注意 :** 若是使用手机,在非 `16:9` 分辨率下,部分功能不稳定(但也凑合能用),尤其是基建,几乎是不可用状态,正在进一步适配中。推荐使用 `16:9` 分辨率,经过的测试验证最多,也最稳定。
另外手机其实是可以通过 `adb shell wm size` 的方式来硬改分辨率的,使用完再改回来。等有空出一篇详细一点的文档,有兴趣的朋友们可先自行尝试一下~
**注意 :** 若是设备分辨率非 `16:9` (手机、平板灯),是可以通过 `adb shell wm size` 的方式来硬改分辨率的,使用完再改回来。等有空出一篇详细一点的文档,有兴趣的朋友们可先自行尝试一下~

View File

@@ -26,7 +26,10 @@
"intent": {
"Official": "com.hypergryph.arknights/com.u8.sdk.U8UnityContext",
"Bilibili": "com.hypergryph.arknights.bilibili/com.u8.sdk.SplashActivity",
"YoStarEN": "com.YoStarEN.Arknights/com.u8.sdk.U8UnityContext"
"YoStarEN": "com.YoStarEN.Arknights/com.u8.sdk.U8UnityContext",
"YoStarJP": "com.YoStarJP.Arknights/com.u8.sdk.U8UnityContext",
"YoStarKR": "com.YoStarKR.Arknights/com.u8.sdk.U8UnityContext",
"txwy": "tw.txwy.and.arknights/com.u8.sdk.U8UnityContext"
},
"connection": {
"General": {

View File

@@ -1,8 +1,8 @@
# YoStarEN server
# YoStarEN client
## 国际服(美服)
请进入 `设置` - `启动设置` - `客户端版本` 选择 `悠星国际服`
请进入 `设置` - `启动设置` - `客户端版本` 选择 `国际服`
目前支持:
@@ -11,8 +11,10 @@
- 使用源石恢复理智
- 指定次数
- 公招计算
- 访问好友
- 领取日常奖励
## YoStarEN
## Global (EN)
Please go to `Settings` - `Startup Settings` - `Client Version` and select `YoStarEN`
@@ -23,3 +25,5 @@ Now supports:
- Restore with Originite
- Set the max number of auto battles
- Recruitment calculate
- Friends visit
- Award collect

View File

@@ -59,48 +59,6 @@
"ClickCorner"
]
},
"TodaysSupplies": {
"algorithm": "OcrDetect",
"text": [
"Resource Today"
],
"action": "ClickRect",
"specificRect": [
1000,
1,
270,
340
],
"roi": [
500,
50,
300,
150
],
"next": [
"CloseAnno",
"Terminal"
]
},
"GoLastBattle": {
"algorithm": "OcrDetect",
"text": [
"recent",
"stage"
],
"roi": [
900,
500,
280,
100
],
"action": "ClickSelf",
"next": [
"UsePrts",
"UsePrts-StageSN",
"StartButton1"
]
},
"VisitNextOcr": {
"algorithm": "OcrDetect",
"text": [
@@ -153,24 +111,6 @@
"ReturnToHome"
]
},
"MallLoading": {
"algorithm": "OcrDetect",
"action": "DoNothing",
"text": [
"Submitting",
"feedback"
],
"roi": [
700,
600,
300,
120
],
"next": [
"MallLoading",
"CreditStoreOcr"
]
},
"RecruitTags": {
"algorithm": "OcrDetect",
"text": [],
@@ -295,81 +235,6 @@
]
]
},
"RecruitLoading": {
"algorithm": "OcrDetect",
"action": "DoNothing",
"text": [
"Submitting",
"feedback"
],
"roi": [
700,
600,
300,
120
],
"next": [
"RecruitLoading",
"Stop"
]
},
"InfrastReward": {
"algorithm": "OcrDetect",
"text": [
"Collectable",
"Orders",
"Acquired",
"Trust"
],
"action": "ClickSelf",
"roi": [
0,
600,
800,
118
],
"cache": false,
"next": [
"InfrastReward",
"InfrastExitReward"
]
},
"InfrastStationedInfo": {
"algorithm": "OcrDetect",
"action": "ClickSelf",
"cache": false,
"text": [
"Operator"
],
"roi": [
0,
0,
150,
720
],
"rearDelay": 1000,
"next": [
"InfrastEnterOperList"
]
},
"InfrastEnterOperList": {
"algorithm": "OcrDetect",
"cache": false,
"action": "ClickSelf",
"text": [
"Morale",
"Resting",
"Working",
"Assign"
],
"roi": [
800,
0,
480,
650
],
"rearDelay": 1000
},
"Award": {
"template": "Task.png",
"action": "ClickSelf",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,34 @@
# YoStarJP client
## 日服
请进入 `设置` - `启动设置` - `客户端版本` 选择 `日服`
目前支持:
- 刷理智(仅支持选择`当前关卡`
- 使用理智药恢复理智
- 使用源石恢复理智
- 指定次数
## Japanese
Please go to `Settings` - `Startup Settings` - `Client Version` and select `YoStarJP`
Now supports:
- Auto battle (only supports selecting `current stage`)
- Restore with potion
- Restore with Originite
- Set the max number of auto battles
## 日本
「設定」-「スタートアップ設定」-「クライアントバージョン」に移動し、「YoStarJP」を選択してください
現在サポートされています:
- オートバトラー(「現在のステージ」の選択のみをサポート)
- ポーションで復元
- Originiteで復元
- 自動戦闘の最大数を設定します

View File

@@ -0,0 +1,62 @@
{
"StartButton1": {
"algorithm": "OcrDetect",
"text": [
"行動開始"
],
"preDelay": 500,
"roi": [
1000,
600,
280,
120
],
"exceededNext": [
"StageSNReturnFlag",
"Stop"
],
"action": "ClickSelf",
"next": [
"StartButton2",
"UseMedicine",
"UseStone",
"NoStone",
"OfflineConfirm"
]
},
"PRTS": {
"algorithm": "OcrDetect",
"text": [
"残り配置可能数"
],
"roi": [
0,
500,
1280,
220
],
"action": "DoNothing",
"rearDelay": 5000,
"next": [
"PRTS",
"PRTS3",
"EndOfAction",
"PrtsErrorConfirm",
"OfflineConfirm",
"WaitAfterPRTS"
]
},
"EndOfAction": {
"Doc": "This task registered the StageDropsTaskPlugin",
"roi": [
791,
410,
296,
145
],
"action": "DoNothing",
"next": [
"ClickCorner"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -0,0 +1,34 @@
# YoStarKR client
## 韩服
请进入 `设置` - `启动设置` - `客户端版本` 选择 `韩服`
目前支持:
- 刷理智(仅支持选择`当前关卡`
- 使用理智药恢复理智
- 使用源石恢复理智
- 指定次数
## Korean
Please go to `Settings` - `Startup Settings` - `Client Version` and select `YoStarKR`
Now supports:
- Auto battle (only supports selecting `current stage`)
- Restore with potion
- Restore with Originite
- Set the max number of auto battles
## 한국인
'설정' - '시작 설정' - '클라이언트 버전'으로 이동하여 'YoStarKR'을 선택하세요.
이제 다음을 지원합니다.
- 자동 전투('현재 단계' 선택만 지원)
- 물약으로 회복
- Originite로 복원
- 최대 자동 전투 횟수 설정

View File

@@ -0,0 +1,63 @@
{
"StartButton1": {
"algorithm": "OcrDetect",
"text": [
"작전개시"
],
"preDelay": 500,
"roi": [
1000,
600,
280,
120
],
"exceededNext": [
"StageSNReturnFlag",
"Stop"
],
"action": "ClickSelf",
"next": [
"StartButton2",
"UseMedicine",
"UseStone",
"NoStone",
"OfflineConfirm"
]
},
"PRTS": {
"algorithm": "OcrDetect",
"text": [
"배치가능",
"인원"
],
"roi": [
0,
500,
1280,
220
],
"action": "DoNothing",
"rearDelay": 5000,
"next": [
"PRTS",
"PRTS3",
"EndOfAction",
"PrtsErrorConfirm",
"OfflineConfirm",
"WaitAfterPRTS"
]
},
"EndOfAction": {
"Doc": "This task registered the StageDropsTaskPlugin",
"roi": [
791,
410,
296,
145
],
"action": "DoNothing",
"next": [
"ClickCorner"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,12 @@
# Txwy client
## 繁中服
请进入 `设置` - `启动设置` - `客户端版本` 选择 `繁中服`
目前支持:
- 刷理智(仅支持选择`当前关卡`
- 使用理智药恢复理智
- 使用源石恢复理智
- 指定次数

View File

@@ -0,0 +1,62 @@
{
"StartButton1": {
"algorithm": "OcrDetect",
"text": [
"開始行動"
],
"preDelay": 500,
"roi": [
1000,
600,
280,
120
],
"exceededNext": [
"StageSNReturnFlag",
"Stop"
],
"action": "ClickSelf",
"next": [
"StartButton2",
"UseMedicine",
"UseStone",
"NoStone",
"OfflineConfirm"
]
},
"PRTS": {
"algorithm": "OcrDetect",
"text": [
"可放置角色"
],
"roi": [
0,
500,
1280,
220
],
"action": "DoNothing",
"rearDelay": 5000,
"next": [
"PRTS",
"PRTS3",
"EndOfAction",
"PrtsErrorConfirm",
"OfflineConfirm",
"WaitAfterPRTS"
]
},
"EndOfAction": {
"Doc": "This task registered the StageDropsTaskPlugin",
"roi": [
791,
410,
296,
145
],
"action": "DoNothing",
"next": [
"ClickCorner"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -93,36 +93,58 @@ namespace MeoAsstGui
}
}
private string _curResource = "";
private string _curResource = "_Unloaded";
public bool LoadGlobalResource()
{
bool loaded = true;
var settingsModel = _container.Get<SettingsViewModel>();
if (_curResource.Length == 0
&& settingsModel.ClientType == "YoStarEN"
&& _curResource != settingsModel.ClientType)
if (settingsModel.ClientType == _curResource)
{
loaded = AsstLoadResource(System.IO.Directory.GetCurrentDirectory() + "\\resource\\global\\YoStarEN");
_curResource = "YoStarEN";
return true;
}
// 这种是手贱看国际服点了一下,又点回官服的
else if (_curResource.Length != 0
&& (settingsModel.ClientType == "Official" || settingsModel.ClientType == "Bilibili" || settingsModel.ClientType == String.Empty))
bool loaded = true;
if (settingsModel.ClientType == String.Empty
|| settingsModel.ClientType == "Official" || settingsModel.ClientType == "Bilibili")
{
// The resources of Official and Bilibili are the same
if (_curResource == "Official" || _curResource == "Bilibili")
{
return true;
}
loaded = AsstLoadResource(System.IO.Directory.GetCurrentDirectory());
_curResource = "";
}
else if (_curResource == "Official" || _curResource == "Bilibili")
{
// Load basic resources for CN client first
// Then load global incremental resources
loaded = AsstLoadResource(System.IO.Directory.GetCurrentDirectory() + "\\resource\\global\\" + settingsModel.ClientType);
}
else
{
// Load basic resources for CN client first
// Then load global incremental resources
loaded = AsstLoadResource(System.IO.Directory.GetCurrentDirectory())
&& AsstLoadResource(System.IO.Directory.GetCurrentDirectory() + "\\resource\\global\\" + settingsModel.ClientType);
}
if (loaded)
{
if (settingsModel.ClientType == String.Empty)
{
_curResource = "Official";
}
else
{
_curResource = settingsModel.ClientType;
}
}
return loaded;
}
public void Init()
{
// basic resource for CN client
bool loaded = AsstLoadResource(System.IO.Directory.GetCurrentDirectory());
_curResource = "";
loaded = LoadGlobalResource();
bool loaded = LoadGlobalResource();
_handle = AsstCreateEx(_callback, IntPtr.Zero);

View File

@@ -143,7 +143,10 @@ namespace MeoAsstGui
new CombData { Display = "不选择", Value = "" },
new CombData { Display = "官服", Value = "Official" },
new CombData { Display = "Bilibili服", Value = "Bilibili" },
new CombData { Display = "悠星国际服 (YoStarEN)", Value = "YoStarEN" }
new CombData { Display = "国际服 (YoStarEN)", Value = "YoStarEN" },
new CombData { Display = "日服 (YoStarJP)", Value = "YoStarJP" },
new CombData { Display = "韩服 (YoStarKR)", Value = "YoStarKR" },
new CombData { Display = "繁中服 (txwy)", Value = "txwy" }
};
}