Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11 12 ... 19

Author Topic: Dwarven Research: A Comparison Study on the Effectiveness of Bolts vs Armors  (Read 115043 times)

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile

Thanks Zivilin!  I had read about your arena dwarves before, and meant to use them, but I forgot.  I strongly suspect that you may be right that it is unconsciousness that is causing me problems.  I plan to adjust my script to count hits/deflections after dwarves fall over/are unconcious to see if it makes a difference.  If so, then I will go on to tally vs. each body part (which will be a big pain). 

First off, I reran iron bolts vs. steel armor (no chainmail) with [SHOOT_FORCE:26] using Zivilin's cell style arena (sets of enclosed shooters and targets separated by fortifications).  This time I got 49% deflections, compared to only 45% with my setup with long rows of shooters/targets.  I will add the results for [SHOOT_FORCE:35] later today.  This difference appears significant, but I am not sure if it is due to the change in shooting distance, or lots of shooters rapidly firing on a few downed dwarves that are left slowly bleeding to death.

Edit:  I ran for [SHOOT_FORCE:35], and I get 55% deflection for this case (compared to 50% before).  So while using cells does make a difference compared to rows, it does not explain why I find higher deflection off steel armor with SHOOT_FORCE 35 than 26.  I guess it's time to start messing with my analysis scripts.

Also, thanks for the tip about the mouse, but I have an old thinkpad with the knob, and no mouse.  I think my issues might have been due to the computer going into different sleep states etc, and I've turned off most of that stuff and haven't seen problems lately, but I may have missed something.   I do agree that the root cause is probably external processes interrupting dwarf fortress.
« Last Edit: October 20, 2012, 03:15:27 pm by Pirate Bob »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile

...
Please excuse me if I wasn't clear enough - I more or less know how the weight and volume calculations work. What I was curious about was how do You verify what the Contact Area of an object really is? E.g. the weight formula can be easily verified - the weight of any object can be checked by opening the description of that object in-game, and then it can be compared with the results of the formula. Is there any such way to verify that the Contact Area of a block is really around 71?

I waited to answer until I could finish the work posted here: http://www.bay12forums.com/smf/index.php?topic=91166.msg3712752#msg3712752

I used a DFHack lua script to read the wound data structure and found the wound's contact area.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile

Average size enforced - to be honest, I am not certain whether this changes actual dwarf size or only their descriptions, but I modded the size descriptors so that all arena dwarves are always average size
It will change their size. Most dwarves killed by drowning and then butchered will give the same amounts of meat and bone, but there will sometimes be differences. The differences between individuals are much easier to see in larger creatures such as giant sperm whales.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile

As usual, it seems Zivilin was correct about the anomalies in my results.  I modified my analysis script and found that, at force 35, for iron vs. steel, plate armor only, 100% of the hits that penetrated armor occurred when the targets where unconscious.  To make sure I didn't make a mistake, I also re-ran the test using Zivilin's Arena Dwarves, and got 100% deflections off armored areas.

I will have to update all my tables with some additional columns showing the %deflection when dwarves are conscious/unconscious.

Also, I almost fell over laughing when I read the description of an Arena Dwarf.  Most appropriate :P!

alcohol_dependent

  • Bay Watcher
    • View Profile

Just wanted to pop in and ask if anyone considered changing adamantine to a higher weight. Didn't think this through much compared to the amount of data you guys are providing but it just struck me that maybe somewhere in the algorithm shoot force takes weight of the projectile into account, which would explain the weird results from adamantine vs adamantine.
Logged

Zivilin

  • Bay Watcher
  • Dwarven Science Division
    • View Profile

I waited to answer until I could finish the work posted here: http://www.bay12forums.com/smf/index.php?topic=91166.msg3712752#msg3712752

I used a DFHack lua script to read the wound data structure and found the wound's contact area.

That's digging deep. I'll have to get DFHack and see whether I am capable of using any of the tools there. Truth to tell, I am terrible at code analysis - black box experimentation suits me much better. :P Nevertheless, thank You for the information.

Average size enforced - to be honest, I am not certain whether this changes actual dwarf size or only their descriptions, but I modded the size descriptors so that all arena dwarves are always average size
It will change their size. Most dwarves killed by drowning and then butchered will give the same amounts of meat and bone, but there will sometimes be differences. The differences between individuals are much easier to see in larger creatures such as giant sperm whales.

Thanks for confirming. And it just occurred to me to kill some regular dwarves and arena dwarves in the arena and check the weights of their corpses. All arena dwarves weighed 86 urists, whilst the weights of regular dwarves clearly fluctuate. I am still not certain to what extent this affects combat (though I am certain it does).

As usual, it seems Zivilin was correct about the anomalies in my results.  I modified my analysis script and found that, at force 35, for iron vs. steel, plate armor only, 100% of the hits that penetrated armor occurred when the targets where unconscious.  To make sure I didn't make a mistake, I also re-ran the test using Zivilin's Arena Dwarves, and got 100% deflections off armored areas.

I was not certain whether unconsciousness makes opponents more vulnerable to ranged attacks as it does for melee attacks - after all, they are already known to differ in that ranged attacks do not automatically aim for headshots when the opponent is unconscious. So this is another interesting confirmation. I was wondering, when you get all the results, could You compile them in an Excel sheet (or something similar) and put them up on DFFD? With information on what armor was used, etc. It would make it easier to analyze.

Also, I almost fell over laughing when I read the description of an Arena Dwarf.  Most appropriate :P!

Isn't it? ^_^ After I read the description of the standard dwarf, that variation just popped into my head, and I could not imagine using anything else. It fits all dwarves, really :P

Just wanted to pop in and ask if anyone considered changing adamantine to a higher weight. Didn't think this through much compared to the amount of data you guys are providing but it just struck me that maybe somewhere in the algorithm shoot force takes weight of the projectile into account, which would explain the weird results from adamantine vs adamantine.

Modifying the density of candy would definitely produce significant results. I am interested in this if only to shed some light on the deflecting mechanism of candy vs candy (and other vs candy combinations). I'm certain someone will get around to it, in time. Most of my time has recently been locked up in melee tests, which I am continually failing at -_-'' I have redid the same test runs 3 times now, each time discovering a new interference. Today I finished the third run, and I discovered an hour ago that once more I have failed to consider an interfering factor. I might return to ranged testing if only to complete something successfully :)
Logged
No signature

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile

I was wondering, when you get all the results, could You compile them in an Excel sheet (or something similar) and put them up on DFFD? With information on what armor was used, etc. It would make it easier to analyze.
I have most of my results in Google docs spreadsheets, which I could share with you any time.  I could also post them to DFFD if you want.  Is there anything in particular you want? 

I plan to re-run the large tests with arena dwarves once I get some idea of where the break point for deflections is for this case.  When I get solid data that I understand, I definitely plan to do some kind of write-up with figures, spreadsheets, etc and post it to DFFD.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile

We must go deeper!

Code: (chkproj.lua) [Select]
local l = df.global.world.proj_list
l=l.next
    while l do
      printall(l.item)
      print("-")
      l = l.next
    end

Copy the lines of script.
Open your text editor of choice.
Paste the text and save as chkproj.lua or whatever name you want, and put it in the scripts folder of your DFhack directory. 
In the DFhack console, make sure you're in the root menu and not in liquids, dfusion or lua mode.  Type chkproj or whatever name you used for the script.

You'll see something like this:
Spoiler (click to show/hide)

The hit_rating has something to do with accuracy and gets larger as you increase dwarf skill.

The names above were chosen by the DFHack developers, so anything with "unk" is unknown. I highlighted unk22 because I figured out what it is. unk22 is never larger than the crossbow's SHOOT_MAXVEL, and varies according to bolt weight and the SHOOT_FORCE, so I think unk22 is the projectile "velocity". The pre-minecart projectiles didn't travel faster across the screen when they had a high velocity (they instead move 1 tile/tick), but the new parabolic projectiles do and they use the new xyz numbers in the data structure.

By varying material density, SHOOT_FORCE, and SHOOT_MAXVEL, I found the following algorithm:
  • Find the weight of your bolt (candy 0.03, iron 1.18, platinum 3.21, wood 0.15)
  • Floor that number to an integer (0, 1, 3, 0)
  • Divide the SHOOT_FORCE by the integer, and integer the results (∞, 1000, 333, ∞)
  • Cap the results by the SHOOT_MAXVEL (1000, 1000, 333, 1000)

So I tested candy, iron, platinum, gold, slade, and wood bolts using SHOOT_FORCE=2012 and SHOOT_MAXVEL=3000 and got unk22 values of (candy 3000, iron 2012, platinum 670, gold 1006, slade 67, and wood 3000).

An implication of this algorithm to a default-force, superhigh-maxvel crossbow is that a bolt which weighs 1.01 urists will be shot at velocity 1000, whereas a bolt which weighs 0.99 urists will be shot at "divide by zero" speed. This is absurd since the crossbow hasn't propelled the projectile with more force. Decreasing the bolt's weight by a negligible amount has made it orders of magnitude more dangerous. This problem wouldn't exist if Toady was using a floating point calculation for the bolt weight and shoot force.

So what happens when you compare the velocities calculated from this algorithm to the deflection data?

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile

We must go deeper!

Code: (chkproj.lua) [Select]
local l = df.global.world.proj_list
l=l.next
    while l do
      printall(l.item)
      print("-")
      l = l.next
    end
...
snip!
...
So what happens when you compare the velocities calculated from this algorithm to the deflection data?
Thanks a lot for this great work Urist!  I confirmed that for iron bolts, unk22 is equal to [SHOOT_FORCE] for several values between 40 and 100 (the range I was testing).  I also confirmed that unk22 is 1000 for candy bolts even at  [SHOOT_FORCE:1].  Furthermore, this explains a result that I found a while back - if you reduce the bolt size so that the mass is more realistic (say 100 g per bolt) then there is no longer any dependence damage on [SHOOT_FORCE].  I didn't report this at the time as I thought maybe I had broken DF by doing this or something, but now it is clear that DF was rounding all bolt masses down to zero in this case, so that they always were fired with [MAX_VELOCITY]. 

I would also say that this provides pretty clear evidence that crossbows fire bolts with constant momentum, as you thought, and not with constant energy.  Looks like I owe you a dwarven ale... ;).  Understanding how the game treats bolts at this very low level will be immensely helpful in working out the full details of how deflections work.

On that note, here is a plot of deflection vs [SHOOT_FORCE] for iron bolts fired at arena dwarves (no pain->no unconciousness) wearing steel helm, breastplate, greaves, low boots, and gauntlets:
Spoiler: deflection vs. force (click to show/hide)
It jumps from 100% at force=47 to 22% at force=48, and then tails off rather smoothly from there.  I am going to try running for some different armor/ammo combinations today, but my scripts keep stalling lately for some reason, so not sure if it will work.

GoombaGeek

  • Bay Watcher
  • Horrors! Crundles in the caverns!
    • View Profile

Guys.

Stop it.

I need something to do my thesis on sometime in the next decade and you're going too fast. I'll have to study and graph something real at the rate you're going.
Logged
My wooden badge was delicious.

Zivilin

  • Bay Watcher
  • Dwarven Science Division
    • View Profile

Guys.

Stop it.

I need something to do my thesis on sometime in the next decade and you're going too fast. I'll have to study and graph something real at the rate you're going.

Do not fret, by v0.51 most of this will probably be obsolete data ^_^ The field of dwarven ballistics (and other fields) will be in need of fresh blood for years to come.

On that note, here is a plot of deflection vs [SHOOT_FORCE] for iron bolts fired at arena dwarves (no pain->no unconciousness) wearing steel helm, breastplate, greaves, low boots, and gauntlets:
Spoiler: deflection vs. force (click to show/hide)
It jumps from 100% at force=47 to 22% at force=48, and then tails off rather smoothly from there.  I am going to try running for some different armor/ammo combinations today, but my scripts keep stalling lately for some reason, so not sure if it will work.

So 47/48 is the velocity deflection threshold for Iron vs Steel. We can assume that there is another discrete binary deflection mechanism which can be uncovered here, similar to the IMPACT_YIELD threshold. And an even more interesting non-binary relationship for velocities above the threshold. A study of this will probably explain how wood vs candy deflections work.

I also went back to the bolt knockback studies in this thread and I think they can now be reliably explained by Urist da Vinci's findings. Even though the velocity of an fired projectile is calculated using the floored weight value of the bolt, knockback calculations are done in floating-point. So it is possible to obtain a relative value of velocity of all the dwarves. I call it relative, because at the moment I have nothing to relate it to. So if a dwarf was propelled at the speed of 1829.65 (silver), then at this level of study I cannot really say what that means exactly. It is known, however, that the dwarf was propelled 11 tiles horizontally before completing a vertical free fall of 8 tiles. It is also known that the free fall time for dwarves shot with other bolts will be the same, since the vertical velocity is not affected by horizontal propulsion. It can thus be safely assumed that the speed at which a dwarf is propelled will be proportional to the distance he is propelled before hitting the ground.

Based on the furthest distance a dwarf was propelled (11 tiles, achieved by silver bolts) I estimated the distance multiplier to be 0.006012 - that is, tiles_propelled(silver)/dwarf_speed(silver) = 11/1829.65 = 0.006012. Hopefully, multiplying this by the calculated dwarf speed will give the number of tiles a dwarf will be propelled before completing an 8-tile free-fall for different bolts used.

Spoiler: Table of Results (click to show/hide)

And the estimates proved to match up with the experimental data. This explains the previously confusing event of silver bolts propelling dwarves the furthest, despite not being the heaviest type of bolt used. They simply were the heaviest bolts lighter than 2 urists (the velocity cap was set to the same value as SHOOT_FORCE - 100000 - so 0 urist and 1 urist bolts had the same velocity). Since the velocity of all bolts lighter than 2 urists was the same, the heaviest one of that group had the most momentum.

An implication of this algorithm to a default-force, superhigh-maxvel crossbow is that a bolt which weighs 1.01 urists will be shot at velocity 1000, whereas a bolt which weighs 0.99 urists will be shot at "divide by zero" speed. This is absurd since the crossbow hasn't propelled the projectile with more force. Decreasing the bolt's weight by a negligible amount has made it orders of magnitude more dangerous. This problem wouldn't exist if Toady was using a floating point calculation for the bolt weight and shoot force.

Interesting knockback implication - by increasing the velocity cap to, say, 2'000'000 (or higher) and leaving shoot force as is, crossbows with lightweight bolts (wood and candy) should become very fun knockback guns.

[Edited for fallacious formulas]
« Last Edit: October 23, 2012, 05:34:14 pm by Zivilin »
Logged
No signature

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile

...
On that note, here is a plot of deflection vs [SHOOT_FORCE] for iron bolts fired at arena dwarves (no pain->no unconciousness) wearing steel helm, breastplate, greaves, low boots, and gauntlets:
Spoiler: deflection vs. force (click to show/hide)
It jumps from 100% at force=47 to 22% at force=48, and then tails off rather smoothly from there.  I am going to try running for some different armor/ammo combinations today, but my scripts keep stalling lately for some reason, so not sure if it will work.

So 47/48 is the velocity deflection threshold for Iron vs Steel. We can assume that there is another discrete binary deflection mechanism which can be uncovered here, similar to the IMPACT_YIELD threshold. And an even more interesting non-binary relationship for velocities above the threshold. A study of this will probably explain how wood vs candy deflections work.
...

The previous IMPACT_YIELD studies were done at SHOOT_FORCE 1000, which results in velocity 1000 in iron bolts. It also required iron to have [IMPACT_YIELD:26666] to deflect. Iron normally has [IMPACT_YIELD:542500]. Pirate Bob's test above was presumably done with unmodded iron bolts. 26666/542500 = 0.0492 = 49.2/1000. This might not be another mechanism.

sayke

  • Bay Watcher
    • View Profile

folks, this is fantastic! who knew there were weird integer rounding effects in there?? =D now the question is, given this decidedly weird algorithm for calculating bolt characteristics, what *should* appropriate values end up being?

i realize that the ideal situation would involve toady using floating points for bolts, but until that day...!
Logged
i play the incredibly awesome Masterwork DF mod - a wonderful blend of simplicity and new features that actually improves FPS!

Pirate Bob

  • Bay Watcher
  • [ETHIC: TORTURE_FOR_SCIENCE: ACCEPTABLE]
    • View Profile

Here are some limited results for killing Arena Dwarves wearing plate armor (helm, breastplate, greaves, low boots, gauntlets).  They are very spotty, as the simulations failed to run properly for almost half of the attempts.  I think it may have something to do with loading the arena which uses the cell format, as I started having problems when I switched arenas.  Maybe it would help if I replaced a few of the upper levels with empty space?
Spoiler: Shoot Force 50 (click to show/hide)
Spoiler: Shoot Force 60 (click to show/hide)
Not too much surprising here. One exception - bone bolts seem to deflect less than metal, at least for the results I have.
The previous IMPACT_YIELD studies were done at SHOOT_FORCE 1000, which results in velocity 1000 in iron bolts. It also required iron to have [IMPACT_YIELD:26666] to deflect. Iron normally has [IMPACT_YIELD:542500]. Pirate Bob's test above was presumably done with unmodded iron bolts. 26666/542500 = 0.0492 = 49.2/1000. This might not be another mechanism.
I kind of think this is a different mechanic, as I think silver and bone have a lower impact yield than iron, but I don't know if I want to bet against Urist da Vinci again...

SharkForce

  • Bay Watcher
    • View Profile

i'm a bit late to this party, i know, but i've got a possible solution for your range:20 tests to be more reliable (ie the dwarf being shot shouldn't move at all). too bad i didn't see this back a ways, but just in case it helps...

you just need to have a nice, deep pit. unless things have changed (which i suppose you could test for at the same time), range downward for crossbows is treated the same as range in any other direction... so a dwarf that is 20 z-levels down should be at range 20.
Logged
Pages: 1 ... 8 9 [10] 11 12 ... 19