How to add proper skill to sword.

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

How to add proper skill to sword.

Post by stranf »

I took one of the Mondain's Legacy elf-swords off of Inside UO, and added a DFN entry as a "Lightsword"

The sword works, all stats appear proper, but my Master Swordsman, (swords 96, fencing 47, macefighting 9.6, tactics 99) rarely EVER scores a hit (tested against simple orcs). It hit once with a "thud" sound. (is it using the mace skill?)

How does UOx3 know which skill-set to place the weapon under?

Here is my sample DFN entry:

Code: Select all

[lightsword]
{
facing West
get=base_item
name=Lightsword
id=0x2d2f
weight=550
value=58,29
layer=1
lodamage=20
hidamage=25
hp=75
spd=32
str=50
restock=10
decay=1




}
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 »

Hardcoded. The newest weapons probably haven't been added to the lists which defines hex-ids as SWORDS, MACES, POLEARMS etc in the code yet, so whenever you equip one of them you'll actually be using the wrestling skill.
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

darnit. :cry:
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Yeah, we haven't come up with a truly memory-efficient way of classifying weapon types via scripts yet.

Especially since items can be made without calling the scripts, that tag would have to exist in harditems.dfn as well as items.dfn, and require a harditems entry for every single weapon type.
Scott
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 »

I've updated the source with the newest weapon-classifications locally, but can't seem to access the cvs to commit the change. Will do so as soon as possible.
-= Ho Eyo He Hum =-
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 »

Done, it's up on the CVS :P
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Wow! that was fast.

Thanks everybody.

As soon as grimson posts a new CVS update download, I'll give it a test!!

:o
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

stranf wrote:As soon as grimson posts a new CVS update download, I'll give it a test!!
Then give it a try ;).
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Thank you much Grimson.

How have you been feeling lately? Glad to see you back.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

The Mondain's Legacy blade 0x2d2f

Is set on 3.6e as a "fencing weapon"

For my custom item using that animation, I'd prefer the Swordsmanship skill.

Is there a way to change this?

I looked in harditems.dfn and it seems to only contain blood splots and "doors" But no weapon section.
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 »

Only possible by changing the hardcoded definition of that sword from fencing to swordsmanship.
-= Ho Eyo He Hum =-
Post Reply