Page 1 of 1
base_item.dfn questions
Posted: Mon Jun 13, 2011 8:48 pm
by may
Hello. This is my first post. It is dfn related so I figure this is correct forum. I am trying to create a magic_item.dfn file. I want to put all armour, and weapons that are magical that drop from monsters into one file. I will be adding all magic items that existed in 1997 and 1998, including magic weapons that were silver.
I have been looking at the base_item.dfn and there are a few lines that confuse me because the base_item.dfn lacks comments per line. So my questions are:
1. Can I put magic armour and weapons into one file called magic_item.dfn?
2. Under base_item.dfn what do the following lines mean and their values?
3. I have been browsing the forums and I read that race=xxxx can be used for silver weapons to do double damage vs undead. My attempt at creating a silver katana is below. what value do I type for race= and how is this checked.. like does it do the regular lodamage/hidamage on normal monsters but does double damage on undead?
Code: Select all
contents of magic_item.dfn
-------------------------------
[mi_silver_katana]
{ facing West
get=base_item
name=a magic katana
name2=a silver katana
id=0x13fe
weight=6
value=
layer=1
lodamage=5
hidamage=26
hp=31 90
spd=58
str=10
restock=
decay=
race=
script=
}
4. Also a katana has a weight of 6, but I have seen weight listed as 600. How does weight work?
Many thanks in advance. I am just starting my uox3 journey and looking forward to it!
Posted: Tue Jun 14, 2011 5:58 am
by may
I looked in the races.dfn and found undead listed as 11. I now have race=11 in my silver katana item. Assuming this is correct.. I have not tried testing this ingame yet, question three can be scratched off my post above. My sliver katana now looks like:
Code: Select all
contents of magic_item.dfn
-------------------------------
[mi_silver_katana]
{ facing West
get=base_item
name=a magic katana
name2=a silver katana
id=0x13fe
weight=6
value=
layer=1
lodamage=5
hidamage=26
hp=31 90
spd=58
str=10
restock=
decay=
race=11
script=
}
Posted: Tue Jun 14, 2011 6:38 pm
by Xuri
may wrote:Hello. This is my first post. It is dfn related so I figure this is correct forum. I am trying to create a magic_item.dfn file. I want to put all armour, and weapons that are magical that drop from monsters into one file. I will be adding all magic items that existed in 1997 and 1998, including magic weapons that were silver.
Hello, and welcome
may wrote:I have been looking at the base_item.dfn and there are a few lines that confuse me because the base_item.dfn lacks comments per line. So my questions are:
1. Can I put magic armour and weapons into one file called magic_item.dfn?
Yes. UOX3 will read and load data from any text-file with the .dfn file extension from the DFNDATA folders, as long as the data contained in them is formatted correctly. Also make sure that you use unique header-IDs for your items - i.e. two items with headers [magicweapon1] and [magicweapon2] will work, while [magicweapon] and [magicweapon], or [0x04a9] and [0x04a9] will not.
may wrote:2. Under base_item.dfn what do the following lines mean and their values?
The tags in base_item.dfn contain default values for any item definitions that contain the
get=base_item tag, and no value specified is basically the same as a value of zero - which UOX3 will not save to the worldfiles, and thus save space and time. It will assume that any tag it can't find when reading the worldfiles defaults to 0.
may wrote:3. I looked in the races.dfn and found undead listed as 11. I now have race=11 in my silver katana item. Assuming this is correct.. I have not tried testing this ingame yet, question three can be scratched off my post above.
Sounds about right
may wrote:4. Also a katana has a weight of 6, but I have seen weight listed as 600. How does weight work?
1250 = 12.5 stones
600 = 6.00 stones
438 = 4.38 stones
87 = 0.87 stones
4 = 0.04 stones
may wrote:Many thanks in advance. I am just starting my uox3 journey and looking forward to it!
Enjoy the journey, it's great fun

Posted: Wed Jun 15, 2011 2:34 am
by may
Thanks Xuri.
I decided to create individual dfn's for magic armor, items, weapons. It seems to be best way to go. My magic_weapon.dfn header-IDs are now organized like so:
Code: Select all
mw_silver_katana_west
mw_silver_katana_north
...
My tested silver katana now looks like so:
Code: Select all
[mw_silver_katana_west]
{ facing West
get=base_item
name=a magic katana
name2=a silver katana
id=0x13fe
weight=600
layer=1
lodamage=5
hidamage=26
hp=31 90
spd=58
str=10
restock=10
good=21
decay=1
race=11
}
This seems to work. I spawned a non-undead creature and attacked it while this katana was equipped and then spawned a undead creature and attacked it. The damage was indeed doubled vs undead but not with non-undead creatures. nice
I left script=xxxx off of this item for now. I remember when hitting an undead creature with a silver weapon it would cause a white sparkle effect over the undead creature. Currently, the silver katana hits doesn't display the sparkle effect but I assume this could be done with javascript, but until I figure out how to implement I'm leaving script off.
I plan to post my work in .zip files once I get more done. I am testing on uox3-0.98-4.0h-experimental. I will let you know if I encounter any bugs.
Posted: Thu Jun 16, 2011 7:51 pm
by may
I have all silver weapons done and I have moved on to magic weapons of ruin, might, force, power, vanquishing.. etc. An example of how I set up a katana of vanquishing is below. I am looking for feedback, because I'm wondering if there is a better approach to this. Vanquishing is suppose to add +9 to the katana damage.
Code: Select all
[mw_katana_vanquishing_west]
{ facing West
get=base_item
name=a magic katana
name2=a katana of vanquishing
id=0x13fe
weight=600
layer=1
lodamage=14 // normal lodamage=5 _ vanquishing lodamage=5+9
hidamage=35 // normal hidamage=26 _ vanquishing hidamage=26+9
hp=31 90
spd=58
str=10
restock=10
good=21
decay=1
}
Posted: Fri Jun 17, 2011 8:21 am
by Xuri
It seems like the right way to go about doing it, to me, can't think of a different way that would also be better. JavaScript for this would be overkill, I think.
Posted: Tue Aug 23, 2011 1:11 am
by mikel123
I assume there is documentation somewhere about what "decay" means... but what about "restock" and "good"?
Additionally... Stratics used to report that weapon damage was dice-based... i.e. a katana with damage 5 to 26 is probably 3d8+2. Is there some way to put this into the lodamage= and hidamage= parameters?