• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Costume System Help

Okay, hello everyone. I have evented a costume system and everything works fine overworld-wise. I have created the appropriate backsprites and trainer sprites (trback095; trainer095, respectively), but when I check my trainer card or go into battle, they won't show up and stay as the original character's backsprite and trainer sprite.

Do I need to implement this myself? If so, how?

Thank you,
Pia Carrot.
 
I'm about as far as you can get from a good scripter, but I would assume you need to have a variable modifier to suit each "costume" then go find the code that displays the trainer image in the relevant places and put some if statements pertaining to said variable.

You might be able to figure it out by looking at the code, if not then just wait for a few days and see if anyone else replies. I'll do it myself if it comes to that but it won't be pretty.
 
I would have said that implementing the overworlds was harder than just changing the sprites. I assume you've got a variable somewhere that decides what outfit the player is currently wearing, and it's used to decide which charsets to show.

The answer is self-evident: find where the trainer sprites are shown, and change the code.
 
The trainer sprites used depend on the trainer type, while the charsets (which you've changed) depend on whatever you've files you've named in metadata.txt. Each different version of the player needs its own trainer type. I suspect you've defined PlayerA, PlayerB, etc. with different charsets, but given them all the same trainer type (PkMnTRAINER_Male or PkMnTRAINER_Female).
 
Correct.
# See the documentation at notes.html to learn how to edit this file.
0,PkMnTRAINER_Male,PkMn TRAINER,100,,,,Male
1,PkMnTRAINER_Female,PkMn TRAINER,100,,,,Female
and then

92,PkMnTRAINER_MINT,PkMn TRAINER,100,,,,Female
93,PkMnTRAINER_KRIS,PkMn TRAINER,100,,,,Female
94,PkMnTRAINER_PIKA,PkMn TRAINER,100,,,,Female
95,PkMnTRAINER_MAY,PkMn TRAINER,100,,,,Female
Now, is this possibly due to them not being marked by a gender?
Please note there is no male hero. The 1st trainer is simply a null.
 
Turns out it's a problem with Essentials. Find the def pbChangePlayer, and include the red line:

Code:
def pbChangePlayer(id)
  return false if id<0||id>=8
  meta=pbGetMetadata(0,MetadataPlayerA+id)
  return false if !meta
  [COLOR=Red]$game_player.trainertype=meta[0][/COLOR]
  $game_player.character_name=meta[1]
  $game_player.character_hue=0
  $PokemonGlobal.playerID=id
end
 
Which script is the def located in? I'm having trouble locating it >.>

I appreciate your help, Maruno.

EDIT: Nevermind, found it. Thanks for all the help!

EDIT 2: I'm guessing this is because of the amount of players I have:
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 9, map 87 (Cosplay Emporium):

Exception: NoMethodError

Message: Section136:1621:in `pbChangePlayer'undefined method `trainertype=' for #<Game_Player:0x9c928e0>

***Full script:

pbChangePlayer(5)


Interpreter:243:in `pbExecuteScript'

(eval):1:in `pbExecuteScript'

Interpreter:1592:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1592:in `command_355'

Interpreter:493:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'



Interpreter:275:in `pbExecuteScript'

Interpreter:1592:in `command_355'

Interpreter:493:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'



This exception was logged in

C:\Users\Jacob\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
 
Last edited:
Which script is the def located in? I'm having trouble locating it >.>

I appreciate your help, Maruno.

EDIT: Nevermind, found it. Thanks for all the help!

EDIT 2: I'm guessing this is because of the amount of players I have:

The error you got happens for me too.

trainertype is defined as a parameter for $Trainer, but not $game_player.

Try $Trainer.trainertype = meta[0] instead.
 
Works like a charm, thanks IceGod64!

Oh, actually, it doesn't. I found testing just now that results in a crash on creating a new game. With that said, I've got one more fix. I've tested this one in both making a new file and changing a player in-game, and it works completely this time.

$Trainer.trainertype = meta[0] if $Trainer
 
Back
Top