obsidian-dice-roller
obsidian-dice-roller copied to clipboard
Feature request: AND, OR, and NOT conditions for tag dice
I hope this is feasible! I was brainstorming about ways to use dice tables, and realized it would be fantastic if there was a way to use AND OR and NOT operators with tag dice!
I'd imagine it could work something like this:
dice: #tag1 AND #tag2 NOT #tag3|link
Which would return a link to a file that has tag 1 and 2, but not tag 3.
My specific use case was be to be able grab an npc in a specific location (dice: #dnd/npc AND #dnd/location/town
)
Using parenthesis might need to be required for more complicated use cases such as dice: (#tag1 OR tag2) AND #tag3 NOT #tag4|link
, but I'm not sure if anyone but me would even need something on that level 😅
Thanks again in advance!! If its not feasible I completely understand
This will be difficult, unfortunately, due to the way the tag rolling works. I'll think about a way to implement it.
This will be difficult, unfortunately, due to the way the tag rolling works. I'll think about a way to implement it.
That totally makes sense! I had a feeling it might not mesh well with the current implementation. Thank you for considering though!!
I just want to let you know that I just rewrote the backend lexical parser and will be working on this issue in the coming days.
Thank you!!! I'm real excited!!
ALSO I just realized, but maybe a fallback option would be nice for this too? In case the tag combination doesn't return anything. However this might need its own issue lmao