Skip to content

Fix the TCard trainer resource naming

Rey requested to merge TheRey/pokemonsdk:demo/fix_tcard into development

MR Description

  • This MR fixes a behaviour problem concerning the TCard UI. By default, the system uses the charset_base registered to get the trainer sprite.
  • This means that when using the current demo's way, this won't be a problem, but using set_appearance_set the way it was intended to won't work: having the two characters following the same charset_base name would make it so that there won't be a trainer sprite.
  • Of course, this MR adds no regression as the old code is still kept and will be used if the charset_base + '_m' or '_f' file is not found.

Note to acknowledge before testing

  • This new behaviour is featured in the current test of the new demo

Tests to realize

  • On the current demo, create a new save and check the TCard: the trainer sprite should still appear (make sure to check if you have the proper files in graphics\interface\tcard, which should be "hero_01_red.png" and "hero_01_white.png"
  • Change the set_appearance_set parameter to something like "player" and rename the two files to player_m.png and player_f.png: you should continue to see the trainer sprite in the TCard UI.
Edited by Zøzo

Merge request reports