The pokédex tables

All the tables listed here are classes defined with SQLAlchemy’s sqlalchemy.ext.declarative extension.

pokedex.db.tables.metadata

The SQLAlchemy sqlalchemy.schema.MetaData containing all the tables.

pokedex.db.tables.mapped_classes

A list of all the classes you see below.

Each of these classes has a translation_classes attribute: a potentially empty list of translation classes. See pokedex.db.multilang for how these work.

Many tables have these columns:

  • id: An integer primary key. Sometimes it’s semantically meaningful, most

    often it isn’t.

  • identifier: A string identifier of the class, and the preferred way to

    access individual items.

  • name: A name (uses the multilang functionality)

Pokémon

PokemonSpecies

pokedex.db.tables.PokemonSpecies

A Pokémon species: the standard 1–151. Or 649. Whatever.

Table name: pokemon_species (single: pokemon_species)

Has id, identifier, and name via pokemon_species_names.

PokemonSpecies.generation_id (→ Generation.id):

ID of the generation this species first appeared in

PokemonSpecies.evolves_from_species_id (→ PokemonSpecies.id):

The species from which this one evolves

PokemonSpecies.evolution_chain_id (→ EvolutionChain.id):

ID of the species’ evolution chain (a.k.a. family)

PokemonSpecies.color_id (→ PokemonColor.id):

ID of this Pokémon’s Pokédex color, as used for a gimmick search function in the games.

PokemonSpecies.shape_id (→ PokemonShape.id):

ID of this Pokémon’s body shape, as used for a gimmick search function in the games.

PokemonSpecies.habitat_id (→ PokemonHabitat.id):

ID of this Pokémon’s habitat, as used for a gimmick search function in the games.

PokemonSpecies.gender_rate (int):

The chance of this Pokémon being female, in eighths; or -1 for genderless

PokemonSpecies.capture_rate (int):

The base capture rate; up to 255

PokemonSpecies.base_happiness (int):

The tameness when caught by a normal ball

PokemonSpecies.is_baby (bool):

True iff the Pokémon is a baby, i.e. a lowest-stage Pokémon that cannot breed but whose evolved form can.

PokemonSpecies.hatch_counter (int):

Initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this Pokémon’s egg hatches, unless utilizing bonuses like Flame Body’s

PokemonSpecies.has_gender_differences (bool):

Set iff the species exhibits enough sexual dimorphism to have separate sets of sprites in Gen IV and beyond.

PokemonSpecies.growth_rate_id (→ GrowthRate.id):

ID of the growth rate for this family

PokemonSpecies.forms_switchable (bool):

True iff a particular individual of this species can switch beween its different forms.

PokemonSpecies.genus (unicode – plaintext) via pokemon_species_names:

The short flavor text, such as “Seed” or “Lizard”; usually affixed with the word “Pokémon”

PokemonSpecies.flavor_summary (unicode – plaintext) via pokemon_species_flavor_summaries:

Text containing facts from all flavor texts, for languages without official game translations

PokemonSpecies.form_description (unicode – markdown) via pokemon_species_prose:

Description of how the forms work

Pokemon

pokedex.db.tables.Pokemon

A Pokémon. The core to this whole mess. This table defines “Pokémon” the same way the games do: a form with different types, moves, or other game-changing properties counts as a different Pokémon. For example, this table contains four rows for Deoxys, but only one for Unown.

Table name: pokemon (single: pokemon)

Has id.

Pokemon.species_id (→ PokemonSpecies.id):

ID of the species this Pokémon belongs to

Pokemon.height (int):

The height of the Pokémon, in decimeters (tenths of a meter)

Pokemon.weight (int):

The weight of the Pokémon, in tenths of a kilogram (decigrams)

Pokemon.base_experience (int):

The base EXP gained when defeating this Pokémon

Pokemon.order (int):

Order for sorting. Almost national order, except families are grouped together.

Pokemon.is_default (bool):

Set for exactly one pokemon used as the default for each species.

PokemonForm

pokedex.db.tables.PokemonForm

An individual form of a Pokémon. This includes every variant (except color differences) of every Pokémon, regardless of how the games treat them. Even Pokémon with no alternate forms have one row in this table, to represent their lone “normal” form.

Table name: pokemon_forms (single: pokemon_form)

Has id.

PokemonForm.form_identifier (unicode – identifier):

An identifier of the form, uniue among a species. May be None for the default form of the species.

PokemonForm.pokemon_id (→ Pokemon.id):

The ID of the base Pokémon for this form.

PokemonForm.introduced_in_version_group_id (→ VersionGroup.id):

The ID of the version group in which this form first appeared.

PokemonForm.is_default (bool):

Set for exactly one form used as the default for each pokemon (not necessarily species).

PokemonForm.is_battle_only (bool):

Set iff the form can only appear in battle.

PokemonForm.order (int):

The order in which forms should be sorted. Multiple forms may have equal order, in which case they should fall back on sorting by name.

PokemonForm.form_name (unicode – plaintext) via pokemon_form_names:

The full form name, e.g. ‘Sky Forme’, for pokémon with different forms

PokemonForm.pokemon_name (unicode – plaintext) via pokemon_form_names:

The full pokémon name, e.g. ‘Sky Shaymin’, for pokémon with different forms

EvolutionChain

pokedex.db.tables.EvolutionChain

A family of Pokémon that are linked by evolution

Table name: evolution_chains

Has id.

EvolutionChain.baby_trigger_item_id (→ Item.id):

Item that a parent must hold while breeding to produce a baby

PokemonEvolution

pokedex.db.tables.PokemonEvolution

A required action (“trigger”) and the conditions under which the trigger must occur to cause a Pokémon to evolve. Any condition may be null if it does not apply for a particular Pokémon.

Table name: pokemon_evolution

Has id.

PokemonEvolution.evolved_species_id (→ PokemonSpecies.id):

The ID of the post-evolution species.

PokemonEvolution.evolution_trigger_id (→ EvolutionTrigger.id):

The ID of the evolution trigger.

PokemonEvolution.trigger_item_id (→ Item.id):

The ID of the item that must be used on the Pokémon.

PokemonEvolution.minimum_level (int):

The minimum level for the Pokémon.

PokemonEvolution.gender (enum: [male, female]):

The Pokémon’s required gender, or None if gender doesn’t matter

PokemonEvolution.location_id (→ Location.id):

The ID of the location the evolution must be triggered at.

PokemonEvolution.held_item_id (→ Item.id):

The ID of the item the Pokémon must hold.

PokemonEvolution.time_of_day (enum: [day, night]):

The required time of day.

PokemonEvolution.known_move_id (→ Move.id):

The ID of the move the Pokémon must know.

PokemonEvolution.minimum_happiness (int):

The minimum happiness value the Pokémon must have.

PokemonEvolution.minimum_beauty (int):

The minimum Beauty value the Pokémon must have.

PokemonEvolution.relative_physical_stats (int):

The required relation between the Pokémon’s Attack and Defense stats, as sgn(atk-def).

PokemonEvolution.party_species_id (→ PokemonSpecies.id):

The ID of the species that must be present in the party.

PokemonEvolution.trade_species_id (→ PokemonSpecies.id):

The ID of the species for which this one must be traded.

Moves

Move

pokedex.db.tables.Move

A Move: technique or attack a Pokémon can learn to use

Table name: moves (single: move)

Has id, identifier, and name via move_names.

Move.generation_id (→ Generation.id):

ID of the generation this move first appeared in

Move.priority (int):

The move’s priority bracket

Move.target_id (→ MoveTarget.id):

ID of the target (range) of the move

Move.damage_class_id (→ MoveDamageClass.id):

ID of the damage class (physical/special) of the move

Move.contest_type_id (→ ContestType.id):

ID of the move’s Contest type (e.g. cool or smart)

Move.contest_effect_id (→ ContestEffect.id):

ID of the move’s Contest effect

Move.super_contest_effect_id (→ SuperContestEffect.id):

ID of the move’s Super Contest effect

Move.flavor_summary (unicode – plaintext) via move_flavor_summaries:

Text containing facts from all flavor texts, for languages without official game translations

MoveEffect

pokedex.db.tables.MoveEffect

An effect of a move

Table name: move_effects (single: move_effect)

Has id.

MoveEffect.short_effect (unicode – markdown) via move_effect_prose:

A short summary of the effect

MoveEffect.effect (unicode – markdown) via move_effect_prose:

A detailed description of the effect

MoveMeta

pokedex.db.tables.MoveMeta

Metadata for move effects, sorta-kinda ripped straight from the game

Table name: move_meta

MoveMeta.move_id (→ Move.id):

A numeric ID

MoveMeta.meta_category_id (→ MoveMetaCategory.id):

ID of the move category

MoveMeta.meta_ailment_id (→ MoveMetaAilment.id):

ID of the caused ailment

MoveMeta.min_hits (int):

Minimum number of hits per use

MoveMeta.max_hits (int):

Maximum number of hits per use

MoveMeta.min_turns (int):

Minimum number of turns the user is forced to use the move

MoveMeta.max_turns (int):

Maximum number of turns the user is forced to use the move

MoveMeta.recoil (int):

Recoil damage, in percent of damage done

MoveMeta.healing (int):

Healing, in percent of user’s max HP

MoveMeta.crit_rate (int):

Critical hit rate bonus

MoveMeta.ailment_chance (int):

Chance to cause an ailment, in percent

MoveMeta.flinch_chance (int):

Chance to cause flinching, in percent

MoveMeta.stat_chance (int):

Chance to cause a stat change, in percent

MoveVersion

pokedex.db.tables.MoveVersion

History of changes to moves across main game versions.

Table name: move_versions

MoveVersion.move_id (→ Move.id):

ID of the move this data is for

MoveVersion.version_group_id (→ VersionGroup.id):

ID of the version group this data is for

MoveVersion.type_id (→ Type.id):

Type of the move

MoveVersion.power (int):

Base power of the move

MoveVersion.pp (int):

PP of the move

MoveVersion.accuracy (int):

Accuracy of the move

MoveVersion.effect_id (→ MoveEffect.id):

ID of the move effect

MoveVersion.effect_chance (int):

Effect chance

Items

Item

pokedex.db.tables.Item

An Item from the games, like “Poké Ball” or “Bicycle”.

Table name: items (single: item)

Has id, identifier, and name via item_names.

Item.category_id (→ ItemCategory.id):

ID of a category this item belongs to

Item.cost (int):

Cost of the item when bought. Items sell for half this price.

Item.fling_power (int):

Power of the move Fling when used with this item.

Item.fling_effect_id (→ ItemFlingEffect.id):

ID of the fling-effect of the move Fling when used with this item. Note that these are different from move effects.

Item.short_effect (unicode – markdown) via item_prose:

A short summary of the effect

Item.effect (unicode – markdown) via item_prose:

Detailed description of the item’s effect.

Item.flavor_summary (unicode – plaintext) via item_flavor_summaries:

Text containing facts from all flavor texts, for languages without official game translations

Berry

pokedex.db.tables.Berry

A Berry, consumable item that grows on trees For data common to all items, such as the name, see the corresponding item entry.

Table name: berries

Has id.

Berry.item_id (→ Item.id):

The ID of the item that represents this Berry

Berry.firmness_id (→ BerryFirmness.id):

The ID of this Berry’s firmness category

Berry.natural_gift_power (int):

Natural Gift’s power when used with this Berry

Berry.natural_gift_type_id (→ Type.id):

The ID of the Type that Natural Gift has when used with this Berry

Berry.size (int):

The size of this Berry, in millimeters

Berry.max_harvest (int):

The maximum number of these berries that can grow on one tree in Generation IV

Berry.growth_time (int):

Time it takes the tree to grow one stage, in hours. Berry trees go through four of these growth stages before they can be picked.

Berry.soil_dryness (int):

The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly.

Berry.smoothness (int):

The smoothness of this Berry, used in making Pokéblocks or Poffins

Types

Type

pokedex.db.tables.Type

Any of the elemental types Pokémon and moves can have.

Table name: types (single: type)

Has id, identifier, and name via type_names.

Type.generation_id (→ Generation.id):

The ID of the generation this type first appeared in.

Type.damage_class_id (→ MoveDamageClass.id):

The ID of the damage class this type’s moves had before Generation IV, null if not applicable (e.g. ???).

Abilities

Ability

pokedex.db.tables.Ability

An ability a Pokémon can have, such as Static or Pressure.

Table name: abilities (single: ability)

Has id, identifier, and name via ability_names.

Ability.generation_id (→ Generation.id):

The ID of the generation this ability was introduced in

Ability.effect (unicode – markdown) via ability_prose:

A detailed description of this ability’s effect

Ability.short_effect (unicode – markdown) via ability_prose:

A short summary of this ability’s effect

Language

Language

pokedex.db.tables.Language

A language the Pokémon games have been translated into

Table name: languages (single: language)

Has id, identifier, and name via language_names.

Language.iso639 (unicode – identifier):

The two-letter code of the country where this language is spoken. Note that it is not unique.

Language.iso3166 (unicode – identifier):

The two-letter code of the language. Note that it is not unique.

Language.official (bool):

True iff games are produced in the language.

Language.order (int):

Order for sorting in foreign name lists.

Version stuff

Generation

pokedex.db.tables.Generation

A Generation of the Pokémon franchise

Table name: generations (single: generation)

Has id, identifier, and name via generation_names.

Generation.main_region_id (→ Region.id):

ID of the region this generation’s main games take place in

Generation.canonical_pokedex_id (→ Pokedex.id):

ID of the Pokédex this generation’s main games use by default

VersionGroup

pokedex.db.tables.VersionGroup

A group of versions, containing either two paired versions (such as Red and Blue) or a single game (such as Yellow.)

Table name: version_groups

Has id.

VersionGroup.generation_id (→ Generation.id):

The ID of the generation the games in this group belong to.

VersionGroup.pokedex_id (→ Pokedex.id):

The ID of the regional Pokédex used in this version group.

VersionGroup.order (int):

Order for sorting changes between versions.

Version

pokedex.db.tables.Version

An individual main-series Pokémon game.

Table name: versions (single: version)

Has id, identifier, and name via version_names.

Version.version_group_id (→ VersionGroup.id):

The ID of the version group this game belongs to.

Pokedex

pokedex.db.tables.Pokedex

A collection of Pokémon species ordered in a particular way

Table name: pokedexes (single: pokedex)

Has id, identifier, and name via pokedex_prose.

Pokedex.region_id (→ Region.id):

ID of the region this Pokédex is used in, or None if it’s global

Pokedex.description (unicode – plaintext) via pokedex_prose:

A longer description of the Pokédex

Region

pokedex.db.tables.Region

Major areas of the world: Kanto, Johto, etc.

Table name: regions (single: region)

Has id, identifier, and name via region_names.

Encounters

Location

pokedex.db.tables.Location

A place in the Pokémon world

Table name: locations (single: location)

Has id, identifier, and name via location_names.

Location.region_id (→ Region.id):

ID of the region this location is in

LocationArea

pokedex.db.tables.LocationArea

A sub-area of a location

Table name: location_areas (single: location_area)

Has id, identifier, and name via location_area_prose.

LocationArea.location_id (→ Location.id):

ID of the location this area is part of

LocationArea.game_index (int):

ID the games ude for this area

LocationAreaEncounterRate

pokedex.db.tables.LocationAreaEncounterRate

None

Table name: location_area_encounter_rates

LocationAreaEncounterRate.location_area_id (→ LocationArea.id):

ID of the area

LocationAreaEncounterRate.encounter_method_id (→ EncounterMethod.id):

ID of the method

LocationAreaEncounterRate.version_id (→ Version.id):

ID of the version

LocationAreaEncounterRate.rate (int):

The encounter rate

Encounter

pokedex.db.tables.Encounter

Encounters with wild Pokémon. Bear with me, here. Within a given area in a given game, encounters are differentiated by the “slot” they are in and the state of the game world. What the player is doing to get an encounter, such as surfing or walking through tall grass, is called a method. Each method has its own set of encounter slots. Within a method, slots are defined primarily by rarity. Each slot can also be affected by world conditions; for example, the 20% slot for walking in tall grass is affected by whether a swarm is in effect in that area. “Is there a swarm?” is a condition; “there is a swarm” and “there is not a swarm” are the possible values of this condition. A slot (20% walking in grass) and any appropriate world conditions (no swarm) are thus enough to define a specific encounter. Well, okay, almost: each slot actually appears twice.

Table name: encounters

Has id.

Encounter.version_id (→ Version.id):

The ID of the version this applies to

Encounter.location_area_id (→ LocationArea.id):

The ID of the location of this encounter

Encounter.encounter_slot_id (→ EncounterSlot.id):

The ID of the encounter slot, which determines method and rarity

Encounter.pokemon_id (→ Pokemon.id):

The ID of the encountered Pokémon

Encounter.min_level (int):

The minimum level of the encountered Pokémon

Encounter.max_level (int):

The maxmum level of the encountered Pokémon

EncounterCondition

pokedex.db.tables.EncounterCondition

A conditions in the game world that affects Pokémon encounters, such as time of day.

Table name: encounter_conditions (single: encounter_condition)

Has id, identifier, and name via encounter_condition_prose.

EncounterConditionValue

pokedex.db.tables.EncounterConditionValue

A possible state for a condition; for example, the state of ‘swarm’ could be ‘swarm’ or ‘no swarm’.

Table name: encounter_condition_values (single: encounter_condition_value)

Has id, identifier, and name via encounter_condition_value_prose.

EncounterConditionValue.encounter_condition_id (→ EncounterCondition.id):

The ID of the encounter condition this is a value of

EncounterConditionValue.is_default (bool):

Set if this value is the default state for the condition

EncounterMethod

pokedex.db.tables.EncounterMethod

A way the player can enter a wild encounter, e.g., surfing, fishing, or walking through tall grass.

Table name: encounter_methods (single: encounter_method)

Has id, identifier, and name via encounter_method_prose.

EncounterSlot

pokedex.db.tables.EncounterSlot

An abstract “slot” within a method, associated with both some set of conditions and a rarity. Note that there are two encounters per slot, so the rarities will only add up to 50.

Table name: encounter_slots

Has id.

EncounterSlot.version_group_id (→ VersionGroup.id):

The ID of the version group this slot is in

EncounterSlot.encounter_method_id (→ EncounterMethod.id):

The ID of the method

EncounterSlot.slot (int):

This slot’s order for the location and method

EncounterSlot.rarity (int):

The chance of the encounter as a percentage

Contests

ContestCombo

pokedex.db.tables.ContestCombo

Combo of two moves in a Contest.

Table name: contest_combos

ContestCombo.first_move_id (→ Move.id):

The ID of the first move in the combo

ContestCombo.second_move_id (→ Move.id):

The ID of the second and final move in the combo

ContestEffect

pokedex.db.tables.ContestEffect

Effect of a move when used in a Contest.

Table name: contest_effects (single: contest_effect)

Has id.

ContestEffect.appeal (int):

The base number of hearts the user of this move gets

ContestEffect.jam (int):

The base number of hearts the user’s opponent loses

ContestEffect.flavor_text (unicode – gametext) via contest_effect_prose:

The in-game description of this effect

ContestEffect.effect (unicode – plaintext) via contest_effect_prose:

A detailed description of the effect

SuperContestCombo

pokedex.db.tables.SuperContestCombo

Combo of two moves in a Super Contest.

Table name: super_contest_combos

SuperContestCombo.first_move_id (→ Move.id):

The ID of the first move in the combo.

SuperContestCombo.second_move_id (→ Move.id):

The ID of the second and last move.

SuperContestEffect

pokedex.db.tables.SuperContestEffect

An effect a move can have when used in the Super Contest

Table name: super_contest_effects (single: super_contest_effect)

Has id.

SuperContestEffect.appeal (int):

The number of hearts the user gains.

SuperContestEffect.flavor_text (unicode – plaintext) via super_contest_effect_prose:

A description of the effect.

Enum tables

BerryFirmness

pokedex.db.tables.BerryFirmness

A Berry firmness, such as “hard” or “very soft”.

Table name: berry_firmness (single: berry_firmness)

Has id, identifier, and name via berry_firmness_names.

ContestType

pokedex.db.tables.ContestType

A Contest type, such as “cool” or “smart”, and their associated Berry flavors and Pokéblock colors.

Table name: contest_types (single: contest_type)

Has id, identifier, and name via contest_type_names.

ContestType.flavor (unicode – plaintext) via contest_type_names:

The name of the corresponding Berry flavor

ContestType.color (unicode – plaintext) via contest_type_names:

The name of the corresponding Pokéblock color

EggGroup

pokedex.db.tables.EggGroup

An Egg group. Usually, two Pokémon can breed if they share an Egg Group. (exceptions are the Ditto and No Eggs groups)

Table name: egg_groups (single: egg_group)

Has id, identifier, and name via egg_group_prose.

EvolutionTrigger

pokedex.db.tables.EvolutionTrigger

An evolution type, such as “level” or “trade”.

Table name: evolution_triggers (single: evolution_trigger)

Has id, identifier, and name via evolution_trigger_prose.

GrowthRate

pokedex.db.tables.GrowthRate

Growth rate of a Pokémon, i.e. the EXP → level function.

Table name: growth_rates (single: growth_rate)

Has id, identifier, and name via growth_rate_prose.

GrowthRate.formula (unicode – latex):

The formula

ItemCategory

pokedex.db.tables.ItemCategory

An item category

Table name: item_categories (single: item_category)

Has id, identifier, and name via item_category_prose.

ItemCategory.pocket_id (→ ItemPocket.id):

ID of the pocket these items go to

ItemFlag

pokedex.db.tables.ItemFlag

An item attribute such as “consumable” or “holdable”.

Table name: item_flags (single: item_flag)

Has id, identifier, and name via item_flag_prose.

ItemFlag.description (unicode – plaintext) via item_flag_prose:

Short description of the flag

ItemFlingEffect

pokedex.db.tables.ItemFlingEffect

An effect of the move Fling when used with a specific item

Table name: item_fling_effects (single: item_fling_effect)

Has id.

ItemFlingEffect.effect (unicode – plaintext) via item_fling_effect_prose:

Description of the effect

ItemPocket

pokedex.db.tables.ItemPocket

A pocket that categorizes items

Table name: item_pockets (single: item_pocket)

Has id, identifier, and name via item_pocket_names.

MoveBattleStyle

pokedex.db.tables.MoveBattleStyle

A battle style of a move

Table name: move_battle_styles (single: move_battle_style)

Has id, identifier, and name via move_battle_style_prose.

MoveDamageClass

pokedex.db.tables.MoveDamageClass

Any of the damage classes moves can have, i.e. physical, special, or non-damaging.

Table name: move_damage_classes (single: move_damage_class)

Has id, identifier, and name via move_damage_class_prose.

MoveDamageClass.description (unicode – plaintext) via move_damage_class_prose:

A description of the class

MoveMetaAilment

pokedex.db.tables.MoveMetaAilment

Common status ailments moves can inflict on a single Pokémon, including major ailments like paralysis and minor ailments like trapping.

Table name: move_meta_ailments (single: move_meta_ailment)

Has id, identifier, and name via move_meta_ailment_names.

MoveMetaCategory

pokedex.db.tables.MoveMetaCategory

Very general categories that loosely group move effects.

Table name: move_meta_categories (single: move_meta_category)

Has id and identifier.

MoveMetaCategory.description (unicode – plaintext) via move_meta_category_prose:

A description of the category

MoveTarget

pokedex.db.tables.MoveTarget

Targetting or “range” of a move, e.g. “Affects all opponents” or “Affects user”.

Table name: move_targets (single: move_target)

Has id, identifier, and name via move_target_prose.

MoveTarget.description (unicode – plaintext) via move_target_prose:

A description

Nature

pokedex.db.tables.Nature

A nature a Pokémon can have, such as Calm or Brave

Table name: natures (single: nature)

Has id, identifier, and name via nature_names.

Nature.decreased_stat_id (→ Stat.id):

ID of the stat that this nature decreases by 10% (if decreased_stat_id is the same, the effects cancel out)

Nature.increased_stat_id (→ Stat.id):

ID of the stat that this nature increases by 10% (if decreased_stat_id is the same, the effects cancel out)

Nature.hates_flavor_id (→ ContestType.id):

ID of the Berry flavor the Pokémon hates (if likes_flavor_id is the same, the effects cancel out)

Nature.likes_flavor_id (→ ContestType.id):

ID of the Berry flavor the Pokémon likes (if hates_flavor_id is the same, the effects cancel out)

PokemonColor

pokedex.db.tables.PokemonColor

The “Pokédex color” of a Pokémon species. Usually based on the Pokémon’s color.

Table name: pokemon_colors (single: pokemon_color)

Has id, identifier, and name via pokemon_color_names.

PokemonMoveMethod

pokedex.db.tables.PokemonMoveMethod

A method a move can be learned by, such as “Level up” or “Tutor”.

Table name: pokemon_move_methods (single: pokemon_move_method)

Has id, identifier, and name via pokemon_move_method_prose.

PokemonMoveMethod.description (unicode – plaintext) via pokemon_move_method_prose:

A detailed description of how the method works

PokemonShape

pokedex.db.tables.PokemonShape

The shape of a Pokémon’s body. Used for flavor in generation IV and V Pokédexes.

Table name: pokemon_shapes (single: pokemon_shape)

Has id, identifier, and name via pokemon_shape_prose.

PokemonShape.awesome_name (unicode – plaintext) via pokemon_shape_prose:

A splendiferous name of the body shape

Stat

pokedex.db.tables.Stat

A Stat, such as Attack or Speed

Table name: stats (single: stat)

Has id, identifier, and name via stat_names.

Stat.damage_class_id (→ MoveDamageClass.id):

For offensive and defensive stats, the damage this stat relates to; otherwise None (the NULL value)

Stat.is_battle_only (bool):

Whether this stat only exists within a battle

Changelogs

AbilityChangelog

pokedex.db.tables.AbilityChangelog

History of changes to abilities across main game versions.

Table name: ability_changelog (single: ability_changelog)

Has id.

AbilityChangelog.ability_id (→ Ability.id):

The ID of the ability that changed

AbilityChangelog.changed_in_version_group_id (→ VersionGroup.id):

The ID of the version group in which the ability changed

AbilityChangelog.effect (unicode – markdown) via ability_changelog_prose:

A description of the old behavior

MoveEffectChangelog

pokedex.db.tables.MoveEffectChangelog

History of changes to move effects across main game versions.

Table name: move_effect_changelog (single: move_effect_changelog)

Has id.

MoveEffectChangelog.effect_id (→ MoveEffect.id):

The ID of the effect that changed

MoveEffectChangelog.changed_in_version_group_id (→ VersionGroup.id):

The ID of the version group in which the effect changed

MoveEffectChangelog.effect (unicode – markdown) via move_effect_changelog_prose:

A description of the old behavior

Flavor text

ItemFlavorText

pokedex.db.tables.ItemFlavorText

An in-game description of an item

Table name: item_flavor_text (single: item_flavor_text)

ItemFlavorText.item_id (→ Item.id):

The ID of the item

ItemFlavorText.version_group_id (→ VersionGroup.id):

ID of the version group that sports this text

ItemFlavorText.language_id (→ Language.id):

The language

ItemFlavorText.flavor_text (unicode – gametext):

The flavor text itself

AbilityFlavorText

pokedex.db.tables.AbilityFlavorText

In-game flavor text of an ability

Table name: ability_flavor_text

AbilityFlavorText.ability_id (→ Ability.id):

The ID of the ability

AbilityFlavorText.version_group_id (→ VersionGroup.id):

The ID of the version group this flavor text is taken from

AbilityFlavorText.language_id (→ Language.id):

The language

AbilityFlavorText.flavor_text (unicode – gametext):

The actual flavor text

MoveFlavorText

pokedex.db.tables.MoveFlavorText

In-game description of a move

Table name: move_flavor_text

MoveFlavorText.move_id (→ Move.id):

ID of the move

MoveFlavorText.version_group_id (→ VersionGroup.id):

ID of the version group this text appears in

MoveFlavorText.language_id (→ Language.id):

The language

MoveFlavorText.flavor_text (unicode – gametext):

The flavor text

PokemonSpeciesFlavorText

pokedex.db.tables.PokemonSpeciesFlavorText

In-game Pokédex descrption of a Pokémon.

Table name: pokemon_species_flavor_text

PokemonSpeciesFlavorText.species_id (→ PokemonSpecies.id):

ID of the Pokémon

PokemonSpeciesFlavorText.version_id (→ Version.id):

ID of the version that has this flavor text

PokemonSpeciesFlavorText.language_id (→ Language.id):

The language

PokemonSpeciesFlavorText.flavor_text (unicode – gametext):

The flavor text

Association tables

BerryFlavor

pokedex.db.tables.BerryFlavor

A Berry flavor level.

Table name: berry_flavors

BerryFlavor.berry_id (→ Berry.id):

The ID of the berry

BerryFlavor.contest_type_id (→ ContestType.id):

The ID of the flavor

BerryFlavor.flavor (int):

The level of the flavor in the berry

EncounterConditionValueMap

pokedex.db.tables.EncounterConditionValueMap

Maps encounters to the specific conditions under which they occur.

Table name: encounter_condition_value_map

EncounterConditionValueMap.encounter_id (→ Encounter.id):

The ID of the encounter

EncounterConditionValueMap.encounter_condition_value_id (→ EncounterConditionValue.id):

The ID of the encounter condition value

ItemFlagMap

pokedex.db.tables.ItemFlagMap

Maps an item flag to its item.

Table name: item_flag_map

ItemFlagMap.item_id (→ Item.id):

The ID of the item

ItemFlagMap.item_flag_id (→ ItemFlag.id):

The ID of the item flag

Machine

pokedex.db.tables.Machine

A TM or HM; numbered item that can teach a move to a Pokémon

Table name: machines

Machine.machine_number (int):

Number of the machine for TMs, or 100 + the munber for HMs

Machine.version_group_id (→ VersionGroup.id):

Versions this entry applies to

Machine.item_id (→ Item.id):

ID of the corresponding Item

Machine.move_id (→ Move.id):

ID of the taught move

MoveFlag

pokedex.db.tables.MoveFlag

A Move attribute such as “snatchable” or “contact”.

Table name: move_flags (single: move_flag)

Has id, identifier, and name via move_flag_prose.

MoveFlag.description (unicode – markdown) via move_flag_prose:

A short description of the flag

MoveFlagMap

pokedex.db.tables.MoveFlagMap

Maps a move flag to a move

Table name: move_flag_map

MoveFlagMap.move_id (→ Move.id):

ID of the move

MoveFlagMap.move_flag_id (→ MoveFlag.id):

ID of the flag

MoveMetaStatChange

pokedex.db.tables.MoveMetaStatChange

Stat changes moves (may) make.

Table name: move_meta_stat_changes

MoveMetaStatChange.move_id (→ Move.id):

ID of the move

MoveMetaStatChange.stat_id (→ Stat.id):

ID of the stat

MoveMetaStatChange.change (int):

Amount of increase/decrease, in stages

NatureBattleStylePreference

pokedex.db.tables.NatureBattleStylePreference

Battle Palace move preference Specifies how likely a Pokémon with a specific Nature is to use a move of a particular battl style in Battle Palace or Battle Tent

Table name: nature_battle_style_preferences

NatureBattleStylePreference.nature_id (→ Nature.id):

ID of the Pokémon’s nature

NatureBattleStylePreference.move_battle_style_id (→ MoveBattleStyle.id):

ID of the battle style

NatureBattleStylePreference.low_hp_preference (int):

Chance of using the move, in percent, if HP is under ½

NatureBattleStylePreference.high_hp_preference (int):

Chance of using the move, in percent, if HP is over ½

NaturePokeathlonStat

pokedex.db.tables.NaturePokeathlonStat

Specifies how a Nature affects a Pokéathlon stat

Table name: nature_pokeathlon_stats

NaturePokeathlonStat.nature_id (→ Nature.id):

ID of the nature

NaturePokeathlonStat.pokeathlon_stat_id (→ PokeathlonStat.id):

ID of the stat

NaturePokeathlonStat.max_change (int):

Maximum change

PokeathlonStat

pokedex.db.tables.PokeathlonStat

A Pokéathlon stat, such as “Stamina” or “Jump”.

Table name: pokeathlon_stats (single: pokeathlon_stat)

Has id, identifier, and name via pokeathlon_stat_names.

PokemonAbility

pokedex.db.tables.PokemonAbility

Maps an ability to a Pokémon that can have it

Table name: pokemon_abilities

PokemonAbility.pokemon_id (→ Pokemon.id):

ID of the Pokémon

PokemonAbility.ability_id (→ Ability.id):

ID of the ability

PokemonAbility.is_dream (bool):

Whether this is a Dream World ability

PokemonAbility.slot (int):

The ability slot, i.e. 1 or 2 for gen. IV

PokemonEggGroup

pokedex.db.tables.PokemonEggGroup

Maps an Egg group to a species; each species belongs to one or two egg groups

Table name: pokemon_egg_groups

PokemonEggGroup.species_id (→ PokemonSpecies.id):

ID of the species

PokemonEggGroup.egg_group_id (→ EggGroup.id):

ID of the egg group

PokemonFormPokeathlonStat

pokedex.db.tables.PokemonFormPokeathlonStat

A Pokémon form’s performance in one Pokéathlon stat.

Table name: pokemon_form_pokeathlon_stats

PokemonFormPokeathlonStat.pokemon_form_id (→ PokemonForm.id):

The ID of the Pokémon form.

PokemonFormPokeathlonStat.pokeathlon_stat_id (→ PokeathlonStat.id):

The ID of the Pokéathlon stat.

PokemonFormPokeathlonStat.minimum_stat (int):

The minimum value for this stat for this Pokémon form.

PokemonFormPokeathlonStat.base_stat (int):

The default value for this stat for this Pokémon form.

PokemonFormPokeathlonStat.maximum_stat (int):

The maximum value for this stat for this Pokémon form.

PokemonHabitat

pokedex.db.tables.PokemonHabitat

The habitat of a Pokémon, as given in the FireRed/LeafGreen version Pokédex

Table name: pokemon_habitats (single: pokemon_habitat)

Has id, identifier, and name via pokemon_habitat_names.

PokemonMove

pokedex.db.tables.PokemonMove

Record of a move a Pokémon can learn

Table name: pokemon_moves

PokemonMove.pokemon_id (→ Pokemon.id):

ID of the Pokémon

PokemonMove.version_group_id (→ VersionGroup.id):

ID of the version group this applies to

PokemonMove.move_id (→ Move.id):

ID of the move

PokemonMove.pokemon_move_method_id (→ PokemonMoveMethod.id):

ID of the method this move is learned by

PokemonMove.level (int):

Level the move is learned at, if applicable

PokemonMove.order (int):

A sort key to produce the correct ordering when all else is equal

PokemonStat

pokedex.db.tables.PokemonStat

A stat value of a Pokémon

Table name: pokemon_stats

PokemonStat.pokemon_id (→ Pokemon.id):

ID of the Pokémon

PokemonStat.stat_id (→ Stat.id):

ID of the stat

PokemonStat.base_stat (int):

The base stat

PokemonStat.effort (int):

The effort increase in this stat gained when this Pokémon is defeated

PokemonItem

pokedex.db.tables.PokemonItem

Record of an item a Pokémon can hold in the wild

Table name: pokemon_items

PokemonItem.pokemon_id (→ Pokemon.id):

ID of the Pokémon

PokemonItem.version_id (→ Version.id):

ID of the version this applies to

PokemonItem.item_id (→ Item.id):

ID of the item

PokemonItem.rarity (int):

Chance of the Pokémon holding the item, in percent

PokemonType

pokedex.db.tables.PokemonType

Maps a type to a Pokémon. Each Pokémon has 1 or 2 types.

Table name: pokemon_types

PokemonType.pokemon_id (→ Pokemon.id):

ID of the Pokémon

PokemonType.type_id (→ Type.id):

ID of the type

PokemonType.slot (int):

The type’s slot, 1 or 2, used to sort types if there are two of them

TypeEfficacy

pokedex.db.tables.TypeEfficacy

The damage multiplier used when a move of a particular type damages a Pokémon of a particular other type.

Table name: type_efficacy

TypeEfficacy.damage_type_id (→ Type.id):

The ID of the damaging type.

TypeEfficacy.target_type_id (→ Type.id):

The ID of the defending Pokémon’s type.

TypeEfficacy.damage_factor (int):

The multiplier, as a percentage of damage inflicted.

VersionGroupRegion

pokedex.db.tables.VersionGroupRegion

Maps a version group to a region that appears in it.

Table name: version_group_regions

VersionGroupRegion.version_group_id (→ VersionGroup.id):

The ID of the version group.

VersionGroupRegion.region_id (→ Region.id):

The ID of the region.

Index maps

ItemGameIndex

pokedex.db.tables.ItemGameIndex

The internal ID number a game uses for an item

Table name: item_game_indices

ItemGameIndex.item_id (→ Item.id):

The database ID of the item

ItemGameIndex.generation_id (→ Generation.id):

ID of the generation of games

ItemGameIndex.game_index (int):

Internal ID of the item in the generation

LocationGameIndex

pokedex.db.tables.LocationGameIndex

IDs the games use internally for locations

Table name: location_game_indices

LocationGameIndex.location_id (→ Location.id):

Database ID of the locaion

LocationGameIndex.generation_id (→ Generation.id):

ID of the generation this entry to

LocationGameIndex.game_index (int):

Internal game ID of the location

PokemonDexNumber

pokedex.db.tables.PokemonDexNumber

The number of a species in a particular Pokédex (e.g. Jigglypuff is #138 in Hoenn’s ‘dex)

Table name: pokemon_dex_numbers

PokemonDexNumber.species_id (→ PokemonSpecies.id):

ID of the species

PokemonDexNumber.pokedex_id (→ Pokedex.id):

ID of the Pokédex

PokemonDexNumber.pokedex_number (int):

Number of the Pokémon in that the Pokédex

PokemonGameIndex

pokedex.db.tables.PokemonGameIndex

The number of a Pokémon a game uses internally

Table name: pokemon_game_indices

PokemonGameIndex.pokemon_id (→ Pokemon.id):

Database ID of the Pokémon

PokemonGameIndex.generation_id (→ Generation.id):

Database ID of the generation

PokemonGameIndex.game_index (int):

Internal ID the generation’s games use for the Pokémon

Mics tables

Experience

pokedex.db.tables.Experience

EXP needed for a certain level with a certain growth rate

Table name: experience

Experience.growth_rate_id (→ GrowthRate.id):

ID of the growth rate

Experience.level (int):

The level

Experience.experience (int):

The number of EXP points needed to get to that level

StatHint

pokedex.db.tables.StatHint

Flavor text for genes that appears in a Pokémon’s summary. Sometimes called “characteristics”.

Table name: stat_hints (single: stat_hint)

Has id.

StatHint.stat_id (→ Stat.id):

ID of the highest stat

StatHint.gene_mod_5 (int):

Value of the highest stat modulo 5

StatHint.message (unicode – plaintext) via stat_hint_names:

The text displayed