Fetch

FILE LOCATION: My Personal Repo or the 1-click installer

META SCRIPT: This script is a meta-script, and part of the ZeroFrame Meta Toolbox. It can be used on its own, or in conjunction with ZeroFrame and the other meta-toolbox scripts, to modify other scripts' API commands.

ABSTRACT: Fetch provides a standardized way to retrieve sheet or token items, including token items not previously exposed to the chat interface (like the current side of a multi-sided token), and repeating elements. In addition, Fetch improves on the standard Roll20 sheet retrieval syntax by allowing you to specify a default value if the item does not exist (instead of erroring to chat).

PREVIOUS THREAD(S):

Thread 1

Version 1.0.9 Released

October 5, 2021


ADDED: New token and character retrieval keywords


Update Notes

New Keywords

The following keywords were added as returnable items from a TOKEN:

NEW PROPERTYEXAMPLEREFERENCES

imgsrc_short

@(selected.imgsrc_short)The token's source image, leaving off everything after the '?', returning just the workable image URL.
tooltip@(selected.tooltip)Returns the token's tooltip text.
show_tooltip@(selected.show_tooltip)

Returns the toggle status for whether the tooltip should be shown. NOTE: currently the status of this property is not accurately reported to the API when a change is made in the UI. This is a bug that Roll20 will have to address.

The following keywords were added as returnable items from a CHARACTER:

NEW PROPERTYEXAMPLEREFERENCES
inplayerjournals_name@(selected.inplayerjournals_name)Returns the names for the players listed in the "In Players Journals" property
inplayerjournals_names@(Bob the Hirsute.inplayerjournals_names)Same

Again, the show_tooltip property of a token does not currently report accurately in the Roll20 API. If a user updates the toggle from off (false) to on (true), the API will still see it as off (false). This is a bug that the Roll20 devs will have to address.