What are the odds of rolling specific ability score totals in D&D?

I am about to start running a new game in 5e and I hate all of the ways of determining ability scores.

I have always felt that we play RPGs at least in part for the opportunity to pretend to be more than we are in real life and no one wants to play a character who’s just average. So I feel like characters should have the ability to become world-class in some area.

Using either standard array or point buy, you cannot start at level 1 with greater than a 15 in any ability. This means that you can’t have above a 17 with racial mods and that, in order, to achieve the highest possible level of 20, you must plan to use at least two feat opportunities to improve to 20, and you have essentially no chance of improving a secondary ability to anything significant if you want to take any non-ability feats at all.

And with rolling dice, you may have some chance of starting in a better position, but you have a significant chance of starting in a much worse position. If the consequences of such a catastrophe were a few sessions of difficulty, that would be one thing, but leaving to chance the possibility of playing, for months or a year, a character whose negative modifiers outweigh their positive ones seems unacceptable to me.

For this reason, I think, some DMs (including Matt Mercer from Critical Role) put lower caps on rolls, saying, for example, that if your total rolls for all six stats are below 70, you can roll again.

I like this idea, but I’m not sure it’s sufficient for what I want (giving my players a chance to be exceptional).

I know that there are 1296 possible results for rolling 4D6, and I know that the average result of rolling 4D6 and dropping the lowest number is 12.2446, which means (I think) that the average score for doing that six times is 73.46759.

I’m thinking about making 73 the “floor” for my players (so that they are at least hero-average so to speak) but I’m not sure I have a good enough grasp of the math to know that that is the right decision.

What I’d like to know is “what is the probability of getting a total of under 70 on these rolls?” So, if you roll 4D6 and drop the lowest one six times and total the six results, what is the probability that it is below 70?

I’d also like to know that for 71, 72, etc… up to 78. And I’d like to know what the probability of getting above about 80 is, and 81, 82, etc.. up to about 90.

I’m not a mathematician and I don’t know how to figure this out. I don’t even really know how to phrase the question. I hope this was clear enough to get an answer.

Does a race without a list of bonus languages still get extra languages from a high Intelligence score?

The Player’s Handbook on Race and Languages says

All characters know how to speak Common.… A smart character (one who had an Intelligence bonus at 1st level) speaks other languages as well, one extra language per point of Intelligence bonus as a starting character. Select your character’s bonus languages (if any) from the list found in his or her race’s description later in this chapter. (12)

The Monster Manual on Intelligence says

A creature can speak all the languages mentioned in its description, plus one additional language per point of Intelligence bonus. Any creature with an Intelligence score of 3 or higher understands at least one language (Common, unless noted otherwise). (7)

However, some creatures—usually those to which the game has assigned a Level Adjustment therefore designating them suitable as PCs like the grimlock (140–1), minotaur (188–8), and even the rakshasa (211–12)—possess a list of bonus languages. Others do not.

If the DM is designing an NPC creature by the book, and the creature’s description lacks a list of bonus languages, yet the creature possesses an Intelligence score of 12 or higher, does the creature still pick extra languages? If a creature does, can that creature pick any languages, including secret languages like druidic and githyanki?

For example, Book of Vile Darkness says, “Kythons speak a strange smattering of both Infernal and Abyssal, but only to each other, never to others” (178), and the kython description includes no list of bonus languages, but a slaughterking kython (181) possesses, by default, Intelligence 20. (Seriously! Final-stage xenomorphs are geniuses!) Does a typical slaughterking kython speak only Kython, or does it speak Kython and five extra languages?


Note: I know that as the DM I could just rule either way on this, but there are some far-reaching—if relatively minor—campaign ramifications that result from either decision, and I like to be consistent with printed material when I can be (even if the authors sometimes aren’t themselves). And although it’s been in the back of my brain forever, yes, it was the slaughterking kython for tonight’s session that finally inspired this question. So you know, given the chance, the slughterking’ll also speak Drow Sign Language, Deadly Dancer, Grell, Neh-thalggu, and semaphore battle signals. Obviously.

Are there any balance issues in allowing two half-feats to be taken without the Ability Score Increase instead of a feat?

Some feats such as Actor and Keen Mind provide a single Ability Score increase along with some other benefits. These feats are sometimes called half-feats (and I am using this definition for this question).

Half-feats are sometimes difficult to incorporate into a build unless you plan ahead and even then you probably need to spend at least part of your adventuring career with an odd Ability Score.

In order to somewhat ease taking these feats, I was considering including this house rule in a campaign:

When you would gain a single feat, you can instead gain two half-feats but do not receive their Ability Score Increases. This counts as taking both feats for the purpose of being able to only take each feat once.

At first glance, this seems naturally balanced because the non ability score benefits of a half-feat seem to be equivalent to a single Ability Score Increase, meaning you are still obtaining the “value” of two Ability Score Increases.

One difference I notice is that this is a bit better for half-feats where the Ability Score improved is fixed (such as CHA for Actor). If you spend 1 ASI on 2 half-feats and then spend the next ASI to increase two ability scores, you’ve effectively taken two half-feats but gained the ability to reassign their associated ability score increases however you like1. I am okay with this benefit.

Am I overlooking any other benefits or balance issues that this house rule might introduce?


1. As written by Ryan Thompson who helped clarify this in comments.

How to conditionally alter search api relevance score?

I must be missing some core concept of search API somehow, but I am stuck. The goal is to alter search API results depending on a flag, like Give flagged products in search API a higher search score? however this time without SOLR, but with database backend instead.

I can see all flagged fields properly indexed, so there is a line that associates the content entity id with the user who flagged, and now I want to increase the relevance score of the results, so that items flagged by the current user are always shown first.

I have hijacked the SearchApiDbService class and I did add the following line in postQuery (I also wonder why this hook does not exist, but that is not relevant for now):

drupal_alter('search_api_db_query_results', $  results, $  query); 

This should allow me to alter the search results right before search_api_db hands them over to the search API right?

So now I use the alter hook as follows:

function mymodule_search_api_db_query_results_alter(&$  results, SearchApiQueryInterface $  query) {   global $  user;   $  uid = $  user->uid;    // Fetch a list of content entities that the user has flagged.   $  drupal_db_q = db_select('search_api_db_MY_FLAG_FIELD_TABLE', 'f')     ->fields('f')     ->condition('value', $  uid);   $  items = $  drupal_db_q->execute()->fetchCol();    // Iterate over results and multiply score of flagged items.   foreach ($  results['results'] as $  key => &$  result) {     if (in_array($  key, $  items)) {       $  result['score'] *= 10;     }   }  dpm($  results);  } 

In $ results I can see that the scores have changed, but the order of the items on my views results page has not, even though I am sorting by relevance.

It has to be something simple, or I am completely misunderstanding how the score value works somehow?

p.s. Since this is conditionally I don’t think altering the search api query directly makes sense because I found no way to boost any field scores there. Directions on how to achieve that are welcome too.

Hackerrank Python | Find the Runner-Up Score

I am trying to complete this hackerrank exercise. The goal is to receive two inputs n (array length) and A (an array of user input) and then print out the second largest value in the array. I came up with this idea and it works in my Google Colab Notebook but on hackerrank it tells me that it could not compile. What is going wrong?

import numpy as np  # read in user values n = int(input()) A = [int(x) for x in input().split()][:n] A = np.asarray(A)  # determine max value to remove it from the array max_value = np.max(A) index = np.argwhere(A == max_value) A_reduced = np.delete(A, index)  print(np.max(A_reduced)) 

github page/ DHH Score Challenge in ruby

I wrote the following code which when executed prints the score of https://github.com/dhh.

require 'typhoeus' require 'json'  class DHHScoreChallenge     def getData         req = Typhoeus.get("https://api.github.com/users/dhh/events/public")         body =  req.body         json_body = JSON.parse(body)    end     def calculateScore json_body        type_and_score = {           :IssuesEvent => 7,           :IssueCommentEvent =>  6,           :PushEvent => 5,           :PullRequestReviewCommentEvent => 4,           :WatchEvent => 3,           :CreateEvent => 2        }        score = 0        json_body.each do |commit|           commit_type =  commit['type']           if type_and_score.has_key? commit_type.to_sym              score = score + type_and_score[commit_type.to_sym]            else              score = score + 1          end        end        score    end     def showScore score       puts "DHH's github score is #{score}"    end end  begin      d = DHHScoreChallenge.new     json_body = d.getData     score = d.calculateScore(json_body)     d.showScore(score) end 

I am a beginner in ruby programming and would like to know the best practices of Ruby. I am trying to include portability, encapsulation, reusability in my code. Please let me know if they have been achieved and if there are any improvements that I can make. Thanks in advance!

Wear levelling score on smartctl does not match TBW claim

I have a small secondary Toshiba RC100 SSD with specified endurance of 120 TB. smartctl reports data units written of about 3% of that. But the wear levelling count(or “Percentage used”) reports at 16%. This is a big discrepancy. From what I can tell, Data Units Written is actual block writes to the device, not logical writes, so write amplification doesn’t explain the discrepancy. What’s going on?