diff options
| author | KDLPro <38602758+KDLPro@users.noreply.github.com> | 2020-11-23 12:13:32 +0800 |
|---|---|---|
| committer | KDLPro <38602758+KDLPro@users.noreply.github.com> | 2020-11-23 12:13:32 +0800 |
| commit | 8d5c3143190e25f6bb3f6dc154fd50292fa9525e (patch) | |
| tree | 9efc718592d3a092a2a42169e2ea47723ada8c81 /Move-Tutor-and-Tutor-Moves.md | |
| parent | 476b9f469991c06b75f5ccd21746217c3a3563a7 (diff) | |
Continued edits to Step 5
Diffstat (limited to 'Move-Tutor-and-Tutor-Moves.md')
| -rw-r--r-- | Move-Tutor-and-Tutor-Moves.md | 145 |
1 files changed, 124 insertions, 21 deletions
diff --git a/Move-Tutor-and-Tutor-Moves.md b/Move-Tutor-and-Tutor-Moves.md index fb31b5d..4ca64fc 100644 --- a/Move-Tutor-and-Tutor-Moves.md +++ b/Move-Tutor-and-Tutor-Moves.md @@ -189,34 +189,34 @@ As you can see, tutor moves are defined below HMs, with the `add_mt` macro. They NUM_TM_HM_TUTOR EQU __enum__ + -1 ``` -Now that the constant is defined, we still need to define what move is actually taught. Head on over to [data/moves/tmhm_moves.asm](../blob/master/data/moves/tmhm_moves.asm): +Now that the constant is defined, we still need to define what move is actually taught. Head on over to [constants/item_constants.asm](../blob/master/constants/item_constants.asm): ```diff -; HMs - db CUT - db FLY - db SURF - db STRENGTH - db FLASH - db WHIRLPOOL - db WATERFALL -; Move tutor - db FLAMETHROWER - db THUNDERBOLT - db ICE_BEAM - db 0 ; end + add_hm CUT ; f3 + add_hm FLY ; f4 + add_hm SURF ; f5 + add_hm STRENGTH ; f6 + add_hm FLASH ; f7 + add_hm WHIRLPOOL ; f8 + add_hm WATERFALL ; f9 +NUM_HMS EQU __tmhm_value__ - NUM_TMS - 1 + +... + + add_mt FLAMETHROWER + add_mt THUNDERBOLT + add_mt ICE_BEAM +NUM_TUTORS = __tmhm_value__ - NUM_TMS - NUM_HMS - 1 ``` Just like before, tutor moves come after HMs. Be sure to adhere to the order, and the order of new tutor moves you add. ```diff -; Move tutor - db FLAMETHROWER - db THUNDERBOLT - db ICE_BEAM -+ db SOFTBOILED -+ - db 0 ; end + add_mt FLAMETHROWER + add_mt THUNDERBOLT + add_mt ICE_BEAM ++ add_mt SOFTBOILED +NUM_TUTORS = __tmhm_value__ - NUM_TMS - NUM_HMS - 1 ``` Now that the new tutor move is defined, and has been added as a tutor move, we need to add the tutor move to a Pokémon's learnset. For this example, we'll specifically be using Chansey. Chansey's signature move is Softboiled, and is already learned on level up(evos_attacks.asm). But even if a Pokemon can naturally learn this tutor move, the tutor still can't teach it without the tutor move being added to the end of the Chansey's learnset! Just like before, tutor moves come after HMs. @@ -423,6 +423,109 @@ MoveTutorScript: sjump .Incompatible ``` +That way, instead of requesting for that constant, it instead requests the corresponding entry on the list menu. + +For example, if we want to create a Move Tutor in New Bark Town that can teach your starter the following moves: Mega Drain, Fire Spin, Bubble, and Absorb. First, we need to edit [constants/item_constants.asm](../blob/master/constants/item_constants.asm): + +```diff + add_mt FLAMETHROWER + add_mt THUNDERBOLT + add_mt ICE_BEAM ++ add_mt MEGA_DRAIN ++ add_mt FIRE_SPIN ++ add_mt BUBBLE ++ add_mt ABSORB +NUM_TUTORS = __tmhm_value__ - NUM_TMS - NUM_HMS - 1 +``` + +Next, copy the script in Goldenrod City [maps/GoldenrodCity.asm](../blob/master/maps/GoldenrodCity.asm) and copy it to [maps/NewBarkTown.asm](../blob/master/maps/NewBarkTown.asm) while changing the MoveTutorScript to StarterTutorScript and changing the moves to fit the ones we want the tutor to teach. + +```diff +.FlyPoint: + setflag ENGINE_FLYPOINT_NEW_BARK + clearevent EVENT_FIRST_TIME_BANKING_WITH_MOM + endcallback + ++StarterTutorScript: ++ faceplayer ++ opentext ++ writetext AskTeachAMoveText ++ yesorno ++ iffalse .Refused ++ writetext NewBarkTownStarterTutorWhichMoveShouldITeachText ++ loadmenu .MoveMenuHeader ++ verticalmenu ++ closewindow ++ ifequal 1, .MegaDrain ++ ifequal 2, .FireSpin ++ ifequal 3, .Bubble ++ ifequal 4, .Absorb ++ sjump .Incompatible ++ ++.MegaDrain: ++ setval MEGA_DRAIN ++ writetext NewBarkTownStarterTutorMoveText ++ special MoveTutor ++ ifequal FALSE, .TeachMove ++ sjump .Incompatible ++ ++.FireSpin: ++ setval FIRE_SPIN ++ writetext NewBarkTownStarterTutorMoveText ++ special MoveTutor ++ ifequal FALSE, .TeachMove ++ sjump .Incompatible ++ ++.Bubble: ++ setval BUBBLE ++ writetext NewBarkTownStarterTutorMoveText ++ special MoveTutor ++ ifequal FALSE, .TeachMove ++ sjump .Incompatible ++ ++.Absorb: ++ setval ABSORB ++ writetext NewBarkTownStarterTutorMoveText ++ special MoveTutor ++ ifequal FALSE, .TeachMove ++ sjump .Incompatible ++ ++.Refused: ++ writetext NewBarkTownStarterTutorAwwButTheyreAmazingText ++ waitbutton ++ closetext ++ end ++ ++.Incompatible: ++ writetext NewBarkTownStarterTutorBButText ++ waitbutton ++ closetext ++ end ++ ++.TeachMove: ++ writetext NewBarkTownStarterTutorIfYouUnderstandYouveMadeItText ++ promptbutton ++ writetext NewBarkTownStarterTutorFarewellKidText ++ waitbutton ++ closetext ++ ++.MoveMenuHeader: ++ db MENU_BACKUP_TILES ; flags ++ menu_coords 0, 2, 15, TEXTBOX_Y - 0 ++ dw .MenuData ++ db 1 ; default option ++ ++.MenuData: ++ db STATICMENU_CURSOR ; flags ++ db 5 ; items ++ db "MEGA DRAIN@" ++ db "FIRE SPIN@" ++ db "BUBBLE@" ++ db "ABSORB@" ++ db "CANCEL@" +``` + +We need to change TEXTBOX_Y in .MoveMenuHeader to accommodate 4 moves (and the CANCEL option on-screen). ## 6. Other examples Now that new tutors can be added to the game, what else could you do? Like the tutors from Gen 3 onwards, you can charge a price, or demand a specific item. Adding a `checkitem` command is very simple, but effective! For this example, we will be using a `POKE_DOLL` to the Celadon City move tutor. |
