ascott18 / TellMeWhen

TellMeWhen is a combat tracking AddOn for World of Warcraft Retail and Classic
https://wow.curseforge.com/projects/tellmewhen
GNU General Public License v3.0
86 stars 11 forks source link

Condition for Being in a Minigame #2222

Open canofbutter opened 2 months ago

canofbutter commented 2 months ago

There are a number of minigames now that are not the vehicle UI, a pet battle, nor override the action bar etc. It's common for icons to cover the minigame's elements, requiring unlocking TMW and moving things around in order to play the minigame.

WoW provides the events CLIENT_SCENE_OPENED and CLIENT_SCENE_CLOSED that indicate when a minigame is active. Having a condition that can keep icons from showing when in a minigame would solve the issue of having to move things around manually to play minigames.

I would very much appreciate a condition added to TellMeWhen that provides this functionality for icons and group conditions. Thank you!

ascott18 commented 2 months ago

Please provide examples of such minigames

canofbutter commented 2 months ago

Sure thing!

These stand out and I can link directly to the puzzle info (and have tested the event firing):

I don't know of a way to link to them directly, and it's annoyingly random, but some of the tasks in the Time Rift event in Thaldraszus occasionally had things to do like the above straighten the lines etc that didn't use the vehicle UI (though some did) but this event got fired off regardless. Also annoyingly, I couldn't test if the BFA World Quest Shell Game fires this event (it's not up at the moment and the event wasn't introduced until 9.2.5, after these quests were made, but the Nazjatar ones do now, so I'm not sure), but it is one with no vehicle UI nor other clear indicator that could be used as a condition to hide icons (that one was particularly annoying as it didn't even keep a consistent buff/debuff up to check for)

Edit: added another example, and wanted to note that sometimes the sceneType (Enum.ClientSceneType) is "DefaultSceneType" (0) for these and sometimes it's MinigameSceneType (1). It does not seem consistent at all. The firing of CLIENT_SCENE_OPENED and CLIENT_SCENE_CLOSED is relatively consistent, however sometimes CLIENT_SCENE_CLOSED will fire twice when ending a minigame, even with one CLIENT_SCENE_OPENED event.

ascott18 commented 2 months ago

I'm curious as to the use case where you have a lot of icons on your screen that aren't already hidden while out of combat, or if this couldn't be solved by hiding your entire UI while doing the minigame (which is what I do because my unit frames are usually in the way)

canofbutter commented 2 months ago

I tend not to hide anything while out of combat, just a preference, as well as liking to have the UI visible for chat etc. If this isn't feasible to add (or there are higher priority things to where doing this doesn't work out), and you don't feel it has broad enough use, I can do it myself with some custom LUA (just usually hate to make custom lua that creates an event listener, since that gets wonky - realistically requiring a reload every time you change something in it). So basically, doing it myself would be sorta clunky.

Suggested it because it has come up a fair bit for me and had a friend ask about it too (so figured I might not be the only one).

ascott18 commented 1 month ago

I'm not opposed to a solution here, but I want to make sure its the right solution.

The idea that comes to mind is that rather than making this a condition that needs to be up on every group, its just global, default behavior to hide TMW in these situations. Do you think this would work for you?

ascott18 commented 1 month ago

Note: The zereth mortis WQ puzzles are the only ones I've found so far that fire this with MinigameSceneType. The default Blizz UI hides the player/target unit frames, but only for MinigameSceneType. https://github.com/Gethe/wow-ui-source/blob/2e827a602452a4d90608d3aba54f2e037a00e36a/Interface/AddOns/Blizzard_UIParent/Mainline/UIParent.lua#L53-L61

These also happen to use the vehicle UI as well.

canofbutter commented 1 month ago

Ah - yeah, so I thought of a toggle like that (similar to what the "only show in combat" toggle does), but the main reason I requested a condition instead was I personally have elements I would like to keep showing... Particularly, I made some timer/reminder bars that I use (some are simple "you should take a break" TMW Timer triggers, others are LUA driven to keep a bar for "here's the next time Beledar shifts"). I know, I'm being picky here, and if a global toggle is the better overall solution for general use, perhaps much like how "is in combat" also has a condition, there could be both?