maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Feature]: Programmatically set Image Table for Tokens

Open marcfor opened this issue 2 years ago • 0 comments

Feature Request

I would like to be able to programmatically set the Image Table for tokens like I can set sight.

The Solution you'd like

I think the implementation of the following 4 functions would allow me to do everything I need:

getImageTable() Function

Returns the name of the image table of a token. When no image table is set, returns an empty string. Usage: getImageTable() getImageTable(id) getImageTable(id, mapname)

hasImageTable() Function

Returns 1 if the token has an image table. Otherwise returns 0. Usage: hasImageTable() hasImageTable(id) hasImageTable(id, mapname)

setHasImageTable() Function

Enables/disables image table for the token. If the argument is 0 (false) the image table will be disabled. If it is non-zero (true) the image table will be enabled Usage: setHasImageTable(state) setHasImageTable(state, id) setHasImageTable(state, id, mapname)

setImageTable() Function

Sets the name of the image table for the token. Usage: setImageTable(name) setImageTable(name, id) setImageTable(name, id, mapname)

Alternatives that you've considered.

No response

Additional Context

No response

marcfor avatar Sep 19 '22 14:09 marcfor