pokedex icon indicating copy to clipboard operation
pokedex copied to clipboard

pokemon_species_flavor_text.csv contains non-unique entries

Open Parnassius opened this issue 4 years ago • 3 comments

Hi, I just noticed the let's go and sword/shield sections of pokemon_species_flavor_text.csv contain the pokedex descriptions for alternate forms (below the full list), sadly that breaks the primary key on (species_id,version_id,language_id). Alternate descriptions for forms were already present in sun/moon, and for those games veekun only added the base form's one exactly for this reason. Additionally, by using the API there's no way to discern which text refers to which form. For example, on https://pokeapi.co/api/v2/pokemon-species/gyarados/ flavor_text_entries[108] and flavor_text_entries[109] are both tagged as language=en and version=lets-go-pikachu, with no way to know which one refers to the base form, and which one to the mega.

Is this by any chance intentional, or would a pull request removing those be accepted? Thanks

Full list Let's go:
  • every mega
  • every alolan form
  • pikachu

Sword/Shield:

  • every gmax
  • every alolan/galarian form
  • cherrim base/sunshine
  • shellos east/west
  • gastrodon east/west
  • rotom base/heat/wash/etc
  • unfezant male/female, both descriptions are the same
  • basculin red/blue stripe
  • frillish male/female
  • jellicent male/female
  • kyurem base/black/white
  • meowstic male/female
  • aegislash blade/shield
  • pumpkaboo (the four sizes)
  • gourgeist (the four sizes)
  • rockruff base/dusk, both descriptions are the same
  • lycanroc midday/midnight/dusk
  • wishiwashi base/school
  • silvally (base + 17 types)
  • mimikyu base/busted
  • necrozma base/dawn wings/dusk mane
  • cramorant base/pikachu/arrokuda
  • sinistea base/antique
  • polteageist phony/antique
  • eiscue ice/noice
  • indeedee male/female
  • morpeko base/hangry
  • zacian base/crowned
  • zamazenta base/crowned
  • eternatus base/eternamax
  • urshifu single/rapid strike + gmax
  • zarude base/dada

Parnassius avatar Jan 21 '21 11:01 Parnassius

Hmm, I see the issue.

Do we have to which form a particular description belongs to? In the CSV file?

Naramsim avatar Jan 25 '21 13:01 Naramsim

I don't have them at-hand right now, but it should be relatively easy to re-export the data directly from the game files, including the form each description refers to.

Parnassius avatar Jan 25 '21 13:01 Parnassius

https://github.com/Parnassius/pokedex/commit/940fa72ef66049e1fdbec755b1037ed2d0cf8871

Sadly the diff is quite large, so it doesn't seem to be viewable on the github web interface. By reimporting everything using the data from the latest update it now contains descriptions for the new dlc pokemon.

Would you like me to create a pull request with those changes?

Parnassius avatar Feb 02 '21 13:02 Parnassius