First off, please accept my apologies I've posted this in the wrong forum. I wasn't really sure whether this counts as research or discussion.
One thing that really bugs me about BDSP is how any Pokemon not part of the original D/P 151, for example any rare spawns you catch in the Underground, have a dex number of ??? until you get the National Dex. I've been tinkering with the game's assets, and I'm trying to see if it is possible to add or remove mons from the Sinnoh dex as a way of getting around this. So far, I've made some progress, but I keep running into a brick wall.
In AssetHelper/Pml/personal_masterdatas/PersonalTable, each Pokemon has an entry (chihou_zukan_no) which you can edit to change their dex number in the Sinnoh regional dex. By default, everything outside the regional dex has this set as -1. In theory, you could swap some mons into the Sinnoh dex by setting this number to whichever number you wish, and then remove mons by setting their number to -1.
By doing this, I've been able to give some Underground Pokemon dex numbers. For example, in the picture below, I've replaced Happiny with Togepi by setting Happiny's number to -1 and Togepi's to 96.
The problem is that even though Togepi is now Sinnoh Pokemon 96, in the actual Pokedex it doesn't appear. On the Pokedex screen, slot 96 is unrevealed, presumably still held by Happiny.
I'm presuming there's a separate file that handles which Pokemon should be displayed on the dex screen. Does anyone have any ideas?