TtrpgTemplateExtension
Qute template extensions for TTRPG data.
Use these functions to help render TTRPG data in Qute templates.
Attributes
PermalinkasBonus, capitalized, capitalizedList, first, join, joinConjunct, jsonString, lowercase, pluralizeLabel, prefixSpace, quotedEscaped, size, skipFirst, uppercaseFirst
asBonus
PermalinkReturn the value formatted with a bonus with a +/- prefix.
Usage: {perception.asBonus}
capitalized
PermalinkReturn a Title Case form of this string, capitalizing the first word. Does not transform the contents of parenthesis (like markdown URLs).
Usage: {resource.languages.capitalized}
capitalizedList
PermalinkReturn a capitalized form of this string, capitalizing the first word of each clause. Clauses are separated by commas or semicolons. Ignores conjunctions and parenthetical content.
Usage: {resource.languages.capitalizedList}
first
PermalinkFirst element in list
Usage: {resource.components.first}
join
PermalinkReturn the given collection converted into a string and joined using the specified joiner.
Usage: {resource.components.join(", ")}
joinConjunct
PermalinkReturn the given list joined into a single string, using a different delimiter for the last element.
Usage: {resource.components.joinConjunct(", ", " or ")}
jsonString
PermalinkReturn the object as a JSON string
Usage: {resource.components.getJsonString(resource)}
lowercase
PermalinkReturn the lowercase form of this string. Does not transform the contents of parenthesis (like markdown URLs).
Usage: {resource.name.lowercase}
pluralizeLabel
PermalinkReturn the string pluralized based on the size of the collection.
Usage: {resource.name.pluralized(resource.components)}
prefixSpace
PermalinkReturn the given object as a string, with a space prepended if it's non-empty and non-null.
Usage: {resource.name.prefixSpace}
quotedEscaped
PermalinkEscape double quotes in a string (YAML/properties safe)
Usage: {resource.components.quotedEscaped}
size
PermalinkReturn the size of a list
Usage: {resource.components.size()}
skipFirst
PermalinkSkip first element in list
Usage: {resource.components.skipFirst}
uppercaseFirst
PermalinkReturn the text with a capitalized first letter (ignoring punctuation like '[')
Usage: {resource.name.uppercaseFirst}