SphereCommunity
Hitted body parts and durability of items - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Hitted body parts and durability of items (/Thread-Hitted-body-parts-and-durability-of-items)



Hitted body parts and durability of items - Baeguth - 08-12-2017 12:08 AM

Hello!

I was making a new combat system by overriding the combat triggers.
Right now I'm blocked with durability of items. I will try to make some questions/sentences. Thank you for all your help:


  1. Every time an item gets damaged, the hits points are reduced by 1? If yes can i increase the hitspoints reduction someway?
  2. How can i "force" a precise piece of armor to be damaged while in combat?
  3. LOCAL.ITEMDAMAGECHANCE Sets the chance for the hitted part of the body (Armor or shield, if any) to be damaged (Default: 40). 100 is damaged for sure, 0 is not damaged?
  4. How can i "force" a precise layer of the body to be damaged while in combat?
  5. Is there any way to show while clicking once the item, its durability after its name?



RE: Hitted body parts and durability of items - darksun84 - 08-12-2017 12:34 AM

1. By default i think one, you can override the damage in @ItemDamage
2. LOCAL.ItemDamageLayer in @GetHit, layer values in are in sphere_defs.scp and you should put there only valid layer.
3. Yes, 0 no damage, 100 always damage.
4. You can't, but you can use LOCAL.ItemDamageLayer then check if the layer is armored by using ISARMOR function.
5. If you enable tooltips, the item durability is shown on the tooltip. Without tooltips, a player have to rely on arms lore for seeing how many hitpoints the item has, you can avoid this by using @ItemClick trigger and displaying the durability by message/sysmessage and so on.