Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - XTFOX

Pages: [1]
1
Has anybody tried writing scripts to sections of pokemon data for easy storage? I'd like to be able to just use " call nn " to the address of the script rather than editing items each time.

Code: [Select]
call ZZYY
ret

Items:
  • Pokeball x205
  • YY x ZZ (because little endian)
  • TM01x any
Something like above would allow easy access to any script and changing the script would be as simple as swapping item YY x ZZ. For example if I were to have the following code as the first 3 items in the PC and wanted to copy it to Pokemon 4 in party's moves:

Code: [Select]
Box Items:

D53B-D53C: ld h, D3 ;Carbos x 211
D53D-D53E: ld l, 22 ;X Accuracy x 34
D53F:    jp hl ;TM 33 x Any

Code: [Select]
Start of destination WWVV (D1F7)
Start of target code UUTT (D53B)
End of target code ??ZZ +1 (D1FB+1 = D1FC)
Note that all inc b are filler.

Code Value Item Breakdown
inc b ; Pokeball
ld d, UU ;D5 x22 && TM13
inc b ; x04
ld e, TT ;3B Repel x59
ld h, WW ;D1 Carbos x209
ld l, VV ;F7 X Accuracy x247
inc b ; Pokeball
ld a, (de) ; x26
inc de ; Super Potion
ld (hl+),A ; x34
ld a, ZZ ;FC Lemonade x252
inc b ; Pokeball
cp l ; x189
jr nz, F7 ; Fire Stone x247
ret ; TM01

Your Items:
  • Item 3:  Pokeball x 22
  • Item 4:  TM13 x 04
  • Item 5:  Repel x 59
  • Item 6:  Carbos x 209
  • Item 7:  X Accuracy x 247
  • Item 8:  Pokeball x 26
  • Item 9:  Super Potion x 34
  • Item 10: Lemonade x 252
  • Item 11: Pokeball x 189
  • Item 12: Fire Stone x 247
  • Item 13: TM01 x Any

This is just a proof of concept, ideally anybody could change the values of X Accuracy, Carbos, Repel, and Lemonade to make a new destination or starting point for any length script. Note that if you are storing the script to be copied in your item box then TM13 (D5) will never need to change. Finally this current set up is used to copy a bootstrap to Tentacool when using the Pidgey (233 HP), Parasect, Onix, Tentacool, and Kangaskhan bootstrap. This will allow you to use the following pokemon as a bootstrap:
  • Pokemon 1: Tentacool (modified by script)
  • Pokemon 2: Grimer
  • Pokemon 3: Any
  • Pokemon 4: Any
  • Pokemon 5: Any

Note that 3, 4 or 5 pokemon can be used as long as the first 2 slots are correct. Anybody have ideas of where to store the scripts? Also does anybody know if hacked pokemon are tradeable on 3DS versions of RBY?

EDIT: Also I didn't think about this while I was writing but this could be used to copy any sections of ram, for example pokemon or item duplication.
2
Ok that 8F Bootstrap is too complicated.  I made a new (simplified) one based off the original one.  Could someone confirm my work?

Pokemon with values in hex after:

6 pokemon [06]
Onix [22]
Pidgey [24]
Pidgey [24]
Jolteon [68]
Tentacool [18]
Pick a pokemon based off Onix's stats

Onix 233 attack > Kadabra [26]
Onix 233 defense > Chansey [28] (Used Below)
Onix 233 speed > Mr. Mime [2A]
Onix 233 Special > Hitmonchan [2C]

Realistically any of the first 4 Pokemon with a 233 stat could work assuming the corresponding hex offset exists as a pokemon.  For example using the 2nd Pidgey's speed doesn't work because the 6th pokemon would need a hex value of 56 which is a MissingNo.

Code: [Select]
; -- Initial value of hl: D163
WRA1:D163 06 22            ld   b,22    ;  b = 22
WRA1:D165 24               inc  h       ; hl = D263
WRA1:D166 24               inc  h       ; hl = D363
WRA1:D167 68               ld   l,b     ; hl = D322
WRA1:D168 18 28            jr   D16A + 28 = D192

WRA1:D192 E9               jp   hl


Just a note I only read the first post, if I am recreating somebody's work and claiming it as my own I apologize.

EDIT: Found the wiki! Looks like a similar one has already been made that also only requires one specific stat.  Though the ability to choose any stat and just change the 6th pokemon is still cool seeing as the wiki one requires Pidgey 233 hp because it uses Pidgey's ID a 2nd time to Inc H. 

Also has anybody tried to figure out why 8F accesses D163?  I looked at the pokemon red dissasembly item page and couldn't figure it out.
Pages: [1]