Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: What does squareness do in combat?  (Read 687 times)

Digganob

  • Bay Watcher
    • View Profile
What does squareness do in combat?
« on: January 12, 2024, 03:17:16 am »

If you remove randomness in size and strength from humans in the raws, and spawn a couple in the object testing arena, and use quick stabs with a steel shortsword against an iron mail shirt, what you will find is that you may or may not penetrate that shirt. But strangely, the "squareness" of the attack seems not to affect that likelihood very much, if at all. I have sometimes penetrated with a low-squareness attack, only to have a higher squareness attack be blocked, on the same target, on the next attack.

That by itself is interesting, because it implies that there is factor which varies randomly from attack to attack which effects either the momentum of your attack, or directly affects the armor penetration check. But this also means that squareness doesn't do quite what we'd expect it to. If squareness determined what percentage of potential momentum actually hits the target, then it would more strongly determine penetration of armor. But its role is apparently very small, or nonexistent, in armor penetration.

So, my simple question is, what does it do then? I wouldn't think it is useless. It's one of the two factors to consider when making an attack. But its use is not obvious given this information.

Bonus question, if anyone has any ideas: What is the other random factor in combat? Since there apparently is one besides squareness, what might it be?

This was all tested in .47, by the way, the most recent version with adventure mode released.
Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: What does squareness do in combat?
« Reply #1 on: January 13, 2024, 06:48:06 am »

I don't have a definite answer for you, but my experience has been that "squareness" affects how much damage a strike does.  Whether a strike penetrates armor is not related to damage *I think* (could easily be wrong).
Logged

FourierSeries

  • Bay Watcher
    • View Profile
Re: What does squareness do in combat?
« Reply #2 on: January 13, 2024, 09:43:52 am »

As mikekchar said it's more related to potential damage. You might think of squareness as your character's perception of how much damage your weapon will deal if you strike the target. Also, squareness is trying to take into account things like positioning of combatants, positioning of body parts, etc. All that is not usually very clear from just looking at the local map. So, you are getting a relative estimate of the end results, if. It's not a guarantee as that perception does not take into account the entire attack process.

The defender might dodge or parry making perceived squareness meaningless.

In your case reaching the point of the armor effectiveness check can render it meaningless. A "Very Square" attack on a lucky defender means you smack the armor squarely, the armor deflected the attack squarely, and no damage got through. A "Can't quite connect" attack on an unlucky defender means you get through the armor and deliver some hurt. I suspect the relatively low skill levels of the combatants you spawned are what's allowing the randomness factor in the armor check to dominate the results. Relatively low, as compared to such skills as most adventures quickly reach, or what militarized citizens obtain with even only a modest training program in fortress mode.

If nothing else your setup demonstrates how important armor is. Even the lower material quality iron armor is proving itself useful against a higher material quality steel weapon.

Now, feel free to chow down on a grain of salt. While my explanation might sound authoritative, I'm not (and am far from being) the resident expert on combat mechanics.

I thought I once read a post thoroughly detailing a step-by-step walk through of the melee attack process, highlighting the various interactions with lots of gloriously gory details as the player-base and community understand them. Even if I'm misremembering what never was someone ought to compile and post such. Such a guide might not reflect the exact algorithm Dwarf Fortress combat follows, but it would certainly help.
Logged
I don't think losing guts actually kills you, you just throw up and pass out and bleed to death.
This was supposed to be a cool upgrade. All I got was more hostile zombies.

Digganob

  • Bay Watcher
    • View Profile
Re: What does squareness do in combat?
« Reply #3 on: January 14, 2024, 12:18:22 am »

As mikekchar said it's more related to potential damage. You might think of squareness as your character's perception of how much damage your weapon will deal if you strike the target. Also, squareness is trying to take into account things like positioning of combatants, positioning of body parts, etc. All that is not usually very clear from just looking at the local map. So, you are getting a relative estimate of the end results, if. It's not a guarantee as that perception does not take into account the entire attack process.

The defender might dodge or parry making perceived squareness meaningless.

In your case reaching the point of the armor effectiveness check can render it meaningless. A "Very Square" attack on a lucky defender means you smack the armor squarely, the armor deflected the attack squarely, and no damage got through. A "Can't quite connect" attack on an unlucky defender means you get through the armor and deliver some hurt. I suspect the relatively low skill levels of the combatants you spawned are what's allowing the randomness factor in the armor check to dominate the results. Relatively low, as compared to such skills as most adventures quickly reach, or what militarized citizens obtain with even only a modest training program in fortress mode.

If nothing else your setup demonstrates how important armor is. Even the lower material quality iron armor is proving itself useful against a higher material quality steel weapon.

Now, feel free to chow down on a grain of salt. While my explanation might sound authoritative, I'm not (and am far from being) the resident expert on combat mechanics.

I thought I once read a post thoroughly detailing a step-by-step walk through of the melee attack process, highlighting the various interactions with lots of gloriously gory details as the player-base and community understand them. Even if I'm misremembering what never was someone ought to compile and post such. Such a guide might not reflect the exact algorithm Dwarf Fortress combat follows, but it would certainly help.

I have indeed heard that squareness affects damage, though it appears not to be through actual attack momentum, as momentum is more directly related to armor penetration.

I suppose that squareness as you suggest, might have to do with potential damage, but particularly in what the strike damages. Mayhaps a grazing strike, even if the momentum is quite high because of the attack type and weapon, will only damage surface tissues, and not any organs. Or perhaps it has to do with penetration, so that an attack which technically has enough momentum to bisect a creature will instead only get through half of it.

Anyways, just from the limited testing I did, it doesn't appear that squareness has a consistent effect on armor penetration at all, which seems to indicate its effect is secondary. Which, I suppose, makes some sense... but also doesn't. If a stab is squarely against armor, shouldn't it have a higher chance to penetrate? The other factors in penetration are otherwise completely invisible.

As for information on combat, these posts:

http://www.bay12forums.com/smf/index.php?topic=131995.135

http://www.bay12forums.com/smf/index.php?topic=142372.0

Seem to give the most information on how momentum and penetration work. But they appear to be, in large part, outdated, as my calculations of some equations seem to indicate certain attacks to be unable to penetrate, when they can do so consistently. But I may have missed something in how the equations work.

Anyways, your comment gave me some leads on what to test next for research on this subject, so thank you. I'm trying to work on a mod which introduces new weapons and armor, so I'm doing research in order to practically balance weapons and weapon attacks. For instance, I would want to make penetrating iron mail with an iron sword difficult, requiring a heavy attack, even then having a chance to deflect, and a small chance for that same iron sword to penetrate a steel mail shirt. In particular, it seems very difficult to figure out how exactly momentum and armor volume are connected, though they apparently are. The combat formula on the wiki appeared erroneous in that regard. But more testing is required, and variables must be isolated.

I'll probably try to bring this general subject up at the Future of the Fortress, especially if I can get some good practical data on how this stuff works.
Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: What does squareness do in combat?
« Reply #4 on: January 14, 2024, 08:32:36 pm »

I think you are correct that armor penetration isn't affected by *anything*.  It's just a chance to penetrate.  The squareness, etc, is used to determine the amount of damage.  Whether it *should* do that or not is not something I particularly have an opinion on.  Penetrating armor in real life is more complex than just how effectively you hit the target.  A lot of it has to do with if you hit gaps in the armor.  At some point you have to abstract that into something that's less complicated.  *How* you do that, and what's important to model or not model is really up to the game designer.  Sometimes simpler mechanics are better than complex mechanics from a game play perspective.

Because you are making your own mod, obviously you have opinions :-)  *You* are trying to be the game designer, but you have limited ability to change the engine.  When I see these kinds of discussions, I get a bit frustrated with opinions that something *should* act some way or *should not* act some way.  I'd rather see questions like "How does is work now" and opinions like "I would be great if it worked like X because then I could do Y".
Logged