Skip to content

PokemonFRLG: overworld and dialog text inference - #1888

Open
thewhitewolfking wants to merge 2 commits into
PokemonAutomation:mainfrom
thewhitewolfking:frlg-inference
Open

thewhitewolfking wants to merge 2 commits into
PokemonAutomation:mainfrom
thewhitewolfking:frlg-inference

Conversation

@thewhitewolfking

Copy link
Copy Markdown
Contributor

First of the split-up pieces of #1887, as suggested in review. Inference only; nothing uses it yet (the navigation, auto battler and EXP Farmer PRs will).

  • VsSeekerIconDetector: finds the "!!" / "X" icons trainers show after the VS Seeker is used.
  • OverworldPosition: ScreenOdometry (finds the player's tile by matching the screen against screens remembered at known tiles; skips water), indoor position from the black margins, the Sevault Canyon house roof landmark, and a "did the screen scroll one tile" step check.
  • OverworldSprites: Cooltrainer hair / sprite outline on given tiles.
  • FlyMapDetector (in MapDetector): the Fly map of any region, incl. the Sevii Islands, which KantoMapDetector misses.
  • DialogTextReader: dialog line, Fly map name, and bag description readers. They take the game language and return raw text; text_contains_any() compares normalized text so callers can match per-language keywords.

@Dalton-V

Copy link
Copy Markdown
Member

Please add tests for the new inference classes.

#include <vector>

namespace PokemonAutomation{
class ImageViewRGB32;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include the header for this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use the actual sprite instead:

https://github.com/pret/pokefirered/blob/master/graphics/object_events/pics/people/cooltrainer_m.png
https://github.com/pret/pokefirered/blob/master/graphics/object_events/pics/people/cooltrainer_f.png

but need to stretch them to 1080p

Although imo you don't even need these. You can anchor yourself at the Chansey dance house, then the relative location of these two trainers are relatively fixed, and you can just walk to the spot

or if using VS seeker, another option is to just detect the VS seeker response icons

*
* From: https://github.com/PokemonAutomation/
*
* Tell which map tile the player is on, or whether a step happened, from

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these are all necessary if you can anchor to a fixed location like a door

whether a step happened -- presumption if you hold a tap longer than 167ms etc?

are you trying to do a screen-has-settled? which is quite common and probably doesn't need to be re-inveneted

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants