summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Running-Shoes.md52
-rw-r--r--Tutorials.md1
2 files changed, 53 insertions, 0 deletions
diff --git a/Running-Shoes.md b/Running-Shoes.md
new file mode 100644
index 0000000..10de40c
--- /dev/null
+++ b/Running-Shoes.md
@@ -0,0 +1,52 @@
+The simplest possible way to implement Running Shoes is to double the player's walking speed, just like the Bicycle, if you're holding the B button. Don't bother to disable running indoors like Gen 3, or have a permanent toggle like Gen 4.
+
+This is easy to do, as discovered by [Victoria Lacroix](https://github.com/VictoriaLacroix/pokecrystal/commit/ed7f525d642cb02e84e856f2e506d2a6425d95db). Just edit [engine/overworld/player_movement.asm](../blob/master/engine/overworld/player_movement.asm):
+
+```diff
+ DoPlayerMovement:: ; 80000
+
+ ...
+
+ ; Downhill riding is slower when not moving down.
++ call .RunCheck
++ jr z, .fast
+ call .BikeCheck
+ jr nz, .walk
+
+ ...
+
+ .fast
+ ld a, STEP_BIKE
+ call .DoStep
+ scf
+ ret
+
+ .walk
+ ld a, STEP_WALK
+ call .DoStep
+ scf
+ ret
+
+ ...
+
+ .BikeCheck: ; 803ca
+ ld a, [wPlayerState]
+ cp PLAYER_BIKE
+ ret z
+ cp PLAYER_SKATE
+ ret
++
++.RunCheck:
++ ld a, [wPlayerState]
++ cp PLAYER_NORMAL
++ ret nz
++ ld a, [hJoypadDown]
++ and B_BUTTON
++ cp B_BUTTON
++ ret
+ ; 803d3
+```
+
+That's it!
+
+If you want Running Shoes to have a speed in-between walking and biking... that's more complicated. I'll update this tutorial if I ever figure out how to do that.
diff --git a/Tutorials.md b/Tutorials.md
index c841e7a..a3b42a7 100644
--- a/Tutorials.md
+++ b/Tutorials.md
@@ -36,3 +36,4 @@ Tutorials may use diff syntax to show edits:
- [Physical/Special split](Physical-Special-split)
- [Infinitely reusable TMs](Infinitely-reusable-TMs)
- [Automatically reuse Repel](Automatically-reuse-Repel)
+- [Running Shoes](Running-Shoes)