- Helper base class: Named
Subclasses: OfficiallyNamed, UnofficiallyNamed
for these, a 'name' column is created in the appropriate text table
also, they get automatic __str__/__repr__/__unicode__
- Faux columns: ProseColumn, TextColumn
these become columns in the appropriate text tables
these text tables (*_text, *_prose) are auto-generated at the end
the main table gets one property (singular name) that gets the English text
and one (plural name) with dict of texts keyed by language
- Every named table gets 'identifier'
- Languages compare & hash equal to their identifiers
- Existing foreign-name tables replaced by the autogenerated ones
- order_by: names replaced by identifiers
- New function: all_tables(), yields all tables
- Markdown move properties removed for now
- Schema test suite
As far as evolution is concerned, it's always day or night--there is no
in-between period when Eevee will not evolve into Espeon or Umbreon, and
there are no Pokémon that only evolve during the early part of the day.
Having 'morning' as a separate value is thus misleading, albeit not
terribly misleading since it never appeared outside of tables.py.
Chimecho does not have gender differences; its Platinum and HG/SS second-
frame female backsprites have one hand posed a little differently, but
no actual design differences.
Torchic does count even though the only difference is a single-pixel dark
speck on the male's rear; the speck was carried over into B/W even though
the backsprites were entirely redone, so I'm guessing it either was
deliberate or has ascended into canon via "let's throw it in anyway."
There's now a hole in the items table: there's no item 667. There are
two records for the Live Caster in B/W, and I couldn't figure out why,
or see any difference between them, and they were causing problems, so
I deleted the second one.
The step counts we had weren't even good estimates. To hatch an egg
uninterrupted takes (counter + 1) * 255 steps in gen IV; what we had
was counter * 256.
Phione and Manaphy have different counters, as do Croagunk and Toxicroak
for some reason, so they're associated with individual Pokémon now,
rather than entire evolution chains. Double-checked with Pearl,
Platinum, and SoulSilver; there were no differences between the three,
aside from the alternate forms introduced in Platinum.
Most names as ripped from HeartGold or SoulSilver. Gen-III-only names
ripped from Emerald and de-allcapsed; for French, I also judged where
accents belong on newly-lowercase letters. A couple of them might have
mistakes.
- Gen I has them all mixed around.
- Gen II has no surprises, but I figured it's good to be thorough.
- Gen III has the first 251 in order, then a big break, then the
third-gen Pokémon mixed around, though families are usually together.
- Gen IV has the 493 in order and then alternate forms after Arceus,
which will be useful to have once Gen V comes and we have to bump
the alt forms in the pokemon table forward.
I meant to include this in the last commit. Whoops.
Rotom's description is *really long*, so I needed to bump the length up
to fit it. Also changed it to an RstTextColumn.
This adds Japanese, French, German, Spanish, and Italian names, as
ripped from SoulSilver (Japanese) or Platinum (everything else).
This also fixes a couple of backrefs.
We had D/P flavour text in the abilities table already, but I didn't
entirely trust it, so I reripped it along with the rest when I moved
flavour text into its own table. And we didn't actually use the D/P
text anywhere, so I'm just going to pretend that it is entirely new.
- Everything now accepts -i, -e, -q, and -v.
- Plumbing commands now announce what database/index they're using and
where they got them from.
- New command status, which does nothing but still does the announcing.
- New command reindex, which recreates only the whoosh index.
- encounter_type_id -> encounter_terrain_id
- Added a version_id column. Previous rates were from Diamond and
HeartGold; these have been copied to Pearl & Platinum and SoulSilver,
respectively, which i assume is accurate. RBY rates need to be added.
Language codes are ISO 639-1; country codes are ISO 3166-1 alpha-2.
The country codes are important to keep for flags and stuff, I guess,
but reporting the language code as a short form for the language is
more correct.
Gonna see if I can do that, I guess. I added the language codes mostly
just because I was adding languages.
Every flavor page should work with no missing sprites. Save perhaps for
Unown, because I honestly don't have them.
Every sprite exists as ###-form.png. There is also still a ###.png,
containing a reasonable default form, so people who don't give a crap
about this mess can just use the numbered sprites. Beta forms should
now all be ###-beta.png.
Form groups now have a notion of "in-battle", which is used to hide
overworld sprites when appropriate.
Form sprites have a first-class sense of being a default or not, too.
Deoxys is... well, let's not talk about Deoxys. Deoxys is fixed.
Conditions are now condition values; condition groups are conditions.
Types are now terrain. Slots are first-class things.
Encounters' condition values and slots' conditions have been broken off
into their own tables, as HG/SS has several slots affected by multiple
conditions.
Also fixed roomaji conversion to not die spectacularly when given
hiragana. For some reason I let it know about hiragana soukuon and
youon, but nothing else, so it gets totally confused.
csvimport is now load; csvexport is now dump.
Both take an optional -e switch to specify an engine, but will happily
use a default SQLite database in the pokedex package directory.
Additionally, the CSV directory is now controlled by the optional -d
switch, and defaults to Doing The Right Thing.
So `pokedex load` now does exactly what you'd expect: loads the data
from the right files into a consistently-located database.
Curse's type_id was 0, which is bogus; this has been fixed by creating a
real ????? type.
Fourth-gen moves all had zero as a contest effect id, which was also
bogus.
Pokémon 494 and 495 were junk and have been scrapped entirely.
pokemon_form_groups's description column was too short.
pokedex's connect() now takes kwargs passed to sessionmaker().
A more major change: some tables, like pokemon, are self-referential and
contain rows that refer to rows later in the table (for example, Pikachu
evolves from Pichu, which has a higher id). At the moment such a row is
loaded, the foreign key is thus bogus. I solved this by turning on
autocommit and wrapping add() in a try block, then attempting to readd
every failed row again after the rest of the table is finished. Slows
the import down a bit, but makes it work perfectly with foreign key
checks on.
Types, abilities, egg groups, and stats for Shaymin, Giratina, and Rotom forms.
Updated height and weight for Shaymin and Giratina forms.
Added Giratina's form descriptions and updated Shaymin's to mention link
battles and freezing.
Finally! Location order is the same as from the old dex, which was
something like the game but ultimately arbitrary, so it's not any better
now.
This takes a very different approach to storage, rather than copying the
game exactly and trying to fix everything in code. Comments coming
shortly so other people can actually make use of this.
Tables weren't being defined as UTF-8 if that wasn't the server default.
A lot of tables were trying to create erroneous auto_increment columns.
Foreign key checks were pretty much fucking everything up.