Dwarf Fortress

Dwarf Fortress

177 ratings
Shaped Gloves
2
2
   
Award
Favorite
Favorited
Unfavorite
qol, fix
Tags: mod
File Size
Posted
Updated
70.960 KB
16 Jan, 2023 @ 7:16am
18 Jan, 2023 @ 3:18am
2 Change Notes ( view )

Subscribe to download
Shaped Gloves

Description
Allows military dwarves to change into armored gauntlets despite wearing gloves or mittens.

Please note: I had originally misunderstood one of the complex clothing combination rules. I've updated this mod as a result of being informed about how that rule worked. :)

The game by default permits dwarves to wear:
  • 2 pairs of gloves with 1 pair of mittens
  • 1 pair of gloves with 1 pair of gauntlets
  • 1 pair of gauntlets with 1 pair of mittens

If a dwarf is normally wearing gloves + mittens they will fail to be able to put their armor gauntlets on, because they're not allowed the bulk of all 3 items together.

This mod is based on the same game mechanic of marking clothing items as shaped so that only one of a set of items can be worn at the same time that is used in the Shaped Shoes/Boots mod at https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2908215621. The game already defines gauntlets as SHAPED. This mod marks mittens as also SHAPED so that the dwarves can wear mittens OR gauntlets but never both at once. That results in forcing them to take their mittens off before trying to put their gauntlets on, allowing them to succeed at wearing their gauntlets even when wearing gloves as well.

Note: It does however stop dwarves from being able to wear gauntlets + mittens at the same time.

This is because that would be two shaped items on the same body part. It's a trade off as to whether you'd prefer them to be able to reliably put on their gauntlets at the cost of losing one of the valid clothing combinations or not, which is why I've split this to its own mod instead of adding it to Shaped Shoes/Boots.

I'm continuing to look into whether there is anything better that can be done that won't lose a clothing combination while still making equipping gauntlets more reliable.

An alternative mod for people who are happy to increase the max clothing bulk on hands in order to allow wearing gauntlets + mittens as well as the normally not permiited combination of gloves + gauntlets + mittens is Gauntlet Equip Fix

FAQ:

Can I add this mod to an existing save?

Unfortunately, no. Mods can only be added to a save at world generation time. However, you CAN directly modify the game files yourself to apply the same changes which will then apply to all worlds you are playing.

The benefit when the changes are done as a mod is that game updates won't overwrite the changes, since they're defined in a separate file. The downside is that you can only add a mod to a save when first generating the world. Editing the game files directly lets you add the change to existing saves, but if the game updates or you run steam's "validate files" you'll need to redo the changes.

Applying the change manually can be a good way to get started on your current world, then use the mod for any future worlds. That way when you finish with the current game you would no longer need to keep modifying the game files each update for your future worlds.


How to apply the edits manually so they apply to an existing save:

  • Open the file "Dwarf Fortress/data/vanilla/vanilla_items/objects/item_gloves.txt"
  • Add the "[SHAPED]" tag to the end of the ITEM_GLOVES:ITEM_GLOVES_MITTENS definition.

[ITEM_GLOVES:ITEM_GLOVES_MITTENS] [NAME:mitten:mittens] [LAYER:COVER] [COVERAGE:150] [LAYER_SIZE:15] [LAYER_PERMIT:20] [MATERIAL_SIZE:1] [SOFT] [LEATHER] [STRUCTURAL_ELASTICITY_WOVEN_THREAD] [SHAPED]
17 Comments
Mc.turdle 10 Apr, 2023 @ 2:37am 
thank you for this!
Dawnmist  [author] 20 Jan, 2023 @ 3:07am 
@mohard - you're welcome. I've added a link to yours as an alternative that people may want to consider. :)
mohard 19 Jan, 2023 @ 11:45am 
Well, I didn't expect publishing mods to be that easy, but it was, so here it is: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2920484492 for anybody interested.

Added links to your mods over there.

Thanks @Dawnmist for the inspiration and @GoarillaxJax for the clarifications!
Dawnmist  [author] 19 Jan, 2023 @ 2:37am 
@mohard - go for it. I don't want to be expanding the permits myself as I'm trying to keep within the original clothing bulk limits. You're very welcome to provide the altered limits as another mod, it'll give people choice about how they'd prefer to deal with the situation. :)
mohard 18 Jan, 2023 @ 11:39pm 
@Dawnmits I ran a fort with some changes to mittens to see if it's possible to work around the original issue without removing any valid vanilla combinations.

The changes:
* [LAYER_SIZE:20] (+5 - needed to stop them from wearing too many mittens at once) ((could actually be +10 as well, to be consistent with permit increase))
* [LAYER_PERMIT:30] (+10, needed to fit gloves+gauntlets underneath which are 10+20)

This seems to work out very well. Military dwarves walk around wearing all three. Civilian dwarves in gloves+mittens. No vanilla combination should be lost, since no SHAPED was added. No other non-vanilla combination should be added, I think.

I'll swamp the fort in even more gloves and mittens and let it run for a few more years to see if nothing weird pops up. Some more forts with an artificial scarcity of gloves and/or mittens could also be run to find out other corner cases.

I may even decide to create a separate mod for it if I have the time over the weekend.
Dawnmist  [author] 18 Jan, 2023 @ 3:10am 
So, with gloves & gauntlets shaped, we lose the following vanilla combinations:
* gloves + gloves + mittens
* gloves + gauntlets

If it were changed to gauntlets + mittens being shaped, we'd only lose one vanilla combination:
* gauntlets + mittens.

Given that, I think it better to change to making mittens shaped so that more of the valid vanilla combinations are possible, while I think about whether there is anything else that could be done.
Dawnmist  [author] 18 Jan, 2023 @ 2:59am 
@GoarillaxJax - thank you very much for clarifying that, as I'd found the wiki information confusing. :)

The question then becomes what is the correct way to address the issue. This works, but as I said in the description it comes at a cost. I'd love to fix it in a way that permits all normal vanilla combinations while still ensuring that they take either their gloves or their mittens off when putting their gauntlets on and without violating the original bulk rules. I'll think more about it, and see if I can get a better end result.
mohard 18 Jan, 2023 @ 12:43am 
So @GorillaxJax, I wonder what would happen if mittens' permit was changed to 30, without changing anything wrt SHAPED.

Then it would allow them to wear those setups, as far as I understand:
1) gloves + gloves (as in vanilla)
2) gloves + mittens (as in vanilla)
3) gloves + gauntlets + mittens (additionally)

and also the slightly weird, but maybe acceptable:
3) gloves + gloves + mittens (additionally)

LMK if I've missed something. I'll also try running a few live tests in my fort.
CorvidShaman 17 Jan, 2023 @ 4:47pm 
@dawnmist from the wiki

"Permit refers to the maximum allowable size of items equipped on the <b>same or lower level<b> as the item to be equipped."

The shaped boots mod helped because Shoes and High/Low boots are both on the same Layer of clothing (over). Gloves, Mittens, and Gauntlets are are all on different layers (Under, Cover, and Armor respectively). If anything, High/Low boots should actually be moved to the Armor layer and that would fix things.

Gloves can always be worn under gauntlets as they are 'under' the Gauntlets, have a size of 10, and gauntlets have a permit of 15. Mittens are actually worn over gauntlets. However, you can't have mittens + gloves + gauntlets as mittens have a permit of 20, and gauntlets + gloves combined size is 30.
Clocks 17 Jan, 2023 @ 1:51pm 
Thanks for this. I was using the shaped boots mod and then my newest fort had a civ that wore mittens AND gloves, which meant that I traded one problem for another (my dwarves now weren't putting on their gauntlets properly). Really wish that military dwarves prioritized their military gear before their civilian options.