eevee/pokedex — Issue #58: Normalize move changelogs
Author: encukou
Created: 2012-01-26 21:25:08+00:00
State: open
Labels: NEEDS REVIEW, refactor

**Reported by [En-Cu-Kou](http://github.com/encukou) on 2011/11/17 23:21:05 +0000 · Migrated from [Redmine issue 696](http://bugs.veekun.com/issues/696)**

---

The current “move changelog” approach of storing the differences is unsuitable for anything except showing a list of differences.

Combined with the move effect changelog, it’s unsuitable even for that: correctly figuring out which version of an effect was applicable at a given effect change, and plugging the right effect chance into the description, is about as hard as it sounds.
(The data doesn’t have many of the possible corner cases so far, and spline-pokedex takes advantage of that. Weird stuff happens in [Gust](http://veekun.com/dex/moves/gust#history) for example.)

My approach is having a per-version-group data table with the power, accuracy, effect, type, etc.
For convenience, I put in a `default_version_group_id` session attribute that works much like the `default_language_id`, allowing Move.power, Move.type etc. to still work as before. Except when querying, because association\_proxy isn’t transparent enough.

Oh and on the spline-pokedex side, there’s not that much extra work to be done. Definitely not a “ton of app effort” as \#672 would suggest.

I named the new class `MoveVersion`. I guess it needs a better name since “version” already means something else.

Redmine metadata:
Updated on: 2011/12/09 17:07:30 +0000
Start date: 2011/11/17

---

**Comment by [ete](http://bugs.veekun.com/users/59) from 2011/12/09 13:32:09 +0000**

I’d much rather support full effect per generation from the wiki for a few reasons:

* Almost every user wants to know the effect in a specific generation. Mentally stitching together the changes over often several gens for complex moves is an extremely annoying thing to do much.
**Allows the information to be easily used on many contexts. For example, changelogs are not appropriate for PO description hovertext . I’d imagine many sites using veekun as a primary source would love to be able to make gen specific pages.
**Easier comparisons with many existing dexes. There are a few others which use a changelog to display different gen effects (Bulbapedia springs to mind, though it uses first gen as the starting point rather than 5th), but on the whole a large majority of sites use individual pages for each gen of a game element. Supporting this lets us significantly more simply compare mechanics and flag up things which need verification/testing.

It would be possible to maintain raw changes separately, since it does have some uses (I’d imagine someone coding for a multi-gen sim would like changelogs, PO at least has a lot of “if gen < 3” things, and changelogs are more compact).

---

**Comment by [En-Cu-Kou](http://github.com/encukou) from 2011/12/09 17:07:30 +0000**

I agree with you completely, and I’m planning to do just what you’re suggesting to save me some headaches. There are just 26 effect changes, so maintaining them separately should be possible.

I should find some time for veekun over the break.

Anyway, if you want more discussion about this, please copy it into a new issue. (You’re talking about *effect* changelogs which are currently separate from *move* changelogs)

See also \#694