Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarven Research: 40.05 combat physics  (Read 17936 times)

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #30 on: August 18, 2014, 08:13:52 am »

Sorry for the long delay - I have been doing lots of testing, but was hoping to understand the results better before posting.  Sadly I do not, so maybe someone else can shed some light.  I don't have time to post everything now, but for starters there's this:
This data was taken with arena dwarves or arena heads wearing adamantine armor hit with copper bolts with density=6667 (for bolt mass=1 such that velocity=momentum).  All other values were vanilla (including bolt contact area 5), and armor thickness was 20 everywhere.  Here are the raws for arena dwarves and arena heads:
Spoiler (click to show/hide)
Arena dwarves are just dwarves modified to not feel pain, to have very slow skill gain, and to have uniform size.  Arena heads have all these properties, but instead of dwarves are just floating heads.

The dwaves were wearing "mark II" uniarmor (not including greaves) for uniform coverage.  For earlier tests in this thread I accidentally used the original "uniarmor", which double covers the lower body and toes.  The heads just wear unihelms.
Spoiler: uniarmor (click to show/hide)

So here's the question - why do bolts deflect off dwarves up to higher momentum than heads?  They both appear to have 100% deflection at about the same momentum, but the transition from 100% to 0 is much slower for dwarves.  I had first thought that maybe this was because dwarves were getting some modifiers that give them a bonus to defense after they get hit (enraged? trance? something else?), but this can't be the case, as at momentum 110 (no deflection off heads) there are deflections off dwarves, including the head sometimes, so I am at a loss.  Maybe some kind of weird rounding related to body part size?  I have no idea.

I wanted to post part of the log, but I guess thats too many chars.  I will try to post it to DFFD later, but I need to get to work.  I have almost 2 GB of logs from the past few weeks, so no shortage of data, just can't make sense of it...

One other question - does anyone know if it would be feasible/advisable to try to convert my DF macros that place creatures in the arena to DFHack scripts?  Specifically, does DFHack allow you to move around the cursor and place/equip creatures?  Is it possible to call external programs from DFHack scripts (to parse the logs)?

Thanks in advance for any insights or suggestions.

As for the additional data I mentioned - it appears that everything still agrees with the rough formulas we obtained for 34.11 deflection off armor at a given momentum (see the material science page of the wiki), with bolt/arrow momentum now equal to [SHOOT_FORCE]/20, but when I was hoping to understand the details and have gotten nowhere.
« Last Edit: August 18, 2014, 08:27:30 am by Pirate Bob »
Logged

TurboSlug22

  • Bay Watcher
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #31 on: August 18, 2014, 12:35:29 pm »

Hello!

This may be the wrong venue to ask and I appologize for muddying up your deliciously info-rich thread with my yammering but has there been any investigation into the combat mechanics of other types of weapons and armor? Serrated discs vs various, ballista/catapult rounds vs various etc etc...

I've noticed A-LOT more bruising, as opposed to 'the severed piece flies off in an arc' lol

but only qualitatively and certainly not in a controlled investigative manner - could someone say some words about whether we should be experiencing any differences in the way these other combaty things would feel post 34.11 ?
Logged

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #32 on: August 18, 2014, 04:23:51 pm »

Toady did fix a rounding error which figured into determining the velocity of melee weapons, but I don't believe that would cause major qualitative changes.  I believe the most noticeable change is that weapons of the same kind made out of different materials will have the same power, whereas before power could vary by up to a factor of 2 depending on which mass was closest to an integer number.  I believe most melee weapons weight at least several kilograms, so the rounding to the nearest integer would have an impact much smaller than a factor of two.  Urist da Vinci can answer this exactly, since he both discovered this bug and wrote the patch.

I also believe that traps behave like melee weapons, and therefore would be impacted by this patch.  However, serrated disks are enormous and therefore should show little change from the rounding error.

Otherwise, all testing I have done so far indicates no changes in how armor works compared to 34.11.  There were large changes to how bolt/arrow momentum are determined from bow/crossbow [SHOOT_FORCE] (now 20 times smaller than before, and rounding error fixed) and the aforementioned rounding error was fixed for melee combat.

I have never thought of testing ballistas.  I don't know if this would be possible in the arena, but rough tests should be possible in fort mode.  I could imagine saving a game with gobbo invaders about to be hit, and then reloading this game multiple times, each time changing the material properties of iron, and measuring if deflections occur off the goblins' iron armor. 

My initial guess would have been that ballistas would behave like large crossbows (since that's what they are), but the raws for ballista arrows are unenlightening
Code: [Select]
[OBJECT:ITEM]

[ITEM_SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA]
[NAME:ballista arrow:ballista arrows]
[CLASS:BALLISTA]

It seems like whatever ballistas do must be hard coded?  If they deflect off armor/cause only bruises, this could be due to having a very large contact area (the same reason axes or swords deflect easily).

The trap components do have nice raws, and numbers so large I can more or less say how they will work without testing:
Code: [Select]
[ITEM_TRAPCOMP:ITEM_TRAPCOMP_GIANTAXEBLADE]
[NAME:axe blade:axe blades]
[ADJECTIVE:giant]
[SIZE:1600]
[HITS:1]
[MATERIAL_SIZE:5]
[METAL]
[ATTACK:EDGE:100000:10000:slash:slashes:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:4:4]

[ITEM_TRAPCOMP:ITEM_TRAPCOMP_ENORMOUSCORKSCREW]
[NAME:corkscrew:corkscrews]
[ADJECTIVE:enormous]
[SIZE:1600]
[HITS:1]
[MATERIAL_SIZE:5]
[IS_SCREW]
[WOOD]
[METAL]
[ATTACK:EDGE:100:10000:drill:drills:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:4:4]

[ITEM_TRAPCOMP:ITEM_TRAPCOMP_SPIKEDBALL]
[NAME:ball:balls]
[ADJECTIVE:spiked]
[SIZE:1000]
[HITS:3]
[MATERIAL_SIZE:4]
[WOOD]
[METAL]
[ATTACK:EDGE:10:200:strike:strikes:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:4:4]

[ITEM_TRAPCOMP:ITEM_TRAPCOMP_LARGESERRATEDDISC]
[NAME:disc:discs]
[ADJECTIVE:large, serrated]
[SIZE:1000]
[HITS:3]
[MATERIAL_SIZE:4]
[METAL]
[ATTACK:EDGE:100000:10000:saw:saws:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:4:4]

[ITEM_TRAPCOMP:ITEM_TRAPCOMP_MENACINGSPIKE]
[NAME:spike:spikes]
[ADJECTIVE:menacing]
[SIZE:1600]
[HITS:1]
[MATERIAL_SIZE:5]
[IS_SPIKE]
[WOOD]
[METAL]
[ATTACK:EDGE:10:6000:stab:stabs:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:4:4]
Due to the crazy large contact areas (the number after edge), axe blades and serrated disks will always be deflected by armor of equal or better material, with addy>steel>iron=bronze>copper.  However this large contact area also makes them more likely to sever limbs.  If you make them from steel, you don't have to worry about deflections as no invaders have steel. 

Spiked balls and menacing spikes have tiny contact areas (10), and therefore will penetrate all armor, all the time.  The only one I'm not sure about is the enourmous corkscrew - with contact area 100 it depends on how much momentum a trap gets for its attack, but I think its rather large so chances are good it will penetrate armor.
« Last Edit: August 18, 2014, 04:30:44 pm by Pirate Bob »
Logged

TurboSlug22

  • Bay Watcher
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #33 on: August 18, 2014, 04:50:25 pm »

Wow thats awesome thanks for the info!

That explains why spiked balls are so highly recommended.. Thanks again for this! I would be very interested to read more similar results and test summaries. Please continue!
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #34 on: August 18, 2014, 08:10:46 pm »

Hello!

This may be the wrong venue to ask and I appologize for muddying up your deliciously info-rich thread with my yammering but has there been any investigation into the combat mechanics of other types of weapons and armor? Serrated discs vs various, ballista/catapult rounds vs various etc etc...

I've noticed A-LOT more bruising, as opposed to 'the severed piece flies off in an arc' lol

but only qualitatively and certainly not in a controlled investigative manner - could someone say some words about whether we should be experiencing any differences in the way these other combaty things would feel post 34.11 ?

I have this thread on the modding forums here: http://www.bay12forums.com/smf/index.php?topic=142372.0 (also currently in my sig). Questions are welcome there.
Ballista arrows are blunt weapons.
Traps (except if you fall on an upright spear) have a fixed attack velocity (so momentum scales with weight)

...
So here's the question - why do bolts deflect off dwarves up to higher momentum than heads? 
...
I wanted to post part of the log, but I guess thats too many chars.  I will try to post it to DFFD later, but I need to get to work.  I have almost 2 GB of logs from the past few weeks, so no shortage of data, just can't make sense of it.
...

Both of your creatures have a broken BODY_SIZE at age 12. You can't give them the same size, because that would mean a rather large floating head.

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #35 on: August 19, 2014, 11:13:17 am »

Both of your creatures have a broken BODY_SIZE at age 12. You can't give them the same size, because that would mean a rather large floating head.
Hmm... the body size is missing.  Thanks for catching that!  That must have happened when I was running tests to see if body size has any impact on deflection.  I found no change in deflection off different size creatures before, but maybe my tests were not careful enough to detect a small change.  I am running again and will see what happens.

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #36 on: August 22, 2014, 11:08:44 pm »

I re-ran with a few different body sizes, and still could detect no impact, but I redid all the simulations with body size set to 60,000 anyway.  Here are results for arena dwarves wearing (corrected) uniarmor and 40.05 raws (contact area=5).  I used copper bolts with density=6667 (mass=1, so velocity = momentum).
Spoiler (click to show/hide)
I then repeated these tests with many different contact areas, and plotted the momentum for 50% deflection vs. the formula Urist found for deflection from code diving, which simplifies to:
Code: [Select]
momentum = (2*Impact Factor-Impact Yield)*round100(contact area*layer thickness)/50000000*factors
Spoiler (click to show/hide)
By fitting this to a straight line, I find that the unknown factors in Urist's formula average 11.2, and that I then have to substract 3 from the result to get the momentum for 50% deflection.  I suspect the subtract 3 is due to some kind of flooring of a number (there are actually 3 separate momentum contributions which are added together - this is also the reason the non-adamantine curves have steps in them).  Anyhow, this fits the data over a very large range quite well.

I then fit the slopes of the curves, and found that 1/slope = -2*Urist's formula:
Spoiler (click to show/hide)

Finally, if you look back to the first plot, the dashed lines are the result of combining these global fits for the momentum for 50% deflection and this slope.  As you can see they fit very well.

I have not yet figured out why I get a different result for arena heads and arena dwarves, but I'm not sure if it matters that much.  We know that there are tons of things that can enter into the "factors" - my result of 11.2 is just an approximate starting point for uninjured dwaves with no skills.  The "arena heads" weren't meant to simulate a dwarf getting hit in the head (I did know the size would be off), but rather were supposed to be the simplest possible target to remove influence of different sized body parts, dorfs falling over, etc.

I also posted the full set of data collected on DFFD if anyone wants to look at it more closely.

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile
Re: Dwarven Research: 40.05 combat physics
« Reply #37 on: August 25, 2014, 04:58:48 pm »

So, as a final test, I checked the behavior of chain mail against bolts in 40.05.  This is where things get silly again.  Here is deflection of copper bolts of various chain mail as a function of momentum:
I modded the uniarmor I have used elsewhere (uniform thickness, single layer) to have a layer thickness of 15 and the [STRUCTURAL_ELASTICITY_CHAIN_ALL].  In other words, arena dwarf targets were covered head-to-toe in chain mail.  I find that at momentum=50 (the value used in 40.05) this provides COMPLETE protection!  This is somewhat absurd given the protection provided by plate armor:
As you can see, at momentum=50, steel and addy provide complete protection, but all other armors do nothing.  This is because chain mail converts edged damage to blunt damage, and at momentum=50 a blunt attack is not enough to do serious damage to a dwarf.  For reference, I also included a curve showing the impact of a blunt bolt with contact area 5 on a naked dwarf, and you can see that there is very little difference from most of the chain mail results.

Therefore, while I whole-heartedly applaud Toady's efforts to fix ranged attacks, and greatly appreciate the improvements he has made, there is still a little ways to go to get something fairly realistic.  Fortunately, with the many bugs he fixed this is much easier to accomplish with modding than in 34.11.  First, I'm going to increase the contact area of bolts to 10.  For chain mail, this doesn't change things much:
Because the layer thickness of chain mail is 15, increasing the contact area has no change on the armor behavior.  The contact area is only included in a factor that gets multiplied by the layer thickness and floored to the nearest 100 - in both cases this factor is 100, so no change in the armor behavior.  There is a minor change to the amount of damage that a blunt attack with contact area 10 does to a naked dwarf, which in turn shifts the chain mail curves slightly.

However, changing contact area to 10 has a very large impact on the behavior of plate armor.  The breastplates, gauntlets, and boots have layer thickness 20-25, meaning that increasing contact area to 10 will double the effectiveness of this armor:
I didn't actually run simulations of all armors for this case, but I used the formula I explained in the previous post (which you can see fits all the available plate armor data extremely well) to fill in (dashed lines).  Helms, with a layer thickness of 30, are 3 times more effective against contact area 10 compared to 5:
Adamantine and steel helms are off the chart here, but protect up to about momentum 335 and 234, respectively.  I wanted to zoom in on the lower helms, as I assume most people will want steel and addy helms to be 100% effective.

Greaves have a layer thickness of 15, and their protection is unchanged by increasing contact area from 5 to 10, so they will provide the protection shown in the first plate armor plot.  Keep in mind that breastplates also cover the lower body, so greaves are really only relevant to the upper and lower legs.  If you are wearing high boots, those also cover the lower legs.  The upper arms, neck, and facial features are not covered by any plate armor, and can only be protected by chain mail shirts.

Anyhow, if you stare at these plots for a long time, there are a couple of interesting choices of momentum that jump out:
momentum=75 (Shoot_force=1500):
Addy plate and chain mail 100% effective
Steel greaves 60% effective, other plate 100% effective, chain mail %35 effective
Iron helms %100 effective, other plate %20 effective, greaves useless, chain mail %35 effective
Copper helm %100 effective, other plate useless, chain mail %35 effective
Bronze helm %10 effective, other plate useless, chain mail %35 effective
(note, the statistics for protection from chain mail at high momentum are noisy because broken bones quickly cause the targets to fall over, after which I stop recording data.  All chain mail provides about 35% "protection" up to mometum=10,000 as this is the percentage of the time that bolts hit only muscle, causing bruises, and do not hit any bone that can be broken.  The details of the chain mail curves are noise - not real).

momentum=70 (Shoot_force=1400):
Addy plate and chain mail 100% effective
Steel plate 100% effective, chain mail %50 effective
Iron helms %100 effective, other plate %60 effective, greaves useless, chain mail %40 effective
Copper helm %100 effective, other plate useless, chain mail %35 effective
Bronze helm %40 effective, other plate useless, chain mail %40 effective

momentum=60 (Shoot_force=1200):
Addy plate and chain mail 100% effective
Steel plate 100% effective, chain mail %100 effective
Iron helms %100 effective, other plate %100 effective, greaves useless, chain mail %100 effective
Copper helm %100 effective, other plate 7% effective, greaves useless, chain mail %100 effective
Bronze helm %100 effective, other plate useless, chain mail %100 effective

momentum=155 (Shoot_force=3100):
Addy helm and most plate 100% effective, greaves uselss, chain mail 35% effective
Steel helms 100% effective, other plate 50% effective, greaves useless, chain mail %35 effective
Iron plate useless, chain mail 35% effective
Copper plate useless, chain mail 35% effective
Bronze plate useless, chain mail 35% effective

For comparison, the current situation
Contact area=5, momentum=50 (Shoot_force=1000)
Addy plate 100% effective, chain 100% effective
Steel plate 100% effective, chain mail %100 effective
Iron plate useless, chain mail 100% effective
Copper plate useless, chain mail 100% effective
Bronze plate useless, chain mail 100% effective

Anyhow, the current situation is worlds better than 34.11, but to me it still seems kind of silly.  I am by no means an expert on medieval armor, but I suspect that if an arrow can pierce plate armor 100% of the time, it will also likely cut a hole in chain mail.

Anyhow, if you are adventuring in 40.05+ and don't want to do any modding, I suggest you get an iron chain shirt and leggings.  If you want to do some modding, I suggest you change contact area to 10 and then modify [SHOOT_FORCE] as described above.  If you are looking for something different from the cases I listed, I would be happy to calculate for you.  I will also try running some detailed tests of survivability etc. for some of the cases.

« Last Edit: August 25, 2014, 05:03:59 pm by Pirate Bob »
Logged
Pages: 1 2 [3]