As a follow up to my post in the active Trinity/QuestTool thread here, here's what I had to do to get gem upgrade priority to factor in Minimum % Chance.
I had to update the ConvertBack method in QuestTools\UI\PercentConverter.cs to account for string values:
Then I had to modify QuestTool\ProfileTags\CompleteGreaterRift.cs line 69:
After doing so, restarting DB, and ensuring something was selected for Minimum % Chance (in my case, 70%), everything worked as expected.
As you can see, I conveniently had a gem right at the breakpoint for 70%. It upgraded once, then dropped off the list and the next highest was taken.
Hopefully this helps someone until rrrix is able to patch it in the next update.
I had to update the ConvertBack method in QuestTools\UI\PercentConverter.cs to account for string values:
Code:
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
var pf = 0f;
var pd = 0.0;
if (value is float)
{
return (float)Math.Round((float)value / 100, 2);
}
if (value is double)
{
return Math.Round((double)value / 100, 2);
}
if (float.TryParse(value.ToString(), out pf))
{
return (float)Math.Round(pf / 100, 2);
}
if (double.TryParse(value.ToString(), out pd))
{
return Math.Round(pd / 100, 2);
}
return 0f;
}
Then I had to modify QuestTool\ProfileTags\CompleteGreaterRift.cs line 69:
Code:
List<ACDItem> gems = ZetaDia.Actors.GetActorsOfType<ACDItem>()
.Where(item => item.ItemType == ItemType.LegendaryGem
&& GetUpgradeChance(item) >= minimumGemChance)
.OrderByDescending(item => GetUpgradeChance(item))
.ThenByDescending(item => item.JewelRank).ToList();
After doing so, restarting DB, and ensuring something was selected for Minimum % Chance (in my case, 70%), everything worked as expected.
Code:
Interacting With Urshi (2)
Completing Greater Rift (2)
[B][<CompleteGreaterRiftRoutine>d__20] Minimun Gem Upgrade Chance: 70[/B]
[<CompleteGreaterRiftRoutine>d__20] ***************************
[<CompleteGreaterRiftRoutine>d__20] Pre Upgrade Gem Listing
[<CompleteGreaterRiftRoutine>d__20] ***************************
[CompleteGreaterRift] Gem: Gogok of Swiftness; Rank: 10; Chance: 100
[CompleteGreaterRift] Gem: Zei's Stone of Vengeance; Rank: 7; Chance: 100
[CompleteGreaterRift] Gem: Simplicity's Strength; Rank: 2; Chance: 100
[CompleteGreaterRift] Gem: Wreath of Lightning; Rank: 2; Chance: 100
[CompleteGreaterRift] Gem: Bane of the Trapped; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Bane of the Powerful; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Taeguk; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Moratorium; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Pain Enhancer; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Gem of Efficacious Toxin; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Invigorating Gemstone; Rank: 1; Chance: 100
[B][CompleteGreaterRift] Gem: Bane of the Powerful; Rank: 25; Chance: 70[/B]
[B][QuestTools][<CompleteGreaterRiftRoutine>d__20] Using gem priority of Highest Rank[/B]
[B]Upgrading gem: Bane of the Powerful, Index: 1[/B]
[<CompleteGreaterRiftRoutine>d__20] Rift Vendor Dialog is not visible
[ExploreDungeonTag] ExploreDungeon Started
[QuestTools][GridRoute] Generated new Scene Route with 50 nodes in 10ms
[QuestTools][GridRoute] Generated new Scene Route with 50 nodes in 10ms
[QuestTools][ExploreDungeonTag] Found Object 398682!
Interacting With Urshi (2)
Completing Greater Rift (2)
[<CompleteGreaterRiftRoutine>d__20] Minimun Gem Upgrade Chance: 70
[<CompleteGreaterRiftRoutine>d__20] ***************************
[<CompleteGreaterRiftRoutine>d__20] Pre Upgrade Gem Listing
[<CompleteGreaterRiftRoutine>d__20] ***************************
[B][CompleteGreaterRift] Gem: Gogok of Swiftness; Rank: 10; Chance: 100[/B]
[CompleteGreaterRift] Gem: Zei's Stone of Vengeance; Rank: 7; Chance: 100
[CompleteGreaterRift] Gem: Simplicity's Strength; Rank: 2; Chance: 100
[CompleteGreaterRift] Gem: Wreath of Lightning; Rank: 2; Chance: 100
[CompleteGreaterRift] Gem: Bane of the Trapped; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Bane of the Powerful; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Taeguk; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Moratorium; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Pain Enhancer; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Gem of Efficacious Toxin; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Invigorating Gemstone; Rank: 1; Chance: 100
[QuestTools][<CompleteGreaterRiftRoutine>d__20] Using gem priority of Highest Rank
[B]Upgrading gem: Gogok of Swiftness, Index: 5[/B]
[<CompleteGreaterRiftRoutine>d__20] Rift Vendor Dialog is not visible
[ExploreDungeonTag] ExploreDungeon Started
[QuestTools][GridRoute] Generated new Scene Route with 50 nodes in 11ms
[QuestTools][GridRoute] Generated new Scene Route with 50 nodes in 11ms
[QuestTools][ExploreDungeonTag] Found Object 398682!
Interacting With Urshi (2)
Completing Greater Rift (2)
[<CompleteGreaterRiftRoutine>d__20] Minimun Gem Upgrade Chance: 70
[<CompleteGreaterRiftRoutine>d__20] ***************************
[<CompleteGreaterRiftRoutine>d__20] Pre Upgrade Gem Listing
[<CompleteGreaterRiftRoutine>d__20] ***************************
[B][CompleteGreaterRift] Gem: Gogok of Swiftness; Rank: 11; Chance: 100[/B]
[CompleteGreaterRift] Gem: Zei's Stone of Vengeance; Rank: 7; Chance: 100
[CompleteGreaterRift] Gem: Simplicity's Strength; Rank: 2; Chance: 100
[CompleteGreaterRift] Gem: Wreath of Lightning; Rank: 2; Chance: 100
[CompleteGreaterRift] Gem: Bane of the Trapped; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Bane of the Powerful; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Taeguk; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Moratorium; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Pain Enhancer; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Gem of Efficacious Toxin; Rank: 1; Chance: 100
[CompleteGreaterRift] Gem: Invigorating Gemstone; Rank: 1; Chance: 100
[QuestTools][<CompleteGreaterRiftRoutine>d__20] Using gem priority of Highest Rank
[B]Upgrading gem: Gogok of Swiftness, Index: 5[/B]
As you can see, I conveniently had a gem right at the breakpoint for 70%. It upgraded once, then dropped off the list and the next highest was taken.
Hopefully this helps someone until rrrix is able to patch it in the next update.