Skip to content

There should be a way to "fully" render a token (bars, states, etc) in frames and dialogs #2328

@kwvanderlinde

Description

@kwvanderlinde

Is your feature request related to a problem? Please describe.
It seems there are only two places where tokens can be rendered with their state and bars: on the map and in the initiative window. There is no way to render the token with its state inside of a custom frame, at least not with fidelity to the state configuration.

Describe the solution you'd like
There could be a new token function that returns an asset URL to the composite token image. Using it would be as simple as:

<img src='[r: getCompositeTokenImage(50, "token id")]'>

Describe alternatives you've considered
An alternative would be to add more state and bar functions until the desired functionality can be replicated. This would require more work when writing the HTML. On the other hand, a composite image wouldn't need to actually exist, and these more granular functions could be useful in their right. I think we would basically need these for it to work:

  • Functions to get the images, sizes and positions of all of a token's bars.
  • Functions to get the sizes and positions of all of a token's states (we can already get the state images).

Additional context
This is an example of what I'm talking about in terms of a "composite" image used on the map and in the initiative window:
image
image
Contrast this with the bare token image:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureAdding functionality that adds value

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions