# Group a notes Decompiles: `./decompile.sh 0x`. Baby Begotten (004e8380) is not in the dump; it came from a live decompile (`./decompile.sh 0x004e8380`). Mask II: find.sh maps type 93 to 0041af60, which is really QueryNPCsType. The real Mask update is 00461fc0 (named ENTITY_MASK_OF_INFAMY). The dispatcher's case for 0x3f falls through into it after state 0. ## prey: NpcAI::ENTITY_HIVE 0050c370 (type 817 branch). Changed - Matches already: friction *0.8; cough clock v1 75 / blocked 7 / distant 3; crowd test `rand%5+4 <= alive`; range 300; death count `max(1, ceil(4/(n*.2+1))-1)`. - Wrong: the leech is spawned with zero velocity (`Game::Spawn(0x32a,0,pos,ZERO,...)`), so `cough.speed` 7 -> 0. - Not expressible (minor): - Repentance's range is a euclidean distance (`dist < 300`), but cough.range tests both axes. - When crowded, Repentance adds `rand%50+20` to the clock instead of skipping the cough. Proposed fields: `cough.range_round: true` and `cough.crowd_delay: [20, 50]`. ## baby_begotten: ENTITY_BABY_BEGOTTEN 004e8380. Changed - Idle (state 4): friction *0.8, and a unit push toward the target point, divided by friction, while more than 40 px from Isaac. Speed .35/.85 -> **1.0 / 0.8**. Idle poses are Idle{Right,Down,Up} facing Isaac, so facing poses -> Idle*. - Attack roll: Isaac within **100** (the old value was 200, with an alignment test of 30 that does not exist in Repentance), on a `rand&7==0` per tick (**one_in 8**). It also skips the attack when another Begotten in state 8 targets the same player from the same cardinal side (not expressible, minor). - Chase phase: **20 ticks** (i1=20) with friction *0.7, playing Chase{Right,Down,Up}. Now attack 0 (ticks 20, next 1). - Attack (Attack{Right,Down,Up}): the sound 0xa7 plays at its start. From Shoot on: friction *0.9 and a recoil push of -dir (net 1/tick), so lunge -1 from Shoot, retention .9, lunge_brake .7/.9 before Shoot. On Shoot: `Laser::ShootAngle(variant 1, pos + dir.x*18, height -35, angle of dir, timeout 14)`, maxDistance 160. That aims along the direction fixed at chase start, so laser aim -> "aimed" (reach 160, width kept). - Afterwards: i1 = rand%60+30, so cooldown 30 + cooldown_random [60,1] with cooldown_once. - Proposed feature, `attacks[]/approach {standoff, gain, lead, cap}`: each tick of the attack, push `(P - pos) * gain`, its length capped at `cap`, where `P = player + playerVel*lead - dir*standoff` and dir is the unit vector to Isaac drawn as the attack begins. Baby Begotten's chase is `{standoff 100, gain .03, lead 10, cap 16}`. The chase in the patch has no steer for now. ## ticking_spider (250) / migraine (869) / level_2_spider (215): NpcAI::ENTITY_SPIDER 00529da0. Changed - Run push **6** (869: **4.5**). It is added before friction *0.6, and spider_step already adds then brakes, so acceleration 7 -> 6 and 4.8 -> 4.5. - Target = `CalcTargetPosition + playerVel*10`, so prediction_duration 5 -> **10**. - The wander radius is `70 + rand*40` with no shortening, so short_wander_scale -> 1, which makes the short-wander roll a no-op. The remaining fields match: wait 13, wander wait 15, arrive 14, stall 3, attack range 100+rand*100. - level_2_spider: Repentance runs 215 through this same AI. The scripted wander/jump approximation is replaced by the spider kind, with the same numbers as Ticking Spider and throwable false. Art becomes {anm2, animations idle Idle / run Walk / spawn Idle / thrown InAir}. The old jump sounds are dropped. **Please check that this conversion is acceptable.** - Proposed feature, spider `jump` (all three types). Each time a target is picked (attack or wander), if `rand%3==0` and the target cell is free, the spider enters state 6: - It plays "Jump" (package event Jump at frame 7, Land at frame 17 for level_2_spider). - On the Jump event: `velocity = v1 = (target - pos) * 0.08`, `fallVelocity = -4`, and collision is off (class 0, grid 3). - Each tick while in the air: `velocity = v1`, `fall += 0.7*speedMul`, `height += fall`. - It lands when `height > -fall` (offset reset), or once the Land event has played and the clip has ended. Then back to state 4, target cleared, stateFrame+1. - Proposed fields: `jump {one_in 3, gain 0.08, fall_velocity -4, gravity 0.7, animation "Jump", from "Jump", land "Land"}`. spider_launch already has gain and fallVelocity, so the jump can reuse it. ## swarm_spider: ENTITY_SWARM_SPIDER 005505c0. Skipped (needs a feature) Repentance's Swarm Spider is a hopper, not the spider walker: - State 0: subtype N spawns N extra copies within ±20 px. - State 3 (idle): friction *0.7. Then, with d the distance to Isaac: - It flips direction on `rand%(d>200?20:4)==0`, or always when d<100: half the time it reverses, otherwise it turns ±90°. - Weighted pick (WeightedOutcomePicker): - HopShort: weight 2, or 5 when d<100. Speed `5+rand`, turned ±45°. - Hop: weight 3. Speed `8+2*rand`, ±20°. - HopLong: only when d>100; weight 2, or 9 when d>200. Speed `10+3*rand`, ±10°. - The chosen velocity is stored and the spider goes to state 6. - State 6: friction *0.7 except while airborne. On the "Jump" event it sets velocity to the stored vector, goes airborne and plays sound 0x102 (vol .4, pitch 1.8+.2*rand). On "Land" it clears airborne. After Land, once the clip ends, `rand&3==0` returns it to idle; otherwise it keeps waiting. - Proposed feature, scripted `attacks[]/lunge_turn` (degrees, ± random about the aim) plus `attacks[]/lunge_weight` (a weight per distance band). Alternatively, a hop kind with a `hops[] {animation, speed, speed_random, turn, weight, near_weight, far_weight}` list and `flip {near 100, far 200, one_in [4,20]}`. ## secret_room_keeper: ENTITY_SHOPKEEPER 006c2220. Skipped (matches) It picks "Guy%u" with seed%9+1 and is anchored to its spawn spot. Friction *0.8 does not matter while anchored. The loot (shopkeeper_get_loot) was not checked. ## lil_portal_306_1: ENTITY_PORTAL 00543720 (variant 1). Changed - The position is reset to the spawn spot every tick, so it stays still. - i2 = 15 at create: after_tick 15 (an approximation for portals placed in the room). - When i2<1 and the portal has fewer than **4** live children (entities whose spawner is it), it plays the SpawnOverlay overlay and sound 0xa2, and sets i2 = rand%30+60. That gives cooldown 60 + cooldown_random [30,1] with cooldown_once, and removes period 7 / one_in 6. - The spawn table (RandomInt over 11) is the same list as the record. - Spawn at the portal's own position: spawn_at [0,0]. Velocity (0,4) turned a random ±20°: spawn_velocity [0,4] with spawn_cone turn 40. - Not expressible: - The cap counts its own children, not room enemies. Proposed: `attacks[]/own_spawn_limit: 4`, counting live entities whose spawner is this actor; it replaces enemy_limit 5, which is kept for now. - When capped, Repentance still resets i2 = rand%30+60 (proposed: `cooldown_on_blocked: true`). ## 1_2_heart / 1_2_heart_92_1_1: ENTITY_HEART 0051f2f0 (type 92 variant 1). Changed - With a partner: - It either drifts with MoveRandomlyBoss (friction *.9*.8 = .72), giving move drift with retention .72 and speed .5/.72 = .694 (following the drift records' speed*retention = .5), or it seeks a spot on Isaac's far side from its partner with FindGridPath(1.079). The seek is not expressible (see the proposal below). - It fires a shot at the partner every **12** ticks (FUN_006ac760 interval, XMM1 = 12): speed 7, params scale .6, fall accel -.09, flag 0x200. - It attacks when Isaac is within 100, checked every 3 ticks (IsFrame(3)). - Without a partner: FindGridPath(player, 1.0) with friction *.8 (path 1 / .8). It attacks on IsFrame(3) with no range test, using projectileCooldown 10. The 22-frame clip is longer than 10 ticks, so it re-attacks immediately. - HeartAttack: friction *.7. On Shoot: FireProjectiles mode 7 (diagonal), speed **12** (was 8). - volley_clock threshold 5 -> 6, because Math.random gains a mean of .5 per tick, so the mean interval is 12. - Proposed: - `volley_clock.gain` (a constant per-tick gain instead of Math.random; 1 with threshold 12 is exact). - Optionally `move "flank"`: pick a free cell within 30..480 px (x ±450, y half) that is on the side away from the partner (the subtype's sign), has a line to Isaac, and maximises the decompiled score; path to it at 1.079; re-pick every 10 ticks. ## crazy_long_legs: ENTITY_BABY_LONG_LEGS 00531ab0 (type 207 branch). Changed - FindGridPath(player, **0.65**), then friction is set to 0.8: move path, speed .65, retention .8. AnimWalkFrame threshold 0.1, so walk_speed .1. walk_speed is a raw speed threshold in code; the doc's "2 / walk_speed" is stale. - Attack on `rand%50==0` (field b40 set): one_in 50, period 1. Friction *0.5 during the attack (retention .5). - On Shoot: sound 0xb2, FireProjectiles mode 8 (eight-way; variant 1 uses mode 7) at speed `8 + 2*rand`, so speed 9 (the mean). - Proposed: `attacks[]/speed_random` (adds up to N, drawn once per volley): Crazy Long Legs uses speed 8, speed_random 2. ## mask_ii: Mask update 00461fc0. Skipped (matches) - Walk is MoveRandomlyAxisAligned(0.85) with retention x .85, y .78. The facing smoothing v1 = (v1+vel)*.35 gains dir*3 while charging. - The charge check runs every 4 ticks: Isaac + vel*rand*16 (mean 8), within 20 on one axis, within 200, cells sampled every 10 px. The charge is dir*2 per tick under friction *.82, the cross axis is pulled 10% a tick to the cell centre, and it ends on grid contact. All of this already matches the record. - Not expressed: when its heart link is gone (state 9), it walks at **1.5** with AngryMask{Left,Up,Right,Down} poses (variant 1's pose table swaps). Proposed: a `death_link.angry {speed 1.5, poses [...]}` patch applied while the linked heart is dead, if the mask outlives it.