# HGSS Trainer Card Scene

Pokémon Essentials Version
What's this?
A "port" of the Trainer Card from Pokémon HeartGold and SoulSilver, with a few small changes to accomodate it for a single screen. It appends some small features to the PokeBattle_Trainer class, too.
Oh, and, you'll want to use a 80x80 (doubled for Essentials as 160x160) trainer sprite not the default Gen 3 ones, or it'll be slightly misaligned.

Features
• Up to six different card designs based on Trainer Card level. See its Bulbapedia article for more information or ideas on how to implement them.
• Animated background.
• Flippable! You're not constrained by a single front view of the Trainer Card.
• Supports the player's "Trainer Class". This is "PKMN Trainer" by default
• Records the Hall of Fame debut time.
• Records "Score", a variable used in Gen IV games. See its Bulbapedia article for more information or ideas on how to implement it.
• Room for several of your own variables. Want to track how many battles the player has won? How many berries have they picked? How many eggs have they hathed? Go nuts.
• Support for up to sixteen badges.
• Support for "Battle Points", to use as a currency, or however you see fit.

Show me the goods!

Installation
Delete your Pictures/Trainer Card folder. You don't need any file from it.
Unzip the rar file into the /Pictures/Folder. You should have a "Trainer Card" folder inside Pictures, basically.
Paste the script in a new script section above Main. You don't need to touch any existing script section, as this simply "overwrites" them automatically.

Get the graphics here:
Mega
Dropbox

Get the script here:
Pastebin V17 (Bug fixed, thanks Vendily) V17
Pastebin V18 (V18 fix by HDrawer) Should also be V18.1-compatible but untested.

Usage
Search the script for the instances of "STRING X" and $game_variables[100] to change those lines into tracking whatever variables you want. Documentation You can modify any of the existing new variables: •$Trainer.bp → An integer. In my game, I'm using it as a currency. It is 0 by default. You could for example call "$Trainer.bp+=100" to add 100 BP. •$Trainer.score → An integer. Starts at 0. See how to manage BP to change this value.
• $Trainer.stars → An integer. Starts at 0. Setting it to 0-5 will change the Trainer Card design and nothing else. •$Trainer.halloffame → An array. Starts empty ("[]"). When the Hall of Fame first records the player's game time (method writeTrainerData), the player's current game time and date will be stored and then displayed on the back of the Trainer Card.
• $Trainer.tclass → A string, Starts as "PKMN Trainer". This value changes the trainer's "full name", normally unused for the player, but displayed on the back of the Trainer Card as an example. You could let the player type it themselves. You could also for example change it by calling$Trainer.tclass="Cooltrainer".
• Feel free to reply to this resource's thread, and then DM me on Discord for help/bugfixing/...
• Yes, there are some poor code practises here and there, I'm not Code Mesiah. Feel free to send me any improvements and I'll update it and include you in the credits.
Credits

Mr. Gela/theo#7722

Por favor da créditos si lo utilizas a:
Mr. Gela/theo#7722

Por favor no redistribuyas este recurso en ningún otro lugar. Si quieres compartir esto, utiliza un enlace a este sitio.
Author
Mr. Gela
Views
1,859
First release
Last update
Rating
5 ratings

1. ### V18 Fix

INITIALMONEY constant renamed INTIAL_MONEY V18 fix
2. ### V18 compatible

Check the new V18-compatible installation
3. ### Bug fix 1

Thanks Vendily for the report. You may have encountered this bug if not using a new save file to...

### Latest reviews

I really really love this script but I getting a script error in v18 anytime I test a battle
In version 18 when you open it an unexpected error occurs
Really enjoyed.

In place of eight badges, I’ll put ribbons
Does it work in version 18?

sorry for English
works nice, runs smoothly.

but theres an issue that the trainer card doesn't appear and im not sure what will cause it, but the other features of the script are good.
Leaves alot for the player to choose what to add but leaves enough there if they are unsure. very well excecuted and runs smoothly, even works well for 16.2