@@ -60,18 +60,18 @@ void AutoStory_Segment_39::run_segment(
6060}
6161
6262std::string AutoStory_Checkpoint_102::name () const { return " 0102 - " + AutoStory_Segment_39 ().name (); }
63- std::string AutoStory_Checkpoint_102::start_text () const { return " " ;}
64- std::string AutoStory_Checkpoint_102::end_text () const { return " " ;}
63+ std::string AutoStory_Checkpoint_102::start_text () const { return " Inside Area Zero Station 4. Deactivated the locks. " ;}
64+ std::string AutoStory_Checkpoint_102::end_text () const { return " Opened Zero lab. Defeated Paradox Pokemon. " ;}
6565void AutoStory_Checkpoint_102::run_checkpoint (SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const {
6666 checkpoint_102 (env, context, options.notif_status_update , stats);
6767}
6868
69- // std::string AutoStory_Checkpoint_103::name() const{ return "0103 - " + AutoStory_Segment_3 ().name(); }
70- // std::string AutoStory_Checkpoint_103::start_text() const{ return "" ;}
71- // std::string AutoStory_Checkpoint_103::end_text() const{ return "";}
72- // void AutoStory_Checkpoint_103::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{
73- // checkpoint_103(env, context, options.notif_status_update, stats);
74- // }
69+ std::string AutoStory_Checkpoint_103::name () const { return " 0103 - " + AutoStory_Segment_39 ().name (); }
70+ std::string AutoStory_Checkpoint_103::start_text () const { return AutoStory_Checkpoint_102 (). end_text () ;}
71+ std::string AutoStory_Checkpoint_103::end_text () const { return " " ;}
72+ void AutoStory_Checkpoint_103::run_checkpoint (SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const {
73+ checkpoint_103 (env, context, options.notif_status_update , stats);
74+ }
7575
7676// std::string AutoStory_Checkpoint_104::name() const{ return "0104 - " + AutoStory_Segment_3().name(); }
7777// std::string AutoStory_Checkpoint_104::start_text() const{ return "";}
@@ -91,7 +91,157 @@ void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& c
9191 // checkpoint_reattempt_loop(env, context, notif_status_update, stats,
9292 // [&](size_t attempt_number){
9393
94- // YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-station-4b.onnx");
94+ YOLOv5Detector yolo_detector (RESOURCE_PATH () + " PokemonSV/YOLO/A0-lab.onnx" );
95+
96+ #if 0
97+ #endif
98+
99+ pbf_move_left_joystick (context, 128 , 255 , 200 , 100 );
100+ walk_forward_until_dialog (env.program_info (), env.console , context, NavigationMovementMode::DIRECTIONAL_ONLY, 10 , 255 , 128 );
101+ clear_dialog (env.console , context, ClearDialogMode::STOP_PROMPT, 60 , {CallbackEnum::PROMPT_DIALOG});
102+ pbf_press_dpad (context, DPAD_DOWN, 13 , 20 );
103+ pbf_press_dpad (context, DPAD_DOWN, 13 , 20 );
104+
105+ // go to Station 2
106+ pbf_mash_button (context, BUTTON_A, 50 );
107+ wait_for_overworld (env.program_info (), env.console , context, 30 );
108+
109+ // heal at the bed
110+ pbf_move_left_joystick (context, 128 , 0 , 300 , 100 );
111+ walk_forward_until_dialog (env.program_info (), env.console , context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10 , 255 , 128 );
112+ clear_dialog (env.console , context, ClearDialogMode::STOP_OVERWORLD, 60 , {CallbackEnum::PROMPT_DIALOG, CallbackEnum::OVERWORLD});
113+
114+ // leave Station 2
115+ pbf_move_left_joystick (context, 50 , 255 , 130 , 20 );
116+
117+ pbf_move_left_joystick (context, 128 , 255 , 500 , 100 );
118+ pbf_wait (context, 3 * TICKS_PER_SECOND);
119+ // wait for overworld after leaving research station
120+ wait_for_overworld (env.program_info (), env.console , context, 30 );
121+
122+ pbf_move_right_joystick (context, 180 , 128 , 30 , 0 ); // adjust camera so rock isn't at edge of screen.
123+
124+
125+ // align to rock-5-1.
126+ // center before: y: x:
127+ // center after: center-y: 0.347222 center-x: 0.664844
128+ move_camera_yolo (env, context, CameraAxis::Y, yolo_detector, " rock-5-1" , 0.347222 ,
129+ [&](){
130+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
131+ move_player_to_realign_via_yolo (env, context, yolo_detector, " rock-5-1" , 0.5000 ); // x-position of target object prior to camera move
132+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
133+ }
134+ );
135+ move_camera_yolo (env, context, CameraAxis::X, yolo_detector, " rock-5-1" , 0.664844 ,
136+ [&](){
137+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
138+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
139+ }
140+ );
141+
142+ // move forward until we see rock-5-2
143+ move_player_until_yolo_object_detected (env, context, yolo_detector, " rock-5-2" ,
144+ [&](){
145+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
146+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
147+ },
148+ 30
149+ );
150+
151+ // align to rock-5-2.
152+ // center before: y: x:
153+ // center after: center-y: 0.158333 center-x: 0.568750
154+ move_camera_yolo (env, context, CameraAxis::Y, yolo_detector, " rock-5-2" , 0.158333 ,
155+ [&](){
156+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
157+ move_player_to_realign_via_yolo (env, context, yolo_detector, " rock-5-2" , 0.5000 ); // x-position of target object prior to camera move
158+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
159+ }
160+ );
161+ move_camera_yolo (env, context, CameraAxis::X, yolo_detector, " rock-5-2" , 0.568750 ,
162+ [&](){
163+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
164+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
165+ }
166+ );
167+
168+ // move towards rock-5-2 until box: (0.2535, 0.25) OR (0.34, 0.375)
169+ move_forward_until_yolo_object_above_min_size (env, context, yolo_detector, " rock-5-2" ,
170+ 0.25 , 0.3 ,
171+ [&](){
172+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
173+ move_player_to_realign_via_yolo (env, context, yolo_detector, " rock-5-2" , 0.000 ); // realign to target X
174+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
175+ }
176+ );
177+
178+ pbf_move_right_joystick (context, 128 , 255 , 200 , 0 );
179+ move_camera_until_yolo_object_detected (env, context, yolo_detector, " beyond-cliff-5" , 0 , 30 );
180+
181+ move_camera_yolo (env, context, CameraAxis::X, yolo_detector, " beyond-cliff-5" , 0.5 ,
182+ [&](){
183+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
184+ pbf_move_right_joystick (context, 128 , 255 , 200 , 0 );
185+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
186+ }
187+ );
188+
189+ // move towards beyond-cliff-5 until it takes up most of screen
190+ move_forward_until_yolo_object_above_min_size (env, context, yolo_detector, " beyond-cliff-5" ,
191+ 0.5 , 0.9 ,
192+ [&](){
193+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
194+ pbf_move_right_joystick (context, 128 , 255 , 200 , 0 );
195+
196+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
197+ }
198+ );
199+
200+ // walked off cliff. now move backwards
201+ walk_forward_until_dialog (env.program_info (), env.console , context, NavigationMovementMode::DIRECTIONAL_ONLY, 60 , 128 , 255 ); // move backwards until dialog detected
202+
203+
204+ mash_button_till_overworld (env.console , context, BUTTON_A);
205+
206+
207+
208+ // align to gate-panel.
209+ // center before: y: x:
210+ // center after: center-y: 0.295833 center-x: 0.517969
211+ move_camera_yolo (env, context, CameraAxis::Y, yolo_detector, " gate-panel" , 0.295833 ,
212+ [&](){
213+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
214+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
215+ }
216+ );
217+ move_camera_yolo (env, context, CameraAxis::X, yolo_detector, " gate-panel" , 0.5 ,
218+ [&](){
219+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
220+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
221+ }
222+ );
223+
224+ do_action_until_dialog (env.program_info (), env.console , context,
225+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
226+ move_player_forward (env, context, 10 ,
227+ [&](){
228+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
229+ move_camera_yolo (env, context, CameraAxis::X, yolo_detector, " gate-panel" , 0.5 ,
230+ [&](){
231+ run_wild_battle_press_A (env.console , context, BattleStopCondition::STOP_OVERWORLD);
232+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
233+ }
234+ );
235+ pbf_move_left_joystick (context, 128 , 0 , 10 , 50 ); // move forward to align with camera
236+ },
237+ false ,
238+ true
239+ );
240+ }
241+ );
242+
243+
244+ // clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE});
95245
96246 #if 0
97247 // align to rock.
0 commit comments