Let me take a crack at this:
quote:
- How do your add "+" in your reason to roll via code, i.e. memo ?
- What is the correct syntax to sum up various dice including fixed modifiers, e.g. 1d8+1d4+1
- Is there any way to make in code the "NPC Name:" for the dice roller via code ?
Question 1: Try something like:
[dice=1d20+2 memo="Rolling to hit with a longsword plus 2"]
Question 2: Not sure... let me dig on that. Don't see a way to do it as you suggest, so I'm just gonna play with it a bit...
Okay, so the dice roller apparently does not support summing of differently-sided dice directly. The way to go here would be to figure out the permutations and employ a table, or just break out your pocket abacus and do the arithmetic.
Take your example of 1d8 + 1d4+2. To compute the number of possible permutations, multiply the number of sides of each die involved. In this example, 8 X 4 would yield 32. That gives you the number of possible results.
{If more than two dice are involved this method still works: 3d6 would be 6 X 6 X 6 or 216 permutations. 1d8 + 2d4 + 1d6 would be 8 X 4 X 4 X 6, or 768 permutations.}
The values of these results would range from (2 to 12) + 2 or from 4 to 14.
So your table would look like:
d8 d4 Sum d32 equivalent
1 1 2 1
2 1 3 2
3 1 4 3
4 1 5 4
5 1 6 5
6 1 7 6
7 1 8 7
8 1 9 8
1 2 3 9
2 2 4 10
3 2 5 11
4 2 6 12
5 2 7 13
6 2 8 14
7 2 9 15
8 2 10 16
1 3 4 17
2 3 5 18
3 3 6 19
4 3 7 20
5 3 8 21
6 3 9 22
7 3 10 23
8 3 11 24
1 4 5 25
2 4 6 26
3 4 7 27
4 4 8 28
5 4 9 29
6 4 10 30
7 4 11 31
8 4 12 32
Now, just roll a d32 and consult the Sum column of this table, adding the 2 for the die modifier.
It would probably just be easier to accept the displayed results of a multi-typed roll, do the arithmetic by inspection, and use that for your result.
e.g., [dice=1d8,1d4+2 memo="add results together, please"]
might yield a result of, for example, 7 and 1. That 1 would modify to a 3, so add 7 and 3 together to get 10. (Note the dice roller shows the modified and unmodified values of all dice involved.)
Well, that was fun...
Question 3: To do what I think you're asking, you'll need the character ID number for the NPC or PC in question.
Example: [dice=d100 text="Roll Percentile Dice" rc=299435] [dice=d100 text="Roll Percentile Dice" rc=299435]
This would roll a percentile die as a character from one of my games (which game shall remain a mystery).
To find this magic number, view Character Details from within your game, and look at the URL displayed in your browser. There will be a number preceded by &ci in there. That number is the Character ID, and is unique across all of RPoL so far as I know.
If a GM is rolling on behalf of a character, replace the rc= option above with a bo= option followed by the character ID number.
Don't try to use bo= and rc= in the same roll - it won't work.
So it looks like the news is a mixed bag. Hey, two outta three ain't bad.
Annnnd it's off to bed for me. Gotta go to work tomorrow afternoon.
This message had punctuation tweaked by the user at 11:13, Thu 06 Dec 2018.