# misc2 notes (patch_misc2.py) (The find.sh/decompile.sh awk address-compare bug noted in this pass is fixed in the toolkit.) Drift speed = 0.5 * speedMult / friction (MoveRandomlyBoss), so 0.5/0.8 = 0.625 etc. ## faceless: NpcAI::ENTITY_FACELESS 0x4faad0 - Unaware: MoveRandomlyBoss + friction *0.8 -> drift 0.625 / 0.8 (was wander 0.4). - Wakes (stateFrame=1, permanent) when hurt (health < max) or Isaac within 80 (was 120) -> FindGridPath(0.6), no extra brake -> path 0.6 / 1 (was chase 0.45). - Attack roll per tick: random_float <= sqrt(anger)*0.08 + 0.008. With no anger 1/125 per tick, both phases (was period 7 one_in 40/10). Ring: FireProjectiles mode 9 (7, 6) = 6 shots speed 7 (speed set explicitly). - NOT EXPRESSED: the anger term. Proposed `anger` (scripted): {gain_per_damage: 1, decay: 0.11 per tick, spend: 7 per attack, base: 0.008, scale: 0.08}: anger += damage taken this tick; anger = max(0, anger - 0.11); chance per tick = base + scale*sqrt(anger); each fired attack anger = max(0, anger - 7). Also on death (health > -25) 50%: it Morphs into type 11 instead of dying (not in scope). ## bubbles: NpcAI::ENTITY_BUBBLES 0x55ad20 - FindGridPath(0.3) -> path 0.3 / retention 1 (was chase, 0.8). - No attack for the first 100 ticks; then per tick, Isaac within 200 and rand%120==0 (was range 90, period 7 one_in 4). - Attack friction *0.4 (was .5). On Shoot: ButterBeanFart radius 120 (gas radius 85 -> 120), then for 12 ticks one FireBossProjectiles(1, target 0, speed 3) per tick (random-direction shot at speed 3). Approximated as a ring of 12 at speed 3 on Shoot (was 8 at 4). - NOT EXPRESSED: (a) attack `after_age` 100 (no attacks during its first 100 ticks of life); (b) shots spread over ticks: proposed `shots[].ticks: N` = fire the volley once per tick for N ticks starting at its event, each shot in a random direction (`shot: random`). (c) an independent timer i2 = 20 + rand%20 that fires one boss shot at a point 40..120 px along some list direction (field_0xc): unclear source, skipped. ## soul_sucker / ink: NpcAI::ENTITY_FLY 0x506bd0 (type 61 v2/v3), kind flying_chaser - Same Rep model for all suckers: accel min((d-15)*0.08, 1.2) with y offset halved (matches stop 15, gain .08, vertical .5); soul sucker's cap was 0.9 -> 1.2. - Drift: every 4th tick (tick%4==1) v1 = (v1 + RandomVector*0.6)*0.4 -> drift_radius 0.6 (was .34), drift_retention 0.4 (was .8). Rep has no obstacle-crossing test -> crossing_retention 1. Every 3rd tick (tick%3==2): boundary push 0.06 (x 80..540, y 230..420), v += 2*v1/friction, friction *0.6: matches existing. - NOT EXPRESSED: Rep steers every tick, flying_chaser every 2 ticks (STEERING_PERIOD). Proposed `steering_period` (default 2; suckers 1). ## bulb: FUN_0054bca0 (ENTITY_FLY dispatches v5/v6 there) - Friction *0.85 every state -> base retention 0.85 (was .8). - NOT EXPRESSED (whole movement is a dart model): idle state jitters (each tick v -= v1; v1 = RandomVector*(1..6); v += v1), timer i1 = 10+rand%60 (halved rate x2 while charged). Uncharged: dash to a point 30..60 px random (or, near Isaac within 100 with 1/3, 60 px at +-60 deg alternating), impulse 4, then +2 per tick capped at 12 until past the point, then i1 = 6+rand%24. Charged ("Dash" pose): aim at Isaac with +-75 deg alternating side offset min(0.4d, 20..50), impulse 8, +8/tick capped 20, wall-reflected, i1 = 5+rand%20 (or straight lead dash i1 = 30+rand%50 at <80 px 50%). Proposed new move `dart` with those fields (period base/random, impulse, gain, cap, side_angle, charged multipliers). ## rock_spider: NpcAI::ENTITY_ROCK_SPIDER 0x4f9ad0 -- skipped (needs a feature) - Rep: rests as IdleRock until it lands still, then rand&3==0 per tick -> Appear -> walk (no proximity wake). - Walk: friction 0.6; a 48-tick cycle (stateFrame +1/tick, tinted/coal +2, plus +1 on odd frames 50%): at 12, 24, 36 it picks a heading (variant 0: 1/6 random free direction 20 px clear, else toward Isaac via path, jittered +-15 deg), accelerates 3/tick (tinted 5.1, coal 3*1.8) along it while set, resets at 48 (idle 0..11). - Proposed move `burst`: {cycle: 48, still_until: 12, aim_at: [12,24,36], speed: 3, random_one_in: 6, jitter_deg: 15} and a phase gate `landed_one_in: 4`. ## bishop: NpcAI::ENTITY_BISHOP 0x4e7ea0 -- skipped (matches except the roll) - On a damage tick: rand%3 != 0 (2/3) -> Shoot; FireProjectiles mode 6 (12,0) = cardinal speed 12 (matches). - NOT EXPRESSED: the 2/3 roll must be drawn on the hit tick only; the engine's `hurt` latch persists, so a `when: [{chance: .667}]` would retry every tick. Proposed attack `hurt_chance` (rolled once per landed hit). ## grudge: NpcAI::ENTITY_GRUDGE 0x4e6570 - Charges when Isaac's near axis offset <= 24 (was 20) with a clear line, no range limit (600 -> 1000, the loader max), no lead (prediction 1). - Charge: v2 += 1/tick capped 4, v += v2*dir/0.8, friction 0.8 -> v = .8v + ramp(1..4); acceleration 1.5 -> 4. The cross axis velocity is set to (lane - pos) each tick: lane_retention 0, cross_retention 0. - NOT EXPRESSED: the 1,2,3,4 ramp (proposed charge `ramp`: acceleration grows by this per tick up to acceleration); 15-tick rest after hitting a wall (4 after waking); room-clear sleep. ## polty: NpcAI::ENTITY_POLTY 0x55d230 - Holding: accel 0.7 toward a point 100 px short of Isaac, friction 0.95 -> patch speed 0.7, retention 0.95 (was .5/.9); PickupIdle seek 0.3 -> 0.7. - Throw on PickupThrow: dir to Isaac + 4*his velocity + 4*own velocity, speed 10 (+ own velocity) -> speed 10 (was 9), aim_lead 4. Throws when within 150 of that point, 1/4 per tick. - NOT EXPRESSED: it really lifts the room's rocks/poops (grid entities) and throws them; it teleports (TeleStart/ TeleLoop) when no rock is near. Left as the rock shot. ## cloggy: NpcAI::ENTITY_CLOTTY 0x50d370 (type 0x368) - Friction *0.9 every state; NPCAI_Pathfinder::MoveRandomlyBoss: a 40 px hop to a random free point, 0.5/friction a tick -> drift 0.556 / 0.9 (was wander 0.5). - Attacks every time a hop ends (arrived < 3 px or stuck), no roll: period 1, one_in removed, cooldown 17 (~ticks to cover 40 px from rest at .556/.9). Attack has no extra brake: retention 0.6 -> 0.9. - Shots: mode 9 (8, 4) = 4 at speed 8, CURVE_LEFT/RIGHT alternating, strength 0.94 (kept the existing curve 0.03). - Proposed move `hop` (NPCAI_Pathfinder::MoveRandomlyBoss): pick a free point `hop` px (40) away at a random angle, push speed toward it, end on < 3 px or collision (or speed < 0.1 with 1/10), raising a hop-ended trigger an attack can require (`on_hop: true`) instead of cooldown 17. ## army_fly: NpcAI::ENTITY_ARMYFLY 0x54ad80 - MoveRandomlyAxisAligned(1.6) with a +-20 deg sine wobble, friction 0.8: speed 2 -> 1.6. Chain logic not re-checked. ## drip: NpcAI::ENTITY_DIP 0x534860 (type 0x366); was bouncing_fly, now scripted - Idle: friction 0.9; per tick 1/10 -> hop: impulse 5 + rand*3 (1/3 at Isaac, 2/3 random), "Move" at friction 0.95, ends at the clip end. Patch: scripted still / 0.9, attack Move period 1 one_in 10 impulse 5 lunge_spread 3 lunge_random, retention 0.95. Art set to the plain package path (scripted does not take the flying animations map). - NOT EXPRESSED: at Move frame 10, 1/3 re-hop at once (repeat needs limit >= 1; proposed `repeat.limit: 0` allowed with one_in, or `rehop {frame: 10, one_in: 3}`); the 1/3 aimed share (proposed `lunge_aimed_one_in: 3`). ## ring_fly: NpcAI::ENTITY_RING_OF_FLIES 0x53bae0 - Radius swings 40..70 at 0.5 px/tick (triangle), spin -0.0942 rad/tick: radius 50 -> 55, spin 0.06 -> -0.0942478. - NOT EXPRESSED: the centre walks toward Isaac at 2 px/tick (proposed orbit `center_speed`); the radius triangle wave (`radius_wave` exists only for the Duke's orbit; proposed for scripted orbit: amplitude 15, 0.5 px/tick triangle); velocity is set to (place - pos) capped at 6 when > 10 px (proposed orbit `speed_limit`; then speed 1, retention 0); all members of a leader share one ring evenly (ring = their count). ## candler: NpcAI::ENTITY_CANDLER 0x4e4970 - Bounce: v += sign*1/0.8 per axis, friction 0.8 -> speed 1.25 (was 1). - Attack friction 0.8*0.8 = 0.64, no push. On Shoot: velocity = 20 along a random diagonal (lunge 1.2 -> impulse 20, lunge_random), spawns the fireplace if none within 20 px and fewer than (h-2)(w-2)/5 (18, matches). - Cooldown 15 + rand%30 + rand%30 -> cooldown 15, cooldown_random [59,1] (uniform stand-in for the triangle). - NOT EXPRESSED: "no fireplace within 20 px" spawn gate (proposed spawn_cap `clearance`); diagonal-only impulse. ## wall_hugger: NpcAI::ENTITY_GUTS 0x5153b0 (type 0xda) - Accel 3/friction, friction 0.6: matches. Spikes off while age < 30: No-Spikes repeat limit 30 (62 ticks) -> 14 (30 ticks). ## dukie: NpcAI::ENTITY_DUKIE 0x541810 - Bounce 0.3/0.9 with friction 0.9 -> speed 0.333, retention 0.9 (was .45/.693). - First cough after 60 ticks (first_cooldown [60,1]); then per tick 1/10 with <= 7 live enemies (period 1 one_in 10, enemy_limit 8, spawn_cap removed); cooldown 90 + rand%30. - Spawns 1 dart fly + 1 more on 1/3, at +40 y, velocity RandomVector*3.5 + own. Kept spawn_count_random 2 (50%). Proposed `spawn_count_one_in` for the 1/3 extra. ## splurt: NpcAI::ENTITY_SQUIRT 0x535280 (type 0x367) - Idle: no movement, friction .95*.7 -> move still, retention 0.665 (was wander 0.3/0.8). - Roll: every 5th tick (IsFrame 5) with rand%5==0, no range: period 5 one_in 5, range removed (was 7/4/250). - Attack01/Attack02: on Slide impulse 20 toward Isaac (lunge 5 -> impulse 20), friction .95. - Slides: +0.5 random wiggle a tick for 10 ticks, then ends below speed 3; friction .95 (x .85 after 8 ticks) -> retention 0.85, repeat speed 2 -> 3. ## vis_versa: NpcAI::ENTITY_VIS 0x52c720 - MoveRandomlyAxisAligned(0.7): move corridor -> roam (speed .7, retention .8 kept). Laser gate (period 3, 20 px axis, 400 range) matches. ## mr_red_maw: NpcAI::ENTITY_MRMAW 0x517de0 - Body FindGridPath(0.8) (0.4 while the head is out): move chase -> path. Tether numbers not re-checked.