tbl multiroll - a shortcut to roll two tables together #49
Replies: 1 comment 9 replies
-
This multiroll is a wonderful addition! However, I think there's a bug in that it doesn't read the tables as marked in the table UI. Specifically, my tables are markdown, and with your previous guidance, it correctly reads the range first and output second in an entry such as
However, when I use multiroll, instead of returning just the result for each table such as "Enemy attacks", it is returning the full line such as "| 3 - 6 | Enemy attacks |" for all tables. I backtracked and tried the tbl roll tablename command, and it does the same thing. In other words, tbl roll and choosing the table via the UI works perfect but tbl roll tablename doesn't read the table configuration correctly. Separately, is there a way that the table configuration can be put in as frontmatter (YAML) rather than having to manually configure each individual table? Thank you for your continued work! This is awesome! |
Beta Was this translation helpful? Give feedback.
-
Here's a shortcut "tbl multiroll" that you can add to your vault to roll multiple tables, side-by-side. This is useful for producing texts like "flashy cat", "The hungry witch tavern", etc, where each word is pulled from a different table.
After the shortcut is a small shortcut demonstrating how you could wrap it for a specific set of tables.
NOTE: make sure you have the latest version of the library for this (there was a bug found and squashed).
__
__
__
tbl multiroll {use expansion format: y OR n} {table files: space-separated path texts} - Rolls one instance of each table in {table files}. If {use expansion format} is "y", prints the expansion using the standard expansion format.
__
__
__
plantanimal - A sample wrapper shortcut around "tbl multiroll". Rolls two tables to get a non-animal name followed by an animal name.
Beta Was this translation helpful? Give feedback.
All reactions