EliteHealthListPlugin menu

User Tag List

Results 1 to 8 of 8
  1. #1
    madcloud's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    EliteHealthListPlugin

    Hi Guys,

    can anyone help me updating this plugin ? i can't find it anywhere for some reason. It should basically show the elite health as a percentage on top of them, which is usually helpful with RGK.

    If not, then can someone guide me on how to fix old plugins to work on the latest turbhud release ?

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Turbo.Plugins.Default;

    namespace Turbo.Plugins.Psycho
    {

    public class EliteHealthListPlugin : BasePlugin, IInGameWorldPainter
    {
    public IFont TextFont { get; set; }
    public IBrush BorderBrush { get; set; }
    public IBrush BackgroundBrush { get; set; }
    public IBrush RareBrush { get; set; }
    public IBrush ChampionBrush { get; set; }

    public EliteHealthListPlugin()
    {
    Enabled = true;
    }

    public override void Load(IController hud)
    {
    base.Load(hud);

    TextFont = Hud.Render.CreateFont("tahoma", 7, 120, 255, 255, 255, false, false, true);
    BorderBrush = Hud.Render.CreateBrush(255, 255, 255, 255, 1);
    BackgroundBrush = Hud.Render.CreateBrush(255, 125, 120, 120, 0);
    RareBrush = Hud.Render.CreateBrush(255, 255, 128, 0, 0);
    ChampionBrush = Hud.Render.CreateBrush(255, 0, 128, 255, 0);
    }

    public void PaintWorld(WorldLayer layer)
    {
    var monsters = Hud.Game.AliveMonsters;
    Dictionary<IMonster, string> eliteGroup = new Dictionary<IMonster, string>();
    foreach (var monster in monsters)
    {
    if (monster.Rarity == ActorRarity.Champion || monster.Rarity == ActorRarity.Rare)
    {
    eliteGroup.Add(monster, String.Join(", ", monster.AffixSnoList));
    }
    }

    Dictionary<IMonster, string> eliteGroup1 = eliteGroup.OrderBy(p => p.Value).ToDictionary(p => p.Key, o => o.Value);

    var px = Hud.Window.Size.Width * 0.00125f;
    var py = Hud.Window.Size.Height * 0.001667f;
    var h = py * 6;
    var w2 = py * 80;
    var count = 0;
    string preStr = null;

    foreach (var elite in eliteGroup1)
    {
    if (elite.Key.Rarity == ActorRarity.Champion)
    {
    var eliteCurMaxHealth = 0.0d;
    var eliteMaxHealth = 0.0d;
    bool illusionist = false;
    int same = 0;
    eliteCurMaxHealth = elite.Key.MaxHealth;
    same = 0;

    foreach (var monster2 in monsters)
    {
    if (eliteMaxHealth < monster2.MaxHealth && monster2.Rarity == ActorRarity.Champion) eliteMaxHealth = monster2.MaxHealth;
    }

    foreach (var monster1 in monsters)
    {
    if (monster1.Rarity == ActorRarity.Champion)
    {
    if (eliteCurMaxHealth == monster1.MaxHealth) same ++;
    if (same == 2)
    {
    illusionist = true;
    break;
    }
    }
    }

    if (illusionist == false)
    {
    var w = elite.Key.CurHealth * w2 / elite.Key.MaxHealth;
    var text = (elite.Key.CurHealth * 100 / elite.Key.MaxHealth).ToString("f0")+ "%";
    var layout = TextFont.GetTextLayout(text);
    if (preStr != elite.Value || preStr == null) count++;
    var y = py * 8 * count;

    //BorderBrush.DrawRectangle(x, y, 70, h);
    BackgroundBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, w2, h);
    TextFont.DrawText(layout, Hud.Window.Size.Width * 0.125f + px + w2, y - py);
    ChampionBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, (float)w, h);
    preStr = elite.Value;
    count++;
    }
    }

    if (elite.Key.Rarity == ActorRarity.Rare)
    {
    var eliteCurMaxHealth = 0.0d;
    var eliteMaxHealth = 0.0d;
    bool illusionist = false;
    int same = 0;
    eliteCurMaxHealth = elite.Key.MaxHealth;
    same = 0;

    foreach (var monster2 in monsters)
    {
    if (eliteMaxHealth < monster2.MaxHealth && monster2.Rarity == ActorRarity.Rare) eliteMaxHealth = monster2.MaxHealth;
    }

    foreach (var monster1 in monsters)
    {
    if (monster1.Rarity == ActorRarity.Rare)
    {
    if (eliteCurMaxHealth == monster1.MaxHealth) same ++;
    if (same == 2)
    {
    illusionist = true;
    break;
    }
    }
    }

    if (illusionist == false)
    {
    var w = elite.Key.CurHealth * w2 / elite.Key.MaxHealth;
    var text = (elite.Key.CurHealth * 100 / elite.Key.MaxHealth).ToString("f0")+ "%";
    var layout = TextFont.GetTextLayout(text);

    if (preStr != elite.Value || preStr == null) count++;

    var y = py * 8 * count;
    //BorderBrush.DrawRectangle(x, y, 70, h);
    BackgroundBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, w2, h);
    TextFont.DrawText(layout, Hud.Window.Size.Width * 0.125f + px + w2, y - py);
    RareBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, (float)w, h);
    preStr = elite.Value;
    count++;
    }
    }
    }
    eliteGroup.Clear();
    }
    }
    }

    EliteHealthListPlugin
  2. #2
    madcloud's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a note, the one available plugins shows the elite health in a health bar, i am looking for a percentage one please.

  3. #3
    RNN's Avatar Legendary
    Reputation
    811
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/774
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by madcloud View Post
    Just a note, the one available plugins shows the elite health in a health bar, i am looking for a percentage one please.
    That looks similar to the EliteBarPlugin plugin by Gigi
    You may be interested in these two: [ENGLISH] [Gigi] EliteBarPlugin - [ENGLISH] [BM] HealthBarOnElitePlugin
    Last edited by RNN; 04-01-2019 at 09:11 AM.

  4. #4
    madcloud's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you but i already got these, they work fine but following bars is a bit hard that is why i am looking for the one that shows percentage on top of the elite

  5. #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)
    Hi
    This is a bit off topic, as original question was about
    It should basically show the elite health as a percentage on top of them, which is usually helpful with RGK.
    (and for the original question I could not find answer, as I do not know the height of the monster, so AFAIK it is not possible to draw anything "on top of it" - only on on foot aka hitbox)

    I made a bit of contest between Gigi.EliteBarPlugin vs. EliteHealthListPlugin.
    First EliteBarPlugin and below of it is EliteHealthListPlugin (sorry about the image quality because of some processing I have to make).
    Gigi.EliteBarPlugin vs. EliteHealthListPlugin - Album on Imgur

    And I'd say EliteBarPlugin won easily on all aspect except of brevity.
    EliteHealthListPlugin combines monster packs and show only largest health of all in one row.

    And in one case EliteHealthListPlugin did not catch monsters at all.

    I made a screen capture plugin for the contest because taking screen shots manually was out of question for me.
    [C#] ScreenCapture - Pastebin.com

    Code:
    Hud.RunOnPlugin<DefaultUI.ScreenCapture>(plugin =>
    {
        plugin.IsCaptureOn = (hud) => 
        {
            return (hud.Game.SpecialArea == SpecialArea.Rift || hud.Game.SpecialArea == SpecialArea.GreaterRift) &&
                hud.Game.MonsterPacks.Any(x => x.MonstersAlive.Any());
        };
    });

  6. #6
    madcloud's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Jar,
    I agree with you however, the health percentage with a small circle on top of the elite helps big time with NECRO RGK Corpse Lance build, easier to aim. Can you maybe use an average height ?

  7. #7
    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)
    Originally Posted by madcloud View Post
    Hello Jar,
    I agree with you however, the health percentage with a small circle on top of the elite helps big time with NECRO RGK Corpse Lance build, easier to aim. Can you maybe use an average height ?
    TopMonsterHealthBarPlugin already shows status ailments and current/max health and percentage if there is a selected monster.
    See image.
    I have disabled it all the time so never paid any attention to it :-D
    The text is really tiny and hard to see in the middle of the battle.

    I have a plugin (MyMonsterColoringV2) that draws monster hitbox and health percentage inside it as you can see in the imgur picture above.
    This requires that you disable EliteMonsterAffixPlugin as it draws in the same location.
    You can download it from Minimal plugin theme! ([v9] Minimal plugin theme!)

    Easiest option would be to make TopMonsterHealthBarPlugin MonsterHitpointsFont larger so it is easier to see and maybe remove health number to make easier to read.

    Alternatively to create a new plugin to show monster health percent somewhere relative to its floor location and hitbox size or something along these lines...?

    Customize code for TopMonsterHealthBarPlugin font size.
    Code:
    public void Customize()
    {
    	Hud.RunOnPlugin<Default.TopMonsterHealthBarPlugin>(plugin =>
    	{
    		var textColor = SharpDX.Color.White;
    		plugin.MonsterHitpointsFont = Hud.Render.CreateFont("tahoma", 8, textColor.A, textColor.R, textColor.G, textColor.B, true, false, false);   // No shadow!
    	});
    }
    Customize code for MyMonsterColoringV2 if you want to try it.
    Code:
    public void Customize()
    {
        Hud.TogglePlugin<Default.EliteMonsterAffixPlugin>(false);
        Hud.RunOnPlugin<User.MyMonsterColoringV2>(plugin =>
        {
            plugin.Helper.KillDensityLimitNear = 3.0f;
            plugin.Helper.KillDensityLimitFar = 2.0f;
    
            plugin.ShowEliteFootCircles();
            plugin.Helper.ProgressionLabelOnMinimap = true;
            plugin.Helper.XRatioTop = 0;
            plugin.Helper.YRatioTop = 0.050f;
        });
    }
    Last edited by JarJarD3; 06-22-2019 at 02:51 AM.

  8. #8
    madcloud's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you, i am not good with these things but i will ask a friend to look at it

    cheers

All times are GMT -5. The time now is 03:03 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