Pokemon Code

From Pokémon 3D Wiki
Jump to navigation Jump to search

Pokemon Code is used in scripts, the Box.dat, Daycare.dat, and party.dat files in the Save Games and the .trainer files to specify the many properties of a Pokemon.

Code

This is an example of the code:

{"Pokemon"[int]}{"Experience"[int]}{"Gender"[int]}{"NickName"[str]}{"Level"[int]}{"OT"[str]}{"CatchTrainer"[str]}{"CatchMethod"[str]}{"CatchLocation"[str]}{"CatchBall"[int]}{"Status"[str]}{"EggSteps"[int]}{"Item"[int]}{"Ability"[int]}{"Nature"[int]}{"Friendship"[int}{"isShiny"[bool]}
{"Attack1"[intArr]}{"Attack2"[intArr]}{"Attack3"[intArr]}{"Attack4"[intArr]}{"HP"[int]}{"EVs"[intArr]}{"IVs"[intArr]}{"AdditionalData"[str]}

Attributes

{"Pokemon"[int]}

int = The National Dex number of the Pokémon.

{"Experience"[int]}

int = Total Experience Points (EXP) that the Pokémon has.

{"Gender"[int]}

int = Gender of the Pokémon. Possible values:

  • 0 = Male
  • 1 = Female
  • 2 = Genderless

{"NickName"[str]}

str = The nickname of the Pokémon.

{"Level"[int]}

int = The current level of the Pokémon.

{"OT"[str]}

str = Original Trainer's ID (or Trainer Number).

{"CatchTrainer"[str]}

str = Name of the trainer who caught or obtained the Pokémon.

{"CatchMethod"[str]}

str = How the Pokémon was caught or obtained.

{"CatchLocation"[str]}

str = Name of location where the Pokémon was caught or obtained.

{"CatchBall"[int]}

int = Item ID number of the Ball that the Pokémon was caught in. Recommended values:

  • 1 = Masterball
  • 2 = Ultra Ball
  • 3 = Premier Ball
  • 4 = Great Ball
  • 5 = Pokéball
  • 45 = Cherish Ball
  • 79 = Dive Ball
  • 80 = Net Ball
  • 106 = Smoke Ball
  • 115 = GS Ball
  • 129 = Quick Ball
  • 150 = Timer Ball
  • 157 = Heavy Ball
  • 158 = Dusk Ball
  • 159 = Level Ball
  • 160 = Lure Ball
  • 161 = Fast Ball
  • 163 = Light Ball
  • 164 = Friend Ball
  • 165 = Moon Ball
  • 166 = Love Ball
  • 168 = Repeat Ball
  • 174 = Luxury Ball
  • 177 = Sport Ball
  • 181 = Safari Ball
  • 186 = Heal Ball
  • 188 = Nest Ball

{"EggSteps"[int]}

int = How many steps the player has taken with the egg in their Party (if the Pokemon is still an egg). The amount of steps that it takes to hatch an egg depends on the "BaseEggSteps" property in the definition file of the Pokémon (located in "Content\Pokemon\Data\").

{"Item"[int]}

int = ID number of the Item that the Pokémon is currently holding. Use the Items wiki page to determine what the Item ID should be: Items

{"Ability"[int]}

int = Ability ID number. Use the Abilities wiki page to determine what the Ability ID should be: Abilities

{"Nature"[int]}

int = ID number of the Nature of the Pokémon. Use the Natures wiki page to determine what the Nature ID should be: Natures

{"Status"[str]}

str = The Status the Pokemon is currently under. Possible values for str:

  • BRN = Burned
  • PSN = Poisoned
  • PRZ = Paralyzed
  • SLP = Asleep
  • FNT = Fainted
  • FRZ = Frozen
  • BPSN = Badly Poisoned

{"Friendship"[int}

int = Amount of Friendship a Pokemon feels toward you. Possible values can range from 0 to 255.

{"isShiny"[bool]}

bool = If the Pokemon is shiny or not.

  • 0 = Not Shiny
  • 1 = Shiny

{"Attack1"[intArr]}{"Attack2"[intArr]}{"Attack3"[intArr]}{"Attack4"[intArr]}

intArr = Each move/attack has an array of integer numbers separated with commas:

  • Move ID - See this wiki page for the ID of the move: Moves
  • Max PP - How many times the move can be used right after the Pokémon has been healed.
  • Current PP - How often the move can still be used the Pokémon.

For example, if you write {"Attack1"[1,25,10]}, the first move will be Pound (ID 1) with 25 Max PP and 10 Current PP.

Stats

{"HP"[int]}

int = The current HP (Hit Points or Health Points) of the Pokémon.

{"EVs"[intArr]}

intArr = An array of integer numbers corresponding to the Effort Values of the Pokémon. Effort Values or EVs (also called FPs by the game) are points gained by defeating a Pokemon. Each Pokemon who participates in a battle gains the same amount of EVS. A Pokemon may have up to 255 points in each stat and up to 510 overall. A Pokemon gains 1 stat point from every 4 EVs. Due to these values there will always be 2 unused EVs. The most common way to split EVs is 252/252/6, often between an attack stat, the speed stat, and the highest out of the defenses and HP.

Each Pokemon gives a specific number of EVs when beaten. Evolved Pokemon tend to give more than unevolved Pokemon.

The values of intArr: HP, Atk, Def, SpAtk, SpDef, Spd Example: {"EVs"[0,0,0,1,0]}

{"IVs"[intArr]}

intArr = An array of integer numbers corresponding to the Individual Values of the Pokémon. Individual Values or IVs (also called DVs by the game) help generate a Pokemon's stats. IVs can be any number between 1 and 31. The higher the Individual Values are, the better the stats of the Pokémon will be.

The values of intArr: HP, Atk, Def, SpAtk, SpDef, Spd Example: {"IVs"[0,0,0,1,0]}

{"AdditionalData"[str]}

This property is often used for Pokémon with alternative forms, like Unown. Example: Setting {"Pokemon"[201]} and then {"AdditionalData"[28]} gets you an Unown Exclamation Mark (!)


Game Folder
Content ContentPacks GameModes Saves Screenshots Game Executable
Pokemon Data ContentPack Folder GameMode folder Savegame folder Version History
Data Maps Moves Scripts Control Files Content GameMode.dat Party.dat Player.dat Options.dat
poke battle structures V1 V2 trainer worldmap