-
-
Notifications
You must be signed in to change notification settings - Fork 40
Custom Showdown Datapacking
Make sure to not add comments into your files, it doesn't compile well, you could try using comments like /* */ but in anycase if u face any issues it could be due to comments.
To add custom Pokémon abilities in the game
data/namespace/mega_showdown/showdown/abilities/ability_name.js
{
onSwitchIn(pokemon) {
this.effectState.switchingIn = true;
},
onStart(pokemon) {
if (this.effectState.switchingIn) {
this.add("-ability", pokemon, "Air Lock");
this.effectState.switchingIn = false;
}
this.eachEvent("WeatherChange", this.effect);
},
onEnd(pokemon) {
this.eachEvent("WeatherChange", this.effect);
},
suppressWeather: true,
flags: {},
name: "Ability Name",
rating: 1.5,
num: 76
}Highlights - File name should not have any caps or spaces and the name field in the js should have em
This wiki wont exactly teach you how to make abilities and showdown logic, you can refer other existing abilities to craft your custom one from Showdown
data/namespace/mega_showdown/showdown/conditions/condition_name.js
{
name: 'condition_name',
effectType: 'Status',
onStart(target, source, sourceEffect) {
if (sourceEffect && sourceEffect.effectType === 'Ability') {
this.add('-status', target, 'psn', '[from] ability: ' + sourceEffect.name, '[of] ' + source);
} else {
this.add('-status', target, 'psn');
}
},
onResidualOrder: 9,
onResidual(pokemon) {
this.damage(pokemon.baseMaxhp / 8);
},
}Highlights - File name should not have any caps or spaces and the name field in the js should have em
This wiki wont exactly teach you how to make conditions and showdown logic, you can refer other existing abilities to craft your custom one from Showdown This wiki wont exactly teach you how to make conditions and showdown logic, you can refer other existing abilities to craft your custom one from Showdown If you want to make persistent conditions which stay after battle like freeze you can refer Custom Persistent Statuses
data/namespace/mega_showdown/showdown/held_items/held_item_name.js
{
name: "Adrenaline Orb",
spritenum: 660,
fling: {
basePower: 30,
},
onAfterBoost(boost, target, source, effect) {
if (target.boosts['spe'] === 6 || boost.atk === 0) {
return;
}
if (effect.name === 'Intimidate') {
target.useItem();
}
},
boosts: {
spe: 1,
},
num: 846,
gen: 7,
}Highlights - File name should not have any caps or spaces and the name field in the js should have em
This wiki wont exactly teach you how to make held items and showdown logic, you can refer other existing abilities to craft your custom one from Showdown
data/namespace/mega_showdown/showdown/moves/move_name.js
{
num: 512,
accuracy: 100,
basePower: 55,
basePowerCallback(pokemon, target, move) {
if (!pokemon.item) {
this.debug("BP doubled for no item");
return move.basePower * 2;
}
return move.basePower;
},
category: "Physical",
name: "Move Name",
pp: 15,
priority: 0,
flags: {contact: 1, protect: 1, mirror: 1, distance: 1, metronome: 1},
secondary: null,
target: "any",
type: "Flying",
contestType: "Cool",
}Highlights -
- File
nameshould not have any caps or spaces and thenamefield in the js should have em -
Typefield should follow the naming scheme so Flying != flying -
Targetfield tells if the move is spread, any or all
This wiki wont exactly teach you how to make moves and showdown logic, you can refer other existing abilities to craft your custom one from Showdown
data/namespace/mega_showdown/showdown/scripts/something.js
IDK SHIT BOUT THIS AND SHOWDOWN HAS NOTHING IN HERE
data/namespace/mega_showdown/showdown/typecharts/type_id.js
{
damageTaken: {
Bug: 0,
Dark: 0,
Dragon: 0,
Electric: 0,
Fairy: 0,
Fighting: 2,
Fire: 1,
Flying: 1,
Ghost: 0,
Grass: 2,
Ground: 2,
Ice: 0,
Normal: 0,
Poison: 0,
Psychic: 0,
Rock: 1,
Steel: 0,
Stellar: 0,
Water: 0,
},
HPivs: {atk: 30, def: 30, spd: 30},
HPdvs: {atk: 13, def: 13},
}This is basically how much damage taken, resisted is against other types
This wiki wont exactly teach you how to make moves and showdown logic, you can refer other existing abilities to craft your custom one from Showdown