1
DF Modding / Need help editing the raws to add new armor pieces
« on: January 25, 2023, 04:43:34 am »
I'm playing on steam but before I try and make a proper mod I wish to test the changes I'm thinking of implementing
So my idea was to simply edit the raws like we did in previous versions of DF to test the changes before I try and do something more modular.
I would like to add 3 items that are duplicates of the vanilla cloak, hood and mittens but giving them the armor "tag" so that my civilians stop stealing them before my military can put them on.
I remember I did something like that years ago but cannot remember exactly how I did it. I tried to replicate it but the items never appeared in the game when I launched it, I had no way to craft any of them (existing fortress I didn't try creating a new world)
I read on the wiki that it should be possible to edit existing saves by editing the vanilla raws (not recommended I get that but possible) if I understood this correctly then the mistake has to be in what I edited.
Could someone help me figure out where I went wrong ?
I edited 4 raws total
3 in SteamLibrary\steamapps\common\Dwarf Fortress\data\vanilla\vanilla_items\objects
item_armor.txt : adding the cloak
[ITEM_ARMOR:ITEM_ARMOR_CLOAK_MILITARY]
[NAME:military cloak:military cloaks]
[ARMORLEVEL:1]
[UBSTEP:MAX]
[LBSTEP:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:15]
[LAYER_PERMIT:150]
[MATERIAL_SIZE:5]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
item_gloves.txt adding the mittens
[ITEM_GLOVES:ITEM_GLOVES_MITTENS_MILITARY]
[NAME:military mitten:military mittens]
[ARMORLEVEL:1]
[LAYER:COVER]
[COVERAGE:150]
[LAYER_SIZE:15]
[LAYER_PERMIT:20]
[MATERIAL_SIZE:1]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
item_helm.txt adding the hood
[ITEM_HELM:ITEM_HELM_HOOD_MILITARY]
[NAME:military hood:military hoods]
[ARMORLEVEL:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:100]
[MATERIAL_SIZE:2]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
1 raw in SteamLibrary\steamapps\common\Dwarf Fortress\data\vanilla\vanilla_entities\objects
entity_default.txt adding the 3 items to the dwarven civilization
[ARMOR:ITEM_ARMOR_CLOAK_MILITARY:COMMON]
[HELM:ITEM_HELM_HOOD_MILITARY:COMMON]
[GLOVES:ITEM_GLOVES_MITTENS_MILITARY:COMMON]
So my idea was to simply edit the raws like we did in previous versions of DF to test the changes before I try and do something more modular.
I would like to add 3 items that are duplicates of the vanilla cloak, hood and mittens but giving them the armor "tag" so that my civilians stop stealing them before my military can put them on.
I remember I did something like that years ago but cannot remember exactly how I did it. I tried to replicate it but the items never appeared in the game when I launched it, I had no way to craft any of them (existing fortress I didn't try creating a new world)
I read on the wiki that it should be possible to edit existing saves by editing the vanilla raws (not recommended I get that but possible) if I understood this correctly then the mistake has to be in what I edited.
Could someone help me figure out where I went wrong ?
I edited 4 raws total
3 in SteamLibrary\steamapps\common\Dwarf Fortress\data\vanilla\vanilla_items\objects
item_armor.txt : adding the cloak
[ITEM_ARMOR:ITEM_ARMOR_CLOAK_MILITARY]
[NAME:military cloak:military cloaks]
[ARMORLEVEL:1]
[UBSTEP:MAX]
[LBSTEP:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:15]
[LAYER_PERMIT:150]
[MATERIAL_SIZE:5]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
item_gloves.txt adding the mittens
[ITEM_GLOVES:ITEM_GLOVES_MITTENS_MILITARY]
[NAME:military mitten:military mittens]
[ARMORLEVEL:1]
[LAYER:COVER]
[COVERAGE:150]
[LAYER_SIZE:15]
[LAYER_PERMIT:20]
[MATERIAL_SIZE:1]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
item_helm.txt adding the hood
[ITEM_HELM:ITEM_HELM_HOOD_MILITARY]
[NAME:military hood:military hoods]
[ARMORLEVEL:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:100]
[MATERIAL_SIZE:2]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
1 raw in SteamLibrary\steamapps\common\Dwarf Fortress\data\vanilla\vanilla_entities\objects
entity_default.txt adding the 3 items to the dwarven civilization
[ARMOR:ITEM_ARMOR_CLOAK_MILITARY:COMMON]
[HELM:ITEM_HELM_HOOD_MILITARY:COMMON]
[GLOVES:ITEM_GLOVES_MITTENS_MILITARY:COMMON]
)