Skip to content

Add day/night detection and weather detection to za benchsit#1177

Open
Developer-Butters wants to merge 10 commits intoPokemonAutomation:mainfrom
Developer-Butters:add-day-night-to-za-bench
Open

Add day/night detection and weather detection to za benchsit#1177
Developer-Butters wants to merge 10 commits intoPokemonAutomation:mainfrom
Developer-Butters:add-day-night-to-za-bench

Conversation

@Developer-Butters
Copy link
Copy Markdown
Contributor

This PR adds a new Day/Night detector for Pokémon Legends: Z-A and integrates it into the Bench Sit shiny hunting program. I also added weather detection from the weather finder.

The detector samples color data directly from the main map to determine if the cycle is day or night.

The Bench Sit program now allows the user to define specific weather and time conditions before the character runs forward. this should allow the user to more effectively shiny hunt specific Pokemon like Lucario.

Created a day/night detection program that looks for the crecent moon on
the minimap.

added logic to bench sit to allow the user to only run forward during
specifically day/night and specific weather patterns.
updated the window formatting and locked the filters while running
because I don't want them to break somehow.
updated the detector to detect the color change on the left side of the
main map. the color is dependent on the day night cycle. updated bench
sit to use both weather and day/night detection to improve shiny farming
rates of different pokemon.
my initial commits had a memory issue. these changes fix that.
"PokemonLZA:ShinyHunt-BenchSit",
STRING_POKEMON + " LZA", "Bench Sit",
"Programs/PokemonLZA/ShinyHunt-BenchSit.html",
"Shiny hunt by repeatedly sitting on a bench to reset spawns.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you disable your code formatter? It really likes to mess everything up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, I'll go grab the original file this evening and re-add my code once I disable. I tried to fix it manually last night but it didn't work and it was too late for me to keep changing stuff

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed the formatting with the most recent push, but I need to do more testing to confirm some errors relating to the detector. for some reason the detector appears to be moving off the screen and causing a memory issue. Marking this PR as a draft for the time being.

Copied and pasted the original benchsit programs to the local repo to
try to fix formatting. will confirm with diff on github.

updated the detector to more clearly define day vs night

added to the open menu portion of the detection functions a push left
all the way so that the detector accurately detects the color of the
border and doesn't get a false positive day or night.

made the detector square persistent for testing purposes.
@Developer-Butters Developer-Butters force-pushed the add-day-night-to-za-bench branch from 76e02de to b3837b5 Compare April 15, 2026 22:00
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@Developer-Butters Developer-Butters marked this pull request as draft April 15, 2026 22:10
refined the detector and removed some debugging tools
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@Developer-Butters
Copy link
Copy Markdown
Contributor Author

I ran the program for about 8 hours and didn't get the QT creator crash I had been getting before, so I believe this is ready for review.

@Developer-Butters Developer-Butters marked this pull request as ready for review April 16, 2026 21:33
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.

2 participants