The Campaign Builder's Guild

The Archives => The Cogs (Archived) => Topic started by: brainface on April 16, 2006, 09:22:12 PM

Title: Dieroller update
Post by: brainface on April 16, 2006, 09:22:12 PM
[note]EDIT: it may not be a good idea to use test in a 'real' thread. come the update, 'dice' will act like 'test' (except for the seed info), 'test' is just a temporary, testing tag so current rolls won't be broken.[/note]

The current dieroller ([dice]) has a problem: if someone goes back and edits their post, adding a roll, all following dierolls change, even in other people's posts. I've fixed this so that adding rolls can only muck up one post. HOWEVER, applying this change will change the results of every die roll currently in the forum. So i need a couple things:

1. DMs in the pbposts need to finish up a round or otherwise get to a stopping point so that rolls changing don't matter. (conversation obviously won't hurt anything).

2. I could use other people's help in trying to break my current code. it's carried under a test bbcode, such as [test]1d6+7[/test]. If there's some bug, i'd like it to be revealed now, and not in the middle of an epic battle :)

what [test] will currently do:[/b]
add dice ([dice]1d6+2d7[/dice])[dice]1d6+2d7[/dice])
add and subtract modifiers ([test]1d6+3+2d7-2[/test])

what it will not do:
subtract dice ([test]1d6-2d7[/test])
subtract dice ([test]1d6-2d7[/test])
block garbage ([test]1d6-2d7(blue)[/test])
([test]red1d6-2d7(blue)[/test])
([test]hello[/test])

known issues:
the first 1d20 in a post willalways be the same. however, if you add a 1d4 before that, the 1d20  will then be the second roll in the post, and will roll a different value. this is exploitable, but not so much that i'm gonna cry over it. you all are adults, right? close enough?

(the current problem is that an added roll affects EVERY following roll in EVERY post. that's the only change i'm making here.)

[test]1d6[/test]
Title: Dieroller update
Post by: daggerhart on April 16, 2006, 10:08:37 PM
[test]1d9[/test]
[test]1d4[/test]
[test]1d2[/test][test]765432d4[/test][test]1d100[/test][test]1d89[/test][test]1d29[/test][test]1d17[/test]
Title: Dieroller update
Post by: Xathan on April 16, 2006, 10:18:30 PM
[test]1d6[/test]
[test]1d6[/test]
[test]1d7859[/test]
[test]1d5+63d2[/test]

Daggerhart or Brainface, edit your dice to see if they alter mine.

EDIT: adding dice above my dice in my current post changed the results.

EDIT: Good news: Brainface's edit didn't alter my post at all. :D
Title: Dieroller update
Post by: brainface on April 16, 2006, 10:30:51 PM
thanks xev!
edit left you alone

Quote from: xevEDIT: adding dice above my dice in my current post changed the results.
yeah, i know. it's largely unavoidable. (that's the 'known issue'). it'd take a drastically different, much less convenient, method of input to get around that.

pbpost threads shouldn't have a bunch of crazy rolls, unlike here, so i don't think it's gonna be that much of an issue. if someone has 5 random skill checks, and then two critical hits, that's going to look suspicious. :D.

if someone needs to legitimately add a die roll, they should always APPEND the rolls at the END of the post. I should maybe make a note of that somewhere.
Title: Dieroller update
Post by: Xathan on April 17, 2006, 06:51:08 AM
Quote from: brainfacethanks xev!
edit left you alone

Glad I could help...though this is Xathan. :P

Xev or I needs to get a picture...I get our posts confused sometimes.
Title: Dieroller update
Post by: brainface on April 17, 2006, 09:02:39 AM
i'll just refer to you both as 'x' :D

[dice]1d6[/dice]
Title: Dieroller update
Post by: brainface on April 17, 2006, 08:31:47 PM
[dice]1d6[/dice]
Title: Dieroller update
Post by: brainface on April 17, 2006, 08:49:17 PM
update is now applied.
Title: Dieroller update
Post by: Xathan on April 17, 2006, 09:05:21 PM
One thing, does the first d20 roll of a post always have the same result?

[dice]1d20[/dice]
Title: Dieroller update
Post by: Xathan on April 17, 2006, 09:05:44 PM
let's see.

[dice]1d20[/dice]

EDIT: there's my answer. :D