Ghidra 12.2 project and full dump of isaac-ng.exe v1.9.7.17, query scripts, notes indexed by entity, anm2/rooms reimplementations, and db/ (names + fields) that build.sh re-applies. Fixes awk numeric address comparison in find.sh/decompile.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 KiB
misc3 part A notes
strider (NpcAI::ENTITY_STRIDER @0055c810)
Was kind spider (wrong model). Real AI: state 3 idle (IdleDir); each tick rand&3==0 then either (rand&1==0 and
CheckLine to Isaac) -> walk toward Isaac, else rand%3==0 -> walk a RandomVector. Walk = non-looping 20-frame
Walk
directional_poses facing the lunge direction when lunge_random.)
dank_charger / carrion_princess (NpcAI::ENTITY_MAGGOT @0052db50, type 23 var 2/3)
Walk: MoveRandomlyAxisAligned(0.6) (FindGridPath 0.84 only when it has a target override), friction *0.85 (vertical also *0.9647). Changed both: move corridor -> roam, speed 0.6, retention 0.8 -> 0.85. Charge check on IsFrame(4) with no random roll.
- dank: |dx|<20 or |dy|<20, dist^2 < 40000 (range 200, was 300), CheckLine. Charge vector = 1.3 * dir * 14 = 18.2
(was 14); velocity lerps 0.8 toward it, retention 1, decays share min(1,(t-10)/70)*0.06 (already matched), ends
when t >= 46 and speed < 2. Feature:
charge_decay/min_ticks(46) - the charge can't end before this. - princess: Isaac delta rotated 45 deg must be within 20 on one axis (diagonal within 20, matched), no range limit, CheckLine (added sight), AddVelocity 1.3 * diagonal dir each tick with friction 0.8 (lunge 1.2 -> 1.3, retention 0.9 -> 0.8), removed one_in 2. Charge runs until stuck (grid-stuck counter >= 6), on_wall end matches.
nest (NpcAI::ENTITY_HIVE @0050c370, type 205; fleeing_enemy)
Cough cooldown for type 0xcd = 75 + 55 + rand%20 = 130..149 (was 75). Set 140.
Feature: cough/cooldown_random (ticks 0..N-1 added; nest: cooldown 130, random 20).
Note: range test is Euclidean dist < 300 in the decompile; the field doc says "both axes".
Rest matches (blocked 7, distant 3, crowd 4 + rand%5 adding 20..69, retention 0.8, spawns spider).
swarm (NpcAI::ENTITY_SWARM @00540df0)
Retention 0.8 ok. Separation: every tick, against every enemy with index >= its own, velocity += unit(offset) *
(1 - d/50) * 0.75 (and the other gets the opposite). Was period 3 / radius 22 / strength 0.05; set period 1,
radius 50, strength 0.06 (velocity push 0.015/px at retention 0.8 ~ x4 positional).
Not expressible (feature proposal swarm move): the leader (no parent) keeps a target point moving 5*speed per
tick toward Isaac; members use the leader's point; every member's accel = (point - pos) * 0.03 + circle term with
angle (frame * +-5 + index * 25) deg (sign by index parity); target points of leaders repel within 100
((1 - d/100) * 0.5). Separation also attracts beyond 50 (no distance gate) - separation/attract: true.
Spawning: an unparented swarm at state 0 spawns members at radius 10 around itself, linked as children.
grub (NpcAI::ENTITY_LARRYJR @0046a0f0, type 239)
Head walk is MoveRandomlyAxisAligned(2) with friction 0.8 -> move corridor -> roam (speed 2 kept), dropped corridor_retry. Added the head charge: once stateFrame >= 51 since the last charge, if Isaac (+ his velocity * rand16) is within 20 on either axis and CheckLine, plays AttackHead
, velocity += 3.7 * dir a tick, friction 0.90.8 = 0.72, until it hits the grid. Expressed as two attacks (line row/column within 20, sight, cooldown 51, lunge 3.7, retention 0.72, on_wall end, repeat limit 10). LEAD: verify a chain head runs attacks; if not, dropattacks and implement chain/charge with those numbers. The random lead (rand * 16 * Isaac velocity) needs
line/lead_random: true (lead scaled by a random 0..1).
Also: segment health is equalised to the lowest of the chain each tick (matched by existing regen? not checked).
misc3 part B notes
wrinkly_baby (38.3) — NpcAI::ENTITY_BABY 0052ae30 -> variant 3 handler FUN_0054fa80
- Init: cooldown 0xbc4 = 5 + rand%10 -> first_cooldown [5,10].
- Idle: friction *0.7, accel 0.33/friction toward CalcTargetPosition -> speed 0.471, retention 0.7. When Isaac is within 120 the target is pushed out to 120 px from him (standoff): NOT expressible (see features).
- Roll (cooldown <= 0, sight via FUN_006d7d60, rand&3==0 every tick): dist < 120 -> Attack; 120 <= dist < 280 -> DashStart. Was: Attack cooldown 30 + lunge -0.33 (no lunge in decomp), Dash period 4 one_in 3 cooldown 30. Now both one_in 4, sight, Dash range_min 120.
- Attack: friction 0.7, on Shoot FireProjectiles mode 2 (centre + two rotated (0.961, 0.276*Spread), Spread 0.6 -> +-0.171 rad, side shots at 0.9 speed), speed 8 (10 hard). Then cooldown 15 + rand%30 -> cooldown 15, cooldown_random [30,1]. count 3, spread 0.171, speed 8. Side shots at 0.9x speed are not expressible.
- Dash: as recorded (3.75 along the locked direction, friction 0.85, ends within 20 px along the axis -> Attack). Kept. Decomp has no wall end or 20-loop cap. Kept them as safety.
cursed_globin (24.3) / dank_globin (24.2) — NpcAI::ENTITY_GLOBIN 0050e4d0
- Walk: FindGridPath speed 0.75 for variants 0/2/3 (1.1 only for Gazing, variant 1), friction 0.97. Splat rand%10 at scale 0.2 + rand0.5.
- Cursed acceleration 1.1 -> 0.75. Added splatter one_in 10, min 0.2, random 0.5 to both.
- The engine treats flash variant 2 as "alternate" (Gazing's rules: alternate_acceleration 1.1, retention 0.83, retreat).
Dank IS variant 2, so it got Gazing behaviour. Set alternate_acceleration 0.75, alternate_retention 0.7 (decomp: non-variant-1
recovery friction 0.7), retreat_acceleration 0, alternate_animation ReGen.
Lead: better to make isAlternate data-driven instead of
variant == 2(see features). - Not expressible:
- Dank: on each regen, if alive enemies < 7, spawns type 85 (spider). On death spawns effect 1000.26 (dank creep, scale 2).
- Cursed: no fixed-health regen. On death (unless flag 0x200000) it becomes ReGen with health max(maxHp*0.6, ...) and splits. It spawns a copy of its type/variant with subtype+1, 2 ticks invulnerable, and the two push apart at 4 px/tick along a perpendicular of its velocity (random if still). The ReGen clip is skipped ahead by (4 - subtype)*10 frames.
black_globins_body (280) — NpcAI::ENTITY_GUSHER 0050af90
- Init: projectileCooldown 20 + rand%20 -> first_cooldown [20,20].
- Move: friction *0.75 then MoveRandomlyBoss -> drift, speed 0.5/0.75 = 0.667, retention 0.75 (was wander 0.5).
- Splat every 10 ticks (FUN_006ac760 interval 10), scale 0.2 + rand*0.3 -> splatter period 10.
- Spider: when cooldown <= 0 and GetAliveEnemyCount < 5, ThrowSpider (height -30), cooldown 90 or 180 (((rand&1)+1)*90). Was period 10 one_in 15 with a spider cap of 4. Now enemy_limit 5, cooldown 90, cooldown_random [2,90]. The decomp plays no animation for the throw. The "Spiders" clip was kept.
scarred_double_vis (39.3) — NpcAI::ENTITY_VIS 0052c720
- Move: MoveRandomlyAxisAligned(0.7) -> move corridor -> roam (speed 0.7 kept, retention 0.8 kept).
- Attack check IsFrame(3), aligned < 20, distance < 400, on camera: matches. 4 cardinal lasers (v1, -v1, perpendiculars), timeout -10 (until clip) or 3000: matches the record.
- The decomp has no walking splatter. The record has splatter period 5. Left alone (could be blood from config); lead may drop it.
blaster (821) — NpcAI::ENTITY_BLASTER 004fcc20
- Move: friction *0.7 then MoveRandomlyBoss -> drift, speed 0.714, retention 0.7 (was wander 0.3/0.8).
- Roll: rand%70==0 every tick (period 1, one_in 70). Needs fewer than 4 live type 819 (Fly Bomb), not all enemies: spawn_cap {below 4, type fly_bomb} replaces enemy_limit 4.
- Shoot: Fly Bomb at speed 10 toward Isaac (predicted by his velocity * dist * 0.1; x clamped to the facing side), spawned 5 px out -> spawn_speed 10, spawn_toward 5 (was 6 / offset 20). Bomb hp 0.1, fuse field 60.
- Recoil not expressed: for 5 ticks after Shoot, velocity -= dir*4 with friction 0.9 (else 0.7).
Proposed engine features
hover_standoff(scripted hover): when Isaac is nearer than N, the hover target becomes Isaac + (self - Isaac) resized to N. Wrinkly Baby: N = 120.attacks[]/side_speed(or spread_speed): speed share of the non-centre shots of an aimed spread. Rep mode 2 = 0.9.attacks[]/lunge_tickscounted fromlunge_from, not from the attack start (or a newlunge_after). Blaster: lunge -4 for 5 ticks from Shoot, with retention 0.9 while lunging and 0.7 otherwise (lunge_brake covers the second part).- ground_chaser:
alternate_variant(int, default 2) instead of hardcodedenemy.variant == 2. Alsorecovery/spawn{type, enemy_limit} (Dank: spider when < 7 enemies) andrecovery/split{health_share 0.6, push 4, invulnerable 2, max generation?} for the Cursed Globin. The split's generation cap was unclear: the subtype rises each split and the regen clip skips (4 - subtype)*10 frames. It needs another look at flag 0x200000.
misc3 part C notes
vis_fatty — NpcAI::ENTITY_VIS_FATTY @004ea3d0
- Walk: FindGridPath(0.3) with no extra brake -> retention 0.8 -> 1.
- Fart (state 8): friction *0.8 -> attack retention 0.5 -> 0.8; Game::ButterBeanFart radius 120 -> gas radius 85 -> 120.
- Rage (after RageStart): friction set to 0.95 -> phase retention 0.9 -> 0.95.
- NOT expressible: the fart is not range/roll gated. It fires only while its child (Fetal Demon) is in state 8 with
its counter (0xba0) > 26, then each tick on rand%7==0 (or v1.y > 7). Kept range 90/period 7/one_in 4.
Proposed gate
attacks[]/when[]/partner_attacking: {after: N}: open while the linked partner plays an attack for more than N ticks. Data then: period 1, one_in 7, range 0, when [{partner_attacking:{after:26}}].
flesh_maiden — NpcAI::ENTITY_FLESH_MAIDEN @00502980 — SKIPPED (needs engine)
Current kind flying_chaser is wrong. Real AI: friction 0.7 always. Repeating swing-hops: each hop picks
dist a = 110+rand20, side b = 110+rand20; target = Isaac pos + 0.1|d|Isaac velocity (predicted); if |d| >= 1.33a
the landing point is adir + b*(dir rotated by i1*90deg), else sqrt(a^2+b^2)*dir; i1 alternates +-1 each hop.
Plays SwingRight if landing x >= pos x else SwingLeft. Progress t += 0.035/tick (~29 ticks); posOffset.y =
9 - 36(t-0.5)^2 (arc); position follows an arc through a control point 0.75 of the way with a perpendicular bulge
on the side away from Isaac, angle/radius lerped by (1-cos(pi t))/2. On grid collision the hop is cut (t>=0.8).
Proposed: move: "swing_hop" with fields hop_distance:[110,20], hop_side:[110,20], hop_rate:0.035,
hop_lead:0.1, hop_height:9, poses {left:"SwingLeft", right:"SwingRight"}.
crackle — NpcAI::ENTITY_GURGLE @0051aaa0 (variant 1)
- Walk FindGridPath 0.6 retention 1, attack friction 0.7, range 130, 1/60: already match.
- Shot: FireBossProjectiles(1, target, 10) then velocity 0.55 -> speed 5 -> 5.5. Scale 1.6 matches. Falling speed = base0.7-3, accel base-0.6 (base unknown from here); left fall fields as they were.
soy_creep — NpcAI::ENTITY_WALL_CREEP @0053c0d0 (type 240 var 1)
- Type 240 has no alignment test (the 25px test is the 0x130 type only); it attacks once its cooldown (15 + rand%45) runs out and it is on camera. Removed alignment/period/one_in; cooldown 37 (the mean).
- Shots: velocity +-8 out of the wall -> speed 10 -> 8 (start and loop).
- Loop: AttackStart's Shoot sets a 90-tick counter; loop fires every 2 ticks until it hits 0, then AttackEnd.
AttackLoop is 4 frames -> repeat limit 10 -> 22 (~90 ticks). Loop shots fire per Shoot event (once per 4 ticks)
instead of every 2: proposed
attacks[]/fire_every: N(fire every N ticks while the clip plays). - Proposed
cooldown_randomvariant drawn once at attack end (here [45,1]) instead of per tick; alsoon_screengate.
mr_mine — @005492c0 (dispatch named Entity_Familiar::Render by ICF; strs DigIn/DigOut/Shoot confirm it)
- Every 4 frames, cooldown (0xba0) < 1: if Isaac's pos + 3*velocity is within 130 and the line is clear: velocity set to 14 toward it, state 8, cooldown 30. State 8: accel 0.7 toward that point, friction (0.9+0.0028cooldown) until within 5; then 4 in 5 sets the dig flag. Added attack 2: Idle, period 4, range 130, sight, aim_lead 3, impulse 14, lunge 0.7 (12 ticks), retention 0.95, repeat 2, cooldown 30, next 0 (dig; the 1-in-5 stay is not expressible: next lists reject -1; proposed: allow -1 in next lists).
- Otherwise, with its dig counter >= 16, digs on rand%30==0 (FindTargetPit): DigIn period 4/one_in 15 -> period 1/one_in 30, DigOut cooldown 16.
mole — NpcAI::ENTITY_MOLE @004fdf80
- Underground: FindGridPath(0.8) -> speed 0.5 -> 0.8 (retention 0.8 matches).
- Emerges on rand%10==0 when Isaac within 90 (or within 200 after 90 ticks): range 150 -> 90, period 4/one_in 2 -> period 1/one_in 10, removed cooldown 30. (The 200-after-90-ticks widening is not expressed.)
- Shoot: FireProjectiles mode 2 at speed 8: matches.
misc3 part D
dragon_fly / dragon_fly_x (NpcAI::ENTITY_BOOMFLY 0050f280, variant 3)
Skipped: bouncing_fly accel 0.45 / retention 0.9 match (0x36c *= 0.9; 0.45 accel per axis). Variant 3 also fires a
stationary fire projectile each tick it is alive (FireProjectiles vel 0, flags 8 (|16 subtype!=0), fall 0.3) - a fire
trail. Proposed feature (bouncing_fly): trail_shot {period, fire: true} dropping a still, harmful fire shot.
bone_fly (same routine, variant 4)
Was: alignment 20, cooldown 30, speed 8. Decompile: every 3rd frame (IsFrame(3, index)); aim point = player pos +
player vel * rand*16, clamped to room (20 margin); needs |dx|<20 or |dy|<20 to that point, dist < 200, CheckLine;
Shoot fires one shot at speed 10, no cooldown. Changed: period 3, range 200, sight true, speed 10, cooldown removed.
Not expressed: aiming/alignment against the predicted point. Proposed attacks[]/lead {max: 16, random: true}:
test alignment/aim against player pos + velocity * rand(0..max).
Left retention 0.693 (engine bounce semantics; decompile is 0.9 per tick, *0.8 extra while attacking).
big_bony (NpcAI::ENTITY_BIG_BONY 005041d0)
Walk: FindGridPath(0.3, 900, 1) -> speed 0.35 -> 0.3. Attack: projectileCooldown < 1 then (dist<120 and rand%15==0) or rand%120==0, per tick, no sight; cooldown 120 set on attacking; attack state retention 0.6, Shoot spawns big bone speed 8. Changed: removed firemode and sight; attack 0 period 1 range 120 one_in 15; added identical attack 1 with no range, one_in 120; both cooldown 120.
danny (NpcAI::ENTITY_DANNY 004fbd10)
Walk FindGridPath(0.6, 0, 1), no extra damping -> speed 0.6, retention 1. stateFrame=150 on attacking, counts down while
walking (double rate when v1.x > 6). Then per tick rand%60==0 (or rand%20 when v1.x>6); dist < 200 attacks, 200-400 a
further 1/10, else none; blocked when more than 8 spiders(85.0)/rock spiders(818) exist. Attack retention 0.7.
Shoot: n = max(0, 2 - group spiders) rock spiders thrown, FireBossProjectiles(6 - n). Changed: range 200, period 1,
one_in 60, cooldown 150, retention 0.7. Kept count 4 (first volley, n=2). Not expressed: shots = 6 - spiders spawned;
proposed attacks[]/count_less_spawned: true (count minus spawns made in that release). The 200-400 1/600 path and
the v1.x>6 haste are omitted.
fly_trap (NpcAI::ENTITY_FLY_TRAP 00560ca0)
Movement is FindGridPath(0.25, 0, 1) with grid collision class 3 (ground) in idle and spawn states -> move chase, speed 0.25, retention 1, flying removed (was hover 0.3 flying). i1 cooldown blocks all attacks; per idle tick in order: flies > 2 and rand%40 -> Attack02 (fart, ButterBeanFart radius 120, flies pushed 10, i1 = 80, retention 0.8); else flies < 3 and rand%20, or flies < 6 and rand%80 -> Attack01 spawning ONE fly. Changed: fart moved to index 1 (rolled first), period 1, one_in 40, cooldown 80, retention 0.8, when type_count fly_trap_fly above 2, gas radius 120; spawn attacks period 1 one_in 20 (cap 3) / one_in 80 (cap 6). State 0 spawns 3 flies with no animation (opening kept).