xaukael / card-tokens

Drag cards to the canvas
MIT License
0 stars 2 forks source link

Feature Request - Integration with TokenMagic Macro for Card Placement #7

Closed brunocalado closed 1 year ago

brunocalado commented 1 year ago

Description: I would like to suggest a new feature for the Card Tokens module that would enhance the visual experience when placing cards on the canvas. It would be great if there was an option to define a TokenMagic macro that would be automatically activated when a card is placed.

The integration with TokenMagic would allow users to add captivating visual effects to their cards, such as dynamic animations, lighting effects, or particle effects. By specifying a TokenMagic macro, users can create a visually engaging atmosphere and bring their cards to life.

I have attached a video that demonstrates how this integration could significantly enhance the visual appeal of the cards on the canvas. The addition of TokenMagic effects would provide an immersive and captivating experience for players.

Thank you for considering this feature request. I believe it would add a new dimension of creativity and excitement to the Card Tokens module.

https://github.com/xaukael/card-tokens/assets/4999783/98cd3d81-8b0d-4e30-8e55-fea18785ba9c

xaukael commented 1 year ago

Not likely. As with the other issue, your specific goals can be achieved with a world script. Hook on createToken, check for token.actor.flags.world?.card, and handle what you want to happen there.

brunocalado commented 1 year ago

e what you wa

Can you share a more detailed example to do this, please?

xaukael commented 1 year ago

Something like this to default card tokens vision to false. I do not know what would need to be done with TokenMagic because I have never worked with it before, but it should be similar. The foundry discord have people to help with that sort of thing.

Hooks.on('preCreateToken', (token)=>{
  if (!token.actor.flags.world?.card) return;
  token.updateSource({vision:false});
});