Ahli / Galaxy-Observer-UI

Toolset to create Observer Interfaces for StarCraft II / Heroes of the Storm. https://ahli.github.io/Galaxy-Observer-UI/#/
MIT License
34 stars 8 forks source link

Possible to show raynor pepper under his health without needing him focused? #151

Open pjmagee opened 3 years ago

pjmagee commented 3 years ago

I guess a few other heroes may work similarly, like slyvanis stacking her W on enemies. Or would this kind of addition be a lot more complicated to add?

Ahli commented 3 years ago

These panels are created inside the specific UI location for "HeroSpecificStackingBuffsStatus" which is "HeroSpecificStackingBuffsPanel" in each Hero's status bar. It is possible to edit the UI definition before they are created.

Unfortunately, they all use a SelectionUnitStatusPanel which is only visible when a unit is selected. Thus, it won't work in everyone-vision when no unit is selected.

Therefore, the UI elements would need to be created inside the unit status for everyone. There is the issue of hiding backgrounds for the other heroes, though. But they can be hidden. Empty stacks will just not show an image. If the hero can be identified by other means, those could be added back for that hero.

Example with hidden background images for Raynor's trait stacks.

<!-- Always visible stack counters -->
<Frame type="Frame" name="HeroUnitStatusFrameTemplate/HeroUnitStatusParentFrame" file="UnitStatus" template="_Ahli/PlayerUnitNameLabelTemplate">
    <Frame type="Frame" name="CustomStacksPanel">
        <Anchor side="Top" relative="$parent/DurationBar" pos="Max" offset="3"/>
        <Anchor side="Left" relative="$parent/DurationBar" pos="Min" offset="0"/>
        <Width val="136"/>
        <Height val="20"/>

        <Frame type="UnitStatusUnitStackingDebuffElement" name="RaynorStacksFrameContainer" template="Raynor/RaynorStacksFrameContainer/StacksFrame">
            <Anchor relative="$parent"/>
            <ShowForBehaviorOwner val="True"/>
            <ShowForOwner val="True"/>
        </Frame>
    </Frame>
</Frame>

<!-- Hide original stack counters and their background images -->
<Frame type="SelectionUnitStatusPanel" name="RaynorStacksFrameContainer" file="Raynor">
    <Frame type="UnitStatusUnitStackingDebuffElement" name="StacksFrame">
        <ShowForBehaviorOwner val="False"/>
        <Frame type="Image" name="StacksBackground">
            <Visible val="false"/>
        </Frame>
    </Frame>
</Frame>
pjmagee commented 3 years ago

Would it add to much noise as an observer seeing this information? Maybe this is why the default UI never did this? I just like the idea of being able to see this information without needing to select a hero, kind of feels more immersive with having the vision of these stacks.

Ahli commented 3 years ago

Today, I worked on this all day.

Raynor's stacks work fine. But other things like Malf's cooldown or Imperius' stacks are not working properly right now. =/

pjmagee commented 3 years ago

hey, small steps is positive. Do you think it may be worth getting Khalors opinion on certain things? I know for sure he is probably the biggest user who gets the most audience from your work where as for me...right now i get like 3 twitch viewers and i dont want anything from my ideas taking priority over something that CCL or other leagues wont benefit from.

Ahli commented 3 years ago

Well, it is worth looking into. If it should always be made visible is another matter.

It looks like that I can only make it work globally visible when the stacks are drawn on the own hero. So, e.g. Lunara does not work as the frame is not visible unless Lunara clicked on =/

Ahli commented 3 years ago

I've added Raynor, Orphea, Valeera and Alexstrasza (only Gift Of Life)

Other counters are possible via self-written code. Spazzo implemented a few things for unit status for his own UI:

Spazzo: here are the toggles I've got for this, some behaviors, some abilities: gazlowe scrap recharge timer, tracer pulse bomb charge, anduin leap of faith cd, stukov bio kill switch cd, valla hatred count & timer, dehaka essence, lucio crossfade state(this took a bit more doing), mephisto shade timer, medivh force of will cd and valeera combo points.

and a video he posted on DIscord: https://streamable.com/vq8n96

pjmagee commented 3 years ago

Wow thats pretty cool.