xaukael / card-tokens

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

Editing Token Properties for Cards on Canvas #6

Open brunocalado opened 1 year ago

brunocalado commented 1 year ago

### Description Currently, when placing cards on the canvas using the Card Tokens module, it is not possible to edit the token properties for these cards. This limitation prevents users from customizing options such as displaying the card name or removing vision settings (image 1).

image 1 image

### Proposed Solution I would like to suggest adding a feature that allows users to edit token properties for cards placed on the canvas. Specifically, it would be helpful to have a dedicated section where users can modify the token's name. Furthermore, providing an option to set a default light source for the cards could be an interesting addition for visual effects.

xaukael commented 1 year ago

You mean like "Configure Default Token Settings" in the Core settings? I understand that systems might overwrite that, but I cannot do much about that in what I try to keep a system agnostic module.

brunocalado commented 1 year ago

You mean like "Configure Default Token Settings" in the Core settings? I understand that systems might overwrite that, but I cannot do much about that in what I try to keep a system agnostic module.

Yes, something like this. But, not for all options. Just for the options that are standard. Example: Display Name

image

Also, make Vision Enabled off. image

But, there is another use case. Allow to add animated light. https://github.com/xaukael/card-tokens/assets/4999783/049e36a4-46d1-41d3-855e-2edd420c1d6b

xaukael commented 1 year ago

that last bit seems like leaning toward custom tokens for every card. As for vision, I assumed that cards would be most often utilized on scenes without vision. Formatting the module in such a way that it would fit many use cases as you seem to be suggesting would increase it's complexity significantly and would be unlikely to be widely used. Setting up world scripts to handle your specific demands seems much more reasonable.

brunocalado commented 1 year ago

that last bit seems like leaning toward custom tokens for every card. As for vision, I assumed that cards would be most often utilized on scenes without vision. Formatting the module in such a way that it would fit many use cases as you seem to be suggesting would increase it's complexity significantly and would be unlikely to be widely used. Setting up world scripts to handle your specific demands seems much more reasonable.

Yes. World scripts can solve. But, there is some configurations that should be in this module. At least:

xaukael commented 1 year ago
brunocalado commented 1 year ago

I am unsure what you mean by name control. Currently the name shows on owner hover. Are we just talking about adding an option for owner always? I cannot imagine the other options would ever be desirable.

The cards have the name of them showing on mouse hover by default. This allow the player to identify a card without need to flip it. That's why I made that world script. I made a PR because it's very useful. cardToken.updateSource({ sight: { enabled: false // disable vision }, displayName: 0 }); image

image

xaukael commented 1 year ago

the name would only show if the player owns the card, which means it is in a hand they own, which means they already know what the card is, and could double click the card to open the sheet.

brunocalado commented 1 year ago

Yes. Worked. But. it's necessary to create one discard pile for each player. You can't have a common discard pile. Tks

xaukael commented 1 year ago

This may be my not understanding the system you are using, but isn't a discard pile for cards you are not playing/interacting with anymore?

brunocalado commented 1 year ago

This may be my not understanding the system you are using, but isn't a discard pile for cards you are not playing/interacting with anymore?

When using cards in the game, the standard practice is to move them from the hand to a discard pile. In Foundry VTT, you can create a shared discard pile that all players can see, which might reveal the cards on the table. To maintain privacy, it is recommended to create a separate discard pile for each player, ensuring that only the respective player has access to their own pile. This is not specific to any particular system but rather a common approach in Foundry VTT.

xaukael commented 1 year ago

That is too vague for me to formulate a solution. Please detail the specific situation.

brunocalado commented 1 year ago

That is too vague for me to formulate a solution. Please detail the specific situation.

Finding a comprehensive solution for preventing shared pile access would indeed require extensive development efforts.

Considering the complexity involved, I can suggest a few simpler alternatives:

  1. By default, you can implement a solution to hide the card names, I'm using a world script. However, this may not entirely prevent players from manually opening the shared pile and viewing its contents.

  2. Some card modules automatically create individual hands and discard piles for each player within Foundry VTT. This approach saves time and provides a more intuitive experience for users.

  3. Including clear instructions in the README file, emphasizing the need for each player to have their own hand and discard pile, can help guide users and promote proper setup.

xaukael commented 1 year ago

Regarding the first point, I will be adding that sometime today. Regarding the other two points, I am not really looking to teach people how to use cards in foundry. I made Card Tokens with the intent of providing an avenue for putting them on canvas that best represents how cards work in core. I still feel like hiding the name on the canvas is effectively pointless and better handled with piles with different permissions.

brunocalado commented 1 year ago

I understand. I already solve this with world script and piles. Thank you.