Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2020-07-24 02:14:19

Ferropexola
Member
Registered: 2020-06-08
Post 15/30

Pokedex glitched

After adding two more Pokemon to the game, the Pokedex is now glitched out on every entry, and I don't know why that is.


Just because you can, doesn't mean you have to.

Offline

#2 2020-07-24 14:57:48

ElectroMan
New member
Registered: 2018-05-14
Post 7/7

Re: Pokedex glitched

That's a very vague question. We cannot determine off-hand what it was that broke it, you'd have to show your changes. Ideally in a git diff format.

Offline

#3 2020-07-25 00:03:58

Ferropexola
Member
Registered: 2020-06-08
Post 16/30

Re: Pokedex glitched

Here is the constants. Adding in #252 was fine. Adding in Honchkrow is what killed the Pokedex.

const CELEBI     ; fb
const SKARMINI   ; fc
const HONCHKROW  ; fd
NUM_POKEMON EQU const_value - 1
const EGG        ; fe

Compared to the original

const CELEBI     ; fb
NUM_POKEMON EQU const_value - 1
const_skip       ; fc
const EGG        ; fd

I don't know if this is where the problem is. If not, I can post more code.


Just because you can, doesn't mean you have to.

Offline

#4 2020-07-26 18:34:42

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,189/1,193

Re: Pokedex glitched

Most likely, the problem is just with old save files.
When you add new Pokemon (specifically, once you add 2 or more new Pokemon), the bit arrays in the save file, wPokedexOwned and wPokedexSeen, grow larger.
This makes the new ROM incompatible with old save files, because it will look at the wrong location in the old save file for the bit arrays.

This also shifts the rest of the save file data too, causing many compatibility issues. This can be mostly fixed by just moving wPokedexSeen to an unused space in the save file.
Here is an example of making that fix. If you refer to that commit, you only need to look at the changes made to wram.asm and engine/save.asm.

Last edited by Danny-E 33 (2020-07-26 19:52:19)

Offline

#5 2020-07-26 19:29:27

Ferropexola
Member
Registered: 2020-06-08
Post 17/30

Re: Pokedex glitched

I deleted all old save data, and it's still glitched out. I can't tell what causes it. The first Pokemon I added didn't change the Pokedex, so I have no idea why Honchkrow did.


Just because you can, doesn't mean you have to.

Offline

#6 2020-07-26 19:51:58

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,190/1,193

Re: Pokedex glitched

Sorry, disregard my previous comment. I didn't see that you were talking about gen 2 and not gen 1.
Regardless, it's impossible to help with so little provided information.
You did not describe the changes you made and you did not even describe the glitch you are observing. There are countless possible mistakes that could be the cause.

Offline

#7 2020-07-26 22:29:27

Ferropexola
Member
Registered: 2020-06-08
Post 19/30

Re: Pokedex glitched

data/pokemon/names.asm
...
db "Celebi@@@@"
+ db "Skarmini@@"
+ db "Honchkrow@"
db "Egg@@@@@"
db "?????@@@@@"
db "?????@@@@@"
Switched Egg with Honchkrow

data/pokemon/dex_entries.asm
....
CelebiPokedexEntry::     INCLUDE "data/pokemon/dex_entries/celebi.asm"
+SkarminiPokedexEntry::   INCLUDE "data/pokemon/dex_entries/skarmini.asm"
+HonchkrowPokedexEntry::  INCLUDE "data/pokemon/dex_entries/honchkrow.asm"

data/pokemon/dex_entry_pointers.asm
....
dw CelebiPokedexEntry
+ dw SkarminiPokedexEntry
+ dw HonchkrowPokedexEntry

These are all the changes I've made to existing files that I think would cause problems, including the previous pokemon_constants.asm. If none of these files are the problem, then I have no idea. They are mostly graphical glitches, causing all sorts of letters and symbols to appear on screen. Misdreavus crashes the game. Corsola doesn't even load, just stays on a white screen when you catch it. Honchkrow loads up a glitched page, and then after that, continues as normal until the battle ends. When it does, it says that you picked up a glitched amount of money. This glitch is really weird.


Just because you can, doesn't mean you have to.

Offline

Board footer

Powered by FluxBB