사전 정보
MAA의
오류를 수정하려고 했을 때, 정보를 찾아도 잘 나오지 않아 어려움을 겪었습니다
그래서
이와 같은 상황을 다른 사람들이 반복하지 않도록 하기 위해 정보를 공유하는 목적으로 작성한 글입니다
준비사항
- 다음 tasks.json 문서의 구성 요소들을 알고 사용법 및 의미를 이해하고 있어야 합니다
- 해외 클라이언트의 tasks.json 파일과 템플릿 이미지는 중국 클라이언트의 tasks.json 파일과 템플릿 이미지 중 해외 클라이언트의 사정과 맞지 않는 경우 작성 및 추가합니다
- 영어 실력이 있고, 로그를 읽을 수 있으며, 로그를 통해 누락된 템플릿 이미지 및 정보들을 찾을 수 있으면 좋습니다
- MAA의 작업 순서에 따라 순차적으로 수정을 하는게 좋습니다. 예를 들어 임의의 작업을 수정하려면 next 필드의 순서에 따라 template image, text, 그리고 roi를 단계적으로 수정해야 합니다
- MAA 폴더 내부에 DEBUG.txt 파일을 생성하면 작업 시작 버튼을 누를 때 마다 파일이 다시 로드됩니다!
사전 지식
- YoStarKR 서버의 tasks.json 문서의 위치는 MAA/resource/global/YoStarKR/resource/tasks.json 입니다
- YoStarKR 서버의 template 폴더의 위치는 MAA/reousrce/global/YoStarKR/resource/template 입니다
- ZH-CN 서버의 tasks.json 문서의 위치는 MAA/resource/tasks.json 입니다
- ZH-CN 서버의 template 문서의 위치는 MAA/resource/template 입니다
- log 파일은 MAA/debug/asst.log 파일 입니다
- template image는 MAA의 이미지 인식에 사용되는 이미지입니다
- roi는 Region OF Interest로 관심 영역을 뜻합니다
- rect는 roi 영역 내 관측 된 이미지의 영역을 뜻합니다
- tasks.json 문서의 ocrReplace 정규 표현식 테스트는 다음 사이트를 이용하면 더 쉽습니다!
vscode에서 다음 정규표현식을 사용하면, 오퍼레이터 인식 부분을 찾기가 쉽습니다!
(?<=WordOcr \[\{ ).*(?=: \[)
정규 표현식의 경우, "."은 한국어에 대응되지 않으니, ".+" 또는 ".?", ".*"을 사용하세요
tasks.json 문서의 구성 요소들에 대한 설명입니다클릭 시 오픈
// 선택 사항, 인식 알고리즘 유형을 나타냅니다.
// 선택 사항, 인식 후 작업 유형을 나타냅니다.
// 선택 사항, 서브 작업 오류를 무시할지 여부를 나타냅니다.
// 입력하지 않으면 기본값은 false입니다.
// 선택 사항, 작업이 최대로 실행될 수 있는 횟수를 나타냅니다.
// 입력하지 않으면 무한히 실행됩니다.
그렇지 않으면 현재 작업이 중지됩니다.
// 선택 사항, 실행 중 오류가 발생한 경우에 실행될 이후 작업을 나타냅니다.
// 선택 사항, 인식된 후 작업이 실행될 때까지 대기하는 시간을 밀리초로 나타냅니다.
입력하지 않으면 기본값은 0입니다.
// 선택 사항, 실행된 후 다음 인식까지 지연되는 시간을 밀리초로 나타냅니다.
입력하지 않으면 기본값은 0입니다.
// 선택 사항, 인식 범위를 나타냅니다. 포맷은 [ x, y, width, height ]입니다.
// 선택 사항, 작업이 캐싱을 사용하는지 여부를 나타냅니다. 기본값은 true입니다.
// 선택 사항, 인식 후 대상 이동을 나타냅니다. Auto-scaling으로 기준은 1280 * 720입니다.
// 선택 사항, 다른 작업의 실행 횟수를 줄이기 위해 실행합니다.
// action이 ClickRect인 경우 유효하고 필수입니다. 지정된 클릭 위치를 나타냅니다 (범위 내의 무작위 점).
// 일부 특수 인식기에 필요한 매개변수를 나타냅니다.
// 추가 옵션, action이 Swipe인 경우 [0]은 지속 시간, [1]은 추가 슬라이드 여부를 나타냅니다.
// 선택 사항, 이미지 매칭에 사용할 이미지 파일의 이름을 나타냅니다.
// 선택 사항, 이미지 템플릿 매칭 점수의 임계값을 나타냅니다.
이 점수 이상인 경우 이미지가 인식되었다고 판단합니다.
// 기본값은 0.8입니다. 실제 점수는 로그에서 확인할 수 있습니다.
// 선택 사항, 흑백 마스크 범위를 나타냅니다. 예를 들어 인식할 필요가 없는 이미지 부분은 검은색으로 칠해질 수 있습니다 (0의 흑백 값).
// 필수 사항, 인식할 텍스트 내용을 나타냅니다. 어떤 항목이 일치하면 인식되었다고 판단합니다.
// 선택 사항, 자주 오인식되는 텍스트를 대체할 내용입니다 (정규표현식 지원).
// 선택 사항, 텍스트 인식이 모든 단어를 일치시키는지 여부를 나타냅니다. 기본값은 false입니다.
예를 들어 text: [ "시작" ]이면 실제 인식에서 "시작 작업"도 인식됩니다.
// 선택 사항, 인식할 텍스트 내용이 ASCII 문자인지 여부를 나타냅니다.
// 선택 사항, 탐지 모델을 사용하지 않을지 여부를 나타냅니다.
템플릿 이미지 누락에 의한 오류의 해결방법 및 과정에 대한 설명클릭 시 오픈
다음과 같이 아이템 드랍 시 UnknwonDropType 오류가 발생합니다
asst.log 에서 해당 관련된 단어를 검색해 관련 로그를 찾아냅니다 EX) Unknwon
ocr 인식 관련 오류의 경우 다음 [asst::WordOcr
[{] 을 검색하면 쉽게 찾을 수 있습니다
실제 로그의 전체 문장클릭 시 오픈
[2023-12-30 17:44:37.007][INF]
[Px40cc0][Tx40aa8] Call ` C:\Program Files\BlueStacks_nxt\HD-Adb.exe -s emulator-5554 exec-out "screencap | gzip -1" ` ret 0 , cost 425 ms , stdout size: 1758328 , socket size: 0
[2023-12-30 17:44:37.030][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::merge_image | enter
[2023-12-30 17:44:37.043][TRC][Px40cc0][Tx40aa8] match_templ | score: 1 rect: [ 960, 0, 280, 100 ] roi: [ 0, 0, 1280, 100 ]
[2023-12-30 17:44:37.044][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::merge_image | leave, 14 ms
[2023-12-30 17:44:37.044][TRC][Px40cc0][Tx40aa8] new image offset: 0
[2023-12-30 17:44:37.044][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze | enter
[2023-12-30 17:44:37.044][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_stage_code | enter
[2023-12-30 17:44:37.087][TRC][Px40cc0][Tx40aa8] asst::CharOcr [{ HE-7: [ 3, 14, 99, 32 ], score: 0.998994 }] by OCR Pipeline , cost 41 ms
[2023-12-30 17:44:37.087][TRC][Px40cc0][Tx40aa8] Proceed [{ HE-7: [ 143, 74, 99, 32 ], score: 0.998994 }]
[2023-12-30 17:44:37.087][INF]
[Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_stage_code stage_code HE-7
[2023-12-30 17:44:37.087][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_stage_code | leave, 42 ms
[2023-12-30 17:44:37.087][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_difficulty | enter
[2023-12-30 17:44:37.101][TRC][Px40cc0][Tx40aa8] match_templ | StageDrops-Difficulty-Tough.png score: 0.735583 rect: [ 75, 65, 54, 49 ] roi: [ 0, 0, 220, 220 ]
[2023-12-30 17:44:37.101][INF]
[Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_difficulty count 0 threshold 100
[2023-12-30 17:44:37.101][INF]
[Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_difficulty::<lambda_1>::operator () StageDifficulty::Normal
[2023-12-30 17:44:37.101][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_difficulty | leave, 14 ms
[2023-12-30 17:44:37.102][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_stars | enter
[2023-12-30 17:44:37.107][TRC][Px40cc0][Tx40aa8] match_templ | StageDrops-Stars-2.png score: 0.75184 rect: [ 72, 292, 205, 58 ] roi: [ 50, 270, 250, 100 ]
[2023-12-30 17:44:37.110][TRC][Px40cc0][Tx40aa8] match_templ | StageDrops-Stars-3.png score: 0.991377 rect: [ 71, 292, 205, 58 ] roi: [ 50, 270, 250, 100 ]
[2023-12-30 17:44:37.110][INF]
[Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_stars stars 3
[2023-12-30 17:44:37.110][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_stars | leave, 8 ms
[2023-12-30 17:44:37.110][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_times | enter
[2023-12-30 17:44:37.110][INF]
[Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_times Times not found
[2023-12-30 17:44:37.110][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_times | leave, 0 ms
[2023-12-30 17:44:37.110][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_drops | enter
[2023-12-30 17:44:37.110][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_baseline | enter
[2023-12-30 17:44:37.123][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_droptype | enter
[2023-12-30 17:44:37.123][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_droptype baseline: [ 59, 637, 136, 1 ]
[2023-12-30 17:44:37.123][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-ExpAndLMB.png
[2023-12-30 17:44:37.123][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-Normal.png
[2023-12-30 17:44:37.124][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-Extra.png
[2023-12-30 17:44:37.125][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-Furniture.png
[2023-12-30 17:44:37.125][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-Special.png
[2023-12-30 17:44:37.125][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-Sanity.png
[2023-12-30 17:44:37.126][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load StageDrops-DropType-Reward.png
[2023-12-30 17:44:37.126][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_droptype | leave, 3 ms
[2023-12-30 17:44:37.126][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_droptype | enter
[2023-12-30 17:44:37.126][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_droptype baseline: [ 225, 637, 137, 1 ]
[2023-12-30 17:44:37.127][TRC][Px40cc0][Tx40aa8] match_templ | StageDrops-DropType-Normal.png score: 0.99888 rect: [ 262, 640, 64, 18 ] roi: [ 225, 639, 137, 25 ]
[2023-12-30 17:44:37.128][TRC][Px40cc0][Tx40aa8] match_templ | StageDrops-DropType-Furniture.png score: 0.552347 rect: [ 262, 640, 65, 18 ] roi: [ 225, 639, 137, 25 ]
[2023-12-30 17:44:37.128][TRC][Px40cc0][Tx40aa8] match_templ | StageDrops-DropType-Special.png score: 0.5074 rect: [ 261, 640, 66, 18 ] roi: [ 225, 639, 137, 25 ]
[2023-12-30 17:44:37.129][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_droptype | leave, 2 ms
[2023-12-30 17:44:37.129][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_baseline baseline size 2
[2023-12-30 17:44:37.129][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_baseline baseline [ 59, 637, 136, 1 ]
[2023-12-30 17:44:37.129][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_baseline baseline [ 225, 637, 137, 1 ]
[2023-12-30 17:44:37.129][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_baseline | leave, 18 ms
[2023-12-30 17:44:37.129][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_item | enter
[2023-12-30 17:44:37.129][WRN]
[Px40cc0][Tx40aa8] roi is out of range 1280 720 [ 0, -130, 138, 130 ]
[2023-12-30 17:44:37.854][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load act24side_melding_6
[2023-12-30 17:44:37.854][ERR]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ templ not found act24side_melding_6
[2023-12-30 17:44:37.854][ERR]
[Px40cc0][Tx40aa8] templ is empty! act24side_melding_6
[2023-12-30 17:44:37.872][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load act24side_melding_5
[2023-12-30 17:44:37.872][ERR]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ templ not found act24side_melding_5
[2023-12-30 17:44:37.872][ERR]
[Px40cc0][Tx40aa8] templ is empty! act24side_melding_5
[2023-12-30 17:44:37.888][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load act24side_melding_4
[2023-12-30 17:44:37.888][ERR]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ templ not found act24side_melding_4
[2023-12-30 17:44:37.889][ERR]
[Px40cc0][Tx40aa8] templ is empty! act24side_melding_4
[2023-12-30 17:44:38.108][TRC][Px40cc0][Tx40aa8] match_templ | 4001 score: 0.799338 rect: [ 74, 522, 109, 105 ] roi: [ 57, 507, 138, 130 ]
[2023-12-30 17:44:38.631][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load act24side_melding_1
[2023-12-30 17:44:38.631][ERR]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ templ not found act24side_melding_1
[2023-12-30 17:44:38.631][ERR]
[Px40cc0][Tx40aa8] templ is empty! act24side_melding_1
[2023-12-30 17:44:38.637][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load act24side_melding_2
[2023-12-30 17:44:38.637][ERR]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ templ not found act24side_melding_2
[2023-12-30 17:44:38.637][ERR]
[Px40cc0][Tx40aa8] templ is empty! act24side_melding_2
[2023-12-30 17:44:38.643][INF]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ lazy load act24side_melding_3
[2023-12-30 17:44:38.643][ERR]
[Px40cc0][Tx40aa8] asst::TemplResource::get_templ templ not found act24side_melding_3
[2023-12-30 17:44:38.643][ERR]
[Px40cc0][Tx40aa8] templ is empty! act24side_melding_3
[2023-12-30 17:44:39.051][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_item | leave, 1922 ms
[2023-12-30 17:44:39.057][TRC][Px40cc0][Tx40aa8] match_templ | score: 0.799338 rect: [ 74, 522, 109, 105 ] roi: [ 57, 507, 138, 130 ]
[2023-12-30 17:44:39.074][TRC][Px40cc0][Tx40aa8] asst::WordOcr [{ 252: [ 0, 0, 34, 18 ], score: 0.999985 }] by OCR Rec , cost 16 ms
[2023-12-30 17:44:39.074][TRC][Px40cc0][Tx40aa8] Proceed [{ 252: [ 127, 598, 34, 18 ], score: 0.999985 }]
[2023-12-30 17:44:39.074][INF]
[Px40cc0][Tx40aa8] Quantity: 252
[2023-12-30 17:44:39.074][INF]
[Px40cc0][Tx40aa8] Item id: 4001 , quantity: 252
[2023-12-30 17:44:39.074][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_item | enter
[2023-12-30 17:44:39.074][WRN]
[Px40cc0][Tx40aa8] roi is out of range 1280 720 [ 0, -130, 138, 130 ]
[2023-12-30 17:44:39.092][TRC][Px40cc0][Tx40aa8] match_templ | act26side_token_fragmenta score: 0.870904 rect: [ 238, 522, 114, 105 ] roi: [ 225, 507, 138, 130 ]
[2023-12-30 17:44:39.092][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::match_item | leave, 17 ms
[2023-12-30 17:44:39.099][TRC][Px40cc0][Tx40aa8] match_templ | score: 0.870904 rect: [ 238, 522, 114, 105 ] roi: [ 225, 507, 138, 130 ]
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::CharOcr [{ 21: [ 0, 0, 21, 18 ], score: 0.999367 }] by OCR Rec , cost 19 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] Proceed [{ 21: [ 306, 599, 21, 18 ], score: 0.999367 }]
[2023-12-30 17:44:39.121][INF]
[Px40cc0][Tx40aa8] Quantity: 21
[2023-12-30 17:44:39.121][INF]
[Px40cc0][Tx40aa8] Item id: act26side_token_fragmenta , quantity: 21
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze_drops | leave, 2010 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsImageAnalyzer::analyze | leave, 2076 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::recognize_drops | leave, 10351 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::drop_info_callback | enter
[2023-12-30 17:44:39.121][INF]
[Px40cc0][Tx40aa8] Assistant::append_callback | SubTaskExtraInfo {"class":"asst::StageDropsTaskPlugin","details":{"drops":[{"dropType":"UNKNOWN_DROP","itemId":"4001","itemName":"용문폐","quantity":252},{"dropType":"NORMAL_DROP","itemId":"act26side_token_fragmenta","itemName":"성상 조각","quantity":21}],"stage":{"stageCode":"HE-7","stageId":"act26side_07"},"stars":3,"stats":[{"addQuantity":21,"itemId":"act26side_token_fragmenta","itemName":"성상 조각","quantity":21},{"addQuantity":252,"itemId":"4001","itemName":"용문폐","quantity":252}]},"subtask":"StageDropsTask","taskchain":"Fight","taskid":4,"uuid":"c07d4e6d7a7eb88d","what":"StageDrops"}
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::drop_info_callback | leave, 0 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::check_stage_valid | enter
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::check_stage_valid | leave, 0 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_penguin | enter
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_server | enter
[2023-12-30 17:44:39.121][INF]
[Px40cc0][Tx40aa8] Assistant::append_callback | SubTaskError {"class":"asst::StageDropsTaskPlugin","details":{},"subtask":"ReportToPenguinStats","taskchain":"Fight","taskid":4,"uuid":"c07d4e6d7a7eb88d","why":"UnknownDropType"}
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_server | leave, 0 ms
[2023-12-30 17:44:39.121][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_penguin | leave, 0 ms
[2023-12-30 17:44:39.121][ERR]
[Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::_run upload_to_penguin failed
[2023-12-30 17:44:39.122][TRC][Px40cc0][Tx40aa8] Save image debug\drops\2023-12-30_17-44-39-122_raw.png
[2023-12-30 17:44:39.176][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_yituliu | enter
[2023-12-30 17:44:39.176][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_server | enter
[2023-12-30 17:44:39.176][INF]
[Px40cc0][Tx40aa8] Assistant::append_callback | SubTaskError {"class":"asst::StageDropsTaskPlugin","details":{},"subtask":"ReportToYituliu","taskchain":"Fight","taskid":4,"uuid":"c07d4e6d7a7eb88d","why":"UnknownDropType"}
[2023-12-30 17:44:39.176][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_server | leave, 0 ms
[2023-12-30 17:44:39.176][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::upload_to_yituliu | leave, 0 ms
[2023-12-30 17:44:39.176][TRC][Px40cc0][Tx40aa8] asst::StageDropsTaskPlugin::_run | leave, 10406 ms
다음 로그 전문에서 해당 부분을 확인합니다
vscode 에서 formatting을 하면 다음과 같이 됩니다
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | [2023-12-30 17:44:39.121][INF][Px40cc0][Tx40aa8] Assistant:
:append_callback | SubTaskExtraInfo { "class": "asst::StageDropsTaskPlugin",
"details": {
"drops": [
{
"dropType": "UNKNOWN_DROP",
"itemId": "4001",
"itemName": "용문폐",
"quantity": 252
},
{
"dropType": "NORMAL_DROP",
"itemId": "act26side_token_fragmenta",
"itemName": "성상
조각",
"quantity": 21
} ],
"stage": {
"stageCode": "HE-7",
"stageId": "act26side_07" },
"stars": 3,
"stats": [
{
"addQuantity": 21,
"itemId": "act26side_token_fragmenta",
"itemName": "성상
조각",
"quantity": 21
},
{
"addQuantity": 252,
"itemId": "4001",
"itemName": "용문폐",
"quantity": 252
} ]
},
"subtask": "StageDropsTask",
"taskchain": "Fight",
"taskid": 4, "uuid": "c07d4e6d7a7eb88d", "what":
"StageDrops" } |
다음을 보면 현재 용문폐의 DropType이 확인이 되지 않아 해당 오류가 발생하는걸로 보입니다
용문폐의 경우 template image의 다음 StageDrops-DropType-ExpAndLMB.png 이미지를 이용해 인식합니다
인식이 안되는 것 같으니 이미지 교체를 시도합니다
해당 이미지에서 용문폐 부분만 추출해냅니다
실제로 실행을 해봅니다
문제가 해결되었습니다!
다음 코드를 보면 StageDrops-DropType-ExpAndLMB.png 도 문제없이 인식을 합니다
Roi tool을 이용해서 확인하면 다음과 같이 인식한 영역들을 확인할 수도 있습니다!
단 해당 문제는 120레벨 유저의 경험치 드랍이 안되어 글씨 크기 차이에
의한
문제입니다
해당 문제 수정은 개인적으로만 해주세요
다음과 같이 120레벨 미만 유저에서는 발생되지 않는 오류입니다
위와 같은 과정을 통해 여러분이 직접 오류를 수정하고
수정된 사항을 공유해주세요!
ocrReplace 누락에 의한 오류의 해결방법 및 과정에 대한 설명클릭 시 오픈
maa가 오퍼레이터, 스테이지, 특정 문구 혹은 이벤트명을 인식할때에는 기본적으로 다음과 같이 한국어를 인식하고
그 이후에 중국어 원문으로 변환하는 과정을 거칩니다.
다음은 debug 폴더 내의 asst.log 파일입니다.
다만, 아래의 첸더훌룽데0 와 같이 ocr의 한계 즉 배경 또는 이펙트와 겹치거나 글자의 크기가 작거나 하는 등의 이유로 제대로 인식이 안될 수 있습니다.
물론 위의 경우는 이미 tasks.json 파일에 정규표현식으로 다음과 같이 적용이 되어 문제 없이 중국어로 변환이 됩니다
[
"첸더.*",
"假日威龙陈"
],
[
"젠더.*",
"假日威龙陈"
],
[
".*룽데이",
"假日威龙陈"
],
[
".*롱데이",
"假日威龙陈"
],
만약 변환이 안되거나 한다면, 위와 같이 정규 표현식을 이용해서 ocr 인식된 문자가 중국어 원문으로 잘 바뀔 수 있게 추가/수정해주세요!
예시)
피아메타 를 인식해야 하지만, Wordocr 에서 피아메티 로 인식해 菲亚梅塔로 변환이 안 될 경우
피아메타의 ocrReplace 부분을
[
"피아메.+",
"菲亚梅塔"
],
로 수정하여 중국어로 인식이 되게 수정해줘야 합니다
위와 같은 과정을 통해 여러분이 직접 오류를 수정하고
수정된 사항을 공유해주세요!