[BUG] Create item via macro
Closed this issue · 7 comments
v11.315
dnd5e 3.1.2
magicitems 4.1.4
There are two errors so far in my tests.
Tested with only magicitems and item piles and #1 and #2 produced.
Tested with only magicitems and #2 produced.
Tested after applying magicitem field migration suggested in 4.1.4 release notes. No change.
This seems like a fault with the dnd5e system and magicitems than item piles and magicitems. There doesn't seem to be any loss in functionality. However, these errors are massive spam.
@highrockgames do you have an example macro that would create an item?
I ran into this too, here is a very short example macro you can use to test:
async function testAddItem() {
//generate item
var item = {
_id: 'NzDxIISxSXSyQltk',
name: 'Thing',
type: 'loot'
};
//run the function for all selected tokens
canvas.tokens.controlled.forEach(function(token){
//Update the token's inventory
token.actor.createEmbeddedDocuments('Item', [item]);
});
}
testAddItem();
Can confirm this is an issue whether adding items via the default create function - or with itempiles.
Thanks, will check that for testing
@hollowphoton it seems like the macro you've provided seems to be working perfectly fine for me at FVTT v12.330 and D&D 3.3.1 with newest version, could you please check?
I'm not ready to upgrade to v12 just yet, but appreciate the patch!
Okay, then I'm closing the ticket, but not locking it - should it still occur on the latest versions, please write here again 😃 !