Bay 12 Games Forum

Please login or register.

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

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

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #30 on: December 09, 2014, 08:36:56 am »

EDIT: Oh, that wasn't the question.

I ran a different lua script to track the accumulated damage on a (different) elephant's leg bone when hitting it with a modded hammer similar to yours:
Code: [Select]
hit# area dam% dent%
1 10 1 1
2 26 2 2
3 66 5 5
4 178 15 15
5 346 35 35
6 747 78 78
7 1698 178 178
Is that script a trade secret or can I have a look at it?

Pretty please with sugar on top?
Logged
._.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #31 on: December 09, 2014, 09:36:14 pm »

OK:
Code: [Select]
unit=dfhack.gui.getSelectedUnit()
if unit==nil then
print ("No unit under cursor!  Aborting!")
return
end


print("area", "cut", "dent")
for k,v in pairs(unit.body.components.layer_wound_area) do

print(v, unit.body.components.layer_cut_fraction[k],unit.body.components.layer_dent_fraction[k])

end
I am not known for writing good UI. The script outputs the status of all tissue layers in all body parts. To get the results in the previous post, I had to do some cut-and-pasting.

Also look here:
https://github.com/angavrilov/df-structures/blob/5541b66cef283e57c32551f69cc3fd87cff966d2/df.items.xml#L748

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #32 on: December 10, 2014, 01:27:44 am »

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).
« Last Edit: December 10, 2014, 02:03:16 am by Sergarr »
Logged
._.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #33 on: December 10, 2014, 09:43:16 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).
Could you please elaborate on what you did to cause this? Who hit what, with what?

I.e. to get something close to your modded war hammer, I increased the velocity modifier from 2000 to 200000.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #34 on: December 11, 2014, 07:53:08 am »

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).
Could you please elaborate on what you did to cause this? Who hit what, with what?

I.e. to get something close to your modded war hammer, I increased the velocity modifier from 2000 to 200000.
I increased contact area of modded war hammer to a big number (10999) and velocity to 200000.

I hit elephant's leg with that. After first successful strike, (cut_fraction) should be equal to 100, (area) to 0, and (dent_fraction) to 0. The next successful strikes increase the (cut_fraction) in a approximately exponential manner. Also, each strikes says "fracturing the bone".

If you mod the velocity to be even higher, the damage overflows to 0 and every attack glances away.
« Last Edit: December 11, 2014, 07:56:10 am by Sergarr »
Logged
._.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #35 on: December 13, 2014, 05:18:41 am »

Apparently if you pulp the body part via "cloven asunder!", you cannot cut it off after that.

Goddammit.
Logged
._.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #36 on: December 13, 2014, 12:18:28 pm »

Apparently if you pulp the body part via "cloven asunder!", you cannot cut it off after that.
...

Really? I had no trouble pulping a neck (with a war hammer, getting the "smashed into body" message) and then severing it with a short sword.

From looking at a disassembly, there does not appear to be any distinctions between the combat text descriptions of the pulping, beyond the messages being appropriate to the weapon used (edged, blunt, or creature body part). There is only one pulped flag.

Please describe what you are attempting - is the weapon capable of severing that part in the first place?

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #37 on: December 13, 2014, 12:21:12 pm »

Apparently if you pulp the body part via "cloven asunder!", you cannot cut it off after that.
...

Really? I had no trouble pulping a neck (with a war hammer, getting the "smashed into body" message) and then severing it with a short sword.

From looking at a disassembly, there does not appear to be any distinctions between the combat text descriptions of the pulping, beyond the messages being appropriate to the weapon used (edged, blunt, or creature body part). There is only one pulped flag.

Please describe what you are attempting - is the weapon capable of severing that part in the first place?
Uh, what's the criteria for being capable to sever a bodypart? I assumed that any edged weapon will sever a bodypart if you give enough whacks.
Logged
._.

scamtank

  • Bay Watcher
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #38 on: December 13, 2014, 12:24:03 pm »

I think you can still cut-pulp (cloven asunder) stuff that you can't anatomically cut off at all. Eyes and mouths come to mind.
Logged

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #39 on: December 13, 2014, 02:30:04 pm »

Yeah, but with modded sword with contact area 20 it cloven asunder at the second hit and after that I hit the arm more than 10 times and there was just "fracturing the bone" or "shattering the bone" with additional servings of "tendon torn" and "ligament torn".
Logged
._.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #40 on: December 13, 2014, 07:08:46 pm »

...
Uh, what's the criteria for being capable to sever a bodypart? I assumed that any edged weapon will sever a bodypart if you give enough whacks.

Yes, for some value of "enough" this is true.

Yeah, but with modded sword with contact area 20 it cloven asunder at the second hit and after that I hit the arm more than 10 times and there was just "fracturing the bone" or "shattering the bone" with additional servings of "tendon torn" and "ligament torn".

I duplicated such a sword, and see that the skin/fat/muscle layers are not expanding in damaged contact area as fast as the bone. The arm is held on by little bits of flesh.

After hitting an upper leg with a contact 20 sword for a long time, it was long since cloven asunder. The contact area of the leg was 67, whereas the contact area of the wound was 67/67/55/67 for skin/fat/muscle/bone. The test subject then expired of blood loss.

I really ought to find the expansion thingy in my disassembly.

EDIT: it is an increase by a random percentage of the body part's surface area multiplied by something related to denting or strain in the wound. The contact area more or less doubles with each hit.
« Last Edit: December 14, 2014, 05:15:09 pm by Urist Da Vinci »
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #41 on: January 07, 2015, 12:03:38 pm »

It seems that using [IMPACT_STRAIN_AT_YIELD:49999] for armor materials makes non-penetrating edged attacks do blunt damage much as it should against actual armor, without any unwanted side-effects as far as I have seen. DF physics are weird!

But no matter, this is what I have been looking for. Now to see if I can get padded armor to work right as well, then I can get to rebalancing all the weapons to make use of this...

EDIT:

Putting this in the plant fiber material template, reducing the shear yield/fracture to 10000, then using a cloth armor with a high thickness makes functioning padded armor:
[IMPACT_YIELD:100000]
[IMPACT_FRACTURE:3000000]
[IMPACT_STRAIN_AT_YIELD:25000]

Tested by spawning one dummy creature with a helmet and padded coif, and one with just a helmet. The first I had to hit with a heavy attack to do anything other than bruises, the second died from regular attacks.

Awesome!
« Last Edit: January 07, 2015, 12:36:43 pm by Grimlocke »
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #42 on: January 07, 2015, 10:10:18 pm »

It seems that using [IMPACT_STRAIN_AT_YIELD:49999] for armor materials makes non-penetrating edged attacks do blunt damage much as it should against actual armor, without any unwanted side-effects as far as I have seen. DF physics are weird!

...

Tested by spawning one dummy creature with a helmet and padded coif, and one with just a helmet. The first I had to hit with a heavy attack to do anything other than bruises, the second died from regular attacks.
...

Having a IMPACT_STRAIN_AT_YIELD of 50000+, or any of the STRUCTURAL_ELASTICITY_* tokens (which increase the strain to 50000 if not already higher) will cause a "blunt bypass" effect - the armor/tissue layer will not fracture, but only the initial elastic yielding part of the momentum cost will be used, making the armor/tissue layer much weaker.

STRUCTURAL_ELASTICITY_WOVEN_THREAD also caps the shear yield and shear fracture at 20000 and 30000 respectively. This was probably a fix put in to allow wild animals to hurt people who were wearing clothing. This even applies to adamantine clothing. Think of it as stabbing between the threads.

Does your padded coif use a STRUCTURAL_ELASTICITY_* token?

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #43 on: January 08, 2015, 06:55:18 am »

Heres the raws for the coif:

[ITEM_HELM:ITEM_HELM_COIF_PADDED]
   [NAME:padded coif:padded coifs]
   [ARMORLEVEL:1]
   [LAYER:UNDER]
   [COVERAGE:6000]
   [LAYER_SIZE:4]
   [LAYER_PERMIT:0]
   [MATERIAL_SIZE:5]
   [SOFT]
   [STRUCTURAL_ELASTICITY_CHAIN_METAL]

The thickness may be a bit overkill at the moment, but this was helpful for testing purposes.

The elasticity tag is mostly there in case of anyone being silly and making them out of adamantine, which would otherwise function as ridiculously thick rigid metal armor.

The idea behind that 49999 strain value was to use it to make edged weapons pass through more blunt force, since it's used to determine how much of the momentum is turned into blunt force when an edged attack fails. With the stock values this was next to nothing resulting in the armor either completely deflecting a blow or being cut to pieces. Which is not how armor works.

It interestingly still deflects weaker blunt hits as it is now, blunt weapon behaviour actually seems pretty much the same.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Combat mechanics (pulping) and material/creature properties [0.40.xx]
« Reply #44 on: January 08, 2015, 10:25:44 am »

...
The idea behind that 49999 strain value was to use it to make edged weapons pass through more blunt force, since it's used to determine how much of the momentum is turned into blunt force when an edged attack fails. With the stock values this was next to nothing resulting in the armor either completely deflecting a blow or being cut to pieces. Which is not how armor works.

It interestingly still deflects weaker blunt hits as it is now, blunt weapon behaviour actually seems pretty much the same.

Uh... IIRC the strain is only used to determine the amount of momentum passed to the next layer, NOT the edged->blunt conversion. I have always seen 100% of remaining edged momentum converted to blunt momentum. The stock (vanilla) value of 100000 for strain on plant fiber would enable the "blunt bypass" feature because it is more than 50000, making the armor not fracture under blunt damage but also making the armor provide less protection.

For example if you punch someone in a steel helm, [IMPACT_STRAIN_AT_YIELD:940], and the punch doesn't blunt fracture the steel helm, only 940/50000=0.0188=1.88% of the momentum is passed to the skin layer. If the strain is 50000+, it doesn't bother checking if the helm fractures, it just passes the momentum to the next layer. "Blunt bypass" exists so that cloth/skin/fat/muscle sends blunt damage directly to the bones without being broken. For example if you give skin [IMPACT_STRAIN_AT_YIELD:49999], it will tear under blunt damage.

Combat calculator excerpt with your raws, on a human:
Code: [Select]
[DFHack]# combat
Creature size (base/current/racial):    5180    5398    7000
Creature strength (base/current):       1000    1000
Wrestle/Charge rating:  63

ITEMS

fiber   padded coif
Full contact blunt momentum resist:     181
Contact 10 blunt momentum resist:       2
Unbroken momentum deduction (full,10):  18      0
Volume/contact area/penetration:        907
Weight:         13.7864
shear yield/fracture:   10000   10000

steel   helm
Full contact blunt momentum resist:     798
Contact 10 blunt momentum resist:       70
Unbroken momentum deduction (full,10):  34      3
Volume/contact area/penetration:        113
Weight:         8.8705
shear yield/fracture:   430000  720000

fiber   cloak
Full contact blunt momentum resist:     75
Contact 10 blunt momentum resist:       2
Unbroken momentum deduction (full,10):  7       0
Volume/contact area/penetration:        378
Weight:         5.7456
shear yield/fracture:   10000   10000

silk    cloak
Full contact blunt momentum resist:     7
Contact 10 blunt momentum resist:       0
Unbroken momentum deduction (full,10):  0       0
Volume/contact area/penetration:        378
Weight:         1.89
shear yield/fracture:   20000   30000

BODY PART ATTACKS
NAME    EDGE    SIZE    CONTACT PNTRT   WEIGHT  VEL     MOMENTUM(+500%/-50%)
PUNCH   blunt   77      18      77      0.385   100     39      bone
PUNCH   blunt   77      18      77      0.385   100     39      bone
KICK    blunt   116     23      116     0.58    100     59      bone
KICK    blunt   116     23      116     0.58    100     59      bone
SCRATCH edged   23      8       23      0.115   100     12      nail
                shear yield/fracture:   115000  130000
SCRATCH edged   23      8       23      0.115   100     12      nail
                shear yield/fracture:   115000  130000
BITE    edged   5       2       5       0.025   100     3       tooth
                shear yield/fracture:   115000  130000

BODY PART DEFENSE
Volume/Contact/Thickness/Material/Blunt_Momentum_Resist/Shear_Yield/Frac
upper body
        SKIN    15      95      3       skin    0       20000   20000
        FAT     166     95      37      fat     3       10000   10000
        MUSCLE  834     95      186     muscle  16      20000   20000
lower body
        SKIN    15      95      3       skin    0       20000   20000
        FAT     166     95      37      fat     3       10000   10000
        MUSCLE  834     95      186     muscle  16      20000   20000
neck
        SKIN    1       20      1       skin    0       20000   20000
        FAT     16      20      17      fat     0       10000   10000
        MUSCLE  83      20      86      muscle  1       20000   20000
head
        EYEBROW 8       42      4       hair    0       60000   120000
        EYEBROW 8       42      4       hair    0       60000   120000
        HAIR    4       42      2       hair    0       60000   120000
        HAIR    4       42      2       hair    0       60000   120000
        SKIN    4       42      2       skin    0       20000   20000
        FAT     44      42      22      fat     0       10000   10000
        MUSCLE  226     42      113     muscle  4       20000   20000
right upper arm
        SKIN    3       32      2       skin    0       20000   20000
        FAT     33      32      21      fat     0       10000   10000
        MUSCLE  83      32      54      muscle  1       20000   20000
        BONE    83      32      54      bone    33      115000  130000
left upper arm
        SKIN    3       32      2       skin    0       20000   20000
        FAT     33      32      21      fat     0       10000   10000
        MUSCLE  83      32      54      muscle  1       20000   20000
        BONE    83      32      54      bone    33      115000  130000
right lower arm
        SKIN    3       32      2       skin    0       20000   20000
        FAT     33      32      21      fat     0       10000   10000
        MUSCLE  83      32      54      muscle  1       20000   20000
        BONE    83      32      54      bone    33      115000  130000
left lower arm
        SKIN    3       32      2       skin    0       20000   20000
        FAT     33      32      21      fat     0       10000   10000
        MUSCLE  83      32      54      muscle  1       20000   20000
        BONE    83      32      54      bone    33      115000  130000
right hand
        SKIN    1       17      1       skin    0       20000   20000
        FAT     13      17      16      fat     0       10000   10000
        MUSCLE  33      17      40      muscle  0       20000   20000
        BONE    33      17      40      bone    13      115000  130000
left hand
        SKIN    1       17      1       skin    0       20000   20000
        FAT     13      17      16      fat     0       10000   10000
        MUSCLE  33      17      40      muscle  0       20000   20000
        BONE    33      17      40      bone    13      115000  130000
right upper leg
        SKIN    7       59      2       skin    0       20000   20000
        FAT     83      59      29      fat     1       10000   10000
        MUSCLE  208     59      74      muscle  4       20000   20000
        BONE    208     59      74      bone    83      115000  130000
left upper leg
        SKIN    7       59      2       skin    0       20000   20000
        FAT     83      59      29      fat     1       10000   10000
        MUSCLE  208     59      74      muscle  4       20000   20000
        BONE    208     59      74      bone    83      115000  130000
right lower leg
        SKIN    6       51      2       skin    0       20000   20000
        FAT     66      51      27      fat     1       10000   10000
        MUSCLE  166     51      68      muscle  3       20000   20000
        BONE    166     51      68      bone    66      115000  130000
left lower leg
        SKIN    6       51      2       skin    0       20000   20000
        FAT     66      51      27      fat     1       10000   10000
        MUSCLE  166     51      68      muscle  3       20000   20000
        BONE    166     51      68      bone    66      115000  130000
right foot
        SKIN    1       23      1       skin    0       20000   20000
        FAT     19      23      18      fat     0       10000   10000
        MUSCLE  50      23      46      muscle  1       20000   20000
        BONE    50      23      46      bone    20      115000  130000
left foot
        SKIN    1       23      1       skin    0       20000   20000
        FAT     19      23      18      fat     0       10000   10000
        MUSCLE  50      23      46      muscle  1       20000   20000
        BONE    50      23      46      bone    20      115000  130000
skull
        BONE    186     32      122     bone    74      115000  130000
[DFHack]#
Pages: 1 2 [3] 4 5