Download
(30Kb)
Download
Updated: 01-11-20 06:35 AM
Compatibility:
Classic Patch (1.13.3)
Updated:01-11-20 06:35 AM
Created:05-19-19 08:09 PM
Downloads:495,321
Favorites:261
MD5:

Real Mob Health  Popular! (More than 5000 hits)

Version: 2.18
by: SDPhantom [More]

Notice:
On February 18th, 2020, Blizzard released a hotfix that enables mob health to be displayed in the Default UI.
RealMobHealth has run its course and is now obsolete. I thank everyone for their support during the lifetime of this addon.


For existing users running the Default UI, here's a list of addons that'll provide an alternative to the UITweaks module.

2.18 (2020-01-11)
-Modified death detection to hold onto data a little longer to prevent mobs with reincarnation mechanics from spamming messages
-Internal timers now use C_Timer instead of OnUpdate to try to combat "No player named <Player> is currently playing." spam after being minimized

2.17 (2019-12-13)
-Added usage of INSTANCE_CHAT as a fallback for BATTLEGROUND. (Reports are saying BATTLEGROUND is defunct)

2.16 (2019-12-12)
-Added usage of BATTLEGROUND addon channel
-RAID/PARTY addon channels now check specifically for the home group category instead of all

2.15 (2019-12-11)
-Implemented an anti-spam measure to help mitigate Blizzard's throttle bug of the YELL channel
-TextStatusBar_UpdateTextString() code moved to a secure hook to mitigate Blizzard taint bug

2.14 (2019-12-10)
-The YELL addon channel has been added to the list of broadcast channels
-Some internal functions are now metatable-aware (opens possibilities for future features?)

2.13 (2019-09-25)
-Removed lingering debug message that was hiding in the aura scanner

2.12 (2019-09-23)
-Now detects health from a Hunter's Beast Lore
-Added ruRU localization (courtesy of vAlshebnik)

2.11 (2019-09-15)
-Localization.lua now uncludes Unicode BOM for easier UTF-8 editing
-Revised deDE localization (courtesy of Dathwada)
-Added esES localization (courtesy of Lynk_One)

2.10 (2019-09-11)
-Added koKR localization (courtesy of chkid)

2.9 (2019-09-10)
-Added deDE localization (courtesy of Figlmueller)
-Fixed zhCN, zhTW, and koKR numeric abbreviations

2.8 (2019-09-09)
-Added zhCN and zhTW localizations (courtesy of EKE00372 and HopeASD)

2.7 (2019-09-08)
-Fixed Localization loader not loading the default locale for some people

2.6 (2019-09-08)
-Added frFR localization (courtesy of Pgmbru)

2.5 (2019-09-06)
-GameTooltip health text is now offloaded to the same on-use generation code that TargetFrame uses

2.4 (2019-09-05) APIVersion: 3.2
-Fixed TargetFrame text not checking options on creation
-Added health text to the GameTooltip's StatusBar
-"Show Tooltip Info" in options has been renamed "Show Tooltip Feedback" to avoid ambiguity with the new health text
-Added API version info to API
Note: APIVersion is noted in this log for continuity, however it's only available starting now
-Added RealMobHealth.OverrideOption() and RealMobHealth.UITweaksSetEnabled() to API (See APIDoc.txt)

2.3 (2019-08-11) APIVersion: 3.1
-Improved UITweaks' integration with layout addons
-Tooltip lines have been added to the localization table
-Tooltip now shows if a creature's health is overridden
-Added RealMobHealth.HasHealthOverride() to API (See APIDoc.txt)

2.2 (2019-08-09)
-Fixed newly created nameplates not checking options

2.1 (2019-08-08)
-Implemented GetNormalizedRealmName() fallback if UnitFullName("player") fails to return realm name
-Fixed stack overflow in UITweaks

2.0 (2019-07-14) APIVersion: 3.0
-Complete restructure
-Supporting code is split into different modules
-Peer system broadcasts discovered health values and makes queries through the AddOn comm channels
-Health recording can now happen when targeting a corpse after witnessing a fight
-New cache timeout system purges damage data from mobs that have not been seen in a while
-Cache timeout varies based on what data exists for the mob and if the addon is aware the mob is dead
-BlizzardUI Tweaks is reintegrated to streamline the new options system
-Lots of API additions/tweaks/changes (See APIDoc.txt)
-Callbacks are now handled by the new event system
-RealMobHealth.GetUnitHealth() speculative mode is now force-enabled. The argument to control it has been removed.

1.1 (2019-06-05) APIVersion: 2.0
-Streamlined the core code
-Fixed issue with Shaman totems getting recorded
-World/Raid bosses are now supported
-Damage reflection is now properly tallied
-More API functions (See APIDoc.txt)
-RealMobHealth.GetHealth() had been renamed RealMobHealth.GetUnitHealth()
-RealMobHealth.GetUnitHealth() now falls back to native values if not enough data present
-GameTooltip hook now only runs if the unit is attackable

1.0 (2019-05-19) APIVersion: 1.0
-Classic release
-Records damage taken of nearby mobs from the CombatLog
-Obtains mob level using mouseover/target/partytarget/raidtarget and if enabled, nameplates
-TargetFrame and Nameplates show text values for health, TargetFrame also shows mana/rage/energy
-Gametooltip shows which mobs have had their health recorded
Post A Reply Comment Options
Unread 08-28-19, 08:42 PM  
Zupe
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by Zupe
Thank you for the addon. Similar to the last post, would you possibly be able to advise on how to have this work with Perl Classic Unit Frames? Right now, all I get is 100/100 for every mob. Thanks very much!
It's a similar patch, but since Pearl doesn't store local references, we need to make the functions local.

Code:
local function UnitHealth(unit) local cur,max=RealMobHealth.GetUnitHealth(unit); return cur; end
local function UnitHealthMax(unit) local cur,max=RealMobHealth.GetUnitHealth(unit); return max; end

Put this at the top of every one of these files.
Code:
Perl_CombatDisplay\Perl_CombatDisplay.lua
Perl_Focus\Perl_Focus.lua
Perl_Party\Perl_Party.lua
Perl_Party_Pet\Perl_Party_Pet.lua
Perl_Party_Target\Perl_Party_Target.lua
Perl_Player\Perl_Player.lua
Perl_Player_Pet\Perl_Player_Pet.lua
Perl_Target\Perl_Target.lua
Perl_Target_Target\Perl_Target_Target.lua
Seems to be working, thanks for the help!
Report comment to moderator  
Reply With Quote
Unread 08-28-19, 05:50 PM  
Shạlin
A Murloc Raider

Forum posts: 7
File comments: 1
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by unit
Please, can you check if this works with latest version of ElvUI for classic (1.01)?
I have added those modification like you said, but unit frames displayed ElvUI tags strings (like this "[healthcolor][health:current-percent]") instead of values.
The load order was messing the patch up, here's the fixed version.
Code:
function UnitHealth(unit) local cur,max=RealMobHealth.GetUnitHealth(unit); return cur; end
function UnitHealthMax(unit) local cur,max=RealMobHealth.GetUnitHealth(unit); return max; end
Yo this makes the target unitframe sometimes not load.. Seems it loads if i restart the client, but if i /reloadui it doesent load anymore and requires a restart.
Do i paste it as is or?
Last edited by Shạlin : 08-28-19 at 05:53 PM.
Report comment to moderator  
Reply With Quote
Unread 08-28-19, 02:12 PM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2327
File comments: 132
Uploads: 38
Originally Posted by Zupe
Thank you for the addon. Similar to the last post, would you possibly be able to advise on how to have this work with Perl Classic Unit Frames? Right now, all I get is 100/100 for every mob. Thanks very much!
It's a similar patch, but since Pearl doesn't store local references, we need to make the functions local.

Code:
local OLD_UnitHealth,OLD_UnitHealthMax=UnitHealth,UnitHealthMax;
local function UnitHealth(unit)
	if not RealMobHealth then return OLD_UnitHealth(unit); end
	local cur,max=RealMobHealth.GetUnitHealth(unit); return cur;
end
local function UnitHealthMax(unit)
	if not RealMobHealth then return OLD_UnitHealthMax(unit); end
	local cur,max=RealMobHealth.GetUnitHealth(unit); return max;
end

Put this at the top of every one of these files.
Code:
Perl_CombatDisplay\Perl_CombatDisplay.lua
Perl_Focus\Perl_Focus.lua
Perl_Party\Perl_Party.lua
Perl_Party_Pet\Perl_Party_Pet.lua
Perl_Party_Target\Perl_Party_Target.lua
Perl_Player\Perl_Player.lua
Perl_Player_Pet\Perl_Player_Pet.lua
Perl_Target\Perl_Target.lua
Perl_Target_Target\Perl_Target_Target.lua
Edit: Fixed load order issue
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Last edited by SDPhantom : 08-29-19 at 02:18 AM.
Report comment to moderator  
Reply With Quote
Unread 08-28-19, 06:22 AM  
Zupe
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Thank you for the addon. Similar to the last post, would you possibly be able to advise on how to have this work with Perl Classic Unit Frames? Right now, all I get is 100/100 for every mob. Thanks very much!
Report comment to moderator  
Reply With Quote
Unread 08-27-19, 12:04 PM  
unit
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by unit
Please, can you check if this works with latest version of ElvUI for classic (1.01)?
I have added those modification like you said, but unit frames displayed ElvUI tags strings (like this "[healthcolor][health:current-percent]") instead of values.
The load order was messing the patch up, here's the fixed version.
Code:
function UnitHealth(unit) local cur,max=RealMobHealth.GetUnitHealth(unit); return cur; end
function UnitHealthMax(unit) local cur,max=RealMobHealth.GetUnitHealth(unit); return max; end
It works, thank you!
Report comment to moderator  
Reply With Quote
Unread 08-27-19, 11:21 AM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2327
File comments: 132
Uploads: 38
Originally Posted by unit
Please, can you check if this works with latest version of ElvUI for classic (1.01)?
I have added those modification like you said, but unit frames displayed ElvUI tags strings (like this "[healthcolor][health:current-percent]") instead of values.
The load order was messing the patch up, here's the fixed version.
Code:
local OLD_UnitHealth,OLD_UnitHealthMax=UnitHealth,UnitHealthMax;
function UnitHealth(unit)
	if not RealMobHealth then return OLD_UnitHealth(unit); end
	local cur,max=RealMobHealth.GetUnitHealth(unit); return cur;
end
function UnitHealthMax(unit)
	if not RealMobHealth then return OLD_UnitHealthMax(unit); end
	local cur,max=RealMobHealth.GetUnitHealth(unit); return max;
end
Edit: Fixed another load order issue
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Last edited by SDPhantom : 08-29-19 at 02:17 AM.
Report comment to moderator  
Reply With Quote
Unread 08-27-19, 09:58 AM  
unit
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by woowoowoo
Have never seen it working on the target frame even with no other addons.
What version were you running? 2.1 had a stack overflow in the TargetFrame code that I put out a fix for already. Otherwise, it seemed to be working fine when I ran the current version (now 2.3).



Originally Posted by ryguy182
Did anyone manage to get this working? I got basically all my addons the way I want barring some that needs stability/error updates, but unfortunately it just defaults to 100 hp for everything with ElvUI.
I dug around in their code and in ElvUI/Modules/UnitFrame/Tags.lua, around line 70, you'll find a comment header named Tags. Insert this right under it.
Code:
local RMH_GetUnitHealth=RealMobHealth.GetUnitHealth;
function UnitHealth(unit) local cur,max=RMH_GetUnitHealth(unit); return cur; end
function UnitHealthMax(unit) local cur,max=RMH_GetUnitHealth(unit); return max; end
This will replace the local references of these functions in that file with a function that pulls values from RealMobHealth.
Please, can you check if this works with latest version of ElvUI for classic (1.01)?
I have added those modification like you said, but unit frames displayed ElvUI tags strings (like this "[healthcolor][health:current-percent]") instead of values.
Report comment to moderator  
Reply With Quote
Unread 08-27-19, 02:44 AM  
Kraiden85
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by Kraiden85
There's a line in my tooltip "Recorded Health Data".
How to disable that?
Interface Options > AddOns tab > RealMobHealth > Show Tooltip Info
Uncheck that
Thank you. Didn't realise there was a RealMobHealth category under AddOns tab.
Report comment to moderator  
Reply With Quote
Unread 08-27-19, 12:19 AM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2327
File comments: 132
Uploads: 38
Originally Posted by Kraiden85
There's a line in my tooltip "Recorded Health Data".
How to disable that?
Interface Options > AddOns tab > RealMobHealth > Show Tooltip Info
Uncheck that
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Report comment to moderator  
Reply With Quote
Unread 08-27-19, 12:11 AM  
Kraiden85
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
There's a line in my tooltip "Recorded Health Data".
How to disable that?
Report comment to moderator  
Reply With Quote
Unread 08-21-19, 10:58 AM  
tyrone77
A Defias Bandit

Forum posts: 2
File comments: 4
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by tyrone77
Hi, so I'm currently on a 1.13 sandbox to get all my addons ready before release. I keep getting this error with your addon, I'm not even sure if it will be applicable to the live servers later on but would love if you could tell me what went wrong here.
It's a bug with your sandbox. It doesn't provide a server name and throws nil.
In short, this works fine on the official game servers/client.
Great, that's what I suspected. Thanks for the reply!
Report comment to moderator  
Reply With Quote
Unread 08-20-19, 05:09 PM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2327
File comments: 132
Uploads: 38
Originally Posted by tyrone77
Hi, so I'm currently on a 1.13 sandbox to get all my addons ready before release. I keep getting this error with your addon, I'm not even sure if it will be applicable to the live servers later on but would love if you could tell me what went wrong here.
It's a bug with your sandbox. It doesn't provide a server name and throws nil.
In short, this works fine on the official game servers/client.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Last edited by SDPhantom : 08-20-19 at 05:17 PM.
Report comment to moderator  
Reply With Quote
Unread 08-20-19, 12:24 PM  
tyrone77
A Defias Bandit

Forum posts: 2
File comments: 4
Uploads: 0
Hi, so I'm currently on a 1.13 sandbox to get all my addons ready before release. I keep getting this error with your addon, I'm not even sure if it will be applicable to the live servers later on but would love if you could tell me what went wrong here.

Message: Interface\AddOns\RealMobHealth\Core.lua:205: bad argument #3 to 'string_format' (string expected, got nil)
Time: Tue Aug 20 20:21:30 2019
Count: 1
Stack: Interface\AddOns\RealMobHealth\Core.lua:205: bad argument #3 to 'string_format' (string expected, got nil)
[C]: ?
Interface\AddOns\RealMobHealth\Core.lua:205: in function <Interface\AddOns\RealMobHealth\Core.lua:203>
(tail call): ?
[C]: ?
Interface\AddOns\RealMobHealth\Events.lua:49: in function <Interface\AddOns\RealMobHealth\Events.lua:47>
Interface\AddOns\RealMobHealth\Events.lua:62: in function <Interface\AddOns\RealMobHealth\Events.lua:53>
Interface\AddOns\RealMobHealth\Events.lua:165: in function <Interface\AddOns\RealMobHealth\Events.lua:162>

Locals: <none>
Last edited by tyrone77 : 08-20-19 at 12:27 PM.
Report comment to moderator  
Reply With Quote
Unread 08-18-19, 05:49 AM  
adl
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
Originally Posted by SDPhantom
Originally Posted by adl
Hello, im wondering if its possible to let us change the HP font and shadow? Im currently using a nameplate addon and i would be really happy if i was able to make the HP font match my nameplate font.
In UITweaks.lua line 169, there should be a line like this.
Code:
health:SetFont("Fonts\\ArialN.ttf",10,"THICKOUTLINE");
Feel free to change that around as you wish. See FontString:SetFont() for reference.
Oh thanks a lot. I figured out how to make it look exactly as i wanted.
Last edited by adl : 08-18-19 at 07:40 AM.
Report comment to moderator  
Reply With Quote
Unread 08-17-19, 12:20 PM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2327
File comments: 132
Uploads: 38
Originally Posted by adl
Hello, im wondering if its possible to let us change the HP font and shadow? Im currently using a nameplate addon and i would be really happy if i was able to make the HP font match my nameplate font.
In UITweaks.lua line 169, there should be a line like this.
Code:
health:SetFont("Fonts\\ArialN.ttf",10,"THICKOUTLINE");
Feel free to change that around as you wish. See FontString:SetFont() for reference.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Last edited by SDPhantom : 08-17-19 at 12:20 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: