Question On Armors.dfn files

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Question On Armors.dfn files

Post by dragon slayer »

Okay i was going though them as i decided to make new armors and noticed we had duped ids

example

in bone.dfn you have all the bone armor both ids for each peice. Then in base_armor.dfn you have bone armor using one of those ids and its got all the stats.

I don't know if this was the plain or you just havent had time to remove the duped ids. after making base.

because i went though and removed the duped id left the base_armor.dfn

example

// Bone Armor
[bone_arms]
{
get=base_item
name=bone arms
id=0x144e
weight=200
value=100 50
layer=0x13
def=30
hp=30
str=40
decay=1
good=14
}

You have this one and a nother one using same id but refering to this item. so i removed the one refering to this one.

so i only ended up with this in my bone.dfn
[0x1453]
{
get=bone_arms
name=bone arms
id=0x1453
}

Then again to me that makes much more since then having the server search though and grab item after item. plus it shrinks down the dfn files some.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

It's setup like this intentionally, both to make it easier to maintain and to make creation of custom items easier. You just get the base version of whatever item you're customizing, and then only add the things you want to customize (which will override what is set in the base-item).

I guess it makes more sense when looking at the metal armors rather than the bone armor, though. Instead of having 9 complete entries for a platearmor chest (one for each ore-type), all with the exact same stats and settings (originally the only thing that made them different were the colors), you have one base-item with all the default stats already set, then each version just contain the differences while keeping the base stats.

Also, keep in mind that the unique part is the [item header], not the id= tag. The base-items don't use the IDs in the headers, so there are no actual dupes. When doing 'ADD ITEM 0x#### (or add through menu, or CreateDFNItem JS method) you're adding a DFN item based on its header-iD, in this case [0x####], while when you're doing 'ADD 0x#### (or CreateBlankItem JS method) you're adding the blank/tiledata version of an item based on the actual GFX-id of that item.
-= Ho Eyo He Hum =-
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

oh hehe okay hehe. well items files kinda confused me a lot with all the ids being doubled up like that. but its understandable now :)
Post Reply