0.10.4: Magic item degrading

Curated user bug reports with enough information to reproduce issue. Moderators will move topics here from Help & Support once a bug is confirmed and enough information has been provided.
User avatar
mikeprichard
Posts: 735
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.10.4: Magic item degrading

Post by mikeprichard » Tue Sep 17, 2019 7:51 am

gimble wrote:
Mon Sep 16, 2019 10:58 pm
I got the 800 number after looking at the amulet through daghex. It looks like enchanting retains the original durability value of the item as it had 800 durability before enchanting.
gimble wrote:
Tue Sep 17, 2019 7:04 am
Self enchanted items seem to always retain the original item's durability in Classic. It might be that the standard magic items sold by mages guild/Julianos have a durability of 1500 (for non-weapon/armor) - this needs to be confirmed.
Following up on the above points, I'm still trying to figure this out (guess I'd rather work on this than my real job for a bit longer). There are three concepts I had thought are entirely separate, but I'm confused about whether this is even the case, and where exactly these concepts are drawing from in the code. FYI, I can't get DAGHEX to work on my Win7 64-bit setup, so I can't review it myself. Any specific comments/corrections to the below (talk to me as if I'm on the level of a toddler, and you won't be far off) would again be much appreciated!

1) The "enchantment points" of an armor/weapon/item, i.e. how strong an enchantment can be applied to an armor/weapon/item made through the Item Maker.
I think this equates to "enchantmentPoints" per https://github.com/Interkarma/daggerfal ... plates.txt and https://en.uesp.net/wiki/Daggerfall:Enc ... m_Capacity. E.g. per lines 2669, 2769, and 2149 of the above git code and UESP tables, an amulet has 2300 "enchantmentPoints", a torc has 2050 "enchantmentPoints", and a helm has 900 "enchantmentPoints". EDIT: I was confused about the helm material modifier, but I think I've figured it out: the "enchantmentPointMultiplier" per lines 52-53 (not 49-50) of https://github.com/Interkarma/daggerfal ... Builder.cs applies here and is then rounded down to the nearest number, such that the helm if of Daedric material is modified to 2700 enchantment points, as also reflected in the above UESP tables, due to the code lines 52-53 enchantment point material multiplier of 12/4 = 3 x 900 = 2700.

2) The "enchantment health" of an armor/weapon/item, i.e. the armor's/weapon's/item's durability related to enchantment use for an armor/weapon/item a) made through the Item Maker or b) if found.
Both for armor/weapons (I suppose taking the enchantment material modifiers per lines 52-53 of https://github.com/Interkarma/daggerfal ... Builder.cs into account (?)) and other items (e.g. amulets, torcs, gems, etc.), apparently this equates to "hitPoints" per https://github.com/Interkarma/daggerfal ... plates.txt, but only if made through the Item Maker (remembering that degradation only applies to Cast When Held/Used/Strikes and Item Deteriorates enchantments); otherwise, for found/purchased standard magical items with Cast When held/Used/Strikes enchantment types, the data at https://en.uesp.net/wiki/Daggerfall:Mag ... ical_Items may be correct (needs confirmation) (?).

3) The "physical health" of an armor/weapon, i.e. the armor's/weapon's durability related to combat abrasion.
My guess per earlier discussions here is that this is somehow calculated based on the "hitPoints" per https://github.com/Interkarma/daggerfal ... plates.txt and the "condition" values per lines 49-50 as also further described and distinguished from enchantment values starting at line 666 of https://github.com/Interkarma/daggerfal ... Builder.cs, but this all remains unclear (?).

gimble
Posts: 18
Joined: Mon Sep 16, 2019 3:05 am

Re: 0.10.4: Magic item degrading

Post by gimble » Tue Sep 17, 2019 8:49 am

I think the concepts may be simpler than that. Here's my understanding based on observed classic behavior (as well as DFU - differences are pointed out where relevant):

Durability: Every item has a durability value ("hitpoints" value from the item templates defined in the github link above). Better item materials have higher durability values that are multiples of their base durability depending on the specific material - this applies to weapons and armor only as I don't think non-weapon/armor items (like torcs and amulets) have a material type. When a non-magical item is enchanted, it retains the same durability value as before.

Enchantment points: This is how much capacity the item has to hold magic effects for custom enchantment. For weapons & armor, item material multiplies the base enchantment points defined for the item. The item maker allows adding disadvantages to increase the enchantment capacity of any item.

Item wear/degradation: Irrespective of the source of wear & tear (i.e. combat or magic), the net effect is the item loses some durability. Enchantment point value is not tied to the durability of the item.

For combat durability loss, DFU matches classic behavior. It would require further review of code to get the exact mechanics, but it seems logical that every succesful weapon strike or hit taken by armor results in a loss of durability proportional to the damage. I am not sure if enemy spell damage affects durability of armor.

For durability loss due to magic, DFU differs from classic for castwhenheld items (this is explained in previous posts).

Repair services fix the durability value back to maximum. Repair items enchantment fixes durability loss for magic items - For DFU, the exact amount seems to be 1 point repaired for every 4 in-game minutes for one item. The effect can stack.

What is unknown:
1. Does the strength of enchantment affect the durability decay for castwhenheld items? For cast when strike/used items the durability loss is a constant value tied to the specific action, so it would be logical that Classical would have implemented a similar constant decay effect.
2. Do all pre-enchanted items sold by Mages guild (or temple of Julianos or found as random loot) that are not weapons/armor have a durability value of 1500? It seems that all the store bought enchanted items (that are not weapons/armor) have this durability value of 1500 - this is based on looking at those items using daghex. It would help to independently confirm.

Daghex: I run this using dosbox. My daggerfall installation is just the daggerfallsetup from UESP. The steps to run:
1. Copy daghex.exe into the Daggerfall installation folder
2. Run dosbox from the same folder
3. Enter the following commands:
mount C "."
C:
Daghex.exe
4. It should then ask which save file to load. The rest is explained in the daghex documentation
Last edited by gimble on Tue Sep 17, 2019 9:16 am, edited 1 time in total.

User avatar
mikeprichard
Posts: 735
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.10.4: Magic item degrading

Post by mikeprichard » Tue Sep 17, 2019 9:13 am

Thanks for your patience with all my questions. I think you and I are actually saying the same things in our two posts immediately above, with the important apparent distinction between the physical/"combat" durability and enchantment/"magic" durability of armors/weapons I pointed out just above; I think the important point here is that there are two completely different material modifiers applied to armor/weapon base "hitPoints" for these purposes. To restate/summarize what seems to be going on:

1) Physical/combat durability of armors/weapons, all:
Equals the armor's/weapon's base "hitPoints", as modified by the "condition" material modifiers at lines 49-50 of https://github.com/Interkarma/daggerfal ... Builder.cs.
2) Enchantment/magic durability of armors/weapons, if created through the Item Maker:
Equals the armor's/weapon's base "hitPoints", as modified by the "enchantment" material modifiers at lines 52-53 of the above.
3) Enchantment/magic durability of other items, if created through the Item Maker:
Equals the item's base "hitPoints"; no material modifiers are relevant for these items that are not armors/weapons.
4) Enchantment/magic durability of armors/weapons/other items, if found through loot/rewards/merchants:
This is your unknown question 2. - see https://en.uesp.net/wiki/Daggerfall:Mag ... ical_Items for possible values.

EDIT: Looks like we're editing our posts at the same time!
Last edited by mikeprichard on Tue Sep 17, 2019 9:37 am, edited 8 times in total.

gimble
Posts: 18
Joined: Mon Sep 16, 2019 3:05 am

Re: 0.10.4: Magic item degrading

Post by gimble » Tue Sep 17, 2019 9:26 am

mikeprichard wrote:
Tue Sep 17, 2019 9:13 am
Thanks for your patience with all my questions.
No problem. I really appreciate all the hard work put into this project.
mikeprichard wrote:
Tue Sep 17, 2019 9:13 am
I think the important point here is that there are two completely different modifiers applied to armor/weapon base "hitPoints" for these purposes: in https://github.com/Interkarma/daggerfal ... Builder.cs, the modifiers at lines 49-50 apply to determine the armor's/weapon's physical/combat durability, while the modifiers at lines 52-53 apply to determine the armor's/weapon's enchantment/magic durability. For items other than armors/weapons, physical/combat durability is irrelevant, while the base "hitPoints" likely equate to the enchantment/magic durability if the item is created through the Item Maker (if not created through the Item Maker, that's your unknown question 2.). Yes yes?
Not exactly - what I am saying is that there is only one durability (hitpoint) value for every item, regardless of enchantment. The hitpoint value is modified by item material. Only the hitpoint value counts whether the durability loss is from combat or enchantments. There is no separate "enchantment" durability for magic item use.

User avatar
mikeprichard
Posts: 735
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.10.4: Magic item degrading

Post by mikeprichard » Tue Sep 17, 2019 9:28 am

gimble wrote:
Tue Sep 17, 2019 9:26 am
Not exactly - what I am saying is that there is only one durability (hitpoint) value for every item, regardless of enchantment. The hitpoint value is modified by item material. Only the hitpoint value counts whether the durability loss is from combat or enchantments. There is no separate "enchantment" durability for magic item use.
Yes, I think that's what I'm trying to say as well - please see my edited post above. The item material only applies for armors/weapons, which results in the distinctions I'm making between these and "other items".

gimble
Posts: 18
Joined: Mon Sep 16, 2019 3:05 am

Re: 0.10.4: Magic item degrading

Post by gimble » Tue Sep 17, 2019 9:37 am

Yes, sorry for the multiple edits. I agree with what you have described, except for one case:
mikeprichard wrote:
Tue Sep 17, 2019 9:13 am
2) Enchantment/magic durability of armors/weapons, if created through the Item Maker:
The modifiers at lines 52-53 of the above apply to the armor's/weapon's base "hitPoints".
The modifiers are from lines 49-50 in this case as well. Lines 52-53 defines the enchantment capacity multiplier by material type, which only determines how many magical effects the item can hold and not how durable the item will be.

For example, let's take a claymore. From the template definition, it has a base hitpoint value of 1400 and enchantment point value of 700. A daedric claymore will have (1400 x 32)/4 = 11200 hitpoints and (700 x 12)/4 = 2100 enchantment points.
After enchantment, the daedric claymore will continue to have 11200 hitpoints. Any damage from combat or magic decay is applied to this 11200 hitpoints base (which also explains why daedric magic items last much longer). The 2100 enchantment points allow more enchantments to be placed on the item without needing to take a disadvantage - it does not affect how much durability the item has to withstand degradation from magic or combat.

Edit:fixed an error
Last edited by gimble on Tue Sep 17, 2019 10:10 am, edited 2 times in total.

User avatar
mikeprichard
Posts: 735
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.10.4: Magic item degrading

Post by mikeprichard » Tue Sep 17, 2019 9:57 am

gimble wrote:
Tue Sep 17, 2019 9:37 am
Yes, sorry for the multiple edits. I agree with what you have described, except for one case:
mikeprichard wrote:
Tue Sep 17, 2019 9:13 am
2) Enchantment/magic durability of armors/weapons, if created through the Item Maker:
The modifiers at lines 52-53 of the above apply to the armor's/weapon's base "hitPoints".
The modifiers are from lines 49-50 in this case as well. Lines 52-53 defines the enchantment capacity multiplier by material type, which only determines how many magical effects the item can hold and not how durable the item will be.
Ahhhh right! I was even trying to say that myself a couple posts above. Despite my earlier discussion here, it seems there really is only one "durability" value (for purposes of both combat and magic/enchantment usage) for every armor, weapon, and other item. To finally get everything straight in my mind after my ridiculous number of earlier edits:

1) Enchantment capacity of armors/weapons/other items, if created through the Item Maker:
Equals the armor's/weapon's/other item's base "enchantmentPoints" (in https://github.com/Interkarma/daggerfal ... plates.txt), as modified by the "enchantment" material modifiers at lines 52-53 for armors/weapons (in https://github.com/Interkarma/daggerfal ... Builder.cs). These values appear to be correctly shown at https://en.uesp.net/wiki/Daggerfall:Enc ... m_Capacity.

2) Durability (combat/enchantment) of armors/weapons/other items, if non-enchanted for armors/weapons or if enchanted through the Item Maker:
Equals the armor's/weapon's/other item's base "hitPoints" (" "), as modified by the "condition" material modifiers at lines 49-50 for armors/weapons (" ").

3) Durability (combat/enchantment) of armors/weapons/other items, if enchanted and found through loot/rewards/merchants:
This is your unknown question 2 - see https://en.uesp.net/wiki/Daggerfall:Mag ... ical_Items for possible values.
Last edited by mikeprichard on Tue Sep 17, 2019 10:31 am, edited 1 time in total.

gimble
Posts: 18
Joined: Mon Sep 16, 2019 3:05 am

Re: 0.10.4: Magic item degrading

Post by gimble » Tue Sep 17, 2019 10:07 am

Almost there. One further clarification:
mikeprichard wrote:
Tue Sep 17, 2019 9:57 am

1) Enchantment capacity of armors/weapons/other items, if created through the Item Maker:
Equals the armor's/weapon's/other item's base "hitPoints" (in https://github.com/Interkarma/daggerfal ... plates.txt), as modified by the "enchantment" material modifiers at lines 52-53 for armors/weapons (in https://github.com/Interkarma/daggerfal ... Builder.cs). These values appear to be correctly shown at https://en.uesp.net/wiki/Daggerfall:Enc ... m_Capacity.
The enchantment capacity is derived from the base enchantmentpoints defined in the item template (not hitpoints), modified by the material multipliers in line 52-53. See the claymore example described above for more details.

The wiki page showing item enchantment capacity is correct - the values are consistent with the base enchantmentpoints from item templates modified by the enchantment multipliers for different materials.

As stated earlier, the durability values for these items will be different as they are derived from the hitpoints value.

User avatar
mikeprichard
Posts: 735
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.10.4: Magic item degrading

Post by mikeprichard » Tue Sep 17, 2019 10:33 am

Thanks - corrected my typo above (hitPoints should instead be enchantmentPoints for enchantment capacity purposes - I just slipped up when typing, but realize this should be the case from my Daedric helm enchantment capacity example earlier). Thanks yet again for devoting so much time to helping me understand what we know and what we still don't - very helpful.

User avatar
pango
Posts: 1614
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.10.4: Magic item degrading

Post by pango » Sun Nov 10, 2019 9:23 pm

I did some quick tests with DaggeD, and a Daedric Plate of the Orc Lord of mine, that has Orc Strength effect on held. DaggeD displays "HP" and "max HP" for items, and can quickly reparse a gamesave, which is very convenient.

What I observed so far:
  • the plate had 11847/12000 initially
  • just equipping it made it loose 27 HP (11820)
  • loitering 3 hours with it equipped made it loose 3 HP (1 HP/hour)
  • loitering 2 more hours, its effect was automatically recast. wear rate stayed the same (1 HP/hour)
  • still loitering one hour at a time, I had to wait 7 hours for the next recast.
  • unequiping the plate didn't change its durability
  • reequipping it made it loose 27 HP again
  • ...
TL;DR: there's some wear of 27 HP when equipping the item, I haven't checked if it depends on the item or effect.
Then after that there's a constant wear of 1 HP every hour, and no wear for unequiping the item.
Effect is recast every 7 game hours. For example if the effect was triggered at 1:00, then it will be recast at 8:00 if you're wearing it at that moment. It won't depend on whether you had it equipped or not or partially in the meantime. In fact all rerolls seem the happen simultaneously.
I need to check that period more precisely, without using loitering. Either way, recast doesn't seem to trigger extra item wear. The only interesting consequence of periodic recast is that effect magnitude is periodically rerolled; So you can't equip/unequip an item until you get a good roll, then keep that roll for as long as you want by just never unequipping it.
Last edited by pango on Mon Nov 11, 2019 12:40 am, edited 2 times in total.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply