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

Update EggHatcher_Core.c #438

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Vardan2210
Copy link

Updated and added some delays to make it funtion better with Pokemon SV after the new Update which caused the game to become quite laggy.

Updated and added some delays to make it funtion better with Pokemon SV after the new Update which caused the game to become quite laggy.
@Mysticial Mysticial requested a review from NympheaR June 1, 2024 19:52
Made it so that the program first flies to the gate automatically to combat any positioning errors that might be made due to stick drift in the controllers
running it for 3 consective days straight showed that after a while the game starts to lag while closing the boxes when getting the eggs, intefering with closing it properly and subsequently causing the loop to not function properly resulting in unhatched eggs. A simple wait function before closing the boxes seems to fix it for the most part.
After the discord discussion, changed the main loop altogether which overrides the crouching problem.
@Vardan2210
Copy link
Author

The steps that the rider takes is also being inherently multiplied by a multiplier of 1.9 since without it eggs weren’t hatching properly.

NativePrograms/PokemonSV/Programs/EggHatcher_Core.c Outdated Show resolved Hide resolved
pbf_press_dpad(DPAD_RIGHT, 20, 400);
pbf_press_button(BUTTON_MINUS, 20, 400);
pbf_wait(400);
for (int i = 0; i < 60; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

It was there before but I do not get what this is doing. Why not multiply 5 by 60? Wouldn't it do the same ? And also allow to merge the wait at the end?

Copy link
Author

Choose a reason for hiding this comment

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

Honestly same, I just saw that it was used to select the row of pokemon and it was working pretty well so didn't want to touch anything...I just increased its duration because in some instances 40 wasn't cutting it. I can try to just put the timer as 300 in the press dpad function. Though my hunch is they wanted to repeatedly press it instead of holding due to some weird interaction with the game.

NativePrograms/PokemonSV/Programs/EggHatcher_Core.c Outdated Show resolved Hide resolved
pbf_press_button(BUTTON_MINUS, 20, 100);
for (int i = 0; i < 40; i++) {
pbf_press_button(BUTTON_MINUS, 20, 300);
for (int i = 0; i < 60; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Same here for the if and wait

merged the wait statements with the previous lines, but ddidn't change the for loop to not mess with how it interacts with the game..
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