pokeapi icon indicating copy to clipboard operation
pokeapi copied to clipboard

Idea: Evolution chains to include Version information

Open helblinglilly opened this issue 1 year ago • 2 comments

I have recently run into this issue - I don't think it's possible to determine in which version an evolution chain has been added or rather: is applicable to. This can be especially problematic when dealing with location based evolutions such as Eevee or Nosepass.

At the moment, if I wanted to only show evolution details that are version-specific, I can check if the 'from' and 'to' national dex IDs, but nothing beyond. For entries such as locations that only exist in certain versions it becomes very difficult to filter this data accurately.

Eevee can evolve into Leafeon by visiting:

  • Eterna Forest: D/P/Pl and BDSP, and therefore 2 generations
  • Pinwheel Forest: BW and BW2
  • Route 20 in Kalos: XY

I believe both of those problems could be addressed by adding a field in the evolution chain:

evolution_details: [],
evolves_to: [],
is_baby: false,
species: {...},
id: 133,
// New
versions: [
  {
    name: 'black',
    url: 'https://pokeapi.co/api/v2/version/17'
  }
]

This would add a lot of extra data to the response. Another idea is to do something similar to the current /pokemon/id endpoint with past_types?

I'm suggesting such an approach because the issue is not limited to locations, in which case another solution might be more appropriate. See: https://bulbapedia.bulbagarden.net/wiki/Category:Pok%C3%A9mon_that_have_had_their_evolution_method_changed

I would be happy to help out with this where I can

helblinglilly avatar Sep 30 '23 18:09 helblinglilly

hmm, I see your point! But I'm not sure if we can even implement it the way you're suggesting. I don't think there's a link between versions and evolution_chains in our current data schema. This means we would need to implement the code and add in the data. Feel free to try it but we cannot give you much support :(

Naramsim avatar Oct 02 '23 10:10 Naramsim

I've not worked with the data scheme and such before, so even just that is really helpful to point me in the right direction.

Will play around with it over the next week and update on here where I get up to.

helblinglilly avatar Oct 02 '23 11:10 helblinglilly