Dice test thread

Use this forum to run play by post games.
User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 11:34 am

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]
Christian Dragos
Venture Agent - Denver

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 11:38 am

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.
Christian Dragos
Venture Agent - Denver

User avatar
slate
Venture Captain
Posts: 1259
Joined: Tue Dec 29, 2015 11:34 am
Name: Zach
Pronouns: he/him
PFS Number: 883
GM Stars: 3
GM Glyphs: 4
GM Novas: 1
Location: Littleton
Discord: slate_.
Has thanked: 429 times
Been thanked: 152 times

Re: Dice test thread

Post by slate » Mon Jun 21, 2021 12:20 pm

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.

User avatar
slate
Venture Captain
Posts: 1259
Joined: Tue Dec 29, 2015 11:34 am
Name: Zach
Pronouns: he/him
PFS Number: 883
GM Stars: 3
GM Glyphs: 4
GM Novas: 1
Location: Littleton
Discord: slate_.
Has thanked: 429 times
Been thanked: 152 times

Re: Dice test thread

Post by slate » Mon Jun 21, 2021 12:23 pm

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]

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 12:28 pm

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.
Christian Dragos
Venture Agent - Denver

User avatar
slate
Venture Captain
Posts: 1259
Joined: Tue Dec 29, 2015 11:34 am
Name: Zach
Pronouns: he/him
PFS Number: 883
GM Stars: 3
GM Glyphs: 4
GM Novas: 1
Location: Littleton
Discord: slate_.
Has thanked: 429 times
Been thanked: 152 times

Re: Dice test thread

Post by slate » Mon Jun 21, 2021 12:28 pm

Thanks -- it's a bug in my code. Trying to figure it out!

User avatar
slate
Venture Captain
Posts: 1259
Joined: Tue Dec 29, 2015 11:34 am
Name: Zach
Pronouns: he/him
PFS Number: 883
GM Stars: 3
GM Glyphs: 4
GM Novas: 1
Location: Littleton
Discord: slate_.
Has thanked: 429 times
Been thanked: 152 times

Re: Dice test thread

Post by slate » Mon Jun 21, 2021 12:36 pm

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

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 12:39 pm

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
Christian Dragos
Venture Agent - Denver

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 12:40 pm

Hooray! It works!!!
Christian Dragos
Venture Agent - Denver

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 12:43 pm

+1 longsword: = 0 + = 0 + = 0
Christian Dragos
Venture Agent - Denver

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 12:46 pm

+1 longsword: = 0 + = 0
slashing & Inspire Courage: = 0 + = 0 + = 0
Christian Dragos
Venture Agent - Denver

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 1:07 pm

+1 longsword: 1d20= 14 to hit 1d8 + = 0
Christian Dragos
Venture Agent - Denver

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 1:09 pm

Ok. So how would I write out a longsword attack (1d20) with a +4 modifier and slashing damage (1d8) with a +3 modifier?
Christian Dragos
Venture Agent - Denver

User avatar
slate
Venture Captain
Posts: 1259
Joined: Tue Dec 29, 2015 11:34 am
Name: Zach
Pronouns: he/him
PFS Number: 883
GM Stars: 3
GM Glyphs: 4
GM Novas: 1
Location: Littleton
Discord: slate_.
Has thanked: 429 times
Been thanked: 152 times

Re: Dice test thread

Post by slate » Mon Jun 21, 2021 5:44 pm

I see what your saying. Can you put an example in a code block? It’s the button up top that is </>

User avatar
CDragos
Store Coordinator
Posts: 2890
Joined: Wed Oct 09, 2013 11:48 pm
Name: Christian
PFS Number: 17148
GM Stars: 4
GM Glyphs: 1
Location: Englewood, CO
Has thanked: 308 times
Been thanked: 160 times

Re: Dice test thread

Post by CDragos » Mon Jun 21, 2021 6:07 pm

Like this post.

How do I write it out using your dice roller?
Christian Dragos
Venture Agent - Denver

Post Reply

Who is online

Users browsing this forum: No registered users