pkmn.help icon indicating copy to clipboard operation
pkmn.help copied to clipboard

Import team from Pokémon Showdown for team defense mode

Open Gryyre opened this issue 1 year ago • 2 comments

The https://www.pkmn.help/defense/team/ mode is helpful, and I'd love it if I could simply copy the exported text version of a team from Pokémon Showdown instead of entering in the types and abilities myself for each Pokémon. The exported text will have slightly different details depending on the generation (like tera types), but the types and ability (if Gen III+) are all that should be needed.

Example of the type of text from Gen IX that'd be able to be imported:

Heracross @ Flame Orb  
Ability: Guts  
Tera Type: Normal  
EVs: 252 Atk / 4 Def / 252 Spe  
Jolly Nature  
- Megahorn  
- Close Combat  
- Trailblaze  
- Facade  

Gryyre avatar Nov 15 '24 01:11 Gryyre

I've only played Showdown a couple times so I had to go mess around with the team builder to see what you meant... I think the main issue here would be looking up Pokemon with their forms correctly

Alomomola @ Eviolite  
Ability: Hydration  
Tera Type: Water  
IVs: 0 Atk  

Calyrex-Ice  
Ability: As One (Glastrier)  
Tera Type: Psychic  

Calyrex-Shadow  
Ability: As One (Spectrier)  
Tera Type: Psychic  

Calyrex  
Ability: Unnerve  
Tera Type: Psychic  

Muk-Alola  
Ability: Poison Touch  
Tera Type: Poison  

In this example Ice Rider Calyrex is called Calyrex-Ice... so I'd have to perform some kind of "best match" search to find the most similar sounding Pokemon to what was entered. Since ultimately my page doesn't care about individual monsters at all, just type combos... and I don't use shortened versions of the names.

I'm unsure if there's other things like abilities that may not map well. Pokemon Showdown supports 10000x more stuff than my site does haha...

Apparently you can enter nicknames too, so the parsing format gets even more complicated. I'm no stranger to writing parsers, but it's hard to know what possibilities I even need to support 🤔

wavebeem avatar Nov 15 '24 02:11 wavebeem

I recently heard about PokePaste, which has a syntax guide:

https://pokepast.es/syntax.html

And relevant code in Go:

https://github.com/felixphew/pokepaste/blob/617fd20ebb1b3bf0a059e68247c6266fea49db90/syntax.go

Pokemon showdown code

https://github.com/smogon/pokemon-showdown-client/blob/dd3dc08a6d5b292fbaebc723748a7570d3bda69a/play.pokemonshowdown.com/js/client-teambuilder.js

wavebeem avatar Jan 18 '25 23:01 wavebeem