javalent / dice-roller Goto Github PK
View Code? Open in Web Editor NEWInline dice rolling for Obsidian.md
Inline dice rolling for Obsidian.md
Hi,
Even with both global persistResults on (and confirmed on in Console) and dice+:
I am not getting table entries saved between either Obsidian startups or re-opening of a file.
I tried table on the Drinks lookup both with and without the roll column.
However the plain dice+: 1d6
seems to save.
Am I doing something wrong here or is there a bug?
I tried traversing the code to see if I could dig out an issue but nothing I can see. I also moved the loading order of the plugin from bottom to top to see if that was the issue (as per a different issue, I thought it might trigger a bad file reload)
I have also tried to disable all plugins except dice-roller, with an Obsidian restart without luck. The issue persists. Which means it's likely not interference with another plugin.
Here is my plugin list regardless:
community-plugins.json:
[
"obsidian-dice-roller",
"table-editor-obsidian",
"dataview",
"initiative-tracker",
"nldates-obsidian",
"obsidian-outliner",
"sliding-panes-obsidian",
"templater-obsidian",
"obsidian-leaflet-plugin",
"obsidian-5e-statblocks",
"obsidian-admonition",
"fantasy-calendar",
"obsidian-metatable"
]
Reproduce:
Tavern Generator.md
and Tavern Template.md
as described belowExpected result:
Table rolls should be the same each time Tavern Template is opened
Actual result:
You should get different table rolls, but a persistent 1d6 dice roll in the bottom of Tavern template
Am I doing something wrong?
Tavern template.md
# Name
`dice+: [[Tavern generator#^verb]]` `dice: [[Tavern generator#^adjective]]` `dice: [[Tavern generator#^noun]]`
# Menu
## Snacks:
- `dice: [[Tavern generator#^side-dish]]`
- `dice: [[Tavern generator#^side-dish]]`
- `dice: [[Tavern generator#^side-dish]]`
## Mains:
`dice: [[Tavern generator#^cooking-method]]` `dice: [[Tavern generator#^main-ingredient]]` with `dice: [[Tavern generator#^with]]` and `dice: [[Tavern generator#^and]]`
`dice: [[Tavern generator#^cooking-method]]` `dice: [[Tavern generator#^main-ingredient]]` with `dice: [[Tavern generator#^with]]` and `dice: [[Tavern generator#^and]]`
`dice+: [[Tavern generator#^cooking-method]]` `dice+: [[Tavern generator#^main-ingredient]]` with `dice+: [[Tavern generator#^with]]` and `dice+: [[Tavern generator#^and]]`
## Drinks:
- `dice+: [[Tavern generator#^drinks]]`
- `dice+: [[Tavern generator#^drinks]]`
- `dice+: [[Tavern generator#^drinks]]`
- `dice+: [[Tavern generator#^drinks]]`
`dice+: 1d6`
Tavern generator.md
Moping
Drowning
Hanging
Belching
Running
Walking
Hunting
Fighting
Swinging
Breaking
Working
Fermenting
Flowering
Worrying
Following
Flowing
Complaining
Standing
Joking
Laughing
Panting
Boarding
Lounging
Cutting
Singing
Staring
Goading
Disappointing
Faltering
Binding
Winding
Sundering
Longing
Fumbling
Bumbling
Stumbling
Pining
Whining
Flying
Hoarding
Whoring
Warring
Winking
Skittering
Slithering
Snoring
Snorting
Playing
Practicing
Grappling
Burning
Flaming
Freezing
Poisoning
Burying
Throwing
Sparking
Steaming
Smiting
Chittering
Chattering
Mumbling
Grating
Plowing
Biting
Howling
Roaring
Shouting
Pouring
Squeaking
Stinging
Charging
Bleating
Stabbing
Goring
Poking
Swallowing
Sucking
Drinking
Sneaking
Hiding
Slashing
Limping
Tripping
Shifting
Sliding
Blinding
Piercing
Bludgeoning
Crushing
Hopping
Thundering
Hushing
Crying
Wailing
Mourning
Darkening
Piling
Digging
Flinging
^verb
# Adjective
Wayward
Quiet
Jolly
Good
Crooked
White
Gray
Blackened
Harried
Crimson
Silver
Golden
Disturbed
Filthy
Ugly
Bastard
Faltering
Glorious
Beautiful
Handsome
Wrinkled
Unhappy
Intelligent
Lovely
Ignorant
Senile
Sour
Sweet
Lonely
Green
Blind
Hungry
Worried
Educated
Stupid
Emboldened
Honorary
Stinky
Bottomless
Greasy
Sloppy
Stylish
Distressed
Harrowed
Tormented
Mortified
Lopsided
Broken
Moldy
Gooey
Fermented
Blighted
Ornate
Drowned
Murdered
Widowed
Hanged
Angry
Lusty
Haunted
Strong
Withered
Comely
Pious
Penitent
Patient
Drunk
Worthy
Wealthy
Loathsome
Weak
Miniscule
Miniature
Enormous
Enlarged
Engorged
Lecherous
Despicable
Lewd
Portly
Violent
Bumbling
Faulty
Pristine
Cleanly
Cracked
Splintered
Jeweled
Superior
Flawless
Common
Exquisite
Elegant
Fine
Dull
Brittle
Fragile
Effeminate
Masculine
Supine
^adjective
# Noun
Warhorse
Horseman
Maiden
Mage
Bachelor
King
Magistrate
Warchief
Warrior
Mare
Wolf
Fox
Lion
Lamb
Warden
Mule
Assassin
Swordsman
Lady
Knight
Soldier
Wizard
Warlock
Ranger
Bard
Druid
Monk
Paladin
Sorcerer
Rogue
Cleric
Bear
Goblin
Kobold
Gnome
Halfling
Dwarf
Fool
Virgin
Horde
Squire
Eagle
Rooster
Piglet
Thief
Priest
Friar
Blacksmith
Guard
Stag
Hag
Devil
Angel
Serpent
Snake
Rat
Mouse
Bandit
Chieftain
Griffon
Dragon
Lizard
Pony
Baron
Heifer
Bull
Hound
Goat
Toad
Stallion
Monster
Vermin
Beholder
Monkey
Elephant
Boar
Beagle
Bat
Demon
Imp
Sprite
Fey
Spirit
Bitch
Starling
Minotaur
Barbarian
Prophet
Merchant
Cobbler
Unicorn
Ogre
Nymph
Butcher
Captain
Angler
Lover
Mason
Tinker
Whale
Warhorse
Horseman
Maiden
Mage
Bachelor
King
Magistrate
Warchief
Warrior
Mare
Wolf
Fox
Lion
Lamb
Warden
Mule
Assassin
Swordsman
Lady
Knight
Soldier
Wizard
Warlock
Ranger
Bard
Druid
Monk
Paladin
Sorcerer
Rogue
Cleric
Bear
Goblin
Kobold
Gnome
Halfling
Dwarf
Fool
Virgin
Horde
Squire
Eagle
Rooster
Piglet
Thief
Priest
Friar
Blacksmith
Guard
Stag
Hag
Devil
Angel
Serpent
Snake
Rat
Mouse
Bandit
Chieftain
Griffon
Dragon
Lizard
Pony
Baron
Heifer
Bull
Hound
Goat
Toad
Stallion
Monster
Vermin
Beholder
Monkey
Elephant
Boar
Beagle
Bat
Demon
Imp
Sprite
Fey
Spirit
Bitch
Starling
Minotaur
Barbarian
Prophet
Merchant
Cobbler
Unicorn
Ogre
Nymph
Butcher
Captain
Angler
Lover
Mason
Tinker
Whale
^noun
# Dinner
Random Dinner at a Country Inn
### Cooking Method
Stewed
Roasted
Fried
Boiled
Baked
Grilled
Seared
Steamed
Salted
Pickled
^cooking-method
### Main ingredient
Rabbit
Chicken
Duck
Mutton
Pork
Beef
Pheasant
Goose
Trout
Clams
Pork sausage
Duck sausage
^main-ingredient
### With
Dumplings
Red cabbage
White cabbage
Shredded cabbage
Leeks
Lentils
Broccoli
Peas
Cauliflower
Kidney beans
String beans
White beans
Turnip mash
Sliced turnips
Asparagus
Sprouts
Sweet peppers
Red potatoes
Golden potatoes
Yams
^with
### And
Carrots
Apples
Cherries
Tomatoes
Blueberries
Strawberries
Beets
Mushrooms
Radishes
Squash
Sweet onions
Red onions
^and
### Side dish
Corn bread
Corn mash
Fresh bread
Crusty bread
Sesame bread
Oat bread
Pumpernickel bread
Pretzel bread
Fried egg
Bacon
Sharp cheese
Soft cheese
^side-dish
### Drinks
| Roll | Water. |
| ---- | ---------- |
| 1 | Water |
| 2 | Wheat ale |
| 3 | Porter |
| 4 | Mead |
| 5 | White wine |
| 6 | Red wine |
| 7 | Sweet wine |
| 8 | Milk |
| 9 | Coffee |
| 10 | Brandy |
^drinks
This was actually a bug with the copy button placement. There should be one button per block. Do you need a button to copy all of them?
Originally posted by @valentine195 in #13 (comment)
Sorry for the slow response, yes a copy-all button would be appreciated
[feature requst] post the result into a other file and read values from there
stats file.md
value1 = 6
value2= 3
content.md
your value1 is 6 ... press dice
your value2 is 3 ... press dice
(reload page or other page)
content2.md
now your value1 is 2
and your value2 is 4
the idea is to use the stats file as a player profile where he can have items with value
and then write a story where he can see the item(s) and the value and where he can dice a new value to his stats file
and so load a new link or transclude a new story part
so in that way he gets a playable dynamic story saved in his stats file
some how
i hope you get the picture i dont know if it is possible but it would be awesome
thanks any way
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
Thanks for this marvelous and powerful plugin! I have a small FR and I don't know if it's reasonable.
When using Dice Roller to return headings, I would like to specify the heading level. For example, I use H2 to group different classes of questions, and use H3 to present questions. When I want to get some random questions, I want the returned headings to be H3 rather than H2 or H1.
Hi Jeremy,
I am using the Fantasy AGE system, which basically uses 3d6 for skill rolls. Additionally it has the concept of a "Stunt Die":
If you roll doubles, it is called a Stunt. This generates 1-6 stunt points, the amount depending on one of the three thrown dice, the "Stunt Die". The Stunt Die is a fixed one (usually marked by choosing a die with a different color).
Would it be possible to support this behaviour (detecting a Stunt and showing the number of stunt points) in Dice Roller?
Thanks,
Matthias
Allow all roll results to be saved to a selectable file in the settings for easier reference later when rolled from the dice roller view.
It would be great to be able to do "math" on table and lookup rolls:
dice: [[Dwarf Names#^DwarfMaleNames]] + [[Dwarf Names#^DwarfFamilyNames]]
would output Dragmar Silverhammer
or whatever with one click rather than on two separate rolls.
EDIT: Thinking more about this it might make sense to not use math for this to not confuse between actual math and concatenation. Something like
dice: [[Dwarf Names#^DwarfMaleNames]] [[Dwarf Names#^DwarfFamilyNames]]
would work too.
Hello! I was messing around with the dice roller and experimented with using a zero width character between two dice to seamlessly combine them (since putting them literally next to each other causes neither of them to work) and it works, however the dice icon from the first dice gets in the way.
Example:
While disabling it globally would be good, also being able to add an option to use on a dice-by-dice basis (maybe |nodice
similar to |link
?)
I'm sorry for all these feature requests! I have one final one that's slightly related but I'll make a separate issue for it ^^
It would be great if Table Dice could be extended to support D&D-style lookup tables.
If the Table a formula refers to has 2 columns, and the header of the first column is a formula itself, then roll that formula, find the first row that matches the result (either a range like 16-20
or comma-separated 1,8,16
), and return the second cell of the row.
If the result is a dice formula as well, roll that too, which would easily allow some pretty complex random generators.
Example:
| dice:1d20 | Terrain Element |
| ----------- | ------------------------ |
| 1โ3 | dice: [[Note^encounter]] |
| 4โ6 | feature |
| 7โ10 | hunting-ground |
| 11,12 | resource |
| 13,14 | secret |
| 15โ20 | standard |
^terrain-element
| dice:1d% | Result |
| -------- | ------- |
| 01โ50 | Nothing |
| 51โ60 | Hazard |
| 61โ100 | Monster |
^encounter
Hello! I was making some more dice tables and noticed that dice tags don't work if they're placed in dice tables. This is my table for reference!
| dice: 1d4 | Connections |
| --------- | --------------------------------------------------- |
| 1 | They are associated with `dice: #dnd/factions|link` |
| 2 | They're from `dice: #dnd/pc|link`'s past |
| 3 | They know `dice: #dnd/pc|link` |
| 4 | They know `dice: #dnd/npc|link` |
Many many thanks in advance!!
ie. define 'easy' as '1d6 + 10' and then use as 'dice: easy'
If you want to combine dataview api with dice roller, the new feature could be stronger that because I have many notes tagged the same tag, and they are in same topic.
I think it will be nice to have a dice: 1d#tag
or dice: 1d|Keyword
, which will be fantastic for me.
For many rolls it's useful to have the dice graphics displayed, but for some generators drawing from lists, I'd like to have it turned off. It would be great to be able to specify that argument inline. Something like this:
dice: [[note^list]]Item display: none;
This formula dice: 2d6-1
only gets calculated once and it's always calculated as -1
, and clicking on it doesn't re-roll.
E.g. dice: 2d6-1
gives me 2d6 -1 -> [4, 3] -1 -> -1
Formula without the -1
works.
Tested on 6.0.1
Hey. Would it be possible to render the dice rolls directly in edit mode, without having to switch to preview mode and back again? I am using the
`dice-mod: 3d100 + 12`
syntax
Current version 7.13.2 but the behavior was also observed while using 7.13.1
Dice currently fade based on a fixed time. It would be nice to allow this fading to happen based on a time setting, OR allow them to stick around until one of the dice is clicked to hide it.
Give people time to see the results.
I have a note containing separated lines and am using dice: 3d[[What to do today]]
which correctly displays a random selection of 3 lines. Hitting the copy button only copies the first of the three lines.
I can't select the text manually either, once you let go of the mouse button the list refreshes
As of 7.8.3, it looks like any dice rolls with parenthesis have stopped working.
Dice usage such as: dice: 1 + (overall_level - 3)d5
used to produce:
...it now unfortunately doesn't render anything, and opening any note with expressions like these produce the error message:
There was an error parsing the dice string: dice: 1 + (overall_level - 3)d5
Error: Mismatched Parentheses
I've tried rearranging the parentheses in every-which-way, but on both my phone and computer, they return the same error message.
This might just be some sillyness on my part, but both the brackets are the same.
Sorry for the trouble haha,,
Hey there,
first of all thank you for this great plugin!
I tried using rolls on one column tables via dice+: [[note#^table]]
. Global saves off. So far so good.
It seems on closing obsidian or the note with the roll result, the results are not permanent. Neither they are when I jump in edit mode and change something (keystroke) in the same paragraph.
Is there anything I could have done wrong or to fix that? Maybe a bug?
Many thanks in advance!
I would like to easily re-roll the same formulas again and again (for ex, an attack +3 on a d20 roll). It would be good to either
Hi there,
thanks for this plugin, I started to integrate it into my Fantasy AGE campaign, managed via Obsidian. For GM-ing am currently switching from my MacBook to my iPad Pro (Obsidian Mobile Beta). When trying to enable it on Obsidian Mobile I get the message that the plugin does not support Mobile. Would it be possible to enable that?
Thanks,
Matthias
I'm thinking of a concept like this.
Maybe a block like dice-text:
that directly saves the result that replaces the block itself with plain text of the results.
I'll use 1d100
as example:
User inputs dice-text: 1d100
.
When going back to preview, this could shown as something like this:
[1d100 - Click to roll!]
And when clicked, let's say I got a 58, then it becomes:
1d100 โ [58] โ 58
And this exact text is saved inside the markdown file, overwriting the dice-text
block. (Going back to the editing mode shows the same result text too)
I'm thinking like this could be really useful if dice rolls need to be recorded. (COCTRPG gamr recordings, etc.)
Although this won't prevent the user manually modifying the dice, this way however completely eliminated the probability of losing the original dice result, and allowed results to be safely saved.
Also, thank you for this wonderful plugin!
There are some (not all) dice rolls that just don't seem to work. I have updated the dice roller and your files to the latest and restarted OBS. There are errors in the console. Depending on which roll didn't work. Based on the NPC Random tables of Wych/Witch.
app.js:1 Uncaught TypeError: Cannot read property 'filter' of undefined
at updateEditorLinks (eval at <anonymous> (app.js:1), <anonymous>:661:30)
at eval (eval at <anonymous> (app.js:1), <anonymous>:2041:21)
at t.e.tryTrigger (app.js:1)
at t.e.trigger (app.js:1)
at t.trigger (app.js:1)
at t.activeLeafEvents (app.js:1)
at a (app.js:1)
updateEditorLinks @ linkAttributes.ts:112
eval @ main.ts:58
e.tryTrigger @ app.js:1
e.trigger @ app.js:1
t.trigger @ app.js:1
t.activeLeafEvents @ app.js:1
a @ app.js:1
setTimeout (async)
e.tryTrigger @ app.js:1
e.trigger @ app.js:1
t.trigger @ app.js:1
t.activeLeafEvents @ app.js:1
a @ app.js:1
setTimeout (async)
l @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
s @ app.js:1
Promise.then (async)
l @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.loadFile @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.setState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.setState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.setViewState @ app.js:1
eval @ VM111:74
o @ VM111:23
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.openFile @ app.js:1
t.onFileClick @ app.js:1
s @ app.js:1
Show 21 more frames
2VM182:2 Uncaught (in promise) Error: Could not load file.
at Kt.eval (eval at <anonymous> (app.js:1), <anonymous>:2:100728)
at Generator.next (<anonymous>)
at eval (eval at <anonymous> (app.js:1), <anonymous>:2:69931)
at new Promise (<anonymous>)
at t (eval at <anonymous> (app.js:1), <anonymous>:2:69676)
at Kt.getFile (eval at <anonymous> (app.js:1), <anonymous>:2:100558)
at new Gt (eval at <anonymous> (app.js:1), <anonymous>:2:100531)
at new Kt (eval at <anonymous> (app.js:1), <anonymous>:2:121455)
at Yf.getRoller (eval at <anonymous> (app.js:1), <anonymous>:2:799317)
at Yf.eval (eval at <anonymous> (app.js:1), <anonymous>:2:795586)
eval @ VM182:2
eval @ VM182:2
t @ VM182:2
getFile @ VM182:2
Gt @ VM182:2
Kt @ VM182:2
getRoller @ VM182:2
eval @ VM182:2
eval @ VM182:2
t @ VM182:2
eval @ VM182:2
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.renderMarkdown @ app.js:1
eval @ VM182:2
eval @ VM182:2
t @ VM182:2
build @ VM182:2
eval @ VM182:2
eval @ VM182:2
t @ VM182:2
render @ VM182:2
eval @ VM182:2
a @ VM182:2
Promise.then (async)
l @ VM182:2
eval @ VM182:2
t @ VM182:2
eval @ VM182:2
eval @ VM182:2
eval @ VM182:2
t @ VM182:2
roll @ VM182:2
eval @ VM182:2
checkCallback @ VM182:2
yL @ app.js:1
e.executeCommandById @ app.js:1
eval @ VM111:74
o @ VM111:23
command @ buttonTypes.ts:183
clickHandler @ button.ts:74
async function (async)
clickHandler @ button.ts:59
eval @ button.ts:47
s @ app.js:1
VM182:2 Uncaught (in promise) Error: Could not read file cache. Does the block reference exist?
Misc Dice Tables > artif18ts
at Kt.eval (eval at <anonymous> (app.js:1), <anonymous>:2:123196)
at Generator.next (<anonymous>)
at eval (eval at <anonymous> (app.js:1), <anonymous>:2:69931)
at new Promise (<anonymous>)
at t (eval at <anonymous> (app.js:1), <anonymous>:2:69676)
at Kt.getOptions (eval at <anonymous> (app.js:1), <anonymous>:2:123020)
at Kt.eval (eval at <anonymous> (app.js:1), <anonymous>:2:122976)
at Generator.next (<anonymous>)
at eval (eval at <anonymous> (app.js:1), <anonymous>:2:69931)
at new Promise (<anonymous>)
Hello! Slightly related to #54, but when using zero width characters in a table to combine two other dice, it shows up as raw text.
Example:
In the table itself it's displayed like in #54
Thanks in advance!! If this isn't feasible due to some html-parser I completely understand ๐
I promise I'll stop blowing this up with my feature requests;;
does not work in a table
| Examples | |
| ----------------------------------------- | ----------------------------------- |
| `` `dice: 1d2` `` | `dice: 1d2` |
| `` `dice: 3d4 + 3` `` | `dice: 3d4 + 3` |
| `` `dice: 1d12 + 1d10 + 5` `` | `dice: 1d12 + 1d10 + 5` |
| `` `dice: 3d4+3d4-(3d4 * 1d4) - 2^1d7` `` | `dice: 3d4+3d4-(3d4 * 1d4) - 2^1d7` |
Hi,
I found two issues with rolling on tables. I have 7 tables on one page, the first table having 6 rows with inline dice rolls that roll for the 6 other tables. These inline rolls sometimes give the table separator row ( |---|---| ) as a result, sometimes the header row and sometimes even part of the block name link header thing (it shows"^very-" when the text on that line is "^very-common-plants". This can't consistently be reproduced however, it just sometimes... happens a few times.
Secondly, those 6 tables all have links to other pages in them. The result of the roll displays the link, but if there's spaces behind the linked text ("[[Other Note ]]"), the link in the roll result doesn't refer to the correct page and makes a new note. The original link being referred to, the one in the table, works fine however.
Hello! I've been experimenting with this plugin and it's been amazing! However I've run into an issue where if I have multiple look up tables within the same element, the roller will instead refuse to roll that, rolling any other values instead.
I tried to recreate it using a minimum test case, but I'm encountering a weird error?? where it outright refuses to display the lookup table and instead displaying the raw text.
If it matters I am also using the Advanced Tables plugin, but even when disabling it it doesn't seem to work.
Here's the original page I was using, and the issue being repeatable here:
| dice:1d% | Races |
|:--------:|:-------------------------------:|
| 1-63 | `dice: [[Race Generator#^common]]` |
| 64-88 | `dice: [[Race Generator#^uncommon]]` |
| 88-100 | `dice:[[Race Generator#^rare]]` |
^main
| dice:1d7 | Common Races |
|:--------:|:----------------------------------------------------------------------------:|
| 1 | Plainsfolk |
| 2 | Rabbitfolk |
| 3 | Halfling |
| 4 | Dwarf |
| 5 | Orc |
| 6 | Elf |
| 7 | Half `dice: [[Race Generator#^half-gen]]` and half `dice:[[Race Generator#^main-alt]]` |
^common
| dice:1d6 | Uncommon Races |
|:--------:|:------------------------------------:|
| 1 | Dragonborn |
| 2 | Tiefling |
| 3 | Minotaur (Yak) |
| 4 | Loxodon (Mammoth) |
| 5 | Goblin |
| 6 | `dice: [[Race Generator#^kobold]]` Kobold |
^uncommon
| dice: 1d5 | Rare Races |
|:---------:|:-----------------:|
| 1 | Tabaxi |
| 2 | Ijsbeer |
| 3 | Mousefolk/Ratfolk |
| 4 | Kenku |
| 5 | Tortle |
^rare
| dice: 1d4 | Very Rare Races |
|:---------:|:---------------:|
| 1 | Dragon |
| 2 | Coeurl |
| 3 | Faerie |
| 4 | Asamir (reroll) |
^very-rare
| dice: 1d% | Kobold Subrace |
| -------- | -------------- |
| 1-50 | Northern |
| 51-100 | Southern |
^kobold
| dice: 1d% | Half |
| --------- | --------------------------------- |
| 1-70 | Plainsfolk |
| 71-100 | `dice: [[Race Generator#^main-alt]]` |
^half-gen
| dice:1d% | Races No Half |
|:--------:|:------------------------------------:|
| 1-63 | `dice: [[Race Generator#^common-alt]]` |
| 64-88 | `dice: [[Race Generator#^uncommon]]` |
| 88-100 | `dice:[[Race Generator#^rare]]` |
^main-alt
| dice:1d6 | Common Races No Half |
|:--------:|:--------------------:|
| 1 | Elf |
| 2 | Rabbitfolk |
| 3 | Halfling |
| 4 | Dwarf |
| 5 | Orc |
| 6 | Plainsfolk |
^common-alt
`dice: [[Race Generator#^main]]`
| dice: 1d4 | Test Table |
|:---------:|:-------------------------------------------------------------------------------:|
| 1 | Plainsfolk |
| 2 | `dice: [[Race Generator#^main-alt]]` and `dice: [[Race Generator#^common-alt]]` |
| 3 | `dice: [[Race Generator#^main-alt]]` and `dice: [[Race Generator#^common-alt]]` |
| 4 | Other |
^test
| dice: 1d4 | Test2 Table |
|:---------:|:-----------------------------------------:|
| 1 | Plainsfolk |
| 2 | `dice: [[Race Generator#^kobold]]` Kobold |
| 3 | `dice: [[Race Generator#^kobold]]` Kobold |
| 4 | Other |
^test2
`dice: [[Race Generator#^test]]]`
`dice: [[Race Generator#^test2]]`
And here's the test file
| 1d3 | test table 1 |
| --- | ------------ |
| 1 | one |
| 2 | two |
| 3 | three |
^test1
| 1d3 | test table 2 |
| --- | ------------ |
| 1 | one |
| 2 | two |
| 3 | three |
^test2
| 1d3 | test table 3 |
| --- | -------------------------------------------------------------------------- |
| 1 | one |
| 2 | `dice: [[This File#^test1]]` |
| 3 | table 1: `dice: [[This File#^test1]]` table 2: `dice: [[This File#^test2]]` |
^test3
`dice: [[This File#^test3]]`
This is what the test file displays when it rolls one of the lookup tables (related to this issue?):
I've tried both ITS theme and default.
Maybe my formatting is wrong? It looks correct to me
Thanks in advance!!
Allow selecting a specific note as the Dice Roller View Source. The field references used in the dice roller could pull from that note. (Ideally this selection would be in the dice roller to allow for on the fly transition to a new note source.)
Again, sorry for disturbing!
Even though the global save setting is enabled (which functions correctly when navigating between notes), if any line with a dice roller insert is edited in any way, all dice are re-rolled. This causes re-rolls on todo item toggles, as well as re-rolls if a paragraph of text is edited that contains an insert.
In World of Darkness you roll d10s, and it has a target number. For every die that hits the target number or above, you get a success. 1s can subtract successes and 10s (or sometimes 9s or 8s) can grant an additional die to roll. These modifiers would be great features for the dice roller! :)
When playing some systems you need individual values for multiple dice at the same time. (Ironsworn for example)
There you might want to have a roll like:
dice: Face Danger 1d6+3 vs 1d10, 1d10
This should result in something like:
Face Danger 7 vs 10, 8
AKA the end user would like to be able to copy the result as a unit and only click the roll button once. (This also allows for setting up single roll attacks in things like 5e.
dice: Battle Axe: 1d20+5 Damage: 1d8+3
Could return with dice details
Battle Axe: 17 [12] Damage: 8 [5]
For extra bonus it could even respect new lines & Spaces.
Battle Axe: 17 [12]
Damage: 8 [5]
I was wondering why this feature is not implemented for tables and the like. This would be very handy and more reliable/futureproof than the current saving to plugin data.
Would it be possible for us to have the option to enable a secondary tab either within or in addition to the Dice Roller view, which would allow us to save our favorite table rolls for quick access? For example, it would be great to have immediate access to my NPC name, random encounter, or treasure rolls right in that side pane, no matter what particular note I might have open at the moment. It would be amazing to have those sort of rolls at my fingertips whenever my players decide to talk to a random passerby or guard, or end up looting a random house.
Otherwise I love all the work you are doing! Thank you!
Hello! I'm back with a small feature request. As I'm building various generators with this plugin, I found that it would be Extremely convenient to have a command to re-roll all the dice on a page instead of clicking each individual dice or clicking off the page and back on. Then it can be combined with the buttons plugin (or even just as a hotkey!)
Thank you so much for all the work you've been doing ;u;
I'm using dice-mod with |noform to fill out a randomized paragraph description of NPCs. Would it be possible to not have the result in bold when using dice-mod with |noform so everything rolled looks standardized inline?
Could it be possible to add dataview numbers to the dice formulas?
Example.
I declare a value using the DataView syntax in the file.
some_nr:: 10
and then I use it in various dice formulas in the page
`dice: 2d6 + some_nr`
`dice: d20 - some_nr`
etc.
If this is implementable, I could also have a look and submit a PR
It would be nice to have a button to clear all the rolled results at once, than have to click them individually
It would be nice to be able to see the source of the result inline, instead of having to hover over the result.
A lot of times when I and my friends play COC we usually just omit the number when only roll dices once (and our software supports that too)
For example:
1d100
would just be d100
and
d100+d10
would be equivalent to 1d100+1d10
.
Another less used thing is that, sometimes we also omit the dice faces if it is an 100 faces die.
For example:
2d
is equal to 2d100
and
in extreme (yet really common) cases
when we just type in d
it works as 1d100
.
That is currently not possible here. Um, may I ask support for that?
(Or even better, let us customize the default values?)
If you click the "Roll" button without putting anything in the input box, the button will then grey out and become completely disabled, until you disable/reenable the plugin or restart Obsidian.
Also small feature request: Copy the full formula too when clicking the copy button if "Display Formula With Results" option is on? :P
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.