Updated :
- now uses ingame textures for highest Grift level display
Updated :
- now uses ingame textures for highest Grift level display
Supported version for all Resu plugins
I found it interesting to use that texture. If you want to abbreviate some lines of code, you can get it with this formula:
uint TextNumber = GRlevel + 23 * ((uint) (GRlevel/10)) + (uint) ((GRlevel < 100)?795145286:469991469);
I wanted to use the texture to represent the level of GR, including when you enter a public game with a GR already started, but I can't find out the level of GR in this case ( player.InGreaterRift of the players is true but player.InGreaterRiftRank returns 0 )
Hi!
How do I see the paragon percentage of other players? Is it possible?
TY
I don't think it's possible with TH. However, inspecting other players gives you their paragon level in the upper right corner.
yes, but only if the player is close. If the player is far away the value will not exist or will not be updated
Small plugin to show the paragon percentage:
Code:using System.Globalization; using Turbo.Plugins.Default; namespace Turbo.Plugins.User { public class ParagonPercentage : BasePlugin, IInGameTopPainter { public TopLabelWithTitleDecorator ParagonDecorator { get; set; } public ParagonPercentage() { Enabled = true; } public override void Load(IController hud) { base.Load(hud); ParagonDecorator = new TopLabelWithTitleDecorator(Hud) { BackgroundBrush = Hud.Render.CreateBrush(255, 255, 255, 255, 0), BorderBrush = Hud.Render.CreateBrush(255, 0, 0, 0, -1), TextFont = Hud.Render.CreateFont("tahoma", 6, 255, 0, 0, 0, true, false, false), }; } public void PaintTopInGame(ClipState clipState) { if (clipState == ClipState.BeforeClip) { var w = Hud.Window.Size.Width * 0.016f; var h = Hud.Window.Size.Height * 0.014f; foreach(var player in Hud.Game.Players) { if (!player.HasValidActor) continue; var pt = player.PortraitUiElement.Rectangle; double exper = (player.CurrentLevelNormal < 70)? (player.CurrentLevelNormal/70d) : (player.CurrentLevelParagonDouble - player.CurrentLevelParagon); ParagonDecorator.Paint(pt.X + pt.Width * 0.73f, pt.Y + pt.Height * 0.20f, w, h, string.Format(CultureInfo.InvariantCulture, "{0:0%}", exper)); } } } } }
Modified Resu plugin to include paragon percentage for all players (not tested) : plugins\Resu\ParagonPercentagePlugin.cs
Where exactly is the code that sets the display position of the info window? I have a overlapp issue with the positioning of the % info.. it overlapps the NemesisPortrait.cs I have in pludins/User folder.. provided by RNN.
I need to move ParagonPercentagePlugin display % box... a few pixels up and to the right... but it would be a godsend if you pointed me to the exact portion of code.. so i can alter and test it to my liking.....
Any feedback appreciated..
Last edited by LazyDruid; 11-26-2020 at 09:55 PM.
Thanks for the reply to me in pm RNN
Originally Posted by RNN
Hey..
Thanks for getting back to me so fast.
I adjusted the placing of the display box .. ever so slightly.. but now it is perfectly aligned with the portrait frame and toon display....
There was a slight overlap with the display and the brown border of the portrait frame border for the paragon points.
Code:if (ParagonPercentageOnTheRight) ParagonPercentageDecorator.Paint(portrait.Left + portrait.Width * 0.76f, portrait.Top + portrait.Height * 0.78, portrait.Width * 0.48f, portrait.Height * 0.14f, HorizontalAlign.Center); else ParagonPercentageDecorator.Paint(portrait.Left + portrait.Width * -0.18f, portrait.Top + portrait.Height * 0.79f, portrait.Width * 0.48f, portrait.Height * 0.14f, HorizontalAlign.Center);
Also... i adjusted the code in plugins/user/NemesisPortrait.cs to have the nemesis portrait image aligned to the left of the display instead of the right... so it is no where near the ParagonPercentage.cs display.
Code:using Turbo.Plugins.Default; namespace Turbo.Plugins.User { public class NemesisPortrait : BasePlugin, IInGameTopPainter { public NemesisPortrait() { Enabled = true; } public override void Load(IController hud) { base.Load(hud); } public void PaintTopInGame(ClipState clipState) { if (clipState != ClipState.BeforeClip) return; if (!Hud.Game.IsInGame) return; foreach (var player in Hud.Game.Players) { if (player.Powers.BuffIsActive(Hud.Sno.SnoPowers.NemesisBracers.Sno)) // 318820 { var pt = player.PortraitUiElement.Rectangle; Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.Unique_Bracer_106_x1).Draw(pt.Left - pt.Width * -0.10f , pt.Top + pt.Height * 0.81f, 19f, 26f, 1f); } } } } }
Hi all =)
Does someone has an idea, how the GRLevel Icon could be resized to a readable size?
I use a high screen size and nearly can't see the GR value in der GR box.
Maybe the textures could also overlay the level 70 text as initially intended by the text overlay "GR nn" before using the GR texture.
I think, it is contained in
but I don't understand these variables and sizes.Code:HighestSoloRiftLevelDecorator.Paint(portrait.Left + portrait.Width * 0.26f, portrait.Top + portrait.Height * 0.2f, portrait.Width * 0.5f, portrait.Height * 0.1f, HorizontalAlign.Center); glow.Draw(portrait.Left + portrait.Width * 0.17f, portrait.Top + portrait.Height * 0.08f, 60f, 60f, 0.5f); texture.Draw(portrait.Left + portrait.Width * 0.30f, portrait.Top + portrait.Height * 0.14f, 37f, 37f, 1f);
Thanks for help.
comment the green lineCode:HighestSoloRiftLevelDecorator.Paint(portrait.Left + portrait.Width * 0.26f, portrait.Top + portrait.Height * 0.2f, portrait.Width * 0.5f, portrait.Height * 0.1f, HorizontalAlign.Center); glow.Draw(portrait.Left + portrait.Width * 0.17f, portrait.Top + portrait.Height * 0.08f, 60f, 60f, 0.5f); // texture.Draw(portrait.Left + portrait.Width * 0.30f, portrait.Top + portrait.Height * 0.14f, 37f, 37f, 1f); // comment this // add this var size = 1.3f; // 1f = original size texture number(GR) var posX = 0.70f; // 1f = original X position var posY = 0.70f; // 1f = original Y position texture.Draw(portrait.Left + portrait.Width * 0.30f * posX, portrait.Top + portrait.Height * 0.14f * posY, 37f * size, 37f * size, 1f);
add the orange code
set values on size, posX, posY
Thanks for the answer, but strangely enough this didn't change anything on the sizing of the icon/texture.
EDIT: sizing factor was too small to recognising the difference XD
But I recognized now the main problem:
My native screen resolution of my monitor is 1920x1080.
=> the GR level icon looks OK and covers the L70 of the portrait.
But at 1920x1080 there is a horribly small view range in D3.
So I use a user defined resolution of 3840x2160 set in NVIDIA control panel.
The graphic card downscales this resolution to the native monitor resolution, but Windows / D3 "thinks", that there is such a high resolution and more dpi are used.
=> But at 3840x2160 the GR level icon is not scaled to the higher dpi and therefore is only 1/4 of the needed size.
I have no such sizing/scaling issues with other plugins.
Hopefully someone can fix it in this plugin.
Greetz =)
Last edited by UnOwnedUser; 03-29-2021 at 11:36 AM.
did you try to set е.g.?
var size = 10f;
Code:var size = 2.0f; // 1f = original texture size of GR number var posX = 1.0f; // 1f = original X position var posY = 1.0f; // 1f = original Y position
...works for me and my virtual resolution of 3840x2160.
But if I go back to the native resolution 1920x1080, the texture size is still double sized and too large now.
So, a good solution for all users would be a calculated size factor regarding to the resolution/dpi/whatever could count.
=> Does someone has an idea, how to fix this in general? Maybe it is a case for KillerJohn?
Last edited by UnOwnedUser; 03-29-2021 at 11:44 AM.