Commit Graph

83 Commits

Author SHA1 Message Date
DramaticShape 99de8c2760 update 2d shiny sprites and shiny animation 2026-08-08 19:55:32 -04:00
DramaticShape 6482325e26 remove fireflies 2026-08-08 14:21:41 -04:00
DramaticShape b8b2e0cd33 shiny capture 2026-08-08 14:02:29 -04:00
DramaticShape 0d245c4ccb Merge branch 'worktree-shiny-system' into shadow-toggle
Shiny Pokemon: derived from DVs via the engine's own Stats.isShiny, models
recoloured as part of the Stadium extraction, flat art tinted, a sparkle on
arrival and a star on the status page.

Verified on the merged tree rather than only on the branch, since
shadow-toggle moved underneath it (the new menus work): the mod loads clean,
tests/shiny_test passes 49, and the extraction still reproduces all 151
packs byte-for-byte against the Python oracle with 151 shiny variants
alongside.
2026-08-08 12:22:24 -04:00
DramaticShape 2907aba6ff new menus 2026-08-08 12:18:35 -04:00
DramaticShape a3fb18a589 shiny Pokemon, on by default
Gen 1 has no shininess of its own, but it has the four DVs Gen 2 reads to
decide it -- and the engine already ships that reading (Stats.isShiny, its
own comment calling it "the RBY virtual shiny", allowlisted for mods
precisely so an indicator mod can call it). Nothing new is stored on a
Pokemon and nothing migrates: every save already contains the answer, and
this starts drawing it. Random DVs land on the pattern 1 in 8192, which is
the classic rate and the default the odds dial ships at.

Deriving rather than storing is what makes it survive a save, a box, a
trade and an evolution with no second copy of the truth to drift. mon.shiny
is a cache written from the DVs, never read as the source.

The roll goes in Pokemon.new -- every wild, gift, starter and traded mon is
built there, and it is before the battle bakes its sprite, which
battle.started is already too late for. It draws from the mod's own random
stream so installing this does not shift the sequence damage rolls and
encounter slots come out of. Trainers stay ordinary by themselves: the
engine pins their DVs, as the real games do.

The models are genuinely recoloured, as part of the extraction. Each
species is decoded once, packed as usual, then recoloured and packed again
as NNNs.dsm. The colours are Stadium's own HSL slide (hue in degrees,
saturation and lightness on a -8..+8 scale at 12.5% a step); five species
carry an explicit colour table instead, because Stadium gives them a real
alternate texture that no single slide reproduces -- Jigglypuff's body must
stay pink while its irises rotate to green.

Extraction is the right moment because StadiumFx's generated frames are
still marked there and the packer drops the marker: it is the last point a
flame is distinguishable from a hide. A shiny Charizard has a shiny hide
and an ordinary fire. The normal packs are written BEFORE the recolour, so
they come out byte-identical and stadium_extract_test still diffs all 151
against the Python oracle unchanged -- no format change, no DSM4, no second
implementation to keep in step. REV goes to 3 so an existing cache rebuilds.

Flat art is tinted instead, because the engine bakes a species palette into
a cache with no notion of which individual is drawn. The tint comes from
that species' own slide rather than a generic gold. A multiply can only
darken, so species whose shiny is lighter read quieter there than on the
model; the status page's star is the mode-proof mark.

Tests: 58 assertions in tests/shiny_test.lua, including the colour
transform against 640 real colour pairs lifted from the verified texture
set, the DV model, the read side, and the end-to-end through the engine's
own constructor. stadium_extract_test gains --mod (worktrees have neither
the ROM nor the packs, both gitignored) and now also checks that every
shiny pack is the same length as its twin and actually differs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 12:12:25 -04:00
DramaticShape 66da6cbc4b fix catch regression + add new menus 2026-08-08 12:08:27 -04:00
DramaticShape 121c87b629 fix back facade of buildings 2026-08-08 11:34:04 -04:00
DramaticShape dfe2f1ae1a fix regressions with freemove 2026-08-08 10:42:28 -04:00
DramaticShape 41f1f07342 grass sway during battles, fix south screen culling 2026-08-08 10:11:00 -04:00
DramaticShape f0d5ca570a lets go 2026-08-08 09:06:51 -04:00
DramaticShape 89fe722a62 iterate version 2026-08-07 20:54:25 -04:00
DramaticShape 180dd393ea add render distance options 2026-08-07 20:52:43 -04:00
DramaticShape 53fff766a4 revert battle locations temporarily 2026-08-06 19:56:39 -04:00
DramaticShape 442e9d26d5 add fog/god rays to viridian forest 2026-08-06 01:07:38 -04:00
DramaticShape 6240b50cec update all battle locations 2026-08-05 20:36:46 -04:00
DramaticShape 20c9061625 Fix rendering for broken mons 2026-08-05 18:30:41 -04:00
DramaticShape b7ce0f21d5 enforce 1.0 stadium rom 2026-08-04 14:18:11 -04:00
DramaticShape 7ce268e5a2 fix arrival animation, fix pidgey regression 2026-08-04 13:22:41 -04:00
DramaticShape ecb0b57d26 fix some issues, fail gracefully 2026-08-04 12:55:05 -04:00
DramaticShape 0e22393ec7 add file picker for stadium 2026-08-04 12:30:10 -04:00
DramaticShape f21b3ee597 add stadium extraction screen 2026-08-04 11:30:58 -04:00
DramaticShape 74cc08f1bf dramatic stadium 2026-08-04 10:43:35 -04:00
DramaticShape a3a712205b bump version 2026-08-03 17:40:50 -04:00
DramaticShape 95771403d9 patch holes on flower/grass models 2026-08-03 17:35:58 -04:00
DramaticShape 70243a407b add third person mode 2026-08-03 16:52:22 -04:00
DramaticShape a8c2d8ce5b menu fix, sky rendering, pokedex size 2026-08-02 13:10:20 -04:00
DramaticShape 395f51d268 fixed dll paths for vr 2026-08-02 12:29:14 -04:00
DramaticShape 1fa29a831f update sky rendering, select button changes views 2026-08-02 12:16:03 -04:00
DramaticShape 44f729e8c2 battle effect fixes 2026-08-02 11:26:54 -04:00
DramaticShape f1063abd0f add vr 2026-08-02 02:42:31 -04:00
DramaticShape 9ef8644bff add first person mode 2026-08-02 01:16:42 -04:00
DramaticShape 1a283d6771 bump version 2026-08-02 00:14:13 -04:00
DramaticShape 47363b8d23 iterate version 2026-08-01 16:41:03 -04:00
DramaticShape 6887f5d951 updates to oak's lab 2026-08-01 16:03:32 -04:00
DramaticShape a140980b1d seal transparent back sprites 2026-08-01 15:19:26 -04:00
DramaticShape 980383bb92 update battle water 2026-08-01 00:28:54 -04:00
DramaticShape 22b58e27a4 fix android water shading 2026-08-01 00:13:01 -04:00
DramaticShape 98f7419b72 fix water for android glsl shaders 2026-07-31 23:39:05 -04:00
DramaticShape 9a9441899a first pass at water 2026-07-31 22:54:16 -04:00
DramaticShape 8728783b22 account for dpi issues on updated 3d battles 2026-07-31 14:18:02 -04:00
DramaticShape 775757b2d6 account for dpi issues on updated 3d battles 2026-07-31 13:51:54 -04:00
DramaticShape 4da8e5dc3e add day/night filter to 2d 2026-07-30 22:36:59 -04:00
DramaticShape 26d1d96d52 hide tilt/gbcfx 2026-07-30 21:57:29 -04:00
DramaticShape d9a000d7ad add back sprite option for 3d battles 2026-07-30 21:52:54 -04:00
DramaticShape f12b564dcd moved route 1 battle location again, added transparency to bottom battle menu 2026-07-30 21:34:25 -04:00
DramaticShape 500556c3fc iterate version to 1.2.1 2026-07-30 00:11:02 -04:00
DramaticShape 14f844ad8e fix issue with fight transition in oak's lab 2026-07-29 23:13:36 -04:00
DramaticShape 284172db7b add clock sync option 2026-07-29 22:50:54 -04:00
DramaticShape 6d27d91411 fix glinting on windows and striping 2026-07-29 22:43:20 -04:00