Skip to content
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

add conditions to templates #587

Merged
merged 42 commits into from
Aug 20, 2018
Merged

add conditions to templates #587

merged 42 commits into from
Aug 20, 2018

Conversation

mrbuds
Copy link
Contributor

@mrbuds mrbuds commented Aug 3, 2018

Add support for condition in templates

Added some template types and changed how some are show

  • abilitybuff & abilitydebuff :
    aura trigger+cooldown spell trigger, default unit is: player for buff, target for debuff
    show buff when active, otherwise show cooldown, and desaturate on cooldown

  • abilitytarget :
    cooldown spell trigger
    show always, turn red if out of range and have target, desaturate on cooldown or insufficientResources

  • ability :
    show always, desaturate on cooldown or insufficientResources

  • item :
    show always, desaturate on cooldown

  • debuff :
    show always, desaturate if not active

I only used the new templates types on some spells for disc priest for now

ps: There is a bug with "aura - debuff - show always" template, the visibility is changed to "on active" by WeakAuras.Modernize().
Infus have a patch close to be ready for this.

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 3, 2018

  • abilitycharge
    cooldown spell trigger
    show always, desaturate if charge=0

@emptyrivers emptyrivers added 🎨 Enhancement This pull request implements a new feature. ⏱ Awaiting Review This pull request needs to be reviewed. labels Aug 3, 2018
@mrbuds mrbuds force-pushed the templates branch 3 times, most recently from bbe2a1e to 35c3eeb Compare August 4, 2018 23:58
@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 5, 2018

It's now possible to use more than one type of template per ability/item/buffs/..
The "type" field was changed to "types" and is now a list.
GUI was updated to show a new panel when there is more than one template available.

Templates titles and descriptions needs to be improved.
The GUI code can certainly be improved

demo: https://cdn.discordapp.com/attachments/273144328447197186/475487920275456009/2018-08-05_04-16-47.gif

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 5, 2018

Fixed "back button"

New templates:

  • abilityChargeBuff : show charges or buff if active
  • abilityChargeDebuff : show charges or debuff if active
  • abilityChargeTarget : show charges and rangecheck

Updated templates for paladin and priest using them

In many case there are 3 options for type of template now

  • show when on cooldown
  • show always + desaturate when on cooldown
  • show always + desaturate when on cooldown + show buff/debuff and/or rangecheck

exemple:
Image of Yaktocat

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 6, 2018

I made a table to have a better overview on what the templates types are doing, this will help avoid inconsistency between them.

https://docs.google.com/spreadsheets/d/1XYmpwUdF_TzPyq5tJp8YSrNUuCkp1xty_f8zs6kpvcw/edit#gid=0

Things that needs improvement:

  • conditions with range (red) + resource (blue) will conflict when both are true fixed with better ordering

  • conditions with aura + cooldown doesn't have good visual when aura is active, i avoided to use glow, maybe it is still the best solution ?

  • when first testing a basic UI made only from templates, the way icons where changing color too much was overwhelming, so i removed the use of desaturate on cooldown.
    The result is better, but i'm not sure what to do of spells with charges=0, to differentiate "spell cooldown" of "spell not usable".
    Making them blue when charges=0 seems good to me, but then what to do with spells with charges that use resource, to differentiate no resource from no charge.

btw, just a though, the need for a table to have a good overview on what these templates are doing is showing that the function "createConditionsFor" could use a big refactor.

@Stanzilla
Copy link
Contributor

I like it sans the active thing, maybe should leave that out for now?

In my own UI I set charges=0 the same as on cooldown

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 6, 2018

So delete these types :
abilityBuff
abilityDebuff
abilityChargeBuff
abilityChargeDebuff

And what do you suggest for "on cooldown" / "charges=0" ?

@Stanzilla
Copy link
Contributor

Stanzilla commented Aug 6, 2018

I don't want to have the final say about the active thing, wait for what the others have to say, please.

For on cooldown and charges=0 I use color #7f7f7f (127,127,127) and no desaturate at all

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 7, 2018

Last commit added possibility to use a table in the "talent" field for multi-talents
This open possibility to have 2 (or more) sets of templates for a same spell, which is useful if a talent add charges to a spell for example.

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 9, 2018

last commit fix the template button in the trigger tab
add trigger template will add conditions using correct trigger position

New templates for all classes is not finished yet, it takes much more time to do it with zero knowledge of a spec.

I think it's ready for review now

@mrbuds mrbuds force-pushed the templates branch 2 times, most recently from 61d684c to a9a92cd Compare August 10, 2018 23:31
@mrbuds mrbuds force-pushed the templates branch 2 times, most recently from 8a9fd89 to 0e4006e Compare August 13, 2018 20:36
mrbuds added 10 commits August 13, 2018 23:08
rename types
types description
for every "ability" template, added "abilityShowAlways" or "abilityCharge" template
abilityChargeBuff and abilityChargeDebuff for spell with charge + show buff/debuff when active
abilityChargeTarget for spell with charge + rangecheck
Priest and Paladin templates updated
"Has Target" condition added to "debuffShowAlways"
added "debuffShowAlways" to every "debuff" template, same for buffs and items
new template abilityUsable
made conditions use less desaturate
icons cooldown inverse by default
mrbuds and others added 21 commits August 13, 2018 23:08
…rom spell cooldown instead

add more abilityUsable template types + update shadow priest
Otherwise auras are hidden if the target doesn't exist
The basic concept is, the database describes what a spell is. There
are a few new flags for that:
- charges: If the spell has charges
- usable: If a usable check can be useful
- requiresTarget: If the spell requires a target
- buff: If the ability buffs the player
- debuff: If the ability debuffs the target
- totem: If the ability places down a totem

The third trigger page now selects the "subtype". A subtype can decide
how exactly the triggers and conditions are setup. A subtype has
two functions: createTriggers and createConditions which do that, and
builts its conditions from a list of common changes.

The mapping between spell properties and subtypes is done via
subTypesFor. (Which can properly be refactored a bit.)
use spellInRangeRed for abilities with requiresTarget
moved isUsableBlue on top of the condition list for avoid flickering between grey and blue
moved isBuffedGlow at the bottom of the condition list
charge+totem triggers used same trigger index
type=buff and type=debuff: re-add "Greyed if Buff/Debuff not active"
replaceCondition() did overwrite conditions without erase old data
@@ -23,6 +23,560 @@ AceGUI:RegisterLayout("WATemplateTriggerLayoutFlyout", function(content, childre
flowLayout(content, children);
end);

local changes =
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the { to the same line as = please

}

local checks =
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Stanzilla Stanzilla merged commit ba138d5 into WeakAuras:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏱ Awaiting Review This pull request needs to be reviewed. 🎨 Enhancement This pull request implements a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants