summaryrefslogtreecommitdiff
path: root/Adding-items-that-act-like-HMs.md
diff options
context:
space:
mode:
Diffstat (limited to 'Adding-items-that-act-like-HMs.md')
-rw-r--r--Adding-items-that-act-like-HMs.md25
1 files changed, 24 insertions, 1 deletions
diff --git a/Adding-items-that-act-like-HMs.md b/Adding-items-that-act-like-HMs.md
index 4b8f350..5b03f06 100644
--- a/Adding-items-that-act-like-HMs.md
+++ b/Adding-items-that-act-like-HMs.md
@@ -179,4 +179,27 @@ All of these are in [engine/events/overworld.asm](../blob/master/engine/events/o
* `Script_UsedStrength`
* Flash does not show the Pokémon's name
* `Script_UsedWhirlpool`
-* `Script_UsedWaterfall` \ No newline at end of file
+* `Script_UsedWaterfall`
+
+### Using the item as default on the overworld
+
+Even with the item added and it being functional, the game will still check for a pokemon in the party to use the HM move when attempting to interact with a cuttable tree on the overworld. This is a simple fix.
+
+If we look in [engine/events/overworld.asm](../blob/master/engine/events/overworld.asm) at the bottom, we'll see `TryCutOW`. This function is called when the player interacts with a cuttable tree, normally it checks the party first for a pokemon with cut, then for the appropriate badge, so we'll change it.
+
+```Diff
+TryCutOW::
+- ld d, CUT
+- call CheckPartyMove
+- jr c, .cant_cut
+
+- ld de, ENGINE_HIVEBADGE
+- call CheckEngineFlag
++ ld a, CHAINSAW
++ ld [wCurItem], a
++ ld hl, wNumItems
++ call CheckItem
+ jr c, .cant_cut
+```
+
+This removes the checks for an eligible pokemon and badge, and just checks for the item in the bag. \ No newline at end of file