Open brunocalado opened 1 year ago
appears to be a SWADE related issue. I will need to install the system to investigate.
To create the actor, I grab the first actor type from Object.keys(game.system.model.Actor)
. The first listed in SWADE is base, which has none of the structure SWADE is expecting of it's actors. I will look for a workaround.
and the tokens for those cards' tokens are being created with no dimensions because there are no dimensions set on the cards. So they are being created, you just cannot see them.
Macro to fix SWADE's Action deck
let deck = game.cards.getName('Action Deck')
deck.updateEmbeddedDocuments('Card', deck.cards.map(c=>{return {_id: c.id, width: 2, height: 3}}))
and 0.4.7 fixes the SWADE base actor problem
Macro to fix SWADE's Action deck
let deck = game.cards.getName('Action Deck') deck.updateEmbeddedDocuments('Card', deck.cards.map(c=>{return {_id: c.id, width: 2, height: 3}}))
Thank you very much.
Is it possible to add a detection to this in the module? If there is no dimension it auto set one.
Technically, yes. I considered it, but I feel it is better just to give the cards the dimensions they should have.
Technically, yes. I considered it, but I feel it is better just to give the cards the dimensions they should have.
I think this would be a safer solution. So, the module will not have to rely on systems, modules or user created content.
It can prevent future issues.
Description: When dragging a card to the canvas with the Card Tokens module enabled, the module appears to work correctly, but the card does not get placed on the canvas. Additionally, when attempting to drag actors created with the cards from the actor folder to the canvas, an error occurs, as shown in the attached image.
Steps to Reproduce:
Expected Behavior: When dragging a card to the canvas, it should be placed on the canvas. Dragging actors created with the cards should not result in an error.
Actual Behavior: The card is not placed on the canvas, and dragging actors created with the cards triggers an error.
Environment:
Screenshots/Error Message:
https://github.com/xaukael/card-tokens/assets/4999783/8205a602-bcd0-4319-a7fe-542251a1debd