![]() |
Custom Armor Rating Calculation? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Custom Armor Rating Calculation? (/Thread-Custom-Armor-Rating-Calculation--5489) |
Custom Armor Rating Calculation? - Baeguth - 08-11-2017 05:37 PM Hello! I'm currently working on the combat system of my server and I would like to change the actual armor rating calculation that is implemented and described here : Sphere Default Armor Calculation Is there any way to change the percentages of the layers? Thank you, RE: Custom Armor Rating Calculation? - darksun84 - 08-11-2017 08:54 PM No, unless you change it in the source. I think that even if you script it, the AR value displayed in the status will be based on the percentage of the layers found in the source code. By the way the values on the wiki seems outdated, these are the new ones static const CArmorLayerType sm_ArmorLayers[ARMOR_QTY] = { { 15, sm_ArmorLayerHead }, // ARMOR_HEAD { 7, sm_ArmorLayerNeck }, // ARMOR_NECK { 0, sm_ArmorLayerBack }, // ARMOR_BACK { 35, sm_ArmorLayerChest }, // ARMOR_CHEST { 14, sm_ArmorLayerArms }, // ARMOR_ARMS { 7, sm_ArmorLayerHands }, // ARMOR_HANDS { 22, sm_ArmorLayerLegs }, // ARMOR_LEGS { 0, sm_ArmorLayerFeet } // ARMOR_FEET }; RE: Custom Armor Rating Calculation? - Baeguth - 08-11-2017 09:35 PM (08-11-2017 08:54 PM)darksun84 Wrote: No, unless you change it in the source. Thank you as always. However isnt a bit difficult to script new armors due to the percentage? I have to consider that percentage in order to put the correct value that i want to be displayed... RE: Custom Armor Rating Calculation? - darksun84 - 08-11-2017 10:11 PM If you are using the old armour system (that means COMBAT_AOS_ELEMENTAL engine disabled) then yes, you will have to tweak the armour values until you get the desired results. By the way, take note that when using the old armour system the damage will be not reduced by a percentage, instead it will be reduced by a flat amount, the percentage is just used for contributing to the total AR of a character. Code: First the value ArmorMax is calculated: With an AR of 100, you will reduce the amount of damage by a minimum of 3 and a maximum of 19. With an AR of 10, you will reduce the amount of damage by a minimum of 0 ( no damage reduction) and a maximum of 3. With an AR of 50, you will reduce the amounf of damage by a minimum of 1 and a maximum of 9 RE: Custom Armor Rating Calculation? - Baeguth - 08-11-2017 11:00 PM (08-11-2017 10:11 PM)darksun84 Wrote: If you are using the old armour system (that means COMBAT_AOS_ELEMENTAL engine disabled) then yes, you will have to tweak the armour values until you get the desired results. mmhh I dont like it at all. I think I will override it... To me having 100 ar and being able to reduce the damage of a maximun of 19 is too little! thank you as always! |