Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Multiattack testing science  (Read 969 times)

Stimraug

  • Bay Watcher
    • View Profile
Multiattack testing science
« on: January 21, 2023, 10:25:51 pm »

Hey,

I'm making modifications to the weapons raws, and earlier posted a question about weapon attack speed here: http://www.bay12forums.com/smf/index.php?topic=181149.0

To this day none of the over 150 viewers could provide an answer, so I went ahead and wrote some tests and a text parser program to parse the combat logs and came to the following

Link to imgur album of results: https://imgur.com/a/E6tg3sO

Conclusions
+ A multiattack allows for another free attack with something else than the same weapon. For example, a multiattack from WHM1 can enable a dual-wielded WHM2 to strike, which can be a
multiattack that enables a punch, but not a kick because kicks have the tag "ATTACK_FLAG_BAD_MULTIATTACK".
+ The amount of multiattacks a weapon is modded with does not allow for more attacks with that weapon per se, but it does increase both the probability that one of those multiattacks is
used as a combo after a multiattack from a dual-wielded weapon, and the probability for that weapon being selected for the initial attack itself instead of another, most likely weaker secondary attack.
+ Non-multiattacks end combos.
+ Weapons can be balanced by modding in copies of the same attack to tamper with the probabilities of various attacks being selected. For example, adding copies of a normal attack will decrease
the probability that another attack, for example a multiattack or a secondary punch attack is chosen.
+ The wiki-description for the multiattack tag at least to me seems vague and uninformative: "Multiple strikes with this attack can be performed with no penalty."
+ Among many suggestions to modders that come to mind, one is to make those weaker pommel and flat attacks multiattacks so that at least they'll combo with a punch or other secondary attack.

Test parameters
+ Map is object testing arena in DF 47.05, modified to have 64 open pits for fights.
+ Each test is 64 dwarves fighting 64 vanilla giant moose cows.
+ Each dwarf is given grand master skill level in fighter, hammerdwarf, armor user, shield user and dodging.
+ Dwarves have been modded to have a non-latching bite attack.
+ Equipment includes adamantium warhammer(s) and iron shield, iron breastplate, iron helm, iron gauntlets, iron greaves, iron high boots.
+ The modded war hammer has a velocity multiplier of 1 (0.001x) for minimal damage and modded with various amounts of normal and multiattacks depending on the test.
+ Many animals were tested, and the Giant Moose Cow selected for the tests, because 99% of the fights follow the same pattern. The dwarf deals non-crippling blows until it passes out of exhaustion and is then killed.
+ Tests 0A and 0B are control tests.

Test 0A: One normal WHM with one normal attack + shield.
Test 0B: Dual WHMs modded with one normal attack.

Test 0A and 0B observations
+ In both tests, the percentage of non-weapon attacks of all connected attacks is about 22%. This clearly indicates that dual-wielding weapons grants no additional attacks.
+ Tests 1-3 will attempt to clarify how multiattacks work with a single weapon.
+ Tests 4-6 will attempt to clarify the relationship between dual-wielding and multiattacks.

Test 1A: One WHM modded with one multiattack + shield.
Test 1B: One WHM modded with two multiattacks + shield.
Test 1C: One WHM modded with three multiattacks + shield.

Test 1 observations
+ The amount of secondary attacks, mostly punches, rises when you have a weapon with multiattacks, suggesting that a multiattack is commonly followed by another attack. Because the amount of weapon attacks does not rise in relation to other attacks when the weapon is given multiple multiattacks, it seems a weapon cannot multiattack after multiattacking.
+ Test 2 will determine whether a non-multiattack can be followed by multiattacks, or if a multiattack is necessary to start a combo chain with.

Test 2A: One WHM modded with one multiattack and one normal attack + shield.
Test 2B: One WHM modded with two multiattacks and one normal attack + shield.
Test 2C: One WHM modded with three multiattacks and one normal attack + shield.

Test 2 observations
+ Again, the amount of secondary attacks (punches) is high because the multiattacks enable combos.
+ As expected, the rising "average of multiattacks to all attacks ratios" suggests that a weapon that has additional multiattacks has a higher chance of picking a multiattack as an attack instead of the singular normal attack.
+ The question asked in test 1 seems to be answered with "No, a weapon cannot chain attacks with itself, multiattack or not. Multiattacks seem to only work as combostarters, enabling another attack to follow it."

Test 3A: One WHM modded with one multiattack and two normal attacks + shield.
Test 3B: One WHM modded with two multiattacks and two normal attacks + shield.
Test 3C: One WHM modded with three multiattacks and three normal attacks + shield.

Test 3 observations
+ Amount of hits is smoothly distributed between normal and multiattacks, confirming that neither comboes with the other on the same weapon.
+ Adding several instances of the same (multi)attack to a weapon mainly causes an indirect damage increase, as a weapon attack is selected more often as a first attack than another, most likely weaker attack from the available pool of attacks. There seem to be no other effects.

Test 4A: Dual WHMs modded with one multiattack.
Test 4B: Dual WHMs modded with two multiattacks.
Test 4C: Dual WHMs modded with three multiattacks.

Test 4 observations
+ The amount of secondary attacks (punches, scratches etc.) compared to multiattacks seems to linearly decrease as the amount of multiattacks between the dual-wielded war hammers increases. This seems to be a consequence of the fact that after a multiattack the following combo attack chosen is a more often a multiattack from the other weapon instead of a secondary attack (punch, scratch etc.). In other words the amount of combos that include two weapon attacks instead of a secondary attack increases.
+ Perusing the combat logs closer it can be seen that f.ex. combos of bash-bash-punch are not uncommon.
+ Test 5 should answer the question of whether there is a difference between test 4's weapons and ones that also have a normal attack mixed in.

Test 5A: Dual WHMs modded with one multiattack and one normal attack.
Test 5B: Dual WHMs modded with two multiattacks and one normal attack.
Test 5C: Dual WHMS modded with three multiattacks and one normal attack.

Test 5 observations
+ We can observe that as the amount of multiattacks grows, the ratio of weapon attacks to punches decreases, indicating that mixing multi- and normal attacks doesn't offer any benefit over just having multiattacks in a weapon, but just shows again that as the amount of multiattacks go up, so do secondary attacks like punches.
+ Test six is expected to demonstrate that as the amount of normal attacks in a weapon grows, the amount of multiattacks will decrease, and thus lower the weapon's overall damage.

Test 6A: Dual WHMs modded with one multiattack and two normal attacks.
Test 6B: Dual WHMs modded with two multiattacks and two normal attacks.
Test 6C: Dual WHMs modded with three multiattacks and three normal attacks.

Test 6 observations
+ Test 6 seems to indicate nothing new: usually a multiattack or normal bash is selected as the first attack. Then, if it was a multiattack, commonly either a secondary attack or a primary attack from the other weapon is selected, with the weapon attack preferred. In the case of a normal attack the combo ends.
+ Expected hypothesis presented in test 5 about test 6 is confirmed.


Further suggested tests
+ Tests about the probability of choosing an edged attack vs. a blunt attack and how to accurately manipulate attack selection chances.

Link to the project, files, logs, screenshots, executables: https://drive.google.com/file/d/1dL6WRfSOZtPKqFMdlk_r_KJ4XiWK1kCN/view?usp=sharing
The executables contain Windows, Linux and OSX versions, only the windows one has been tested. Place the .exe in the same folder where your gamelog.txt is in.

Some statistics:
+ About 1300 dwarves gave their lives for a greater purpose at the clutches of giant moose cows.
+ Enough blood was spilled in Armok's name to paint a 3x3 embark area completely red.
+ The total amount of lines parsed from the combat logs is around 540 000.

Thanks for reading, and I hope this is useful for someone, or atleast a case of pointless, but dwarven, !!!SCIENCE!!!

- Stimraug
« Last Edit: January 24, 2023, 09:00:29 am by Stimraug »
Logged

Drakonis

  • Bay Watcher
    • View Profile
Re: Multiattack testing science
« Reply #1 on: January 23, 2023, 01:17:34 pm »

Thanks for the science!

I'm at work so could only read up to test 3 so far.
If I could however nitpick a little. Could I bother you to include the counts of regular/multis in each of those tests?

My pseudo/frustrated cientist brain is missing numbers to get a better grasp at the effects of the changes you tested =/
Logged

Stimraug

  • Bay Watcher
    • View Profile
Re: Multiattack testing science
« Reply #2 on: January 24, 2023, 09:01:05 am »

Thanks for the science!

I'm at work so could only read up to test 3 so far.
If I could however nitpick a little. Could I bother you to include the counts of regular/multis in each of those tests?

My pseudo/frustrated cientist brain is missing numbers to get a better grasp at the effects of the changes you tested =/

Thanks, I realized I should have added a link to the result screenshots instead of letting them be buried in the google drive files. I added a link to the beginning of the post, does that help, or would you still like something else?
Logged

Drakonis

  • Bay Watcher
    • View Profile
Re: Multiattack testing science
« Reply #3 on: January 24, 2023, 01:55:35 pm »

Nope, that was it.

Awesome work :)
Logged