Adding Fakemons - koreanpanda345/Pokemon-Showdown-Server-Guide GitHub Wiki
To add fakemons there are three files that needed to be modified to add the fakemon in. Theses files are in the server/data folder, but the files are pokedex.ts, learnset.ts, and format-data.ts. ability.ts, and move.ts are for adding new moves and abilities, which I will cover later.
In the pokedex.ts file, the structure looks something like this
name_lower_case: { // This is pokemon's name lowercase, example pikachu.
num: Number, // The pokedex id.
name: String, // The pokemon's name. This is what will be displayed.
baseSpecies?: String, // If the pokemon has a base forme, then what is the base forme's name.
forme?: String, // If the pokemon is a forme, then what type of forme is it.
types: String[], // The pokemon's type.
baseStats: { // The pokemons base Stats.
hp: Number, // Base Hp
atk: Number, // Base Atk
def: Number, // Base Def
spa: Number, // Base SpA
spd: Number, // Base SpD
spe: Number, // Base Spe
},
abilities: {
"0": String, // The first ability for the pokemon.
"1"?: String, // The Second ability for the pokemon.
H?: String, // The Hidden Ability for the pokemon.
S?: String, // The Special Ability for the pokemon, if it has one.
},
heightm: Number, // The Pokemon's height in meters.
weightkg: Number, // The pokemon's weight in kilograms.
color?: String, // The pokemon's primary color.
evos?: String[], // The pokemon's evolutions that it evolves into.
prevo?: String, // The pokemon's pre evolution.
evoLevel?: Number, // If the pokemon evolves by level, then which level does it evolve.
evoCondtion?: String, // What the condition is for the pokemon to evolve.
eggGroups?: String[] // The egg groups that the user belongs to.
},This is what the structure looks like. an example of this using the fakemon I made, Ghosunny, would looks something like this.
ghosunny: {
num: -5010, // Fakemon Ids start from -5010. We can't do +, as it can cause conflict for future generations.
name: "Ghosunny",
types: ["Normal", "Ghost"],
baseStats: { hp: 115, atk: 115, def: 125, spa: 75, spd: 100, spe: 100 },
abilities: { "0": "Prankster", "1": "Cursed Body", H: "Cloak of Nightmares" },
heightm: 0.9,
weightkg: 0.1,
color: "Purple",
eggGroups: ["Undiscovered"],
},This what it would look like. But WAIT, if you look at the HA for ghosunny, that ability doesn't exist. Check my notes on Adding New Abilities to add them.
Next lets put the pokemon in a tier. To do this, we need to edit the format-data.ts file. The data structure for this file is looks like this
name_lower_case: {
isNonstandard: String, // What Kind of generation is this pokemon. If it its custom, then use Custom, if its a past generation, then use Past, etc.
tier: String // What tier is the pokemon in. Ag, Ou, Uu, Ru, Nu, Pu, Zu, Nfe, Lc
},So, for ghosunny, it would look like this.
ghosunny: {
isNonstandard: "Custom",
tier: "CAP", // CAP = Create A Pokemon
}We are almost done. Next we need to give the pokemon its learnset. To do this, we need to edit the learnsets.ts file.
The data structure looks like this
name_lower_case: {
learnset: {
move_name_lower_case: String[], // The String Array is the way it learns that move.
},
},So the String[] where is the method that the pokemon learns that move.
The String structure is <Gen Number><Learn method><Level> so an example for a pokemon that learns a move in gen 8, at level 23 would look like this 8L23, L means Levelup
- L -> Level Up
- E -> Egg Move
- T -> Tutorial
so an example of a learnset for ghosunny would look like this
ghosunny: {
learnset:{
peekaboo: ["8L1"],
pursuit: ["8L1"],
"return": ["8L1"], // The reason why we have return in quotes is because of keywords. return is a keyword in js that returns a type within a function, or method. this is why we make it into a string, so the program knows which kind of return do we want.
shadowball: ["8L1"],
...
}
}If you noticed peekaboo is not a move, thats because its a custom move, made for ghosunny. Check my notes on Adding New Moves to learn about it.
So once we have this done, are almost done. we need to build the data for the client to use. so we need to add execute the build tools again. check my notes on Using Build Tools to learn how to do this.