From 97a92dcecfcffe9fd11aed75c161b0b4bbed6dc6 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 9 Oct 2025 18:37:36 -0700 Subject: [PATCH 1/4] checkpoint 58 and 59. --- .../AutoStory/PokemonSV_AutoStory.cpp | 5 +- .../PokemonSV_AutoStory_Segment_24.cpp | 42 --- .../PokemonSV_AutoStory_Segment_24.h | 26 -- .../PokemonSV_AutoStory_Segment_25.cpp | 243 +++++++++++++++++- .../PokemonSV_AutoStory_Segment_25.h | 27 ++ SerialPrograms/SourceFiles.cmake | 10 + 6 files changed, 279 insertions(+), 74 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 1dd9f3d719..78f397ff59 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -95,7 +95,7 @@ std::vector> make_autoStory_segment_list(){ segment_list.emplace_back(std::make_unique()); segment_list.emplace_back(std::make_unique()); segment_list.emplace_back(std::make_unique()); - // segment_list.emplace_back(std::make_unique()); + segment_list.emplace_back(std::make_unique()); // segment_list.emplace_back(std::make_unique()); // segment_list.emplace_back(std::make_unique()); // segment_list.emplace_back(std::make_unique()); @@ -846,6 +846,7 @@ void AutoStory::test_code(SingleSwitchProgramEnvironment& env, ProControllerCont if (ENABLE_TEST_CHECKPOINTS){ // test individual checkpoints test_checkpoints(env, env.console, context, START_CHECKPOINT, END_CHECKPOINT, LOOP_CHECKPOINT, START_LOOP, END_LOOP); + GO_HOME_WHEN_DONE.run_end_of_program(context); return; } @@ -882,7 +883,7 @@ void AutoStory::program(SingleSwitchProgramEnvironment& env, ProControllerContex // test code - if (ENABLE_TEST_CHECKPOINTS || ENABLE_TEST_REALIGN || ENABLE_MISC_TEST || TEST_PBF_LEFT_JOYSTICK || TEST_PBF_LEFT_JOYSTICK2 || TEST_CHANGE_DIRECTION || TEST_CURRENT_DIRECTION){ + if (TEST_FLYPOINT_LOCATIONS || TEST_MOVE_CURSOR_OFFSET_FROM_FLYPOINT || ENABLE_TEST_CHECKPOINTS || ENABLE_TEST_REALIGN || ENABLE_MISC_TEST || TEST_PBF_LEFT_JOYSTICK || TEST_PBF_LEFT_JOYSTICK2 || TEST_CHANGE_DIRECTION || TEST_CURRENT_DIRECTION){ test_code(env, context); return; } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp index 1ed85e0518..c205c3e3ef 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp @@ -326,48 +326,6 @@ void checkpoint_57( } -void checkpoint_58( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - -void checkpoint_59( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - -void checkpoint_60( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h index 7c811513e3..d8bd3034eb 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h @@ -54,32 +54,6 @@ void checkpoint_57( AutoStoryStats& stats ); -// start: -// end: -void checkpoint_58( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_59( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_60( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp index 96089c204d..72814da71d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp @@ -4,6 +4,9 @@ * */ +#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h" +#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" + #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonTools/Async/InferenceRoutines.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" @@ -28,15 +31,15 @@ namespace PokemonSV{ std::string AutoStory_Segment_25::name() const{ - return ""; + return "25: Team Star (Poison)"; } std::string AutoStory_Segment_25::start_text() const{ - return "Start: "; + return "Start: Beat Orthworm Titan. At East Province (Area Three) Pokecenter."; } std::string AutoStory_Segment_25::end_text() const{ - return "End: "; + return "End: Beat Team Star (Poison). At Medali Pokecenter."; } void AutoStory_Segment_25::run_segment( @@ -52,13 +55,245 @@ void AutoStory_Segment_25::run_segment( context.wait_for_all_requests(); env.console.log("Start Segment " + name(), COLOR_ORANGE); - // checkpoint_(env, context, options.notif_status_update, stats); + checkpoint_58(env, context, options.notif_status_update, stats); + checkpoint_59(env, context, options.notif_status_update, stats); + checkpoint_60(env, context, options.notif_status_update, stats); context.wait_for_all_requests(); env.console.log("End Segment " + name(), COLOR_GREEN); } +void checkpoint_58( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + context.wait_for_all_requests(); + + // marker 1 {0.795312, 0.626852} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::FAST_TRAVEL, + {0.795312, 0.626852} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 20, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 128, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 2 {0.672396, 0.532407} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.672396, 0.532407} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_DIALOG, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 20, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 128, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // speak to Clive + mash_button_till_overworld(env.console, context, BUTTON_A); + + // marker 3 {0.685417, 0.571296} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.685417, 0.571296} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_DIALOG, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 20, 20, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 128, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // battle Team Star Grunt + clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::PROMPT_DIALOG, CallbackEnum::DIALOG_ARROW, CallbackEnum::BATTLE}); + env.console.log("Battle team star grunt."); + run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); + mash_button_till_overworld(env.console, context, BUTTON_A); + + }); + +} + +void checkpoint_59( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + context.wait_for_all_requests(); + do_action_and_monitor_for_battles(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 40, 255, 50); + walk_forward_while_clear_front_path(env.program_info(), env.console, context, 100); + walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A); + } + ); + clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG}); + + AdvanceDialogWatcher dialog(COLOR_RED); + int ret = run_until( + env.console, context, + [&](ProControllerContext& context){ + + DirectionDetector direction; + uint16_t seconds_wait = 8; // todo: change back to 6-8 + + direction.change_direction(env.program_info(), env.console, context, 2.618972); + pbf_move_left_joystick(context, 128, 0, 100, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + + direction.change_direction(env.program_info(), env.console, context, 3.265261); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.411131); + pbf_move_left_joystick(context, 128, 0, 400, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + + direction.change_direction(env.program_info(), env.console, context, 2.828856); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.306254); + pbf_move_left_joystick(context, 128, 0, 500, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.565727); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 3.036098); + pbf_move_left_joystick(context, 128, 0, 400, 50); + + direction.change_direction(env.program_info(), env.console, context, 3.525225); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 4.051901); + pbf_move_left_joystick(context, 128, 0, 700, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 4.573712); + pbf_move_left_joystick(context, 128, 0, 500, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + // wait 30 seconds to let the trainers cooldown + pbf_wait(context, 30 * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 1.310148); + pbf_move_left_joystick(context, 128, 0, 800, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + direction.change_direction(env.program_info(), env.console, context, 0.572754); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_move_left_joystick(context, 128, 0, 700, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 6.036137); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 5.779599); + pbf_move_left_joystick(context, 128, 0, 400, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 600, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + pbf_wait(context, 10 * TICKS_PER_SECOND); + + }, + {dialog} + ); + context.wait_for(std::chrono::milliseconds(100)); + if (ret < 0){ + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "Team Star Poison: Failed to kill 30 pokemon with Let's go.", + env.console + ); + } + clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW}); + env.console.log("Battle the Team Star (Poison) boss."); + run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); + mash_button_till_overworld(env.console, context, BUTTON_A, 360); + + }); + +} + +void checkpoint_60( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + // fly back to Porto Marinada Pokecenter + // move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, 0, 0, 0}, FlyPoint::FAST_TRAVEL); + + }); + +} + + + } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h index b462ad20a7..e4160ebf52 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h @@ -26,6 +26,33 @@ class AutoStory_Segment_25 : public AutoStory_Segment{ ) const override; }; +// start: Beat Orthworm. At East Province (Area Three) Pokecenter. +// end: Beat team star grunt. At gate of Team Star (Poison) base. +void checkpoint_58( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: Beat team star grunt. At gate of Team Star (Poison) base. +// end: Beat Team Star (Poison) +void checkpoint_59( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: Beat Team Star (Poison) +// end: At Medali Pokecenter. +void checkpoint_60( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + diff --git a/SerialPrograms/SourceFiles.cmake b/SerialPrograms/SourceFiles.cmake index 38ffc67a43..1ab43031c6 100644 --- a/SerialPrograms/SourceFiles.cmake +++ b/SerialPrograms/SourceFiles.cmake @@ -1794,6 +1794,16 @@ file(GLOB LIBRARY_SOURCES Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOption.cpp Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOption.h Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOptionDatabase.cpp From 98ece05666f70c28746f7a9be1d705796d790805 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 9 Oct 2025 22:00:56 -0700 Subject: [PATCH 2/4] update realign_player_from_landmark() and move_cursor_towards_flypoint_and_go_there() to re-try with different push_scale on different attempts. --- .../AutoStory/PokemonSV_AutoStoryTools.cpp | 233 +++--------------- .../AutoStory/PokemonSV_AutoStoryTools.h | 2 - 2 files changed, 36 insertions(+), 199 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index 946524d168..0bbeab506a 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -851,6 +851,12 @@ void realign_player_from_landmark( stream.log("Realigning player direction, using a landmark..."); WallClock start = current_time(); + const int MAX_TRY_COUNT = 17; + int try_count = 0; + + // failures to fly to pokecenter are often when the Switch lags. from my testing, a 1.4-1.5 adjustment factor seems to work + const std::array adjustment_table = {1, 1.4, 1, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 0.9, 0.8, 1.4}; // {1, 1.4, 1.5}; + while (true){ if (current_time() - start > std::chrono::minutes(5)){ OperationFailedException::fire( @@ -888,7 +894,8 @@ void realign_player_from_landmark( pbf_move_left_joystick(context, move_x1, move_y1, move_duration1, 1 * TICKS_PER_SECOND); // move cursor to pokecenter - if (!detect_closest_flypoint_and_move_map_cursor_there(info, stream, context, FlyPoint::POKECENTER, 0.29)){ + double push_scale = 0.29 * adjustment_table[try_count]; + if (!detect_closest_flypoint_and_move_map_cursor_there(info, stream, context, FlyPoint::POKECENTER, push_scale)){ OperationFailedException::fire( ErrorReport::SEND_ERROR_REPORT, "realign_player_from_landmark(): No visible pokecenter found on map.", @@ -932,8 +939,16 @@ void realign_player_from_landmark( }catch (UnexpectedBattleException&){ run_wild_battle_press_A(stream, context, BattleStopCondition::STOP_OVERWORLD); }catch (OperationFailedException&){ - // reset to overworld if failed to center on the pokecenter, and re-try - leave_phone_to_overworld(info, stream, context); + try_count++; + if (try_count >= MAX_TRY_COUNT){ + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "fly_to_closest_pokecenter_on_map(): At min warpable map level, pokecenter was detected, but failed to fly there.", + stream + ); + } + stream.log("Failed to find the fly menu item. Restart the closest Pokecenter travel process."); + press_Bs_to_back_to_overworld(info, stream, context); } } @@ -966,6 +981,12 @@ void move_cursor_towards_flypoint_and_go_there( ){ WallClock start = current_time(); + const int MAX_TRY_COUNT = 17; + int try_count = 0; + + // failures to fly to pokecenter are often when the Switch lags. from my testing, a 1.4-1.5 adjustment factor seems to work + const std::array adjustment_table = {1, 1.4, 1, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 0.9, 0.8, 1.4}; // {1, 1.4, 1.5}; + while (true){ if (current_time() - start > std::chrono::minutes(5)){ OperationFailedException::fire( @@ -1002,7 +1023,8 @@ void move_cursor_towards_flypoint_and_go_there( uint16_t move_duration1 = move_cursor_near_flypoint.move_duration; pbf_move_left_joystick(context, move_x1, move_y1, move_duration1, 1 * TICKS_PER_SECOND); - if (!fly_to_visible_closest_flypoint_cur_zoom_level(info, stream, context, fly_point)){ + double push_scale = 0.29 * adjustment_table[try_count]; + if (!fly_to_visible_closest_flypoint_cur_zoom_level(info, stream, context, fly_point, push_scale)){ OperationFailedException::fire( ErrorReport::SEND_ERROR_REPORT, "move_cursor_towards_flypoint_and_go_there(): No visible pokecenter found on map.", @@ -1015,8 +1037,16 @@ void move_cursor_towards_flypoint_and_go_there( }catch (UnexpectedBattleException&){ run_wild_battle_press_A(stream, context, BattleStopCondition::STOP_OVERWORLD); }catch (OperationFailedException&){ - // reset to overworld if failed to center on the pokecenter, and re-try - leave_phone_to_overworld(info, stream, context); + try_count++; + if (try_count >= MAX_TRY_COUNT){ + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "move_cursor_towards_flypoint_and_go_there(): At given zoom level, pokecenter was detected, but failed to fly there.", + stream + ); + } + stream.log("Failed to find the fly menu item. Restart the closest Pokecenter travel process."); + press_Bs_to_back_to_overworld(info, stream, context); } } @@ -1122,197 +1152,6 @@ void checkpoint_reattempt_loop_tutorial( } } -void move_from_porto_marinada_to_medali(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ - context.wait_for_all_requests(); - - // marker 1 - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 255, 110, 75); - - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 40, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 255, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 2. x=0.3875, y=0.60463 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.3875, 0.60463} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 40, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 0, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - - // marker 3. : x=0.316146, y=0.623148 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.316146, 0.623148} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 40, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 0, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - get_on_ride(env.program_info(), env.console, context); - - // marker 4. cross bridge 1 x=0.310417, y=0.712963. - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.310417, 0.712963} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 20, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); - pbf_controller_state(context, BUTTON_B, DPAD_NONE, 128, 0, 128, 128, 1000ms); - pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - get_off_ride(env.program_info(), env.console, context); - - - // marker 5. : x=0.582292, y=0.692593 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.582292, 0.692593} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 60, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 0, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - get_on_ride(env.program_info(), env.console, context); - - // marker 6. cross bridge 2 : x=0.555208, y=0.627778 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.555208, 0.627778} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 20, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); - pbf_controller_state(context, BUTTON_B, DPAD_NONE, 128, 0, 128, 128, 1000ms); - pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - get_off_ride(env.program_info(), env.console, context); - - // marker 7. : x=0.678646, y=0.669444 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 255, 255, 30}, - FlyPoint::POKECENTER, - {0.678646, 0.669444} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 40, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 0, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 8. : x=0.533333, y=0.640741 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 255, 255, 50}, - FlyPoint::POKECENTER, - {0.533333, 0.640741} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 40, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 0, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - - // marker 9. set marker to pokecenter - realign_player_from_landmark( - env.program_info(), env.console, context, - {ZoomChange::ZOOM_IN, 128, 255, 50}, - {ZoomChange::KEEP_ZOOM, 0, 0, 0} - ); - handle_when_stationary_in_overworld(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 0, 30, 10, false); - }, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - pbf_move_left_joystick(context, 0, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 10. set marker past pokecenter - handle_unexpected_battles(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 180, 255, 50); - }); - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 15, 12, 12, false); // can't wrap in handle_when_stationary_in_overworld(), since we expect to be stationary when walking into the pokecenter - - - fly_to_overlapping_flypoint(env.program_info(), env.console, context); - -} - void move_from_medali_to_glaseado_mountain(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index 520e9bacef..8f03386c1e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -296,8 +296,6 @@ void checkpoint_reattempt_loop_tutorial( std::function&& action ); -// moves player from Porto Marinada Pokecenter to Medali West Pokecenter -void move_from_porto_marinada_to_medali(SingleSwitchProgramEnvironment& env, ProControllerContext& context); // moves player from Medali West Pokecenter to Glaseado Mountain Pokecenter void move_from_medali_to_glaseado_mountain(SingleSwitchProgramEnvironment& env, ProControllerContext& context); From 8ba3cf3675b9438a244dcd748e64f00e71a71e44 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 9 Oct 2025 22:50:36 -0700 Subject: [PATCH 3/4] checkpoint 60 --- .../PokemonSV_AutoStory_Segment_25.cpp | 195 +++++++++++++++++- .../PokemonSV_AutoStory_Segment_25.h | 2 + 2 files changed, 196 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp index 72814da71d..d1a901596b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp @@ -286,12 +286,205 @@ void checkpoint_60( checkpoint_reattempt_loop(env, context, notif_status_update, stats, [&](size_t attempt_number){ // fly back to Porto Marinada Pokecenter - // move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, 0, 0, 0}, FlyPoint::FAST_TRAVEL); + move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::ZOOM_OUT, 0, 128, 600}, FlyPoint::POKECENTER); + + move_from_porto_marinada_to_medali(env, context); }); } +void move_from_porto_marinada_to_medali(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ + context.wait_for_all_requests(); + + // marker 1 + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 255, 110, 75); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 2. x=0.3875, y=0.60463 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.3875, 0.60463} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + + // marker 3. : x=0.316146, y=0.623148 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.316146, 0.623148} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + get_on_ride(env.program_info(), env.console, context); + + // marker 4. cross bridge 1 x=0.310417, y=0.712963. + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.310417, 0.712963} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 20, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); + pbf_controller_state(context, BUTTON_B, DPAD_NONE, 128, 0, 128, 128, 1000ms); + pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + get_off_ride(env.program_info(), env.console, context); + + + // marker 5. : x=0.582292, y=0.692593 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.582292, 0.692593} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 60, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + get_on_ride(env.program_info(), env.console, context); + + // marker 6. cross bridge 2 : x=0.555208, y=0.627778 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.555208, 0.627778} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 20, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); + pbf_controller_state(context, BUTTON_B, DPAD_NONE, 128, 0, 128, 128, 1000ms); + pbf_move_left_joystick(context, 128, 0, 500ms, 0ms); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + get_off_ride(env.program_info(), env.console, context); + + // marker 7. : x=0.678646, y=0.669444 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 255, 30}, + FlyPoint::POKECENTER, + {0.678646, 0.669444} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 8. : x=0.533333, y=0.640741 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 255, 50}, + FlyPoint::POKECENTER, + {0.533333, 0.640741} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + + // marker 9. set marker to pokecenter + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 128, 255, 50}, + {ZoomChange::KEEP_ZOOM, 0, 0, 0} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 30, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 10. set marker past pokecenter + handle_unexpected_battles(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 180, 255, 50); + }); + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 15, 12, 12, false); // can't wrap in handle_when_stationary_in_overworld(), since we expect to be stationary when walking into the pokecenter + + + fly_to_overlapping_flypoint(env.program_info(), env.console, context); + +} + diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h index e4160ebf52..007c2b5ba1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h @@ -53,6 +53,8 @@ void checkpoint_60( AutoStoryStats& stats ); +// moves player from Porto Marinada Pokecenter to Medali West Pokecenter +void move_from_porto_marinada_to_medali(SingleSwitchProgramEnvironment& env, ProControllerContext& context); From 02aa9ba570031758529ae5311130006708bbc208 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 9 Oct 2025 22:58:32 -0700 Subject: [PATCH 4/4] minor UI updates --- .../Programs/AutoStory/PokemonSV_AutoStory.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 78f397ff59..58a1995777 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -210,25 +210,25 @@ AutoStory::AutoStory() StorySection::TUTORIAL ) , STARTPOINT_TUTORIAL( - "Start Point:
Program will start with this segment.", + "Start Point:", //
Program will start with this segment. TUTORIAL_SEGMENTS_SELECT_DATABASE(), LockMode::LOCK_WHILE_RUNNING, "0" ) , ENDPOINT_TUTORIAL( - "End Point:
Program will stop after completing this segment.", + "End Point:", //
Program will stop after completing this segment. TUTORIAL_SEGMENTS_SELECT_DATABASE(), LockMode::UNLOCK_WHILE_RUNNING, "9" ) , STARTPOINT_MAINSTORY( - "Start Point:
Program will start with this segment.", + "Start Point:", //
Program will start with this segment. MAINSTORY_SEGMENTS_SELECT_DATABASE(), LockMode::UNLOCK_WHILE_RUNNING, "10" ) , ENDPOINT_MAINSTORY( - "End Point:
Program will stop after completing this segment.", + "End Point:", //
Program will stop after completing this segment. MAINSTORY_SEGMENTS_SELECT_DATABASE(), LockMode::UNLOCK_WHILE_RUNNING, "10" @@ -237,7 +237,7 @@ AutoStory::AutoStory() "NOTE: Make sure you have selected the correct Start Point. " "Make sure your player character is in the exact correct start position for that Start Point, " "especially if your start point is NOT at the beginning of the Tutorial/Main Story. " - "Read the Start Point's description to help with finding the correct start position." + "Read the Start Point's description to help with finding the correct start position. " "For Start Points that are at Pokecenters, ensure that you fly there so that your character is in the exactly correct start position." } , MAINSTORY_NOTE{