-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
Description of the new feature / enhancement
PowerToys Run should recognize and respond to requests for random numbers. Although =rand()
can be used and adapted for this purpose, doing so is unwieldy for most purposes.
A straightforward way to make RNG requests user-friendly would be to make it so that in mathematical equations, <X>d<Y>
is interpreted as the total of X dice with Y sides each. (For example, "3d6" means rolling three 6-sided dice and summing the results.) If X is omitted, d<Y>
is equivalent to 1d<Y>
. This syntax is widely used in tabletop RPGs and is better suited to everyday uses than rand()
. Plus, =d50
is easier to understand and type than =ceil(50rand())
.
Scenario when this would be used?
Generating a random integer—especially in the form of a simulated dice roll—is something I find myself wanting to do quickly. It's a simple operation that shouldn't require opening a browser tab to ask a search engine or query random.org.
I use RNG whenever I want to randomly select one of multiple options without introducing human bias. I also use it when playing tabletop RPGs or other games that require players to produce randomness.
Supporting information
No response