@pkmn.cc/data provides fundamental types and data structures for building products around Pokémon. @pkmn.cc/data exposes curated data and methods (munged using @pkmn.cc/munge) from Pokémon Showdown and Honko's Damage Calculator.
@pkmn.cc/data is designed to support all generations of Pokémon, with later
generations implemented as patches to the earlier ones. If your code does not
require functionality from the latest generations and you are worried about
being forced to load extra data, please consider the
@pkmn.cc/data-async branch
which makes heavy use of async
and await
to defer loading of expensive data
files until strictly required.
Pokémon Showdown's
/data
(and
/mods
)
directories serve as the source for most of the data, validated against Honko
and the Pokémon Database. However, Showdown is designed
such that the earlier generations are implemented as mods/patches on the latest
generation - the reverse of @pkmn.cc/data. Furthermore, Showdown intermingles
data and logic within its data
directories - @pkmn.cc/data maintains a strict
seperation of data (stored as JSON) and logic. @pkmn.cc/data's design is not an
indictment of Showdown's architecture - one can argue actually it serves the
project quite well - it simply has different goals and constraints.
@pkmn.cc/data's data diverges from Showdown's in that it removes information that is not required/present in the earlier generations (eg. Showdown data for earlier generations sometimes references Pokémon/formes/concepts that do not exist). @pkmn.cc/munge provides a good reference for how exactly Showdown's data maps to @pkmn.cc/data's.
Honko's Damage Calculator is structured in the same 'later generations implemented as patches' manner that @pkmn.cc/data uses, but the project requires drastically less details than are present in the full Pokémon Showdown dataset. @pkmn.cc/dmg is a refactored version of the calculator which is built as a library on top of @pkmn.cc/data, serving as the base for an updated pkmn-cc/honko-damagecalc GUI.
@pkmn.cc/datax contains extensions to the basic datatypes that are not necessarily required for all projects (for example, learnset and ruleset information). @pkmn.cc/datax can be used as a drop in replacement for @pkmn.cc/data provided your project requires the added functionality.
@pkmn.cc/data is distributed under the terms of the MIT License.
@pkmn.cc/data owes a large debt to Pokémon Showdown and Honko's Damage Calculator contributors.