I was building an virtual NPC to act as 'treasure storage', wanting to exploit the fact that giving items from an NPC duplicates the item rather than moving it.
Except... in my testing, this isn't what was actually happening. I did some troubleshooting and found the problem:
In GiveEdit@Lib:Sheet, there's a line that looks like this:
[H: DNT_CharacterType = json.get(json.get(getLibProperty("CharacterTypes", "Lib:Information"), DNA_CharacterType), 2)]
This is supposed to be checking to see if the token is a PC character type, but instead is looking up the HP modifier. PCs and NPCs both have the same modifier (1), which causes this to not work.
The 'correct' fix is to replace that line of the macro with this version, changing the '2' to a '1' to properly query the "is PC" field rather than the "HP multiplier" field
[H: DNT_CharacterType = json.get(json.get(getLibProperty("CharacterTypes", "Lib:Information"), DNA_CharacterType), 1)]
The alternative is to flag any NPCs that you're putting items on as an elite or a solo, as they have a HP modifier that is not equal to 1.
[Edit: I should learn to preview.]