Jump to content
  • 0

is it possible to change how damage is calculated?


filthy casul

Question

literally the sole reason I don't enjoy classic doom is because of the random damage spread (yes, it's nitpicking, but I don't like it). from my understanding, it works by multiplying a "base" damage number by an integer chosen at random, so my thought was that I could force it to only choose a certain integer (for example, 5 for incoming damage). is this even possible to do at all?

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

Depends on source port:

  • In ZDoom family ports you can set the STRIFEDAMAGE flag on DECORATE actors to change the "P_Random % 8 * damage" to "P_Random % 4 * damage". Probably there will be more options that I'm not aware.
  • In MBF21 compatible ports you can use the A_WeaponBulletAttack & A_WeaponMeleeAttack codeptrs which have arguments to change the "%" factor and the damage factor (not radius damage).
  • DelphiDoom family ports offers the STRIFEDAMAGE flag on ACTORDEF/DECORATE and the ABSOLUTEDAMAGE flag. With the ABSOLUTEDAMAGE  flag set on a projectile the damage is calculated in script within the parameters of A_Explode(damage, distance) codeptr, e.g. A_Explode(RANDOM(10 + SKILL, 20 + SKILL), 128).

Share this post


Link to post
  • 0
5 hours ago, filthy casul said:

literally the sole reason I don't enjoy classic doom is because of the random damage spread (yes, it's nitpicking, but I don't like it).

The RNG for damage is quite essential to Doom's entire gameplay loop.

 

Actually i am going to go on a bit of a tangent here. From time to time i see users putting in requests to either reduce the amount of damage of just remove the RNG outright. And in the latter part i fail to see why. Removing the value counters for damage (or other things) changes the way Doom really plays.

 

But as always, there are examples. Back in 2013, @TwinBeast made a fork of Chocolate Doom 1.7.0 without the random damage called Chocolate-NoRanDoom:

 

 

The links in the posts are dead, but here they are archived:

Share this post


Link to post
  • 1

For (G)ZDoom, if you're willing to put in some tedious work, you can get it set up where all damage is dealt at fixed values. Essentially, you would need to write replacement actor definitions for everything that deals randomized damage and set their damage properties to use an exact value. It would look something like this:

ACTOR NewDoomImpBall : DoomImpBall replaces DoomImpBall
{
  Damage (14)
}

ACTOR NewCacodemonBall : CacodemonBall replaces CacodemonBall
{
  Damage (23)
}

ACTOR NewBaronBall : BaronBall replaces BaronBall
{
  Damage (32)
}

You also would need to remember things like melee damage and the more unique attacks like the Archvile's fire, which would require you to also write partial redefinitions for most monster actors. Example:

ACTOR NewDoomImp : DoomImp replaces DoomImp
{
  States
  {
  Melee:
  Missile:
    TROO EF 8 A_FaceTarget
    TROO G 6 A_CustomComboAttack("DoomImpBall", 32, (14), "imp/melee")
    Goto See
}

Again, beyond remembering a couple of oddball things, it's not difficult. It would just take a lot of time to get everything done.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...