From 155d8b038fa419f4c90d2bdb35b6cc02a7f05287 Mon Sep 17 00:00:00 2001 From: shweet Date: Sat, 24 Oct 2026 22:39:15 -0400 Subject: [PATCH] rif/rebirth-pills: pill pool, colours, gold pill, PHD/False PHD tables, Retro Vision, I'm Excited, time scale --- db/names.tsv | 2 ++ notes/items/trinkets_cards.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/db/names.tsv b/db/names.tsv index e303f5b..19d7f57 100644 --- a/db/names.tsv +++ b/db/names.tsv @@ -1455,3 +1455,5 @@ 007a3d30 Entity_Player::pocket_use_input logs "Action PillCard Triggered" and uses the pocket (decompile stops at that log: read 0x7a4100+ with --asm); Endless Nameless (trinket 0x4f) at 0x7a41a7: 0.25/0.33/0.5 a copy of the used pill (kind 0) or card (kind 1); caller Entity_Player::Update (items-verify) 007a42b0 Entity_Player::pockets_rotate ACTION_DROP (0xb) triggered: rotates the filled pocket slots (0x17a0..) slot 0 to the back, then SwapActiveItems 005b1890 Game::room_restart_flag_set sets game+0x67744 = 1 after D7's Room::RespawnEnemies +00736c30 ItemPool::on_pill_used the gold pill (colour 14) after a use: clears its identified byte (ItemPool+0x7e0+colour) and gives effects[colour] (ItemPool+0x7a4+colour*4) a random available pill effect none of colours 1-14 holds (rif/rebirth-pills) +007ea2d0 Room::time_scale_update misnamed GetDevilRoomChance: the global time scale (manager+0x2a2d4) SetBrokenWatchState stores: Stop Watch effect (0xe8) / Hourglass effect (0x42) / Broken Watch state 1 -> 0.7, state 2 or challenge 22 -> 1.43, Stop Watch owned -> 0.9, collectible 0x2a5's countdown eases it; plus (GFuel count - 1) * 0.1 (rif/rebirth-pills) diff --git a/notes/items/trinkets_cards.md b/notes/items/trinkets_cards.md index 5020797..995051a 100644 --- a/notes/items/trinkets_cards.md +++ b/notes/items/trinkets_cards.md @@ -183,3 +183,34 @@ Findings from porting Rebirth trinkets, cards/runes/souls and pills to isaac-cla - Emperor? (0x3c): Level::TryInitializeExtraBossRoom, then StartRoomTransition to room -17 (else MoveToRandomRoom). - Tower? (0x48): see batch 2; the rocks come from effect 1000.177 (Entity_Effect::Update: no decompile). - Equality!'s and the crowns' findings are in batch 3 / 2. + +## Pill colours and the pill pool (rif/rebirth-pills) + +- ItemPool (Game+0x1a740): effects[colour] at +0x7a4 + colour * 4 (colour 0..14, 14 the gold pill), identified[colour] + bytes at +0x7e0 (IdentifyPill / IsPillIdentified clamp the colour & 0x7ff to 14). +- ItemPool::Init 0x734f30: colours 1..13 Fisher-Yates shuffled (rng +0x654), then 14 appended; the available pill + configs (PillEffect::IsAvailable: achievement, Greed's greedmode flag) shuffled; colour slot i takes the first left + whose class digit (config +0x4c, pocketitems.xml class "1+" -> 1) is slots[i], else a random one left: + slots = 3,3,3,3,2,1,0,-1,-1,3,2,1,-1,-1 (-1 any). effects[0] = -1, identified all cleared. +- ItemPool::GetPill 0x734900 (seed): colour = rand % 13 + 1; rand % 140 == 0 -> 14 (gold, achievement 0x2a7); + rand % 70 == 0 -> | 0x800 (horse, achievement 0x2aa); Lua override last. +- ItemPool::GetPillEffect 0x734a80: challenge 0x29 -> 4. With PHD (75), Virgo (303, or zodiac), Lucky Foot (46) and + no False PHD (654): table 0xb6a240 -> 0xb6a27c (15 pairs: 6>7, 17>18, 13>14, 11>12, 15>16, 25>23, 1>2, 27>36, + 29>28, 31>19, 37>23, 22>24, 39>40, 42>41, 47>48). False PHD alone: 0,7,38>6; 2,5,21>1; 3,16,34>15; 4,12,32>11; + 10,18,35>17; 14,20,33>13; 19>31; 23,26>25; 24>22; 28>29; 36>27; 40>39; 41>42; 43,46>44; 45>37; 48>47. Both: none. + Then CanUsePill 0x7c40e0 false: 1 Bad Trip -> 5 Full Health (False PHD: 8 I Found Pills); 6 Health Down -> 7 + (False PHD: 8). CanUsePill: Bad Trip needs red+soul+bone-rotten > 2 halves (16 in Greed), Health Down max hearts + (soul hearts for soul characters, bone*2 for bone, never coin health) > 2. +- UsePill 0x7c4180 preamble: colour 14 -> on_pill_used (new effect, unidentified again); else identified[colour] = 1. + Last pill colour (player+0x1738) not set for the gold pill. False PHD tail: effects 0x19, 1, 0x1b, 0x16, 0x1d, + 0x1f, 0x25, 0x2a spawn a black heart (5.10.6) and set cache damage. +- Retro Vision (0x25): Game::AddPixelation 0x753cc0: timer Game+0x269e0 = max(param, timer), +0x269e4 = that (its + length); Game::Update decrements; Room::Render 0x80f200 sets the shader amount (0xc79a4c) to (len - t) / 15 in the + first 15 ticks, t / 15 in the last 15, else 1; apply_sprite_shader_params passes it as PixelationAmount + (coloroffset.fs: texture read in blocks of 1 + amount texels, colours stepped to 1/16 by amount). Not the HUD. +- I'm Excited (0x2a): Room::SetBrokenWatchState(2) (time scale 1.43, Room::time_scale_update 0x7ea2d0), collectible + effect 28 (The Belt), _imExcitedSpeedupCountdown = (RandomInt(2) + 2) * 900; update_effects (30 Hz, as R U A Wizard's + timer) re-applies both whenever the countdown passes a multiple of 900; horse level flag 0x19: every room. +- ??? (0x1f): AddCurse(0x20 Maze) + a costume; horse: one of 1, 4, 8, 0x40 (darkness, lost, unknown, blind) the + floor's filter_curses allows, at random. +- I Found Pills (8) is a costume only (Puberty is its own effect 9).