Bay 12 Games Forum

Please login or register.

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

Author Topic: Patch for 0.34.11 momentum bug & notes on combat mechanics  (Read 7233 times)

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Patch for 0.34.11 momentum bug & notes on combat mechanics
« on: September 26, 2013, 10:13:05 pm »

Know the common forum/wiki wisdom about heavier blunt weapons being more powerful? It turns out that it isn't necessarily true, because DF calculates the momentum of a swung weapon using a huge number of factors. Ignoring some of the variables, light weapons are generally swung faster than heavy weapons.

However, in 0.34.11 there is a bug in the code that checks the weight of the weapon, causing weapons with large fractional weights to have more momentum than they should. For example, a weapon with weight 0.999999 does double the damage of a weapon of weight 1.000000. See http://www.bay12games.com/dwarves/mantisbt/view.php?id=6364

At the linked bug tracker page above, I posted a binary patch that fixes the bug. The image below shows the difference in momentum Y between the bugged and patched games for a human holding a weapon of X weight:


Copper whip has density 8930 and weight 0.893. Silver whip has density 10490 and weight 1.049. If you read from the chart, it looks like the copper whip hits 1.8x as hard as the silver whip. If you apply the patch, the silver whip is only slightly better than the copper whip. Not that momentum is the only factor that matters - other material properties also affect damage.

I am pleased that I can now join the "binary patch club" with Quietust, who has done around a dozen patches AFAIK. I have some other general observations on the 0.34.11 combat mechanics that I might post in this thread, if I get my paper notes organized.

smjjames

  • Bay Watcher
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #1 on: September 26, 2013, 10:44:20 pm »

Is that chart just whips?
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #2 on: September 26, 2013, 11:54:15 pm »

Is that chart just whips?

Actually I used a steel axe of constant size and varying weight (density) for the chart. The bug applies to anything. The chart doesn't show the effects of randomness, squareness, weapon skills, or other situationals - I just isolated the effects of weapon weight.

I mentioned whips because they are size 100, which gives convenient weights when made of weapon metals.
Code: (weights) [Select]
weapon     iron/steel copper addy silver bronze
battle axe 6.280 7.144 0.160 8.392 6.600
short sword 2.355 2.679 0.060 3.147 2.475
whip 0.785 0.893 0.020 1.049 0.825
spear 3.140 3.572 0.080 4.196 3.300
pick 3.925 4.465 0.100 5.245 4.125
war hammer 3.140 3.572 0.080 4.196 3.300
With the bug, steel picks are awesome.

SeelenJägerTee

  • Bay Watcher
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #3 on: September 27, 2013, 10:29:55 am »

This is awesome.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #4 on: September 27, 2013, 07:21:19 pm »

With the bug, steel picks are awesome.
I wonder how awesome they are without it? Picks by themselves have pretty good numbers, but the iron and steel ones are the only ones on the list getting a major boost.
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.

Di

  • Bay Watcher
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #5 on: September 28, 2013, 10:50:30 am »

Well, according to the graphics, the fixed steel ones are around 70% as awesome as they were. Apart from whips nothing gets all that significant boosts.
« Last Edit: September 28, 2013, 10:52:29 am by Di »
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #6 on: September 28, 2013, 03:24:45 pm »

*whimsical musing

I find it interesting that a game that is notorious for being "Unwinnable", and "Inscrutably hard", would receive a community binary patch to make it EVEN MORE DIFFICULT.

/whimisical

Welcome to DwarfFortress everyone!~
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #7 on: September 29, 2013, 02:55:23 am »

This binary patch is now included in my Lazy Newb Pack.  Thanks!
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Lielac

  • Bay Watcher
  • [ETHIC:PEDANTRY: PERSONAL_MATTER]
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #8 on: September 29, 2013, 03:54:00 am »

This binary patch is now included in my Lazy Newb Pack.  Thanks!

Okay, utterly off-topic, but that icon is my NaNoWriMo icon and so when I saw it I went WAIT IS THA-- NO IT'S NOT but uh yeah little bit confusing. Also, dai stihó, cousin! :D

ANYWAY ON-TOPIC: Thank you for the info on what weapons I should equip my militaries with in this edition, it's most informative, I'll just have to remember that their days of awesome are numbered.
Logged


Lielac likes adamantine, magnetite, marble, the color olive green, battle axes, cats for their aloofness, dragons for their terrible majesty, women for their beauty, and the Oxford comma for its disambiguating properties. When possible, she prefers to consume pear cider and nectarines. She absolutely detests kobolds.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #9 on: September 29, 2013, 01:05:52 pm »

...
Thank you for the info on what weapons I should equip my militaries with in this edition, it's most informative, I'll just have to remember that their days of awesome are numbered.

Weapon selection isn't THAT simple:

Edged weapons:
Choose weapon materials with a high SHEAR_FRACTURE and MAX_EDGE. Weapon quality matters as well. Due to the shear fracture difference, steel has a 2.3x easier job of severing someone's unarmored leg as an iron weapon. Adamantine is 69x better than iron and 161x better than steel (based on SF and max edge), but this is offset somewhat by the decreased weight and momentum of adamantine weapons. Your edged weapon can't cut materials that have better SHEAR properties than the weapon.

Don't use edged weapons with large contact areas on giant-sized creatures such as forgotten beasts. You end up placing shallow cuts across a large area. Stabby things are better there. Save the battle axes for man-sized targets. Picks are still better weapons than battle axes because of the velocity modifier.

Blunt weapons:
Pick a weapon with a high momentum and small contact area. I recommend war hammers. Weapon quality doesn't seem to matter here. If attacking something big and heavy with a small blunt weapon, your weapon needs to have a high IMPACT_YIELD and IMPACT_FRACTURE to not bounce off (but these material properties don't boost damage!). This prevents people from punching bronze colossuses with their meaty fists, I guess.

Armor selection:
High SHEAR_FRACTURE to resist edged attacks. High IMPACT_FRACTURE on rigid armor to resist blunt attacks. It's best to have IMPACT_YIELD around half of IMPACT_FRACTURE. Armor becomes brittle if IY is too close to IF, but low IY materials dent easily.

Flexibility is BAD on armor. Blunt attacks bypass flexible armor/tissue, so anything with strain values 50000+ doesn't protect against blunt weapons. This includes chain mail, clothing, leather, skin, fat, muscle, etc. Metal mail is still good against edged weapons, but it just converts the damage to a blunt attack! Leather is barely useful and can generally be forgotten/ignored (modders may want to look at this). Wood and bone are better non-metal armors vs blunt attacks. With a IMPACT_STRAIN_AT_YIELD of 940, rigid steel plate only transmits 1.88% of the momentum of a blunt attack to the tissue below (providing that the attack didn't fracture the steel plate).

Fluid layers such as water, gas, flame, sand, snow, powder, etc. on creatures don't consider material properties, and seem to fail instantly.

If you stab someone's armor with a weapon, and it can't cut through but causes the armor to blunt fracture, the weapon effectively shatters a hole in the armor and causes edged damage to the tissue below. The main difference between armor layers and tissue layers is that armor doesn't track wounds/damage, so armor is equivalent to instantly-healing skin.

Other:
Railguns crossbows/bows fire bolts/arrows that have a momentum about 10x larger than you can get from a skilled melee fighter.

Any questions?

Cattani

  • Bay Watcher
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #10 on: September 29, 2013, 01:43:13 pm »

When you say "blunt fracture" on armor, you mean when the armor get hit by blunt-damage so high it overcomes the IMPACT_FRACTURE variable of the material?
So, if I get myself a dwarf wearing a steel breastplate over a steel chainmail and use the general wiki knowledge that metal breastplates protect well against most not-blunt damage (which means that blunt damage would be most effective against my armor-clad dwarf), my dwarf would mainly be harmed by blunt attacks, but those would have to "shatter" the breastplate to have any effect, and if I put a chainmail under the breastplate it will soak almost all the edged damage the shattering would generate.
So my dwarf is almost invencible.
Am I doing it right?

Edit: That does not seem right at all. My dwarves die all the time regardless of armor. But the armored ones take a little more effort to kill. The more I read this, the more I think I'm doing something terribly, terribly wrong
« Last Edit: September 29, 2013, 01:48:19 pm by Cattani »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #11 on: September 29, 2013, 09:54:41 pm »

When you say "blunt fracture" on armor, you mean when the armor get hit by blunt-damage so high it overcomes the IMPACT_FRACTURE variable of the material?
So, if I get myself a dwarf wearing a steel breastplate over a steel chainmail and use the general wiki knowledge that metal breastplates protect well against most not-blunt damage (which means that blunt damage would be most effective against my armor-clad dwarf), my dwarf would mainly be harmed by blunt attacks, but those would have to "shatter" the breastplate to have any effect, and if I put a chainmail under the breastplate it will soak almost all the edged damage the shattering would generate.
So my dwarf is almost invencible.
Am I doing it right?

Edit: That does not seem right at all. My dwarves die all the time regardless of armor. But the armored ones take a little more effort to kill. The more I read this, the more I think I'm doing something terribly, terribly wrong

Blunt fracture/shattering of armor layers doesn't cause edged damage to the skin, but blunt fracture of a tissue layer (i.e. bone) does jam sharp bone fragments into other tissue layers.

Test case:
Bronze colossus kicks a dwarf wearing a steel breastplate and steel chainmail in the chest. The momentum of the kick is 708841, which is roughly 4500x what a dwarf can do. This is understandable when you consider that the colossus' foot weighs 3580 urist (kg), or about 4 tons (7876 lb) of solid bronze. The game just tells me that "You kick Dwarf 1 in the upper body with your left foot, bruising the muscle and bruising the liver through the small steel breastplate! Dwarf 1 is propelled away by the force of the blow!". Tracing the numbers indicates that first the breastplate is fractured under blunt damage, and then blunt (not edged!) damage is applied to the mail. The blunt bypass effect takes place for the mail, skin, fat, muscle, and liver, setting each layer to 50000 wound strain (bruising). If this had hit a rib bone instead, it would have been shattered and likely jammed into an organ.

If the rigid steel breastplate hadn't shattered (i.e. if it was hit by a cow foot instead of a semi truck), the breastplate would only pass 1.88% of the momentum to the mail instead of 100%. In the cow case, this means that you get bruising in the skin and fat, but the muscle, bones, and organs are ok.

Something I forgot to mention earlier:
Contact area stays constant as a weapon causes edged or blunt damage through layers, regardless of how thick the layers are. You can hit a giant whale with a contact area 1 whip, and the bones will be chipped with a contact area of 1, despite the 3 feet of blubber and flesh between the skin and the bones. IRL the force from a blunt attack should start to cone outwards to a larger area across several flexible layers. Toady really borrows from "The Princess and the Pea" here.

smjjames

  • Bay Watcher
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #12 on: September 30, 2013, 11:19:40 am »

Okay, in using a BC weilding a platnium maul against a rabbit, I keep getting 'attack glances away' on some body parts, can anybody help me understand why that happens? I could see it as barely even connecting, but still.... you'd kind of expect a rabbit to explode under a maul being used by a bronze colossus...

Edit: Glancing away off the upper body when I generally hit it like a golf ball. Granted that the rabbit is tiny compared to the BC and thus smaller target.
« Last Edit: September 30, 2013, 11:23:04 am by smjjames »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #13 on: September 30, 2013, 08:19:20 pm »

Okay, in using a BC weilding a platnium maul against a rabbit, I keep getting 'attack glances away' on some body parts, can anybody help me understand why that happens? I could see it as barely even connecting, but still.... you'd kind of expect a rabbit to explode under a maul being used by a bronze colossus...

Edit: Glancing away off the upper body when I generally hit it like a golf ball. Granted that the rabbit is tiny compared to the BC and thus smaller target.

Tracing the numbers on that, it appears that the game thinks the rabbit is only made of fur and skin, at least on some body parts. Perhaps due to the small size, it is being treated as boneless? Related to how small creatures give less butchering returns.

smjjames

  • Bay Watcher
    • View Profile
Re: Patch for 0.34.11 momentum bug & notes on combat mechanics
« Reply #14 on: September 30, 2013, 08:32:11 pm »

Okay, in using a BC weilding a platnium maul against a rabbit, I keep getting 'attack glances away' on some body parts, can anybody help me understand why that happens? I could see it as barely even connecting, but still.... you'd kind of expect a rabbit to explode under a maul being used by a bronze colossus...

Edit: Glancing away off the upper body when I generally hit it like a golf ball. Granted that the rabbit is tiny compared to the BC and thus smaller target.

Tracing the numbers on that, it appears that the game thinks the rabbit is only made of fur and skin, at least on some body parts. Perhaps due to the small size, it is being treated as boneless? Related to how small creatures give less butchering returns.

Could also be tiny contact area and the tail is mostly hair anyway. The rabbit was pretty dang durable, survived several warhammer strikes that launched it while a dwarf that I tested against got the hammer stuck into the chest a few times.
Logged
Pages: [1] 2