mirror of
https://github.com/smogon/sprites.git
synced 2026-12-05 07:00:37 -06:00
The forum has carried its default avatars as 702 committed gifs since its initial commit in 2019: bytes in the wrong repo, and the last sprite collection it hadn't moved onto a manifest. The sources are all here, so build them. They are gen 5 animations on a uniform 96x96 box. The box is not decorative: XenForo scales an <img> to fill its avatar container, so a sprite published at its own aspect would arrive stretched. It is also the games' own sprite size, so nothing is scaled up, and the 45 animations that overflow it are cropped to it, which is what the 2019 set did too. The pool is an index, not a set. The forum picks a slot with crc32(username) % count, so a name added, removed or respelled reassigns every user's avatar -- which is why rules/avatars.ts spells the pool out instead of globbing src/sprites/gen5, and why these publish under the PS ids the 2019 set used (`hooh`, not `ho-oh`) rather than the smogon names every other set here publishes. publishedName(sn, psid) spells all but two of them; Arceus-Normal and Swanna-2 were second copies of a picture the pool already carries, and now share its file. What ships is that index rather than a name -> url manifest, because nothing looks an avatar up: __meta/avatars/manifest.json is the directory listing scandir() used to return, as an array of urls. Two things about that listing are the index and so are reproduced rather than tidied away. It sorted filenames with the extension attached, which orders arceus-bug.gif ahead of arceus.gif where the bare names sort the other way, and disagrees with the manifest order at 68 of the 702 slots. And it led with `.` and `..`, which counted toward the divisor and named no avatar: those two rendered a broken image for two of every 704 usernames, and now get Substitute, which the pool already carries, so they cost nothing but the slot. The animations themselves change, unavoidably. The 2019 files came from an earlier generation of these sources: 649 of the 693 that still resolve have a different frame count, and no coalesced frame survives. Same Pokemon, same slot, same framing, re-animated. Manifest grows url(), which write() already composed inline, so a set can publish another projection of the same mapping. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>