Skip to content

[FEATURE] Assign random token image #218

@bularzik

Description

@bularzik

As a new feature, I would like the ability for Token Mold to randomly select and apply a token image from a library of token images. This would make NPCs in town scenes be visually distinctive, without the work of having to manually select and apply the token image for each NPC.

To illustrate how this might work, consider the module "too-many-tokens-dnd" which puts a library of images in the directory [User Data]/modules/too-many-tokens-dnd. Under that directory, there's a directory per creature type, which matches the original token name for the creature's token prototype. Inside each directory is a set of webp files that each start with the creature name. So, for example, under the directory /modules/too-many-tokens/Commoner, you'd find files like CommonerDragonbornArctic (1).webp, CommonerTieflingFemaleTavern (3).webp, etc.

The request is that when Token Mold is molding a token, it looks to see if it can detect a set of token images for that token by using the prototype token name to build a search path on the Foundry server, and if it finds matches randomly pick one and update the token to use it. If no token images can be found, Token Mold should just skip this step.

From a configuration perspective, Token Mold should be able to enable/disable this feature, and set the filepath pattern where the token image library is. Alternately, it could detect whether one of the known token image modules is installed (such as too-many-tokens) and use that basepath and token naming syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions