-
Active Member
[Miqui] LegendaryItemAffixPlugin
This plugin works on v9.2. It is not tagged as INTERNATIONAL because it uses "s" to describe "seconds", which might not be an international convention.
Hello
Today I'm bringing a plugin that I made a while ago, that helps displays on legendary items the important stat you are looking for. It can only display one stat, which is usually the legendary effect affix (think 85% oculus, 30% Shield of fury and so on). While the most important stat on an item is generally its legendary affix, some items are important for other things like Witching hour with crit damage, or Tzo Krin's Gaze with Wave of Light damage%. It can handle those items as well. As a matter of fact, at the moment it only handles these two special cases, but you could have it work on even non legendary items (I mean, on set items), to display the crit damage on a traveler's pledge for example.
The plugin itself is somewhat separated from the data it uses to display whatever you want to display. I share my own data here, but you can expand on it, improve it, change it, etc. It's not 100% perfect because I inputed all the SNOs by hand (yikes) but it works.
The affix value is displayed at the top left of the legendary item. For that reason, I had to disabled the socketed legendary gem value. In my opinion, it's less important to know you have a level 50 iceblink in your ring than it is to know your oculus is 85%. It's not like anybody is playing with gems lower than 150 socketed these days anyway.
The legendary affix part works on unidentified items, but the pure stat part (crit dmg on witching hour, etc) will not.
Screenshot : https://i.imgur.com/TLCfEnG.jpg
You can see that the tzo krin's has a 150% Wave of Light value (of course, since it's primal), the dawn a 65%, the balista a 2.9% and so on.
Nothing is displayed for legendary affixes that do not have a range (pride's fall, stone gauntlets...)
How to install :
Get the three files here :
LegendaryItemAffixPlugin (main plugin)
LegendaryItemAffixDataPlugin (legendary item stat list)
Utils (function to know if an item is equipped)
Put those into a /Miqui/ folder, inside your /plugins/ folder.
If you want the plugin to work only on unidentified items (and re-enable legendary gems socket level), just change line 58 of the first file from 'false' to 'true' (ShowOnUnidentifiedOnly).
Known issues :
- Some legendary are not supported (I never personnaly use mudsputter boots...)
- I didn't find a way to get the legendary affix value for Justice Lantern for some reason
- If you unsocket a legendary gem from a ring, it will probably bug out the value of that ring until you make a new game.
- Doesn't work for legendary potions
- My C# probably sucks so if you have anything to say about it, go ahead.
Last edited by Miquiqui; 12-15-2020 at 03:42 PM.
Reason: Updated
-
Post Thanks / Like - 5 Thanks
-
Active Member
you can use a Dictionary instead of making an if-statement for every SNO
Code:
public static readonly Dictionary<int, AffixType> ItemInfoDic = new Dictionary<int, AffixType>()
{
{ 197717, AffixType.PERCENTAGE}, // Schaefer hammer
{ 188185, AffixType.PERCENTAGE}, // Odin son
};
Critdamage on Witching Hour is not a Legendary Power Affix. It will not be readable when the item is unidentified.
Some items have a 10 % multiplier for the power value instead of 100. but i dont remember which ones it was. maybe it was legendary gems.
Last edited by d2k2; 12-15-2020 at 01:07 PM.
-
Active Member
First of all, I hope you don't mind I made & published this plugin d2k2 - I didn't get the idea from nowhere.
I changed to dictionary as you suggested. It is indeed way smarter. I don't know why I didn't think of that. Well, I kinda do. I started with more or less the same system that Gigi used for his buffRule thing. With the ifs and the yields. I realized that yields weren't useful at all, but kinda blocked my mindstate into the ifs and forgot about dictionaries.
Dictionaries are way better because I don't have to create a new object every time, that was one of my main concern when I made the plugin tbh.
I will update the OP once I have tested it a bit more.
> Critdamage on Witching Hour is not a Legendary Power Affix. It will not be readable when the item is unidentified.
Yeah, I know, it's mentionned in the OP ("works on unidentified items, but the pure stat part (crit dmg on witching hour, etc) will not."). It's still is nice to have so it's there and you can use it.
> Some items have a 10 % multiplier for the power value instead of 100. but i dont remember which ones it was. maybe it was legendary gems.
I had some issues at the start with legendary gems, so I dropped support for those very quickly. It was probably that, indeed. I didn't look into it very long because it's not very important to me to see anything but the actual gem level anyway.
-
Member
Dear Miquiqui.
Thanx for your job. Great plugin.
Is it possible to create the option to keep enabled the socketed legendary gem value, if using ShowOnUnidentifiedOnly = true?
It is useful for me at the beginning of the seasons, as I need to share the gems between the different chars. And then I forget to take them off when switching from one to the other.
Thanx again.
-
Active Member
New version is "released" :
How to install :
Get the three files here :
LegendaryItemAffixPlugin (main plugin)
LegendaryItemAffixDataPlugin (legendary item stat list)
Utils (function to know if an item is equipped)
Put those into a /Miqui/ folder, inside your /plugins/ folder.
Don't forget to delete the previous files.
(also updated in OP)
@littledez I binded the "ShowOnUnidentifiedOnly" to enabling or disabling the gem level. Just put it to true and it should do what you want.
-
Post Thanks / Like - 3 Thanks
-
Member
A quick question i dont see cirri satchel it is possible to add?
-
Active Member
Of course.
I have stopped updating my plugins because hud is no longer free for me (unless I want to find workarounds) and I use something else instead because of that.
If you want to add an item, you can 1) in the LegendaryItemAffixPlugin enable debug (debug = true). Then 2) find the log file with all items logged and find the item you want to add by name. It should have a Sno associated.
Then 3) in the LegendaryItemAffixDataPlugin you can add that item by just copy pasting another line and changing the Sno to the sno you got by running in debug mode.
The Sno for 9th cirri satchel is 298170, so in the LegendaryItemAffixDataPlugin, line 152. you can add
Code:
itemAffixInfos.Add(298170, ItemAffixInfo.PercentageFromSno(298170)); // 9th Cirri Satchel
and you should be good to go.
-
Post Thanks / Like - 1 Thanks
Amon84 (1 members gave Thanks to Miquiqui for this useful post)
-
Member
Works fine.Thanks for the help
-
Member
Hey, I tried adding Crudest Boots but failed
maybe you can help me out?
I used this Code: itemAffixInfos.Add(485724, ItemAffixInfo.PercentageFromSno(485724)); // The Crudest Boots
-
Active Member
ItemSNO for crudest boots should be 205620, try with that instead.
-
Post Thanks / Like - 1 Thanks
mois (1 members gave Thanks to Miquiqui for this useful post)
-
Member
I think it would be great if the maximum % for an item would be shown in a different color.
-
Member
lowkey best to just remove the sno as a requirement, might even work by just drawing every item that has an affix value that's not 0 or 1