Jump to content

Artificial Trainer class: Difference between revisions

→‎Requirements: Talk:Connection copier
m (Text replacement - "(\bld(?:|i|l|d|h) (?:.+, ?)?)\((.+)\)" to "$1[$2]")
(→‎Requirements: Talk:Connection copier)
 
(One intermediate revision by the same user not shown)
Line 24:
0) To have mastered [[Celadon looping map glitch]] and to know how to destroy Cancel buttons.
 
1) ws m (0x63) bootstrapped to D321. C3 21 D3 at 0xDA7F will do the trick. You can use map script abuse or [[Connection Copier]] to write these values.
 
2) 4F (0x59) bootstrapped to D330. C3 30 D3 at 0xDA64 (technically 0xFA64; this might matter if you're using a bad emulator) will do this. This can be achieved with the same methods as 1).
 
3) TheAn followingitem code beginninglist from item 3 (no unterminated-name or lag glitch items, however those should be avoided with B-Button when you encounter them with Celadon looping map glitch):
 
====Item list====
Steps (code/items from below must be stored in the memory):
 
1) Use ws m. It appears 'nothing happened', but it actually copied data from ROM into RAM at DA7F (stored Pokémon).
 
2) Adjust Lemonade x0's quantity and use 4F immediately after using ws m to enter the battle with a Trainer class based on Lemonade's quantity.
 
@D321 (item 3) (routine copier)
 
ld a,3d
ld hl,5ff2
ld bc,0244
ld de,da7f
call 009d
ret
 
: Calls FarCopyData with source as 3D:5FF2, bytes to copy as 0x244 and destination as DA7F (modifies ws m)
 
@D330 (item 10 quantity) (pseudo-Game Genie and battle activator)
 
ld hl,dabb
ld a,3e
ldi [hl],a
inc b
ld a,[desired trainer class; d338]
ldi [hl],a
inc b
ld a,ff
ld [d058],a
inc b
inc b
ld b,3d
ld hl,da7f
call 3e84
ret
 
: 'Patches' DABB. This should be sub a,c8 (take the Trainer escape ID and subtract 200 to get Trainer class) but instead we change it to ld a, xx; allowing us to battle any Trainer class we want. D058 is set to a non-00 value, the bank is switched back to 0x3D and we run the code we copied to DA7F and modified with the patch.
 
The entirety of this code fills the item pack and touches money byte 1, so don't win any money from the trainer if you want to battle more than one in one session. The unique Trainer AIs you can access this way however may stop you and result in a freeze. TM55 (Trainer (actual):255) has an interesting AI which sends you to Victory Road.
 
The item list from item 3 is as such:
Line 112 ⟶ 75:
 
i23 (rival name 1/2) : Lemonade x201
 
 
====Steps====
 
(Requires items from above):
 
1) Use ws m. It appears 'nothing happened', but it actually copied data from ROM into RAM at DA7F (stored Pokémon).
 
2) Adjust Lemonade x0's quantity and use 4F immediately after using ws m to enter the battle with a Trainer class based on Lemonade's quantity.
 
A save file with this glitch set up called "all glitch trainers" is available [https://sites.google.com/site/torchickens2/pokemon-save-files on Torchickens' Google Sites]. You may modify item 14's quantity to explore all 256 Trainers. Note the Lemonade x0 means Lemonade x256. You can toss from this quantity as if it was valid, to access roster 256 (no tossing) or rosters 1-255 (tossing).
 
====Breakdown of code====
 
@D321 (item 3) (routine copier)
 
ld a,3d
ld hl,5ff2
ld bc,0244
ld de,da7f
call 009d
ret
 
: Calls FarCopyData with source as 3D:5FF2, bytes to copy as 0x244 and destination as DA7F (modifies ws m)
 
@D330 (item 10 quantity) (pseudo-Game Genie and battle activator)
 
ld hl,dabb
ld a,3e
ldi [hl],a
inc b
ld a,[desired trainer class; d338]
ldi [hl],a
inc b
ld a,ff
ld [d058],a
inc b
inc b
ld b,3d
ld hl,da7f
call 3e84
ret
 
: 'Patches' DABB. This should be sub a,c8 (take the Trainer escape ID and subtract 200 to get Trainer class) but instead we change it to ld a, xx; allowing us to battle any Trainer class we want. D058 is set to a non-00 value, the bank is switched back to 0x3D and we run the code we copied to DA7F and modified with the patch.
 
The entirety of this code fills the item pack and touches money byte 1, so don't win any money from the trainer if you want to battle more than one in one session. The unique Trainer AIs you can access this way however may stop you and result in a freeze. TM55 (Trainer (actual):255) has an interesting AI which sends you to Victory Road.
 
==Attribution==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.