Page 2 of 3

Re: Dice test thread

Posted: Mon Jun 21, 2021 11:34 am
by CDragos
Can you just copy Paizo's dice roller code? In your example above, you can't put words or spaces in between the dice expression.

It would need to be something like this:

[i]I attack the darkness! & Holy[/i]: =[tooltip=[ ]] 0 [/tooltip] [b][/b] + =[tooltip=[ ]] 0 [/tooltip] [b][/b]
[i]slashing damage & fire[/i]: =[tooltip=[ ]] 0 [/tooltip] [b][/b] + =[tooltip=[ ]] 0 [/tooltip] [b][/b]

Re: Dice test thread

Posted: Mon Jun 21, 2021 11:38 am
by CDragos
Woah! What the hell happened there? Can you make it so we can edit our posts in here?
I guess i should have added those code expressions in brackets.

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:20 pm
by slate
The roller prevents editing the post, cause I have no way to prevent the rolls from being changed. It's really weird, things seem to work fine when I test them, but then stop working later. Let me continue to work on it and see what I can find.
Can you just copy Paizo's dice roller code?
Nope, their code isn't public, so I have no idea how they do it.
In your example above, you can't put words or spaces in between the dice expression.
Not sure what you mean. You're definitely supposed to be able to put spaces between expressions. It's looking for patterns like

Code: Select all

#d# (words) 
then using the + sign as a splitter to separate different types of things. So in the case of something like

Code: Select all

1d8 fire + 1d6 slashing
it is saying ok, I got two expressions, "1d8 fire" and "1d6 slashing", then it gets X random numbers between 1 and the # after d, where X is the number before the d.

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:23 pm
by slate
Can you copy and paste this into a new reply:

[dice=I attack the darkness!]1d6 slashing + 2d8 holy + 2d6 persistent fire[/dice]
[dice=I attack the light!]1d8 bludgeon + 2d8 acid+ 2d6 persistent bleed[/dice]

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:28 pm
by CDragos
Oh. I meant on Paizo you can't put words & spaces in between dice expressions. I discovered later that your roller works that way.

I attack the darkness!: 1d6=[tooltip=[ 3 ]] 3 [/tooltip] [b]slashing[/b] + 2d8=[tooltip=[ 3 6 ]] 9 [/tooltip] [b]holy[/b] + 2d6=[tooltip=[ 4 3 ]] 7 [/tooltip] [b]persistent fire[/b]
I attack the light!: 1d8=[tooltip=[ 1 ]] 1 [/tooltip] [b]bludgeon[/b] + 2d8=[tooltip=[ 8 4 ]] 12 [/tooltip] [b]acid[/b] + 2d6=[tooltip=[ 6 6 ]] 12 [/tooltip] [b]persistent bleed[/b]

I am posting from my phone, btw.

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:28 pm
by slate
Thanks -- it's a bug in my code. Trying to figure it out!

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:36 pm
by slate
Testing. If this looks good, try again Christian.

I attack the darkness!: 1d6= 6 slashing + 2d8= 9 holy + 2d6= 12 persistent fire
I attack the light!: 1d8= 5 bludgeon + 2d8= 9 acid + 2d6= 10 persistent bleed

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:39 pm
by CDragos
I attack Zach!: 1d6= 2 slashing + 2d8= 11 holy + 2d6= 4 persistent fire
I throw a stinky poo!: 1d8= 1 bludgeon + 2d8= 6 acid + 2d6= 5 persistent bleed

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:40 pm
by CDragos
Hooray! It works!!!

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:43 pm
by CDragos
+1 longsword: = 0 + = 0 + = 0

Re: Dice test thread

Posted: Mon Jun 21, 2021 12:46 pm
by CDragos
+1 longsword: = 0 + = 0
slashing & Inspire Courage: = 0 + = 0 + = 0

Re: Dice test thread

Posted: Mon Jun 21, 2021 1:07 pm
by CDragos
+1 longsword: 1d20= 14 to hit 1d8 + = 0

Re: Dice test thread

Posted: Mon Jun 21, 2021 1:09 pm
by CDragos
Ok. So how would I write out a longsword attack (1d20) with a +4 modifier and slashing damage (1d8) with a +3 modifier?

Re: Dice test thread

Posted: Mon Jun 21, 2021 5:44 pm
by slate
I see what your saying. Can you put an example in a code block? It’s the button up top that is </>

Re: Dice test thread

Posted: Mon Jun 21, 2021 6:07 pm
by CDragos
Like this post.

How do I write it out using your dice roller?