FANDOM


Adding more player characters
This tutorial was written by KitsuneKouta. Please give credit.

This tutorial is related to the following pages:

Click here for more tutorials!


This tutorial explains how to increase the limit on the number of player characters that can be defined.

Line numbers mentioned are accurate as of Essentials version 11.

Tutorial

First, in the script section PokemonEditor, find

GLOBALMETADATA=[

on line 3003, and right below it you should see entries for players A - H that look like this:

["PlayerA",PlayerProperty,
_INTL("Specifies player A.")],
["PlayerB",PlayerProperty,
_INTL("Specifies player B.")],
["PlayerC",PlayerProperty,
_INTL("Specifies player C.")],
["PlayerD",PlayerProperty,
_INTL("Specifies player D.")],
["PlayerE",PlayerProperty,
_INTL("Specifies player E.")],
["PlayerF",PlayerProperty,
_INTL("Specifies player F.")],
["PlayerG",PlayerProperty,
_INTL("Specifies player G.")],
["PlayerH",PlayerProperty,
_INTL("Specifies player H.")]

Add identical entries starting right below the entry for "PlayerH," but change the letters (it should go up to J if you want 10 characters, Z if you want 26, etc. You could arbitrarily name more if you wanted such as PlayerAA, or AZ, etc., if you run out of letters in the alphabet, but you probably won't need that many). Make absolutely sure you correct the commas after each entry as well. You'll notice that there's no comma after _INTL("Specifies player H.")] in the editor scripts. You'll need to add a comma there before your new entries. On your last entry though, you must NOT have a comma. The commas indicate that there's another entry in the list. Every entry but the last one must have a comma, and the last entry CANNOT have one.

Here's how it would look when you finish:

["PlayerA",PlayerProperty,
_INTL("Specifies player A.")],
["PlayerB",PlayerProperty,
_INTL("Specifies player B.")],
["PlayerC",PlayerProperty,
_INTL("Specifies player C.")],
["PlayerD",PlayerProperty,
_INTL("Specifies player D.")],
["PlayerE",PlayerProperty,
_INTL("Specifies player E.")],
["PlayerF",PlayerProperty,
_INTL("Specifies player F.")],
["PlayerG",PlayerProperty,
_INTL("Specifies player G.")],
["PlayerH",PlayerProperty,
_INTL("Specifies player H.")],
["PlayerI",PlayerProperty,
_INTL("Specifies player I.")],
["PlayerJ",PlayerProperty,
_INTL("Specifies player J.")]

Now, in the script section PokemonUtilities there are 3 small edits to make. They are in the following methods: pbChangePlayer, pbGetPlayerGraphic, and pbGetPlayerTrainerType. These methods can be found on lines 516, 526, and 534 respectively. As you can see, they are all close together.

You'll need to edit one line from each of these methods. Here they are in order:

return false if id<0 || id>=8               (on line 517)
return "" if id<0 || id>=8                  (on line 528)
return 0 if id<0 || id>=8                   (on line 536)

You'll notice that each of them has the number 8. That 8 represents the maximum number of characters the game supports. Change that 8 to however many characters you now have total in PokemonEditor (you should have added them in the last step). If you have 10 characters, make the 8s into 10s (10 would correspond to the letter J, 13 to M, and 26 to Z, for example).

Next, in the script section PokemonMap, starting on line 275, there will be some metadata that looks like this:

MetadataHome             = 1
MetadataStorageCreator   = 2
MetadataWildBattleBGM    = 3
MetadataTrainerBattleBGM = 4
MetadataWildVictoryME    = 5
MetadataTrainerVictoryME = 6
MetadataTextSkin         = 7
MetadataSurfBGM          = 8
MetadataBicycleBGM       = 9
MetadataPlayerA          = 10
MetadataPlayerB          = 11
MetadataPlayerC          = 12
MetadataPlayerD          = 13
MetadataPlayerE          = 14
MetadataPlayerF          = 15
MetadataPlayerG          = 16
MetadataPlayerH          = 17

This was conveniently improved over what was in some previous versions. You no longer have to worry about changing the numbers of any of these existing metadata entries. Simply add a few more right below the existing ones and you're done here. If you added up to PlayerJ in PokemonEditor (the first step in this guide), add the same here. Your new entries will look like this:

MetadataPlayerI=18
MetadataPlayerJ=19

Now find the next piece of code on line 314. It will look like this:

module PokemonMetadata
  GlobalTypes={
     "Home"=>[1,"uuuu"],
     "StorageCreator"=>[2,"s"],
     "WildBattleBGM"=>[3,"s"],
     "TrainerBattleBGM"=>[4,"s"],
     "WildVictoryME"=>[5,"s"],
     "TrainerVictoryME"=>[6,"s"],
     "TextSkin"=>[7,"s"],
     "SurfBGM"=>[8,"s"],
     "BicycleBGM"=>[9,"s"],
     "PlayerA"=>[10,"essssss",:PBTrainers],
     "PlayerB"=>[11,"essssss",:PBTrainers],
     "PlayerC"=>[12,"essssss",:PBTrainers],
     "PlayerD"=>[13,"essssss",:PBTrainers],
     "PlayerE"=>[14,"essssss",:PBTrainers],
     "PlayerF"=>[15,"essssss",:PBTrainers],
     "PlayerG"=>[16,"essssss",:PBTrainers],
     "PlayerH"=>[17,"essssss",:PBTrainers]
  }

Then, once again, add more entries according the desired number of characters. An example:

module PokemonMetadata
  GlobalTypes={
     "Home"=>[1,"uuuu"],
     "StorageCreator"=>[2,"s"],
     "WildBattleBGM"=>[3,"s"],
     "TrainerBattleBGM"=>[4,"s"],
     "WildVictoryME"=>[5,"s"],
     "TrainerVictoryME"=>[6,"s"],
     "TextSkin"=>[7,"s"],
     "SurfBGM"=>[8,"s"],
     "BicycleBGM"=>[9,"s"],
     "PlayerA"=>[10,"essssss",:PBTrainers],
     "PlayerB"=>[11,"essssss",:PBTrainers],
     "PlayerC"=>[12,"essssss",:PBTrainers],
     "PlayerD"=>[13,"essssss",:PBTrainers],
     "PlayerE"=>[14,"essssss",:PBTrainers],
     "PlayerF"=>[15,"essssss",:PBTrainers],
     "PlayerG"=>[16,"essssss",:PBTrainers],
     "PlayerH"=>[17,"essssss",:PBTrainers],
     "PlayerI"=>[18,"essssss",:PBTrainers],
     "PlayerJ"=>[19,"essssss",:PBTrainers]
  }

Make absolutely sure that the commas are correct here. It should look just like it does here, where every entry but the very last one has a comma after it.

By default, only a couple of players are defined. You can fill in the new ones you added here the same way you would the other blank entries, by using the External Editor to edit the game's Global Metadata or opening up metadata.txt and adding more entries for your new characters. Just put your new entries right below the existing ones with the exact same formatting as you see in the other entries (you can even copy/paste existing entries, change the name from PlayerA to whatever your new player is, and edit the data in that entry to ensure you keep the proper formatting).

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.