i ain't no coder. basically i spend +-8 hours because, firstly, i wanted to synthesize maka's resprites mod which contains animations and the animated items mod itself. i succeded but then i found LOTS of unused (or not working)sprites from different folders. most of them don't have anm2 files or a single mention in main.lua file. i really tried to add them into game trying adding lots of anm2 and lines of code in main.lua but here's a better summary from deepseek which helped me a lot on my way
Binding of Isaac: Repentance+ (Latest Steam version, no REPENTOGON)
Mod: "Animated Items" (Framework for animated pedestal sprites)
The Problem:
I successfully added 10 custom items manually (Dark Matter, Abaddon, etc.). These work perfectly.
I tried to add ~150 more items (from old DLCs like Rebirth, Afterbirth, Repentance).
The Result completely static (no animation).
Crucial detail: I get ZERO errors or logs in the in-game console (`~`). The `print()` functions I added to `main.lua` do not show up at all in the console for the new items.
What I've Already Tried (Step-by-Step):
1.ANM2 Files: I used a `Template.anm2` file with the correct `<AnimatedActorRoot>` structure and a simple "bobbing" animation.
Bulk Generation: Since I have ~150 sprites(nah there was like 800), I used a PowerShell script to automatically generate individual `.anm2` files for each `.png` from a single folder (`gfx/AllSprites/`). The paths inside the ANM2 correctly point to `gfx/AllSprites/filename.png` (I fixed the double `AllSprites/AllSprites` duplication via Notepad++).
Sprite Location: All sprites are placed in `mods/zzanimated items_2570913695/resources/gfx/AllSprites/`.
Main.lua Integration:
- I used `Isaac.GetItemIdByName("Item Name")` to fetch IDs.
- I used `AnimatedItemsAPI:SetAnimationForCollectible(ID, "filename.anm2")` to register them.
- I created a helper function to loop through the list and print results to the console.
- I ensured the `animationfiles` table is properly defined before adding new items.
- I checked for duplicate `AnimItems:AddCallback` calls and removed them.
- There are no syntax errors (the mod loads without crashes).
**Test:** If I manually add `AddItemAnimation("Boom", "collectibles_019_boom-Sheet.anm2")` at the top of the file, it still doesn't work, even though `Isaac.GetItemIdByName("Boom")` definitely exists in the game.
Hypothesis / Where I'm stuck:
The `main.lua` code for the 150 items seems to be completely ignored at runtime (no console outputs). The 10 manually added items work because they are defined earlier in a separate loop. I suspect the mod's framework might be caching something, or the `animationfiles` table isn't being populated correctly when done in bulk, but I can't find the exact breaking point.
My Question:
Does anyone have experience with the **"Animated Items"** mod framework?
Is there a limit to how many items can be registered via `SetAnimationForCollectible`?
Does the mod require the `.anm2` filename to match the collectible ID exactly (e.g., `331.anm2`) instead of the item name?
Could the `AnimatedItemsAPI` be overriding or blocking calls made after the game initializes?
Is there a specific place in `main.lua` (before/after specific functions like `MC_POST_GAME_STARTED`) where this registration MUST happen to avoid being ignored?
Any help or debugging tips would be massively appreciated! I've been stuck on this for days.
*(I can provide the full `main.lua` and a sample `.anm2` file if needed).*