Jump to content

Dev News Stream


Colin

Recommended Posts

🚧 Dice Tower Changes in Progress 🚧

We are currently developing and testing changes to the Dice Tower interface. Please do not assume that any change is final. Constructive feedback is always welcome in Site Feedback!

 

Notes (as of 2-Jul 1400 EDT):

  • The Edit button is now in the three-dots dropdown at the top right of the post. This was a change made by Invision in a recent version, which was masked by the old way dice were integrated into the post.
  • (Fixed) Dice are currently auto-hidden. Toggle them visible by clicking on the dice button. This will likely change to auto-visible on posts where dice are present.
  • The dice button is not visible when the editor is active. This will get fixed, either by relocating the button or automatically becoming visible when the editor is opened. In the interim, click the button to make them visible before opening the editor.
Link to comment
Share on other sites

  • 3 weeks later...

The dice roller has three new functions.

  • sort(dice, order) - return the rolled dice sorted in the requested order, highest (to lowest) or lowest (to highest)
  • keep(dice, order, number) - sort the rolled dice and keep the specified number of dice. If you don't specify a number, one die will be kept.
  • drop(dice, order, number) - sort the rolled dice and drop the specified number of dice. If you don't specify a number, one die will be dropped.

 

To go along with this, there are two new constants for the "order" parameter:

  • highest
  • lowest

 

For example, "keep(10d10,3,highest)" keeps the highest 3d10 from the rolled 10d10. "drop(10d10,3,highest)" drops the highest 3d10 from the rolled 3d10. Effectively, keep and drop are inverse functions; that is, keep highest 3 or drop lowest 7 give the same result.

 

For D&D 5e afficionados, this means that you can get advantage using "keep(2d20,highest)" and disadvantage using "keep(2d20,lowest)". Put your modifier at the end, e.g., "keep(2d20,highest)-3" means "roll 2d20, keep the highest of the two dice, and subtract 3".

 

NOTE: The UI has not been changed yet, so the results will show only the preprocessed rolls and the final result. This means that sort by itself isn't particularly useful, but I had to build it to get the other two 😄

Link to comment
Share on other sites

Today's new dice roller addition is reroll.

  • reroll(dice, threshold, direction, count) - reroll any die that is at or below/at or above the threshold, optionally limiting the number of rerolls.

With two new constants:

  • above - reroll if the die is greater than or equal to the threshold
  • below - reroll if the die is less than or equal to the threshold

The default behavior is below, with infinite rerolls. That is, you can specify "reroll(6d6,3)" and it will reroll any 1s, 2s, or 3s until the result is better than 3.

Link to comment
Share on other sites

And in today's new dice addition, explode!

  • explode(dice, threshold, count) - for each individual die at or above the threshold, roll an additional die.

The count parameter determines how many times to continue rolling if the additional die also matches or exceeds the threshold. If 0 or omitted, rolls will continue to be added until a value is rolled that is below the threshold.

Link to comment
Share on other sites

Today brings us success, and failure!

  • success(dice, threshold, direction, cancel, bonus) - Count how many of the dice meet the success criteria.
    • If direction==above, count dice that match or exceed the threshold
    • If direction==below, count dice that match or are lower than the threshold
    • If cancel==yes, then each 1 rolled cancels a success
    • If bonus==yes, then each maximum die roll adds a bonus success
  • failure(dice, threshold) - Count how many dice match or are lower than the threshold. This is functionally the same as success(dice, threshold, below).

This also gives us two new constants:

  • yes
  • no
Link to comment
Share on other sites

Bonus completion today: repeat!

  • repeat(expression, count) - Repeats the dice expression count times. The result is returned as an array.

Important note: Because the result is an array, repeat() cannot be combined with other functions at the top level; that is, it would be invalid to ask for repeat(keep(4d6,highest,3),6)+4 because adding 4 to an array is not a valid mathematical operation. Instead, use repeat(keep(4d6,highest,3)+4,6). [By this same token, repeat(keep(4d6+4,highest,3),6) is not valid, because 4d6+4 results in a number, not a set of dice.]

Link to comment
Share on other sites

A very good dice-morning to everyone! You can now assign multiple dice expressions to the same label by separating the expressions with semicolons. For example, 1d6;1d4;1d2 will roll the three dice and give a result such as 1;1;1 (if you are relatively unlucky) or 6;4;2 (if you are a GM rolling against your players). Enjoy!

Link to comment
Share on other sites

Can't be stopped, won't be stopped. Shout-outs to @Diofant, @Khakhan, and @Vladim for teaching me the mechanics of The One Ring via the Myth-Weavers Discord!

  • tor(sixes, weary, favor) - Roll using The One Ring mechanics.

Rolls the specified number of d6s, plus 1d12 (if favor is omitted), 2d12 keep highest (if favor == favor), or 2d12 keep lowest (if favor == ill), summing the results. If weary == yes, d6 results less than 4 become 0 before being summed. The special sigil 𐍈 on the d12 indicates the Eye of Sauron, which is a zero and bodes ill. The special sigil ᚠ on the d12 indicates the rune of Gandalf, which is a 10 and an automatic success.

Link to comment
Share on other sites

  • 3 weeks later...

Two very minor but useful updates today on dice:

 

  1. Going forward, dice will be sorted in creation order, oldest to newest. Existing dice are currently sorted by their ID rather than creation time (mainly because I haven't been able to figure out how to tell the back-end nosql to backfill the empty values).
  2. Bad syntax on rolls throws a useful error dialog and doesn't hide the previously rolled dice.
Link to comment
Share on other sites

A couple more minor enhancements, getting ready for the big overhaul of the roller UX:

  • My Games on the home page now links to your list of games.
  • Improved title attributes on various dice buttons and the dice table.
  • Fixed dice table layout so it doesn't break with excessive input text.
  • Fixed dice dialog preview so it shows results for function-type dice.
Link to comment
Share on other sites

  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...