Skip to content

drawStr

Jason Godesky edited this page Jul 19, 2026 · 1 revision

drawStr is a wrapper around drawGuarded that returns any string.

Parameters

uuid: string

The UUID of the roll table you want to roll on (should begin with RollTable.).

fallback: string

The string to return if the drawn item does not contain a description or name (as requested).

field: 'name' | 'description'

Whether the value should be pulled from the result’s name or description.

Default: description

Examples

import { drawStr } from '@revolutionarygamesco/common-foundryvtt'

drawStr('RollTable.1111111111111111', 'a') // A description pulled from the table, or a
drawStr('RollTable.1111111111111111', 'a', 'name') // A name pulled from the table, or a

Clone this wiki locally