[BUG] - [Dnd5E] - Some Item Pile settings not working
Closed this issue · 9 comments
Are you on the latest version of Item Piles?
No, v2.8.20
Have you tried to reset Item Piles' system settings?
Yes
Describe the bug
I use your 'Make tokens lootable' macors via an additional macross, which makes tokens lootable, when status 'Dead' is applied to them. If that token had 1 and only 1 item in their inventory, macros converts token's image and name. 'Display Single Item Image' and 'Use Item Name' checkboxes are toggled off.
To Reproduce
Steps to reproduce the behavior:
- Create a NPC sheet, add one item to their inventory.
- Go to created NPCs 'Item Pile Configuration' -> Other Settings -> Uncheck 'Display Single Item Image' and 'Use Item Name' checkboxes.
- Create custom 'Dead' status via DFreds Convenient Effects.
- Set two effect macroses: 1. 'On Effect Creation' -> game.itempiles.API.turnTokensIntoItemPiles(token) 2. 'On effect deletion' -> game.itempiles.API.revertTokensFromItemPiles(token). Set created custom effect 'Dead' - 'Add Favourite' and reboot Foundry.
- Drag that NPC to the scene and apply macros: game.dfreds.effectInterface.toggleEffect("Dead",{overlay:true})
- See error
Expected behavior
I expect the token to keep his actor data, token image and name
Screenshots
If applicable, add screenshots to help explain your problem.
Setup:
- Foundry Version: 11.315
- System Version: DnD 5e 2.4.1
- Item Piles Version: 2.8.20
- Browser & version: Foundry Lightweight Client
Additional context
If character has more that 1 items, it works just fine, as expected. As far as I think, those 'Display Single Item Image' and 'Use Item Name' checkboxes seems to overwrite themselves when an NPCs status becomes 'Dead'
Can you post the macro that you are using for the dead status? If that macro isn't setting the item piles settings on token correctly, it will take the default behavior of your Default Item Pile character.
Can you post the macro that you are using for the dead status? If that macro isn't setting the item piles settings on token correctly, it will take the default behavior of your Default Item Pile character.
I don't actually use macro to apply that status. The module (DFredsConvenientEffects) does that by itself, as far as I think. When any NPCs health drops to 0 HP - their status automaticly becomes 'Dead'
Then it is a bug with that module, not item piles. Item piles does exactly what it is supposed to do.
Then it is a bug with that module, not item piles. Item piles does exactly what it is supposed to do.
Well, I've got one simple macros to set status 'Dead' manually - game.dfreds.effectInterface.toggleEffect("Dead",{overlay:true})
With this macros the same thing happens - actor becomes an item.
Is it a problem with DFredsConvEff in that case too?
And also, is there a way to set some arguments to that hook?
I've tried something like this - game.itempiles.API.turnTokensIntoItemPiles(token, {displayOne:false, showItemName:false}), but it doesn't work. I lack some JS knowledge, sadly.
The wiki shows you this:
https://fantasycomputer.works/FoundryVTT-ItemPiles/#/api?id=turntokensintoitempiles
game.itempiles.API.turnTokensToItemPiles(token, { pileSettings: { displayOne: false, showItemName: false } })
The wiki shows you this: https://fantasycomputer.works/FoundryVTT-ItemPiles/#/api?id=turntokensintoitempiles
game.itempiles.API.turnTokensToItemPiles(token, { pileSettings: { displayOne: false, showItemName: false } })
A little typo of yours: not 'TokensToItemPiles' but 'TokensIntoItemPiles'. Replacing my macro on 'Dead' effect creation with yours above worked just fine, my thanks to you! :)
To fix this problem without the workaround above, I suppose I should get in touch with the creator of DFredsConvEffect module, am I right?
That is correct
Thank you kindly, sir! I guess I'll keep using this one until this problem gets a proper fix.
Have a nice day! :)