r/PokemonRMXP • • 8d ago

Help Quick Fix for Pokedex-Crashing Error?

This is new for v22, I believe. I'm painstakingly porting my existing project over, map by map, modification by modification and seeing what works and what doesn't. The latest thing I discovered is the game crashes when I try and read a Pokedex entry, or when I receive a new Pokemon and the game tries to bring up the Pokedex entry.

The culprit is here on line 91: player_map_icon_filename($player.trainer_type). I'm sure of this because if I comment it out, the Pokedex works fine. So that's my fix for now but I'm sure it'll bite me in the ass again if I don't get this sorted. Where is this 086:AnimatedBitmap section the error is also pointing to?

So, anyone know where it's looking for a graphic it can't find?

1 Upvotes

3 comments sorted by

1

u/jondauthor 8d ago edited 8d ago

[Disregard my initial guess that was here]

EDIT: Actually, the full definition is just the below - so do you have a file called player_class_outfit in the ui/town map folder in the format e.g. player_POKEMONTRAINER_Leaf ?

    def self.player_map_icon_filename(tr_type)
      outfit = ($player) ? $player.outfit : 0
      return self.check_file(tr_type, "Graphics/UI/Town Map/player_", sprintf("_%d", outfit))
    end

1

u/ricnine 8d ago

That's the ticket, thanks. I've been plucking away at this game since April and I haven't even looked at the town map. Ver 21 doesn't crash without this icon unless you go to the area page of a dex entry, which I have never done before just now, to verify if it did or not.

1

u/jondauthor 8d ago

Classic of upgrading I'm afraid. Making things smarter and smoother means things start firing at different times. Good luck with the rest of the conversion! 🫡Â