- 7
- Posts
- 121
- Days
- Seen Oct 8, 2024
Hello!
I am working on my ROM hack of Pokemon Red and Blue and trying to change how the Fishing Rods work in the game.
My main objectives are:
- to make the Old Rod obtainable earlier and to have a designated pool of encounters similar to the Good Rod
- to make the Good Rod obtainable earlier and to have designated encounter tables based on location similar to the Super Rod
- to make the Super Rod have more varied encounters across more areas
Currently, I am working on the Old Rod
I have successfully created a new house in Cerulean City where players can obtain the Old Rod and I am working on modifying the Old Rod functionality so that it looks at a file similar to GoodRodMons to check which Pokemon should be encountered with a successful bite, however, the code is copied from the Good Rod code and currently only considers the first 2 encounters in the file, rather than the 10 encounters I have added.
Does anyone have any tips or ideas on ensuring the code doesn't ignore the other encounters in the encounter table?
This is the customer code I am using for the Old Rod in my ROM hack, from the file max_pokered/engine/items/item_effects.asm:
ItemUseOldRod:
call FishingInit
jp c, ItemUseNotTime
.RandomLoop
call Random
srl a
jr c, .SetBite
and %11
cp 2
jr nc, .RandomLoop
; choose which monster appears
ld hl, OldRodMons
add a
ld c, a
ld b, 0
add hl, bc
ld b, [hl]
inc hl
ld c, [hl]
and a
.SetBite
ld a, 0
rla
xor 1
jr RodResponse
INCLUDE "data/wild/old_rod.asm"
And this is the content of the file max_pokered/data/wild/old_rod.asm:
; random choice of 10 old rod encounters
OldRodMons:
; level, species
db 5, MAGIKARP
db 5, MAGIKARP
db 5, MAGIKARP
db 5, MAGIKARP
db 10, MAGIKARP
db 10, MAGIKARP
db 10, MAGIKARP
db 15, MAGIKARP
db 15, MAGIKARP
db 12, GOLDEEN
I am working on my ROM hack of Pokemon Red and Blue and trying to change how the Fishing Rods work in the game.
My main objectives are:
- to make the Old Rod obtainable earlier and to have a designated pool of encounters similar to the Good Rod
- to make the Good Rod obtainable earlier and to have designated encounter tables based on location similar to the Super Rod
- to make the Super Rod have more varied encounters across more areas
Currently, I am working on the Old Rod
I have successfully created a new house in Cerulean City where players can obtain the Old Rod and I am working on modifying the Old Rod functionality so that it looks at a file similar to GoodRodMons to check which Pokemon should be encountered with a successful bite, however, the code is copied from the Good Rod code and currently only considers the first 2 encounters in the file, rather than the 10 encounters I have added.
Does anyone have any tips or ideas on ensuring the code doesn't ignore the other encounters in the encounter table?
This is the customer code I am using for the Old Rod in my ROM hack, from the file max_pokered/engine/items/item_effects.asm:
ItemUseOldRod:
call FishingInit
jp c, ItemUseNotTime
.RandomLoop
call Random
srl a
jr c, .SetBite
and %11
cp 2
jr nc, .RandomLoop
; choose which monster appears
ld hl, OldRodMons
add a
ld c, a
ld b, 0
add hl, bc
ld b, [hl]
inc hl
ld c, [hl]
and a
.SetBite
ld a, 0
rla
xor 1
jr RodResponse
INCLUDE "data/wild/old_rod.asm"
And this is the content of the file max_pokered/data/wild/old_rod.asm:
; random choice of 10 old rod encounters
OldRodMons:
; level, species
db 5, MAGIKARP
db 5, MAGIKARP
db 5, MAGIKARP
db 5, MAGIKARP
db 10, MAGIKARP
db 10, MAGIKARP
db 10, MAGIKARP
db 15, MAGIKARP
db 15, MAGIKARP
db 12, GOLDEEN