Is it possible to combine the statblock information with Dataview queries? #115
Replies: 4 comments 3 replies
-
I would be interested in the opposite as well - pulling information from Dataview frontmatter/tags into the statblock. I would like to be able to scale certain types creatures based on the party's level, and the only way I could think to do this (without manually editing every creature each time the party levels up) is to declare a "party level" in the statblock that could get that information from another page (via inline Dataview, probably), and could then be used throughout a custom statblock as a monster stat. |
Beta Was this translation helpful? Give feedback.
-
I would like to add support for answering these questions. I'm adding NPC's to a campaign, some of which have statblocks. I would like to set up a template Note which would allow me to create a copy, enter the NPC name as the Note title, and a query within the Fantasy Statblock would populate the 'creature: ' field with the Note title. This would automatically create the statblock with no further entry required. Alternatively, if the statblock could pull data from the page property, a 'name: ' property would accomplish this, as well. |
Beta Was this translation helpful? Give feedback.
-
I would love to support this implementation. I'm trying to create a modular template for statblocks that will pull the frontmatter from a particular page to setup the variables for the statblock. This way, if I edit the health of my character in the note properties, it will reflect across the entire page, including the statblock. Definitely a wonderful idea! |
Beta Was this translation helpful? Give feedback.
-
@Cjenkins1996 I realize your question is over a year old, but you can use the Statblocks API to do this in DataviewJS. The API is here: https://github.com/javalent/fantasy-statblocks/blob/main/src/api/api.ts and is available in Obsidian as @booge731 @Autumnnnova @wrightmat However, the monster property you get is a pointer to the monster object in your bestiary, so modifying it in your layout will modify it in your bestiary. But, that block will run each time the monster is rendered, so if you pull in a variable using Dataview's API, it will get set each time. |
Beta Was this translation helpful? Give feedback.
-
Hi all - fairly new to working with Dataview and the statblocks, I'm looking to see if there's a way to combine the powers of both. For example, if I wanted to get a subset of creatures from my bestiary and returning the CR, AC, and HP of those creatures in a query table. It seems like it might be an issue with how information is portrayed/displayed, as the statblock itself doesn't display properly for a custom beast when placed into YAML, and it seems like the SRD monsters can't be "expanded" to show all fields for Dataview. Any thoughts on how to go about this?
Beta Was this translation helpful? Give feedback.
All reactions