--these are the images shown in the nameplate of the current target, they are placed in the left and right side of the health bar, scripts can add more options
--if the coords has 2 tables, it uses two textures attach in the left and right sides of the health bar
--if the coords has 4 tables, it uses 4 textures attached in top left, bottom left, top right and bottom right corners
--types of codes for each script in the Scripting tab (do not change these inside scripts)
Plater.CodeTypeNames={--private
[1]="UpdateCode",
[2]="ConstructorCode",
[3]="OnHideCode",
[4]="OnShowCode",
[5]="Initialization",
}
--hook options
--types of codes available to add in a script in the Hooking tab
Plater.HookScripts={--private
"Initialization",
"Deinitialization",
"Constructor",
"Destructor",
"Nameplate Created",
"Nameplate Added",
"Nameplate Removed",
"Nameplate Updated",
"Cast Start",
"Cast Update",
"Cast Stop",
"Target Changed",
"Raid Target",
"Enter Combat",
"Leave Combat",
"Player Power Update",
"Player Talent Update",
"Health Update",
"Zone Changed",
"Name Updated",
"Load Screen",
"Player Logon",
"Receive Comm Message",
"Send Comm Message",
"Option Changed",
"Mod Option Changed",
}
Plater.HookScriptsDesc={--private
["Initialization"]="Executed once for the mod every time it is loaded or compiled. Used to initialize the global mod environment 'modTable'.",
["Deinitialization"]="Executed once for the mod every time it is unloaded. Used to de-initialize the global mod environment 'modTable' and the mod.",
["Constructor"]="Executed once when the nameplate run the hook for the first time.\n\nUse to initialize configs in the environment.\n\nAlways receive unitFrame in 'self' parameter.",
["Destructor"]="Run when the hook is Disabled or unloaded due to Load Conditions.\n\nUse to hide all frames created.\n\n|cFF44FF44Run on all nameplates shown in the screen|r.",
["Nameplate Created"]="Executed when a nameplate is created.\n\nRequires a |cFFFFFF22/reload|r after changing the code.",
["Nameplate Added"]="Run after a nameplate is added to the screen.",
["Nameplate Removed"]="Run when the nameplate is removed from the screen.",
["Nameplate Updated"]="Run after the nameplate gets an updated from Plater.\n\n|cFFFFFF22Important:|r doesn't run every frame.",
["Cast Start"]="When the unit starts to cast a spell.\n\n|cFFFFFF22self|r is unitFrame.castBar",
["Cast Update"]="When the cast bar receives an update from Plater.\n\n|cFFFFFF22Important:|r doesn't run every frame.\n\n|cFFFFFF22self|r is unitFrame.castBar",
["Cast Stop"]="When the cast is finished for any reason or the nameplate has been removed from the screen.\n\n|cFFFFFF22self|r is unitFrame.castBar",
["Target Changed"]="Run after the player selects a new target.\n\n|cFF44FF44Run on all nameplates shown in the screen|r.",
["Raid Target"]="A raid target mark has added, modified or removed (skull, cross, etc).\n\n|cFF44FF44Run on all nameplates shown in the screen|r.",
["Enter Combat"]="Executed shortly after the player enter combat.\n\n|cFF44FF44Run on all nameplates shown in the screen|r.",
["Leave Combat"]="Executed shortly after the player leave combat.\n\n|cFF44FF44Run on all nameplates shown in the screen|r.",
["Player Power Update"]="Run when the player power, such as combo points, gets an update.\n\n|cFF44FF44Run only on the nameplate of your current target|r.",
["Player Talent Update"]="When the player changes a talent or specialization.\n\n|cFF44FF44Run on all nameplates shown in the screen|r.",
["Health Update"]="When the health of the unit changes.",
["Zone Changed"]="Run when the player enter into a new zone.\n\n|cFF44FF44Run on all nameplates already created, on screen or not|r.",
["Name Updated"]="Executed when the name of the unit shown in the nameplate receives an update.",
["Load Screen"]="Run when a load screen finishes.\n\nUse to change settings for a specific area or map.\n\n|cFF44FF44Do not run on nameplates|r.",
["Player Logon"]="Run when the player login into the game.\n\nUse to register textures, indicators, etc.\n\n|cFF44FF44Do not run on nameplates,\nrun only once after login\nor /reload|r.",
["Receive Comm Message"]="Executed when a comm is received, a comm can be sent using Plater.SendComm(payload) in 'Send Comm Message' hook.",
["Send Comm Message"]="Executed on an internal timer for each mod. Used to send comm data via Plater.SendComm(payload).",
["Option Changed"]="Executed when a option in the options panel has changed",
["Mod Option Changed"]="Executed when a option in the mod options panel has changed",
}
--all functions below can be overridden by scripts, hooks or any external code
--this allows the user to fully modify Plater at a high level
--how to override a function:
--create a script in the hooking tab, add a 'Constructor' and a 'Nameplate Created'
--copy the entire function from this file and paste in the constructor, hit save.
--then when the first nameplate appears in the screen the function get rewritten
--for fast debugging is recomended to paste the function in a 'Nameplate Updated' hook so just by saving the script (SHIFT + ENTER) you get the function to update immediately.
Plater.CanOverride_Functions={
RefreshDBUpvalues=true,--refresh cache
RefreshDBLists=true,--refresh cache
UpdateAuraCache=true,--refresh cache
CreateShowAuraIconAnimation=true,--creates the animation for aura icons played when they are shown
GetHealthCutoffValue=true,--check if the character has a execute range and enable or disable the health cut off indicators
CheckRange=true,--check if the player is in range of the unit
GetSpellForRangeCheck=true,--get a spell to be used in the range check
SetFontOutlineAndShadow=true,--apply the outline and shadow of a text
UpdatePersonalBar=true,--update the personal bar
UpdateResourceFrame=true,--anchors the resource frame (soul shards, combo points, etc)
UpdateCastbarTargetText=true,--update the settings of the cast target (font color, size, etc)
UpdateSpellNameSize=true,--receive a fontString and set the length of the spell name size in the cast bar
QuickHealthUpdate=true,--update the health bar during NAMEPLATE_ADDED
OnUpdateHealth=true,--when the healthbar get a new health value
OnUpdateHealthMax=true,--when the maxhealth of the healthbar get updated
UpdateIconAspecRatio=true,--adjust the icon texcoords depending on its size
FormatTime=true,--get a number and return it formated into time, e.g. 63 return "1m" 1 minute
FormatTimeDecimal=true,--get a number and return it formated into time with decimals below 10sec, e.g. 9.5 return "9.5s"
ResetAuraContainer=true,--reset the aura container to be ready to a refresh
TrackSpecificAuras=true,--refresh the aura container using a list of auras to track
UpdateAuras_Manual=true,--start an aura refresh for manual aura tracking
UpdateAuras_Automatic=true,--start an aura refresh for automatic aura tracking
UpdateAuras_Self_Automatic=true,--start an aura refresh on the personal bar nameplate
ColorOverrider=true,--control which color que nameplate will have when the Override Default Colors are enabled
FindAndSetNameplateColor=true,--Plater tries to find a color for the nameplate
SetTextColorByClass=true,--adds the class color into a text with scape sequence
UpdatePlateSize=true,--control the size of health, cast, power bars
SetPlateBackground=true,--set the backdrop when showing the nameplate area
UpdateNameplateThread=true,--change the nameplate color based on threat
UpdateTargetHighlight=true,--adjust the highlight on the player target nameplate
UpdateTargetIndicator=true,--adjust the target indicator on the player target nameplate
UpdateLifePercentVisibility=true,--control when the life percent text is shown
UpdateLifePercentText=true,--update the health shown in the nameplate
AddGuildNameToPlayerName=true,--adds the guild name into the player name
UpdateUnitName=true,--update the unit name
UpdateUnitNameTextSize=true,--controls the length of the unit name text
UpdateBorderColor=true,--update the color of the border
UpdatePlateBorderThickness=true,--adjust how thick is the border around the health bar
UpdatePlateRaidMarker=true,--update the raid marker in the nameplate
UpdateIndicators=true,--check which indicators will be shown in the nameplate (rare, elite, etc)
AddIndicator=true,--adds an indicator
ClearIndicators=true,--clear all indicators in the nameplate
GetPlateAlpha=true,--get the absolute alpha amount for the nameplate (when in range)
CheckHighlight=true,--check if the mouse is over the nameplate and show the highlight
EnableHighlight=true,--enable the highlight check
DisableHighlight=true,--disable the highlight check
GetUnitType=true,--return if an unit is a pet, minor or regular
AnimateLeftWithAccel=true,--move the health bar to left when health animation is enabled
AnimateRightWithAccel=true,--move the health bar to right when health animation is enabled
IsQuestObjective=true,--check if the npc from the nameplate is a quest mob
}
--store functions and members which can be overridden by scripts
Plater.CanOverride_Members={
TargetIndicators=true,--table with all options for target indicators
TargetHighlights=true,--table with all options for target highlight
SparkTextures=true,--table with all textures available for castbar sparks
CooldownEdgeTextures=true,--table with all textures available for cooldown edges
AurasHorizontalPadding=true,--space in pixels between each row of buffs
WideIconCoords=true,--used on buff special icons, are the texcoordinates when using wide icons
BorderLessIconCoords=true,--used on buff special icons, when not using wide icons
PlayerIsTank=true,--for aggro checks, if true the function will consider the player as tank
CombatTime=true,--GetTime() of when the player entered in combat, affect aggro animations
CurrentEncounterID=true,--store the current encounter ID if in combat and fighiting a boss
LatestEncounter=true,--store time() from the latest ENCOUNTER_END
ZoneInstanceType=true,--from GetInstanceInfo zone type, can be party, raid, arena, pvp, none
ZonePvpType=true,--from GetZonePVPInfo
PlayerGuildName=true,--name of the player's guild
SpellForRangeCheck=true,--spell name used for range check
PlayerGUID=true,--store the GUID of the player
PlayerClass=true,--store the name for the player (non localized)