Bay 12 Games Forum

Please login or register.

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

Author Topic: How is armor strength determined in the raws?  (Read 1298 times)

Digganob

  • Bay Watcher
    • View Profile
How is armor strength determined in the raws?
« on: October 08, 2023, 04:29:23 pm »

I want to make different types of armor, but I am at a loss as to how armor strength is precisely determined. My best idea is that it is determined by LAYER_SIZE.

For instance, could you make two breastplate items, which cover the same areas, and are made of the same material, but which offer different strengths of protection? Or, for instance, make a chainmail shirt which is stronger than the vanilla chainmail shirt? Or a helmet that is stronger than the vanilla helmet?
Logged

IronyOwl

  • Bay Watcher
  • Nope~
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #1 on: October 09, 2023, 01:09:08 am »

My very limited understanding is that "strength" is entirely based on material and hardcoded armor type behavior (that is, rigid vs flexible), and moddable stats are limited to how much it covers (that is, how likely it is to intercept a hit), where it is worn (helmet, footwear, etc), and what may be worn alongside it (layer, permit, size). AFAIK the only way to make "stronger" armor is to let you layer it more, so you're able to wear two breastplates instead of one.
Logged
Quote from: Radio Controlled (Discord)
A hand, a hand, my kingdom for a hot hand!
The kitchenette mold free, you move on to the pantry. it's nasty in there. The bacon is grazing on the lettuce. The ham is having an illicit affair with the prime rib, The potatoes see all, know all. A rat in boxer shorts smoking a foul smelling cigar is banging on a cabinet shouting about rent money.

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #2 on: October 09, 2023, 03:12:22 am »

Increasing coverage and size also seems to make it be modeled as thicker as well. Several mods have made armor much more effective simply by jacking the coverage up on the armor items in question.

Digganob

  • Bay Watcher
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #3 on: October 09, 2023, 08:15:14 am »

Increasing coverage and size also seems to make it be modeled as thicker as well. Several mods have made armor much more effective simply by jacking the coverage up on the armor items in question.

The coverage? But that's just the likelihood that the armor is hit when a body part is attacked. The size makes sense for it to affect strength, but that would be very wacky if coverage did. Hmmm...

How would I go about testing this? If I remember correctly, arena mode on the non-steam version allows you to control creatures directly or something, right?
Logged

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #4 on: October 09, 2023, 01:30:18 pm »

Increasing coverage and size also seems to make it be modeled as thicker as well. Several mods have made armor much more effective simply by jacking the coverage up on the armor items in question.

The coverage? But that's just the likelihood that the armor is hit when a body part is attacked. The size makes sense for it to affect strength, but that would be very wacky if coverage did. Hmmm...

It's something I've noticed several mods do, not sure why it would, but if I were to guess (and this is only a guess, don't quote me on it only Putnam or Toady would ever be able to confirm,) is the "excess" coverage is divided around the covered areas and subsequently factored into the interception calculation. So making coverage say, 200 instead of 100 would double the chances of the covered areas having the armor stop (or at least impede) an attack.

But again, don't quote me on that, it's simply a weird quirk of DF's engine that seems to work without solely relying on [SIZE:(whatever)] alone which could make armor too heavy to move in.

Digganob

  • Bay Watcher
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #5 on: October 09, 2023, 02:16:02 pm »

Well now, that is quite strange. I suppose it could prove useful in specific circumstances. I do hope the size is as useful as is supposed in simply making it stronger, though. That would be good for balancing some armor against others.
Logged

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #6 on: October 09, 2023, 02:36:06 pm »

Going by the wiki, which granted shouldn't be taken as gospel right now since as far as I know !!SCIENCE!! on this stuff hasn't been done in a long time, size (or layer size rather, my apologies) also affects weight and price, so if something has too high a layer size, it becomes impractical to actually move around in due to sheer encumbrance on top of preventing other stuff being worn with it on the same equipment layer.

Coverage also affects how thickness is calculated and apparently how insulative armor is against temperature, though I dunno if the latter is currently relevant really outside niche situations.

Digganob

  • Bay Watcher
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #7 on: October 09, 2023, 03:07:10 pm »

I have read that, on the armor tokens page. I was thinking that's the best way to balance armor in a mod, probably. For instance, I was wanting to add lamellar and perhaps brigandine as lower-end rigid armor which is weaker than plate, but balanced by a lower weight that allows for less experienced armor users to wear it effectively, and also as an option for civilizations which it wouldn't make sense to give breastplates to. Although they'd perhaps not be too different in layer size.

As for coverage, it seems that it should be split into multiple different tokens, then. The likelihood that a strike will hit it is useful in its own right, but ought to be determined separately from things like the thickness of what coverage remains, seems to me. Hopefully they'll revamp the armor system come the adventure mode update.
Logged

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #8 on: October 09, 2023, 03:21:05 pm »

I have read that, on the armor tokens page. I was thinking that's the best way to balance armor in a mod, probably. For instance, I was wanting to add lamellar and perhaps brigandine as lower-end rigid armor which is weaker than plate, but balanced by a lower weight that allows for less experienced armor users to wear it effectively, and also as an option for civilizations which it wouldn't make sense to give breastplates to. Although they'd perhaps not be too different in layer size.

As for coverage, it seems that it should be split into multiple different tokens, then. The likelihood that a strike will hit it is useful in its own right, but ought to be determined separately from things like the thickness of what coverage remains, seems to me. Hopefully they'll revamp the armor system come the adventure mode update.

I doubt we'll see a massive revamp anytime soon. What's there is "good enough" and has been for a long while now, with the only real change added to combat in recent years being torsion damage to limbs potentially negating the protection armor offers (by twisting a limb so badly soft tissues are torn or a neck is essentially broken,) which can still be countered a bit by strength and toughness.

That said, tinkering around with layer size could yield some interesting results.

Digganob

  • Bay Watcher
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #9 on: October 09, 2023, 04:14:43 pm »

I could think of a few good things for them to add, not the least of them being armor that covers facial features. Though, what is already there is quite impressive already, the torsion especially.

By the way, I took a look at your expanded vanilla mod, and I noticed you made your "visored helmets" armor level 3 instead of 2 like normal helmets. Would you tell me what effect this has? I had heard it might have an impact on protection, but I haven't seen any actual science concerning it, and mention of it is sparse. For instance, if I made chainmail armor level 3, what effect would that have?
Logged

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #10 on: October 09, 2023, 04:26:40 pm »

I could think of a few good things for them to add, not the least of them being armor that covers facial features. Though, what is already there is quite impressive already, the torsion especially.

By the way, I took a look at your expanded vanilla mod, and I noticed you made your "visored helmets" armor level 3 instead of 2 like normal helmets. Would you tell me what effect this has? I had heard it might have an impact on protection, but I haven't seen any actual science concerning it, and mention of it is sparse. For instance, if I made chainmail armor level 3, what effect would that have?

I think it might determine the kinds of gear that might be available or preferred, by world-gen troops specifically but I know level 3 will absolutely only be used by melee troops while level 1 is mostly used only by ranged troops, but they'll pull from level 2 if no level 1 items are available, and level 1 is usually the domain of clothe and leather armor. "Low quality" world gen melee troops also sometimes use crappier alternatives (like leather armor, leggings and helmets instead of metal ones or breastplates) while highly skilled melee troops will sometimes have a full panoply of plate armor with a mail shirt.

I basically did it to make sure helmets with comparatively restrictive fields of vision don't have a chance of being spawned on non-player ranged soldiers.

EDIT: I should specify that ultimately much of what's in SVE is designed with flavor in mind, visored helmets have no effect on unit vision arcs in gameplay terms.

Digganob

  • Bay Watcher
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #11 on: October 09, 2023, 05:24:23 pm »

Ah, that is extremely useful to know. I thank you kindly. That's exactly the sort of thing I would like to manipulate with my mod. Like full knight-type helmet being level 3, and other being level 2. I'll have to give your mod an in-depth look get some ideas and help me make my own. Anything I ought to know about cloth armor? Gambesons would be a great addition if I can get them to work as they should, and I see you added some to your mod.
Logged

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #12 on: October 09, 2023, 05:38:33 pm »

I have yet to run things long enough or pay close enough attention, but the way I set them up there should be a chance (emphasis on chance) for worldgen troops to spawn with them as long as they have some kind of armor level above 0 and they're in the entity to use it. However with that in mind, it's only a chance and any soldier has a chance to roll up all kinds of combinations if there's more than the standard stuff.

It's also worth noting world-gen ranged troops will never bring shields, regardless of armor level. The armor level of bucklers being 1 is why worldgen melee troops never bring them.

Armor made of standard cloth or leather though'll generally wear out extremely quickly and likely need frequent replacement. On the other hand it will be very light and something as simple as a leather helmet or cloth armor can be the difference between minor and major injuries and with a strong fabric industry or good trade and animal husbandry, sourcing replacements is far less of an issue than it might be for replacing metal arms or armor.

Digganob

  • Bay Watcher
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #13 on: October 09, 2023, 07:51:04 pm »

A chance for cloth armor to show up you mean? Hm. Do you think that if it were not shaped, that it would be equipped more often? Considering that there's only a space for one shaped item on each body part. My goal would be for it to be equipped pretty much always under other armor, like chainmail is already.

Speaking of logistics, will availability of different materials affect the likelihood that different armor is brought? Specifically, if for instance iron is made very sparse due to mineral scarcity in world generation, is it less likely even melee troops will bring metal armor? I suppose this isn't particularly useful for the mod, but it would be cool to have something of a "historically accurate" world made where metals are far rarer, so metal-armored enemies are thus rarer, and so equipping my own troops with the same would be more difficult, but rewarding. Given the absolute value of items and materials in the game, though, it wouldn't mean that it's any more expensive, unfortunately. That would certainly make adventure mode more difficult.
Logged

Splint

  • Bay Watcher
  • War is a valid form of diplomacy.
    • View Profile
Re: How is armor strength determined in the raws?
« Reply #14 on: October 09, 2023, 08:17:40 pm »

Yeah, there'd be a chance for the cloth armors, and you could change their layer to under, but that would likely have it compete with chair armor since worldgen troops don't use the same meta armor layering of mountains of cloaks, multiple shirts and so forth.

I'd personally gone with shaped because a gamebson or other cloth armor thick enough to offer protection on its own would likely be too thick to reasonably layer more extensive armor over.

As to availability I don't actually know. The way metals are generated for a civ right now seems to require either the [METAL_PREF] entity token (going by Kobolds,) the furnace operator job and metal-bearing stone in their environment, or reactions to make a metal, which poof them into being.
Pages: [1] 2