Files
isaac-port/notes/entities/pass2_stone.md
T
shweetandClaude Opus 5.5 ad8f933086 Salvage Repentance+ 1.9.7.17 decompilation toolkit, notes and name database
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>
2026-10-24 13:08:19 -04:00

70 lines
5.5 KiB
Markdown

# Stone group notes
Routines: NpcAI::ENTITY_STONEHEAD 00520c60 (types 42, 203, 235, 236; `./decompile.sh 0x00520c60`),
NpcAI::ENTITY_CONSTANT_STONE_SHOOTER 00506320 (type 202 variants 0 / 10 / 11; `./decompile.sh 0x00506320`),
bomb grimace 809 -> 004f8df0 (misnamed "GridEntity_Fire::Update" in the table; `./decompile.sh 0x004f8df0`).
Room flag used everywhere: RoomDescriptor flags (+0x44) >> 1 & 1 = FLAG_PRESSURE_PLATES_TRIGGERED, i.e. `disarmed`.
Shared ProjectileParams setup (stonehead + constant shooter): HeightModifier 13, FallingAccelModifier -0.101
(constant shooter also VelocityMulti *1.07). I did NOT retranslate height/fall fields (existing fall_velocity/
fall_acceleration/offset look like a Flash-model approximation; the Rep->engine mapping is the lead's call).
## triple_grimace (42.2)
Fires when _projectileCooldown < 1 and FUN_006cae60(0,7): IsFrame(7), player within 200 (DAT_00baaa94) and
Room::CheckLine mode 3 clear. Cooldown set to 0x54 = 84 (firemode 12 x period 7 already matches). FireProjectiles
mode 3 (variant 2): centre + two rotated by (0.914, 0.407) = +-24.0 deg = 0.419 rad, speed 7 (10 on hard,
FUN_006d8240), no VelocityMulti. Wrong: range 240 -> 200, speed 7.49 -> 7, spread 0.2 -> 0.419.
Closes ("CloseEyes", one-shot, holds) as soon as GetAliveEnemyCount()==0 -> cleared after 30/ClosedEyes -> after 0/CloseEyes.
## cross_stone_shooter (202.10) / cross_stone_shooter_always_on (202.11)
Init cooldown 0x16 = 22, never reset afterwards: after 22 ticks it fires back to back forever. Each ShootAndRotate{1,2}
fires on "Shoot" FireProjectiles((10,0), mode 6 + subtype) = cardinal four / diagonal four at speed 10; at the clip
end the subtype toggles. Wrong: speed 7 -> 10; base had cooldown 12 after the diagonal; always_on had period 7 one_in 6.
Both now: no period/roll/cooldown, first_cooldown [22, 0]. Closing: v10 on plates pressed OR no alive enemies
(cleared after 0, CloseEyes1); v11 only on plates (added cleared {after 0, CloseEyes1, disarmed}).
Not expressible: (a) the idle and close poses follow the toggled subtype (Idle2/CloseEyes2 after ShootAndRotate1);
(b) v10's OR of "clear" and "plates" (engine has clear, or clear AND plates).
## constant_stone_shooter (202.0)
Init cooldown 0x14 = 20, never reset: Shoot{Left,..} back to back. Shot on "Shoot": mode 0, velocity v1*7 with
VelocityMulti 1.07 -> 7.49 (direction [-7,0] -> [-7.49,0]), from the "Bullet" null. Closes ("CloseEyes") only on plates.
Changed: speed/direction 7.49, first_cooldown [20, 0], cleared pose ClosedEyes -> CloseEyes (kept disarmed).
Only subtype 0 (left) has a record.
## brimstone_head (203)
In state 3 (idle): if (room-frame - room entry frame) > 30 and that % 90 == 0 (plus a room byte at Room+0 being
nonzero, unidentified) -> ShootLeft; beam on "Shoot": Entity_Laser::ShootAngle(variant 1, angle subtype*90-180,
timeout 15) - Shoot@26..LaserEnd@41 already = 15. No random roll, no cooldown. Closes on plates (CloseEyes).
Changed: period 90, period_serial false, after_tick 31, removed one_in 4 / cooldown 45, added cleared
{after 0, CloseEyes, disarmed}. Also on entering state 8 it spawns something via FUN_0060b890(dir, 0x1a, 0.8, 4)
(unidentified, likely a warning effect) - not ported.
## gaping_maw (235) - skipped, matches
Pull radius 300, force (300-d)*f/300 clamped [0,f], f = 0.6 player / 0.9 tears+projectiles, divided by the target's
friction (0x36c) times 0x39c; off on plates (TurnOff). Only nuance: Rep divides by the target's friction.
## broken_gaping_maw (236) - left as is (close, not exact)
Clock = _stateFrame (since spawn) % 240: 0 -> TurnOn (28 frames) then Effect + overlay Sucking (pull only while Sucking
plays), 150 -> TurnOff; i.e. sucks 122 ticks per 240. Record: TurnOn period 240 + Sucking x8 (128) + TurnOff.
Not expressible: an attack ending after N ticks mid-clip, and a period clock counted from the actor's spawn.
## bomb_grimace (809) - not expressible, unchanged
Init: anchors; unless Abandoned Mineshaft, spawns pickup 5.41 (throwable bomb) on the cell below (pos + (0,40),
snapped), linked to it, its anim advanced to the end. State 3: Idle; while the linked bomb exists/alive, wait; when gone,
counter = 30, count down, then state 8 "Shoot": on event "Shoot" (frame 30) spawns pickup 5.41 at pos+(0,6) with
velocity (0,1.25), linked; back to state 3 at clip end.
# Proposed engine features
1. `attacks[]/pickup`: {variant (pickup 5.N; throwable bomb), offset [x,y], velocity [vx,vy]} created on the release,
kept as the actor's link; `behavior/opening_pickup` {offset_cells [0,1]} to place one at spawn (skipped in
Abandoned Mineshaft). Gate `attacks[]/linked_gone`: the attack is only tried once the linked pickup/spawn is gone
for `linked_wait` ticks (bomb grimace: 30).
2. `cleared/either`: true -> close when the room is cleared OR disarmed (cross shooter 202.10).
3. `behavior/toggle_poses`: [[Idle1, CloseEyes1],[Idle2, CloseEyes2]] switched each time an attack ends (202.10/11's
subtype ^= 1), so idle and cleared poses follow the stone's rotation.
4. `attacks[]/ticks`: the attack ends after N ticks even mid-clip (broken maw Sucking 122), and
`attacks[]/period_spawn`: the period counts ticks since the actor's spawn (broken maw stateFrame % 240, first TurnOn
on spawn).
5. Pull: divide each pulled body's push by its own friction/retention (Rep: force * 0x39c / 0x36c).
6. (Optional) Rep ProjectileParams mapping helper: height_modifier / falling_accel_modifier / velocity_multi on shots,
so Rep enemy shots (stone heads: 13 / -0.101 / 1.07) can be stated as decompiled.