You are not logged in.
Pages: 1
I changed the evolution method of certain branching evolutions (like poliwhirl to politoed/poliwrath, and slowpoke to slowbro/slowking), as well as eevee to umbreon/espeon, to use evolutions stones (espeon gets sun stone, and umbreon gets moon stone). And I have noticed that the message is displayed "NOT ABLE", even though I was able to successfully evolve these pokemon.
For the sake of presentation, how would I change the "NOT ABLE" to "ABLE"?
SHF... The Most... Sinister Hooded Figure
Offline
I changed the evolution method of certain branching evolutions (like poliwhirl to politoed/poliwrath, and slowpoke to slowbro/slowking), as well as eevee to umbreon/espeon, to use evolutions stones (espeon gets sun stone, and umbreon gets moon stone). And I have noticed that the message is displayed "NOT ABLE", even though I was able to successfully evolve these pokemon.
For the sake of presentation, how would I change the "NOT ABLE" to "ABLE"?
The reason it doesn't show "ABLE" for more than 3 types of evolution stones is because the game only loads the first 13 bytes of evolution data into RAM for a pokemon. This is the routine where this happens: (Focus on the top part, where I put the comment about the 13 bytes and stuff)
; ROM offset 0x12DD1
ld de,$CD6D ; RAM ADDRESS DESTINATION
ld a,BANK(EvosMovesPointerTable)
ld bc,13 ; COPY FIRST 13 BYTES of EVOLUTION DATA INTO RAM ADDRESS $CD6D
call FarCopyData
ld hl,$CD6D ; RAM ADDRESS DESTINATION
ld de,.notAbleToEvolveText
; loop through the pokemon's evolution entries
.checkEvolutionsLoop
ld a,[hli]
and a ; reached terminator?
jr z,.placeEvolutionStoneString ; if so, place the "NOT ABLE" string
inc hl
inc hl
cp a,EV_ITEM
jr nz,.checkEvolutionsLoop
; if it's a stone evolution entry
dec hl
dec hl
ld b,[hl]
ld a,[$D156] ; evolution stone item ID
inc hl
inc hl
inc hl
cp b ; does the player's stone match this evolution entry's stone?
jr nz,.checkEvolutionsLoop
; if it does match
ld de,.ableToEvolveText
.placeEvolutionStoneString
ld bc,20 + 9 ; down 1 row and right 9 columns
pop hl
push hl
add hl,bc
call PlaceString
pop hl
jr .printLevel
.ableToEvolveText
db "ABLE@"
.notAbleToEvolveText
db "NOT ABLE@"
The solution is to copy more than 13 bytes to a different location in RAM, since you might be overwriting some important data if you just load more than 13 bytes to the same address. There is free space starting at RAM address $DEE2, so you could do it there! Just to be clear, here's what you need to do:
1. Change the byte in "ld bc,13" to "ld, bc,21". It's 8 bytes bigger because each evolution stone entry is 4 bytes long.
2. Change the two RAM addresses from "ld de,$CD6D" and "ld hl,$CD6D" to "ld de,$DEE2" and "ld hl,$CD6D".
Let me know if something isn't clear!
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
Pages: 1