Nameplacer

What's Nameplacer?

Nameplacer is a very simple addon that allows the player to save some basic (namely vertical) settings about where a unit's nameplate should be positioned.

Why Nameplacer?

Almost every nameplate addon has some settings related to nameplates vertical positioning. Unfortunately even the most advanced ones have some generic settings which do not cover the huge variety of creatures and creature sizes found in WildStar. Nameplacer it's here to give the player the opportunity to save a specific setting for each and every single unit (not just creatures).

How does it work?

Nameplacer does nothing on its own. It simply permanently stores some information about a list of units. The player can choose to add/remove a unit to/from the list or change the current settings. It's up to your favorite  nameplate addon make use of these information and display the nameplate accordingly to your settings.

OK, but how do I (the player) use it?

There are 2 ways to create/edit a setting:

 

1) Type /nameplacer in the chat.

This will bring up the configuration interface. It's initialized with the name of the unit currently targeted but you can manually type the unit's name that you want to  configure.

There are 3 different columns "Chest", "Bottom", "Custom".

As per name says, if you put the unit under one of these 3 categories you're creating a settings entry for all the units with the same name and your nameplate addon can use that information to properly place the nameplates according to your preferences.

 

2) Use one of the following macros:

 

  • Custom settings with default value (50 pixels)
    /eval Apollo.GetAddon("Nameplacer"):AddTargetedUnitCustom()
  • Chest placement (beware, some units may have a weird chest anchor point)
    /eval Apollo.GetAddon("Nameplacer"):AddTargetedUnitChest()
  • Bottom placement (beware, some units, especially the floating ones, may have a weird bottom anchor point)
    /eval Apollo.GetAddon("Nameplacer"):AddTargetedUnitBottom()

OK, but how do I (the developer) use it?

 

Nameplacer is firing one specific event when a unit's setting are created/edited/removed:

Nameplacer_UnitNameplatePositionChanged

with 2 parameters:

 

1) strUnitName : a string corresponding to the name of the unit of which the settings are created/changed

2) tNameplatePositionSetting : a table containing the positioning settings

- nAnchorId : a number corresponding to the nameplate anchor point
CombatFloater.CodeEnumFloaterLocation.Chest
CombatFloater.CodeEnumFloaterLocation.Bottom
CombatFloater.CodeEnumFloaterLocation.Top

NOTE
When a unit's setting is deleted, Nameplacer will trigger a Nameplacer_UnitNameplatePositionChanged event with 

nAnchorId = CombatFloater.CodeEnumFloaterLocation.Top

- nVerticalOffset : a number of pixels corresponding to the vertical offset . It's relative to the unit's bottom anchor point.


In order to hook Nameplacer into your nameplate addon you'll probably want to do something like this:

self.nameplacer = Apollo.GetAddon("Nameplacer")

 

if (self.nameplacer) then
    Apollo.RegisterEventHandler("Nameplacer_UnitNameplatePositionChanged", "OnNameplatePositionSettingChanged", self)
end

In order to handle the new event you may want to have a function like this:

function NameplateAddon:OnNameplatePositionSettingChanged(strUnitName, tNameplatePositionSetting)
-- Do stuff
end

Nameplacer exposes a function called: 

 

function Nameplacer:GetUnitNameplatePositionSetting(strUnitName)



Accepting one parameter:

strUnitName : a string representing the name of the unit


and returning the same table as before:

tNameplatePositionSetting : a table containing the positioning settings

- nAnchorId : a number corresponding to the nameplate anchor point
CombatFloater.CodeEnumFloaterLocation.Chest
CombatFloater.CodeEnumFloaterLocation.Bottom
CombatFloater.CodeEnumFloaterLocation.Top

 

- nVerticalOffset : a number of pixels corresponding to the vertical offset . It's relative to the unit's bottom anchor point.

What about the performance?

Nameplacer is basically just an indexed table and LUA handles and accesses tables pretty nicely. As long as you don't have hundreds of records it really should have any noticeable impact on your performance.

I'm sold! What are the nameplates addons that support Nameplacer?

These are the addons that currently support Namaplacer:

 

Download

File Name Status Version Downloads Date
v1.0.0 R API 11 3,119 01/01/2016
Nameplacer API16 Updating API16 Updating Updating
Nameplacer API15 Updating API15 Updating Updating
Nameplacer API14 Updating API14 Updating Updating
Nameplacer API13 Updating API13 Updating Updating
Nameplacer API12 Updating API12 Updating Updating
Nameplacer API 10 Updating API 10 Updating Updating
Nameplacer API 9 Updating API 9 Updating Updating
Nameplacer API 8 Updating API 8 Updating Updating
Nameplacer API 7 Updating API 7 Updating Updating
Nameplacer API 6 Updating API 6 Updating Updating
Nameplacer
Nameplacer

Dear youtuber!
Have you a channel youtube and want to bring your Video to quality visitors?
Do you want your video to appear on our website?
Do you want to become partner with us?
Just 3 steps to become our partner:
Step 1: Make video review for mods, addons, plugins, ... which you like
Step 2: Upload this video to youtube and our link to your video description
Step 3: Send the youtube video link via message to http://fb.com/9lifehack or leave a comment in the post. We will add your video in the our post, it will help you have more view.
JOIN to get more youtube view with us!!!!

Related Posts

Smarty Productivity Happiness

9LifeHack.com - make things smart