Pokémon Lua tables thing
I'm writing a bunch of Lua tables containing data from the Pokémon games. My goal is to keep a sort of Platonic ideal of data from the games in a format that is as simple as possible while keeping the data clean of any original terms or concepts.
Contents |
Dilemmas
Structuring data for Pokémon with alternate forms: Gen IV index number or sub-table?
For instance (413 is Wormadam):
basestats.attack[413]={59,79,69}; forms[413]={"Grass Cloak","Sandy Cloak","Trash Cloak"}
--vs.--
basestats.attack[413]=59; basestats.attack[499]=69; basestats.attack[500]=79;
forms[413]={
["Grass Cloak"]=413,
["Sandy Cloak"]=499,
["Trash Cloak"]=500}
- Sub-tables:
- Pros:
- Keeps the table length at 493 with no holes
- Pokemon with forms instantly detectable by type checking
- Forms data is a simple list
- Alternate forms are always under the base number
- Cons:
- Requires code to handle table/form cases
- Pros:
- Gen IV index numbers:
- Pros:
- 1-493 still work normally
- All values are numbers
- Expresses more data (index number mappings)
- Closer to games (other way relies on external forme order)
- Cons:
- maxn is five hundred some with holes (eggs)
- First forme is at normal index, which might not be a proper default (Wormadam)
- Alternate form indices are even more arbitrary than sub-table indices
- Pros:
Originally, I used the former (no pun intended), but I've since switched to the flat index approach. In the end, it's the simpler one.
Possible snafus going into Gen V
Gen V upsets assumptions from the first 4 versions with these firsts:
- A Pokémon with a Regional Pokédex number of 0 coming before the three starter families.
- Current gen Pokémon can have 3 possible abilities due to the way transferring works.
I plan to implement Gen V data (except for names) once the index numbers are published (assuming they keep the layout of Gen IV).
Needed data
Data I can't cull from the source for a page on Bulbapedia:
- When in doubt, http://veekun.com/dex/pokemon/search?sort=id&introduced_in=1&introduced_in=2&introduced_in=3&introduced_in=4&format=$base_happiness,+--%5b$id%5d+$name&display=custom-list
- Just super-duper confirmation that Moon Ball recieves bonus against Pokemon that evolve with a Moon Stone and their pre-evolutions but NOT their post-Moon Stone evolutions
- both Nidoran, Nidorina, Nidorino, Igglybuff, Jigglypuff, Cleffa, Clefairy, Skitty, but NOT Nidoqueen, Nidoking, Wigglytuff, Clefable, or Delcatty
- Confirm this is just a repeated if check against those numbers
Also
- http://bugs.veekun.com/projects/veekun/wiki/FanonLexiconSummit
- other memes to look into: XP curve names, Normal-Fire-Water-Electric-Grass-Ice-Fighting...Rock-Ghost-Dragon-Dark-Steel type order
- Also body type names would be nice
Uses
Something not unlike http://veekun.com/dex/gadgets/pokeballs
Similar projects
http://bugs.veekun.com/projects/pokedex
Hey you know what would be cool
What would be cool is if Nintendo were to re-architect The Pokémon Company like 343 Industries and the new version of The Pokémon Company set up something like ISO. It would have to go up that high because LOL POKEMON COMMUNITY