14 KiB
Greed and Greedier mode (fidelity pass 2026-10-25, isaac-classic rif/greed-polish)
Earlier findings (Ultra Greed's states, coins, doors, the button's flag 11, the Greed doors) are in
greed_mode.md. This file is the whole mode as the exe runs it. Greed is Game::_difficulty 2,
Greedier 3; Game::IsGreedMode 0x6f8120.
Floors and stage ids (Level::SetNextStage 0x7467c0, RoomConfig::GetStageID 0x82d030)
- Greed floors are level stages 1..7 (Basement, Caves, Depths, Womb, Sheol, The Shop, Ultra Greed); stage 6 and 7 go to 7 (0x7467c0's "Wrong Stage (Greed Mode)" switch). There is no XL, no Repentance path (types 4/5).
- Stage type for stages 1..4 is rolled from
Seeds::GetStageSeed(stage)exactly like a normal run: even -> type 1 (Cellar/Catacombs/Necropolis/Utero, behind achievements 0x56..0x58, Utero free), seed % 3 == 0 -> type 2 (Burning Basement/Flooded Caves/Dank Depths/Scarred Womb, achievements 0x156..0x159; seed effect 0x4f forces Flooded on 3/4). So each form is a third. Stages 5+ are type 0. - GetStageID in Greed (or mode 1): 7 -> 25, 6 -> 24, 5 -> 14, else
stage * 3 - 2 + type(types 4/5: 2*stage+25/26). RoomConfig::LoadStagesXml 0x82b2f0 reads those stage ids fromgreedroot=rooms/greed/(stages.xml). The old 18-25 "Greed" .stb files of rooms/ are never asked for. rooms/greed/0N..stb holds per stage: ~10 type 1 rooms (the start rooms, tall 1x2), 120-250 type 11 challenge rooms (the normal waves, tall, difficulty 1/5/10, a few 0) and type 5 boss rooms (the boss waves, subtype = boss id). rooms/greed/00.special rooms.stb is Greed's special set (shops wide, treasure subtypes 0-3, curse, super secret, devil/angel, greed exit 23, blue 28).
Layout (Level::generate_greed 0x743550)
LevelGenerator coordinates (x, y), start room at (6,6):
- stage < 7: start (6,6) shape 4 (tall) = GetRandomRoom(stage, type 1, shape 4, difficulty 1-10); shop (5,5) shape 6
(wide) from stage 0 (special); treasure rooms (7,7) and (7,6) shape 1 only if stage != 6, via
GetRandomRoomWithFallbackStage(stage, type 4, subtype 0/1/2/3 by More Options-style trinkets 0x52/0x70 rolls);
curse (5,6); greed exit (6,8) type 0x17; super secret on a dead end (try_add_dead_end).
_greedModeTreasureRoomIdx(Game+0x18370) = 0x55 = grid 85 = (7,6): that treasure room has the plain door and its pool; the other is the boss pool (ItemPool::get_pool_from_room_entities 0x7ebe20: room type 4 -> 5 when its index != 0x55) behind the silver door (GridEntity_Door::LoadSprite 0x70d3f0)._lastBossRoomListIndex= the start room (devil door host). Then 12 wave seeds are stored at Game+0x18338 (one per wave, so a wave called again draws the same room). - stage 7: start (6,6) 1x1 = GetRoomByStageTypeAndVariant(25, type 1, variant 0); antechamber (6,5) 1x1 = GetRandomRoom(25, type 5, variants 0-999, difficulty 1-10); Ultra Greed's room (6,3) shape 4 = variant 1000.
The antechamber trigger (Room::UpdateGreedWave 0x801ee0)
In stage 7, in a type 5 room, once per level (levelStateFlags 0x1000, STATE_GREED_MONSTRO_SPAWNED): the first player
with y < 320 starts Music::Play(9) (Boss), clears the room's alt-boss-music flag (desc+0x44 & 0x40), spawns Monstro
(type 0x14) at that player when the room's config variant is 0 (the empty one), calls TriggerOutput(0) (releases
the 1000.120 Spawners of output group 0: the 969.0 markers beside the Greeds/Super Greeds/Keepers) and plays sound
190 (castleportcullis). Ultra Greed's own room plays music 28 (Room::PlayMusic 0x7eb1b0, boss id 0x3e); on its death
Room::SpawnClearAward crossfades 37 (The Calm), spawns the big chest 5.340 and the Greed Donation Machine.
Waves (Room::SpawnGreedModeWave 0x816910; the decompile stops at a KAGE_LogMessage, read the rest with --asm)
wave = Game::_greedModeWave (0x18334) before the call; new = wave+1; boss threshold B = 9 (Greedier 10).
- Room difficulty: Greed waves 0-2,8 -> 1; 3-5,9 -> 5; 6,7,10 -> 10. Greedier 0-2,9 -> 1; 3-5,10 -> 5; 6-8,11 -> 10.
- Room: GetRandomRoom(stageID, new < B ? type 11 : type 5, the start room's shape, any variant, exact difficulty, subtype any) seeded from the wave's level seed.
- Timer (Room+0x723c, ticks): normal waves
(base + wave) * 30; Greed base 8 (stage 3: 7, stage 4: 6), minus 1 with achievement 0xf6 (Everything Is Terrible 2!!!); Greedier base 9/7/5/4/3 by stage 1/2/3/4/5+. Boss waves((wave - 6) * k + c) * 30: Greed k 3, c 28 (25 with 0xf6); Greedier k 0, c 15. Untimed (-1): Greed new 8, 10, 11+; Greedier new 9, 11, 12+. - Coins: normal 2 (Greedier 1), boss 4 (3); Greedier wave 9 +1, 11 +3; the last wave (B+2) 0. If the base is not 0 and
levelStateFlags & 0x800 (STATE_GREED_LOST_PENALTY, set by the button) -1 and the flag clears. Then +1 when
_greedWavesClearedWithoutRedHeartDamage(0x18374) > 0 and divisible by 3; it is incremented here, zeroed by Level::SetRedHeartDamage 0x74b5b0 (from Entity_Player::TakeDamage's red heart loss) and Level::Init. - Music: normal waves EnableLayer(0) (the floor track's layer), but stage id 24 (The Shop) Crossfade 0x26 (Challenge Room fight); the last wave Crossfade 0x17 (Satan); boss waves 0x29 on stage types 4/5, else 9 or 0x1a with the alt-boss-music flag. Sound 871 (summonpenta_wave) every wave.
- Paid once: only when new > Game+0x1836c (last paid):
PlayerManager::trigger_room_clear0x9bb840 (actives' charge, familiars), the pennies (5.20.1, AppearFast, coin particles 95) at FindFreePickupSpawnPosition of grid (width/2, 4) = (320, 280),Entity_Player::spawn_locustsper player, then 0x1836c = new. - Room::TriggerClear 0x8068f0 skips trigger_room_clear for room type 1 in Greed (the charge is the wave's), sets Game+0x18368 (last beaten wave) = wave, revives co-op ghosts after the last wave / Ultra Greed.
- Room::UpdateGreedWave: timer counts down; with no enemies alive and timer > 19 it sets 0x18368 = wave and timer = 19; at 0 the next wave spawns.
- Entity_Player::room_enter 0x7a6c50: if 0x18368 < wave, wave = 0x18368 (a continued run calls the unbeaten wave again; 0x1836c keeps it from paying twice). Level::Init zeroes 0x18334/0x18368/0x1836c.
Button (GridEntity_PressurePlate::update_greed_button 0x9839f0)
Pressed within 25 px (released past 30 px, all players). Pressed while the timer runs: health type 2 (Lost) or HasInstantDeathCurse -> flag 0x800, else TakeDamage(1.0 = half a heart, flags 0x10000080). When its animation ends: timer < 1 -> SpawnGreedModeWave + Taurus speed reset; else timer = -1 (the next wave waits). It rises again (state 0) when players are away and the timer runs or the room is clear, never after the last wave; up with no timer in an uncleared room it shows off (state 2). Looks: update_greed_button_anim 0x9837b0 (Skull = Game::IsGreedBoss 0x983970: wave+1 >= B; Pentagram = IsGreedFinalBoss 0x9839b0: wave+1 >= B+2).
Doors and rewards
- Exit door (target type 0x17) stays locked (variant 6) while wave < 10 (Greedier 11) (door setup beside GridEntity_Door::Open 0x710dd0).
- Room::GetDevilRoomChance 0x7f92b0: Greed 0 until wave >= 11 (Greedier 12), then 1.0, so the devil or angel door always comes once the last wave is beaten; Level::CanSpawnDevilRoom 0x749830 waives its stage limits in Greed.
- Room::SpawnClearAward 0x7fb250: Greed pays no room award at all; only the start room's and Ultra Greed's branches run. Room::TriggerBossDeath 0x7fec00: no boss drops in Greed's start room (local flag for room type 1).
- Entity_Slot::Init 0x65d200: in Greed a Blood Donation Machine (6.2) becomes 6.5.
- Room::Init 0x7f2800: Greed shop level = stage (stage 6: 5 in the start room, else 1); the start room scatters (seed % 5) + 3 decorations around grid (width/2, 4).
Greed Donation Machine (Entity_Slot::Update case 0xb, 0x65d950)
On "CoinInsert": the player type's event counter +1 (the per-character count) and event counter 0x73 (all characters; its value % 1000 + 1 is the three-digit display). Unlocks by that total: >1 0xf2 Lucky Pennies, >13 0xf3,
32 0xf4, >67 0xf5, >110 0xf6 Everything Is Terrible 2!!!, >233 0xf7, >438 0xf8, >499 0x155 Greedier, >665 0xf9, >878 0xfa, 999 0x113 (+ effect 1000.104 at -80), >=1000 0xfb and the machine breaks into pennies. Jam chance (Entity_Player::GetGreedDonationJamChance 0x7cbb90, per-character count n):
floor(0.2 * min(e^(0.023 n) - 1, 100) + .5)percent, capped at 1 in Greedier, 99.9 for player types > 0x28; rolled with RandomFloat*100 after each coin.
Keeper / Tainted Keeper
No Greed-only branch for them besides the shared rules: T.Keeper's enemy coins (Entity_Pickup::Update 0x6bbdc0, RoomDescriptor+0x52 TKeeperCoinSpawns: 1/(n+1), at most 10 a room, for enemies with no spawn grid index or in a revisited room) apply to the start room's waves too.
Port (isaac-classic)
stages.json greed (floors with stage lists, rooms map incl. the antechamber, waves with challenge kind, coins, sounds, pool for the second treasure room), room_sets rooms[]/trigger, music.json layer/waves and stage keys, effects' chance/whole for the jam. Not ported: Greed's item pools (the Rebirth version uses the base game's pools), the achievements (0xf6's faster timers included), the per-wave seed, shop levels, the 6.2 -> 6.5 swap.
Pass 2 (2026-10-26, isaac-classic rif/greed-2)
- Item pools:
ItemPool::GetPoolForRoom0x732dc0 reads a room type -> pool table at ItemPool+0x69c (normal) or +0x718 (Greed/Greedier). Game ctor 0x6f1020 fills the normal one (shop 1, treasure 0, boss 2, secret/super secret 5, curse 0xc, challenge 0, library 6, devil 3, angel 4, dungeon/boss rush/isaacs/barren/dice 0, chest 8, black market 1, planetarium 0x1a, ultra secret 0x18, the rest -1) and maps it for Greed: treasure 0 -> 0x10 greedTreasure, shop 1 -> 0x12 greedShop, boss 2 -> 0x11 greedBoss, devil 3 -> 0x13 greedDevil, angel 4 -> 0x14 greedAngel, secret 5 -> 0x16 greedSecret, curse 0xc -> 0x15 greedCurse; the others stay. Room type 3 draws a pool by seed % 0x1e.ItemPool::get_chaos_pool0x737010: in Greed only pools 0x10..0x16 by total weight. - Shop level (Room::Init 0x7f2800): Greed = stage 1..5, stage 6 5 in the start room else 1; outside Greed by the
store upgrades 0x97..0x9a. In Greed it only picks the Shop backdrop's wall art (Backdrop::pre_render_walls 0x937420:
backdrop 0x14 in a shop or any Greed room);
Room::init_shop_item_slots0x813d90 has a fixed Greed branch (slots 3, 0, 8, 9, then four byRoom::greed_shop_slot_type0x813d00: seed % 10 -> 3,1,0,4,8,10,5,2,6,11). - Entity_Slot::Init 0x65d200: Greed turns variant 2 (Blood Donation Machine) into 5 (Devil Beggar), confirmed.
- Button (update_greed_button 0x9839f0) calling a wave: each Taurus holder (or zodiac 299) without the 299 temporary effect gets its speed bonus zeroed, its colour reset and the 299 effect re-added (cooldown = the item's maxCooldown): what TriggerNewRoom_TemporaryEffects 0x7a8350 does entering an uncleared room. Not for a wave the timer brings.
- Ultra Greed (NpcAI::ENTITY_ULTRA_GREED 0x59edb0), beyond greed_mode.md:
- Init (state 0): with no 294 in the room, one 294.0 per door slot the layout has (bit in RoomConfig doors at +0x38), at that slot's door grid position, I1 = slot. The door (ENTITY_ULTRA_DOOR 0x5a5b60) moves 23.08 px in from it, rotation slot*90-90. Shield (0xc40) 65, Greedier 45; achievement 0xf6 (or a daily/debug run) makes them 85/60 and multiplies health by 1.15 (and the coins' age timers by .9 in ENTITY_ULTRA_COIN): EIT2, not Greedier.
- Anger h = clamp((I2 + 15 - 15 * health share) / 25), I2 (0xbc4) from eaten coins, -1 every 30 frames.
- Slot (state 100): SlotStart, SlotSpinningFast for 51 - 21h ticks, then a SlotSpinningOutcomes frame Random & 3: 0 key coins (293.1) one per 8 ticks, as many as there are 294s (two a beat below 20% health), the k-th taking door k's slot as I1; 1 bomb (293.2) 12 one per 2; 2 heart (293.3) 7 one per 7; 3 spinner (293.0) 7 one per 7. Each at FindFreePickupSpawnPosition(GetRandomPosition(0)) with a unit random velocity. Back to walking (4) once past count*period and past 60 - 40h ticks (spinners: no minimum).
- Shoot: WeightedOutcomePicker {3, 4, 5, 50} x100; FireProjectiles mode 3/4/5 at 11 (FallingAccel .06, FallingSpeed 10, Height -80, Scale 1.6, variant 7) or FireBossProjectiles(6) for 50; Greedier Spread x1.6 and BulletFlags |= 2. FireProjectiles (Entity_NPC 0x6cb4xx): mode 3 = (1,0), (.914, +-.407S); 4 = (.99, +-.139S), .9(.914, +-.407S); 5 = (1,0), (.978, +-.208S), (.914, +-.407S).
- Tantrum (200): on Stomp1/Stomp2 a Keeper (86) at (x, y + 1.3 size) while fewer than 4 (UG); Greedier: two 293.2 subtype 1 at random free spots, unit random velocity. Ends past 75 / (1 + h) ticks.
- Death (byte 0x173 set -> STATE_TURN_GOLD 9000): projectiles (type 9) die, every valid boss enemy is killed by it, 294s go to state 3 (close); "Death" (121 frames) with bling; its "Disappear" event (frame 64) plays 0x1af/0x1ab, 100 gold particles, spawns a penny 5.20.1 at it moving (0, -3) and calls Room::TurnGold; at the clip's end 9001 ("Final", the statue). In Greedier (difficulty 3, or 1) variant 0 Morphs to 406.1 as Death ends, state 0x10, BreakFreeLong (first bestiary encounter) or BreakFreeShort; StartGibs/BreakGibs gold particles, BreakGibs smashes.
- ENTITY_ULTRA_COIN 0x5a4820 variant 2 subtype 1: its blast drops Random & 1 coins (5.20.0) at speed 2.
- Port pass 2 (isaac-classic): itempools.json overrides under greed_mode (the Greed pools, of the items the version's pools draw) and a curse pool, per-wave room seeds, the 6.2 -> 6.5 swap in the greed room sets, the greed_wave trigger (Taurus), spawn_place "room", the fans, the death sequence. Still not: achievements, shop levels' wall art, the anger timers, two key coins below 20%, key coin -> its own door, Chaos' Greed-only pools.