Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3  All

Author Topic: New Feature -- Dice Rolling  (Read 4900 times)

0 Members and 1 Guest are viewing this topic.

theory

  • Administrator
  • *****
  • Offline Offline
  • Posts: 3603
    • View Profile
    • Dominion Strategy
New Feature -- Dice Rolling
« on: March 06, 2013, 11:01:07 am »

I added a dice rolling function.

You can preview dice rolls, but the die is re-rolled and finalized once you press Post, and editing the post will produce a warning.

There are a variety of options you can have inside the roll tag:

Quote
[roll]1d6[/roll] - rolls 1 6-sided dice.
Might result in:


    Rolled 1d6 : 2, total 2


[roll]2d12+5[/roll] - roll 2 12-sided dice and add 5 to the result
Might result in:


    Rolled 2d12+5 : 6, 11 + 5, total 22


[roll]2d20^10[/roll] - roll 2 20-sided dice, re-rolling any result necessary so that the dice rolls are greater than 10.


    Rolled 2d20^10 : 3 8 10 3 17, 2 10 9 10 14, total 31


[roll]2d20v10[/roll] - roll 2 20-sided dice, re-rolling any result necessary so that the dice rolls are less than 10.


    Rolled 2d20v10 : 11 3, 3, total 6


[roll]2d20<10[/roll] - roll 2 20-sided dice, discarding any result where the roll was not less than 10.


    Rolled 2d20<10 : 4, 20, total 4


[roll]2d20>10[/roll] - roll 2 20-sided dice, discarding any result where the roll was not greater than 10.


    Rolled 2d20>10 : 9, 10


Normally it will add the word 'Rolled' in front - you can customise this. For example, a spell that does some serious damage in a game:
[roll]{Freezing} 1d10 {Fire} 1d20[/roll]


    Freezing 1d10 : 1, total 1
    Fire 1d20 : 2, total 2


You can also nest the requirements, with the proviso of stating the things as they are in order here.
[roll]{Uberdamage} 15d100+10^10v90<80>20[/roll] - 15 100-sided dice, adding 10 to the result, rerolling anything 10 or less, rerolling anything 90 or higher, and if after that, you have values 20 or less, or 80 or higher, they get dropped.


    Uberdamage 15d100+10^10v90<80>20 : 82, 7 61, 3 36, 59, 30, 86, 14, 42, 70, 22, 99 58, 100 73, 46, 93 1 91 42, 12 + 10, total 549


Lastly you can also have an iterator at the end:
[roll]2d6x3[/roll] - roll 2d6 3 times and display the results overall


    Rolled 2d6 : 6, 3, total 9
    Rolled 2d6 : 1, 4, total 5
    Rolled 2d6 : 1, 5, total 6[/nobbc]
Logged

Insomniac

  • Jester
  • *****
  • Offline Offline
  • Posts: 785
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #1 on: March 06, 2013, 11:14:33 am »

+1
Logged
"It is one of [Insomniacs] badges of pride that he will bus anyone, at any time, and he has done it over and over on day 1. I am completely serious, it is like the biggest part of his meta." - Dsell

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #2 on: March 06, 2013, 11:24:53 am »

+1

This dice roll has been tampered with!
'D1' is not a valid dice string!

Darn

This dice roll has been tampered with!
'D6' is not a valid dice string!

Rolled 1d6 : 5, total 5
« Last Edit: March 06, 2013, 11:31:52 am by Ozle »
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #3 on: March 06, 2013, 11:25:33 am »

Love the anti-cheat mechanism!
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #4 on: March 06, 2013, 11:44:52 am »

So... Can we make forum Perudo work with this?

Rolled 5d6 : 5, 1, 6, 5, 3, total 20
Logged

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #5 on: March 06, 2013, 11:45:23 am »

I bid 6 5s.
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #6 on: March 06, 2013, 01:17:49 pm »

I WAS JUST THINKING HOW GREAT THIS WOULD BE YOU ARE PSYCHIC sorry, this just freaked me out because I was JUST thinking about how this would be cool.

Rolled 10d10 : 9, 3, 2, 7, 10, 10, 2, 9, 9, 1, total 62
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Jerk of All trades

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 126
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #7 on: March 06, 2013, 03:13:19 pm »

Rolled 2d6 : 5, 5, total 10



It still seems pretty easy to cheat. You can just put your output text in blockquotes, right?

edit: guess not, but I was able to re-roll a couple times. This post hast currently been edited/rerolled 3 times

Edit 2, watch I will re-roll until I get doubles.
« Last Edit: March 06, 2013, 03:20:52 pm by Jerk of All trades »
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #8 on: March 06, 2013, 03:27:15 pm »

Well, I could see you editing.  To make sure you don't cheat the games could say that edited posts won't count.  You can't edit posts in forum games...
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Insomniac

  • Jester
  • *****
  • Offline Offline
  • Posts: 785
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #9 on: March 06, 2013, 03:32:18 pm »

This dice roll has been tampered with!
Rolled 2d6 : 5, 5, total 10


It still seems pretty easy to cheat. You can just put your output text in blockquotes, right?

edit: guess not, but I was able to re-roll a couple times. This post hast currently been edited/rerolled 3 times

Edit 2, watch I will re-roll until I get doubles.

Eh if I quote your post I can see its not a roll and is just a blockquote.
Logged
"It is one of [Insomniacs] badges of pride that he will bus anyone, at any time, and he has done it over and over on day 1. I am completely serious, it is like the biggest part of his meta." - Dsell

WinterSpartan

  • Coppersmith
  • ****
  • Offline Offline
  • Posts: 48
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #10 on: March 06, 2013, 03:38:28 pm »

Testing the feature:

Rolled 1d8 : 3, total 3
Logged

Jerk of All trades

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 126
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #11 on: March 06, 2013, 03:47:03 pm »

Testing the feature:

This dice roll has been tampered with!
Rolled 1d8 : 3, total 3

I'm pretty sure any quoted post will show the person cheated
Logged

Jerk of All trades

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 126
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #12 on: March 06, 2013, 03:49:58 pm »

^^^  See.  I'm assuming Winterspartan did not cheat.  But when I quoted him it did.

But It doesn't matter.  If you can't edit in forum games, you can't cheat.  Theory's code works, because it just detects illegally using blockquotes to fake a roll.
Logged

WinterSpartan

  • Coppersmith
  • ****
  • Offline Offline
  • Posts: 48
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #13 on: March 06, 2013, 03:54:56 pm »

Ah. Yes, you can tell I didn't edit my post/cheat because it doesn't have the "Last edit:" tag at the bottom. Still, that's potentially problematic.
Logged

Galzria

  • Jester
  • *****
  • Offline Offline
  • Posts: 956
  • Since 2012
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #14 on: March 06, 2013, 03:57:11 pm »

This dice roll has been tampered with!
Rolled 5d6 : 5, 1, 6, 5, 3, total 20


This dice roll has been tampered with!
Rolled 5d6 : 5, 1, 6, 5, 3, total 20


This dice roll has been tampered with!
Test


This dice roll has been tampered with!
Rolled 5d6 : 5, 1, 6, 5, 3, total 20


This dice roll has been tampered with!
{Fireball} 5d6 : 5, 1, 6, 5, 3, total 20
Logged
Quote from: Voltgloss
Derphammering is when quickhammers go derp.

Faust has also been incredibly stubborn this game. In other news, it's hot in the summer, and water falls from the sky when it rains.


Mafia Record:
TOWN Wins: M3, M5, M6, M11, M17, M28, M32, M105, M108, M114, M118, M120, M122, DM1, DoM1, OZ2, RM45, RM47, RM48, RM49, RM55
TOWN Losses: M4, M7, M8, M9, M13, M14, M18, M31, M110, M111, M113, M117, M125, RM3, RM4, RM54
SCUM Wins: M2, M19, M23, M100, DM3, RM1, RM2, RM48, RM50
SCUM Losses: M15 (SK), M102 (Tr), OZ1, RM55

Total Wins: 30
Total Losses: 20

Galzria

  • Jester
  • *****
  • Offline Offline
  • Posts: 956
  • Since 2012
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #15 on: March 06, 2013, 03:59:38 pm »

This dice roll has been tampered with!
The problem with the feature as being unrelated to forum games is that it causes the warning to appear no matter what the intention of the blockquote function was.
Logged
Quote from: Voltgloss
Derphammering is when quickhammers go derp.

Faust has also been incredibly stubborn this game. In other news, it's hot in the summer, and water falls from the sky when it rains.


Mafia Record:
TOWN Wins: M3, M5, M6, M11, M17, M28, M32, M105, M108, M114, M118, M120, M122, DM1, DoM1, OZ2, RM45, RM47, RM48, RM49, RM55
TOWN Losses: M4, M7, M8, M9, M13, M14, M18, M31, M110, M111, M113, M117, M125, RM3, RM4, RM54
SCUM Wins: M2, M19, M23, M100, DM3, RM1, RM2, RM48, RM50
SCUM Losses: M15 (SK), M102 (Tr), OZ1, RM55

Total Wins: 30
Total Losses: 20

Jimmmmm

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1762
  • Shuffle iT Username: Jimmmmm
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #16 on: March 06, 2013, 04:05:55 pm »

Rolled 2d6 : 6, 1, total 7
Logged

Jimmmmm

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1762
  • Shuffle iT Username: Jimmmmm
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #17 on: March 06, 2013, 04:06:20 pm »

Rolled 20d6 : 3, 3, 3, 4, 6, 4, 4, 2, 2, 2, 1, 6, 6, 4, 1, 5, 5, 3, 4, 4, total 72
Logged

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #18 on: March 06, 2013, 04:07:20 pm »

Rolled 20d1000 : 442, 538, 450, 647, 423, 939, 978, 773, 69, 774, 658, 311, 173, 902, 600, 556, 234, 447, 958, 959, total 11831


Maximum is 20D1000
Logged

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #19 on: March 06, 2013, 04:24:48 pm »

Ah. Yes, you can tell I didn't edit my post/cheat because it doesn't have the "Last edit:" tag at the bottom. Still, that's potentially problematic.

If you edit within X minutes, you dont get that.
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #20 on: March 06, 2013, 04:28:20 pm »

Rolled 2d6 : 5, 1, total 6


:O  You're right!
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

theory

  • Administrator
  • *****
  • Offline Offline
  • Posts: 3603
    • View Profile
    • Dominion Strategy
Re: New Feature -- Dice Rolling
« Reply #21 on: March 06, 2013, 06:02:04 pm »

I wasn't aware that people ever used [ blockquote ] before.  Did we already have that tag and I didn't know about it?

Basically, I think every time you try to manually type in [ blockquote ], you get that ugly error.  The only way to get that blockquote effect is to use the [roll] function.  Therefore, you cannot make a fake roll that looks like a real roll.

This means that quoting rolls will generate that cheat effect (since it looks like you are trying to fake a roll).
Logged

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #22 on: March 06, 2013, 06:04:25 pm »

[blockparty]*does a little dance*[\blockparty]
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

theory

  • Administrator
  • *****
  • Offline Offline
  • Posts: 3603
    • View Profile
    • Dominion Strategy
Re: New Feature -- Dice Rolling
« Reply #23 on: March 06, 2013, 06:10:57 pm »

FYI it does bug out if you use the Quick Reply box at the bottom, and then hit Preview.  That turns the roll code into blockquote tags, and then you aren't posting the roll code any more, just the [block quote] code.
Logged

Galzria

  • Jester
  • *****
  • Offline Offline
  • Posts: 956
  • Since 2012
    • View Profile
Re: New Feature -- Dice Rolling
« Reply #24 on: March 06, 2013, 06:17:38 pm »

I wasn't aware that people ever used [ blockquote ] before.  Did we already have that tag and I didn't know about it?

Basically, I think every time you try to manually type in [ blockquote ], you get that ugly error.  The only way to get that blockquote effect is to use the [roll] function.  Therefore, you cannot make a fake roll that looks like a real roll.

This means that quoting rolls will generate that cheat effect (since it looks like you are trying to fake a roll).

Quite possibly the code wasn't active before. I'm used to using the command with html, and I've occasionally used it here as <blockquote>, but, well, to no real effect. :P

(Although using <b> broke the forums awhile back... Whooops!)
Logged
Quote from: Voltgloss
Derphammering is when quickhammers go derp.

Faust has also been incredibly stubborn this game. In other news, it's hot in the summer, and water falls from the sky when it rains.


Mafia Record:
TOWN Wins: M3, M5, M6, M11, M17, M28, M32, M105, M108, M114, M118, M120, M122, DM1, DoM1, OZ2, RM45, RM47, RM48, RM49, RM55
TOWN Losses: M4, M7, M8, M9, M13, M14, M18, M31, M110, M111, M113, M117, M125, RM3, RM4, RM54
SCUM Wins: M2, M19, M23, M100, DM3, RM1, RM2, RM48, RM50
SCUM Losses: M15 (SK), M102 (Tr), OZ1, RM55

Total Wins: 30
Total Losses: 20
Pages: [1] 2 3  All
 

Page created in 0.122 seconds with 20 queries.