[V9.1] [INTERNATIONAL] [RNN] SkillBarPlugin menu

User Tag List

Page 3 of 3 FirstFirst 123
Results 31 to 40 of 40
  1. #31
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    32
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome.

    I think this is the most needed and useful plugin for this season.

    This season is a mechanism where two wiz alternately stack and deal damage, so we need two wiz icons.

    (Like this plugin = DAV_PartyCDPlugin.cs)

    [ENG] Combin Plugin of Party Cooldown & Archon Downtime https://www.ownedcore.com/forums/dia...-downtime.html ([ENG] Combin Plugin of Party Cooldown & Archon Downtime)


    DAV_PartyCDPlugin.cs DAV_PartyCDPlugin - Pastebin.com


    I don't know how to code, so I'm trying to modify the plugin, but it's not easy.

    I would really appreciate it if you could help me.

    My friends really like your plugin. Me too, of course

    Thank you.


    Additionally, I think I've seen your other plugins in the past where the cooldown timer is in real time count even when you're away from it.

    Can this be applied here too?
    Last edited by dcac; 6 Days Ago at 09:17 PM.

    [V9.1] [INTERNATIONAL] [RNN] SkillBarPlugin
  2. #32
    RNN's Avatar Legendary
    Reputation
    832
    Join Date
    Sep 2018
    Posts
    1,089
    Thanks G/R
    107/795
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    ArchonIcon displays an icon for each wizard who has the Archon skill, to the right of their portrait. I don't understand why you mention those plugins, would you like it to include some more function? (I use Google Translate and sometimes I can't understand the message)
    I stopped playing in a group several weeks ago and I've never played the 2-Archon combination, i can't test much, so it's unlikely that I'll add certain features.
    I have noticed that if you return to archon before the end of the swami's benefit it does not add the statcks, fixed.
    When a player moves away (HasValidActor is false) they no longer have access to much information about the character (remaining time of archon or swami for example). Sometimes it is possible to make an estimate of those values by collecting certain data when the character is nearby, but it is an assumption that could not be real, many situations can occur and tests have to be carried out, I can't say for sure that I will add that feature..

  3. #33
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    32
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tested it and it's not a plugin that only applies to itself. I was wrong. (You're right, there's no reason to mention DAV plugin.)

    One thing I wanted to apply was

    I thought it would be easy to change to archon alternately if it was applied in real time even if the skill cooldown time was far away(stop).

    It's a very good plugin as it is now and I use it very usefully in party play.

    Thank you again for providing the plugin.

  4. #34
    RNN's Avatar Legendary
    Reputation
    832
    Join Date
    Sep 2018
    Posts
    1,089
    Thanks G/R
    107/795
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I think I've expressed myself wrong: I don't mind at all that you mention other plugins, the problem is that I don't play much wizard in a group and I don't know well how to play with archon and also reading other people's code (even my own code after a while of having created it) requires some effort, so I asked what modifications or what data/information would be useful that the plugin included (maybe you were looking for the icons appear together in another location, or you preferred bars instead of just numerical values)
    I've been thinking about how to code that shows the remaining time of both Archon and Swami from another player when they're away (this information isn't really accessible) and I'll try to upload an update later, although it should be clear that it will be an estimate (the icon will have a border of another color to differentiate it)
    Last edited by RNN; 5 Days Ago at 07:41 AM.

  5. #35
    RNN's Avatar Legendary
    Reputation
    832
    Join Date
    Sep 2018
    Posts
    1,089
    Thanks G/R
    107/795
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I think I've expressed myself wrong: I don't mind at all that you mention other plugins, the problem is that I don't play much wizard in a group and I don't know well how to play with archon and also reading other people's code (even my own code after a while of having created it) requires some effort, so I asked what modifications or what data/information would be useful that the plugin included (maybe you were looking for the icons appear together in another location, or you preferred bars instead of just numerical values)
    I've been thinking about how to code that shows the remaining time of other players' buffs when they're away, both from Archon and Swuami (this information isn't really accessible), and I'll try to upload an update later, although it should be clear that it will be an estimate/guess (the icon will have a border of another color to differentiate it)
    Last edited by RNN; 5 Days Ago at 07:46 AM.

  6. #36
    RNN's Avatar Legendary
    Reputation
    832
    Join Date
    Sep 2018
    Posts
    1,089
    Thanks G/R
    107/795
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    plugin ArchonIcon updated , details in post 30

  7. #37
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    32
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I modified ArchoinIcon.cs

    I want to fill it with a solid color or disappear like coe progressbar.
    =======================================================
    BrushBlack.DrawRectangle(x, y, SizeIconWidth, ProgressBarWidth);
    if ( timeleft > 0)
    {
    BrushRed.DrawRectangle(x, y, - ( timeleft * SizeIconWidth) , - ProgressBarWidth);
    }
    =======================================================
    \Plugins\RNN\ArchoinIcon.cs(116,31) : error CS1503: Argument 3: cannot convert from 'double' to 'float'
    BrushRed.DrawRectangle(x, y, - ( timeleft * SizeIconWidth) , - ProgressBarWidth); <== this line error
    I tried several different ways, but
    I can't solve problem


    I'm really sorry, but can you help me?


    Code:
    using System;
    using Turbo.Plugins.Default;  
    using System.Linq;    
    using System.Collections.Generic;
    using SharpDX;
    using SharpDX.Direct2D1;
    using System.Threading;
    using System.Drawing;
    
    
    namespace Turbo.Plugins.RNN
    {
    	public class ArchoinIcon : BasePlugin, IInGameTopPainter
    	{
    		private SharpDX.DirectWrite.TextLayout layout { get; set; } = null;
    		public bool ShowLegendaryBackground { get; set; } = true;
    		private IFont FontTimeLeft { get; set; }
    		private IFont FontCooldown { get; set; }
    		private IFont FontStacks { get; set; }
    
    	private IFont FontNames { get; set; }
    	public bool ShowNames { get; set; }
    	public bool EnableBuffsFar { get; set; }
    		private float _SizeMultiplier  { get; set; }
    
    		public float OffsetX { get; set; }
    		public float OffsetY { get; set; }
    		public float Opacity { get; set; }
    
    	public int ProgressBarWidth { get; set; } 
    
    	public IBrush BorderBrush { get; set; }
    	public IBrush TimeLeftClockBrush { get; set; }
    	public IBrush SwamiBrush { get; set; }
    
    	private IBrush BrushBlack { get; set; }
    	private IBrush BrushRed { get; set; }
    
    	private float SizeIconW  { get; set; } 
    	private float SizeIconH  { get; set; } 
    
    		public float SizeMultiplier
    		{
    			get { return _SizeMultiplier; }
    			set
    			{
    				if (_SizeMultiplier != value)
    				{
    					_SizeMultiplier = value;
    					FontTimeLeft  = Hud.Render.CreateFont("Tahoma", 7.5f * _SizeMultiplier, 255, 0, 255, 0, true, false, 255, 0, 0, 0, true);
    					FontCooldown = Hud.Render.CreateFont("Tahoma", 7.5f * _SizeMultiplier, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true);
    					FontStacks = Hud.Render.CreateFont("Tahoma", 9f * _SizeMultiplier, 255, 255, 255, 0, true, false, 255, 0, 0, 0, true);
    				}
    			}
    		}
    
    		public ArchoinIcon()
    		{
    			Enabled = true;
    		}
    
    		public override void Load(IController hud)
    		{
    			base.Load(hud);
    			Order = 91000;
    
    			OffsetX = 3.0f;			// To set the x coordinate of the icon  (OffsetYX * Portrait Width)
    			OffsetY = 0.48f;			// To set the y coordinate of the icon (OffsetYX * Portrait Height)
    			Opacity = 1f;			// 0f..1f  Opacity for icon texture
    			SizeMultiplier = 1.4f;		// Size multiplier for icons
    
    	ShowNames = true;			// Show players names
    	EnableBuffsFar = true;		// Show Archon and Swami Buffs when the player is far
    	ProgressBarWidth = 90;	// Width progressbar swami (pixels)
    	BorderBrush = Hud.Render.CreateBrush(255, 0, 255, 0, 6f);
    	BrushBlack = Hud.Render.CreateBrush(220, 80, 80, 80, 0);
    	BrushRed = Hud.Render.CreateBrush(230, 255, 0 , 0, 0);
    	TimeLeftClockBrush = Hud.Render.CreateBrush(220, 0, 0, 0, 0);
    	SwamiBrush = Hud.Render.CreateBrush(255, 0, 255, 0, 7f); // green
    
    	FontNames = Hud.Render.CreateFont("tahoma", 8f * SizeMultiplier, 235, 235, 235, 235, false, false, 255, 0, 0, 0, true);  // user name 
    		}
    
            public void PaintTopInGame(ClipState clipState)
            {
    			if (clipState != ClipState.BeforeClip) return;
    			if (!Hud.Game.IsInGame) return;
    			
    			var players = Hud.Game.Players.Where(p => p.HeroClassDefinition.HeroClass == HeroClass.Wizard); 
    			foreach(var player in players)
    			{
    				var skill = player.Powers.UsedSkills.FirstOrDefault(s => s.SnoPower.Sno == 134872);
    				if (skill != null && skill.Buff != null) 
    				{
    					var x = player.PortraitUiElement.Rectangle.X + player.PortraitUiElement.Rectangle.Width * OffsetX;				var y = player.PortraitUiElement.Rectangle.Y + player.PortraitUiElement.Rectangle.Height * OffsetY;
    					var SizeIconWidth = Hud.Texture.BuffFrameTexture.Width * Hud.Window.Size.Height/1200.0f * _SizeMultiplier;		var SizeIconHeight = Hud.Texture.BuffFrameTexture.Height * Hud.Window.Size.Height/1200.0f * _SizeMultiplier;
    		var SizeIconW = Hud.Texture.BuffFrameTexture.Width * Hud.Window.Size.Height/1200.0f * 0.7f; // swaimi icon W resize 
    		var SizeIconH = Hud.Texture.BuffFrameTexture.Height * Hud.Window.Size.Height/1200.0f * 0.5f; // swaimi icon H rezize					
    					if (player.HasValidActor)
    					{
    	if (ShowNames) { layout = FontNames.GetTextLayout(player.BattleTagAbovePortrait); FontNames.DrawText(layout,x + 1,y ); y += layout.Metrics.Height + 1; }
    						double timeleft = 0f; 
    						int stacks = -1;
    						if (skill.Buff.IconCounts[6] > 0) 
    						{
    							timeleft = skill.Buff.TimeLeftSeconds[5];
    							stacks = skill.Buff.IconCounts[5];
    							Hud.Texture.InventoryLegendaryBackgroundLarge.Draw(x,y,SizeIconWidth,SizeIconHeight,Opacity);
    						//	Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P3_Unique_WizardHat_003).Draw(x + SizeIconWidth/8, y - SizeIconHeight/4, SizeIconWidth * 0.75f, SizeIconHeight * 1.70f, Opacity);	// default						
    	Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P3_Unique_WizardHat_003).Draw(x + 100 + SizeIconW/8, y + 30 - SizeIconH/4, SizeIconW * 0.75f, SizeIconH * 1.7f, Opacity); // swami icon y + @
    	SwamiBrush.DrawRectangle(x, y, SizeIconWidth, SizeIconHeight );  // green box						
    
    	BrushBlack.DrawRectangle(x , y,  SizeIconWidth , ProgressBarWidth);  		
    	if ( timeleft > 0) 							
    	{								
    	BrushRed.DrawRectangle(x, y, - ( timeleft * SizeIconWidth) , - ProgressBarWidth); 
    	}								
    	
    						}					
    						else 
    						{
    							if (skill.Buff.IconCounts[2] > 0) 
    							{
    								timeleft = skill.Buff.TimeLeftSeconds[2];
    								stacks = skill.Buff.IconCounts[4] + skill.Buff.IconCounts[5];
    							}						
    							Hud.Texture.GetTexture(skill.SnoPower.NormalIconTextureId).Draw(x, y, SizeIconWidth, SizeIconHeight, Opacity);
    						}
    						Hud.Texture.BuffFrameTexture.Draw(x, y, SizeIconWidth, SizeIconHeight, Opacity);
    						if (timeleft > 0)
    						{						
    							layout = FontTimeLeft.GetTextLayout((timeleft < 1.0f)?String.Format("{0:N1}", timeleft): String.Format("{0:0}",  (int) (timeleft + 0.80)));
    	FontTimeLeft.DrawText(layout, x - 20+ ((SizeIconWidth - (float)Math.Ceiling(layout.Metrics.Width))/2.0f), y + ((SizeIconHeight - (float)Math.Ceiling(layout.Metrics.Height))/12.0f) );  // stack left time x - @
    						}
    						if (stacks >= 0)
    						{
    							layout = FontStacks.GetTextLayout(stacks.ToString());
    							FontStacks.DrawText(layout, x + ((SizeIconWidth - (float)Math.Ceiling(layout.Metrics.Width))/2.0f), y + ((SizeIconHeight - (float)Math.Ceiling(layout.Metrics.Height))/2.0f) );
    						}	
    
    	if (EnableBuffsFar || player.HasValidActor)
    	{
    		if (timeleft > 0)
    		{
    			layout = FontTimeLeft.GetTextLayout((timeleft < 1.0f)?String.Format("{0:N1}", timeleft): String.Format("{0:0}",  (int) (timeleft + 0.80)));
    			FontTimeLeft.DrawText(layout, x -20 + ((SizeIconWidth - (float)Math.Ceiling(layout.Metrics.Width))/2.0f), y + ((SizeIconHeight - (float)Math.Ceiling(layout.Metrics.Height))/12.0f) );
    		}
    	}					
    					}
    					else
    					{
    						Hud.Texture.GetTexture(skill.SnoPower.NormalIconTextureId).Draw(x, y, SizeIconWidth, SizeIconHeight, Opacity);
    						Hud.Texture.DebuffFrameTexture.Draw(x, y, SizeIconWidth, SizeIconHeight, Opacity);
    					}
    					
    					if (skill.CooldownFinishTick > Hud.Game.CurrentGameTick)
    					{
    						double remaining = (skill.CooldownFinishTick - Hud.Game.CurrentGameTick)/60.0d;
    						layout = FontCooldown.GetTextLayout( remaining.ToString( (remaining < 1)? "F1":"F0" ) );
    						FontCooldown.DrawText(layout, x + 20 + ((SizeIconWidth - (float)Math.Ceiling(layout.Metrics.Width))/2.0f), y + ((SizeIconHeight - (float)Math.Ceiling(layout.Metrics.Height))/1.1f) ); // skill cooldown x + @
    					}
    				}
    			}			
    		}
    	}
    }
    Last edited by dcac; 4 Days Ago at 03:48 PM.

  8. #38
    RNN's Avatar Legendary
    Reputation
    832
    Join Date
    Sep 2018
    Posts
    1,089
    Thanks G/R
    107/795
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    First a possible solution: Convert timeleft from double to float, this operation is called casting.

    BrushRed.DrawRectangle(x, y, - ( (float)timeleft * SizeIconWidth) , - ProgressBarWidth);

    ------

    Explanation: As you can see..

    void DrawRectangle(float x, float y, float w, float h); (read interfaces\resources\IBrush.cs)

    w (width) and h (height) need to be values of type float but the result of multiplying timeleft * SizeIconWidth is double, so there is a possible loss of information and it will emit an error. Switching from int (ProgressBarWidth) to double does it automatically, but from double to float it doesn't, because double has more range and precision, let's say it needs your permission to do that conversion.

    Floating-point numeric types - C# reference | Microsoft Learn

    A more detailed explanation in case it is not clear: timeleft is a value of type double and SizeIconWidth is a value of type float, being of different type the one with the lowest precision is changed to the one with the highest precision before performing that multiplication, that is, that SizeIconWidth becomes a value of type double and the result (double x double) will also be double.

  9. #39
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    32
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hahaha, after holding on for a long time and doing this and that, I kept getting errors because I put "(" in different places.
    It was a very stupid question.
    I used float, but "(" was the problem.

    Thank you.

    Thank you very much for your kind reply, I was able to solve it as I wanted.

    gif.gif
    Last edited by dcac; 3 Days Ago at 11:58 PM.

  10. #40
    RNN's Avatar Legendary
    Reputation
    832
    Join Date
    Sep 2018
    Posts
    1,089
    Thanks G/R
    107/795
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Updated ArchonIcon (post 30)

Page 3 of 3 FirstFirst 123

Similar Threads

  1. [V9.0] [INTERNATIONAL] [RNN] TimersBarGR
    By RNN in forum TurboHUD Community Plugins
    Replies: 47
    Last Post: 07-04-2024, 12:34 PM
  2. [V9.0] [INTERNATIONAL] [RNN] Icount
    By RNN in forum TurboHUD Community Plugins
    Replies: 24
    Last Post: 06-08-2024, 01:39 AM
  3. [V9.0] [INTERNATIONAL] [RNN] OtherShrinePlugin
    By RNN in forum TurboHUD Community Plugins
    Replies: 137
    Last Post: 03-28-2024, 04:25 PM
  4. [V9.0] [INTERNATIONAL] [RNN] BLueLines
    By RNN in forum TurboHUD Community Plugins
    Replies: 28
    Last Post: 03-20-2022, 07:48 PM
  5. [V9.0] [INTERNATIONAL] [RNN] LogChat
    By RNN in forum TurboHUD Community Plugins
    Replies: 19
    Last Post: 01-08-2021, 09:14 AM
All times are GMT -5. The time now is 08:40 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