PHP Code:
Hud.RunOnPlugin<Jack.Alerts.PlayerBottomAlertListPlugin>(plugin => {
plugin.AlertList.Alerts.Add(new Jack.Alerts.Alert(Hud, HeroClass.Necromancer)
{
TextSnoId = Hud.Sno.SnoPowers.Necromancer_SkeletalMage.Sno,
MessageFormat = "Max Essence !!!",
Rule =
{
EquippedSkills = new[] { new Jack.Models.SnoPowerId(Hud.Sno.SnoPowers.Necromancer_SkeletalMage.Sno, 1) },
CustomCondition = player => player.Stats.ResourcePctPri == 100,
},
});
});
Hide the Rum! --> Default theme customization 101 <--
You don't touch plugin code.
Inside a customize method : see 3rd point Default theme customization 101
Hide the Rum! --> Default theme customization 101 <--
You can do that with my sample file.
Or you can use /plugins/User/PluginEnablerOrDisablerPlugin.txt and rename it to .cs.
Hide the Rum! --> Default theme customization 101 <--
Hi Jack.
I changed the .txt to .cs on your sample file and got this exception on load:
EDITt: Hmm, I think I see the issue. Correcting.2017.08.27 00:21:12.010 error while initializing plugins
2017.08.27 00:21:12.022 d:\Games\Game Mods\THUD\plugins\Jack\Alerts\AlertListSampleCustomizationPlugin.cs(260,2) : error CS1513: } expected
EDIT 2: Okay, fixed.
Last edited by mrjayaur; 08-27-2017 at 12:29 AM.
Heya Jack,
I added this to the essence code you pasted above:
This was done to get a Cyan color (match the color of the resource). It looks brown in game. Can you tell me what I'm doing wrong? I copied the values from another line and edited what appeared to be the RGB fields.Label =
{
TextFont = Hud.Render.CreateFont("tahoma", 12, 64, 224, 208, 30, false, false, 242, 0, 0, 0, true),
}
alpha = 255PHP Code:
Label =
{
TextFont = Hud.Render.CreateFont("tahoma", 12, 255, 175, 238, 238, false, false, 242, 0, 0, 0, true),
}
r = 175
g = 238
b = 238
(argb values copy/pasted from OtherPlayersPlugin)
Hide the Rum! --> Default theme customization 101 <--
The red color for max essence is often getting lost with all the mess at screen. any other color better to see it?![]()
in which line i place it?
PHP Code:
Hud.RunOnPlugin<Jack.Alerts.PlayerBottomAlertListPlugin>(plugin => {
plugin.AlertList.Alerts.Add(new Jack.Alerts.Alert(Hud, HeroClass.Necromancer)
{
TextSnoId = Hud.Sno.SnoPowers.Necromancer_SkeletalMage.Sno,
MessageFormat = "Max Essence !!!",
Rule =
{
EquippedSkills = new[] { new Jack.Models.SnoPowerId(Hud.Sno.SnoPowers.Necromancer_SkeletalMage.Sno, 1) },
CustomCondition = player => player.Stats.ResourcePctPri == 100,
},
Label =
{
TextFont = Hud.Render.CreateFont("tahoma", 12, 255, 175, 238, 238, false, false, 242, 0, 0, 0, true),
}
});
});
Hide the Rum! --> Default theme customization 101 <--
Hi Jack,
I'm seeing an issue. In the customize file in Alerts folder, which I renamed to .cs, I commented out the Oculus code because I prefer the default one in the Top List. However, even after commenting it out, the Bottom List Oculus that appears in that customize file is still displayed. See screenshot: https://i.imgur.com/4zXCfnh.png
Any idea why?
EDIT: Nevermind the above, I'm an idiot. I guess my commenting changes didn't get saved or I forgot to save them. Derp.
First question:
Is it possible for an alert to check to see if Command Skeletons is active? The Jesseth Set 2pc automatically uses Command Skeleton on any nearby enemy after the skill is manually used on an initial target and that target dies. Once all nearby enemies die, the active Command Skeleton skill stops. Is it possible to make the check for determing if the Skeletons are in an active Frenzy (etc.) state with Jesseth's equipped? I'd love to create an alert that says "Skeletons Active" or something if it is possible.
Second question:
If I want to override your default Bone Armor functionality (fontsize in particular), since I'm not supposed to touch the main .cs plugin files, if I enter the following code into the AlertListSampleCustomizationPlugin.cs file, will it override your Bone Armor code in the TopList file, or will both display?
AlertList.Alerts.Add(new Alert(Hud, HeroClass.Necromancer)
{
TextSnoId = Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno,
MessageFormat = "!! {0} !!",
Rule =
{
EquippedSkills = new[] { new SnoPowerId(Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno) },
InactiveBuffs = new[] { new SnoPowerId(Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno) },
},
Label =
{
TextFont = Hud.Render.CreateFont("tahoma", 20, 255, 255, 0, 0, false, false, 242, 0, 0, 0, true),
}
});
AlertList.Alerts.Add(new Alert(Hud, HeroClass.Necromancer)
{
TextSnoId = Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno,
MessageFormat = "\u23F0 {0} \u23F0", //⏰
AlertTextFunc = sno => string.Format(CultureInfo.InvariantCulture, "{0} {1:0.#}", Hud.GuessLocalizedName(sno), Hud.Game.Me.Powers.GetBuff(sno).TimeLeftSeconds[0]),
Rule =
{
EquippedSkills = new[] { new SnoPowerId(Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno) },
CustomCondition = player => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno) && player.Powers.GetBuff(Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno).TimeLeftSecon ds[0] <= 3,
},
Label =
{
TextFont = Hud.Render.CreateFont("tahoma", 20, 255, 255, 0, 0, false, false, 242, 0, 0, 0, true),
}
});
Last edited by mrjayaur; 08-28-2017 at 05:49 AM.
1) afaik it's not possible, i'll check that tonight
2) your best bet to override the default alerts is to empty the alert for that class and add your custom ones.
PHP Code:
Hud.RunOnPlugin<Jack.Alerts.PlayerTopAlertListPlugin>(plugin =>
{
var necroAlerts = plugin.AlertList.Alerts.Where(a => a.Rule.HeroClass == HeroClass.Necromancer);
foreach (var alert in necroAlerts)
{
plugin.AlertList.Alerts.Remove(alert);
}
// no more necro alerts, you can add your customized ones.
});
Hide the Rum! --> Default theme customization 101 <--
Jack-
Since 17.11.7.0 the changelog says the doc\sno*.txt files are no longer generated (use the Plugin interfaces to extract data instead). For the novice, I used those to find a particular buff number when I wanted to write an alert or simple mod for it. Would it be possible for you to write a code snippet for AlertList that would display the name and number for all active buffs on the character? Then the novices like me can run around til we have the buff in question and grab a screenshot of the buff name / number. Can something similar be done for currently equipped skills too?
Example:
I want to write an alert that mimics your Vengeance reminder for when the 6 piece Natalya's set drops (10 sec buff after casting rain of vengeance).
I look at your Vengeance code and I can copy it with a few alterations but I need to know the TextSnoId and the SnoPowerId as either the shortcut name like in the vengeance example or the hard coded numbers like in the shadow power example below.
I could ask you to write a new alert, but if we have a code snippet to turn on and see all buffs then hopefully myself and other novice tinkerers can do our own cut and pastes.Code:// Vengeance AlertList.Alerts.Add(new Alert(Hud, HeroClass.DemonHunter) { TextSnoId = powers.DemonHunter_Vengeance.Sno, MessageFormat = "\u26A0 {0} \u26A0", //⚠ Rule = { CheckSkillCooldowns = true, EquippedSkills = new[] { new SnoPowerId(powers.DemonHunter_Vengeance.Sno) }, InactiveBuffs = new[] { new SnoPowerId(powers.DemonHunter_Vengeance.Sno) }, }, }); // ShadowPower 130830 AlertList.Alerts.Add(new Alert(Hud, HeroClass.DemonHunter) { TextSnoId = powers.DemonHunter_ShadowPower.Sno, MessageFormat = "\uD83D\uDE08 {0} \uD83D\uDE08",//�� Rule = { ShowInTown = true, CheckSkillCooldowns = true, EquippedSkills = new [] { new SnoPowerId(powers.DemonHunter_ShadowPower.Sno) }, ActiveBuffs = new [] { new SnoPowerId(318876) }, //318876 ItemPassive_Unique_Ring_680_x1 Shadow Power gains the effect of every rune and lasts forever. InactiveBuffs = new [] { new SnoPowerId(powers.DemonHunter_ShadowPower.Sno) }, }, });
Thanks in advance!!
Djanee