dnd 5e – Techniques for hiding dice rolls when an NPC/enemy has advantage/disadvantage

I recommend using a phone app to roll your secret dice. I tried “RPG Simple Dice” and it seems fine; one click to roll any die, and I didn’t see any ads. There’s probably a fancier one with better animations.

In my games, my policy is that all dice rolls (both mine and my players’) must be public. The main reason to roll dice in secret is so that you can lie about the result of the dice; you know this, I know this, and players also are very aware of this. So, whenever I notice that someone is rolling dice in secret, I start to wonder if they’re lying about the result, which leads to me having less fun in the game.

Some people feel that it’s necessary to roll dice secretly when checking if an NPC is spotted, but I use a technique like this:

Instead of:

Alice: “I walk into the room!”
Bob: (rolls a secret Stealth check to see if you notice the spider on the ceiling before it attacks)

I do:

Alice: “I walk into the room!”
Bob: “Well, there’s a spider on the ceiling of that room, and it’s trying to attack you stealthily. Give me a Perception check, DC16, to see if you notice the spider; if you fail, it gets a surprise round.”

The outcome is the same in both cases, but the players feel more powerful and have more fun when they have all the information at their disposal.

java – Simulating a dice throw with threadlocalrandom does not converge to the expected value

I was trying to verify the expected value formula in java.
I did something very trivial, I simulated the roll of a dice, but I mapped each side to a specific value. So each value has probability of 1/6.
The expected value was determined as: 232.65
I run the dice simulation a very long number of runs, 10000000 to be precise but the number did not converge to 232.65 but was 232.74. Smaller runs also were fluxuating up to the value 233.97. Runs up to 2100000000gave 232.63.
So I am wondering if I am doing something wrong. My main premise here is that I shouldn’t need to simulate 2 billion throws of a dice to eventually the expected value calculated via the formula.
So I am wondering if I am using the wrong random API. I can not get the seed so I can’t verify if that changes per iteration. My code is the following:

Map<Integer, Float> map = new HashMap<>();
map.put(1, 17.2f);
map.put(2, 11f);
map.put(3, 128f);
map.put(4, 1f);
map.put(5, 1200f);
map.put(6, 38.7f);

double sum = 0;
int count = 0;

for(Map.Entry<Integer, Float> entry: map.entrySet()) {
     sum += (entry.getValue() * (1/6f));
}

System.out.println("EV " + sum);
sum = 0;

for(int j = 0; j < 2100000000; j++) {
    int dice = ThreadLocalRandom.current().nextInt(1, 7);
    sum += map.get(dice);
    ++count;
}
System.out.println(sum / count);

Output:

EV 232.65000109374523
232.63201358102154

I was expected after a much earlier number of runs I would consistently get something ~232.650…

Also tried using BigDecimal but there was no difference:

//double sum = 0;
BigDecimal sum = BigDecimal.valueOf(0);
int count = 0;

for(Map.Entry<Integer, Float> entry: map.entrySet()) {
    sum = sum.add(BigDecimal.valueOf(entry.getValue() * (1/6f)));
}

System.out.println("EV " + sum);

sum = BigDecimal.valueOf(0);

for(int j = 0; j < 10000000; j++) {
    int dice = ThreadLocalRandom.current().nextInt(1, 7);
    sum = sum.add(BigDecimal.valueOf(map.get(dice)));
    ++count;
}

System.out.println(sum.divide(BigDecimal.valueOf(count)));

Output:

EV 232.6500010937452306
232.3528356843933100044325

conflicts – Can you add dice from Traits when you make a defense roll (and didn’t do Active Defense)?

For example, if you labeled a trait ‘shield fighter’ and are currently using a shield, could you add a die for that trait when defending against a physical attack, even if you declared an attack action?

Other examples would be ‘renown’ when defending in a social conflict or ‘stalwart’ when defending against some mental attacks.

conflicts – Can you allocate more than 10 dice to an action/defense for ‘free’ Nudges?

Normally, any die pool made with more than 10 dice converts each additional die into a free Nudge.

During Conflict, you can create a non-pool of more than 10 Action Dice. From this, you allocate a chosen number of dice when you make pools for your action and any number of times you choose to Defend during the Beat. Are you able to allocate more than 10 dice to one of those pools for Nudges, or are you limited to assigning 10 dice per roll in Conflict?

python 3.x – I made a simple program that roll the dice multiple times and also count the results. Please help me simplified my code and sorted dict is not working

from random import randint
from collections import OrderedDict

class Dice():

def __init__(self):
    self.sides = 6

def roll_dice(self):
    print(randint(1,self.sides))

class Roller(Dice):

def __init__(self,name,age):
    super().__init__()
    self.name = name
    self.age = str(age)

def describe_roller(self):
    print('name: ' + self.name.title())
    print('age: ' + self.age)

def roll_multiple(self,t):
    count = {}
    one = 0
    two = 0
    three = 0
    four = 0
    five = 0
    six = 0
    for i in range(0,t):
        key = randint(1, self.sides)

        if key == 1:
            one += 1
            count("one") = one
        elif key == 2:
            two += 1
            count("two") = two
        elif key == 3:
            three += 1
            count("three") = three
        elif key == 4:
            four += 1
            count("four") = four
        elif key == 5:
            five += 1
            count("five") = five
        elif key == 6:
            six += 1
            count("six") = six

    a = OrderedDict(sorted(count.items(), key=lambda t: t(0)))
    print(a)

mike = Roller(‘mike’,25)
mike.roll_multiple(6)

recreational mathematics – Does there exist numerically balanced dice with odd numbers of faces?

This question is motivated by “Numerically Balanced Dice” by Bosch, Fathauer, and Segerman, in which they produced the most numerically balanced d20 and d120. After reading this paper, I start to wonder whether there exists numerically balanced dice of odd numbers of phases. I tried balancing dice made in the following fashion (Fair Dice by Persi DIACON)

enter image description here

I have convinced myself that dice of this kind cannot be “exactly” balanced (neither the cost of face sums nor the cost of vertice sums, as defined by Bosch, can be exactly zero). I fiddled with these dice for a bit and saw that there exists arrangements that make the face cost in the order of $n^2$ and vertice cost in the order of $n$ and vice versa. This is probably not the best we can do. However, these details are not important compared with my ultimate curiosity though

Does there exist numerically balanced (or almost numerically balanced) dice with odd numbers of phases?

statistics – How do Hard or Extreme rolls vs increasing penalty dice affect the odds of success or failure?

Let’s try modelling this mechanic with AnyDice.

To start off, let me note that the CoC 7e bonus / penalty dice mechanic is a bit awkward to model directly in AnyDice, because the choice of “best” / “worst” tens die depends on the value of the ones die: if you roll a 0 on the ones die, the best possible roll on the tens die is 10, whereas otherwise it’s 00.

However, it turns out that there is a mathematically equivalent variant mechanic that is much easier to work with in AnyDice: instead of numbering the ones die from 0 to 9 and treating 0 + 00 = 100 as a special case, just number the ones die from 1 to 10 and add it directly to the lowest / highest tens die.

(Formal proof of equivalence left as an exercise. As a quick proof sketch, note that there are two cases depending on what you roll on the ones die: if you roll anything but 0/10, the result will be the same using either mechanic anyway; if you do roll a 0/10 on the ones die, you can relabel the sides of the tens dice before rolling them — basically mapping 00 to 90 and subtracting 10 from all other sides — so that the result using the variant mechanic with the relabeled dice will be the same as using the official mechanic with the unrelabeled dice. Since all sides of the dice are supposed to be equally likely and interchangeable, this relabeling will not change the probabilities of the outcomes.)


Using this simplified but equivalent version of the dice rolling mechanic, we can model a CoC 7e roll with N penalty dice in AnyDice simply with:

TENS: 10 * d{0..9}
output d10 + (highest 1 of (N+1)dTENS)

(Conversely, replacing highest with lowest gives a roll with N bonus dice instead.)

To find out the probability of succeeding on such a roll with a given skill or stat, just plot the results of the code above (for the appropriate value of N) in AnyDice using “At Most” mode and look up the probability corresponding to your skill/stat in the plot.


What about hard and extreme rolls, then? You could simply use the same code as for normal rolls, and just look up the probability corresponding to your skill or stat divided by 2 or 5 instead. (You did write those down on your character sheet, right?) But it would be nice to have a direct graphical comparison.

One way to do that is to multiply the result of the roll by 2 or 5 instead of dividing the target value. (Again, showing that this is mathematically equivalent is left as an exercise.) For plotting convenience, it’s also a good idea to clamp the result to at most 100 so that AnyDice’s graph mode won’t needlessly widen the range of the graph.

(Also, since the range of possible rolls starts from 1, AnyDice’s graph plotter gets a bit silly and decides to place tick marks at 1, 11, 21, 31, etc. instead of at 0, 10, 20, 30, etc. One way to fix that is to add a dummy output 0 statement at the end of the code.)

Putting all that together, here’s the final version of the code (for some more or less arbitrary value of “final”, anyway):

TENS: 10 * d{0..9}

output d10 + dTENS named "normal roll"

loop N over {1..5} {
  output d10 + (highest 1 of (N+1)dTENS) named "normal, (N) penalty"
   output d10 + (lowest 1 of (N+1)dTENS) named "normal, (N) bonus" 
}

output (lowest of 100 and 2 * (d10 + dTENS)) named "hard roll"
output (lowest of 100 and 5 * (d10 + dTENS)) named "extreme roll"

output 0 named ""  dummy output to fix graph tick positions 

This code calculates the probability distributions of results for normal rolls with 0 to 5 penalty dice and for hard and extreme rolls with no penalties. (There’s also a line for rolls with 1 to 5 bonus dice as well, but I’ve commented it out with backslashes to reduce clutter. You can uncomment it if you want.)

The output of this program is probably best viewed in Graph + At Most mode (which the link above should take you directly to), and should look something like this:

AnyDice graph screenshot

Looking at where the graphs intersect, you can see that penalty dice are really punishing for low skill / stat values. If your skill / stat is below 50, a normal roll with one penalty die is harder than a hard roll, and if it’s below 20 it’s even harder than an extreme roll. With two penalty dice the crossover points are at about 70 and 44 respectively, and with three penalty dice they’re around 79 and 59 or so.

(If you wanted to know the exact thresholds, you could switch from Graph mode to Export mode and compare the exact numerical probability values. But for most practical purposes just eyeballing it should be good enough, as small differences in probability of a fraction of a percent won’t really be noticeable in play anyway.)

dnd 5e – Can a homebrew classes starting hit points be higher than it’s hit dice?

Homebrew doesn’t have rules

Even if every single class that already exists follows an exact pattern that’s never been broken, you don’t have to do the same thing.

There just aren’t any rules for this, you can make whatever you want, however fantastical, overpowered, or complicated as you like. It may differ from how the system usually works, and what you should be doing then is justifying that choice.

If you’re going to give a class a meager two additional hit points, I would hope there is a good reason. It’s a small change and one people are likely not to even notice given the way every single other class is structured. If this is a vitally important aspect of the homebrew, it should be emphasized in the text and the change should be made clear.

In all honesty, I see this type of change adding confusion and for very little gain (+2 HP is very little). That doesn’t mean you can’t do it anyway, you can do anything you want, but you should have justifications for when you depart from the usual format of the system.

dnd 5e – What hit dice do sages use?

There is two different associations with hit dice:

1: Class. Wizards have a D6 hit die, Fighters have a D10, Barbarians have a D12, and so on. This is the one player characters use, but isn’t used that commonly for NPC’s/

2: Size. Most NPC’s have hit dice dependent on their size. Tiny have a D4, Small have a D6, Medium have a D8, and so on. If you are building an NPC, this is how you determine their hit dice.

There is a Apprentice Wizard NPC in VGTM, if you are looking for a stat block as a DM. As a player, your hit die is dependent on your class. Sage is a background.

beginner – Adding random numbers to the python dice game

I was asked to code the following programme in an assignmnet. After i created it my proffesor asked to meet the foolowing requirements. Can anyone please help me to modify it.

  1. The program should welcome the user and ask how many players (1…4).
  2. The program should explain briefly the rules of the game.
  3. Depending on the game each player should have their “turn” and the results displayed.
  4. The program should keep a record of the winner of the game.
  5. After the results are displayed the user should be asked if they wish to play again.
  6. If they answer ‘y’ then the program should repeat from the beginning.
    7. Random Numbers should be added automatically(use import random or else) not manually.

THE GAME (Odd/even)
-Each player rolls four dice,
-For each odd number rolled the number is subtracted from their total,
-For each even number rolled the number is added to their total,
-Even numbered dice can be rerolled (once) if the player wants to try to get a higher score.
-The highest total wins.

replay="y"
throws=4
while(replay=="y"):
    points=()
    print("...welcome...")
    print("Each player rolls four dice")
    print("For each odd number rolled the number is subtracted from their total")
    print("For each even number rolled the number is added to their total")
    print("Even numbered dice can be rerolled (once) if the player wants to try to get a higher score.")
    print("The highest total wins.")
    
    players=int(input("Number of players(1..4) :"))
        for j in range(0,players):
            print("...Player",j+1,"...")
            for k in range(1,throws+1):
               n=int(input("value obtained :"))
                if(k==1):
                   if(n%2!=0):
                      points.append(-n)
                   else:
                      points.append(n)
                  continue
               if(n%2!=0):
                  points(j)=points(j)-n
              else:
                    d=input("reroll(y/n)?")
                    if(d=="y"):
                        n-int(input("value obtained :"))
                        if(n%2!=0):
                            points(j)=points(j)-n
                        else:
                            points(j)=points(j)+n
                    else:
                        points(j)=points(j)+n
        print("Player",j+1,"total is",points(j))
    maxpoints=max(points)
    winner=points.index(maxpoints)
    print("...Winner is player",winner+1,"!!...")
    replay+input("play again(y/n)?")