Commit Graph

26 Commits

Author SHA1 Message Date
DramaticShape 34e7da5c12 v-grid toggle on battles 2026-08-08 19:01:53 -04:00
DramaticShape de54e4ea26 fix canopy issue 2026-08-08 12:27:19 -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 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 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 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 c79ecbb7ac add camera zoom controls in overworld 2026-08-03 17:09:03 -04:00
DramaticShape 44f729e8c2 battle effect fixes 2026-08-02 11:26:54 -04:00
DramaticShape 6887f5d951 updates to oak's lab 2026-08-01 16:03:32 -04:00
DramaticShape 980383bb92 update battle water 2026-08-01 00:28:54 -04:00
DramaticShape 8f38aeb36e water updates 2026-07-31 23:05:54 -04:00
DramaticShape 9a9441899a first pass at water 2026-07-31 22:54:16 -04:00
DramaticShape d9a000d7ad add back sprite option for 3d battles 2026-07-30 21:52:54 -04:00
DramaticShape 6d27d91411 fix glinting on windows and striping 2026-07-29 22:43:20 -04:00
DramaticShape 9c263f0937 glass masking 2026-07-29 22:23:21 -04:00
DramaticShape 7e3245a9ef more shadow fixes, fix tree borders 2026-07-29 22:23:08 -04:00
DramaticShape 18857e039a fixed disconnected shadows 2026-07-29 21:51:42 -04:00
DramaticShape f841378330 add day night cycle 2026-07-29 21:42:34 -04:00
DramaticShape 3c1781f6b1 fix vertical line in battle sprites 2026-07-29 15:35:28 -04:00
DramaticShape d8d1d7e336 fix white screen flash on shake on versions > 1.3.0 2026-07-28 16:10:58 -04:00
DramaticShape 2e0ae37bcd fixed full screen flashing in battles 2026-07-28 15:22:13 -04:00
DramaticShape 5781c28b60 added FULL menu option for voxel mod 2026-07-28 13:37:19 -04:00
DramaticShape 6280cdffe7 Added overworld battles 2026-07-28 13:01:38 -04:00