Item perfection discussion menu

User Tag List

Results 1 to 5 of 5
  1. #1
    User5981's Avatar First Dev On The Internet
    Reputation
    379
    Join Date
    Aug 2017
    Posts
    765
    Thanks G/R
    30/358
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Item perfection discussion

    Hi all,
    So I saw we can get Item perfection and started a little plugin to show it (not released).
    I also saw in the changelog that displaying item perfection was default but was removed from Turbohud, maybe because that stat is pointless in many cases.

    I don't know how item perfection is calculated but I think it's probably a percentage average of each primary, secondary stat percentage of each max stats available from the item. (not sure if I'm clear here).

    I think that it can become useful if we calculate it another way (yes I know I don't know yet how it's really calculated at first ) :

    - Maybe the max stats can be taken from the max ancient legendaries stats, that way it will be easier to compare different ancient ranks of a same item.
    (how it is calculated now it looks like you can have a legendary with a very good item perfection percentage but not as good as the same item version ranked ancient with a lower item perfection percentage)
    Edit : After some research Legendaries & ancient legendaries versions of the same item don't roll exactly the same affixes so It will be difficult to compare..

    - Maybe we can calculate a more useful "damage perfection" or "toughness perfection" percentage depending of the type of stats that rolled.
    (e.g : an item with more rolled stats like, Critical hit chance, attack speed, critical hit damage will have a good offense perfection and an item with rolled stats like armor, life, life on hit, any resist type will have a good defense perfection).

    I'm just sharing some ideas here and waiting for game experts ideas and opinions.
    Last edited by User5981; 09-21-2017 at 07:33 AM.
    Supported version for all Resu plugins

    Item perfection discussion
  2. Thanks cherouvim13 (1 members gave Thanks to User5981 for this useful post)
  3. #2
    User5981's Avatar First Dev On The Internet
    Reputation
    379
    Join Date
    Aug 2017
    Posts
    765
    Thanks G/R
    30/358
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I am currently working on that plugin :

    Item perfection discussion-test-png

    It displays :
    check mark : % item perfection
    crossed swords : % item offense orientation
    Shield : % item defense orientation
    Globe : % item resource orientation
    Heart : % item life orientation
    Boot : % item adventure orientation
    Supported version for all Resu plugins

  4. #3
    Runn1ng_F4st's Avatar Member
    Reputation
    1
    Join Date
    Mar 2017
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is really nice. Might I suggest below Jacks WeaponDamageRerollCalculatorPlugin?

    Item perfection discussion-example-gif

  5. #4
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    HUD uses the min-max range of the currently rolled affix. Since ancient attributes are different affixes, those can not be considered in the item's perfection calculation (there is no 1:1 mapping between the 2 sets of affixes).
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  6. Thanks User5981 (1 members gave Thanks to KillerJohn for this useful post)
  7. #5
    JarJarD3's Avatar Contributor
    Reputation
    106
    Join Date
    Oct 2017
    Posts
    395
    Thanks G/R
    41/101
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I have following code to calculate attribute (perfection) rank:
    Please correct if my formula has errors or is flawed!
    Code:
    public class RankFormula : IRankFormula
    {
    	public int calculateRank(IItemPerfection perfection)
    	{
    		double cur = perfection.Cur;
    		double min = perfection.Min;
    		double max = perfection.Max;
    		if (perfection.Attribute.ValueType == AttributeValueType._float)
    		{
    			// Current value can have rounding errors which can affect min/max comparision, fix it here.
    			if (Math.Abs(max - cur) < 0.0001) cur = max; else if (Math.Abs(cur - min) < 0.0001) cur = min;
    		}
    		return (int)calculate(cur, min, max);
    	}
    	public int calculateWeaponDamageRank(IItemPerfection pmin, IItemPerfection pdelta)
    	{
    		// Baseline (min) damage values.
    		double cur = pmin.Cur;
    		double min = pmin.Min;
    		double max = pmin.Max;
    		double dmgMin = calculate(cur, min, max);
    
    		// Maximum (delta) damage values added to baseline.
    		cur += pdelta.Cur;
    		min += pdelta.Min;
    		max += pdelta.Max;
    		double dmgMax = calculate(cur, min, max);
    
    		return (int)((dmgMin + dmgMax) / 2.0);  // Average min/max damage.
    	}
    	double calculate(double cur, double min, double max)
    	{
    		double value;
    		if (cur > min && cur < max)
    		{
    			// Current value relative distance % from Min to Max (0-100).
    			value = (((cur - min) / (max - min)) * 100);
    		}
    		else
    		{
    			// For example: "Sockets [1-1]=1" or "Crossbow [1-1]=2"
    			value = !(cur < max) ? 100 : 0;
    		}
    		return value;
    	}
    }
    Sample image, you get the idea!
    Item perfection discussion-clipboard01-gif

    [Edit] JackCeparou suggested to use this to fix rounding errors:
    Code:
    double cur = Math.Round(pmin.Cur, 2);
    Last edited by JarJarD3; 10-11-2017 at 01:21 AM.

All times are GMT -5. The time now is 08:19 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search