57 Commits

Author SHA1 Message Date
DramaticShape 9ddb940bc8 update 2d shiny sprites and shiny animation 2026-08-08 18:51:01 -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 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 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 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 ca10a7b860 update tests/lib 2026-08-04 17:40:59 -04:00
DramaticShape b7ce0f21d5 enforce 1.0 stadium rom 2026-08-04 14:18:11 -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 08bcbf7629 Merge branch 'dev' into 3rd-person-camera 2026-08-03 17:51:08 -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 c79ecbb7ac add camera zoom controls in overworld 2026-08-03 17:09:03 -04:00
DramaticShape 70243a407b add third person mode 2026-08-03 16:52:22 -04:00
DramaticShape e3c13edda7 add smooth turning, removing collision sound effect 2026-08-02 22:42:46 -04:00
DramaticShape c0c180fd01 horde mode initial commit 2026-08-02 21:01:11 -04:00
DramaticShape a8c2d8ce5b menu fix, sky rendering, pokedex size 2026-08-02 13:10:20 -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 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 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 5ff56eab46 bump version 2026-07-29 22:29:23 -04:00
DramaticShape f841378330 add day night cycle 2026-07-29 21:42:34 -04:00
DramaticShape c3ba10e17a added battle transition into overworld 2026-07-29 19:09:48 -04:00
DramaticShape 9a34ba9c77 force 3d battle ui, initial victory road updates 2026-07-29 18:45:00 -04:00
DramaticShape d8d1d7e336 fix white screen flash on shake on versions > 1.3.0 2026-07-28 16:10:58 -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
DramaticShape 8b73cbd54d keep the block-edit hook in the mod, not in the engine
Cut, the tree regrowth on re-entry and the card-key door stamps all write
the block layer directly without emitting world.block_replaced, so
meshes derived from that layer went stale unannounced. An earlier cut of
this work made the engine announce each one -- the wrong place: it edits
the game for one mod's benefit, and every future path that writes a
block has to remember to do the same.

They all funnel through one choke point, so wrap Map:setBlock from the
mod instead. Map is a plain metatable shared by every instance, so this
covers paths written after this mod too. The write is read back rather
than trusted: setBlock ignores an out-of-bounds write, and a stamp that
rewrites a block with the value it already held is not an edit and must
not throw the mesh away.

src/world/OverworldController.lua is reverted to stock.
2026-07-27 10:44:00 -04:00
DramaticShape 89b6c8513f 1.0.6: conditional pins, Pokemon Tower, plateau statues, cave elevation
Adds `when_above` conditional pins, resolved per position in
TileShape.at: one graphic can mean two things (the gates' $32 is both
wall base course and counter front), and a flat pin has to pick one.
Gates get half-height counters and level walls.

Pokemon Tower gains a buildings entry -- it is the drawing the map edge
cuts off, sealed on the north -- and the Indigo Plateau statues are
built like the gym statues.

Fixes: grass stands one full-height clump per tile instead of two
half-cut stubs at different depths; ledge pillars drop to ledge height;
a prop only rides furniture when its own cell is blocked (chairs were
being lifted onto tables); and the caves had water and rock pinned
backwards, which stood the Seafoam sea up as rock and cut trenches
through Mt Moon. No cave tile is below the datum now.
2026-07-27 03:54:33 -04:00
DramaticShape 0ba9109e40 1.0.5: furnish every remaining interior
Extends the shape profile from ten tilesets to twenty-three -- 1,190
pinned tiles over ~130 maps -- surveyed against the standard the
finished interiors set: one 16px wall band carrying its built-ins,
half-cell counters, bookcase-collapsed shelving, thin-pool plant
standees, objects riding the furniture they are drawn above.

The recurring failures were rooms sunk into ponds by the three
stale-cache water ids (collision is per cell, so one trapped tile sank
its neighbours too), counters and cave edges towering to 32-48px,
racks fusing into deep monoliths, and anything in a walkable cell --
stools, tables, staircases, gravestone arches -- vanishing into the
floor.

Also fixes the door fold overwriting profile pins: it replaced the
resolved shape unconditionally, so stair pins on tiles their tileset
lists in doorTiles (Celadon Mansion, Pokemon Mansion 3F) silently did
nothing.
2026-07-27 02:24:05 -04:00