xaukael / card-tokens

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

Add default values for Card Token dimensions (grid spaces) #2

Open Vesselchuck opened 1 year ago

Vesselchuck commented 1 year ago

The title speaks for itself, but let me elaborate a little more on what I mean.

Now, when you put a card on the scene, it takes up exactly one grid square. So, if the grid size is 100 pixels, then we get too small a card token, and you have to manually set the dimensions in height and width in the token settings. image image

Another option is to set a larger value of the grid. For this example, the grid size is 500 pixels. This option might be easier in some ways, but here's what happens when you want to change the face of the card or accidentally click RMB on it. image image

xaukael commented 1 year ago

The token dimensions are inherited from the height and width properties of the card. I did this because I cannot know the dimensions of the cards being used and there could be cards in different decks with different sizes and orientations. I recommend writing a script to update all the cards in the deck to the desired dimensions.

Vesselchuck commented 1 year ago

I do not know JavaScript at all and unfortunately do not have the ability to write such a script. It turns out that it is literally impossible to do it manually otherwise than by the methods I listed?

Vesselchuck commented 1 year ago

Oh, I think I know what your last message was about. And there's a serious problem with that, because by default in the Pathfinder Second Edition system Dimensions (Grid Spaces) of any token is locked for editing, and you need to unlock it, otherwise no changes will work. Here's an example: image

Is it possible to automatically unlock token Dimensions (Grid Spaces) when a card is placed on the table?

xaukael commented 1 year ago

I had never even heard about those fields being locked. PF2e does lots of custom stuff that is hard to account for and future proof. I will take a look, but I would like to keep the module as system agnostic as possible.

As for the script, you can go to the macro-polo channel in the Foundry discord for assistance with that. https://discord.gg/foundryvtt