WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Released AddOns (https://www.wowinterface.com/forums/forumdisplay.php?f=9)
-   -   ySeries (https://www.wowinterface.com/forums/showthread.php?t=55641)

Yukyuk 08-14-17 09:20 AM

ySeries
 
ySeries

ySeries is a series of small independant addons.
They alle have in common that they are fully movable and that they can be placed anywhere on your screen.
When in combat the frames are locked to prevent accidental movement of the frames.

The availabe addons are:
  • yStrength, use /ystr or /yStrength to hide or show the frame
  • yStamina, use /sta or /yStamina to hide or show the frame
  • yAgility, use /yagi or /yAgility to hide or show the frame
  • yIntellect, use /yint or /yIntellect to hide or show the frame
  • yArmor, use /yarm or /yArmor or yArmour to hide or show the frame (september 5, 2017, updated juli 19, 2018)
  • yExperiencePoints, use /yXP or /yExperiencePoints to hide or show the frame (october 9, 2017) Classic version(august 28, 2019)
  • yGuildTabard, use /yGT or /yGuildTabard to hide or show the frame (october 15, 2017)
  • yPlayerHP, use /yPHP or /yPlayerHP to hide or show the frame (may 10, 2019)
  • yTargetHP, use /yTHP or /yTargetHP to hide or show the frame (may 10, 2019)
  • yCriticalStrike, use /yCS or /yCriticalStrike to hide or show the frame (february 17, 2020)

If you want to modify the the look of any of these addons, modify the constants in the lua file.
You can use any text editor (I use Notepad++).

Lua Code:
  1. -------------------------------------------------------------------------------
  2. --  Constants
  3. -------------------------------------------------------------------------------
  4. local ADDON_WIDTH       = 124           -- Width of the addon frame
  5. local ADDON_HEIGHT      = 24            -- Height of the addon frame
  6. local ADDON_TEXT        = 11            -- Text color, refers to cfg.colors
  7. local ADDON_BORDER      = 11            -- Border color, refers to cfg.colors  
  8. local ADDON_BACKGROUND  = 4             -- Background color, refers to cfg.colors
  9. local ADDON_SPACE       = 5             -- Distance in pixels between the top of the frame and the top of the text
  10. local ADDON_STAT        = "Strength:"   -- Description of the statistic

Yukyuk 09-05-17 02:46 AM

Version history
 
This is the version history of the ySeries.

August 28, 2019
- Added yExperiencePoints Classic

May 10, 2019
- Updated the TOC of the ySeries (finally) and better placement of the text inside the frame.

Juli 19, 2018:
- Updated yArmour for version 8.0.1 (BfA)

October 15, 2017:
- Added yGuildTabard

October 9, 2017:
- Added yExperiencePoints

September 5, 2017:
- Added yArmor
- Added tooltips the existing addons.

August 14, 2017:
- Initial release of the ySeries.

Yukyuk 09-05-17 02:47 AM

ySeries example
 
2 Attachment(s)
An example of the ySeries.

Ammako 09-05-17 08:49 AM

What if, instead of three separate addons for the primary stats, you had just one for primary stats that dynamically changed depending on which spec you're in?

Using GetSpecialization() you can get the spec ID for the spec the player is currently in, and with GetSpecializationInfo() you can know which primary stat is used (without having to hardcode in a list.)

Code:

local _, _, _, _, _, primaryStat = GetSpecializationInfo(GetSpecialization())
(GetSpecializationInfo() info isn't quite up-to-date on wowprogramming; it does not return background anymore.)
This will output 1 (strength), 2 (agility) or 4 (intellect) into primaryStat, which are the same as the LE_UNIT_STAT_STRENGTH, LE_UNIT_STAT_AGILITY and LE_UNIT_STAT_INTELLECT constants.


That way you only need to have one addon installed and it'll cover whichever primary stat you'd be interested in seeing for your current character. Also only need to maintain 1 addon if it needs to be worked on and updated :p

Yukyuk 09-05-17 09:29 AM

@Ammako,

ySeries started as a simple addon for my fury warrior, as I wanted to display his current strenght.
Then I though about dispaying all his main stats (even if they are not relevant).
So I made the four independant ones (yArmor was made later).

And yes I thought about making just one addon whith a simple menu where you could choose which stats to display.
But I liked the fact that these addons are really small (only 11k or so).
So I decided to make several small addons instead of one bigger one. :)

And I know how to use GetSpecialization(), GetSpecializationRole() and GetSpecializationInfo(), thay are used in the tooltips.
(and "how to use" means in this case copied from PaperDollFrame.lua :D).

myrroddin 09-05-17 10:16 AM

Wowprogramming has been dead for a couple of years now, as Cladhaire has moved on to other projects in his life and career.

Reference Wowpedia.org for up-to-date API documentation.

Yukyuk 10-15-17 01:48 AM

yGuildTabard
 
1 Attachment(s)
yGuildTaberd has been added to the ySeries.

Choose from a square or a circular guild tabard.
Also works when you are (not yet) in a guild.

Use the slash commands /yGT or /yGuildTabard to show or hide the Guild Tabard.
Use the slash commands /ygt square and /ygt circle to change the Guild Tabard.

After changing the game needs to be reloaded for the change take effect.

Yukyuk 05-10-19 05:55 AM

yPlayerHP and yTargetHP
 
2 Attachment(s)
yPlayerHP and yTargetHP have been added to the ySeries.
Enjoy :)

Yukyuk 08-28-19 11:47 AM

yExperiencePointsClassic
 
I added yExperiencePointsClassic to the ySeries.

Yukyuk 02-17-20 09:56 AM

yCriticalStrike
 
As requested by a user, yCriticalStrike added to ySeries.


All times are GMT -6. The time now is 02:57 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI