summaryrefslogtreecommitdiff
path: root/Add-a-new-Pack-pocket.md
diff options
context:
space:
mode:
Diffstat (limited to 'Add-a-new-Pack-pocket.md')
-rw-r--r--Add-a-new-Pack-pocket.md57
1 files changed, 13 insertions, 44 deletions
diff --git a/Add-a-new-Pack-pocket.md b/Add-a-new-Pack-pocket.md
index 4595c3f..406d9c6 100644
--- a/Add-a-new-Pack-pocket.md
+++ b/Add-a-new-Pack-pocket.md
@@ -13,7 +13,7 @@ This tutorial is for how to add a new Pack pocket. As an example, we'll add a Be
8. [Update standard inventory routines](#8-update-standard-inventory-routines)
9. [Update the Pack engine](#9-update-the-pack-engine)
10. [Update the Crystal-only Pack engine](#10-update-the-crystal-only-pack-engine)
-11. [Update Kurt Apricorn Script](#11-Update-Kurt-Apricorn-Script)
+11. [Update Kurt's Apricorn script](#11-update-kurts-apricorn-script)
12. [Fix build errors](#12-fix-build-errors)
@@ -860,57 +860,26 @@ Edit [engine/items/pack_kris.asm](../blob/master/engine/items/pack_kris.asm):
This is just like `PackGFXPointers`, but for the Crystal-only girl's Pack.
-## 11. Update Kurt Apricorn Script
-Because we're changing where the Apricorn type items are stored, if we would try to make custom Poke Balls with Kurt right now, the game would glitch up. This is because the game would still look for Apricorns on the Items pocket when they are no longer there. Fixing this is thankfully quick and easy.
+## 11. Update Kurt's Apricorn script
-Edit [engine/events/kurt.asm](../blob/master/engine/events/kurt.asm):
+If you did not change the Apricorns' pocket, then skip this step.
-```diff
-Kurt_GetQuantityOfApricorn:
- push bc
-- ld hl, wNumItems
-+ ld hl, wNumBerries
- ld a, [wCurItem]
-
-...
-
-; Initialize the search.
- push de
- push bc
-- ld hl, wNumItems
-+ ld hl, wNumBerries
- ld a, [wCurItem]
+Kurt's script to turn Apricorns into Balls assumes they're still in the Item pocket. Fixing this is thankfully quick and easy. Edit [engine/events/kurt.asm](../blob/master/engine/events/kurt.asm). There are *five* places in the code where we need to do this:
-...
-
-Kurt_GetAddressOfApricornQuantity:
- push hl
- push bc
+```diff
- ld hl, wNumItems
+ ld hl, wNumBerries
- inc hl
-
-...
-
-Kurt_GetRidOfItem:
- push bc
-- ld hl, wNumItems
-+ ld hl, wNumBerries
- ld a, [wCurItemQuantity]
-
-...
+```
-.okay
- push bc
-- ld hl, wNumItems
-+ ld hl, wNumBerries
- ld a, b
+1. `Kurt_GetQuantityOfApricorn`
+2. `Kurt_GiveUpSelectedQuantityOfSelectedApricorn`
+3. `Kurt_GetAddressOfApricornQuantity`
+4. `Kurt_GetRidOfItem`
+5. `Kurt_GetRidOfItem.okay`
-```
-It only takes to replace `wNumItems` for `wNumBerries` throughout the file. With this simple change, whenever you talk to Kurt, the game will look at the correct pocket and will also apply any changes to the number of Apricorns you hold (taking it from your pocket in order to turn them in Balls) as intended.
+Just use your text editor to find all five occurrences of "`wNumItems`" in the file, and make that one-line change to all of them.
-Just remember, this step only needs to be made if you change the Apricorn's pocket.
## 12. Fix build errors
@@ -927,7 +896,7 @@ So, `jr` and `jp` both jump to the given label. But `jp` encodes the full two-by
```diff
TutorialPack:
...
-
+
.Items:
xor a ; ITEM_POCKET
ld hl, .ItemsMenuHeader