-
Member
Add skillbuffs to PlayerBuffList
Hi guys,
I dont know if this is the right place and hope questions like this are allowed but i've been trying to figure out if its possible to add specific skill-buffs to the Playerbufflist (like Focus and Restraint is by default).
More specifically im asking about the active skill buff of Laws of Valor (50% resource cost reduction). I have been trying out finding the skill IDs and adding a line similar to Focus below the already existing ones but it will not show up in game. I hope someone can help me out with this
I tried adding these 4 lines seperately:
RuleCalculator.Rules.Add(new BuffRule(290946) { IconIndex = 1, MinimumIconCount = 1, });
RuleCalculator.Rules.Add(new BuffRule(323387) { IconIndex = 1, MinimumIconCount = 1, });
RuleCalculator.Rules.Add(new BuffRule(342281) { IconIndex = 1, MinimumIconCount = 1, });
RuleCalculator.Rules.Add(new BuffRule(342284) { IconIndex = 1, MinimumIconCount = 1, });
Thanks and have a nice day!
-
Contributor
You can use the Customize() method to customize a default file.
For buffs, choose where you want to display your buffs: top, bottom, left or right of the player.
Corresponding default files are:
PlayerTopBuffListPlugin
PlayerBottomBuffListPlugin
PlayerLeftBuffListPlugin
PlayerRightBuffListPlugin
Go to Plugins > User folder.
Rename PluginEnablerOrDisablerPlugin.txt to PluginEnablerOrDisablerPlugin.cs to make it active.
In the Customize() method, paste your code.
It should look like this, and in this example, buffs are displayed on the left.
If you want to display buffs in another position, change the file name as per list above.
Code:
public void Customize()
{
Hud.RunOnPlugin<PlayerLeftBuffListPlugin>(plugin =>
{
plugin.RuleCalculator.Rules.Add(new BuffRule(290946) { IconIndex = 1, MinimumIconCount = 1, });
plugin.RuleCalculator.Rules.Add(new BuffRule(323387) { IconIndex = 1, MinimumIconCount = 1, });
plugin.RuleCalculator.Rules.Add(new BuffRule(342281) { IconIndex = 1, MinimumIconCount = 1, });
plugin.RuleCalculator.Rules.Add(new BuffRule(342284) { IconIndex = 1, MinimumIconCount = 1, });
});
}
PS: I did not check the SNOs.
Last edited by Stormreaver; 07-21-2017 at 05:14 PM.
-
Post Thanks / Like - 1 Thanks
wintermeister (1 members gave Thanks to Stormreaver for this useful post)