Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5]

Author Topic: Combat mechanics (pulping) and material/creature properties [0.40.xx]  (Read 38644 times)

expwnent

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #60 on: June 13, 2015, 01:05:14 am »

To automate experiments you could create item projectiles on top of the target unit at some velocity. I think that it's the same as hitting someone with the weapon and you can completely automate it instead of manually attacking over and over.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #61 on: June 13, 2015, 01:34:11 pm »

Have we seen anything affect the chance of stuck-ins yet?
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #62 on: June 13, 2015, 02:20:03 pm »

I don't know if this is a universal thing, but the few times I have seen a weapon get stuck it is when all the layers of a body part are 100% penetrated.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #63 on: June 15, 2015, 10:30:58 am »

Alright, so I am trying to get this attack script to work. Here is what I think I need to do

1. Calculate momentum of attack
2. Calculate volume of target layer (armor or tissue)
3. Calculate shear and/or blunt cost
4. Now here is where I get kind of lost. All of the above have equations associated with them (from the .34.11 thread). But now I need to translate those numbers into the various wound numbers. Namely;

Contact Area
Surface Percentage
Strain
Current Penetration
(And also, if possible, get reasonable numbers for Pain, Bleeding, etc... But those are secondary for now)

My basic assumption is:

Contact Area is the contact area of the weapon hitting that body part?
Surface Percentage is the ratio of the contact area of the weapon to the area of the layer?
Strain, I have no idea. Something to do with the strain numbers of the weapon? Of the layer? Some combination?
Current Penetration, again, no idea. I would guess that it is 100% if your momentum is higher than the shear or blunt cost, and decreases if it is not?

Thoughts? I can continue to do empirical testing and try and nail this stuff down, or I could try and read the disassembly like Urist Da Vinci did, but I am not confident in my ability to do that.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #64 on: June 15, 2015, 10:38:17 am »

Want to hear my basic assumptions?

Current penetration depends on how far through the stuff it the hit has made with the brunt it has, capped by the weapon's maximum penetration. I can't remember if subsequent hits enter the same wound to cut it further, in case the weapon can still reach deeper into the bodypart.
If I've interpreted the half-remembered stuff from DaVinci's findings, strain is the sheer percentage of the bodypart that's been mangled by hits, be it repeated chopping or bashing. 250% of the volume was the threshold where it's mangled to chunky salsa.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #65 on: June 15, 2015, 11:52:25 am »

Turn the size variation off on a race of test subjects, say, elves.
Make copies of the war hammer, battle axe, and spear.
Set the velocity modifier for one war hammer to 0, one to 1000, one to 100000. Attack the elves in the same body part with each hammer, wizard up a lua script to print out the wound status after you hit them.

Repeat it with the axe and spear on the same body part. Repeat again on a more fleshy and less fleshy body part.

Worst case scenario: you should be able to work out what the missing variables are fairly convincingly.
Best case scenario: the massive surge in scientifically motivated elf torture will summon Urist Da Vinci to help you work them out.

Hmmm, though in that case you wouldn't kill as many elves... I need to science, someone find me a kitten, a hammer, and a goblin.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #66 on: June 16, 2015, 12:02:40 am »

Alright, well whacking elves repeatedly has given me at least some insight.

It seems bleeding values can be between 0 and 3x the [VASCULAR], unless the layer contains arteries. If an artery is severed the bleeding amount increases by ~ 10. If a body part is completely severed the bleeding amount will be 3x [VASCULAR] if no arteries are present. If an artery is present it will be blood_count/100

Pain is much easier, it is 3x the amount of pain receptors. Note that this is only the case for cut layers and broken bones. Bruises add 0 pain. A warhammer blow that bruises the skin, fat, and muscle and then breaks the bone will only contribute 150 pain, where as a battle axe that cuts all the way to the bone will contribute 195 (15 + 15 + 15 + 150).

Contact area and surface percentage don't seem to have any influence on pain or bleeding. I also can't seem to find any reliable way to give a percentage for motor nerve, tendon, or artery damage (note I only did 20 attacks for each weapon for each body part, so ~500 attacks total, not very good statistics).

Strain is strange in that for all the edged damage the strain values were 50000 and for all the bruised damage the strain was 0. The only times it wasn't one of these two numbers is when a blunt attack broke bone.

Unfortunately I am still struggling with determining penetration percentage. I have tried using the equations from Urist Da Vinci but I am missing something. If you take, for example, my runs of attacking the right upper arm with a battle axe with a velocity modifier of 0 (which I assume the game translates to 1), in all 20 attacks the attack penetrated through 100% of the skin, 100% of the fat, and between 71 and 83% of the muscle. But none of the equations give me that outcome. I calculate the momentum of the attack, and the shear cost of each layer, but I'm not sure how to put those together.

Also, another level of complication, in several of my attacks with higher velocity weapons bones were broken and sent through other body parts. I think for now I will simply imagine more fundamental attacks and wounds, maybe the compound wounds can be added later.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #67 on: June 17, 2015, 07:17:51 pm »

Well, for those of you who may be interested, I have spent some more time working on a script to apply attacks. I have gotten it to calculate all of the relevant numbers (and double checked with Urist Da Vinci's numbers) depending on the inputs you give it, but am still having trouble figuring out how to translate them to wounds.

My assumption (for an edged attack) is that you calculate the momentum of the attack, then for each layer you subtract the shear_cost(1,2,3) and if momentum > sum(shear_costs) you move on to the next layer and subtract shear_cost_1/10 off of the momentum. Seems easy enough, but my calculated wounds are not matching up with the inflicted wounds when I actually do the attack. Anyone see something I am missing?

One thing that I think will be interesting when I can finally get this working reasonably is that there are a lot of different options that I have built into it. For instance a steel fist punch
Code: [Select]
attack -defender ID -attacker ID -target UB -weapon BP:RH -material INORGANIC:STEEL -velocity 1000 -contact 100Will be just like a normal punch, except using steel as the material instead of bone (which is what a normal punch uses). You can also tell it to ignore armor, or even use a material from a different creature. Just gotta get this last part figured out.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #68 on: June 17, 2015, 07:29:40 pm »

The final subtraction is either shear_cost(1) or impact_cost(1), whichever is higher. If you have an immensely sharp object with an immensely low point of impact failure, penetrating layers will shave the momentum down really fast.

Sometimes I wonder if SHEAR_STRAIN_AT_YIELD ever gets used, though.
« Last Edit: June 17, 2015, 07:32:53 pm by scamtank »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #69 on: June 17, 2015, 09:54:48 pm »

I do correctly subtract either the shear or impact value. But unless I am missing something, I think the exact numbers that get used for wounds might not be so simply calculated. I've tried every combination of the numbers I can think of, but I'm just not getting the right penetration percentages.
Logged

Aedom

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #70 on: October 07, 2016, 02:55:39 pm »

Thanks! Apparently if (contact area*momentum) amount is too big, it will overflow, and the damage will be applied in a pretty bugged way, with (area) and (dent_fraction) staying at zero, and (cut_fraction) only going up very slowly in a weird manner (but less if the area was applied correctly).

I've been looking everywhere.  What equation uses (contact area * momentum) ?
Logged

Melting Sky

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #71 on: December 13, 2016, 08:02:44 pm »

Great thread. Thanks to Urist Da Vinci and everyone else who has contributed to it. I'm curious has anyone dove into the guts of the changes to the combat damage system since Toady recently reworked blunt truama?

I imagine that one of the key changes likely revolves around armor remembering the damage it has accumulated during combat for determining it's level of wear, but are there mitigating factors such as the differences in the weapon and armor materials and craftmanship? Do we know how the new torsion damage to joints works?
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #72 on: December 14, 2016, 11:32:26 am »

Joint damage seems to be momentum being passed through to the joint bodypart towards the upper body from the bodypart being hit, or if there is no joint the next regular bodypart in line.
The damage is measured against three material properties which were not used before: namely tensile, bending and torsion (for joint pull, bend and twist respectively).

The rest works like regular blunt damage calculation, so the the size of the joint bodypart will also determine how hard it will be to break.

Any tendons and ligaments will also receive a hit with the same kind of damage calculation. I think they get a size from their host joint bodypart but I'm not perfectly sure about that.

This is only from testing ingame so I can't really give any formulas, but this info should do if you just want to balance how strong or weak joints should be.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!
Pages: 1 ... 3 4 [5]