Download
(16 Kb)
Download
Updated: 09-16-13 04:39 AM
Pictures
File Info
Compatibility:
Siege of Orgrimmar (5.4)
Updated:09-16-13 04:39 AM
Created:08-21-13 05:56 PM
Downloads:3,124
Favorites:43
MD5:
5.4
rNamePlates 2
Version: 50400.01
by: zork [More]

Intro
Just simple nameplates.

I created this mod after finding out about the FPS bug.

I had friends with 200fps without nameplates that dropped to 40fps with nameplates enabled.
This mod fixes this issue because it hides all NamePlates before applying a new SetPoint().

If you are experiencing high FPS loss with nameplates enabled try them and get amazed.
Config
Config variables can be found at the top of the core.lua.

Lua Code:
  1. --CONFIG
  2.  
  3.   --width/height
  4.   cfg.nameplateWidth    = 100
  5.   cfg.healthbarHeight   = 7
  6.   cfg.castbarHeight     = 7
  7.   cfg.threatglowHeight  = 15
  8.   --gap between bars and castbar icon
  9.   cfg.gap               = 5
  10.   --icon sizes
  11.   cfg.iconSize          = 30
  12.   cfg.shieldSize        = 16
  13.   cfg.raidiconSize      = 25
  14.   --statusbars
  15.   --available textures: statusbar, statusbar_smooth, statusbar_rothui
  16.   cfg.healthbarTexture  = "Interface\\AddOns\\rNamePlates2\\media\\statusbar"
  17.   cfg.castbarTexture    = "Interface\\AddOns\\rNamePlates2\\media\\statusbar"
SVN
http://code.google.com/p/rothui/sour...0/rNamePlates2
50400.01
- added healthbar faction coloring
- updated toc to 50400

50300.04
- Added the threat bloat fix

50300.03
- changed the threat glow to a threat border around the healthbar

50300.02
- code cleanup/overhaul
- added 2 new statusbar textures to pick from

50300.01
- initial release
Optional Files (0)


Archived Files (4)
File Name
Version
Size
Author
Date
50300.04
16kB
zork
09-07-13 04:33 AM
50300.03
16kB
zork
08-24-13 08:10 PM
50300.02
50kB
zork
08-23-13 12:33 PM
50300.01
11kB
zork
08-21-13 05:56 PM


Post A Reply Comment Options
Unread 10-24-13, 08:25 AM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 61
Uploads: 0
Ok, finally my config is finished. This code works for show/hide enemies nameplates during combat (friendly nameplates always hide):

Code:
 
--Show hostile nameplates during combat only
  local show, hide = 1, 0
	local f = CreateFrame("Frame")
	f:RegisterEvent("PLAYER_REGEN_ENABLED")
	f:RegisterEvent("PLAYER_REGEN_DISABLED")
	f:SetScript("OnEvent", function(self, event, ...)
		self[event]()
	end)

	function f:PLAYER_REGEN_ENABLED()
		SetCVar("nameplateShowEnemies", hide)
		SetCVar("nameplateShowFriends", hide)
	end

	function f:PLAYER_REGEN_DISABLED()
		SetCVar("nameplateShowEnemies", show)
		SetCVar("nameplateShowFriends", hide)
  end
percentage health code, fixed decimals with math.floor:

Code:
    
--update health func, add to the top where the other functions are.
    local function UpdateHealth(self)
      local hcur, hmin, hmax = self:GetValue(), self:GetMinMaxValues()
      local hper = 0
      if hmax > 0 then hper = hcur/hmax*100 end
      self.value:SetText(math.floor(hper + 0.5).."%")
    end
     
--new value string, add to NamePlateInit function.
    plate.healthbar.value = plate.healthbar:CreateFontString(nil,"BORDER")
    plate.healthbar.value:SetPoint("RIGHT", 0, 0)
    plate.healthbar.value:SetFont(STANDARD_TEXT_FONT,11,"THINOUTLINE")
    plate.healthbar:HookScript("OnValueChanged", UpdateHealth)
    UpdateHealth(plate.healthbar)
and highlight on target/mouseover:
Thanks. I tried it. I actually like it aswell.

DIFF:
http://code.google.com/p/rothui/sour...e.lua&old=1173
Last edited by Dhaern : 10-24-13 at 11:07 AM.
Dhaern is offline Report comment to moderator  
Reply With Quote
Unread 10-24-13, 12:38 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1348
File comments: 3321
Uploads: 86
First check in the interface settings for your nameplate keybinds. There are 3. Try them out.
Next you can check for active enemy or friendly nameplates via:
Lua Code:
  1. GetCVarBool("nameplateShowEnemies")
  2. GetCVarBool("nameplateShowFriends")
Checking which nameplate is which can only be done by tracking the nameplate health color. (Any class colored or hostile colored or neutral colored nameplates need an attribute).
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline Report comment to moderator  
Reply With Quote
Unread 10-23-13, 08:17 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 61
Uploads: 0
Originally Posted by zork
Thanks. I tried it. I actually like it aswell.

DIFF:
http://code.google.com/p/rothui/sour...e.lua&old=1173
Thx very much zork, rnameplates2 is amazing now with new features

I have one problem now, I changed this code (line 346):

Code:
    
RNP:Hide()
for blizzPlate, newPlate in pairs(RNP.nameplates) do
to

Code:
    
RNP:Hide()
if not InCombatLockdown() then return end
for blizzPlate, newPlate in pairs(RNP.nameplates) do
for show nameplates during combat and hide non combat but this code is not working, because it's hide all text over NPC/PLAYERS not nameplates only on non combat and show friendly nameplates during combat.
I want to show only NPC nameplates and hostile players DURING combat only. Is it possible zork?

This is my final question and I will have perfect nameplates addon with your help
Last edited by Dhaern : 10-23-13 at 08:19 PM.
Dhaern is offline Report comment to moderator  
Reply With Quote
Unread 10-23-13, 02:53 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1348
File comments: 3321
Uploads: 86
Thanks. I tried it. I actually like it aswell.

DIFF:
http://code.google.com/p/rothui/sour...e.lua&old=1173
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 10-23-13 at 02:57 PM.
zork is offline Report comment to moderator  
Reply With Quote
Unread 10-23-13, 02:04 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 61
Uploads: 0
Originally Posted by Aklaim
Once again I apologize for my English. Is it possible to make rnameplates2 as on the attached image? The number 1 (the selected target is selected frame). thank you
1. http://sendfile.su/885474
2. http://dfiles.ru/files/xdogf1ua3
I would like highlight frames on target/mouseover and less opacity on non targets (less alpha color?), it's a nice option
Last edited by Dhaern : 10-23-13 at 02:05 PM.
Dhaern is offline Report comment to moderator  
Reply With Quote
Unread 10-23-13, 08:37 AM  
Aklaim
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Once again I apologize for my English. Is it possible to make rnameplates2 as on the attached image? The number 1 (the selected target is selected frame). thank you
1. http://sendfile.su/885474
2. http://dfiles.ru/files/xdogf1ua3
Last edited by Aklaim : 10-23-13 at 08:45 AM.
Aklaim is offline Report comment to moderator  
Reply With Quote
Unread 10-23-13, 05:54 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1348
File comments: 3321
Uploads: 86
Sorry but I do not understand your question.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline Report comment to moderator  
Reply With Quote
Unread 10-23-13, 01:46 AM  
Aklaim
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Thank you for your prompt reply. I would like to say a wish: whether in your addon in any way to make the selection of targets, it somehow signals those it (say what appeared a frame)?
Last edited by Aklaim : 10-23-13 at 01:47 AM.
Aklaim is offline Report comment to moderator  
Reply With Quote
Unread 10-22-13, 03:38 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1348
File comments: 3321
Uploads: 86
Re: Need help!

Originally Posted by Aklaim
What a piece of code is responsible for this?u
Change the value of SetBackdropColor. Currently it is set to 0,0,0,1 in RGBA (reg,green,blue,alpha). For red you use (1,0,0,1) etc.
http://code.google.com/p/rothui/sour...s2/core.lua#75
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline Report comment to moderator  
Reply With Quote
Unread 10-22-13, 12:52 PM  
Aklaim
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Post Need help!

Dear zork. First please forgive me for my English. Secondly, the question is how you can (and if it's possible) in your addon to make the background in the allocation of targets in a different color? What a piece of code is responsible for this? I would be very grateful for your response. Thank you
Aklaim is offline Report comment to moderator  
Reply With Quote
Unread 10-22-13, 01:41 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1348
File comments: 3321
Uploads: 86
Re: help with percentage function

Add the function to the top where the other functions are.
Add the new value string to the NamePlateInit function.
Lua Code:
  1. --update health func
  2. local function UpdateHealth(self)
  3.   local hcur, hmin, hmax = self:GetValue(), self:GetMinMaxValues()
  4.   local hper = 0
  5.   if hmax > 0 then hper = hcur/hmax*100 end
  6.   self.value:SetText(hper.."%")
  7. end
  8.  
  9. --new value string
  10. plate.healthbar.value = plate.healthbar:CreateFontString(nil,"BORDER")
  11. plate.healthbar.value:SetPoint("RIGHT", 0, 0)
  12. plate.healthbar.value:SetFont(STANDARD_TEXT_FONT,11,"THINOUTLINE")
  13. plate.healthbar:HookScript("OnValueChanged", UpdateHealth)
  14. UpdateHealth(plate.healthbar)
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 10-22-13 at 01:42 AM.
zork is offline Report comment to moderator  
Reply With Quote
Unread 10-21-13, 04:25 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 61
Uploads: 0
help with percentage function

Hi zork, can you help with percentage health function creation? I would like add this option to rnameplates2

Thx in advance
Last edited by Dhaern : 10-21-13 at 04:25 PM.
Dhaern is offline Report comment to moderator  
Reply With Quote
Unread 10-21-13, 01:16 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1348
File comments: 3321
Uploads: 86
That is normal. I only scan for nameplates once per second. That's why. Once the nameplate is parsed it will stay nice and shiny.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 10-21-13 at 01:17 PM.
zork is offline Report comment to moderator  
Reply With Quote
Unread 10-21-13, 12:43 PM  
Cashtro
A Defias Bandit
 
Cashtro's Avatar

Forum posts: 3
File comments: 67
Uploads: 1
Hello Zork,

I love your nameplate only i keep getting issues with it.

In the beginning i see blizzard nameplates then in a second it changes to your nameplates.

It's like he needs to load or something

Could u please look at it?

Thanks
__________________
Cashtro is offline Report comment to moderator  
Reply With Quote
Unread 10-12-13, 09:40 AM  
nuubcakeboss
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Big and fat nameplates

If you are having issues with "exanding" nameplates just use this:
Code:

/console bloatnameplates 0
/console bloatthreat 0

^
Having this issue.
Doesnt Work... any fix for this please?
nuubcakeboss is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: