10 KiB
10 KiB
Group g5 notes (pass 5, 2026-10-24)
Read for isaac-classic branch rif/monster-fidelity-8. All entities2.xml frictions here are 1, so the AI's friction multipliers are the whole brake. Engine proposals: the parent's engine_g5 list (own-spawn cap, aim at chain start, aimed creep steps, Isaac-centred teleport, untouchable windows without events).
dip: NpcAI::ENTITY_DIP 00534860 (217.0). Changed
- State 3 (Idle): rand%10 == 0 per tick -> state 4. Impulse at a random unit vector (MusicManager::RandomVector) of speed rand*5 + 5 (x2 for corn 217.1), added / friction, then friction *= .8 on that tick. Feared/confused: away from Isaac instead.
- State 4 (Move): friction *= .95 each tick, back to 3 when speed^2 < 1. FlipX by velocity. rand%10 MakeSplat .2-.7.
- Port: impulse lands one tick later under .95 instead of .8; impulse 5 / spread 5 -> 4.21 / 4.21 (x .8/.95), which gives the same per-tick speeds (.8I, .76I, ...). Roll, retentions .8/.95 and end_below 1 already matched.
- The friendly-dip conversion (Dirty Mind 0x240 / trinket 0xa3 -> ThrowDip) is the trinket's (see trinkets.json).
squirt / dank_squirt: NpcAI::ENTITY_SQUIRT 00535280 (220.0 / 220.1). Changed
- Every tick friction *= .95 first. State 3: rand%5 == 0 and IsFrame(5) -> state 8, then friction *= .7 (.665 idle).
- State 8 Attack01: on Slide, velocity += unit(Isaac - pos) * 20 / friction (net +20 under .95). Clip end -> state 4.
- State 4 Slide: V1.X += 1 a tick; while V1.X < 10 (9 ticks) velocity += unit(velocity) * .5 / friction; after that, speed^2 < 1 -> state 3, speed^2 < 9 -> friction *= .8. Five or more ticks against a wall (I1) -> friction *= .85.
- Port: lunge_ticks 10 -> 9. Impulse 21.05 / lunge .526 under .95 already give the net 20 / .5; pulse .8 below 3 matches.
- Dank (220.1): every 3rd room frame in state 4 (or state 8 after Slide) black creep 1000.26, sprite scale (1, 1), timeout 60. creep scale .8 -> 1. Death: two Clots 15.1 at pos +-10 on x, velocity 0: death_split speed 3 -> 0 (the fixed x axis is not expressible; ours splits across the line to Isaac). 220.0 death: two Dips at +-10 x (as before).
- Not ported: the five-wall-tick .85 brake; the slide pushing along its own velocity (ours along the aim).
wizoob: NpcAI::ENTITY_WIZOOB 005374a0 (219.0). Changed (rebuilt)
- Init: state 13 AppearDown (no collision), then 16 VanishDown, then 3: invisible, collision 0, grid class 3.
- State 3 (hidden): StateFrame counts down; once < 1, rand%30 == 0 per tick: moves to Room::FindFreePickupSpawnPosition(Isaac, 120), TargetPosition = Isaac, I1 = way to Isaac (0 left 1 up 2 right 3 down), state 4.
- State 4 Appear (visible, still untouchable) -> state 8 Shoot (collision 2): on Shoot (frame 13), FireBossProjectiles((rand&3) + 6, TargetPosition, traj 7, params {BulletFlags |= 0x10 (GHOST), VelocityMulti 1.5, FallingSpeedModifier +10, HeightModifier = ShootPos.y / .65 (-18 / .65), PositionOffset x = ShootPos.x / .65}). -> state 9 Vanish -> state 3 with StateFrame 60. Friction *= .1 every tick.
- FireBossProjectiles (006ccdd0), read for this: per shot velocity = 7 * unit(target - pos) + random angle * rand * 3.5 (target (0,0): random angle * 7), FallingAccel = traj * .1 + .32, FallingSpeed = 5 - rand30.8 - traj, scale .9 + (rand&1).4 + rand.05 (x params Scale, x .8 for flag 0x40000000000000), then params added, velocity *= VelocityMulti.
- Port was: visible standing in ShootDown, Shoot -> Vanish -> Appear(teleport, cooldown 60). Its Appear had no release
event, so the teleport never ran, and the boss volley used speed 7 / spread 3.5 / fall 5 / .32.
Now:
hidden(not drawn, no contact while idle) on an unused idle pose (Bestiary), behaviour teleport near with snap on that pose (re-drawn every hidden tick), spawn clip AppearDown -> VanishDown chain (spawn_clip attack 3), rolled Appear (period 1, one_in 30) -> Shoot (boss volley 6 + 0..3, volley aim_speed 10.5, aimed_spread 5.25, fall_base 8, fall_acceleration 1.02, over_terrain kept for GHOST) -> Vanish with cooldown 60. retention .8 -> .1. - Not expressible: aiming at Isaac's position from the teleport tick (ours aims at release), Isaac-centred spot search, untouchable during Appear, HeightModifier.
- Port follow-up: engine shot
aim_start(aims at the spot Isaac held as the Appear attack began, kept across hand-overs) on its Shoot volley.
swinger: NpcAI::ENTITY_SWINGER 00536d00 (216.0, head 216.1, cord 216.10). Changed
- Body: friction set to .7 each tick, then FindGridPath(Isaac, .25, 100, 1). FindGridPath (007e33c0) itself does friction *= .7 and pushes min(d/10, 2) * speed / friction, so the net is v' = .49 v + 2 * .25. The engine's path does v *= retention then v = .7 v + min(d/10, 2) * speed, so speed is the call's argument: .357 -> .25 (retention .7 kept).
- Head 216.1: cord length V2.Y grows 100/60 a tick to 100; angle V1.X += (V2.X + 1) * pi / 50 a tick (uncontrolled V2.X = 0: .0628); velocity = (body + cord) - pos, friction .7. swinger_head's orbit radius 100 / spin .0628 / growth 1.67 match (its own record was not changed). Head gone -> body becomes Globin (24); body gone -> head Maw (26). 12 cord links (216.10).
fat_sack: NpcAI::ENTITY_FAT_SACK 00530a80 (209.0). Skipped (matches)
- Walk FindGridPath(target, .3, 900, 1), no brake; rand%50 jump (sound 0x26) at Isaac + vel10 (free spot near if blocked). Jump: friction .8, collision 0; from StateFrame 11 V1.X += .02 (cap 1), pos lerps to the target. Land: friction .7, Splash: FireProjectiles mode 9 (12, 6) = ring of 6 at 12, 7 red creeps 1000.22 within rand50, scale 2. Hit event: collision back. Death: health > -25 and rand%3 == 0 -> Morph 210.0 (Blubber).
- All matched. Left: untouchable through Jump (the clip has no events for untouchable windows).
meatball: NpcAI::ENTITY_MEATBALL 00541ce0 (290.0). Changed (rebuilt)
- Walk: PathFinder::MoveRandomly (007e6300: 40 px hops to free random points, push .5 / friction, ends within 3 px, on a wall, or slow with rand%10 == 0) = the engine's move hop, speed .5; friction .8 always. Was wander .5.
- Roll: Isaac within 300 (dist^2 < 90000), CheckLine, rand%20 == 0 per tick, ProjectileCooldown < 1 (it counts down only while walking) -> Charge (cooldown 90). Charge end: rand&1 picks Shoot1 or Shoot2 (aim = unit to Isaac).
- Shoot1: every tick from Shoot (6) to before Stop (27): FireBossProjectiles(1, (0,0), traj 10) -> a random-angle shot at 7, fall -5 - rand*24, accel 1.32.
- Shoot2: every tick from Shoot (6) to before Stop (12): red creep 1000.22 scale 1 at pos + k25aim (k from 0).
- Death: Redirect -> Morph into Host (27) with full health (death_spawn host kept).
- Now: Charge (period 1, one_in 20, range 300, sight) -> next [Shoot1, Shoot2]; Shoot1 boss volley 1 shot, spread 0 (radial 7), on Shoot until Stop, fall_base -5 / accel 1.32; Shoot2 creep Shoot..Stop along [125, 0]; both cooldown 90. Was: two separate rolls (period 5, 1/8 and 1/7, range 220, cooldown 40), Shoot1 a 10-shot ring at 3, Shoot2 gated on Isaac's row. Left: the creep line aimed at Isaac (ours horizontal toward his side, random share, one more puddle).
- Port follow-up: engine creep
aimed+stepped: Shoot2 is now the aimed line, along [150, 0] (puddle k at 25k toward where Isaac stood; one puddle more than Rep, Stop's frame included).
mobile_host / flesh_mobile_host: NpcAI::ENTITY_MOBILE_HOST 005321d0 (204.0 / 247.0). Changed
- Walk: FindGridPath(Isaac, .5, 300, 1), friction .8 (path .5 / .8 match). 204 (subtype != 99) is closed (flag 0x10) while walking; closed hits are absorbed and add (int)(dmg + .5) / 2 to StateFrame (cap 10), > 20 damage plays Bombed.
- Roll, while StateFrame < 1: rand%3 == 0 -> ProjectileCooldown-- (only on those ticks); at <= 0, IsTargetInAttackRange(false, 7) (006cae60: IsFrame(7), dist < 240 (DAT_00baaad4), CheckLine) -> Shoot, cooldown 70. The cooldown also counts down every tick of the 61-frame Shoot clip, so ~9 are left, spent at 1/3 a tick: ~27 idle ticks.
- Shoot: friction *= .5 (was .7), hurtable from Destructible (10) to Invincible (53) (guarded open [11, 54] matches), on Shoot (24): FireProjectiles mode 2 (204) / mode 5 (247) at 7 * unit(Isaac - pos), default params. Mode 2: [1, 0] and .9 * (.961, +-.276) = [.8649, +-.2484]; mode 5: [1,0], [.978, +-.208], [.914, +-.407].
- Port: speed 7.49 -> 7, fans as above (204 was [.8, +-.2], 247 had rotated 4-term terms), attack retention .5, attack cooldown 70 -> 27 (204; 247 had none -> 27).
portal: NpcAI::ENTITY_PORTAL 00543720 (306.0). Changed
- Init: state 3, I2 = 15, I1 = rand%5 + 1 spawns (spawn_total 1 + random 4 matches). Removed at once on LevelStage 9 (Blue Womb) and 11+ other than 12 (the Void uses the room config's stage).
- State 3: when I2 < 1, count its own live enemy spawns (SpawnerEntity == it); < 3 -> spawn (state 8) and I2 = 90 + rand%60, else I2 = 60 + rand%30. Spawn: RandomInt(7) from the table at 0x00b613e0 (7 per group) by stage: 1-2 [10, 217, 85, 244, 16, 29, 18], 3-4 [25, 61, 26, 234, 258, 208(.1 Pale Fatty), 23], 5-6 [24, 41, 34, 227, 212, 229, 32], 7-8 [32, 15, 58, 56, 59, 55, 204], Cathedral (and default) [38, 55.2, 86, 90, 260.10, 219, 86], Sheol [259, 252, 225, 55.1, 278, 258, 55.1], Downpour [10, 810, 814, 813, 817, 15, 806], Mines [10, 810, 870, 813, 817, 872, 806]. Spawned at its own position, then a shockwave; I1-- and it dies at 0. Friction .7, position pinned.
- Port: period 7 / one_in 8 -> first_cooldown [15, 0], period 1, cooldown 90 + cooldown_random [60, 1] once, spawn_offset 0; chapters 3-4 gain fat_bat; chapter 9 (Sheol with Cathedral as its alt) is the union of both lists with Rep's repeats (Imp, Black Globin and Lil Haunt added). Left: the own-spawn cap of 3 (ours enemy_limit 5 of the room), the 60-89 retry while capped, Sheol vs Cathedral pools apart, Downpour/Mines pools.
- Port follow-up: engine
spawn_cap {below, own}counts the actor's own live spawns (each spawned actor keeps its spawner's serial): Portal below 3, Lil Portal below 4, replacing enemy_limit 5. The capped retry delay is not ported (it retries every tick).