Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Hitpoints and Hitdice Question

Recommended Posts

I have a strategy guide that explains how hitpoints and hitdice work in Heretic. This is what it says using traditional terminology:

Heretic uses an 8-sided die for the base for most of its calculations. Thus, where you see the term hitdice, it refers to the number of 8-sided dice that are used in the calculation. Therefore, the hitpoint formula is as follows:

hp = (Random 1-8) * hitdice

I understand how to figure out the resultant number of hitpoints based on one hitdie: hp range = 1-8 because any number multiplied by 1 is itself. I get confused when you get to two hitpoints, though. I imagine the formula would be this: hp = (Random 1-8) * 2, but then I think of it this way: If you have two 8-sided dice, wouldn't the "random range" change from 1-8 to 2-16 because the minimum number you could roll with 2 8-sided dice is 2 and the maximum number you could roll is 16? If you look at it like that, the formula would be: hp = (Random 2-16) * 2, making the range of hitpoints 4-32. Which of these is correct?

Share this post

Link to post

It's one to eight hitpoints per hitdie. If you have 2 hitdice you get a range of 2 to 16 hitpoints.

The formula given is simply saying you get 1 through 8 hitpoints per hitdie.

2 hitdice, in hitpoints of damage, is: 1-8 x 2 (or 2-16)
3 hitdice, in hitpoints of damage, is: 1-8 x 3 (or 3-24)

And so on.

I'm assuming the system "rolls" each hitdie separately and then adds them up, or something like that, as opposed to adding the multiplied result of a single hitdie "roll" (the latter would give a linear damage range, the former a bell-shaped one.) A coder might know better.

Share this post

Link to post

I figure it's akin to D&D's hit die system. So that formula would be similar to 2d8 in D&D terms, which means 2 8-sided die, thus 2-16 hp. Yeah...

Share this post

Link to post

// Most damage defined using HITDICE
#define HITDICE(a) ((1+(P_Random()&7))*a)
P_Random() returns a number between 0 and 255. AND 7 is the same as mod 8, so the intermediate result there is a number between 0 and 7, to which 1 is added, giving a number between 1 and 8. This number is then multiplied by the damage parameter given to the HITDICE macro.

So, this gives ranges that look like this:
HITDICE(1) =  1,  2,  3,  4,  5,  6,  7,  8
HITDICE(2) =  2,  4,  6,  8, 10, 12, 14, 16
HITDICE(3) =  3,  6,  9, 12, 15, 18, 21, 24
That should be enough to get a good feel for how it works. Basically, you just get damage in multiples of whatever damage value the thing uses, which is usually provided as a constant inside the codepointer functions (like HITDICE(10)). This, btw, is not any different from DOOM. Virtually all damage is calculated in the same way there. Hexen, on the other hand, adds a random amount to a constant base damage value, which is perhaps a bit more realistic. A given weapon will usually do a certain respectable amount of damage, but possibly more if used skillfully or if a critical hit is obtained on the target by pure luck.

Share this post

Link to post

this reminds me to ask, but does anyone know if the next version of zdoom (97.cab) has decor weapons that allow u to change the hitscan multiplier or whatever its called?

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this