Programming Learnset queries

Hello, I'm attempting to write a script that queries the Smogon/Showdown learnset data to produce a list of Pokémon that learn a specific move in a specific generation (or Natdex). The functionality should be similar to the Showdown chat command "dexsearch." I'm willing to comb through learnset.json if necessary, but I was wondering if there is an easier method. I haven't seen anything like the query I need on Showdown APIs or fan projects, but I could've missed something.

Also, when using both dexsearch and learnset.json, certain alternate forms are missing most of the base form's moves. For example, Rotom-Wash will not appear when dexsearching Volt Switch, and only has Hydro Pump listed in the learnset data. How does the teambuilder determine that Rotom-Wash should have base Rotom's learnset as well?

Thanks!
 
I believe Pokemon Showdown uses logic to cumulatively apply data from leanest.json of base formes to their corresponding formes (e.g. on Deoxys to Deoxys Attack). I've found this package from Modular Pokemon Showdown, but I'd imagine there's a way to get it to work with the official Pokemon Showdown package as well.

Here's some code I'm using in a personal project to iterate over the leanest to convert it to a .csv to insert into an SQL database. You could probably iterate over the leanest data in a similar way to transform it into your own desired data structure.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Top