-
Notifications
You must be signed in to change notification settings - Fork 81
Added level, nature, ability and language to detection and json output in Pokemon HOME sorter #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| os << "gender:" << gender_to_string(pokemon->gender) << " "; | ||
| os << "ot_id:" << pokemon->ot_id << " "; | ||
| os << "level:" << pokemon->level << " "; | ||
| os << "language:" << pokemon->language << " "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to keep the same order as other locations>
uint32_t level = 0;
std::string origin = "";
std::string language = "";
std::string nature = "";
std::string ability = "";
| pokemon["gender"] = gender_to_string(current_pokemon->gender); | ||
| pokemon["ot_id"] = current_pokemon->ot_id; | ||
| pokemon["level"] = current_pokemon->level; | ||
| pokemon["language"] = current_pokemon->language; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32_t level = 0;
std::string origin = "";
std::string language = "";
std::string nature = "";
std::string ability = "";
| // level_box | ||
| // ot_box | ||
| int level = OCR::read_number_waterfill(env.console, extract_box_reference(screen, level_box), 0xff000000, 0xff7f7f7f); | ||
| if (level < 0 || level > 100) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<= 0 ?
And have you tried with eggs ? (I forgot what the program does when there is eggsà
| env.console.log("Level: " + std::to_string(level), COLOR_GREEN); | ||
|
|
||
| // language | ||
| std::string language = OCR::ocr_read(Language::English, extract_box_reference(screen, language_box)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raw OCR isn't perfect and it'd be better to have a dictionnary (a list of words it can find, in this case all languages). That way, OCR will be able to correct minor errors while reading. Also check that all languages slugs are written in latin character (otherwise, the language need to be adapted and can't be english all the time)
| env.console.log("Detected Language: " + language, COLOR_GREEN); | ||
| } | ||
| // nature_box | ||
| std::string nature = OCR::ocr_read(Language::English, extract_box_reference(screen, nature_box)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the nature, you should be giving the language used by pokemon home as natures from asiatic languages for example won't be readble using an english OCR (also, it'd be better to use a dictionnary)
| } | ||
|
|
||
| // ability_box | ||
| std::string ability = OCR::ocr_read(Language::English, extract_box_reference(screen, ability_box)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the ability, you should be giving the language used by pokemon home as abilities from asiatic languages for example won't be readble using an english OCR (also, it'd be better to use a dictionnary)
|
This has been sitting for a while. Please rebase and address the review comments if you want to continue this PR. |
|
Closed due to no activity and communication. |
No description provided.