summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Replace-stat-experience-with-EVs.md65
1 files changed, 65 insertions, 0 deletions
diff --git a/Replace-stat-experience-with-EVs.md b/Replace-stat-experience-with-EVs.md
index ec9a629..fe3586a 100644
--- a/Replace-stat-experience-with-EVs.md
+++ b/Replace-stat-experience-with-EVs.md
@@ -15,6 +15,7 @@ Gen 3 replaced stat experience with EVs, which are different in a number of ways
8. [Replace some more labels](#8-replace-some-more-labels)
9. [Remove unused square root code](#9-remove-unused-square-root-code)
10. [Add Zinc to boost Special Defense EVs](#10-add-zinc-to-boost-special-defense-evs)
+11. [Replace stat experience with EVs in the Debug Room](#11-replace-stat-experience-with-evs-in-the-debug-room)
## 1. Replace stat experience with EVs in the Pokémon data structure
@@ -705,6 +706,70 @@ That's all!
![Screenshot](screenshots/zinc.png)
+
+## 11. Replace stat experience with EVs in the Debug Room
+
+This is only relevant if you're building a debug ROM. If you're not, you can skip this step.
+
+The "POKéMON GET!" option in the Debug Room creates a Pokémon by manually entering each field of its `party_struct`. We need to change the stat experience fields to EVs, otherwise the debug ROM can't be assembled.
+
+Edit [engine/debug/debug_room.asm](../blob/master/engine/debug/debug_room.asm):
+
+```diff
+ DebugRoomMenu_PokemonGet_Page2Values:
+- db 8
+- paged_value wDebugRoomMonHPExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.HPExp0, NULL, FALSE
+- paged_value wDebugRoomMonHPExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.HPExp1, NULL, FALSE
+- paged_value wDebugRoomMonAtkExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.AttkExp0, NULL, FALSE
+- paged_value wDebugRoomMonAtkExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.AttkExp1, NULL, FALSE
+- paged_value wDebugRoomMonDefExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.DfnsExp0, NULL, FALSE
+- paged_value wDebugRoomMonDefExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.DfnsExp1, NULL, FALSE
+- paged_value wDebugRoomMonSpdExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.SpeedExp0, NULL, FALSE
+- paged_value wDebugRoomMonSpdExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.SpeedExp1, NULL, FALSE
++ db 6
++ paged_value wDebugRoomMonHPEV, $00, $ff, $00, DebugRoom_BoxStructStrings.HPEV, NULL, FALSE
++ paged_value wDebugRoomMonAtkEV, $00, $ff, $00, DebugRoom_BoxStructStrings.AttackEV, NULL, FALSE
++ paged_value wDebugRoomMonDefEV, $00, $ff, $00, DebugRoom_BoxStructStrings.DefenseEV, NULL, FALSE
++ paged_value wDebugRoomMonSpdEV, $00, $ff, $00, DebugRoom_BoxStructStrings.SpeedEV, NULL, FALSE
++ paged_value wDebugRoomMonSpclAtkEV, $00, $ff, $00, DebugRoom_BoxStructStrings.SpclAtkEV, NULL, FALSE
++ paged_value wDebugRoomMonSpclDefEV, $00, $ff, $00, DebugRoom_BoxStructStrings.SpclDefEV, NULL, FALSE
+
+
+ DebugRoomMenu_PokemonGet_Page3Values:
+- db 8
+- paged_value wDebugRoomMonSpcExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.SpclExp0, NULL, FALSE
+- paged_value wDebugRoomMonSpcExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.SpclExp1, NULL, FALSE
++ db 6
+ paged_value wDebugRoomMonDVs+0, $00, $ff, $00, DebugRoom_BoxStructStrings.PowerRnd0, NULL, TRUE
+ paged_value wDebugRoomMonDVs+1, $00, $ff, $00, DebugRoom_BoxStructStrings.PowerRnd1, NULL, TRUE
+ paged_value wDebugRoomMonPP+0, $00, $ff, $00, DebugRoom_BoxStructStrings.PP1, NULL, FALSE
+ paged_value wDebugRoomMonPP+1, $00, $ff, $00, DebugRoom_BoxStructStrings.PP2, NULL, FALSE
+ paged_value wDebugRoomMonPP+2, $00, $ff, $00, DebugRoom_BoxStructStrings.PP3, NULL, FALSE
+ paged_value wDebugRoomMonPP+3, $00, $ff, $00, DebugRoom_BoxStructStrings.PP4, NULL, FALSE
+```
+
+```diff
+ DebugRoom_BoxStructStrings:
+ ...
+-.HPExp0: db "HP EXP[0]@"
+-.HPExp1: db "HP EXP[1]@"
+-.AttkExp0: db "ATTK EXP[0]@"
+-.AttkExp1: db "ATTK EXP[1]@"
+-.DfnsExp0: db "DFNS EXP[0]@"
+-.DfnsExp1: db "DFNS EXP[1]@"
+-.SpeedExp0: db "SPEED EXP[0]@"
+-.SpeedExp1: db "SPEED EXP[1]@"
+-.SpclExp0: db "SPCL EXP[0]@"
+-.SpclExp1: db "SPCL EXP[1]@"
++.HPEV: db "HP EV@"
++.AttackEV: db "ATTACK EV@"
++.DefenseEV: db "DEFENSE EV@"
++.SpeedEV: db "SPEED EV@"
++.SpclAtkEV: db "SPCL ATK EV@"
++.SpclDefEV: db "SPCL DEF EV@"
+ ...
+```
+
TODO: limit total EVs to 510.
TODO: add Macho Brace.