Files
isaac-port/notes/entities/pass5_g2.md
T

10 KiB

Group g2 notes (pass 5, 2026-10-24)

Skinny family, bonies, One Tooth, Fat Bat, Dart Fly, Oob and Fly Bomb, read for isaac-classic branch rif/monster-fidelity-8. Base friction is 1 for all of them (entities2.xml); "friction *x" below is the AI's per-tick multiplier (Entity +0x36c). Speed convention as pass4_00.md (path/roam speed = the call's argument, retention = the AI's friction multiplier).

skinny: NpcAI::ENTITY_SKINNY 00538b70 (226.0). Changed

  • State 0 -> 4, head overlay "Head" (226 only). State 4: FindGridPath(CalcTargetPosition, .5, 900, 1); feared or charmed (flags 0x1000800, no controller) it runs PathFinder::EvadeTarget instead (friction *.8 more).
  • AnimWalkFrame("WalkHori", "WalkVert", .1). Friction *= .8 at the end of every tick, all types of the routine.
  • Red creep 1000.22 on IsFrame(7, index) unless friendly (flag 0x1000000): Scale (+0x478) .5, timeout and lifespan 30, sprite scale starting at .1 (it grows in the effect's own update).
  • Idle groan: IsFrame(20) and rand%3 == 0, sound 0x5b (226.0) / 0x59 (others), volume .8, only while hostile.
  • Port: retention 1 -> .8, creep period 8 -> 7 (serial), scale .6 -> .5. The groan and the evade are not ported.

rotty: NpcAI::ENTITY_SKINNY 00538b70 (226.1). Changed

  • Walk and creep as the Skinny (same fixes).
  • On death (_dead set in the AI): rand&1 == 0 -> sound 0x73, Morph(227, 0) (Bony) and health = max, _dead cleared. Otherwise, unless +0xc76 (short) is set, one Attack Fly 18.0 at velocity RandomVector*2 (flag 4 cleared), and on a second rand&1 == 0 another one at the opposite velocity: 1 or 2 flies, mean 1.5.
  • Port: transformation one_in 2 -> bony matches. death_spawn stays at 2 flies (no random count in death_spawn).
  • Port follow-up: engine death_spawn/count_random: count 1 + random(2) Attack Flies, as Rep.

crispy: NpcAI::ENTITY_SKINNY_crispy 0054a350 (226.2). Changed

  • Heat t = 1 - clamp((hp - .4 max) / (.9 max - .4 max), 0, 1): 0 above 90 % health, 1 below 40 %.
  • Below half health: overlay HeadTransition, then HeadAngry once it ends.
  • Walk: target = CalcTargetPosition + Isaac's velocity * 10. With a clear ground line (CheckLine mode 0) velocity += unit * .65; otherwise FindGridPath(.6 + .5 t, 900, 1). Friction *= .8 + .15 t.
  • Every tick rand < .2 t: an ember 1000.66 at (x + rand16 - 8, y - 15 - rand15), velocity (rand*.4 - .2, -.8 - rand1.6). IsFrame(2) and rand%5 == 0: a blood splat (MakeSplat .4 + rand.4).
  • IsFrame(30, InitSeed % 30): TakeDamage(1, 0, self, 30) (vtable +0x20): 1 health a second.
  • Colour: layer 1 alpha 1 - t; layer 0 (1 - .9 t, 1 - .8 t, 1 - .8 t). Above t .3, a grid collision keeps its speed (velocity renormalised to the pre-collision length at +0x194).
  • Port: speed .5/retention 1 -> .6/.8, with four hp_share_below phases (.775, .65, .5, .4) stepping to .725/.838, .85/.875, 1.0/.92 (head swap) and 1.1/.95. The old gate was hp_below 10 (absolute health). regen -.0333 lethal already matched the 1-per-30-ticks burn. Not ported: the continuous ramp, the direct push, embers, splats, tint, the wall bounce.

bony: NpcAI::ENTITY_SKINNY 00538b70 (227.0). Skipped (matches)

  • Init sets flag 0x10000. Walk: GridPath set (900) under it, MoveRandomlyAxisAligned(1.25); WalkUp/WalkDown/WalkHori by the velocity's major axis (speed^2 >= 1, else WalkDown frame 0).
  • Attack check on IsFrame(3), not spawned by 0x38a, not feared/charmed (0x1000a00): T = Isaac + Isaac.vel * rand*16, clamped 20 inside the room; its grid cell's centre (index % width * 40 + 40, index / width * 40 + 120) within 20 of T on either axis, distance < 200, CheckLine(cell centre, T, 3) -> state 8, AttackHori/Down/Up by T's major axis.
  • State 8: friction *.3 (so .24 with the .8); on "Shoot" (frame 4) one projectile, variant 1 (bone), toward Isaac resized to 10, sound 0xf9; ends with the clip. No cooldown.
  • Data matches: roam 1.25/.8, period 3, alignment 20, range 200, sight, speed 10, retention .24. Not expressed: the rand*16 lead on the alignment test.

black_bony: NpcAI::ENTITY_SKINNY 00538b70 (277.0). Changed

  • Init: flag 0x10000 and a Color (.3, .3, .3, 1) assigned (target not identified).
  • As Bony, but at the attack clip's end with StateFrame < 2 it replays the clip (StateFrame++): three throws an attack (repeat limit 2 already matched). Its bones: Color (.4, .4, .4, 1).
  • Death (not friendly): Game::BombDamage(pos, 40, radius 60, line check, flags 4) + FUN_00703190 (spawns and saves a 1000.18 bomb crater) + explosion 1000.1.
  • Port: shot tint [.4, .4, .4, 0, 0, 0]. The 40/60 blast is left on the generic death_explosion.

one_tooth: NpcAI::ENTITY_SKINBALL 005381c0 (234.0, shared with 232). Changed

  • Init: PositionOffset (0, -20), no grid collision, V1 = a random unit heading, StateFrame = rand%30. Leaving the room's clamp redraws V1 and resets StateFrame to that tick's rand%30.
  • StateFrame counts up each tick; at every multiple of 20 V1 is redrawn.
  • Steering: aim A = Isaac + vel*20 + V1 * (distance * .85) - pos. FlipX turns when A.x is past 40 the other way; the x of the unit is then replaced by the facing sign (always full), y kept: target velocity (+-3, 3 uy); v += (target - v) * .1.
  • Dash: StateFrame > 100, 80 < distance < 160, StateFrame % 3 == 0, rand&1, unit toward Isaac + vel*20 within dot .98 of one of (+-.894, +-.447) -> sound 0x92 (pitch 1.5 / .5 for champion colours 18 / 19), state 8, StateFrame 20, V2 = that unit. State 8: Dash clip, friction *.6, v += V2 * 3.5 / friction, StateFrame -= 1; at 0 back to 4 with StateFrame = rand%30.
  • Data matched: hover .333/.9, period 3, one_in 2, range 80..160, slope .5 within 11.48 deg, lead 20, lunge 5.833 for 20 ticks at .6, cooldown 70 + 0..29. Added first_cooldown [71, 30]: the first dash also waits for StateFrame > 100.
  • Not expressed: the orbit offset (V1 * .85 distance, redrawn every 20 ticks) and the full-x swoop.

fat_bat: NpcAI::ENTITY_FAT_BAT 00540510 (258.0). Changed

  • Init PositionOffset (0, -30). Table 0x00c5c84c: four diagonal units. u = the one with the largest dot with d = Isaac - pos; P = -(d.u) u (Isaac to the nearest point of his diagonal along u).
  • Attack: ProjectileCooldown == 0, rand%15 == 0, |d + P| < 40, |d| < 750 -> state 8, cooldown 30. Shooting clip; on "Shoot" (frame 6) one shot toward Isaac at 10, sound 0x92, state 4 (the clip is cut there).
  • Move every tick, in both states: v += .45 * unit(d + .8 P); friction *.8. ProjectileCooldown counts down each tick.
  • Tear dodge: QueryRadius(pos, partition 4) for tears heading at it within 100: a sideways push (1 - dist^2/10000) * .5 * min(|d|^2, 10000)/10000, doubled away on a 1 in 2 when touching a grid.
  • Port: stop "Shoot", cooldown 30 -> 24 (counted from the attack's end here). Not ported: the dodge, moving while it shoots.

dart_fly: NpcAI::ENTITY_DART_FLY 005400d0 (256.0). Skipped (matches its pull)

  • With Skatole (collectible 9) it Morphs into a Fly (13). V1.X = phase, rand * 2 pi at init, += .18849558 a tick.
  • v += (cos(phase/2) * 10 + 13.5 nx, sin(phase) * 10 + 13.5 ny) * .0225 (= .75 * .9 / 30), n = unit to Isaac; speed capped at 8; friction *.95. Fly clip, FlipX by velocity.
  • The data's hover .32/.95 is the .304 net pull. No lead, no backing off in Rep (the reference text was the wiki's). Not expressed: the figure-eight wobble.

oob: NpcAI::ENTITY_OOB 0053ab40 (224.0). Changed

  • Init: grid collision 3, I1 = 30 + rand%45, a colour (.5, .1, .1) setup.
  • State 4: Walk; d = CalcTargetPosition(10) - pos; v += unit(d.x, 3 d.y) / f with f *= .8 (net 1 a tick).
  • Charge: |3 d.y| < 20 and FrameCount (+0x3a4) > 45 (no roll, every tick) -> face Isaac, Charge clip, sound 0x77, TargetPosition = pos, grid collision 2 (walls on y only), state 8, velocity 0.
  • Spawn: I1 counts down on idle ticks; below 0 -> I1 = 30 + rand%45, Spawn clip, state 13, velocity held at 0; on "Shoot" (frame 27), unless a grid stands under it, sound 0x109 and a Brain (32.0). No enemy count test (callees have no query).
  • Charge (decompile partly mangled here): from WasEventTriggered("Shoot") (frame 21) velocity.x = +-25 every tick, Charge Shake looping once Charge ends; past the room's edge + 160 it wraps to the other side - 160 (StateFrame++), and it stops back at its TargetPosition.x after a wrap, grid collision 3, state 4.
  • Port: charge line within 20 -> 6.67 and period 3 -> 1, first_cooldown [45, 0]; spawn period 7 / one_in 12 / enemy_limit 6 -> period 1 / one_in 52 (the timer's mean), no limit, retention 0. Not ported: the y*3 weighting, the wrapping 25 px/tick charge (still lunge 2 / .92 with Charge Shake), the over-a-grid test.

fly_bomb: NpcAI::ENTITY_FLY 00506bd0 (819.0, 0x333). Changed

  • Init: Color (0,0,0,1, offsets .1176); variant 1 (eternal) is invincible, orbits its parent 40 px at 5 deg a tick and is launched at 15 when the parent goes.
  • It runs the Level 2 Fly (0xd6) branch everywhere: target Isaac (IsFrame(3)), steering only on GetIntervalTicks(2) (interval constant 0x00baa630 = 2), aim (dx - dy, dy + dx) with y * .5, stop distance 25, push min((|a| - 25) * .08, 1.2) doubled (types 0xd6/0xf9/0x333 without Skatole).
  • Drift as every fly: frame%4 == 1: V1 = (RandomVector * .6 + V1) * .4; frame%3 == 2: room-edge nudges .06 and v += 2 V1 / f, f = .6. Wall bump: grid collision and rand%3 == 0 -> V2 = velocity resized to -(2 + rand1.5), added each tick, *.9, dropped below length 1.
  • Touch: Entity_NPC::HandleCollision (asm 006cdd07): with Isaac (or, charmed, anything but its parent) and not friendly: BombDamage(pos, 40, radius 60, line check, flags 4), explosion 1000.1, Remove (vtable +0x28).
  • Death: a small bomb 4.14 with the fly's velocity, "Appear", fuse/timer (+0x410/+0x414) 60 - rand%15, its parent kept.
  • State 16 (shot by a Blaster): Cannonball, speed set to 10 on launch, Deploy after 46 ticks or below speed 5, bouncing off grids (reflect, sound 0x28).
  • Port: acceleration 1 -> 2.4, distance_gain .08 -> .16 (the doubling), drift_radius .6 kept, drift_retention .8 -> .4. Not ported: the 45-degree steer turn (pass3_b's steer_turn proposal), the wall bump, the delayed death bomb.
  • Sibling check for the owners of level_2_fly / full_fly (pass3_b "matches"): they keep acceleration 1.2 / gain .08 and drift 1.2 / .8, but the same code doubles their push (2.4 / .16) and draws drift .6 / .4.