New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest highlight ability only when buff/debuff aura reaches a certain threshold point #269
Comments
This is doable with custom rules only, meaning you have to code the rule yourself. Please consult the documentation on how to do this. If you need a specific example, feel free to re-open this issue. |
I really appreciate if you give me an example for a buff like slice and dice and debuff like rupture that I can use to edit and add whatever spell I like. I wish that the threshold point be around 4s left. Thank you! |
I was thinking about something like that for Slice and Dice. return Configure {
"SliceAndDiceExp",
"Show to good border when Slice and Dice is about to expire",
5171, -- Slice and Dice
"player",
"UNIT_AURA",
function(_, model)
local found, _, expiration = GetPlayerBuff("player", 5171)
if found and ((expiration - GetTime()) <= 4) then
model.highlight = "good"
end
end,
} However this is not reliable. Sorry for misleading you with my previous answer, I'll look into it. |
Could you please test the version attached below. I will probably not have the time to include the other two types of highlight until next weekend. I'm also unsure if this is not better done as an extension to the "Show missing" option, what do you think about it? |
It is only working with the border highlight indeed which gave me the idea if possible to have 2 different highlights for the same ability, lets have the border highlight always on but do a flash highlight when it reaches a certain threshold! btw have you taken a look at my reply to the other issue #268 that you closed ? |
This is why I think that it may make more sense to bind it to the "Show missing" option. However I think that using two different highlights (one for duration and one for missing) creates visual clutter, so I would ideally keep them mutually exclusive, i.e. show the missing highlight this many seconds before the aura expires.
Adjust the As for the countdown text, I will reply in the other issue. |
Hows the coding going? I was thinking if the threshold could be set as a percentage of the total duration of the ability used, this is for us benefit of the 'pandemic' mechanic which is capped at 30% of the duration, off course that different number of combo points would have different durations so I do not know if this is possible or ...? |
Sadly I didn't find time for it this weekend, sorry for that. It may be like that next weekend too, depending on the progress I make with a project I have to deliver next week. As for the pandemic mechanic, I don't think it is doable without keeping a list of auras max durations. I think something like 'hint 3 secs before it expires' is good enough though. |
Maybe allow us to manually enter the max duration so it can auto-calculate 30% of it's running time then? I dunno but there are other addons that support the pandemic mechanic like SPTimers, if they keep a list of the max timers or not that's the question, only a handful of abilities would benefit from it thou. |
Could you test https://github.com/AdiAddons/AdiButtonAuras/tree/earlier-missing and tell me what you think? Click on "Clone or download" -> "Download ZIP", rename the folder in the zip file so that it only contains "AdiButtonAuras" and copy it into your Interface\AddOns folder as an ordinary addon. You can pick the value below which it will display the selected missing highlight method (the range is from 0 to 10). The hint/flash method is complementary to the normal highlight. This is unchanged from the way it is now but means both hint/flash and normal highlight could be visible at the same time. IIRC Adirelle left this possibility on purpose, so I'm unlikely to change this behavior. |
At first I did a clean install with the steps you provided but the addon was not configurable in-game even thou I let the configurable folder in the addons folder, then I copy pasted the release version into the addons folder and replaced it with the new one provided and this made it to work again in-game! Moving on... Now for when selecting 'flash' and 'hint' as highlights they do not work as intended as in upon reaching the selected missing threshold they show up but when refreshed before reaching 0 it makes it so the 'flash' or 'hint' will always be visible even when the aura is above the selected missing threshold. One other thing is that the addon keeps on highlighting the abilities with a missing threshold value set when out of combat, I can only wish there was an option to disable this behavior when out of combat. Other quality of life changes that I wish were implemented:
|
Again, missing hint/flash is complementary to the the normal border highlight. If you choose border as a missing highlight method, it is ofc exclusive. This is how it is on the live version now and I'm reluctant to change this. The only thing that (should have) changed is that the missing highlight could be displayed before the aura is missing and you have a per spell option to set up this behavior. You can hide flashes when out of combat, it is a global option. Not hiding the missing highlight, if the duration goes up, is a bug, I'll fix this. Be it your way with the 15 sec range for the option. I do not understand why you need a 15 sec long reminder to reapply a buff but I'll change that too. |
I pushed the changes to the earlier-missing branch, feel free to test as you did before. The delay for showing the missing highlight was between 0.001 and 0.009 seconds in my tests. There is also a cost for calling the functions that actually show the missing highlight on top of that. I myself see a 15 sec long reminder to reapply a (de)buff as totally useless and thus find an option that calculates the missing threshold as a percentage of the max duration not appropriate as it will enforce the timer on me. You can however calculate the value yourself and set the value accordingly (within the limit of 15 sec). Apart from that, the max aura duration is unknown to ABA, so the user will have to input it. This is basically the same as to enter the 0.3 * max duration as the missing threshold for the given spell. Keeping a list of aura durations is also unfeasible in my opinion. |
What I notice:
Suggestion:
|
Working as intended. That's why it says flash. Normal borders are meant as a non-obtrusive reminder and combined with the missing option are well suited for stuff you generally want to apply before you start combat. Hints are disabled out of combat per default.
Fixed
Cannot reproduce. Do you have custom rules for the spell you tested this with? Could it be that the built-in (stock) flash popped up?
Fixed
Cannot reproduce with the applied fixes. Please test again and provide exact steps on how to reproduce it if it happens again.
Fixed.
Not possible/feasible. All types of highlights are applied to all buttons and so are their colors. I could introduce a third type of border beside the good and the bad ones, but this would be the last item on my current todo list for ABA. |
My recent tests:
What could still be done:
|
Showing/hiding the missing highlight when changing targets should be fixed now. I'm still not able to reproduce the case where a flash shows instead of a hint. Could it be that you set "Spell hints" to "Flashing border"? If not, then please share the spell you are using and the exact configuration you have for it.
This is a side effect of how ABA handles missing auras and was there before my current additions. We rely on the aura expiration - if it is present and above the missing threshold, we hide the missing highlight and show it else. So if no other rule sets the expiration, it is not present and thus the missing highlight is applied. The display of missing highlights also relies on the highlight type the normal rule would set. We aim to achieve some kind of duality here, not to make every combination possible. If the normal and the missing highlight are of the same type, only the missing will be displayed (duality is present vs. absent). If the highlight types are different then both could be shown when their respective conditions apply (the duality is more prominent vs less prominent). The advantage of this approach is that we are able to adapt to custom rules in a general way. The disadvantage is that it has limitations. As for how highlights work in ABA and what options are available, read here. If those don't suit you, then I must apologize and suggest you use another addon. Please consider that I'm doing all of this in my spare time. I would really appreciate it, if we would concentrate on finding and fixing bugs from now on rather than suggesting new features or changing current behavior. |
|
This is Loaded Dice, which has a 45 sec duration. Once Adrenaline Rush disappears (20 sec), you see the remaining 25 secs from Loaded Dice.
Ah, this is because the animation is redrawn from the start when the rule conditions are met. Rules are re-evaluated every time a new aura is applied or a relevant unit changes. I do have a quick solution for this, but I'd like to see if it can be done in a better way. |
Ok, I made it cleaner code wise and hope all concerns are now gone. Please test again. Thank you for your time investment btw, much appreciated! |
Sorry for late reply but Iam travelling for the month and unable to test it. |
No worries. I might release it in the mean time. Feel free to re-open the issue any time you get to test this and find any problems. |
Back to action! I think that the 'show hint' should be changed to rotary star on the dropdown menu of choices of 'show missing', this is because otherwise we need to stick with the global option of 'spell hints' to show the rotary star which will be shown on all situations and not only as the show missing threshold hint of choice. In addition to that when we select the 'show hint' as 'show missing' method it is not mutually exclusive with the show good and bad border choices (I mean the bad and good border have priority over the 'show hint' which is happening the other way around when 'show flash' is the method of choice instead). I would also like an option to only 'show missing' events and not display any other events on the icon (except rules when selected). |
Sorry, in this regard I find it works as intended and is consistent as is. The current settings lead to complicated enough scenarios and I'm rather reluctant to change it again. |
I play a rogue and I found this addon amazing! There is one thing thou that I do not know how to do and I wish it was possible. I know the addon has a default 'Suggest when your combo points reaches its maximum' for some abilities which work great on some like eviscerate but on others not so much like when you have a almost full duration slice and dice buff to go and the addon is suggesting to use it. So what I really wanted is some kind of slider or something to trigger suggestions only when the buff/debuff aura reaches a certain threshold point. It could work in conjunction with the combo points or not like for example when X aura reaches X seconds left AND your combos is at maximum immediately suggest highlight the ability OR simple when X aura reaches X seconds left immediately suggest highlight the ability regardless of the amount of combo points you have.
Can you please add this feature or tell me how to do it?
Kind regards!
The text was updated successfully, but these errors were encountered: