Mercurial > vba-clojure
changeset 150:544a97ac3d8a
discovered location of pokemon OT IDs.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 20 Mar 2012 00:38:03 -0500 |
parents | 79ffbd639b41 |
children | ced1c4cd1eea |
files | clojure/com/aurellem/exp/pokemon-layout clojure/com/aurellem/exp/pokemon.clj |
diffstat | 2 files changed, 36 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/exp/pokemon-layout Mon Mar 19 23:27:43 2012 -0500 1.2 +++ b/clojure/com/aurellem/exp/pokemon-layout Tue Mar 20 00:38:03 2012 -0500 1.3 @@ -18,8 +18,8 @@ 1.4 D173 1.5 D174 1.6 D175 1.7 -D176 1.8 -D177 1.9 +D176 / Pokemon 1 OT ID 1.10 +D177 \ 1.11 D178 1.12 D179 1.13 D17A 1.14 @@ -62,8 +62,8 @@ 1.15 D19F 1.16 D1A0 1.17 D1A1 1.18 -D1A2 1.19 -D1A3 1.20 +D1A2 / Pokemon 2 OT ID 1.21 +D1A3 \ 1.22 D1A4 1.23 D1A5 1.24 D1A6 1.25 @@ -106,8 +106,8 @@ 1.26 D1CB 1.27 D1CC 1.28 D1CD 1.29 -D1CE 1.30 -D1CF 1.31 +D1CE / Pokemon 3 OT ID 1.32 +D1CF \ 1.33 D1D0 1.34 D1D1 1.35 D1D2 1.36 @@ -150,8 +150,8 @@ 1.37 D1F7 1.38 D1F8 1.39 D1F9 1.40 -D1FA 1.41 -D1FB 1.42 +D1FA / Pokemon 4 OT ID 1.43 +D1FB \ 1.44 D1FC 1.45 D1FD 1.46 D1FE 1.47 @@ -195,8 +195,8 @@ 1.48 D224 1.49 D225 1.50 D226 1.51 -D227 1.52 -D228 1.53 +D227 / Pokemon 5 OT ID 1.54 +D228 \ 1.55 D229 1.56 D22A 1.57 D22B 1.58 @@ -238,8 +238,8 @@ 1.59 D24F 1.60 D250 1.61 D251 1.62 -D252 1.63 -D253 1.64 +D252 / Pokemon 6 OT ID 1.65 +D253 \ 1.66 D254 1.67 D255 1.68 D256
2.1 --- a/clojure/com/aurellem/exp/pokemon.clj Mon Mar 19 23:27:43 2012 -0500 2.2 +++ b/clojure/com/aurellem/exp/pokemon.clj Tue Mar 20 00:38:03 2012 -0500 2.3 @@ -489,3 +489,27 @@ 2.4 ;; But not if you set it to your own name, obviously. 2.5 2.6 2.7 + 2.8 + 2.9 +;; OT ID Numbers. 2.10 +;; my own id is 05195. A quick search of memory between 2.11 +;; 0xD162 and 0xD31B revealed the pattern 0x144B exactly 2.12 +;; six times. 2.13 + 2.14 +;; the locations were: 2.15 + 2.16 +(def OT-ID-addresses [0xD176 0xD1A2 0xD1CE 0xD1FA 0xD228 0xD252]) 2.17 + 2.18 + 2.19 +(defn set-pokemon-id 2.20 + ([^SaveState state n new-id] 2.21 + (assert (<= 0 n (dec (party-number state)))) 2.22 + (assert (<= 0 new-id 0xFFFF)) 2.23 + (set-memory-range 2.24 + state 2.25 + (OT-ID-addresses n) 2.26 + [(bit-and new-id 0xFF00) 2.27 + (bit-and new-id 0xFF)])) 2.28 + ([n new-id] 2.29 + (set-pokemon-id n new-id))) 2.30 + 2.31 \ No newline at end of file