Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2018-08-09 05:08:01

Fotomac
Member
Registered: 2015-10-25
Post 323/332

Expanding the wild encounter slot count from 10 to 12

I had some trouble with it during development of my pokered hack, so I figured it's only fair that I make a tutorial on how to successfully accomplish it.

1. The easiest step: add two slots to every file in the data/wildPokemon folder.

2. In "engine/battle/wild_encounters.asm", scroll down to WildMonEncounterSlotChances. Change the following:

db $32, $00 ; 51/256 = 19.9% chance of slot 0
    db $65, $02 ; 51/256 = 19.9% chance of slot 1
    db $8C, $04 ; 39/256 = 15.2% chance of slot 2
    db $A5, $06 ; 25/256 =  9.8% chance of slot 3
    db $BE, $08 ; 25/256 =  9.8% chance of slot 4
    db $D7, $0A ; 25/256 =  9.8% chance of slot 5
    db $E4, $0C ; 13/256 =  5.1% chance of slot 6
    db $F1, $0E ; 13/256 =  5.1% chance of slot 7
    db $FC, $10 ; 11/256 =  4.3% chance of slot 8
    db $FF, $12 ;  3/256 =  1.2% chance of slot 9

to:

db $32, $00 ; 51/256 = 19.9% chance of slot 0
    db $65, $02 ; 51/256 = 19.9% chance of slot 1
    db $7E, $04 ; 25/256 = 9.8% chance of slot 2
    db $97, $06 ; 25/256 =  9.8% chance of slot 3
    db $B0, $08 ; 25/256 =  9.8% chance of slot 4
    db $C9, $0A ; 25/256 =  9.8% chance of slot 5
    db $D6, $0C ; 13/256 =  5.1% chance of slot 6
    db $E3, $0E ; 13/256 =  5.1% chance of slot 7
    db $EE, $10 ; 11/256 =  4.3% chance of slot 8
    db $F9, $12 ; 11/256 =  4.3% chance of slot 9
    db $FC, $14 ;  3/256 =  1.2% chance of slot 10
    db $FF, $16 ;  3/256 =  1.2% chance of slot 11

That doesn't end there, though!

3. AKA the most obscure part of it. You have to look for where it's defined in RAM. For this part, we'll go into "engine/overworld/wild_mons.asm". There, change every instance you see of "ld bc, $0014" to "ld bc, $0018".

That should be about it.

Offline

#3 2019-12-10 16:42:17

RetroKingofHarts
New member
Registered: 2019-08-27
Post 5/5

Re: Expanding the wild encounter slot count from 10 to 12

I like this... I'll be doing this, along with making tweaks to how levels are determined.

I plan on making my hack choose the mon's level from a range, instead of from the WildMons table

Offline

Board footer

Powered by FluxBB