- 367
- Posts
- 6
- Years
- Seen Nov 16, 2024
I have been working on a hack using Pokecrystal and have encoutered a strange bug. This bug first began after I swapped out the Pokemon constants with my new Pokedex. This took quite some time, as after swapping out all Pokemon, I needed to go through and remove references to all of the removed Pokemon so that the ROM would compile. I have done this type of hack before without issue, but this time, I got this bug after recompiling.
The particular bug is that, when any Pokemon uses any damage dealing attack, it always reduces the opponent's HP to zero. I am confused, as I did not change anything related to damage calculation. The Pokemon's base stats are displayed correctly on the stats menu, as is the base power of the attacks, so I know that the stats are being read in properly, and aren't due to the new Pokemon not being assigned correctly or something like that.
The only things I modified in the core.asm file were commenting out the checks for UNOWN and MAGIKARP, instead having the code fallthrough or jump to the label that is used for the case that the Pokemon is not one of the above cases. I did not modify the effectcommands.asm file, where the battle damage routine is located, at all.
One difference in this hack, and a similar one I did previously without experiencing this bug, was that I removed many of the maps from the game via commenting them out. I am certain that I lined everything up properly, as all of my newly added maps load and connect properly. (These maps worked fine without this bug occurring prior to the Pokemon swap, so I am certain it is not due to the new maps).
My question is if anyone knows about how something could effect the damage calculation, and what files could affect this if they were modified. It seems this error must be caused by some file modified to have a specific map contant or atteibute removed, but I'm not sure where to look. Any help would be greatly appreciated, thanks!
The particular bug is that, when any Pokemon uses any damage dealing attack, it always reduces the opponent's HP to zero. I am confused, as I did not change anything related to damage calculation. The Pokemon's base stats are displayed correctly on the stats menu, as is the base power of the attacks, so I know that the stats are being read in properly, and aren't due to the new Pokemon not being assigned correctly or something like that.
The only things I modified in the core.asm file were commenting out the checks for UNOWN and MAGIKARP, instead having the code fallthrough or jump to the label that is used for the case that the Pokemon is not one of the above cases. I did not modify the effectcommands.asm file, where the battle damage routine is located, at all.
One difference in this hack, and a similar one I did previously without experiencing this bug, was that I removed many of the maps from the game via commenting them out. I am certain that I lined everything up properly, as all of my newly added maps load and connect properly. (These maps worked fine without this bug occurring prior to the Pokemon swap, so I am certain it is not due to the new maps).
My question is if anyone knows about how something could effect the damage calculation, and what files could affect this if they were modified. It seems this error must be caused by some file modified to have a specific map contant or atteibute removed, but I'm not sure where to look. Any help would be greatly appreciated, thanks!