Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Question] Where did I mess up : adding armor pieces  (Read 755 times)

JezaGaia

  • Bay Watcher
    • View Profile
[Question] Where did I mess up : adding armor pieces
« on: May 10, 2018, 07:07:16 am »

I've been playing DF for a while on and off and after getting back to it recently I've been annoyed when I try equipping my military dwarves.

No issue with items that are considered armor and not clothing, I just craft them in advance until I have 10 masterwork quality of each item then I create my armor set and squad using it.
But I also equip my dwarves with some items that are considered clothing like hoods, cloaks etc and there I have a big issue because by the time my dwarves get around picking the equipment most of the masterwork quality ones are gone, taken by civilians.

I've looked around for a solution for this that wouldn't require a ton of micro management but to no avail (if I'm wrong let me know please :)  )
Plus I don't like my civilians using leather items because it's the hardest material to get in big quantities. Basically I either buy it or I never have enough without having tons of animals in my fort that slow down my game.

So I thought, why not separate leather from cloth/wool and have leather cloaks, hoods, trousers, gloves and mittens be armor too so that civilians don't wear them and they can have cloth and yarn ones that the military won't use.

I managed to create those items and they work as intended in my game but I have an issue because chain mail and leather armor don't exist anymore in my game for dwarves.
I don't get any in my dwarven trade caravans and they don't appear in the workshops but they still do for humans (trade caravans bring them).
As I didn't edit those items in any way shape of form I don't understand at all where the problem comes from.

So if someone could give me a hand understanding where I went wrong I would be very thankful !

As an example here is what I did for the leather cloaks.

In the item_armor.txt I changed this :

--removed leather from the tags in the existing cloak

[ITEM_ARMOR:ITEM_ARMOR_CLOAK]
[NAME:cloak:cloaks]
[UBSTEP:MAX]
[LBSTEP:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:15]
[LAYER_PERMIT:150]
[MATERIAL_SIZE:5]
[SOFT]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

--copied and pasted the whole thing as it was originally, renamed it to leather_cloak only left leather as a material, removed [STRUCTURAL_ELASTICITY_WOVEN_THREAD] and added the tags [ARMORLEVEL:1] and [METAL_ARMOR_LEVELS]
--I added those 2 tags after reading the wiki and also simply checking the tags on the leather armor itself as it's a leather item that is considered armor and that's what I wanted.

[ITEM_ARMOR:ITEM_ARMOR_LEATHER_CLOAK]
[NAME:leather_cloak:leather_cloaks]
[ARMORLEVEL:1]
[METAL_ARMOR_LEVELS]
[UBSTEP:MAX]
[LBSTEP:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:15]
[LAYER_PERMIT:150]
[MATERIAL_SIZE:5]
[LEATHER]


then in the file entity_default.txt I changed this :

--I made sure to be in the [ENTITY:MOUNTAIN] section of the file
--I looked for the other armor tags ARMOR:ITEM_ARMOR_*****
-- at the end of the list I added this  without removing or changing any of the tags already present:
[ARMOR:ITEM_ARMOR_LEATHER_CLOAK:COMMON]


When I found the issue I went to check the files and looked if I had removed ot changed the chain mail and leather armor by mistake but they are ok as far as I can tell

in item_armor.txt they are as follows :

[ITEM_ARMOR:ITEM_ARMOR_MAIL_SHIRT]
[NAME:mail shirt:mail shirts]
[ARMORLEVEL:2]
[UBSTEP:1]
[LBSTEP:1]
[LAYER:OVER]
[COVERAGE:100]
[LAYER_SIZE:15]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:6]
[HARD]
[METAL]
[STRUCTURAL_ELASTICITY_CHAIN_ALL]

[ITEM_ARMOR:ITEM_ARMOR_LEATHER]
[NAME:armor:armor]
[PREPLURAL:suits of]
[MATERIAL_PLACEHOLDER:leather]
[ARMORLEVEL:1]
[METAL_ARMOR_LEVELS]
[UBSTEP:1]
[LBSTEP:1]
[SHAPED]
[LAYER:ARMOR]
[COVERAGE:100]
[LAYER_SIZE:20]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:6]
[LEATHER]

they are the 2 items just above the new leather_cloak I added but so is breastplate and that is working

In entity_default.txt here is the full list of armors :

[ARMOR:ITEM_ARMOR_BREASTPLATE:COMMON]
   [ARMOR:ITEM_ARMOR_MAIL_SHIRT:COMMON]
   [ARMOR:ITEM_ARMOR_LEATHER:COMMON]
   [ARMOR:ITEM_ARMOR_COAT:COMMON]
   [ARMOR:ITEM_ARMOR_SHIRT:COMMON]
   [ARMOR:ITEM_ARMOR_CLOAK:COMMON]
   [ARMOR:ITEM_ARMOR_TUNIC:COMMON]
   [ARMOR:ITEM_ARMOR_TOGA:UNCOMMON]
   [ARMOR:ITEM_ARMOR_VEST:COMMON]
   [ARMOR:ITEM_ARMOR_DRESS:COMMON]
   [ARMOR:ITEM_ARMOR_ROBE:COMMON]
   [ARMOR:ITEM_ARMOR_LEATHER_CLOAK:COMMON]



I just noticed that I added the new item at the bottom of this list here while it's not in the same position in the item_armor.txt but I checked and it's the same for every other item I added and there was no issue with those so I don't think that's the problem ?


Thanks in advance for any help :)

EDIT 19/05/18 : edited the title for more clarity



« Last Edit: May 19, 2018, 10:43:57 am by JezaGaia »
Logged

Ninjabread

  • Bay Watcher
    • View Profile
Re: [Question] How to add some armor versions of some clothes ?
« Reply #1 on: May 12, 2018, 08:08:50 am »

Pretty sure civilians grab the most valuable clothes available, so there is one simple way to keep them out of your leathers; make something more valuable. One fairly easy way is to use exclusively low-cost leathers (because material property wise, all leather is the same, giant elephant leather is just as protective as kitten leather), and produce high quality pig tail cloaks and hoods, since pig tail is twice as valuable as minimum value leathers. Might help if you dye the pig tail and/or set the pig tail ones to be decorated with more pig tail (use the details menu or linked stockpiles to ensure leather items aren't decorated), cause insisting on masterwork leather means only masterwork pig tail will trump it's value unless you decorate and/or dye the pig tail. Or if you can get your hands on some GCSs you could take their silk, a *giant cave spider silk cloak* is more valuable than a ☼pig leather cloak☼
Logged

JezaGaia

  • Bay Watcher
    • View Profile
Re: [Question] How to add some armor versions of some clothes ?
« Reply #2 on: May 16, 2018, 10:48:58 am »

Thanks I didn't know, if everything fail I'll give that a try :)

Still hoping to make my modded clothes work though, if I ever manage to find the issue I'll post here in case it can be helpful.

I also thought I could simply change the existing cloack into a "leather armor clock" and civilians can wear coats. As the ARMOR items are the only ones being broken by my cha ges maybe it'll solve the issue if I don't add a new ARMOR item but just change the tags on the existing cloack... it's my hope anyway.
Logged

pikachu17

  • Bay Watcher
  • PADORU PADORU
    • View Profile
Re: [Question] How to add some armor versions of some clothes ?
« Reply #3 on: May 16, 2018, 02:12:15 pm »

You could lock the military in a room with leather and a leatherworker's shop, and they could make it themselves.
Logged
Sigtext!
dwarf 4tress from scratch
The Pikachu revolution!
Thank you NatureGirl19999 for the avatar switcher at http://signavatar.com

A warforged bard named Gender appears and says"Hello. I am a social construct."

JezaGaia

  • Bay Watcher
    • View Profile
Re: [Question] How to add some armor versions of some clothes ?
« Reply #4 on: May 19, 2018, 10:41:51 am »

Well that's a possibility but on one hand the dwarf making the leather items won't be training and on the other if I get a legendary leatherwork dwarf he won't be in my military, too valuable and a lesser dwarf won't be making masterwork clothes.

Plus that's nice when you make the first batch of clothes for when you initially equip your army but the problem will be still there when they have to replace worn clothing along the way.
So we're back to too much micro management for my taste.

Also my modded items have worked fine so far it's just the cloak one that has bugged other items all others have worked fine so there has to be a way to find where I messed up and make it work properly :(
Logged

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: [Question] Where did I mess up : adding armor pieces
« Reply #5 on: May 19, 2018, 01:55:45 pm »

Have you tried genning multiple worlds and seeing if every one has the same items missing?

If you have and different items are missing each time then it is probably a rarity thing.  Try setting all armor to FORCED instead of COMMON and see if that fixes things.
Logged
Fallout Equestria Redux - that's right, it's back

JezaGaia

  • Bay Watcher
    • View Profile
Re: [Question] Where did I mess up : adding armor pieces
« Reply #6 on: May 20, 2018, 10:35:50 am »

I hadn't thought about trying a different worldgen, will do that tonight and see, If I have the same or other items missing I'll try with FORCED.

Thank you for the advice :)
Logged

JezaGaia

  • Bay Watcher
    • View Profile
Re: [Question] Where did I mess up : adding armor pieces
« Reply #7 on: May 21, 2018, 06:43:06 am »

So I tried making different worlds and it was not consistent, sometimes I had shirt mails sometimes not, never had leather armor and I also noticed I was missing tunics even in clothing.

I tried your advice adn changed COMMON by FORCED, did it for everything (armor/helms/legs etc) and it seems to be working perfectly thank you SO much !
Logged