Friday, March 20, 2020

Whence comes hitpoints?

What are hit points? I wanted to know because I was thinking about how they benefit from ability scores. DH Boggs has some things to say with quotes from Gary and Dave. Or we can compare texts. Here are a few:

These hit points represent how much damage (actual or potential) the character can withstand before being killed. A certain amount of these hit points represent the actual physical punishment which can be sustained. The remainder, a significant portion of hit points at higher levels, stands for skill, luck, and/or magical factors. {snip} Let us suppose that a 10th level fighter has 55 hit points, plus a bonus of 30 hit points for his constitution, for a total of 85 hit points. This is the equivalent of about 18 hit dice for creatures, about what it would take to kill four huge warhorses. It is ridiculous to assume that even a fantastic fighter can take that much punishment. The same holds true to a lesser extent for clerics, thieves, and the other classes. Thus, the majority of hit points are symbolic of combat skill, luck (bestowed by supernatural powers), and magical forces. (PHB p. 34)
Each hit scored upon the character does only a small amount of actual physical harm - the sword thrust that would have run a 1st level fighter through the heart merely grazes the character due to the fighter's exceptional skill, luck, and sixth sense ability which caused movement to avoid the attack at just the right moment. However, having sustained 40 or 50 hit points of damage, our lordly fighter will be covered with a number of nicks, scratches, cuts and bruises. It will require a long period of rest and recuperation to regain the physical and metaphysical peak of 95 hit points. (DMG p. 82)
Hit points represent a combination of physical and mental durability, the will to live, and luck. Creatures with more hit points are more difficult to kill. Those with fewer hit points are more fragile. (5E PHB p.196)

Literally healthier than a horse. StawickiArt.

Pendragon Trait Modifier

A piece of my previous post mentioned that I had yet to write a means of changing Pendragon traits after that had been rolled. I want to be able to easily adjust distribution of character traits on the fly, for reasons of player character race, culture, class, alignment, or any other factor I can imagine. For example, Chaotic characters were classically more associated with demons, the unsavory, and generic villainous Bad Guys, and such people are also typically associated with various flaws, both physical and spiritual. So if the character generator determines that this is a Chaotic character, the code needs a means of biasing the scores negatively. Meanwhile, Dwarves may stereotypically (and now actually, per the dictates of the RNG) exhibit certain behaviors more often than the baseline-human, and so adjustments to make them more selfish, honest, vengeful, and valorous would be appropriate.

the code in question
JSFiddle is pretty handy
I wrote and tested my code on JSFiddle which I have found is a very convenient environment in which to code. You can see it here, colored and indented for readability, the code in question. This simple function "incTra" takes in two elements when it is called, a trait and a value. The body of the code first combines the 13 vices with the 13 virtues so that they can be trivially accessed at the same time in the variable "all". Then it takes the traits element pointed to when called and converts it to lowercase purely for functionality and to dodge potential future goofs. Then the meat of the function:
  1. it searches out the pointed-to trait from the combined list 
  2. if the element is a vice (which we determine by it being among the first 13 elements) it subtracts the value from the trait, biasing it negatively 
  3. otherwise, it adjusts the trait score upwards, biasing a positive result

statistical analysis of 3d6
Chances of a 3d6 roll summing to at most a specific
number, from Anydice, also handy
Through some playing around with it I found that an adjustment of 2 caused the results to skew one way more often at a reasonable frequency. Obviously, with a range of 3-18, and money numbers showing up in the ranges of 3-7 and 14-18, adjusting it by as much as 4 ensures that extreme results occur exceptionally rarely (adjusting +4 ensures that negative results occur only on a roll of 3 in 3d6, an occurrence with just .46% chance). A bias of 2 would produce negative results approximately 7%, while an adjustment of just 1 would move that up to 16%, which is actually really close to the 1-in-6 chance favored by Gary's game.