From 9bc95b5432e4fe0e8373b8497022cdfd8eb77577 Mon Sep 17 00:00:00 2001 From: jw098 Date: Sat, 11 Oct 2025 17:40:45 -0700 Subject: [PATCH 1/5] add blank autostory checkpoints/segments --- .../AutoStory/PokemonSV_AutoStory.cpp | 20 +++++- .../PokemonSV_AutoStory_Segment_27.cpp | 8 --- .../PokemonSV_AutoStory_Segment_27.h | 11 ---- .../PokemonSV_AutoStory_Segment_28.cpp | 14 +++- .../PokemonSV_AutoStory_Segment_28.h | 10 +++ .../PokemonSV_AutoStory_Segment_29.cpp | 18 +++++ .../PokemonSV_AutoStory_Segment_29.h | 22 +++++++ .../PokemonSV_AutoStory_Segment_30.cpp | 66 +++++++++++++++++++ .../PokemonSV_AutoStory_Segment_30.h | 35 ++++++++++ .../PokemonSV_AutoStory_Segment_31.cpp | 66 +++++++++++++++++++ .../PokemonSV_AutoStory_Segment_31.h | 35 ++++++++++ .../PokemonSV_AutoStory_Segment_32.cpp | 66 +++++++++++++++++++ .../PokemonSV_AutoStory_Segment_32.h | 35 ++++++++++ .../PokemonSV_AutoStory_Segment_33.cpp | 66 +++++++++++++++++++ .../PokemonSV_AutoStory_Segment_33.h | 35 ++++++++++ .../PokemonSV_AutoStory_Segment_34.cpp | 66 +++++++++++++++++++ .../PokemonSV_AutoStory_Segment_34.h | 35 ++++++++++ .../PokemonSV_AutoStory_Segment_35.cpp | 66 +++++++++++++++++++ .../PokemonSV_AutoStory_Segment_35.h | 35 ++++++++++ SerialPrograms/SourceFiles.cmake | 12 ++++ 20 files changed, 700 insertions(+), 21 deletions(-) create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index cab405bda4..5f95d095e8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -51,6 +51,12 @@ #include "PokemonSV_AutoStory_Segment_27.h" #include "PokemonSV_AutoStory_Segment_28.h" #include "PokemonSV_AutoStory_Segment_29.h" +#include "PokemonSV_AutoStory_Segment_30.h" +#include "PokemonSV_AutoStory_Segment_31.h" +#include "PokemonSV_AutoStory_Segment_32.h" +#include "PokemonSV_AutoStory_Segment_33.h" +#include "PokemonSV_AutoStory_Segment_34.h" +#include "PokemonSV_AutoStory_Segment_35.h" #include "PokemonSV_AutoStory.h" #include @@ -98,8 +104,14 @@ 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()); + // 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()); return segment_list; }; @@ -702,6 +714,12 @@ void AutoStory::test_checkpoints( checkpoint_list.push_back([&](){checkpoint_68(env, context, notif_status_update, stats);}); checkpoint_list.push_back([&](){checkpoint_69(env, context, notif_status_update, stats);}); checkpoint_list.push_back([&](){checkpoint_70(env, context, notif_status_update, stats);}); + checkpoint_list.push_back([&](){checkpoint_71(env, context, notif_status_update, stats);}); + checkpoint_list.push_back([&](){checkpoint_72(env, context, notif_status_update, stats);}); + checkpoint_list.push_back([&](){checkpoint_73(env, context, notif_status_update, stats);}); + checkpoint_list.push_back([&](){checkpoint_74(env, context, notif_status_update, stats);}); + checkpoint_list.push_back([&](){checkpoint_75(env, context, notif_status_update, stats);}); + checkpoint_list.push_back([&](){checkpoint_76(env, context, notif_status_update, stats);}); for (int checkpoint = start; checkpoint <= end; checkpoint++){ diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp index 27f4c475eb..f0b90e9ebb 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp @@ -102,14 +102,6 @@ void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ -} - -void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ -} - -void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ -} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h index 0f78c38974..72caa4d866 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h @@ -42,17 +42,6 @@ void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& co // end: At North Province Area Three Pokecenter void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); -// start: -// end: -void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); - -// start: -// end: -void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); - -// start: -// end: -void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp index 0aa0694f3b..45a605cab6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -52,7 +52,9 @@ void AutoStory_Segment_28::run_segment( context.wait_for_all_requests(); env.console.log("Start Segment " + name(), COLOR_ORANGE); - // checkpoint_(env, context, options.notif_status_update, stats); + checkpoint_68(env, context, options.notif_status_update, stats); + checkpoint_69(env, context, options.notif_status_update, stats); + checkpoint_70(env, context, options.notif_status_update, stats); context.wait_for_all_requests(); env.console.log("End Segment " + name(), COLOR_GREEN); @@ -60,6 +62,16 @@ void AutoStory_Segment_28::run_segment( } +void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + + } } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h index ac23705b7b..54e6eb3dcd 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h @@ -26,7 +26,17 @@ class AutoStory_Segment_28 : public AutoStory_Segment{ ) const override; }; +// start: At North Province Area Three Pokecenter +// end: Beat team star grunt. At gate of Team Star (Fairy) base. +void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +// start: Beat team star grunt. At gate of Team Star (Fairy) base. +// end: Beat Team Star (Fairy) +void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: Beat Team Star (Fairy) +// end: At Montenevera Pokecenter +void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp index 289ae6ea7e..151c31434f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp @@ -60,6 +60,24 @@ void AutoStory_Segment_29::run_segment( } +void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + } } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h index f2bb7885d0..57c0bb56ac 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h @@ -26,7 +26,29 @@ class AutoStory_Segment_29 : public AutoStory_Segment{ ) const override; }; +// start: +// end: +void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +// start: +// end: +void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp new file mode 100644 index 0000000000..d7bbe4559b --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_30.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_30::name() const{ + return ""; +} + +std::string AutoStory_Segment_30::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_30::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_30::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h new file mode 100644 index 0000000000..72ebdd9353 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_30_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_30_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_30 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp new file mode 100644 index 0000000000..e437991179 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_31.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_31::name() const{ + return ""; +} + +std::string AutoStory_Segment_31::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_31::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_31::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h new file mode 100644 index 0000000000..7ad0fb4995 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_31_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_31_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_31 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp new file mode 100644 index 0000000000..9f13b6abde --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_32.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_32::name() const{ + return ""; +} + +std::string AutoStory_Segment_32::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_32::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_32::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h new file mode 100644 index 0000000000..65342a205c --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_32_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_32_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_32 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp new file mode 100644 index 0000000000..638a067d28 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_33.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_33::name() const{ + return ""; +} + +std::string AutoStory_Segment_33::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_33::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_33::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h new file mode 100644 index 0000000000..a072d8b265 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_33_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_33_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_33 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp new file mode 100644 index 0000000000..01bdc929f1 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_34.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_34::name() const{ + return ""; +} + +std::string AutoStory_Segment_34::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_34::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_34::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h new file mode 100644 index 0000000000..e38ad1621f --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_34_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_34_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_34 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp new file mode 100644 index 0000000000..53c2f4c4af --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_35.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_35::name() const{ + return ""; +} + +std::string AutoStory_Segment_35::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_35::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_35::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h new file mode 100644 index 0000000000..982db9ee6f --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_35_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_35_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_35 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/SourceFiles.cmake b/SerialPrograms/SourceFiles.cmake index 6da1e55cad..bbf21cf824 100644 --- a/SerialPrograms/SourceFiles.cmake +++ b/SerialPrograms/SourceFiles.cmake @@ -1805,6 +1805,18 @@ file(GLOB LIBRARY_SOURCES 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_AutoStory_Segment_30.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp + Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOption.cpp Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOption.h Source/PokemonSV/Programs/AutoStory/PokemonSV_MenuOptionDatabase.cpp From 55ca124b656fb99776b4365b095f7f0ec9ede7fc Mon Sep 17 00:00:00 2001 From: jw098 Date: Sat, 11 Oct 2025 17:45:42 -0700 Subject: [PATCH 2/5] move_from_glaseado_mountain_to_montenevera() moved from AutoStoryTools to Segment 28. --- .../AutoStory/PokemonSV_AutoStoryTools.cpp | 142 --------------- .../AutoStory/PokemonSV_AutoStoryTools.h | 2 - .../PokemonSV_AutoStory_Segment_28.cpp | 166 +++++++++++++++++- .../PokemonSV_AutoStory_Segment_28.h | 3 + 4 files changed, 166 insertions(+), 147 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index 7213f0b7c8..0d6ca53098 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -1202,148 +1202,6 @@ void checkpoint_reattempt_loop_tutorial( -void move_from_glaseado_mountain_to_montenevera(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ - context.wait_for_all_requests(); - - - // marker 1 {0.745313, 0.637037} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.745313, 0.637037} - ); - 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 2 x=0.225521, y=0.380556. {0.229687, 0.37037} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 255, 0, 50}, - FlyPoint::POKECENTER, - {0.229687, 0.37037} - ); - 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); - } - ); - - // marker 3 x=0.396354, y=0.69537. x=0.396875, y=0.725926 - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 255, 200, 50}, - FlyPoint::POKECENTER, - {0.396875, 0.725926} - ); - 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, 50, 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 4 (0.409896, 0.65) - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.409896, 0.65} - ); - 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, 255, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - - // marker 5 {0.509896, 0.639815} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.509896, 0.639815} - ); - 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, 255, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 6 {0.508333, 0.566667} {0.521875, 0.483333} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_IN, 128, 255, 20}, - FlyPoint::POKECENTER, - {0.508333, 0.566667} - ); - 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, 255, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 7 {0.508333, 0.566667} {0.521875, 0.483333} {0.529687, 0.483333} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_IN, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.529687, 0.483333} - ); - - get_on_ride(env.program_info(), env.console, context); - - 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, 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); - } - ); - - - fly_to_overlapping_flypoint(env.program_info(), env.console, context); - - -} - void move_from_montenevera_to_glaseado_gym(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ DirectionDetector direction; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index aac7dfe7e4..f6dda64df5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -322,8 +322,6 @@ void checkpoint_reattempt_loop_tutorial( -// moves player from Glaseado Mountain Pokecenter to Montenevera Pokecenter -void move_from_glaseado_mountain_to_montenevera(SingleSwitchProgramEnvironment& env, ProControllerContext& context); // moves player from Montenevera Pokecenter to Glaseado Gym Pokecenter void move_from_montenevera_to_glaseado_gym(SingleSwitchProgramEnvironment& env, ProControllerContext& context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp index 45a605cab6..ca54ec81b4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -28,15 +28,15 @@ namespace PokemonSV{ std::string AutoStory_Segment_28::name() const{ - return ""; + return "28: Team Star (Fairy)"; } std::string AutoStory_Segment_28::start_text() const{ - return "Start: "; + return "Start: Beat Dondozo/Tatsugiri Titan. At North Province Area Three Pokecenter."; } std::string AutoStory_Segment_28::end_text() const{ - return "End: "; + return "End: Beat Team Star (Fairy). At Montenevera Pokecenter."; } void AutoStory_Segment_28::run_segment( @@ -63,15 +63,175 @@ void AutoStory_Segment_28::run_segment( void checkpoint_68(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_69(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_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + + }); } +void move_from_glaseado_mountain_to_montenevera(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ + context.wait_for_all_requests(); + + + // marker 1 {0.745313, 0.637037} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.745313, 0.637037} + ); + 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 2 x=0.225521, y=0.380556. {0.229687, 0.37037} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 0, 50}, + FlyPoint::POKECENTER, + {0.229687, 0.37037} + ); + 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); + } + ); + + // marker 3 x=0.396354, y=0.69537. x=0.396875, y=0.725926 + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 200, 50}, + FlyPoint::POKECENTER, + {0.396875, 0.725926} + ); + 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, 50, 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 4 (0.409896, 0.65) + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.409896, 0.65} + ); + 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, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + + // marker 5 {0.509896, 0.639815} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.509896, 0.639815} + ); + 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, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 6 {0.508333, 0.566667} {0.521875, 0.483333} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 128, 255, 20}, + FlyPoint::POKECENTER, + {0.508333, 0.566667} + ); + 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, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 7 {0.508333, 0.566667} {0.521875, 0.483333} {0.529687, 0.483333} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.529687, 0.483333} + ); + + get_on_ride(env.program_info(), env.console, context); + + 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, 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); + } + ); + + + fly_to_overlapping_flypoint(env.program_info(), env.console, context); + + +} + + + + } } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h index 54e6eb3dcd..c7f4003f2a 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h @@ -39,6 +39,9 @@ void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& co void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +// moves player from Glaseado Mountain Pokecenter to Montenevera Pokecenter +void move_from_glaseado_mountain_to_montenevera(SingleSwitchProgramEnvironment& env, ProControllerContext& context); + } } } From ff918c769676601d4ca2abf6050493a65b0a10bb Mon Sep 17 00:00:00 2001 From: jw098 Date: Sun, 12 Oct 2025 17:48:26 -0700 Subject: [PATCH 3/5] checkpoint 68 and 69 --- .../PokemonSV_AutoStory_Segment_28.cpp | 185 +++++++++++++++++- 1 file changed, 183 insertions(+), 2 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp index ca54ec81b4..8cb6e09f31 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -3,6 +3,8 @@ * From: https://github.com/PokemonAutomation/ * */ +#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h" +#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonTools/Async/InferenceRoutines.h" @@ -65,15 +67,194 @@ void AutoStory_Segment_28::run_segment( void checkpoint_68(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(); + // move the marker elsewhere, away from North + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 128, 255, 50); + + DirectionDetector direction; + direction.change_direction(env.program_info(), env.console, context, 0.696613); + + pbf_move_left_joystick(context, 128, 0, 200, 50); + + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 150, 0, 120); + 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, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // talk to Clavell + clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG}); + + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 0, 0, 100); + 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, 255, 255, 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 Mr. Harrington."); + run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); + mash_button_till_overworld(env.console, context, BUTTON_A); + }); + } void checkpoint_69(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){ + // don't use marker since it covers up north + DirectionDetector direction; + + direction.change_direction(env.program_info(), env.console, context, 0.261697); + pbf_move_left_joystick(context, 128, 0, 10, 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){ + + uint16_t seconds_wait = 6; + + DirectionDetector direction; + + direction.change_direction(env.program_info(), env.console, context, 0.611062); + 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.550472); + 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, 5.860926); + pbf_move_left_joystick(context, 128, 0, 400, 50); + + direction.change_direction(env.program_info(), env.console, context, 4.920249); + 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); + + direction.change_direction(env.program_info(), env.console, context, 0.402877); + 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, 5.707655); + 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); + + direction.change_direction(env.program_info(), env.console, context, 5.394366); + 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); + + direction.change_direction(env.program_info(), env.console, context, 0.979935); + 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, 1.552260); + 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, 1.869166); + 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, 0.769966); + 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, 6.127338); + 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, 1.451616); + 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.023052); + 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, 1.13517); + pbf_move_left_joystick(context, 128, 0, 1000, 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.609735); + 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, 0); + // pbf_move_left_joystick(context, 128, 0, 00, 50); + // pbf_press_button(context, BUTTON_R, 20, 20); + // pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + pbf_wait(context, 20 * 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); }); } From 4534257db25f4d8fcb41f4e7634b0005bb11c689 Mon Sep 17 00:00:00 2001 From: jw098 Date: Sun, 12 Oct 2025 23:01:16 -0700 Subject: [PATCH 4/5] checkpoint 70 --- .../Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp index 8cb6e09f31..9141fb9f58 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -262,7 +262,14 @@ void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& co void checkpoint_70(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(); + // fly back to North Province Area Three + move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, 0, 0, 0}, FlyPoint::POKECENTER); + + // fly back to Glaseado Mountain Pokecenter + move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::ZOOM_OUT, 0, 0, 0}, FlyPoint::POKECENTER); + move_from_glaseado_mountain_to_montenevera(env, context); }); } From 7b4fcc64740942805d5412d4ab2f9186361f7f6c Mon Sep 17 00:00:00 2001 From: jw098 Date: Sun, 12 Oct 2025 23:07:31 -0700 Subject: [PATCH 5/5] update test_checkpoints() --- .../PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 5f95d095e8..60ffdea221 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -721,7 +721,11 @@ void AutoStory::test_checkpoints( checkpoint_list.push_back([&](){checkpoint_75(env, context, notif_status_update, stats);}); checkpoint_list.push_back([&](){checkpoint_76(env, context, notif_status_update, stats);}); - + + if (end == 0){ + end = start; + } + stream.log("test_checkpoints: start: " + std::to_string(start) + ", end:" + std::to_string(end)); for (int checkpoint = start; checkpoint <= end; checkpoint++){ if (checkpoint == 0){ stream.log("checkpoint_0");