-
Active Member
[v7.5] [INTERNATIONAL] [RuneB] PartyCooldownsPlugin
Supported TurboHUD version: 7.6
Shows the remaining cooldown on chosen partymember skills, using small icons in the top of the screen.
Skills can be watched by adding their sno's to the WatchedSnos list - there are commented examples.
Install:
Unzip Zip from GitHub into /plugins/
or:
Copy the file(s) manually from the GitHub page: PartyCooldownsPlugin and place them in a folder called RuneB under /plugins/
(The config file is optional but recommended, it makes it easy to modify the plugin to your needs)
Last edited by RuneB; 11-17-2017 at 12:23 PM.
-
Post Thanks / Like - 12 Thanks
cherouvim13,
greatscott,
bm206,
SeaDragon,
MrOne,
everknown,
(Sarge),
Wasted74,
johnbl,
Blop08,
ajoe,
TehIso (12 members gave Thanks to RuneB for this useful post)
-
Active Member
I have exceptions:
2017.08.21 12:02:41.013 overlay paint error (System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
bei System.ThrowHelper.ThrowKeyNotFoundException()
bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)
bei Turbo.Plugins.RuneB.PartyCooldownsPlugin.PaintTopInGame(ClipState clipState)
bei ********.********** **.********()
bei ********.******** *(IPlugin , String , Action )
bei ********.******* *(Object , EventArgs )
bei Turbo.Basic.Overlay.********())
2017.08.21 12:02:41.072 overlay paint notification (SharpDX.SharpDXException: HRESULT: [0x88990001], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_STATE/WrongState], Message: Das Objekt befand sich nicht im richtigen Status, um die Methode zu verarbeiten.
bei SharpDX.Result.CheckError()
bei Turbo.Basic.Overlay.********())
-
Post Thanks / Like - 1 Thanks
RuneB (1 members gave Thanks to bm206 for this useful post)
-
Member
from which file i can find a particular sno?
edit : found it , sno_powers from doc folder
Last edited by cherouvim13; 08-21-2017 at 09:39 AM.
-
Savvy ? 🐒
PHP Code:
private Dictionary<string, string> classShorts;
=>
PHP Code:
private Dictionary<HeroClass, string> classShorts;
PHP Code:
classShorts = new Dictionary<string, string>();
classShorts.Add("Barbarian", "Barb");
classShorts.Add("Monk", "Monk");
classShorts.Add("Necromancer", "Necro");
classShorts.Add("Wizard", "Wiz");
classShorts.Add("Witch Doctor", "WD");
classShorts.Add("Crusader", "Sader");
classShorts.Add("Demon Hunter", "DH");
=>
PHP Code:
classShorts = new Dictionary<HeroClass, string>();
classShorts.Add(HeroClass.Barbarian, "Barb");
classShorts.Add(HeroClass.Monk, "Monk");
classShorts.Add(HeroClass.Necromancer, "Necro");
classShorts.Add(HeroClass.Wizard, "Wiz");
classShorts.Add(HeroClass.WitchDoctor, "WD");
classShorts.Add(HeroClass.Crusader, "Sader");
classShorts.Add(HeroClass.DemonHunter, "DH");
PHP Code:
var layout = ClassFont.GetTextLayout(player.BattleTagAbovePortrait + "\n(" + classShorts[player.HeroClassDefinition.Name] + ")");
=>
PHP Code:
var layout = ClassFont.GetTextLayout(player.BattleTagAbovePortrait + "\n(" + classShorts[player.HeroClassDefinition.HeroClass] + ")");
There is probably some other optimisations to do, but this fix the KeyNotFound exception.
PartyCooldownsPlugin.cs * GitHub
Edit : i added a 'skillSlotOrder = new int[] {2, 3, 4, 5, 0, 1};' too, no need to instanciate it up to 24 times per cycle ; )
Last edited by JackCeparou; 08-21-2017 at 09:49 AM.
-
Post Thanks / Like - 1 Thanks
RuneB (1 members gave Thanks to JackCeparou for this useful post)
-
-
Post Thanks / Like - 1 Thanks
bm206 (1 members gave Thanks to RuneB for this useful post)
-
Contributor
great work, this is what i need
Two questions:
is it possible to center nick with class name and skills?
is it possible to manual define class order?
-
Member
Can it be done in order to show only my cooldown and not the rest one in party?
-
Member
RuneB? Anyone else that can help?
-
Contributor
Originally Posted by
cherouvim13
RuneB? Anyone else that can help?
Not tested in team (just alone) but try add after
Code:
if (player.IsMe && !ShowSelf)
continue;
this
Code:
if (!player.IsMe)
continue;
and 7.5 work great!
Also change order by portrait by changig this
Code:
foreach (IPlayer player in Hud.Game.Players)
to this
Code:
foreach (IPlayer player in Hud.Game.Players.OrderBy(p => p.PortraitIndex))
-
Post Thanks / Like - 1 Thanks
cherouvim13 (1 members gave Thanks to MrOne for this useful post)
-
Active Member
Sorry for the late replies both, i have been quite busy recently.
While testing for 7.5 I have done some refactoring and added a boolean 'ShowOnlyMe' that is false by default.
I see you figured the sorting out yourself MrOne Added ordering to the new version as well.
Last edited by RuneB; 11-08-2017 at 09:04 PM.
-
Post Thanks / Like - 1 Thanks
cherouvim13 (1 members gave Thanks to RuneB for this useful post)
-
Member
Much appreciate it will test it in the afternoon
I can play around with icon positioning and size in order to have what I have asked here
Self Cooldown indicator
One more question : is it possible to have the cooldown indications in a vertical form and not horizontal? for example LoD icon appears and then Simulacrum icon appears below LoD's icon
Last edited by cherouvim13; 11-09-2017 at 02:26 AM.
Reason: Added question
-
Contributor
In order to make config easier you can initialize WatchedSnos with following "compiler safe" code.
Code:
ISnoPowerList p = hud.Sno.SnoPowers;
WatchedSnos = new List<uint>
{
//Add skills to the watch list below
//--- Necromancer
sno(p.Necromancer_Simulacrum),
sno(p.Necromancer_LandOfTheDead),
//--- Barb
sno(p.Barbarian_IgnorePain),
//sno(p.Barbarian_WrathOfTheBerserker),
//sno(p.Barbarian_WarCry),
//--- Monk
sno(p.Monk_InnerSanctuary),
//--- Witch Doctor
sno(p.WitchDoctor_SpiritWalk),
//--- Demon Hunter
sno(p.DemonHunter_Vengeance),
sno(p.DemonHunter_Companion),
//--- Wizard
//134872 //Archon - Needs testing, dont use for now
};
And then you need to add following small helper method to grab the sno in question:
Code:
uint sno(ISnoPower power) { return power.Sno; }
-
Contributor
Why use (expensive) Dictionary lookup when an array can do?
Code:
private string[] _classShorts;
...
_classShorts = new string[10];
foreach (var x in new Dictionary<HeroClass, string> {
{HeroClass.Barbarian, "Barb"},
{HeroClass.Monk, "Monk"},
{HeroClass.Necromancer, "Necro"},
{HeroClass.Wizard, "Wiz"},
{HeroClass.WitchDoctor, "WD"},
{HeroClass.Crusader, "Sader"},
{HeroClass.DemonHunter, "DH"} })
{
_classShorts[(int)x.Key] = x.Value;
}
...
var layout = ClassFont.GetTextLayout(player.BattleTagAbovePortrait + "\n(" + _classShorts[(int)player.HeroClassDefinition.HeroClass] + ")");
-
Member
This works great but I would like to see if it can be modified slightly. Currently I am running with 2 people running stricken. When I am not on my DH all is good and I can each of their strickens. When I am on the DH I use Wolf companion and the icon for wolf sits on top of the stricken underneath it. Is there a way to put each characters SNO's that we are watching on a separate line rather that in a row like it is now? If possible I would like to be able to just offset the wolf a bit so that I can see underneath it. Any Suggestions?
Noobz
-
Contributor
Originally Posted by
Noobz
This works great but I would like to see if it can be modified slightly. Currently I am running with 2 people running stricken. When I am not on my DH all is good and I can each of their strickens. When I am on the DH I use Wolf companion and the icon for wolf sits on top of the stricken underneath it. Is there a way to put each characters SNO's that we are watching on a separate line rather that in a row like it is now? If possible I would like to be able to just offset the wolf a bit so that I can see underneath it. Any Suggestions?
Noobz
There are settings in the plugin that can be used to set the position and size for the icons.
With these you should be able to move the UI where you want, I assume.
Code:
public float StartXPos { get; set; }
public float StartYPos { get; set; }
public float SizeRatio { get; set; }
public float IconSize { get; set; }
I created a multiplayer version of my SelfCooldownPlugin (Self Cooldown indicator) plugin for fun. If you are interested in testing it, send me a PM.