WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Nameplate hacking and unit IDs (https://www.wowinterface.com/forums/showthread.php?t=53439)

ObbleYeah 05-23-16 05:42 AM

i've always been about cutting back unnecessary extras where it seems relevant though, having a ton of information on hand is cool but also gets extremely messy and convoluted quickly with priorities getting buried under other heaps of data.

anyway what does the player frame have that the nameplate doesn't? a dropdown menu and your portrait texture?

just a pet project anyway, i don't think id ever do anything beyond questing with something so minimal

zork 05-23-16 05:50 AM

Nameplates are now normal unitframes with unitids. They have all the features as any other unitframe.

Resike 05-23-16 05:54 AM

Quote:

Originally Posted by ObbleYeah (Post 315128)
i've always been about cutting back unnecessary extras where it seems relevant though, having a ton of information on hand is cool but also gets extremely messy and convoluted quickly with priorities getting buried under other heaps of data.

anyway what does the player frame have that the nameplate doesn't? a dropdown menu and your portrait texture?

just a pet project anyway, i don't think id ever do anything beyond questing with something so minimal

I issue i see, is that the nameplate itself is moving around the screen while an unitframe have static position. I doubt any healer would like to heal off name plates.

lieandswell 05-23-16 06:06 AM

Quote:

Originally Posted by ObbleYeah (Post 315128)
having a ton of information on hand is cool but also gets extremely messy and convoluted quickly with priorities getting buried under other heaps of data.

I've always thought it's better to have the right information. "Fuckloads more of it" is often just UI spam. Minimal UIs can be really useful in raids if they maximize the attention you can give to encounter mechanics. For example: if you're not a healer or a raid leader, you don't really need to see the raid frames.

That said, in the example you posted I'd find the lines linking the mobs to the unit frames really distracting. Nameplate position on screen provides that information already in a much more intuitive, less intrusive way.

ObbleYeah 05-23-16 06:10 AM

Quote:

Originally Posted by lieandswell (Post 315133)
That said, in the example you posted I'd find the lines linking the mobs to the unit frames really distracting. Nameplate position on screen provides that information already in a much more intuitive, less intrusive way.

agreed — just exploring ways to have my cake and eat it too, benefiting play styles that prefer static frames like Resike states above. i also thought about a numbering system that puts '#1' next to the frame and above the head. but again: less intuitive, more cumbersome read process.

Resike 05-23-16 06:12 AM

Quote:

Originally Posted by lieandswell (Post 315133)
I've always thought it's better to have the right information. "Fuckloads more of it" is often just UI spam. Minimal UIs can be really useful in raids if they maximize the attention you can give to encounter mechanics. For example: if you're not a healer or a raid leader, you don't really need to see the raid frames.

That said, in the example you posted I'd find the lines linking the mobs to the unit frames really distracting. Nameplate position on screen provides that information already in a much more intuitive, less intrusive way.

I don't think that you would like to see the friendly nameplates as a dps in raid, since you don't want to target them accidentally. So your only options is the unitframes, you can disable whatever part that you don't want to see.

Also: I doubt it that you can sort nameplates by role/class/name/party etc.

ObbleYeah 05-23-16 06:14 AM

Quote:

Originally Posted by Resike (Post 315135)
Also: I doubt it that you can sort nameplates by role/class/name/party etc.

you should *technically* be able to do this right? these are the same compactunitframes that the raid frame uses after all

zork 05-23-16 06:19 AM

If I'm understanding things right a lot of stuff can be adjusted by editing the frame option tables?

https://github.com/Gethe/wow-ui-sour...rame.lua#L1615
https://github.com/Gethe/wow-ui-sour...lates.lua#L215
https://github.com/Gethe/wow-ui-sour...nels.lua#L1271
https://github.com/Gethe/wow-ui-sour...nels.xml#L1490

ObbleYeah 05-23-16 06:20 AM

yes, with the qualifier that a lot of those options are toggled off because the functions they involve aren't fully routed through the nameplates (hence my *technically*). smoothupdates throws out an error if enabled true for instance

Resike 05-23-16 08:03 AM

Quote:

Originally Posted by ObbleYeah (Post 315136)
you should *technically* be able to do this right? these are the same compactunitframes that the raid frame uses after all

It's the same and it's not. Tecnically it has very similar functions, however they are not secure. My bet would be why are they not secure because it would be really hard to animate and change other parameters if they would be.

Resike 05-23-16 08:46 AM

Also everyone is talking about that you can get the unit from the nameplate itself, but i did not managed to do this yet properly. Both the .unit values and the GetAttribute("unit") method returns "nameplate1-30" values, which is kinda useless. Or am i missing a function somewhere?

You can get the plate frame itself from the unit with C_NamePlate.GetNamePlateForUnit(), but how do you do this in the other way around?

ObbleYeah 05-23-16 08:51 AM

I've found issues with the .unit value too

the first argument for NAME_PLATE_UNIT_ADDED should be the base unitid

zork 05-23-16 09:25 AM

What do you mean useless? nameplate1 is a valid unitid like target or player.
You can compare units with UnitIsUnit or by using GetNamePlateForUnit.
http://wowprogramming.com/docs/api/UnitIsUnit
Quote:

local isSame = UnitIsUnit(unitId1, unitId2)
local nameplate = C_NamePlate.GetNamePlateForUnit(unitId)
Last but not least you can snapshot certain guids and match them against nameplate guids.
http://wowprogramming.com/docs/api/UnitGUID

Resike 05-23-16 10:08 AM

Quote:

Originally Posted by zork (Post 315147)
What do you mean useless? nameplate1 is a valid unitid like target or player.
You can compare units with UnitIsUnit or by using GetNamePlateForUnit.
http://wowprogramming.com/docs/api/UnitIsUnit


Last but not least you can snapshot certain guids and match them against nameplate guids.
http://wowprogramming.com/docs/api/UnitGUID

Except UnitIsUnit("nameplate1", "target") returns false even if you are targeting the unit with nameplate1.

Whats the point of the new system, if you get an alternative unitid then you need to get its guid then compare that with the a real unitids guid?

They should add a new attribute which would return the proper unitid GetAttribute("realUnit") which would return "target"/"pet"/"raid34" etc.

syncrow 05-23-16 10:20 AM

Quote:

Originally Posted by Resike (Post 315151)
Except UnitIsUnit("nameplate1", "target") returns false even if you are targeting the unit with nameplate1.

Try using UnitIsUnit("target", "nameplate1")

And check if you are targeting the nameplate with the unitID "nameplate1" and the unit currently using "NamePlate1"...

Getting a unitID from blizzards nameplates:
Lua Code:
  1. local unitID = nameplate.namePlateUnitToken

Quote:

Originally Posted by Resike (Post 315151)
Whats the point of the new system, if you get an alternative unitid then you need to get its guid then compare that with the a real unitids guid?

It works exactly the same if you target lets say raid24 ... raid 24 is a unitID, and target is also a unitID referring to the same unit if targeted...

So "nameplate#" can be the same unit as raid# / player / target / focus ....

zork 05-23-16 10:24 AM

Resike that has to work. Otherwise you found a bug.

*edit* Tried it. Works both ways.

Quote:

/run print(UnitIsUnit("nameplate3","target")) --returns true
/run print(UnitIsUnit("target","nameplate3")) --returns true
/run print(C_NamePlate.GetNamePlateForUnit("nameplate3"):GetName()) --returns NamePlate3
/run print(C_NamePlate.GetNamePlateForUnit("target"):GetName()) --returns NamePlate3

syncrow 05-23-16 10:34 AM

It should be possible to create a "enemy nameplate grid" using SecureUnitButtonTemplate / SecureHandlerStateTemplate with this conditions:

Lua Code:
  1. RegisterStateDriver(self, "visibility", "[@nameplate#, harm, exists] show; hide")

That would be really helpful for raid encounters like gorefiend....
So much possibilities *-*

zork 05-23-16 10:47 AM

Quote:

Originally Posted by syncrow (Post 315156)
@nameplate#

One million dollars.

syncrow 05-23-16 10:50 AM

Quote:

Originally Posted by zork (Post 315159)
One million dollars.

I don't really get it, but funny :D

lieandswell 05-23-16 10:55 AM

Quote:

Originally Posted by Resike (Post 315144)
Both the .unit values and the GetAttribute("unit") method returns "nameplate1-30" values, which is kinda useless.

Nameplate unitIDs work just fine for everything I've tried. But I did notice that while UNIT_HEALTH_FREQUENT gets called for all the nameplates, UNIT_HEALTH only works after you've targeted them once.


All times are GMT -6. The time now is 04:44 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI