Tested, no errors. Can you give more info?
Can you make this happen in a new campaign with no other exts?
Any other steps to recreate this?
As MrDDT says - can't duplicate. You have something else going on (conflict with another extension - bad data - not up to date version should be same as page 1 last modification).
Line 4972 of the code is a check for an object or item which can only be used by true polymorph (will generate an error if this is true). As your erroring on the value of the target of the spells "type" which is expected to be a text value - that is likely your problem (whatever this NPC is it has bad data - it claims that data is numerical which should be text for an NPC type). Or so I'm guessing based on nothing else to go on but the error. Though technically the value for the check here needs to be checking for "" not nothing. But either way something is wrong in how the target of the spell type is defined. If it is an error in logic then the exact case to duplicate it would have to be provided.
Code:-- most things (not consistent) have a type
local sTargetType = DB.getValue(nodeTarget, "type", "");
if not sTargetType then
sTargetType = "undefined";
end
Code:if sFilter ~= Interface.getString("polymorph_filter_TruePolymorphSpell") and ((sType:lower():find("object") or sType:lower():find("item")) or
(sTargetType:lower():find("object") or sTargetType:lower():find("item"))) then
The 2024 PHB (pg. 81, Game Statistics paragraph) states that the druid gains the Beast's stat block, but retains their creature type (i.e., they are still humanoid when in wild shape). However, when I try to add a wildshape option that is set as type humanoid, Polymorphism blocks me because it isn't a beast. Is this something we can get fixed or given an option to allow for? Thanks!
Nevermind, I see that I have an option to turn those checks off already. Carry on!
While you can turn off the wildshape check options - and I don't really play 2024 - are you saying you chose a beast - which which is what you WOULD do and WOULD be limited to with wildshape - and that it did not create it as your type humanoid? That would be a bug. You selecting a non beast because you wanted to turn off rules would be something else. So let me know. As 2024 wildshape is still limited to choosing beast as far as I'm aware. Otherwise, if you think you can turn into a "humanoid" type of NPC (not a beast NPC that has its type set to humanoid after you wildshape) then you are incorrect.
And I checked - when I choose a beast - like brown bear - and wildshape the NPC brown bear in CT entry is a type humanoid along with all the other stats its supposed to have from wildshape. So its all working.
I think your are cheating on 2024 wildshape by not limiting choice to a beast :) Which is your prerogative - and why that option to turn off checks exists.
I continue to get this error when dragging an NPC creature onto the Polymorphism graphic on the actions tab to add it to the drop down as shown in the video instructions.
[6/2/2026 7:44:44 AM] [ERROR] Script execution error: [string "Polymorphism:..pts/manager_polymorphism.lua"]:5224: attempt to index local 'sTargetType' (a number value)
No way to duplicate. I assume you have some conflict with the extensions you are using. unload all extensions except polymorphism and try again. If the error does not happen you have an out of date, no longer supported, or conflicting extension and will have to unload it to use this. Or your not running on the latest FG updates - in which case it won't work.