Item Durability - Is there a solution ?

Post » Mon Jun 18, 2012 4:44 pm

Hi everyone,

I'm currently looking for a way to implement Weapon and armor durability. For now, I have worked on the formulas to implement, and the way to do it. But I have to admit that after searching for a way to implement this the best way I could, I can't seem to find the solution.

I have some questions that could help me estimate if this is feasable or not :

- I tried to locate how the game handles the weapons and armors tempering, but can't seem to find it. Is it some parts of the code we don't have access to, or is it somewhere and I didn't look hard enough ?

- Is there a way to access the base values of items (like Base armor, weight, etc) ?

- Is it possible to put a global "listener" that would look at the onHit Event (on the ObjectReference object) ?

- Is there a way to implement new events like onFire and onStrike for the weapons, without putting a script on every weapon objects in the game ?

Thanks for the replies, I spent 3 days turning the CK upside down to find a solution, but frankly I'm stuck now ;)

P.S. : If anyone is interested in the global idea and the work on durability formulas, I'll be glad to share them !
User avatar
jasminε
 
Posts: 3511
Joined: Mon Jan 29, 2007 4:12 am

Post » Mon Jun 18, 2012 2:42 pm

Cant use global settings because each weapon and armor item requires its own "durability" hence globals would not work.
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Tue Jun 19, 2012 1:41 am

I was planning on using the health attribute of the weapons / armors, as it is already used when improving an item. This way, we could simulate weapon usage by lowering this value below 1. But for now, I found some indications that the sharpening wheel / workbench can change this value, but I don't know how.
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Mon Jun 18, 2012 8:24 pm

I was planning on using the health attribute of the weapons / armors, as it is already used when improving an item. This way, we could simulate weapon usage by lowering this value below 1. But for now, I found some indications that the sharpening wheel / workbench can change this value, but I don't know how.

I dont think theirs a health value I believe that whenever you improve a weapon or armor its handled by a script and variables.
User avatar
no_excuse
 
Posts: 3380
Joined: Sun Jul 16, 2006 3:56 am

Post » Tue Jun 19, 2012 5:00 am

Ok, thanks for the reply.

There is maybe an error in the creation kit site, if you look at the "GetItemHealthPercent" in ObjectReference, it states : "Returns the item health percent of this object. Items begin at 100% (1.0) and can be increased via crafting.". I thought we could use this as a base, not for durability exactly, but for something like item efficiency : lowering this value could alter the base Damage / Armor rating. But there are no functions that allow us to change this value.

I guess it will be hard, if not impossible, to put a system like that in the game...
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Tue Jun 19, 2012 12:55 am

I have been working on my own solution to this very problem. GetItemHealthPercent only returns a value if the item is persistent. As a lot of stuff isn't, and for good reason, this is a no go. The best I have come up with is system whereby I hold the current "health" of each Weapon type I Equip in an array. This means that if I have 5 Iron Daggers but no way to tell them apart because they are not persistent, I have 1 "Health" value for all of them as a collection. I cannot unequip a worn dagger and equip a healthy one.

I am finding this acceptable except when one of the those daggers has been improved with smithing. I have 4 daggers and 1 Fine Dagger but I cannot tell them apart in script.

Persistence would seem to be the key, then you could put a script on each object and then, where you have 5 daggers, you have 5 versions of the script running; each with their own health being tracked. I have spent a lot of time trying to get that to work but the only way to get the weapons persistent is to drop them on the floor and pick them up again. And that only works if there is a script on them in the first place.

On the subject of the GetItemHealthPercent, the game must know which dagger has been improved and which hasn't as it shows them separately in the inventory. It would be most helpful if this information was usable in the scripting.
User avatar
:)Colleenn
 
Posts: 3461
Joined: Thu Aug 31, 2006 9:03 am


Return to V - Skyrim