PDA

View Full Version : Forum Dice roller acting up



Madara
2012-07-24, 02:52 PM
Just recently in this game (http://www.giantitp.com/forums/showthread.php?p=13609570#post13609570)

It seems that the quotes aren't working well with the dice roller.
At the bottom of the page, one of the players rolls a 1 for initiative and when I quote them it comes up as a seven in the quotes without any editing.

In addition, the quotes don't seem to always show the actual rolls, but the [roll0] or [roll1]. Which is odd because sometimes in the same quote they show another roll successfully.

I don't know if this is a common problem or not, but I've never encountered it before.

Snowbody
2012-07-24, 02:56 PM
You can't quote rolls. If you quote a post that has a roll in it, you'll see in the editor that the roll is [roll0] or [roll1].

If your post doesn't have any actual rolls in it, you'll see that text.

If your text has rolls in it, it will duplicate those rolls.

In other words, the behavior you are seeing is as designed.

Madara
2012-07-24, 03:12 PM
You can't quote rolls. If you quote a post that has a roll in it, you'll see in the editor that the roll is [roll0] or [roll1].

If your post doesn't have any actual rolls in it, you'll see that text.

If your text has rolls in it, it will duplicate those rolls.

In other words, the behavior you are seeing is as designed.

That explains it then. Now I know something new :smallredface:

Thank you.

Douglas
2012-07-24, 03:13 PM
This is an artifact of how the die rolls are stored and retrieved for display. Each individual post has some set of die rolls that are linked to it, each identified by a number. The numbering starts at 0.

When a post is displayed, the die roll tags are replaced with their appropriate values - [roll0] becomes the first roll associated with that post, [roll1] becomes the second, [roll2] becomes the third, and so on. If a given roll tag is present multiple times in a single post, all instances of it are replaced with the same roll.

When a post is edited or quoted, the tags are left as is - you see [roll0], [roll1], etc. in the textbox instead of the rolls. When you then post your quote, those tags inside the quote are replaced with the linked rolls when displayed - but the rolls it looks up for display are the ones associated with your new post, not the quoted post. If there is no die roll in your new post for a particular quoted die roll tag, then the tag is left as is with no replacement.

In the particular post you linked to, you quoted a post that had a single roll - [roll0]. In your post you also made two rolls. As these were new rolls, they were made, linked to your post, and converted to [roll0] and [roll1]. The roll in the quote is [roll0], which your post has a linked roll for, so the quoted roll shows that one - your to hit roll.