Skip to content
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

Find path like ball saver not strong boss #116

Conversation

TeachingGame
Copy link
Contributor

I've just added the find path mode to the same places as the ball saver mode so it will no longer check non legends for shininess if it wins.
There are a lot of AND OR statements and I wasn't sure the best way to nest them.
Also I have not actually ran a test of this yet.

Copy link
Member

@pifopi pifopi left a comment

Choose a reason for hiding this comment

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

Looks good to me. But that function is now 200 lines wide with a if/or/and nightmare so I'm not 100% sure xD

@ercdndrs ercdndrs merged commit 6151a93 into PokemonAutomation:beta Apr 3, 2021
ercdndrs added a commit that referenced this pull request Apr 4, 2021
* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* fixed problem causing .exe to crash on save

- getting max dynite ore value AsInteger
- some minor code cleanup

* Update AutoMaxLair.csproj

* Ball template matching (#112)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Remove alpha channel of ball sprite images

Co-authored-by: DOTTEL Gaël <[email protected]>

* fix the ore count when you're kicked out of the den without catching any pokemon

* Updated the UI

added:
- FIND_PATH_WINS
- NON_LEGEND

fixed:
- missing changes with Light-Theme

* Show ball sprite rectangle

* Fix ball sprite detection rectangle

* Find path like ball saver not strong boss (#116)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Improve the log summary (#115)

* Delete log_summary.py

* Use filename timestamp to order bosses

Bosses will be ordered by filename timestamp (from oldest to newest)

* increase the timer after the scientist

* Allow AutoMaxLair to be used with the PABotBase hex file (#117)

* Initial commit of framework

- Not functional yet

* Fix CRC calculation and implement reset protocol

* Start implementing command translations between protocols

* Update with latest progress

* Initial working version

- To use, enable PABOTBASE_HEX in the configuration file

* Delete CRC_sandbox.py

* Fix linting errors

* Update requirements.txt

* Formatting and documentation fixes

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>
ercdndrs added a commit that referenced this pull request Apr 4, 2021
* Rebase ball-template-matching (#118)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* fixed problem causing .exe to crash on save

- getting max dynite ore value AsInteger
- some minor code cleanup

* Update AutoMaxLair.csproj

* Ball template matching (#112)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Remove alpha channel of ball sprite images

Co-authored-by: DOTTEL Gaël <[email protected]>

* fix the ore count when you're kicked out of the den without catching any pokemon

* Updated the UI

added:
- FIND_PATH_WINS
- NON_LEGEND

fixed:
- missing changes with Light-Theme

* Show ball sprite rectangle

* Fix ball sprite detection rectangle

* Find path like ball saver not strong boss (#116)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Improve the log summary (#115)

* Delete log_summary.py

* Use filename timestamp to order bosses

Bosses will be ordered by filename timestamp (from oldest to newest)

* increase the timer after the scientist

* Allow AutoMaxLair to be used with the PABotBase hex file (#117)

* Initial commit of framework

- Not functional yet

* Fix CRC calculation and implement reset protocol

* Start implementing command translations between protocols

* Update with latest progress

* Initial working version

- To use, enable PABOTBASE_HEX in the configuration file

* Delete CRC_sandbox.py

* Fix linting errors

* Update requirements.txt

* Formatting and documentation fixes

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>

* Switch to using new ball detection method

* Remove old code

- Remove code pertaining to ball numbers in the config file
- Fix code referring to old method of storing ball numbers

* Update PABotBase source url

* Fix boss and ball assertions

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>
ercdndrs added a commit that referenced this pull request May 7, 2021
* Adjust color thresholds

- Fix issue where some language/capture card combinations got stuck on the Catch screen
- Fix issue where some language/capture card combinations did not accurately read text in the bottom dialogue box

* Update da_controller.py

* Update release candidate in preparation for final testing (#36)

* convert ini file to toml, small changes to logs and discord

* fixing the expected stats to work with new list system

* fix for the stats to allow multiple in search

* fixing the example stat lists

* adding the placeholder information for the weather and terrain

* small updates including removing int casting and ball selection

* Clean-up refactor

* Update Config.sample.toml with path for french

* Add tool for testing image thresholding

* Adjust color thresholds

- Fix issue where some language/capture card combinations got stuck on the Catch screen
- Fix issue where some language/capture card combinations did not accurately read text in the bottom dialogue box

Co-authored-by: denvoros <[email protected]>

* Update version tag

* Tweak timings for scrolling through den

* don't update ui on screenshot, optional image discord

* update weather/terrain sentences (thanks to nobody!)

* Add more capture card delay corrections

* Add more capture card delay corrections

* Change button hold time rounding

- Use `round()` instead of `int()`

* Change button hold time rounding

- Use `round()` instead of `int()`

* Updating Discord Webhook Embeds to Be Pretty and Start from Grip Screen (#41)

* Add more capture card delay corrections

* adding improved discord messages, start from grip screen

* attribution to pokemondb.net for images

* add thumbnail and properly handle found shinies

* Update auto_max_lair.py, fix for original starting position

Co-authored-by: ercdndrs <[email protected]>

* catch webhook sending incase an error occurs

* add tiemstamp to the discord embed

Co-authored-by: ercdndrs <[email protected]>
Co-authored-by: ercdndrs <[email protected]>

* Fix text reading issue on some capture cards

* fixing timestamp location to embed

* fixing location of timestamp on discord embed

* Update requirements to accommodate different Python versions

* Increase delay before battle start

- Helps prevent occasional crashes

* Update Config.sample.toml

* ping the user when the find path mode end

* Default to no Discord messages

- Prevents a crash when the user doesn't configure the Discord section

* calc a modifier based on the weather

* Add terrain support

* Prepare for teammate reading

- Add rectangles for teammate sprites
- Add rectangles for HP bars
- Save sprite images to supplement online sprites

* Fix timing bug

* add terrain pulse

* VS Project of the UI

includes the whole project plus a README.txt where you can find a link to a compiled version for easy use

* Update README.txt

* Fix bug with image numbering

* Fix the number of wins/runs sent to discord

* Fixed some string to int issues, fixed multiple stats, removed .txt

* Update README.txt

* Teammate detection (#69)

* Implement team detection using sprites

- The four Pokemon comprising the team are read by matching the shape of their sprite to stored images.
- This action is performed on entering the den for the first time and after any stage that could result in a change of Pokemon (catch, scientist).

* Update HP rectangles

* Tweak sprites and add more reporting

* Improve config validation

* reduce the duration of the scrolling while reading the den paths

* fix some linting errors

* add more asserts to check config values

* fix the stats checking feature

* fix some more linting errors

* Added hints, etc.

- Added hints to the selections
- Checks if Config.toml exists, if not uses Config.samle.toml and creates Config.toml
- Have a button that opens the explorer to select Tesseract path

* shorten the death sleep to let the both detect weather changes afterward

* fix some more linting errors

* add a script to pickle balls names in every language

* use ball id instead of ball names in the config file

* Improve teammate detection

- Use colour images instead of binary black and white sprites
- Update timing to avoid "identifying" Pokemon during good a stage transition
- Fix some linting errors (long lines)

* Tweak teammate rectangles

* add informations for find path

* Detect "Fight" and "Cheer" by template matching

* Tweak Fight and Cheer detection

* updating pickle files

* Change button hold notation

- Old method (float seconds) was misleading due to rounding
- New method uses integer (USB ticks/10) inputs which is more clear

* Import sprites from pokesprite

- Use scaled images from pokesprite to build pokemon_sprites.pickle as opposed to locally saved (and untracked) images

* Apply suggestions from code review

Co-authored-by: ercdndrs <[email protected]>

* remove 'ball' from ball names in different languages

* Added validation

There is still one error, if both balls are the same and you input a string and not a number

* Update README.txt

* move balls to da controller

* Validation fixes, file cleanup, ball changes, pokemon changes

- fixed the error with the validation
- deleted unnecessary files
- changed the balls to fit the presets
- changed the pokemon
-updated README.txt

* Use team in decision whether to take a new Pokemon

* validation hot fix

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* lenghten second scrolling

* Update pokemon_sprites.pickle

* no longer log empty lines

* fix linting errors

* add a maximum ore cost to the config file

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* fix linting error

* fix linting error

* Hot fixes for the UI (#86)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Hot fix battle start delay

- Reduces the chance of false battle end detection.

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Latest changes to team detection (#79)

* Merge latest from beta (#78)

* reduce the duration of the scrolling while reading the den paths

* fix some linting errors

* add more asserts to check config values

* fix the stats checking feature

* fix some more linting errors

* shorten the death sleep to let the both detect weather changes afterward

* fix some more linting errors

* add a script to pickle balls names in every language

* use ball id instead of ball names in the config file

* add informations for find path

* updating pickle files

* Apply suggestions from code review

Co-authored-by: ercdndrs <[email protected]>

* remove 'ball' from ball names in different languages

* move balls to da controller

Co-authored-by: pifopi <[email protected]>

* Use teammates and remaining minibosses in decisions

- Check whether teammates would benefit more from each caught miniboss, instead of only considering the bot's score
- Narrow down the list of potential minibosses you might face given the target path and previously encountered Pokemon

* Adjust scores based on Pokemon HP

- HP is not yet read immediately following a battle, which would make this change more useful
- Also cleaned up printing of the path and added more reporting on team detection

* Detect team HP after catching a miniboss

- Not completely validated yet

* Check for the fight symbol during detect stage

- This check should fix an issue where slow computers fail to detect the start of a battle

* Update version code

* Fix missing space in comment

Co-authored-by: pifopi <[email protected]>

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* Added Themes to the UI: Dark & Light + CI pipeline workflow (#93)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* fixed problem causing .exe to crash on save

- getting max dynite ore value AsInteger
- some minor code cleanup

* Update AutoMaxLair.csproj

* Update CI/CD pipeline (#94)

* update CI/CD

* fix linting issues

* update readme

* update weather/terrain detection for french language

* Update Config.sample.toml

* add AutoMaxLair.exe to the gitignore

* activate again the debug symbols

* fix the UI crash

* Use variable battle start delay

- Static delay time sometimes led to transitioning into the main battle loop before the black screen had disappeared, resulting in a hang.

* Update da_controller.py

Added key pair to the output array to include the count of consecutive resets.

* Update pause at the start of a battle

- Use a combination of the initial static delay and variable additional delay

* Fix hsv computations (#96)

* Default to no Discord messages

- Prevents a crash when the user doesn't set up the Discord section

* quickfix for adding already HSV flag on check HSV match

Co-authored-by: ercdndrs <[email protected]>
Co-authored-by: denvoros <[email protected]>

* Hunt NonLegends (#98)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* - Use color analysis to detect backpacker

- Uses the solid blue background of the item selection screen
- Also fix some linting errors

* Fix backpacker blue rectangle

* fix crash while printing a warning

* use the comments from the config file to generate tooltips

* fix the default path for tesseract

* add draft of japanese translation (thanks to Ryder and MaruBatsu)

* no longer hardcode ball list and pokemon list

* shorten the wait after skipping the catch on ball saver

* fix the video index picker (pick the right index and pre pick the camera from the index)

* fix rectangle detection size

* fix missing HSV bool

* Fix backpacker rectangle and display

* Fix Spanish language data file name

* updates to discord embeds: ping by level and good colors (#99)

* updates to discord embeds: ping by level and good colors

* remove image saving from script

* add attribution for palette value

* linting fixes

* add discord color collection to build script

* Create detailed_log.py (#82)

* Create detailed_log.py

Log file that returns non legend shiny names and global legend odds

* Update detailed_log.py

* Update detailed_log.py

* Update detailed_log.py

* show win rate as percentage

* fix the assert for discord levels

* update the UI to manage new pinging levels for discord

* update the japanese translation (thanks Ryder)

* update the spanish translation (thanks Dainbrage)

* delete backpacker sentences now it is detected with the blue background

* change the message before the end of find path to critical

* fix gastrodon sprite (we were using the pink instead of the blue one)

* update spanish translation (thanks dainbrage)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update Config.sample.toml

* Update Config.sample.toml

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Update Config.sample.toml

Co-authored-by: DOTTEL Gaël <[email protected]>

* Update Config.sample.toml

Co-authored-by: DOTTEL Gaël <[email protected]>

* Update Config.sample.toml

* Update auto_max_lair.py

* Update German FAINT phrase

* Update Config.sample.toml

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Black screen detection test (#110)

* Improve black screen detection

- Use less stringent brightness threshold but add a uniformity requirement

* Fix value stddev check

* Add framework for detecting ball sprites (#111)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

Co-authored-by: DOTTEL Gaël <[email protected]>

* Increase delay after a faint is detected

- A delay of 3 seconds sometimes resulted in one faint message being read twice

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Update scientist timings

* Tweak scientist timings

* Remove alpha channel of ball sprite images

* Ball template matching (#112)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Remove alpha channel of ball sprite images

Co-authored-by: DOTTEL Gaël <[email protected]>

* fix the ore count when you're kicked out of the den without catching any pokemon

* Updated the UI

added:
- FIND_PATH_WINS
- NON_LEGEND

fixed:
- missing changes with Light-Theme

* Show ball sprite rectangle

* Fix ball sprite detection rectangle

* Find path like ball saver not strong boss (#116)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Improve the log summary (#115)

* Delete log_summary.py

* Use filename timestamp to order bosses

Bosses will be ordered by filename timestamp (from oldest to newest)

* increase the timer after the scientist

* Allow AutoMaxLair to be used with the PABotBase hex file (#117)

* Initial commit of framework

- Not functional yet

* Fix CRC calculation and implement reset protocol

* Start implementing command translations between protocols

* Update with latest progress

* Initial working version

- To use, enable PABOTBASE_HEX in the configuration file

* Delete CRC_sandbox.py

* Fix linting errors

* Update requirements.txt

* Formatting and documentation fixes

* Flip to new ball detection method (#119)

* Rebase ball-template-matching (#118)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* fixed problem causing .exe to crash on save

- getting max dynite ore value AsInteger
- some minor code cleanup

* Update AutoMaxLair.csproj

* Ball template matching (#112)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Remove alpha channel of ball sprite images

Co-authored-by: DOTTEL Gaël <[email protected]>

* fix the ore count when you're kicked out of the den without catching any pokemon

* Updated the UI

added:
- FIND_PATH_WINS
- NON_LEGEND

fixed:
- missing changes with Light-Theme

* Show ball sprite rectangle

* Fix ball sprite detection rectangle

* Find path like ball saver not strong boss (#116)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Improve the log summary (#115)

* Delete log_summary.py

* Use filename timestamp to order bosses

Bosses will be ordered by filename timestamp (from oldest to newest)

* increase the timer after the scientist

* Allow AutoMaxLair to be used with the PABotBase hex file (#117)

* Initial commit of framework

- Not functional yet

* Fix CRC calculation and implement reset protocol

* Start implementing command translations between protocols

* Update with latest progress

* Initial working version

- To use, enable PABOTBASE_HEX in the configuration file

* Delete CRC_sandbox.py

* Fix linting errors

* Update requirements.txt

* Formatting and documentation fixes

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>

* Switch to using new ball detection method

* Remove old code

- Remove code pertaining to ball numbers in the config file
- Fix code referring to old method of storing ball numbers

* Update PABotBase source url

* Fix boss and ball assertions

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>

* Update da_controller.py (#121)

Co-authored-by: ercdndrs <[email protected]>

* Update README.md

* Add more acknowledgements
* Add a few more additions to the changelog

* Allow multiple PABotBase protocol versions

* fix the UI after the removal of ball count

* Beta (Forgot a section) (#123)

* Update da_controller.py

* Update da_controller.py

Co-authored-by: ercdndrs <[email protected]>

* hotfix for losing without seeing balls, autoformat

* Update version code

* Hotfix for end of run crash

* Force debug logging to the log file

* Enable debug logs by default while in beta

* fix ball name in the UI

* add a checkbox for PABotBase hex and remove validation for discord

* fix copy paste error

* Custom script template (#129)

* Add template for creating custom scripts

- The custom sequence can be defined in the `loop` function.

* Create script for SRing for 0 Atk IVs on gift Poipole

* Update custom script template file with more tunability and instructions

* Fix linting errors

* Fix linting error

* Fix for ball numbers sometimes being read as letters

- Most common example is `A` being substituted for `4`

* Update version code

* Tweak catch dialogue rectangles

* Pa bot base testing (#131)

* Add handler for corrupted command message

* Try improving error handling

* Update automaxlair/PABotBase_controller.py

Co-authored-by: DOTTEL Gaël <[email protected]>

* Update automaxlair/PABotBase_controller.py

Co-authored-by: DOTTEL Gaël <[email protected]>

Co-authored-by: ercdndrs <[email protected]>
Co-authored-by: ercdndrs <[email protected]>

* Clean up assertions and linting errors

* Fix handler for rare invalid message event

* Add link to wiki

* Add a regi hunting program (#130)

* add tests for python 3.9

* fix reset count for gift pokemon

* add a regi hunting program

* fix the guides for gift pokemon and regis

* fix display of informations for auto gift and regis

* adding the backbones of calyrex auto hunt

* Add more thorough debugging for the PABotBase interface

* Fix typo in error code

* Un"fix" "typo"

* Fix "Catch" dialogue detection

- Fixed issue where the saturation threshold was too stringent for some capture cards

* Reduced level of PABB_MSG_ERROR_WARNING to DEBUG

* Update README.md

* Update README.md

* Update README.md

* Fix typo

* Update README.md

* Split changelog from README.md

* Split changelog into changelog.md

* fix boss index setting with the UI (#132)

* Update README.md

* Update README.md

* Fix linting errors

* Minor bug fixes

* Update dependencies (#134)

* Update pokesprite

* update data

* Update changelog.md

* Update version code

* Update default settings

- Use PABotBase by default
- Use `DEFAULT` mode by, well, default

* Remove TODO section

- These minor improvement suggestions are already covered in the Issues page

* Add PABotBase as submodule

* Update README.md

* add CI and force to max cores (#135)

Co-authored-by: pifopi <[email protected]>
Co-authored-by: denvoros <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: Augustin-De-Piante <[email protected]>
Co-authored-by: TeachingGame <[email protected]>
Co-authored-by: Sollisnexus <[email protected]>
pifopi added a commit that referenced this pull request Jun 6, 2021
* Adjust color thresholds

- Fix issue where some language/capture card combinations got stuck on the Catch screen
- Fix issue where some language/capture card combinations did not accurately read text in the bottom dialogue box

* Update da_controller.py

* Update release candidate in preparation for final testing (#36)

* convert ini file to toml, small changes to logs and discord

* fixing the expected stats to work with new list system

* fix for the stats to allow multiple in search

* fixing the example stat lists

* adding the placeholder information for the weather and terrain

* small updates including removing int casting and ball selection

* Clean-up refactor

* Update Config.sample.toml with path for french

* Add tool for testing image thresholding

* Adjust color thresholds

- Fix issue where some language/capture card combinations got stuck on the Catch screen
- Fix issue where some language/capture card combinations did not accurately read text in the bottom dialogue box

Co-authored-by: denvoros <[email protected]>

* Update version tag

* Tweak timings for scrolling through den

* don't update ui on screenshot, optional image discord

* update weather/terrain sentences (thanks to nobody!)

* Add more capture card delay corrections

* Add more capture card delay corrections

* Change button hold time rounding

- Use `round()` instead of `int()`

* Change button hold time rounding

- Use `round()` instead of `int()`

* Updating Discord Webhook Embeds to Be Pretty and Start from Grip Screen (#41)

* Add more capture card delay corrections

* adding improved discord messages, start from grip screen

* attribution to pokemondb.net for images

* add thumbnail and properly handle found shinies

* Update auto_max_lair.py, fix for original starting position

Co-authored-by: ercdndrs <[email protected]>

* catch webhook sending incase an error occurs

* add tiemstamp to the discord embed

Co-authored-by: ercdndrs <[email protected]>
Co-authored-by: ercdndrs <[email protected]>

* Fix text reading issue on some capture cards

* fixing timestamp location to embed

* fixing location of timestamp on discord embed

* Update requirements to accommodate different Python versions

* Increase delay before battle start

- Helps prevent occasional crashes

* Update Config.sample.toml

* ping the user when the find path mode end

* Default to no Discord messages

- Prevents a crash when the user doesn't configure the Discord section

* calc a modifier based on the weather

* Add terrain support

* Prepare for teammate reading

- Add rectangles for teammate sprites
- Add rectangles for HP bars
- Save sprite images to supplement online sprites

* Fix timing bug

* add terrain pulse

* VS Project of the UI

includes the whole project plus a README.txt where you can find a link to a compiled version for easy use

* Update README.txt

* Fix bug with image numbering

* Fix the number of wins/runs sent to discord

* Fixed some string to int issues, fixed multiple stats, removed .txt

* Update README.txt

* Teammate detection (#69)

* Implement team detection using sprites

- The four Pokemon comprising the team are read by matching the shape of their sprite to stored images.
- This action is performed on entering the den for the first time and after any stage that could result in a change of Pokemon (catch, scientist).

* Update HP rectangles

* Tweak sprites and add more reporting

* Improve config validation

* reduce the duration of the scrolling while reading the den paths

* fix some linting errors

* add more asserts to check config values

* fix the stats checking feature

* fix some more linting errors

* Added hints, etc.

- Added hints to the selections
- Checks if Config.toml exists, if not uses Config.samle.toml and creates Config.toml
- Have a button that opens the explorer to select Tesseract path

* shorten the death sleep to let the both detect weather changes afterward

* fix some more linting errors

* add a script to pickle balls names in every language

* use ball id instead of ball names in the config file

* Improve teammate detection

- Use colour images instead of binary black and white sprites
- Update timing to avoid "identifying" Pokemon during good a stage transition
- Fix some linting errors (long lines)

* Tweak teammate rectangles

* add informations for find path

* Detect "Fight" and "Cheer" by template matching

* Tweak Fight and Cheer detection

* updating pickle files

* Change button hold notation

- Old method (float seconds) was misleading due to rounding
- New method uses integer (USB ticks/10) inputs which is more clear

* Import sprites from pokesprite

- Use scaled images from pokesprite to build pokemon_sprites.pickle as opposed to locally saved (and untracked) images

* Apply suggestions from code review

Co-authored-by: ercdndrs <[email protected]>

* remove 'ball' from ball names in different languages

* Added validation

There is still one error, if both balls are the same and you input a string and not a number

* Update README.txt

* move balls to da controller

* Validation fixes, file cleanup, ball changes, pokemon changes

- fixed the error with the validation
- deleted unnecessary files
- changed the balls to fit the presets
- changed the pokemon
-updated README.txt

* Use team in decision whether to take a new Pokemon

* validation hot fix

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* lenghten second scrolling

* Update pokemon_sprites.pickle

* no longer log empty lines

* fix linting errors

* add a maximum ore cost to the config file

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* fix linting error

* fix linting error

* Hot fixes for the UI (#86)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Hot fix battle start delay

- Reduces the chance of false battle end detection.

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Latest changes to team detection (#79)

* Merge latest from beta (#78)

* reduce the duration of the scrolling while reading the den paths

* fix some linting errors

* add more asserts to check config values

* fix the stats checking feature

* fix some more linting errors

* shorten the death sleep to let the both detect weather changes afterward

* fix some more linting errors

* add a script to pickle balls names in every language

* use ball id instead of ball names in the config file

* add informations for find path

* updating pickle files

* Apply suggestions from code review

Co-authored-by: ercdndrs <[email protected]>

* remove 'ball' from ball names in different languages

* move balls to da controller

Co-authored-by: pifopi <[email protected]>

* Use teammates and remaining minibosses in decisions

- Check whether teammates would benefit more from each caught miniboss, instead of only considering the bot's score
- Narrow down the list of potential minibosses you might face given the target path and previously encountered Pokemon

* Adjust scores based on Pokemon HP

- HP is not yet read immediately following a battle, which would make this change more useful
- Also cleaned up printing of the path and added more reporting on team detection

* Detect team HP after catching a miniboss

- Not completely validated yet

* Check for the fight symbol during detect stage

- This check should fix an issue where slow computers fail to detect the start of a battle

* Update version code

* Fix missing space in comment

Co-authored-by: pifopi <[email protected]>

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* Added Themes to the UI: Dark & Light + CI pipeline workflow (#93)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* fixed problem causing .exe to crash on save

- getting max dynite ore value AsInteger
- some minor code cleanup

* Update AutoMaxLair.csproj

* Update CI/CD pipeline (#94)

* update CI/CD

* fix linting issues

* update readme

* update weather/terrain detection for french language

* Update Config.sample.toml

* add AutoMaxLair.exe to the gitignore

* activate again the debug symbols

* fix the UI crash

* Use variable battle start delay

- Static delay time sometimes led to transitioning into the main battle loop before the black screen had disappeared, resulting in a hang.

* Update da_controller.py

Added key pair to the output array to include the count of consecutive resets.

* Update pause at the start of a battle

- Use a combination of the initial static delay and variable additional delay

* Fix hsv computations (#96)

* Default to no Discord messages

- Prevents a crash when the user doesn't set up the Discord section

* quickfix for adding already HSV flag on check HSV match

Co-authored-by: ercdndrs <[email protected]>
Co-authored-by: denvoros <[email protected]>

* Hunt NonLegends (#98)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* - Use color analysis to detect backpacker

- Uses the solid blue background of the item selection screen
- Also fix some linting errors

* Fix backpacker blue rectangle

* fix crash while printing a warning

* use the comments from the config file to generate tooltips

* fix the default path for tesseract

* add draft of japanese translation (thanks to Ryder and MaruBatsu)

* no longer hardcode ball list and pokemon list

* shorten the wait after skipping the catch on ball saver

* fix the video index picker (pick the right index and pre pick the camera from the index)

* fix rectangle detection size

* fix missing HSV bool

* Fix backpacker rectangle and display

* Fix Spanish language data file name

* updates to discord embeds: ping by level and good colors (#99)

* updates to discord embeds: ping by level and good colors

* remove image saving from script

* add attribution for palette value

* linting fixes

* add discord color collection to build script

* Create detailed_log.py (#82)

* Create detailed_log.py

Log file that returns non legend shiny names and global legend odds

* Update detailed_log.py

* Update detailed_log.py

* Update detailed_log.py

* show win rate as percentage

* fix the assert for discord levels

* update the UI to manage new pinging levels for discord

* update the japanese translation (thanks Ryder)

* update the spanish translation (thanks Dainbrage)

* delete backpacker sentences now it is detected with the blue background

* change the message before the end of find path to critical

* fix gastrodon sprite (we were using the pink instead of the blue one)

* update spanish translation (thanks dainbrage)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update Config.sample.toml

* Update Config.sample.toml

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Update Config.sample.toml

Co-authored-by: DOTTEL Gaël <[email protected]>

* Update Config.sample.toml

Co-authored-by: DOTTEL Gaël <[email protected]>

* Update Config.sample.toml

* Update auto_max_lair.py

* Update German FAINT phrase

* Update Config.sample.toml

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Black screen detection test (#110)

* Improve black screen detection

- Use less stringent brightness threshold but add a uniformity requirement

* Fix value stddev check

* Add framework for detecting ball sprites (#111)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

Co-authored-by: DOTTEL Gaël <[email protected]>

* Increase delay after a faint is detected

- A delay of 3 seconds sometimes resulted in one faint message being read twice

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Update scientist timings

* Tweak scientist timings

* Remove alpha channel of ball sprite images

* Ball template matching (#112)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Remove alpha channel of ball sprite images

Co-authored-by: DOTTEL Gaël <[email protected]>

* fix the ore count when you're kicked out of the den without catching any pokemon

* Updated the UI

added:
- FIND_PATH_WINS
- NON_LEGEND

fixed:
- missing changes with Light-Theme

* Show ball sprite rectangle

* Fix ball sprite detection rectangle

* Find path like ball saver not strong boss (#116)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Improve the log summary (#115)

* Delete log_summary.py

* Use filename timestamp to order bosses

Bosses will be ordered by filename timestamp (from oldest to newest)

* increase the timer after the scientist

* Allow AutoMaxLair to be used with the PABotBase hex file (#117)

* Initial commit of framework

- Not functional yet

* Fix CRC calculation and implement reset protocol

* Start implementing command translations between protocols

* Update with latest progress

* Initial working version

- To use, enable PABOTBASE_HEX in the configuration file

* Delete CRC_sandbox.py

* Fix linting errors

* Update requirements.txt

* Formatting and documentation fixes

* Flip to new ball detection method (#119)

* Rebase ball-template-matching (#118)

* Update AutoMaxLair.cs

* Some hot fixes

* Update AutoMaxLair.Designer.cs

* Some code fixes

-Comments will be now copied
- balls will be selected to the one saved
- added "Find Path"
- some minor design changes

* Added an option to change from dark theme to light theme

* Create dotnet.yml

* Revert "Create dotnet.yml"

This reverts commit 9ce739a.

* Create dotnet-core.yml

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.Designer.cs

* Update AutoMaxLair.csproj

* Update dotnet-core.yml

* Update dotnet-core.yml

* dotnet only publishes executable

* Added maximum Dynite Ore cost & missing designer parts

* Updated the themes

* Update README.txt

* fixed problem causing .exe to crash on save

- getting max dynite ore value AsInteger
- some minor code cleanup

* Update AutoMaxLair.csproj

* Ball template matching (#112)

* Add framework for detecting ball sprites

- Debug mode will now print the ball sprite it detects while still using OCR for decisions

* Fix typo

* Fix typo

Co-authored-by: DOTTEL Gaël <[email protected]>

* Add foundation for reading ball numbers

- Set up framework for reading and assigning the number of base and legendary balls.
- The previous accounting method is still used and the new method is simply logged for verification.

* Formatting fixes

* Fix error

* Remove alpha channel of ball sprite images

Co-authored-by: DOTTEL Gaël <[email protected]>

* fix the ore count when you're kicked out of the den without catching any pokemon

* Updated the UI

added:
- FIND_PATH_WINS
- NON_LEGEND

fixed:
- missing changes with Light-Theme

* Show ball sprite rectangle

* Fix ball sprite detection rectangle

* Find path like ball saver not strong boss (#116)

* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py

* Improve the log summary (#115)

* Delete log_summary.py

* Use filename timestamp to order bosses

Bosses will be ordered by filename timestamp (from oldest to newest)

* increase the timer after the scientist

* Allow AutoMaxLair to be used with the PABotBase hex file (#117)

* Initial commit of framework

- Not functional yet

* Fix CRC calculation and implement reset protocol

* Start implementing command translations between protocols

* Update with latest progress

* Initial working version

- To use, enable PABOTBASE_HEX in the configuration file

* Delete CRC_sandbox.py

* Fix linting errors

* Update requirements.txt

* Formatting and documentation fixes

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>

* Switch to using new ball detection method

* Remove old code

- Remove code pertaining to ball numbers in the config file
- Fix code referring to old method of storing ball numbers

* Update PABotBase source url

* Fix boss and ball assertions

Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: DOTTEL Gaël <[email protected]>
Co-authored-by: TeachingGame <[email protected]>

* Update da_controller.py (#121)

Co-authored-by: ercdndrs <[email protected]>

* Update README.md

* Add more acknowledgements
* Add a few more additions to the changelog

* Allow multiple PABotBase protocol versions

* fix the UI after the removal of ball count

* Beta (Forgot a section) (#123)

* Update da_controller.py

* Update da_controller.py

Co-authored-by: ercdndrs <[email protected]>

* hotfix for losing without seeing balls, autoformat

* Update version code

* Hotfix for end of run crash

* Force debug logging to the log file

* Enable debug logs by default while in beta

* fix ball name in the UI

* add a checkbox for PABotBase hex and remove validation for discord

* fix copy paste error

* Custom script template (#129)

* Add template for creating custom scripts

- The custom sequence can be defined in the `loop` function.

* Create script for SRing for 0 Atk IVs on gift Poipole

* Update custom script template file with more tunability and instructions

* Fix linting errors

* Fix linting error

* Fix for ball numbers sometimes being read as letters

- Most common example is `A` being substituted for `4`

* Update version code

* Tweak catch dialogue rectangles

* Pa bot base testing (#131)

* Add handler for corrupted command message

* Try improving error handling

* Update automaxlair/PABotBase_controller.py

Co-authored-by: DOTTEL Gaël <[email protected]>

* Update automaxlair/PABotBase_controller.py

Co-authored-by: DOTTEL Gaël <[email protected]>

Co-authored-by: ercdndrs <[email protected]>
Co-authored-by: ercdndrs <[email protected]>

* Clean up assertions and linting errors

* Fix handler for rare invalid message event

* Add link to wiki

* Add a regi hunting program (#130)

* add tests for python 3.9

* fix reset count for gift pokemon

* add a regi hunting program

* fix the guides for gift pokemon and regis

* fix display of informations for auto gift and regis

* adding the backbones of calyrex auto hunt

* Add more thorough debugging for the PABotBase interface

* Fix typo in error code

* Un"fix" "typo"

* Fix "Catch" dialogue detection

- Fixed issue where the saturation threshold was too stringent for some capture cards

* Reduced level of PABB_MSG_ERROR_WARNING to DEBUG

* Update README.md

* Update README.md

* Update README.md

* Fix typo

* Update README.md

* Split changelog from README.md

* Split changelog into changelog.md

* fix boss index setting with the UI (#132)

* Update README.md

* Update README.md

* Fix linting errors

* Minor bug fixes

* Update dependencies (#134)

* Update pokesprite

* update data

* Update changelog.md

* Update version code

* Update default settings

- Use PABotBase by default
- Use `DEFAULT` mode by, well, default

* Remove TODO section

- These minor improvement suggestions are already covered in the Issues page

* Add PABotBase as submodule

* Update README.md

* add CI and force to max cores (#135)

Co-authored-by: pifopi <[email protected]>
Co-authored-by: denvoros <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: PrincessVika <[email protected]>
Co-authored-by: Augustin-De-Piante <[email protected]>
Co-authored-by: TeachingGame <[email protected]>
Co-authored-by: Sollisnexus <[email protected]>
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.

[Feature request] smart mode to keep path if the win rate is good enough
3 participants