Skip to content

Pokopia Palette Town Reset#1185

Open
GnidGnaw wants to merge 3 commits intoPokemonAutomation:mainfrom
GnidGnaw:main
Open

Pokopia Palette Town Reset#1185
GnidGnaw wants to merge 3 commits intoPokemonAutomation:mainfrom
GnidGnaw:main

Conversation

@GnidGnaw
Copy link
Copy Markdown

add program for Pokopia Palette Town Reset with neutral time skip

add program for Pokopia Palette Town Reset with neutral time skip
@azure-pipelines
Copy link
Copy Markdown

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

@@ -1,2805 +1,2818 @@
# This CMake file defines all the code file paths as the CMake variables
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.

What did you do this file?

Comment thread SerialPrograms/Source/PokemonPokopia/Programs/PokemonPokopia_PaletteReset.cpp Outdated
@Mysticial
Copy link
Copy Markdown
Collaborator

@Ericzklm is the only person who can review this since no other dev plays Pokopia.

In the meantime, can you fix the changes to the cmake file?

Comment on lines +93 to +101
pbf_press_button(context, BUTTON_A, 160ms, 840ms);
pbf_press_button(context, BUTTON_A, 48ms, 24ms);//month
pbf_move_left_joystick(context, {0,-1}, 48ms, 24ms);
pbf_press_button(context, BUTTON_A, 48ms, 24ms);//day
pbf_press_button(context, BUTTON_A, 48ms, 24ms);//year
pbf_press_button(context, BUTTON_A, 48ms, 24ms);//hour
pbf_press_button(context, BUTTON_A, 48ms, 24ms);//minute
pbf_press_button(context, BUTTON_A, 48ms, 24ms);//am-pm
pbf_press_button(context, BUTTON_A, 160ms, 840ms);
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.

This may be different for different locales. The NintendoSwitch/Programs/DateSkip area should have routines to abstract this


//start in game facing a PC, with the A button visible,
for (uint32_t c = 0; c < SKIPS; c++){
env.log("Resets: " + tostr_u_commas(c));
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.

The resets can be added as a program stat

Comment on lines +75 to +79
access_pc_from_overworld(env.console, context, true);
env.console.log("Opened Cloud Island PC menu");
pbf_wait(context, 2000ms);

Stamp todays_stamp = get_stamp(env.console, context, TODAYS_STAMP_BOX);
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.

This would break if the user already opened the PC once today since the stamp card would not automatically pop up

access_pc_from_overworld(env.console, context, true);
env.console.log("Opened Cloud Island PC menu");
pbf_wait(context, 2000ms);

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.

Minor non-gating suggestion: It may be worthwhile to add some logic to detect that the stamp card is actually open before get_stamp(). Possibly by using a watcher for SelectionArrowDetector on ADD_STAMP_BOX.

Having some detection here would stop the program from trailing off in an unknown state in case of something unexpected or setup error (ie. forgetting to pick up Ditto flag). get_stamp() does not distinguish between "not a ditto stamp" and "this isn't even a stamp at all"

for (uint32_t c = 0; c < SKIPS; c++){
env.log("Resets: " + tostr_u_commas(c));

wait_for_overworld(env.console, context);
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.

screenshot-20260421-232749398234

If there's an event happening, this extra dialog appears which breaks the flow. I think it's safe to pbf_mash_button() and attach the overworld watcher

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants