Bishop Posted November 20, 2010 A small question for Zdoom decorate modders... how does Zdoom's damage system work? For example I'm shooting at a Demon with a pistol, the pistol has a damage amount of 5. When I hit the demon once, does it then loose 5 health? Or is it more complicated than that? 0 Share this post Link to post
Gez Posted November 20, 2010 It's more complicated than that, and there's nothing specific to ZDoom to this scenario. Doom uses random damage, inspired by RPGs and the likes, so the damage inflicted by an attack is not in direct hit point drain, but in damage dice. So instead of five points of damage, it's five dice of damage. For most things, the "dice" used by Doom and other Doom engine games have either three, four or eight "sides". To use D&D notation, the pistol deals 5x 1d3 damage, so either 5, 10 or 15 damage. ZDoom features can make this a lot more complicated, through custom damage factors and custo damage formulas, but this does not happen with the standard actors. 0 Share this post Link to post
Bishop Posted November 20, 2010 I know about doom's random damage system, no problem with that. The real question was if health loss is identical to damage points. 5 damage points causes a 5 point health loss, 10 points causes 10 loss, 15 points causes 15 loss, etc... 0 Share this post Link to post
Reisal Posted November 20, 2010 No, 5 damage doesn't do 5HP of damage, more or less between 5 and 30 HP worth of damage..or something like that. That explains why 20 damage (100-150 HP) rockets can severely injure or kill the player with a direct hit. 0 Share this post Link to post
Vermil Posted November 20, 2010 Mr. Chris said:No, 5 damage doesn't do 5HP of damage, more or less between 5 and 30 HP worth of damage..or something like that. That explains why 20 damage (100-150 HP) rockets can severely injure or kill the player with a direct hit. Actually no, the damage field visible in Dehacked and most ports is only the first value of an equation. All damage caluations in Doom use this equation with different values. For instance, these are the equations for the Imp, Caco Demon and Barron of Hell melee attacks: " damage = (P_Random() % 8 + 1) * 3; " " damage = (P_Random() % 6 + 1) * 10; " " damage = (P_Random() % 8 + 1) * 10; " So a Barron of Hell can do 10-90 damage in melee. 0 Share this post Link to post
printz Posted November 20, 2010 Vermil said:" damage = (P_Random() % 8 + 1) * 10; " So a Barron of Hell can do 10-90 damage in melee. Wrong, because "% 8" limits the random number between 0 and 7. Add 1 to that and it becomes 1...8. So the final damage is something between 10 and 80 inclusive. 0 Share this post Link to post
Bishop Posted November 21, 2010 OK, cool. All I needed to know. Thanks! 0 Share this post Link to post