Sunday, January 3, 2021

Intro Statistics for RPGs: Cyberpunk's Weird Dice Math

In yet another fit of pique, I got into running Cyberpunk Red. I'm enjoying the system, and now that my Castle Xyntillan game is back in rotation after holidays, I expect that I'll be able to run three games a week thanks to its low prep time.

A some months ago, I wrote Intro Statistics for RPGs: The Wheaton Dice Curse, since I had started my study of statistics. I have continued in force since then, and now I want to treat a much simpler topic

Today's lesson is a quick look at how Cyberpunk Red's dice mechanics create an unusual, discontinuous mass function.

Mass Functions

In statistics, the function which describes the probability of a given result of a discrete random variable is called the Probability Mass Function, or PMF. For continuous random variables, the term is Probability Density Function, PDF, but that's not what we're looking at today.

There are also Cumulative Mass Functions, which describe not the chances of getting any particular result, but the chances of being above a particular result. This is what we are looking to create.

Cyberpunk Red runs on d10s and d6s, though for our purposes, we're just interested in d10s. Dice are very simple random variables, ideally having a Uniform distribution. We're interested not in these objects, but in the chance of success they influence. However, Cyberpunk Red's dice are not simple uniform RVs. We'll get into the reasons why in a moment.

The cumulative mass function of Cyberpunk's dice takes this form:
P(X>x) = P(Y>(x-C))
Where X is the end result of the roll, the sum of C and Y, Y is a function describing the behavior of the dice, x is the integer Difficulty Value, and C is an integer constant, described below as the Base.

That's a whole lot of effort to say, 'the chance of beating a certain number is the same as the chance of getting more than the difference of the DV and your Base.' The use of specifying like this is that we can make some nice looking graphs that make it easier to see what's going on.

Background

In Cyberpunk, stats range from 2 to 8, with some options to raise them higher, such as with grafted muscles increasing the Body stat no further than 10. Skills range from 0 to 10. A starting character will have their best skills no higher than a 6. 

Cyberpunk Red's action resolution involves a dice roll that looks like 1d10+Base. Base is a combination of your skill rank and the stat associated with that skill. For example, shooting handguns is under the Handguns skill, which is attached to the Reflex stat. It's not unusual for starting characters to have a Base of 12 or more in a few skills which they use often.

That said, for our purposes, Base will also include situational modifiers, such as a -2 for not having the right tools, and also Luck. Luck is a stat, but instead of having associated skills or derived attributes, it serves as a pool of points which can be added to any roll. If you have a Luck score of 7, you have seven points to add to any of your rolls, which are regained only in the following session.

Non-Uniform Dice

Remember when I said above that Cyberpunk's dice aren't actually Uniform RVs? That's because of the dice explosion mechanic. Here's the PMF of rolling a certain number on Cyberpunk's d10.



In Cyberpunk Red, rolling a 10 is a critical success, and rolling a 1 is a critical failure. However, that does not mean that 10s automatically succeed and 1s automatically fail. When you roll either of those numbers, you roll the die again. If this was a critical success, you add the second roll to your total, while if it was a critical failure, you subtract. So you may roll a 1, then roll a 10, which means your total will be 9 fewer than your Base, including Luck and modifiers. 

This also means it is impossible to roll a 10 or a 1 on the dice alone.

It is actually possible to succeed even in the worst case by having a high enough Base and/or low enough Difficulty Value. And it is possible to fail in the best case with the inverse. 

But remember, unlike D&D's Difficulty Classes (DCs) which must be met or beaten to succeed on a task, Cyberpunk's Difficulty Values (DVs) must be beaten. Rolling a 13 on a DV13 check is a failure. 

The result is that, at certain points relative to the DV, increasing your base through Luck or decreasing it through negative modifiers actually has no effect on your chances of success.

For example, we have below the CMF of succeeding on a DV17 roll based on your Base. If your Base is a 16, then expending a point of luck to increase it to 17 is pointless*. Your chance of success is 90% either way. Likewise, there is no difference between a Base of 7 or 8. Your chance of success is 10%.


This is because of the dice explosion mechanic: if you have a DV17 check and a Base of 16, you will get an 18 or higher on any roll of a 2 or more, 90% chance. If you roll a 1, then you will end up subtracting at least 1 point from that, such that it is impossible to roll a total which is exactly 1 above your base. But if you have a Base 17, you still need to roll a 2 or better; if you roll a 1, you will end up subtracting at least 1, at best getting you to 17, and likely lower.

Similarly, this means that Base scores greater than the DV and less than 10-DV have greatly diminishing returns from modifiers. If you're in the main body range of (DV-9) =< x =< (DV-1) then increases and decreases to other points in that range result in 10% changes to success rate for each point of modification. But just beyond that range, the probabilities plateau, and beyond that, each point buys just a 1% increase or decrease in success rate.

The simple version of all this for use at the table is that it's not worthwhile to push your Base beyond DV-1 using a limited resource. You're already at 90%, further improvements are a tenth as valuable as they would be in riskier rolls. 

*The exception to this is in cases where not only succeeding, but beating the DV by a certain margin, matters. Ordinarily, this is not the case, but Autofire rolls in Cyberpunk Red deal different amounts of damage based on how much you beat the DV.

The Cumulative Relationship

Do the two graphs above look weirdly similar somehow? That's because the Cumulative Mass Function, CMF, is the sum of the PMF previous to that point. If we were dealing with CDFs and PDFs, the continuous version, then the relationship is not one of sum, but of integral and derivative. That, and the PMF is centered around the mean of 5.5, while the CMF is shifted to the right owing to the position of the DV. 

--------------------
If you enjoyed what you read here, make sure to follow the blog and share the post! Leave your comments down below. Until the next post, have an excellent week!

1 comment:

  1. Just getting into Cyberpunk Red and I have to say that this game mechanic is the single most aggravating thing about the entire RPG. The incredibly wild results seriously disrupt player agency. If the flat-ass probability of a single d20 is annoying, then CPR's double-exploding d10 system is basically the opposite of Traveller/Cepheus' 2d6 in terms of predictability, control, and player engagement.

    ReplyDelete