Jump to content
The Dark Mod Forums

AI falling damage problem


Dunedain19

Recommended Posts

Last year I raised attention to an issue in 2.02 where unconscious AI were not sustaining fall damage; the Bugtracker code for that issue is 0003699, and Grayman went about resolving the issue.

 

As 2.03 has just been released, I wanted to test out my one map where I first encountered the issue. So I went about knocking out different AI and proceeded to noclip up to various heights and then drop them down to earth. What I have discovered is that while the issue has been "fixed" inasmuch that the unconscious AI do eventually die, the height distances from which this happens and the number of drops required to kill the AI, do vary in unexpected ways.

 

In the first instance, I had to drop an unconscious standard City Watch guard from a height of approximately 670-700 Doom Units (DU) around six times before he died. Contrast this experience with the single drop - from exactly the same height - that it took to kill an unconscious 'Wench.'

 

What was even more strange was that it only took four drops to kill the unconscious standard City Watch guard from a height of around 280-300 DU; but it took around seven to kill an ordinary 'Thug.'

 

Regardless of the fact that it is taking more than a single drop to kill unconscious AI from either a single story or - in the case of 670-700 DU, a three story - building, one would anticipate that it would take less drops from a higher height than a lower one.

 

As I noted at the beginning, the issue is technically solved; however, it would seem that perhaps some variables require tweaking?

Edited by Dunedain19
Link to comment
Share on other sites

Maybe it depends on how they land. There are damage multipliers on the ai, so hitting them on the head deals more damage for example. Maybe the same applies here, and some of them just landed on the head taking more damage.

 

Also note, that idTech4 does not like fast ragdolls. So if they accelerate too much due to a high falling distance, this may screw up the physics and effects the falling damage, which, if it works like damage from moveables, should be velocity-dependent.

 

For more reliable results it may be better to not drop them manually, but do it in a fashion that makes the products reproduceable. IF you don'T know how to do that and someone wants to take a look at the issue I can create an example map.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Do TDM AI have variable hit points I wonder? I know they have armor, which might matter. And there could be a random factor to falling damage, which makes sense, as does Obsttorte's suggestion.

 

Is this causing a problem for a map situation that you want to make Dunedain, or is it just a curiosity that you've noticed? In general the system seems to be doing what we want: falling ai take damage and sometimes die, it's just not very predictable.

 

If you need to kill an ai on landing at a given spot, a trigger_hurt will make sure the job gets done right.

Link to comment
Share on other sites

File a bugtracker issue noting the discrepancies and we'll fix it in 2.04.

 

There are a lot of factors affecting the amount of damage and whether death occurs:

 

1 - final velocity

2 - ragdoll mode or not

3 - armor

4 - which part of the body makes first contact (it's possible that what you're seeing is "landing on your head hurts more than landing on your foot")

5 - overall health before the fall

6 - what material the body landed on

7 - the angle at which the body encounters the surface it lands on

Link to comment
Share on other sites

  • 1 year later...

So at long last, I sat down and created a small test map to explore this issue.

 

I created a series of tower blocks that were textured with a stone texture. For the overall floor, I used a dirt texture. The tower blocks increased in size by 64 units, and were ten in total; thus, the tower height ranged from 64 units through to 640. I placed a variety of AI types on each level, which included: inventor, city-watch, moor, gen. guard, thief, thug, townswoman, mage, noblewoman, nobleman (armed).

 

The testing methodology was simple: knockout the AI, pick them up, and drop them from their respective towers. While sounding simple, it is hard to ensure that the AI fall in exactly the same way.

 

Here are my initial findings:

 

  • Tower 640 was the first place that I recorded death from a single drop. However, when I tried reproducing this, the AI did not land on their head and so did not die despite multiple drops.
  • Tower 448 is the first height where an AI can be killed if they land on their head - anything lower and the AI are not able to fall fast enough and so they end up hitting the dirt on their back or shoulders.
  • AI that fall from Tower 384 require around 10 drops before being damaged to death.
  • For AI falling from heights higher than Tower 384, damaging them to death seemingly depends on whether or not they hit their head as I could not produce consistent numbers for Towers 448, 512, 576, and 640. In some cases it was as low as three drops, in others the number kept climbing until the AI fell directly on their head.
  • I could not detect any noticeable difference between AI types: all will die if they hit their head.

I also measured the damage the Player suffers from falling at different heights:

  • Tower 64 = 0
  • Tower 128 = 0
  • Tower 192 = 7
  • Tower 256 = 18
  • Tower 320 = 44
  • Tower 384 = 73
  • Tower 448 = 115 (Death)
  • Tower 512 = 175 (Death)
  • Tower 576 = 258 (Death)
  • Tower 640 = 339 (Death)

It seems very odd to me that AI should be able to survive any fall after Tower 448, regardless of landing position, when the Player cannot.

 

I will update this post once I have time to test and compare the different AI and whether some die quicker than others.

Link to comment
Share on other sites

Thanks for the console command, Destined. Incidentally, I tried measuring these effects again - but without the console command - and it turns out that the console does display damage done to AIs.

Here is my next update:

 

Dropping the armed nobleman from Tower 640 yielded:

  • Drop 1 = 15 damage
  • Drop 2 = 30 damage
  • Drop 3 = 468 damage (Death)

Dropping the noblewoman from Tower 576 yielded:

  • Drop 1 = 30 damage
  • Drop 2 = 17 damage
  • Drop 3 = 10 damage
  • Drop 4 = 215 damage (Death)

Dropping the mage from Tower 512 yielded:

  • Drop 1 = 23 damage
  • Drop 2 = 23 damage
  • Drop 3 = 67 damage
  • Drop 4 = 45 damage (Death)

Dropping the townswoman from Tower 448 yielded:

  • Drop 1 = 22 damage
  • Drop 2 = 62 damage
  • Drop 3 = 130 damage (Death)

Unfortunately, using the console command generates a number of virtual cube outlines, which obscured my vision of the AIs' fall pattern. From what I could see, the drops that killed the AI all had the AI landing predominantly on their head. However, this could equally be said of the drops that yielded minimal damage - i.e. from the vantage point of each Tower, it could be assumed that the AI landed on their head. However, calling up the console disproves this, as indicated by the low damage dealt to the AIs.

 

To reiterate the point I made above, the low damage dealt to these AIs from vantage points that would ordinarily kill the Player is an issue that needs to be addressed. Falling from these heights in real life would very likely kill a person or severely injure them, however, this is not being reflected by the damage dealt to the AIs. While it makes intuitive sense that an AI falling on their back or arm should receive less damage than one landing on their head, this becomes ridiculous when an AI can not only survive a multi-story fall by landing on a non-head limb, but also take very little damage in the process.

 

It is also curious that the outlier damage taken by the nobleman well exceeds that taken by the Player falling from the same height (468 vs 339). A similar effect is detected with the townswoman who suffered 130 damage in comparison to the 115 that the Player is dealt when falling from Tower 448. In contrast, the noblewoman suffers less damage than the Player, while still landing on her head (215 vs 258).

Edited by Dunedain19
Link to comment
Share on other sites

I am not sure, how the damage is calcuated in case of fall damage, but if it uses the same algorithm as normal damage, I would assume that damage multipliers on regions are also applied. As an example (the first I took a look at) the builder forger has the following damage_scale_X spawnargs: chest: 1.5, head: 2, left/right_arm: 0.3, legs: 0.4, torso_low: 1.0. For the player I would assume that no such hit-regions exist. Consequently, an AI that lands on its legs takes only 40% of the damage the player would recieve. This is also in line with the drastically higher damage, when the AI lands on its head as there the damage is doubled. So, if these damage multiplies would be deactivated for fall damage (if this is possible; I have no idea about the exact code), this schould at least resolve the player getting amounts of damage different from the AI.

  • Like 1
Link to comment
Share on other sites

I've had trouble with this as well as it can have some serious game play implications for things like no-kill objectives and carrying unconscious body's that can't be killed.

 

It will be great to make the fall damage consistent across the board for all AI. I don't think it necessarily needs to align exactly with the player's fall damage, but that might be a good starting point. "If I drop this AI from here, they'll probably be killed because I (the player) would be killed."

 

I would certainly be willing to help test out the changes, if they get implemented.

Link to comment
Share on other sites

I did another quick check on spawnargs and the damage_scale_"zone" seems to be consistent (at least for human AI), but I also found a damage_mult_"material" spawnarg, that apparently is another multiplier for damage dependent on the material of the hit zone. This might additionally reduce the damage and not be applied to the player.

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...