Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need help editing the raws to add new armor pieces  (Read 122 times)

JezaGaia

  • Bay Watcher
    • View Profile
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]
Logged

Eric Blank

  • Bay Watcher
  • Never stabs friends, promise!
    • View Profile
Re: Need help editing the raws to add new armor pieces
« Reply #1 on: January 25, 2023, 02:01:49 pm »

You'll have to generate a new world for new items to show up. Newly available items/materials don't show up in play, as the things available to a civ are decided in world gen.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

JezaGaia

  • Bay Watcher
    • View Profile
Re: Need help editing the raws to add new armor pieces
« Reply #2 on: January 25, 2023, 03:29:44 pm »

You'll have to generate a new world for new items to show up. Newly available items/materials don't show up in play, as the things available to a civ are decided in world gen.

OK thank you it's good to know.

However it still doesn't work, I generated a new world and nothing is showing.

To double check I copied this from the wiki modding page :

[REACTION:FREE_ADAMANTINE_THREAD]
[NAME:create adamantine thread]
[BUILDING:SMELTER:NONE]
[PRODUCT:100:1:THREAD:NO_SUBTYPE:INORGANIC:ADAMANTINE][PRODUCT_DIMENSION:15000]
[SKILL:SMELT]

I also allowed the reaction in the entity_defaults.txt  and this isn't showing either even in a new world.

I have no idea what I'm doing wrong.
Logged