Quantcast
Download
(6 Kb)
Download
Updated: 08/23/21 08:13 AM
Pictures
File Info
Compatibility:
Waking Flame (7.1.5)
Blackwood (7.0.5)
Updated:08/23/21 08:13 AM
Created:03/13/19 02:33 AM
Monthly downloads:12,865
Total downloads:755,364
Favorites:404
MD5:
7.1.5
LibPhinixFunctions  Popular! (More than 5000 hits)
Version: 16
by: Phinix [More]
LibPhinixFunctions

HELP REQUESTED! Creating, maintaining, and providing patch-day compatibility with in-game troubleshooting and prompt feedback for so many projects really is a full time job. The support I receive from the community is what keeps me going, and it is the only form of compensation I receive. Not only will your contribution enable more feature additions and personalized support for my existing projects, but it will sponsor new exciting content in the future, which will remain now and forever free for all to enjoy! There are several ways you can contribute, either directly through Paypal, by subscribing to my Patreon, or through the GoFundMe page I set up for my dad. All contributions are deeply appreciated and sorely needed. Thanks from our family to yours, and I hope something I made helps enhance your enjoyment of the Elder Scrolls Online.

This simple library consolidates various useful tricks and techniques I have picked up over my years of LUA coding and used in various of my addon projects. New functions will be included as needed/requested.

To use the library first add it to your addon manifest:
## DependsOn: LibPhinixFunctions>=9

Then define it somewhere in your addon where you want to use it:
local PF = LibPhinixFunctions

Functions can them be called like so:
(Here 'color' and 'text' would be value you pass the function. See below for more info.)
PF.TColor(color, text)


Chat commands:

/pfdebug on -Enables debug text output.

/pfdebug off -Disables debug text output (default ).



CURRENT AVAILABLE FUNCTIONS:


PF.SubExtendedASCII(iString) --Convert accented letters to standard ASCII equivalent using extended ASCII lookup table.

Warning: Spoiler

PF.Hex2RGB(hex) --Gets { r=r, g=g, b=b, a=a } table for LibAddonMenu colopicker from hex color value.

Warning: Spoiler

PF.RGB2Hex(rgb) --Gets hex color format string from LibAddonMenu { r=r, g=g, b=b, a=a } colopicker or { [1]=r, [2]=g, [3]=b, [4]=a } saved variable table.

Warning: Spoiler

PF.TColor(color, text) --Wraps the color tags with the passed color around the given text.

Warning: Spoiler

PF.Contains(nTable, element) --Determined if a given element exists in a given table.

Warning: Spoiler

PF.GetKey(nTable, element, all) --Returns the table key(s) that contains a given element value.

Warning: Spoiler

PF.CountKeys(nTable) --Count the key/value pairs in a hashed table (when #table returns 0).

Warning: Spoiler

PF.Round(number, decimals) --Round number to decimals number of places.

Warning: Spoiler

PF.GetDateTime(t12, dUSA, sepH, nCap) --Generates a custom formatted time/date string (with options).

Warning: Spoiler

PF.GetSorted(sTable, sMode, sFunc) --Returns an indexed table of sorted values based on selection (key/value/sub-value).

Warning: Spoiler



I hope you find some of these shortcuts helpful!




Gold donations are always welcome!
PC NA: @IllusoryID



Click here to view my other addons.
Version 16:
- Updated API for Waking Flame update.

Version 15:
- Updated API and version number to Blackwood.
- Removed unnecessary language format code (duplicate of ZOS function).
- Minor code maintenance.

Version 14:
- Updated API for Flames of Ambition.

Version 13:
- Updated API for Stonethorn.

Version 12:
- Slightly modified extended ASCII looking to account for the game treating non-standard ASCII as punctuation and thus stripping letter from non-English clients when using LUA string functions like gsub('%p','') etc.

Version 11:
- Added new function 'SubExtendedASCII' which will accept an input string and return it with extended ASCII accented characters replaced with standard ASCII non-accented equivalents.
- Updated API version for Greymoor.

Version 10:
- Incremented version to avoid possible issues with other versions floating around.

Version 9:
- Updated API for Harrowstorm.
- Properly converted library to not require LibStub.
- Removed deprecated functions & did some maintenance.

Version 8:
- Updated API for Dragonhold.

Version 7:
- Updated API for Scalebreaker.

Version 6:
- API bump for Elsweyr and properly classified as library in manifest.

Version 5:
- Added support for both LibAddonMenu { r=r, g=g, b=b, a=a } colopicker or { [1]=r, [2]=g, [3]=b, [4]=a } saved variable table input format to RGB2Hex function.

Version 4:
- Minor corrections to the time function.
- Modified RGB2Hex to account for out-of-order rgba table input.

Version 3:
- Added new option to sort by custom LUA table.sort function to GetSorted.

Version 2:
- Changed function notation to avoid potential value mismatches.
- Updated safety checks for nil values and other precautions.
- Updated comments to correct typos and better describe usage scenarios.
- Added current status of debug option to no-option /pfdebug command.

Version 1:
- Initial release.
Post A Reply Comment Options
Unread 07/29/21, 12:53 PM  
AngryNord

Forum posts: 3
File comments: 11
Uploads: 0
Re: Re: Re: Re: Errors...

Originally Posted by Phinix
Originally Posted by AngryNord
Anyone else keep getting constant UI errors with the latest version of this, to the point of making the game unplayable? Disappeared again after removing this add-on + Master Recipe List which was the only addon I had that depend on this
A redundant language formatting function was removed from this library in the last update, and the code of several of my other addons has been changed where they previously used it.

If you updated this library but are still using old versions my other addons (Master Recipe List for example), then it will generate errors as it is attempting to use the function that was removed.

The solution is to ensure all your addons are up to date as this has been resolved in the latest versions of all my addons. I highly recommend downloading Minion (the official esoui.com addon manager) which will let you update all your installed addons easily with the push of a button.

Otherwise it is easy to miss some of them and situations like this can and do emerge from time to time.
Yes, looks like I had overlooked the update to Master Recipe, I had the 1.56.59 version
Last edited by AngryNord : 07/29/21 at 01:49 PM.
Report comment to moderator  
Reply With Quote
Unread 07/29/21, 12:17 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 165
File comments: 1356
Uploads: 31
Re: Re: Re: Errors...

Originally Posted by AngryNord
Anyone else keep getting constant UI errors with the latest version of this, to the point of making the game unplayable? Disappeared again after removing this add-on + Master Recipe List which was the only addon I had that depend on this
A redundant language formatting function was removed from this library in the last update, and the code of several of my other addons has been changed where they previously used it.

If you updated this library but are still using old versions my other addons (Master Recipe List for example), then it will generate errors as it is attempting to use the function that was removed.

The solution is to ensure all your addons are up to date as this has been resolved in the latest versions of all my addons. I highly recommend downloading Minion (the official esoui.com addon manager) which will let you update all your installed addons easily with the push of a button.

Otherwise it is easy to miss some of them and situations like this can and do emerge from time to time.
Last edited by Phinix : 07/29/21 at 12:18 PM.
Report comment to moderator  
Reply With Quote
Unread 07/29/21, 12:12 PM  
Anceane
 
Anceane's Avatar

Forum posts: 274
File comments: 913
Uploads: 0
Re: Re: Re: Errors...

Originally Posted by AngryNord
Anyone else keep getting constant UI errors with the latest version of this, to the point of making the game unplayable? Disappeared again after removing this add-on + Master Recipe List which was the only addon I had that depend on this
Would be probably better if you explain or post which errors you have
__________________
Report comment to moderator  
Reply With Quote
Unread 07/29/21, 11:03 AM  
AngryNord

Forum posts: 3
File comments: 11
Uploads: 0
Re: Re: Errors...

Anyone else keep getting constant UI errors with the latest version of this, to the point of making the game unplayable? Disappeared again after removing this add-on + Master Recipe List which was the only addon I had that depend on this
Last edited by AngryNord : 07/29/21 at 11:35 AM.
Report comment to moderator  
Reply With Quote
Unread 03/28/20, 02:07 AM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 165
File comments: 1356
Uploads: 31
Re: Errors...

Originally Posted by Shadowshire
Originally Posted by Baertram
Version 9 with LibStub support but also with global variable
LibPhinixFunctions
-> SavedVariables were renamed to LibPhinixFunctions_SV
Both ESO Master Recipe List and SALTI use LibPhinixFunctions -- and respective UI errors are displayed for each of the two add-ons immediately after the character appears on the HUD. The .../Saved Variables folder currently contains a file named LibPhinixFunctions.lua. It does not contain one named LibPhinixFunctions_SV. Please advise.
I just re-uploaded after incrementing the version number to 10, which should override any other versions out there.

I looked at Baertram's fix he made while I was AFK from modding and it doesn't seem like it should cause problems, but still being dependent on LibStub is asking for compatibility trouble.

The new version I just uploaded does not require LibStub. Please let me know if you still experience errors after updating.
Last edited by Phinix : 03/28/20 at 12:43 PM.
Report comment to moderator  
Reply With Quote
Unread 03/17/19, 04:59 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 3718
File comments: 4539
Uploads: 68
Yep, sorry have not seen your lib earlier.
This changed about major 2 patches ago I think.
Be sure to only use an integer value as ##AddOnVersion:.
No decimal places!
e.g.
##AddOnVersion: 1
##AddOnVersion: 11 -- version 1.1 in other notation

##AddOnVersion: 1.1 won't load!

Originally Posted by Phinix
Originally Posted by Baertram
Not sure if you knew that but you can stiop using LibStub with new libraries:
You could simply use the games ##AddOnVersion: <signed integer> tag now.
The highest version will be loaded, all other ignored (like LibStub does).
You only need a global variable for your lib defined like LibPhinixFunctions = LibPhinixFunctions or {} to be safe.
Oh, when did that change? Thanks for the info!

The only pain now is I have to go back and change the "local PF = LibStub('LibPhinixFunctions')" to "local PF = LibPhinixFunctions" in about a dozen addons.
Report comment to moderator  
Reply With Quote
Unread 03/17/19, 04:50 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 165
File comments: 1356
Uploads: 31
Originally Posted by Baertram
Not sure if you knew that but you can stiop using LibStub with new libraries:
You could simply use the games ##AddOnVersion: <signed integer> tag now.
The highest version will be loaded, all other ignored (like LibStub does).
You only need a global variable for your lib defined like LibPhinixFunctions = LibPhinixFunctions or {} to be safe.
Oh, when did that change? Thanks for the info!

The only pain now is I have to go back and change the "local PF = LibStub('LibPhinixFunctions')" to "local PF = LibPhinixFunctions" in about a dozen addons.
Last edited by Phinix : 03/17/19 at 04:56 PM.
Report comment to moderator  
Reply With Quote
Unread 03/17/19, 04:38 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 3718
File comments: 4539
Uploads: 68
Not sure if you knew that but you can stiop using LibStub with new libraries:
You could simply use the games ##AddOnVersion: <signed integer> tag now.
The highest version will be loaded, all other ignored (like LibStub does).
You only need a global variable for your lib defined like LibPhinixFunctions = LibPhinixFunctions or {} to be safe.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: