-
Active Member
Read weapon damage rolls?
I need to read hovered item damage rolls to be able to print a % on how high or low it is (just like TurboMGR does)
Im talking about these numbers:

Pls help me if you know how to!
Should be something like
PHP Code:
Hud.Inventory.HoveredItem.{i need this part}
-
Contributor
with this code you can cycle through all the stats this item has
Code:
var item = Hud.Inventory.HoveredItem;
if (item != null)
{
foreach (IItemStat stat in item.StatList) {
if (stat != null)
{
// code here
}
}
}
the things you will probably need are stat.Id and stat.Value
this image shows you a dump of some dmg related stat ids and their values on the left and the corresponding item on the right.
in you code you will have to check for something like this: stat.Id.Equals("Damage_Weapon_Min_#2")
i am also pretty sure that you can look up the stat ids in an acd dump
-
Post Thanks / Like - 1 Thanks
Csavo (1 members gave Thanks to prrovoss for this useful post)
-
-
Savvy ? 🐒
Originally Posted by
Csavo
can you tell me how did you print all that on the screen?

He used my dev plugin : Jack.Says
And probably a code snippet like this :
PHP Code:
var item = Hud.Inventory.HoveredItem;
if (item != null)
{
Jack.Says.Debug("======= hovered ========");
foreach (IItemStat stat in item.StatList)
{
if (stat != null)
{
Jack.Says.Debug("statId {0}", stat.Id);
Jack.Says.Debug("statValue {0}", stat.Value);
}
}
}
Last edited by JackCeparou; 04-11-2017 at 04:42 PM.
-
Post Thanks / Like - 1 Thanks
Csavo (1 members gave Thanks to JackCeparou for this useful post)
-
Active Member
holy shit thats some sweet tool over there :gusta:
-
Active Member
looks like the average weapon roll ID is different for different elements (Damage_Weapon_Min#3 is for added cold damage, #4 is for poison, #2 lightning) but I still can't figure out how to call for their value? can you give an example on how to call for the stat.Value of Damage_Weapon_Min#3 for example?
-
Contributor
Originally Posted by
Csavo
looks like the average weapon roll ID is different for different elements (Damage_Weapon_Min#3 is for added cold damage, #4 is for poison, #2 lightning) but I still can't figure out how to call for their value? can you give an example on how to call for the stat.Value of Damage_Weapon_Min#3 for example?
you cycle through the stats and check for the id
Code:
if(stat.Id.Equals("Damage_Weapon_Min#3")) {
var value = stat.Value;
}
-
Post Thanks / Like - 1 Thanks
Csavo (1 members gave Thanks to prrovoss for this useful post)
-
-
Contributor
the IItem interface already has an
IItemPerfection[] Perfections { get; }
attribute that gives you (probably) a percentage of how good the attributes rolled, for each attribute on the item.
in addition to that there is the
double Perfection { get; }
that gives you a perfection percentage of the whole item.
-
Active Member
Originally Posted by
prrovoss
the IItem interface already has an
IItemPerfection[] Perfections { get; }
oh shit ^^ and how do I use that for displaying the weapon dmg roll percentage?
because if its the same as the TurboMGR's weapon dmg roll estimation, its useless:

how is that weapon roll only 54% perfect?
the min dmg roll 1347 is almost maxed [1153-1365]
the max roll 1615 is decent too [1408-1700]
no way its an "average" roll
Last edited by Csavo; 04-11-2017 at 08:03 PM.