The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

[MOD][UI] Always visible health and mana text

By on November 20, 2009 12:37:46 AM from Demigod Forums Demigod Forums

gunblob

Join Date 07/2008
+11

Makes health and mana text always visible, instead of only when mouse is over the bar.

Install: unzip into Demigod's mod directory.

eg. 'C:\Program Files (x86)\Stardock Games\Demigod\bindata\mods' or 'My Documents\My Games\Gas Powered Games\Demigod\mods' (edit: My Documents doesn't work)

Download: http://www.mediafire.com/?4iigxtmmom1

If you find any problems or conflicts please let me know.

Locked Post 24 Replies +4
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
November 20, 2009 5:01:39 AM from Demigod Forums Demigod Forums

Nice

Reason for Karma (Optional)
Successfully updated karma reason!
November 20, 2009 6:27:36 AM from Demigod Forums Demigod Forums

is it possible to use this mod in multiplayer when the other players dont have it?

Reason for Karma (Optional)
Successfully updated karma reason!
November 20, 2009 6:29:53 AM from Demigod Forums Demigod Forums

Yes, it's an UI only mod.

Reason for Karma (Optional)
Successfully updated karma reason!
November 20, 2009 11:26:34 AM from Demigod Forums Demigod Forums

Sexy

Very sexy

Reason for Karma (Optional)
Successfully updated karma reason!
November 21, 2009 9:01:25 AM from Demigod Forums Demigod Forums

Thank you!!

Reason for Karma (Optional)
Successfully updated karma reason!
November 21, 2009 10:04:38 AM from Demigod Forums Demigod Forums

Great mod, installed works flawlessly.  Now I just have to get used to having the appropriate information without rollover the bars.

 

You're a lifesaver, literally.

Reason for Karma (Optional)
Successfully updated karma reason!
November 21, 2009 1:39:34 PM from Demigod Forums Demigod Forums

Great mod, simple but sooooo needed

Reason for Karma (Optional)
Successfully updated karma reason!
November 21, 2009 7:32:22 PM from Demigod Forums Demigod Forums

You're a lifesaver, literally.
Now I can see right away if I need that Sigil or HP potion to avoid being sniped! Thanks a lot!

Reason for Karma (Optional)
Successfully updated karma reason!
December 7, 2009 8:11:18 AM from Demigod Forums Demigod Forums

I have a minor bug report. With this mod enabled, when watching replays, I can see some "residual" UI panel of the mana bar when I'm in Observer mode.

Reason for Karma (Optional)
Successfully updated karma reason!
December 7, 2009 1:57:27 PM from Demigod Forums Demigod Forums

Maybe I'm dumb or something but I put the folder out of the zip file into the mods folder. I have other mods that work when I enable them but when I enable this one I don't see the hps or mana over people all the time. Is there an activation key or something? I cycled through with ~ but still didn't work. Most likely I've done something wrong. Thanks

Reason for Karma (Optional)
Successfully updated karma reason!
December 7, 2009 2:41:20 PM from Demigod Forums Demigod Forums

Quoting ktachuck,
Maybe I'm dumb or something but I put the folder out of the zip file into the mods folder. I have other mods that work when I enable them but when I enable this one I don't see the hps or mana over people all the time. Is there an activation key or something? I cycled through with ~ but still didn't work. Most likely I've done something wrong. Thanks
You misunderstood the mod . This mod shows your mana and health permanently. Without this mod, you have to mouse over the mana and health bar in order to see it.

Reason for Karma (Optional)
Successfully updated karma reason!
December 7, 2009 6:49:57 PM from Demigod Forums Demigod Forums

Ah so I am dumb, thanks.

Reason for Karma (Optional)
Successfully updated karma reason!
June 6, 2011 6:45:53 PM from Demigod Forums Demigod Forums

Bumping - noticed that this mod breaks observer mode in replays.  Any modder out there with a few minutes that can take a look at how to fix that?  Thanks!

Sorian has alt version of this mod that includes quite a bit more code, but requires a mouse click to make the HP/mana text show... but his version doesn't break observer mode.

Here's the code from this mod, though:

Code: c++
  1. local OriginalOnHeroChange = OnHeroChange
  2. function OnHeroChange(unit)
  3.     OriginalOnHeroChange(unit)
  4.     healthTxt:Show()
  5.     manaTxt:Show()
  6.    
  7.     barGroup:Show()
  8. end
  9. local OriginalCreate = Create
  10. function Create(parent)
  11.     OriginalCreate(parent)
  12.     local OriginalHandleEvent = barGroup.dummy.HandleEvent
  13.     function barGroup.dummy.HandleEvent(self, event)
  14.         OriginalHandleEvent(self, event)
  15.         healthTxt:Show()
  16.         manaTxt:Show()
  17.     end
  18.     return barGroup
  19. end
Reason for Karma (Optional)
Successfully updated karma reason!
June 6, 2011 11:13:15 PM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
Bumping - noticed that this mod breaks observer mode in replays.  Any modder out there with a few minutes that can take a look at how to fix that?  Thanks!


Sorian has alt version of this mod that includes quite a bit more code, but requires a mouse click to make the HP/mana text show... but his version doesn't break observer mode.

Here's the code from this mod, though:

Code: c++
local OriginalOnHeroChange = OnHeroChange

function OnHeroChange(unit)
    OriginalOnHeroChange(unit)

    healthTxt:Show()
    manaTxt:Show()
   
    barGroup:Show()
end

local OriginalCreate = Create

function Create(parent)
    OriginalCreate(parent)

    local OriginalHandleEvent = barGroup.dummy.HandleEvent

    function barGroup.dummy.HandleEvent(self, event)
        OriginalHandleEvent(self, event)

        healthTxt:Show()
        manaTxt:Show()
    end

    return barGroup
end

Miriyaka?

Fight for the users!

Reason for Karma (Optional)
Successfully updated karma reason!
June 6, 2011 11:20:32 PM from Demigod Forums Demigod Forums

heh... did you just see the new tron this weekend too? 

Reason for Karma (Optional)
Successfully updated karma reason!
June 6, 2011 11:50:49 PM from Demigod Forums Demigod Forums

How does it break?  Does it just make the health/mana bars not show up?  There's no incorrect use of GetFocusArmy, either in the hook or in the original, but it's possible that the hero unit isn't being passed to OnHeroChange, as the hook does no check for hero.  Replace the OnHeroChange function with this:

Code: c++
  1. function OnHeroChange(unit)
  2.     OriginalOnHeroChange(unit)
  3.     --Make sure hero and text are available
  4.     if hero and healthTxt and manaTxt then
  5.         healthTxt:Show()
  6.         manaTxt:Show()
  7.     end
  8. end
Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 1:13:01 AM from Demigod Forums Demigod Forums

Quoting OMG_pacov,
heh... did you just see the new tron this weekend too? 

1st time tonight, with 4 Bacardi Breezers and 3/4 litre of wine!

I feel like I could fail extreme at DG tonight!

Still like Sucker Punch more even though I love the original... heh, I forgot to thank you for your review for Sucker Punch, I used it to convince the wifey to go with me and see it in theatres.

80s awesome movie, meets 90s awesome music. meets modern awesome CGI.

Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 8:51:47 AM from Stardock Forums Stardock Forums

nice, orion. 

miri - there's just that weird graphical distortion when observer mode is selected.  I'll try out the fix you suggested later today.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 12:47:40 PM from Stardock Forums Stardock Forums

I'm guessing the issue is simply because its trying to display hp info for the observer in the ui. 

Heh... i have to update 3 mod packages if this works... sigh. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 5:45:54 PM from Demigod Forums Demigod Forums

tried this:

Code: c++
  1. local OriginalOnHeroChange = OnHeroChange
  2.     function OnHeroChange(unit)
  3.         OriginalOnHeroChange(unit)
  4.         --Make sure hero and text are available
  5.         if hero and healthTxt and manaTxt then
  6.             healthTxt:Show()
  7.             manaTxt:Show()
  8.         end
  9.     end
  10. local OriginalCreate = Create
  11. function Create(parent)
  12.     OriginalCreate(parent)
  13.     local OriginalHandleEvent = barGroup.dummy.HandleEvent
  14.     function barGroup.dummy.HandleEvent(self, event)
  15.         OriginalHandleEvent(self, event)
  16.         healthTxt:Show()
  17.         manaTxt:Show()
  18.     end
  19.     return barGroup
  20. end

 

The code bombs though - ui blanks out.

Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 6:39:34 PM from Demigod Forums Demigod Forums

What?  That works fine for me.  Always displays the text when you're viewing from a specific player's POV as well.

What part of the UI blanks out?  You realize that with 'Observer' selected in the player dropdown, there's no demigod-specific UI at all, right?

In fact, I just tested this with the original code (from the Enhanced UI in your last mod pack), and I'm not seeing any visual problems at all, and the bar displays just fine, and there are no script errors?  If you're having a problem with it, I'm gonna need a log, and a very, very specific description of the problem, because it's not happening for me.

 

Edit: Ok, with the original code, I noticed that two little sections of the demigod portrait frame remain on screen if you switch from a player view to observer view.  That's it.  But the code I provided seems to fix that.  Here's a version that makes sure that the entire barGroup display is hidden if no hero is present, just in case there are other issues that I'm not seeing:

Code: c++
  1. local OriginalOnHeroChange = OnHeroChange
  2. function OnHeroChange(unit)
  3.     OriginalOnHeroChange(unit)
  4.     if hero and healthTxt and manaTxt then
  5.         healthTxt:Show()
  6.         manaTxt:Show()
  7.     else
  8.         barGroup:Hide()
  9.     end
  10. end
  11. local OriginalCreate = Create
  12. function Create(parent)
  13.     OriginalCreate(parent)
  14.     local OriginalHandleEvent = barGroup.dummy.HandleEvent
  15.     function barGroup.dummy.HandleEvent(self, event)
  16.         OriginalHandleEvent(self, event)
  17.         healthTxt:Show()
  18.         manaTxt:Show()
  19.     end
  20.     return barGroup
  21. end
Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 6:47:01 PM from Demigod Forums Demigod Forums

Quoting miriyaka,
In fact, I just tested this with the original code

hmm... something peculiar is going on then... with the original code, ONLY that mod enabled, and it works fine.  Then when I go to a replay (I play a game for about 20 seconds with the mod on, end the game, then load the replay with the mod on), I get a graphical distortion when in observer mode where the ui would normally be.  And yes, I know that nothing should be appearing in observer mode.  The problem is that something is appearing... and its a distortion.  But ONLY with the mod enabled.

edit - ok i try that.  I think you saw what I'm talking about now.

Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 6:49:57 PM from Demigod Forums Demigod Forums

Is this with just the original mod on, or with the combined Enhanced UI on?  I.e. have you narrowed it down to this mod with 100% certainty?  Because this mod should not affect the rest of the demigod panel at all - the only reason those little bits of frame were there for me is because the bar display object overlaps them, and its OnUpdate callback (this OnHeroChange function) was apparently not doing a proper Hide().

Reason for Karma (Optional)
Successfully updated karma reason!
June 7, 2011 6:51:45 PM from Demigod Forums Demigod Forums

tested - you got it.  Thanks, miri! 

And yes - I narrowed it down to this mod.  Tested first w my combined mod.  Saw the issue, so I went through each mod 1 by 1.  At any rate, all is sorted now it would seem.  Thanks!

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0001578   Page Render Time: