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>
162 lines
13 KiB
Markdown
162 lines
13 KiB
Markdown
# Group 02 notes (pass 4)
|
|
|
|
Decompiles are in `./decompile.sh 0x<addr>`. The routines that find.sh names `GameOver::Show` (00547b60, type 310) and
|
|
`MinimapConfig::Render` (0045fc00, type 263) are the Leper and Gate AIs under ICF names. `this` is the NPC there
|
|
(this[9].field_0xb4 = state 0xb64, this[9].field_0x110 = I1 0xbc0, this[2].field_0x10c = friction 0x36c,
|
|
field_0x30 = subtype). The rotten gaper (10.3) runs FUN_004da590, which ENTITY_GAPER calls first.
|
|
Field 0xb50, read by several AIs: in ENTITY_HIVE it gates the cough clock and the scared sound, so it looks like a
|
|
"threatened" counter. It is not identified.
|
|
|
|
## small_baby_long_legs: ENTITY_BABY_LONG_LEGS 00531ab0 (206.1). Changed
|
|
- Idle: EvadeTarget(player) (move flee kept), friction 0.8. Matches.
|
|
- Lay roll (asm 531c0a..531c7c): N = 200 for variant 1 (100 for variant 0). While b50 < 1: Random(N/2)==0 OR
|
|
Random(N)==0, so 1/100 + 99/100 * 1/200, about **1/67** a tick. While b50 >= 1: only Random(N), 1/200. It only rolls while
|
|
GetAliveEnemyCount < **6**. Was period 7, one_in 6, spawn_cap 3 sacks. Now period 1, one_in 67, enemy_limit 6,
|
|
no spawn_cap.
|
|
- On "Lay": Spawn(30,2) (sack) at zero velocity at full health, plus white creep effect 1000.25. spawn_health 0.5 is
|
|
not in the decompile, so it was removed. Friction 0.5 during the clip matches.
|
|
- Not expressible: the 1/200 rate while b50 >= 1. Proposed: `attacks[]/one_in_threatened` (the roll used while the
|
|
actor is threatened, as fleeing_enemy defines it).
|
|
|
|
## gutted_fatty: ENTITY_GUTTED_FATTY 004e0dd0 (831.0). Changed
|
|
- Init: projectileCooldown 60 + rand%150 -> **first_cooldown [60,150]**.
|
|
- Move: friction *0.6 and a 1.2 push a tick along heading v1.y, which turns smoothly toward the target heading v1.x.
|
|
v1.x is redrawn at random every i1 = 45 + rand%120 ticks, and 1/4 of grid hits reflect it. Now **drift, speed 0.72
|
|
(1.2 * 0.6), retention 0.6** (was wander 0.3 / 0.8). Terminal speed is 1.8 in both.
|
|
- Attack: there is no per-tick roll. When the cooldown is below 1: if 3 or more festering guts (831.20) of the same
|
|
friendliness live, cooldown = 60 (spawn_cap below 3 is kept). Otherwise Attack, with i2 = 45 + rand%90 degrees. On the
|
|
event it spawns 831.20 at its position, velocity 10 * (cos, sin)(i2), so downward within +-45 degrees. At the end the
|
|
cooldown is 90 + rand%180. Friction 0.4 during the attack. Now: no period or one_in, **cooldown 90, cooldown_random
|
|
[180,1], cooldown_once**, retention 0.7 -> **0.4**, spawn_at [0,0], spawn_velocity [0,10] + spawn_cone turn 90
|
|
(was [0,20] / [0,6]).
|
|
- Not expressible: damage taken shortens the cooldown by max(1, 12 * damage); the heading turns smoothly instead of
|
|
drift's nudges; the 60-tick retry when crowded. Proposed: `attacks[]/hurt_cooldown: 12` (cooldown -= max(1, x * damage)).
|
|
|
|
## drowned_boom_fly: ENTITY_BOOMFLY 0050f280 (25.2). Changed
|
|
- Per-axis push: **0.4** for variant 2 (0.45 for the others) / friction, then friction *0.9. acceleration 0.45 -> 0.4.
|
|
The Skatole 0.25 matches.
|
|
- Death (kept as is): a 40-radius explosion, FireProjectiles mode 6 (cross) at **10 in hard mode** (difficulty 1/3)
|
|
or 8. Then 1/3: if its cell is free, it spawns a drowned charger (23.1) whose velocity is halved. Not
|
|
expressible: `death_volley/hard_speed` and `death_spawn/one_in`. Also check that death_volley `variant: 1` really
|
|
fires for this variant-2 record.
|
|
|
|
## brimstone_head_203_0_1 / _0_2 / _0_3: ENTITY_STONEHEAD 00520c60 (203, subtypes 1-3). Changed
|
|
- These are the same as the fixed base record: the angle is subtype*90 - 180 (1 up, 2 right, 3 down), and it shoots when
|
|
(room frame - entry) > 30 and that % 90 == 0. The beam timeout is 15. There is no random roll or cooldown, and it closes on
|
|
plates. Now **period 90, period_serial false, after_tick 31**, one_in 4 and cooldown 45 removed, and cleared
|
|
{after 0, CloseEyes, disarmed}.
|
|
|
|
## cross_stone_shooter_202_10_1: ENTITY_CONSTANT_STONE_SHOOTER 00506320 (202.10.1). Changed
|
|
- Subtype 1 starts on ShootAndRotate2 with mode 7 (diagonal), then toggles. Speed **10** (was 7). Init cooldown 22, never
|
|
reset -> **first_cooldown [22,0]**, period and one_in removed. Closing pose for subtype 1: CloseEyes2, then
|
|
ClosedEyes2 -> cleared {after 0, CloseEyes2}.
|
|
- Same limits as the base record: the closing/idle pose doesn't follow the toggled subtype, and the "clear OR plates" test.
|
|
|
|
## blue_boil: ENTITY_HUSH_BOIL 004be6f0 (298.0). Changed
|
|
- Idle: rand%50==0, then dist < **420** or 1/**6** -> Shoot, else Shake. choice.when range 230 -> 420, one_in 4 -> 6.
|
|
- Shoot: aimed at Isaac + a random point within 40 px, speed **7.5**. FireProjectiles mode (rand&1)*2: mode 0 is
|
|
single; mode 2 is a centre shot plus two at +-16 degrees at 0.9 speed. Params: Scale **1.6**, FallingAccel -0.12,
|
|
HomingStrength 1.1 (no homing flag). Now both shots are speed 7.5, scale 1.6, and the triple has spread 0.5592.
|
|
- Not expressible: the 40 px aim jitter, the side shots at 0.9x speed, FallingAccelModifier -0.12 (I didn't verify that
|
|
fall_acceleration maps onto it). Proposed: `attacks[]/aim_jitter: 40` (aim point + random vector up to N px).
|
|
|
|
## mullighoul: ENTITY_HIVE 0050c370 (817.1). Changed (kind)
|
|
- It is the prey branch (type 0x331). State 4 is the same flee/cough logic, friction *0.8, cough clock 75 / blocked 7 /
|
|
distant 3 / crowd 4 + rand%5, range 300. Variant 1 spawns **0x328 (willo)** at zero velocity instead of a leech. It
|
|
plays only "WalkVert", flipped by the x velocity, with HeadWalk over it. Death uses the same count formula as prey,
|
|
each spawn a willo. The record was scripted flee with a 1/10 attack (range 150, cooldown 60). It is now
|
|
`fleeing_enemy`, a copy of prey's behaviour with child_type willo, prey's art roles (walk = WalkVert) and
|
|
death_spawn count 3 / crowd_scale 0.2.
|
|
- Also: posOffset.y -6 and grid collision class 6 (no pits) for variant 1, which floor_hazards flying covers.
|
|
|
|
## scarred_guts: ENTITY_GUTS 005153b0 (40.1). Changed
|
|
- Wall push: 3.3 for variant 1 (3 base, 2.45 variant 2) * ramp / friction 0.6 -> speed 3.5 -> **3.3**.
|
|
- Every **2** ticks (index-offset): red creep (effect 22, timeout 20, sprite scale grows from 0.1, field 0x478 0.75),
|
|
plus a splat scaled rand*0.7. creep period 6 -> 2 (serial), splatter period 5 -> 2.
|
|
- Not expressible: the 20-tick creep lifetime. Proposed: `creep/timeout`.
|
|
|
|
## dump_head: ENTITY_DUMP 00562f00 (876.1). Changed
|
|
- FindGridPath(target, **0.78**, 900, 1), no friction change -> **move path, retention 1** (was chase/0.8).
|
|
- Brown creep every **8** ticks (3 while launched), scale .75 + rand*.25 -> period 8, scale .875.
|
|
- Not ported: state 8 (it flies off at 14 away from the hitter and bounces at 1.8 off walls) is the dump's
|
|
spawn_away_from_hit proposal.
|
|
|
|
## small_maggot: ENTITY_SMALL_MAGGOT 004d77b0 (853). Changed
|
|
- It is not a chaser. Every 10 + rand%30 ticks (or on a grid hit) it redraws its heading: a random rotation, or, when aware
|
|
(i2 = 1: damaged, or a player within 41 px on a 1/4 roll every 4 ticks; it forgets 1/25 a tick) and in sight, toward
|
|
Isaac with a factor of 2. Push = (0.15 + rand*0.3) * k along the heading, which turns (2 - rand*4) degrees a tick.
|
|
Friction 0.8.
|
|
- Now **drift, speed 0.24** (0.3 mean * 0.8), retention 0.8 (was chase 0.3).
|
|
- Proposed: `move: curve {period:[10,30], push:[0.15,0.3], turn:2, aware_factor:2}` for the exact behaviour.
|
|
|
|
## leper_stage_3 (310.0.2) / leper_stage_4 (310.0.3): Leper AI 00547b60. Changed
|
|
- I1 > 0, or subtype 3: FindGridPath(speed: subtype 2 **0.7**, subtype 3 **0.9**, others 0.5), friction *0.9. When
|
|
I1 runs out, I1 = -(30 + rand%60). I1 < 1 (subtypes 0-2): EvadeTarget, friction 0.8. I1 counts up to 0, then while
|
|
b50 < 1 a 1/10 roll each tick sets I1 = 90. Damage while chasing takes ceil(2*dmg) off I1.
|
|
- Stage 3: base **path 0.7 / retention 0.9**. The flee phase patch is {flee, 0.5, 0.8}. The clock period 150 -> **160**
|
|
(90 chasing + 59.5 mean fleeing + about 9 for the 1/10 roll).
|
|
- Stage 4: always **path 0.9 / retention 0.9** (was chase 0.6 / 1). Creep (effect 22) every 10 ticks, scale
|
|
.2 + rand*.3 -> **0.35**, timeout 30. The gusher morph (hp > -25, 1/2) and leper flesh spawn match.
|
|
- Not expressible: the random flee length and the damage-shortened chase. Proposed: phase gate `timer {on, off_random}`.
|
|
|
|
## the_gate: Gate AI 0045fc00 (263.0). Changed (partly)
|
|
- Idle (state 3) decides only on IsFrame(n) with n = 20 (10 below 30% hp). Let c = room enemy count (Room+0x12c0 +
|
|
0x12c4). If c < 5 and rand < w(c), where w = 1, 1, .5, .25, .125 for c = 0..4 -> Spawn (state 13: spawns a leaper 34.0
|
|
at y-60, which BigJumps to a free spot near the gate). Otherwise, if c > 2 and Random(12/c) == 0 -> laser (Charging,
|
|
then Shooting: Entity_Laser::ShootAngle(variant 1, 90 degrees, timeout 10, offset (0,-30))). Otherwise 1/2 -> rings
|
|
(Charging, then Shooting). On Shoot, FireProjectiles mode 9 with rand&3: 9 at 10 orbit CW, 9 at 10 orbit CCW, 6 at 10
|
|
CW + 6 at 7 CCW, or 11 at 10. Params: VelocityMulti **1.05**, Scale **1.8**, FallingSpeed -2, FallingAccel -0.06.
|
|
There is no cooldown after an attack and no opening spawn.
|
|
- Changed: opening removed; cooldowns removed; spawn_cap removed; choice one_in 25 -> **20**, options [0, 5]. The new
|
|
attack 5 is Charging -> next [1,2,3,4], and the ring attacks play **Shooting** (rolled false) at **10.5 / 7.35, scale
|
|
1.8**. The colours were not touched. Red's choice merges its own options over one_in 20.
|
|
- Not expressible yet:
|
|
- The laser. It needs an anm2 event `LaserEnd` in the_gate.anm2 "Shooting" at frame **15** counted from 1 (Shoot is
|
|
frame 5, timeout 10), then attack {Charging -> Shooting laser {from Shoot, to LaserEnd, width 25,
|
|
beams [{direction [0,1], offset [0,-30]}]}}. It is gated on more than 2 enemies, one_in about 12/c.
|
|
- The weighting by enemy count and the faster decisions below 30% hp. Proposed: `choice/period` (decide only every
|
|
N ticks), `choice/weights[]/enemy_scale` (the weight halved for each enemy above 1).
|
|
|
|
## black_globins_head: ENTITY_BRAIN 00512110 (279). Changed
|
|
- FindGridPath(target, **0.5**), no friction -> **move path, retention 1** (was chase 0.6 / 0.9).
|
|
- Creep (effect 22) on interval **12** (24 while there are 5 or more enemies), offset index%12; also at offset +6
|
|
when speed > 3. Scale **1.23**. Now creep period 24, enemy_periods [[5,12]], scale 1.23 (fast_speed 3 kept).
|
|
Splat every 3 ticks matches.
|
|
|
|
## unborn: ENTITY_UNBORN 004dca90 (860). Changed
|
|
- Idle: **no push**. Friction *0.97, with a 1.4 reflection off walls. -> **move still, retention 0.97** (was hover 0.4).
|
|
- While 100 < dist < 500, i1 counts up (and resets outside that band). Once i1 > 30, rand%30==0 -> Teleport (friction 0.8).
|
|
-> period 1, **one_in 30, range 500, range_min 100**, retention 0.8.
|
|
- The target is Isaac + 120 * unit(Isaac - unborn), past Isaac. It retries rotated +-45 degrees 3 times, then +-90
|
|
degrees, then the other side, 10 tries in all.
|
|
- TeleportEnd: friction 0.8 before its Effect event. From then on, friction .97 and a steering push of 0.29 a tick
|
|
toward Isaac (+0.3 * his velocity, bending around tears), capped at 12. -> lunge 0.29 from Effect, lunge_brake 0.8,
|
|
retention 0.97.
|
|
- Not expressible: the i1 > 30 dwell, teleport target "behind Isaac", wall reflection 1.4, the tear dodging.
|
|
Proposed: teleport mode `behind {distance 120, turns [45, 90, 180]}`, `attacks[]/dwell: 30` (the range must hold
|
|
that many ticks first).
|
|
|
|
## rotten_gaper_10_3_2 / _3 / _5: FUN_004da590 (10.3, subtypes 2/3/5). Changed
|
|
- Speed = 0.6 * table[subtype], table = {1, 1.2, 1.5, 0.8, 0.9, 1.9} (DAT_00babec0 + locals). Subtype 0 morphs into 1-5.
|
|
FindGridPath, no friction change.
|
|
- 10_3_2: 0.9 (path limit -1) -> ground_chaser acceleration 1.0 -> **0.9**.
|
|
- 10_3_3: **0.48** -> move path, speed 0.48, retention 1. Spawning: i2 counts up, and once it passes 60, a 1/8 roll a tick
|
|
(i2 reset) spawns a small maggot (0x355) if its group has fewer than 6. -> period 1, **one_in 8, cooldown 60,
|
|
first_cooldown [60,0]** (spawn_cap 6 kept). It also follows a nearby rotten gaper of another subtype for 30..44 ticks
|
|
when more than 80 px from Isaac. That is not expressed.
|
|
- 10_3_5: in sight, it moves straight at a point 60 px past Isaac (+-20 degree jitter), push 1.14 * (0.75 + 0.25 *
|
|
clamp((d-80)/100)), friction *0.9. -> hover **0.9** (about 1.0 * 0.9), retention **0.9**. Out of sight it uses
|
|
FindGridPath at the same speed. That is not expressed.
|
|
|
|
## Skipped
|
|
- greed_gaper (005a6b80): FindGridPath 0.6, which matches ground_chaser 0.6. Only the idle head pose differs: Head1-4 by
|
|
index&3.
|
|
- baby_plum (0043f0c0): this already matches. Orbit 80 px about Isaac turning 2 degrees a tick, FindGridPath 0.6,
|
|
friction 0.8. Attacks are tried after stateFrame > 30 with rand%30, then 1 of 3 (one_in 90 each, cooldown 30).
|
|
Attack2 is a ring of 14 at 5 plus eight at 10, creep 1.5. The 900-tick leave matches. Small remaining difference:
|
|
Attack1's dash is a 4 * dir push decaying 0.93 a tick under friction 0.8, not lunge 1 / retention 0.93.
|
|
- brownie (0048c3b0, 1319 lines): skipped because it needs a full rewrite. Idle: after stateFrame > 30, if hp > the
|
|
hp at the last check it either rests or, below 95% hp, every 30 ticks on a 1/4 roll goes to state 11 or 4 (1/2 each).
|
|
Otherwise rand%100 < (80 - 50*hp/maxhp) (halved after a state-10 pick) -> state 10 (a dash with 3..12 repeats), else
|
|
state 8. The record's period/one_in phases don't follow that structure. A separate task should redo it.
|