Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Problem clearing and recreating with CUT_ITEM command?  (Read 704 times)

DWARFFRAWD

  • Bay Watcher
    • View Profile
Problem clearing and recreating with CUT_ITEM command?
« on: April 01, 2023, 10:50:16 am »

I'm going to erase the existing item with the CUT_ITEM command and make it again,
but as you can see in the picture above,
armor comes out only with 'armor', and shoes only with 'footwear'.
Only the robe and sock at the bottom of the text file come out properly.

I don't know what's wrong at the moment. Am I missing something?








item_armor

[OBJECT:ITEM]

[CUT_ITEM:ITEM_ARMOR_BREASTPLATE]
[ITEM_ARMOR:ITEM_ARMOR_BREASTPLATE]
[NAME:breastplate:breastplates]
[ARMORLEVEL:3]
[UBSTEP:0]
[LBSTEP:0]
[SHAPED]
[LAYER:ARMOR]
[COVERAGE:100]
[LAYER_SIZE:20]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:9]
[HARD]
[METAL]

[CUT_ITEM:ITEM_ARMOR_MAIL_SHIRT]
[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]

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

[CUT_ITEM:ITEM_ARMOR_COAT]
[ITEM_ARMOR:ITEM_ARMOR_COAT]
[NAME:coat:coats]
[UBSTEP:MAX]
[LBSTEP:1]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:20]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:5]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_SHIRT]
[ITEM_ARMOR:ITEM_ARMOR_SHIRT]
[NAME:shirt:shirts]
[UBSTEP:MAX]
[LBSTEP:0]
[LAYER:UNDER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:3]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_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]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_TUNIC]
[ITEM_ARMOR:ITEM_ARMOR_TUNIC]
[NAME:tunic:tunics]
[UBSTEP:0]
[LBSTEP:1]
[LAYER:UNDER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:3]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_TOGA]
[ITEM_ARMOR:ITEM_ARMOR_TOGA]
[NAME:toga:togas]
[UBSTEP:1]
[LBSTEP:1]
[LAYER:OVER]
[COVERAGE:100]
[LAYER_SIZE:30]
[LAYER_PERMIT:100]
[MATERIAL_SIZE:5]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_CAPE]
[ITEM_ARMOR:ITEM_ARMOR_CAPE]
[NAME:cape:capes]
[UBSTEP:0]
[LBSTEP:0]
[LAYER:COVER]
[COVERAGE:50]
[LAYER_SIZE:10]
[LAYER_PERMIT:300]
[MATERIAL_SIZE:3]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_VEST]
[ITEM_ARMOR:ITEM_ARMOR_VEST]
[NAME:vest:vests]
[UBSTEP:0]
[LBSTEP:0]
[LAYER:OVER]
[COVERAGE:50]
[LAYER_SIZE:10]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:2]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_DRESS]
[ITEM_ARMOR:ITEM_ARMOR_DRESS]
[NAME:dress:dresses]
[UBSTEP:MAX]
[LBSTEP:MAX]
[LAYER:UNDER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:50]
[MATERIAL_SIZE:5]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_ARMOR_ROBE]<<<<<<Only this one comes out properly.
[ITEM_ARMOR:ITEM_ARMOR_ROBE]
[NAME:robe:robes]
[UBSTEP:MAX]
[LBSTEP:MAX]
[LAYER:COVER]
[COVERAGE:100]
[LAYER_SIZE:20]
[LAYER_PERMIT:100]
[MATERIAL_SIZE:6]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]




item_shoes

[OBJECT:ITEM]

[CUT_ITEM:ITEM_SHOES_SHOES]
[ITEM_SHOES:ITEM_SHOES_SHOES]
[NAME:shoe:shoes]
[LAYER:OVER]
[COVERAGE:100]
[LAYER_SIZE:20]
[LAYER_PERMIT:15]
[MATERIAL_SIZE:1]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
[SHAPED]

[CUT_ITEM:ITEM_SHOES_BOOTS]
[ITEM_SHOES:ITEM_SHOES_BOOTS]
[NAME:high boot:high boots]
[ARMORLEVEL:1]
[UPSTEP:1]
[METAL_ARMOR_LEVELS]
[LAYER:OVER]
[COVERAGE:100]
[LAYER_SIZE:25]
[LAYER_PERMIT:15]
[MATERIAL_SIZE:2]
[METAL]
[LEATHER]
[HARD]
[SHAPED]

[CUT_ITEM:ITEM_SHOES_BOOTS_LOW]
[ITEM_SHOES:ITEM_SHOES_BOOTS_LOW]
[NAME:low boot:low boots]
[ARMORLEVEL:1]
[METAL_ARMOR_LEVELS]
[LAYER:OVER]
[COVERAGE:100]
[LAYER_SIZE:25]
[LAYER_PERMIT:15]
[MATERIAL_SIZE:1]
[METAL]
[LEATHER]
[HARD]
[SHAPED]

[CUT_ITEM:ITEM_SHOES_SANDAL]
[ITEM_SHOES:ITEM_SHOES_SANDAL]
[NAME:sandal:sandals]
[LAYER:OVER]
[COVERAGE:100]
[LAYER_SIZE:25]
[LAYER_PERMIT:15]
[MATERIAL_SIZE:1]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]
[SHAPED]

[CUT_ITEM:ITEM_SHOES_CHAUSSE]
[ITEM_SHOES:ITEM_SHOES_CHAUSSE]
[NAME:chausse:chausses]
[UPSTEP:MAX]
[LAYER:UNDER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:15]
[MATERIAL_SIZE:3]
[SOFT]
[LEATHER]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

[CUT_ITEM:ITEM_SHOES_SOCKS]     <<<<<<Only this one comes out properly.
[ITEM_SHOES:ITEM_SHOES_SOCKS]
[NAME:sock:socks]
[LAYER:UNDER]
[COVERAGE:100]
[LAYER_SIZE:10]
[LAYER_PERMIT:15]
[MATERIAL_SIZE:1]
[SOFT]
[STRUCTURAL_ELASTICITY_WOVEN_THREAD]

« Last Edit: April 01, 2023, 11:07:12 am by DWARFFRAWD »
Logged

Mechanixm

  • Bay Watcher
    • View Profile
Re: Problem clearing and recreating with CUT_ITEM command?
« Reply #1 on: April 12, 2023, 12:08:54 am »

Have you tried recreating the TXT file containing all of these commands?  Sometimes if you're copying and pasting text from files to files, the encoding of the txt file will get all jacked up.  I haven't seen this exact issue, but I've seen similar "wtf issues" caused by bad encoding.

Try re-creating your txt files from scratch and making sure it's encoded UTF8.  If you have access to PowerShell, you can do this super easily:

get-content -LiteralPath "Full_Path_and_name_of_your_file.txt" | out-file -LiteralPath "NEW_Full_Path_and_name_of_your_file.txt" -Encoding utf8

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Problem clearing and recreating with CUT_ITEM command?
« Reply #2 on: April 12, 2023, 11:58:26 am »

These mod files are working for me.

I took your files, and edited the COVERAGE to unique values:
Spoiler: info.txt (click to show/hide)

Spoiler: item_armor.txt (click to show/hide)

Spoiler: item_shoes.txt (click to show/hide)

I then generated a new pocket 5-year world with only the test mod, and verified with DFHack that the objects were being cut and recreated:
Spoiler: DFHack output (click to show/hide)


I guess, verify the subdirectory and file names.  Mine were:
Spoiler (click to show/hide)
Note that it's 'objects', not 'object'.  That's tripped me up more that once.

Also note that the files MUST be named 'item_armor.txt' and 'item_shoes.txt'.  To be specific, each filename must match the first line of the file, without the .txt extension.

Finally, delete the errorlog.txt file in the Dwarf Fortress directory, generate a new world using your mod, and check if there's anything new in  errorlog.txt.
Logged