Wednesday, July 31, 2024

Calculating collision damage as falling damage in D&D

I recently saw a discussion on a forum I visit about how much damage a creature would take in Dungeons & Dragons from running into a wall at a hundred miles per hour, with someone noting that there's no formal rules covering collisions, but that it could be modeled using the rules for falling damage. This sparked my curiosity, and I ended up deriving a formula for collision damage as a function of velocity which I thought was interesting enough to share here.

First, our starting assumptions: falling damage in D&D is modeled fairly simply as 1d6 per 10 feet fallen, up to a maximum of 20d6 at 200 feet. We're going to take this model as a given (including ignoring air resistance) rather than investigating it more closely here (though while looking things up I found a post examining it which suggests it's actually a decent approximation). However, it models damage in height fallen rather than speed of impact at the end of a fall, which is the value of interest for modeling (horizontal) collision damage.

Here's where the equations of motion come through for us: we assume a creature falling from some height \(r_0\) with an initial velocity \(v_0\) of zero comes to a stop at a height \(r\) of zero with a final velocity \(v\) entirely under the acceleration due to gravity \(g\) (\(-9.8\) m/s², or \(-32\) ft/s²). Equation [4] has all the variables we need:

\[v^2=v_0^2+2a(r-r_0)\]

We can rearrange this (substituting \(g\) for \(a\)) to get

\[r_0=\frac{v^2-v_0^2}{2g}-r,\]

and since both \(v_0\) and \(r\) are zero in this situation, it becomes even simpler:

\[r_0=-v^2/2g.\]

(Remember that \(g\) is negative so the final result is positive.) It then becomes a matter of unit conversions, since \(r_0\) needs to be in feet. With \(g\) in ft/s², we just need to convert velocity from the more familiar miles per hour into feet per second. 5280 ft/mi / 3600 s in a hour equals a conversion factor of 1.47, so for velocity in miles per hour we have (leaving out the units):

\[r_0=\frac{(1.47\cdot v)^2}{64}.\]

(If you want to use it with ft/s, just don't multiply by 1.47.) Putting in 100 mph for \(v\) gives a starting height of 337.6 feet, which is above the 200 foot cutoff for maximum damage; one could either rule that a creature hitting a wall at that speed just takes 20d6, or keep extending the model out and take 33d6. (If you use the maximum damage model, the cutoff point is almost exactly 77 mph or 113 ft/s – anything moving faster just takes the max damage.)

How applicable is this in normal combat? Probably not very; the normal move speed of a player character is typically 30 feet per round. Rounds are 6 seconds, so that comes to 5 ft/s, or a leisurely 3.4 mph, slightly faster than normal walking speed. Generally players can run at twice that speed (at the expense of not performing other actions), which is still only 10 ft/s, or 6.8 mph, a gentle jogging pace. How much damage would a player take from running full-tilt into a wall at that speed? None, it turns out, as it would be equivalent to a fall of a mere 1.5 feet, nowhere close to the minimum 10-foot threshold to take damage. The original hypothetical was about a flying dragon, which makes a bit more sense to be speeding around, but most creatures probably aren't moving fast enough to warrant collision damage in most circumstances. Still, the formula above will allow you to calculate it should the situation ever arise, and I present it to do with as you will. A hui hou!

Monday, July 22, 2024

Updates and interviews

This will be fairly short life update, as today I finished the third of three job interviews in the span of less than a week. This is new territory for me, as I've never actually had multiple job applications out like this before, and the stress of preparing for multiple interviews has been rather occupying my mind for the past few weeks. I also managed to miss one of them entirely last week by getting the time difference between California and Hawaii backwards (which certainly didn't help my stress levels!), though thankfully they rescheduled it to today. (Yes, this is a time difference I've been handling routinely for over a decade…including over the International Date Line while I was in Australia…and which I checked online to make sure I had correct…)

I won't go into too much detail about the various jobs since I don't know if any of them will actually pan out, though I do think all three interviews went pretty well. In the order I had the interviews for them, the first job would be the most different from what I'm currently doing but also involve staying in Hilo and be the least disruptive overall. The second would keep me on the island (just not in Hilo) and be closer to what I currently do, while the third would be the closest, but involve moving to California.

All of which makes it rather difficult to choose; I quite like what I do now (full-time software development), but I'd also really like not to have to move. I won't hear back for a few weeks though, so that's a (possible) decision I don't have to make just yet at least. I've been weighing different possibilities and option in my mind for days now, but ultimately I'll just have to wait and see what offers (if any) I get. It's now less than three months until my time with Gemini is up, so whatever happens things will be changing for me in the near future. (I checked, and my last day is officially October 9th.) I suppose, if nothing else, it'll give me some new things to write about! A hui hou!