[WIPZ] Skyrim Weapon and Armor Durability

Post » Sat Mar 09, 2013 5:11 am

Skyrim Weapons and Armor Durability (SWAD) -Abandoned
Updated : 07/02/2013

So a bit of a quick spill. This mod is supposed to be a bit of fun for me....by fun I mean work out the Creation kit and of course Push the limits a bit.

Progress:

I have Abandoned this WIP in favor of a new Mod I am developing More details once it's out in beta.

Requirements:
  • SkyUi 3.0+
  • SKSE 1.6.5+
Current Features:


Weapon Durability - Main Features -
  • Support for upto 128 Items and reliably recall the Durability for each. Enchanted Weapons are currently not supported.
  • Repairs to Items can be made on the fly using single use whet stones bought from Blacksmiths, General Stores and Hunters. They can also be repaired by a Blacksmith for a cost.
  • Weapons will wear down only when you hit actors currently.
  • Damaged Weapons will Deal less damage to Npcs. While they get the joy of hitting you for Full damage.
SkyUi MCM Menu - Main Features -
  • Rate of Decay for Weapons, Clear Data Function, Reset Forms, Dynamic Form Calling for support of upto 128 Items (This is for those who are worried about vanilla Forms being called which are not PlaceHolders without this on though only 4 items will be supported).
Feel like something should be added to the MCM? Reply to the thread!

General Features -
  • Compatibility for any Weapon mod no need to do anything in Creation kit or do anything else but play.
Planned Features:
  • Armor Durability - Whats a Item Durability Mod without Armor Durability? As this requires a different set of Functions and Scripts I haven't started it......much
  • Compatibility for Combat adjustment mods - Currently Skyre_Combat, Combat Realism etc. are incompatible as would be any other mods that do similar combat mechanic changes.
Current Limitations/Bugs:
  • Currently Almost everything is buggy....but hey that's what a Test Build is for right?
EDIT: Righto Updated the Page. Was a refreshing change from creating Functions.

Note: The mods name is subject to change...was just what I had at the time.
User avatar
Sarah Unwin
 
Posts: 3413
Joined: Tue Aug 01, 2006 10:31 pm

Post » Sat Mar 09, 2013 2:13 am

I too want to make such mod but I don't believe is yet achievable unless SKSE adds more functionality.
What should such mod do?
- Degrade below the "normal" health (damage/armor rating)
- Work for vanilla and modded items
- Clearly tell the player the state of the weapon
- on field repair
- technically: not touch any armor weapon directly in CK
- Edit: work for user enchanted items, items using text replacement (like thane reward weapons)

What I think we miss is how to identify the exact item equipped, not it's type. Once that for the second part, including all points I listed, I have a pretty good idea.
User avatar
sam westover
 
Posts: 3420
Joined: Sun Jun 10, 2007 2:00 pm

Post » Sat Mar 09, 2013 7:51 am

I too want to make such mod but I don't believe is yet achievable unless SKSE adds more functionality.
What should such mod do?
- Degrade below the "normal" health (damage/armor rating)
- Work for vanilla and modded items
- Clearly tell the player the state of the weapon
- on field repair
- technically: not touch any armor weapon directly in CK

What I think we miss is how to identify the exact item equipped, not it's type. Once that for the second part, including all points I listed, I have a pretty good idea.

Currently with the way that I have implemented it consider the Weapons that are effected by durability as copies of the originals . None of the Original weapon forms are changed in any way. Though they are copies they act and have the same stats as the originals (Untill wear sets in) and upon unequipping still remain as they were without effecting any other items.

There is a limitation to this though it can only support so many Items tracking Durability at a time. Currently in my Test build that limit is 3. This of course will be expanded to how many I am not sure.

As for the state of the weapon currently I am limited to Notifications I am hoping for the SkyUi team to release their widget system before I release this so I can use that instead for easier reading.
User avatar
Maeva
 
Posts: 3349
Joined: Mon Mar 26, 2007 11:27 pm

Post » Sat Mar 09, 2013 9:18 am

So, are you saying you are going duplicate every armor/weapon in CK and on equip replace it with the duplicate?
PS: I added another point via edit in my first post
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Sat Mar 09, 2013 2:21 am

So, are you saying you are going duplicate every armor/weapon in CK and on equip replace it with the duplicate?
PS: I added another point via edit in my first post
No, that would be a waste Consider the added forms as placeholders for items that you equip. For all intents and purposes they are what I am using instead of references. The Original items are still used for attacking but once they are unequipped they are 'converted' to a placeholder item which is the form that has the Stats....so to speak and when they are equipped they are converted back to the original item.

There is one little catch with this.....If your dual wielding the same weapon at the same time and you unequip the weapons in say the reverse order you equipped them they will swap.....I am unsure how I can go around this since I can't use the place holders in equipped weapons since I cannot swap the models of the placeholders.

I hope that sort of made sense.

I noticed your point and sadly not something that's possible :( (EDIT: Not Possible To Me* I have searched to find a work around but no luck).
2nd EDIT: Work around implemented not ideal and still doesn't do player made enchants but it should be sufficient I believe if people really did want it for enchanted weapons. So named weapons with enchants are now 'supported'.
User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Post » Sat Mar 09, 2013 7:45 am

My ideal for weapon degradation:

Weapon degrades below normal with continued use.
Weapon never breaks or gets below a certain point. (assume some in field repair)
Player can repair weapon at grindstone.

You can make weapon degrade even further and make the player carry a repair kit to explicitly do in field repairs. That is IMHO unnecessary, as it just makes the player carry another thing and stop action to do another thing.

I would also like to see some changes for smith's too:
1. Smiths charge for the use of their equipment. It's not like a smith is likely to let some random guy use their stuff. This option would be the least costly to the player since it's just a rental.
2. Smiths can improve weapons for a significant cost. This would be very expensive, even more expensive than making the weapon. Think of this as the smith doing his finest work for you.
3. Smiths will repair degraded weapons to their natural state. There is a fee for this but it s not excessive.
User avatar
Steve Fallon
 
Posts: 3503
Joined: Thu Aug 23, 2007 12:29 am

Post » Sat Mar 09, 2013 1:14 am

My ideal for weapon degradation:

Weapon degrades below normal with continued use.
Weapon never breaks or gets below a certain point. (assume some in field repair)
Player can repair weapon at grindstone.

You can make weapon degrade even further and make the player carry a repair kit to explicitly do in field repairs. That is IMHO unnecessary, as it just makes the player carry another thing and stop action to do another thing.

Excellent Suggestions While playing my test build weapons broke at the worst times (Though that was because I have no Method of checking durability unless I unequipped the item)....hmmm I know I could add that as a option for MCM a minimum % Durability in which the player can decide if they wish for 0% which is broken or 30% or....Well, what ever Amount they want also gives me a chance to look at MCM again Huzzah! To the Todo list with that one.

I was leaning to the GrindStone but there is a small problem with using them as they usually do tempering which I can't control it will temper the object regardless of what I try. (Any suggestions on how to bypass Tempering would be great.) Still early days and I am hoping to be able to use them but if I can't get around the tempering then I am afraid I will have to find some other way of repairing. Holding to hope on that one haven't devoted much time to it.

As for Field Repair I am open to Suggestions...Though I do wish for it not to turn into an Oblivion (OMG MANY REPAIR HAMMERS!)



I would also like to see some changes for smith's too:
1. Smiths charge for the use of their equipment. It's not like a smith is likely to let some random guy use their stuff. This option would be the least costly to the player since it's just a rental.
2. Smiths can improve weapons for a significant cost. This would be very expensive, even more expensive than making the weapon. Think of this as the smith doing his finest work for you.
3. Smiths will repair degraded weapons to their natural state. There is a fee for this but it s not excessive.

Of course the humble smithies, how they need work. To the Idea board with that one.
User avatar
john page
 
Posts: 3401
Joined: Thu May 31, 2007 10:52 pm

Post » Fri Mar 08, 2013 9:00 pm

As for the grindstone thing, make it a whetstone, purchaseable at blacksmiths/general stores, make it a consumeable with a scripted effect to repair weapons. It might be sorted into potions, but that's fair enough. You could literally make it a potion for your sword (think sword oil).
I'm not a scripter, but in your script which handles the condition of the sword, put in a regular check (every x seconds) for a status effect such as bIsWeaponRepair = 1, then apply various repairs (possibly skill based, up to you), then set bIsWeaponRepair to 0.
Then, make a potion with the effect that bIsWeaponRepair is set to 1 for 2x seconds (so that it is always still active come next check). Call it Weapon Oil, get a model for it, add it to lists, and bam, done.
You could also require that the player has a whetstone, which isn't used up in the process. For realism.

Now, depending on how your condition checking script works, this might be far from optimal. I was mostly thinking that it checks every couple of seconds, but that's a bit inaccurate/difficult to quantify in terms of hitting. Is there an OnHit event in SKSE yet? (if that's how you're running that, then you might get the potion thing simpler. Still, I think a potion is easier than a grindstone, to implement, and to find in-game.)
User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm

Post » Sat Mar 09, 2013 1:14 am

As for the grindstone thing, make it a whetstone, purchaseable at blacksmiths/general stores, make it a consumeable with a scripted effect to repair weapons. It might be sorted into potions, but that's fair enough. You could literally make it a potion for your sword (think sword oil).
I'm not a scripter, but in your script which handles the condition of the sword, put in a regular check (every x seconds) for a status effect such as bIsWeaponRepair = 1, then apply various repairs (possibly skill based, up to you), then set bIsWeaponRepair to 0.
Then, make a potion with the effect that bIsWeaponRepair is set to 1 for 2x seconds (so that it is always still active come next check). Call it Weapon Oil, get a model for it, add it to lists, and bam, done.
You could also require that the player has a whetstone, which isn't used up in the process. For realism.

Now, depending on how your condition checking script works, this might be far from optimal. I was mostly thinking that it checks every couple of seconds, but that's a bit inaccurate/difficult to quantify in terms of hitting. Is there an OnHit event in SKSE yet? (if that's how you're running that, then you might get the potion thing simpler. Still, I think a potion is easier than a grindstone, to implement, and to find in-game.)

The OnHit Event has been in the original for awhile at least though it only applies to actors. it is what I am currently using to change the damage of the weapon...well damage done still tinkering with that to get a balance of timing. But also since I am Using a OnHit event a second Magic effect is given to all nearby actors so it can be detected.(Currently limited to 4)

Since I don't know exactly the limits of papyrus yet this might in the long run not work so well and be delayed trying to keep code in the On Hit event to a minimum. Currently Durability is accumulated during combat and once combat ends the checker script will be run, this is subject to change and will attempt for it to Run Durability regardless of In combat or not but that's a test for later.

However. I do like your idea even if it rings of REPAIR HAMMERZ! of Oblivion but I don't think I will ever get away from that since it is the easiest thing to do.
User avatar
Tiffany Carter
 
Posts: 3454
Joined: Wed Jul 19, 2006 4:05 am

Post » Sat Mar 09, 2013 8:02 am

I still don't understand how this works, I understand that you have a list of duplicate objects and when you unequip an item it takes the place of one of the duplicates. But I don't understand how changing the weapon value works, like if the player has the weapon equipped and looks in their inventory to see the weapon stats. Will it show the degraded stats or will they have to unequip the item to see that?
User avatar
Gemma Woods Illustration
 
Posts: 3356
Joined: Sun Jun 18, 2006 8:48 pm

Post » Sat Mar 09, 2013 2:44 am

I still don't understand how this works, I understand that you have a list of duplicate objects and when you unequip an item it takes the place of one of the duplicates. But I don't understand how changing the weapon value works, like if the player has the weapon equipped and looks in their inventory to see the weapon stats. Will it show the degraded stats or will they have to unequip the item to see that?
Alright so a quick run down on how this works.
They are not Duplicates as such but References. Most data is unobtainable or unneeded.

Because getting Objectreferences for Weapons is out of the question I use PlaceHolder Forms instead.Now of course instead of Forms I could use Arrays but then that would not preserve compatibility if people were say using Immersive Weapons since I would have to add in the items manually. With this way it will not matter what weapon is equipped (In theory I doubt it will be that easy.) The reason it is limited is I cannot create new forms on the fly only modify Existing ones This can be done through SKSE commands such as GetBaseDamage/SetBaseDamage or GetName/SetName. So it is a illusion of it being the same item. As SKSE is unable to change the model of a wielded weapon I have had to use the original weapons while equipped so during a OnObjectEquipped the Place holder form is Converted back to the original form and the important data [Damage, Durability, Weight etc.] is stored for Use and the Form is associated with the specific Placeholder Form). When you Unequip the Item the Original is converted back to the Placeholder Form. Because It is possible to Swap the World Model of an Item (via SKSE)the Placeholder form can be dropped and swapped to different containers without losing the data. Though I plan to make it so when the item is sold it will convert back so the Placeholder form can be returned to use.

This of course isn't without issues.While wielding 2 of the same EXACTLY the same weapons (Same Form) Then it will be unable to figure out which is the correct one I am unsure how to fix this at this time will devote more time to it when I can.

Also to preserve the original Forms items that are equipped will show the incorrect damage (I have made a work around if you really want it shown though it might or might not break the form still testing.)
Currently Durability is just a straight up 100 Though I am hoping to change this to be dependent on Material (Ebony should be stronger then Steel, Iron etc.)

I hope that clears things up a little.
User avatar
^~LIL B0NE5~^
 
Posts: 3449
Joined: Wed Oct 31, 2007 12:38 pm

Post » Sat Mar 09, 2013 8:13 am

Wouldn't that mean that the weapons damage doesn't actually change? I mean, sure the weapon in the inventory will change when unequipped but once you equip it, it reverts back to the original form with the original base damage and such. Right?
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Sat Mar 09, 2013 12:51 am

Wouldn't that mean that the weapons damage doesn't actually change? I mean, sure the weapon in the inventory will change when unequipped but once you equip it, it reverts back to the original form with the original base damage and such. Right?

Correct, Damage is instead Intercepted (Modified) and then recalculated to compensate (Through actor modification). Though I am trying to limit the lines I use to maintain speed so it isn't currently always giving the exact damage it should....(Usually off by 2-3 damage) But I believe that is a acceptable deviation.
User avatar
Eoh
 
Posts: 3378
Joined: Sun Mar 18, 2007 6:03 pm

Post » Sat Mar 09, 2013 4:59 am

Now for my final question: (*drumroll*) Why is it limited to 3? Is it because you only made 3 placeholders or because you can't manage more than 3 at a time? When I say only 3 placeholders I'm asking if making more placeholders would actually change anything. Like if you have 10 placeholders and it's limited to 3 would making 10 more bump the limit to 6?
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Fri Mar 08, 2013 10:48 pm

Now for my final question: (*drumroll*) Why is it limited to 3? Is it because you only made 3 placeholders or because you can't manage more than 3 at a time? When I say only 3 placeholders I'm asking if making more placeholders would actually change anything. Like if you have 10 placeholders and it's limited to 3 would making 10 more bump the limit to 6?

It's limited to 3 because That's how many I have made. 1 Place Holder Form for 1 Item. I will definitely increase this before I release but currently 3 because that's just how many Forms I have I could make it 10,20,30,40,50 forms if I wanted. But of course that is a lot of scripts since currently I do have a script attached to Place holders. Realistically it will be maybe 10. And once I have done Armor perhaps 15. My Code is definitely far from optimal so as it develops I should be able to add more forms without a performance impact. 3 is just to make development more manageable.
User avatar
Ana Torrecilla Cabeza
 
Posts: 3427
Joined: Wed Jun 28, 2006 6:15 pm

Post » Fri Mar 08, 2013 7:38 pm

Sounds good, I started developing my own degradation mod about a week ago which is why I was curious as to how you did yours. But I'm busy with another project now and there seems to be a few people (including yourself) that have decided to make a degradation mod so I don't think I'll continue mine. Yours sounds interesting, I'll be sure to keep an eye out for it's release. Best of luck!
User avatar
hannah sillery
 
Posts: 3354
Joined: Sun Nov 26, 2006 3:13 pm

Post » Sat Mar 09, 2013 6:40 am

Main Post Updated

The Mod will be delay for RL Reasons. Sorry Guys. When I come back I'll decide if I should start it back up again or to abandon all together.
User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm


Return to V - Skyrim