diff options
author | Idain <luiscarlosholguinperez@outlook.com> | 2021-12-21 15:53:01 -0400 |
---|---|---|
committer | Idain <luiscarlosholguinperez@outlook.com> | 2021-12-21 15:53:01 -0400 |
commit | ce9752c6c23ef2f1cbdb1cfdbf723069686fba39 (patch) | |
tree | a2c3b273dead84c90c4707a8866d02cc21f54d20 | |
parent | c4a8131994a6ab13498d4932cd77129c2eda3f0d (diff) |
Updating tutorial
-rw-r--r-- | How-To-Add-a-Pocket-PC.md | 72 |
1 files changed, 33 insertions, 39 deletions
diff --git a/How-To-Add-a-Pocket-PC.md b/How-To-Add-a-Pocket-PC.md index b4e8bfe..66fdf92 100644 --- a/How-To-Add-a-Pocket-PC.md +++ b/How-To-Add-a-Pocket-PC.md @@ -1,20 +1,18 @@ -This tutorial is for how to add a Pocket PC that you can use at any time to access the PC without having to go to the PokeCenter. +This tutorial is for how to add a Pocket PC that you can use at any time to access the PC without having to go to the Pokémon Center. ## Contents 1. [Add the Pocket PC as a Key Item](#1-add-the-pocket-pc-as-a-key-item) -2. [Add the New PocketPCFunction To Handle Using the PC](#2-add-the-New-PocketPCFunction-To-Handle-Using-the-PC) -3. [Get the PocketPC from Elms Aide](#3-Get-the-PocketPC-from-Elms-Aide) +2. [Add the new function to handle using the PC](#2-add-the-function-to-handle-using-the-PC) +3. [Get the Pocket PC from Elm's Aide](#3-Get-the-Pocket-PC-from-Elms-Aide) ## 1. Add the Pocket PC as a Key Item This section is similar to adding any normal item and can be carried out the same way until you get to the attributes: -To start with, we'll implement the Pocket PC's essential data. : - -Edit [constants/item_constants.asm](../blob/master/constants/item_constants.asm): +To start with, we'll implement the Pocket PC's essential data. Firt edit [constants/item_constants.asm](../blob/master/constants/item_constants.asm): ```diff const WATER_STONE ; 18 @@ -26,10 +24,10 @@ Edit [constants/item_constants.asm](../blob/master/constants/item_constants.asm) Edit [data/items/names.asm](../blob/master/data/items/names.asm): ```diff - db "WATER STONE@" -- db "TERU-SAMA@" -+ db "POCKET PC@" - db "HP UP@" + li "WATER STONE" +- li "TERU-SAMA" ++ li "POCKET PC" + li "HP UP" ``` Edit [data/items/descriptions.asm](../blob/master/data/items/descriptions.asm): @@ -67,7 +65,9 @@ Replace the old slot: + dw PocketPCEffect ; POCKET_PC dw VitaminEffect ; HP_UP ``` + Add the new effect: + ```diff ItemfinderEffect: farcall ItemFinder @@ -78,28 +78,26 @@ Add the new effect: + ret ``` -And last, edit [data/items/catch_rate_items.asm](../blob/master/data/items/catch_rate_items.asm): +And last, edit [data/items/catch_rate_items.asm](../blob/master/data/items/catch_rate_items.asm) (you won't need two Pocket PCs!): -You wont need two Pocket PC's! ```diff TimeCapsule_CatchRateItems: - db ITEM_19, LEFTOVERS ... ``` -## 2. Add the New PocketPCFunction To Handle Using the PC -Now we need to create the PocketPCFunction that we added to the [engine/items/item_effects.asm](../blob/master/engine/items/item_effects.asm) +## 2. Add the new function to handle using the PC -This will be done in the [engine/events/overworld.asm](../blob/master/engine/events/overworld.asm) +Now we need to create the `PocketPCFunction` that we added to the [engine/items/item_effects.asm](../blob/master/engine/items/item_effects.asm). This will be done in the [engine/events/overworld.asm](../blob/master/engine/events/overworld.asm) file. -Here we have the base of the function, it is handled similarly to the BikeFunction as we want different scripts to trigger based on whether we are using from the Bag or when it is Registered using the Select button: +Here we have the base of the function, it is handled similarly to the `BikeFunction` as we want different scripts to trigger based on whether we are using it from the Bag or as a registered item: ```diff -RodNothingText: + RodNothingText: text_far _RodNothingText text_end -UnusedNothingHereText: ; unused + UnusedNothingHereText: ; unused text_far _UnusedNothingHereText text_end @@ -115,7 +113,7 @@ UnusedNothingHereText: ; unused + ld de, Script_LoadPocketPC_Register + call .CheckIfRegistered + call QueueScript -+ ld a, $1 ++ ld a, TRUE + ret + +.CheckIfRegistered: @@ -127,7 +125,7 @@ UnusedNothingHereText: ; unused + ret ``` -Next we need to add the two scripts that will be run depending on the scenario: +Next we need to add the two scripts that will run depending on the scenario: ```diff +Script_LoadPocketPC: @@ -142,35 +140,34 @@ Next we need to add the two scripts that will be run depending on the scenario: + reloadmappart + end -Script_GetOnBike: + Script_GetOnBike: reloadmappart special UpdateTimePals loadvar VAR_MOVEMENT, PLAYER_BIKE ``` -The difference in the two is when using from the Bag we need to move to the overworld, done with reloadmappart. +The difference between them is when using from the Bag we need to move to the overworld, done with `reloadmappart`. -In both cases we use the PokemonCenterPC function which has its own special pointer, this will then just act like you were standing in front of the PC in the Pokemon Center! +In both cases we use the `PokemonCenterPC` function which has its own special pointer. This will then just act like you were standing in front of the PC in the Pokémon Center. Then after you have done everything in the PC and exit we have `reloadmappart` to properly load the map once more. -Then after you have done everything in the PC and exit we have reloadmappart to properly load the map once more. +## 3. Get the Pocket PC from Elm's Aide -## 3. Get the PocketPC from Elms Aide Now we need to actually get the item into your inventory, one place that makes sense is right after you get your starter. -Getting the PocketPC before you get any Pokemon causes it to crash when accessing the PC, this is solved by just getting it after you get a Pokemon. +Getting the Pocket PC before you get any Pokémon causes it to crash when accessing the PC; this is solved by just getting it after you get a Pokémon. -So we just need to edit the script for when you get your first Potion to also give the PocketPC. -This is done in this file: [maps/ElmsLab.asm](../blob/master/maps/ElmsLab.asm) +So we just need to edit the script for when you get your first Potion to also give the Pocket PC to the player. This is done in [maps/ElmsLab.asm](../blob/master/maps/ElmsLab.asm): First we add the new call to both events: + ```diff -ElmJumpRightScript: + ElmJumpRightScript: applymovement ELMSLAB_ELM, ElmJumpRightMovement opentext end -AideScript_WalkPotion1: + AideScript_WalkPotion1: applymovement ELMSLAB_ELMS_AIDE, AideWalksRight1 turnobject PLAYER, DOWN scall AideScript_GivePotion @@ -223,19 +220,16 @@ ElmsLabPCText: done +AideText_GetPocketPCText: -+ text "Oh, I have" -+ line "this for you" ++ text "Oh, I have this" ++ line "for you too." + -+ para "too! It's a" -+ line "Pocket PC!" ++ para "It's a Pocket PC!" + done + +AideText_PocketPCInfoText: -+ text "Use this" -+ line "to manage" -+ -+ para "your party." ++ text "Use this to manage" ++ line "your party." + done ``` -Now you have a whole scene added to get your PocketPC! This can be added anywhere else you would like instead of here, just make sure it is after you get your starter.
\ No newline at end of file +Now you have a whole script added to get your Pocket PC! This can be added anywhere else you would like instead of here, just make sure it is after you get your starter and make the proper adjustments depending on your chosen map.
\ No newline at end of file |