Download
(1 Kb)
Download
Updated: 12/06/21 11:32 AM
Compatibility:
Deadlands (7.2.5)
Updated:12/06/21 11:32 AM
Created:11/10/21 03:53 PM
Monthly downloads:34
Total downloads:2,837
Favorites:3
MD5:
Categories:Miscellaneous, Discontinued & Outdated
Character Age
Version: 1.0.3
by: MrPikPik [More]
With the introduction of account wide achievements, this will not be able to show you your characters age anymore. RIP

You cannot remember when you created a character?
With this addon simply type "/age" into the chat and it will tell you when you approximately created your character!

It's impossible to know when a character was created exactly, but this addon will approximate it by going trough your archievements and finding the first achievement you've earned. Since you most likely have gotten an achievement on the day your created the character, it will assume that was the creation day
1.0.3
- No longer parses the date from a string, but gets the timestamp now properly

1.0.2
- Initial Release
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0.2
1kB
11/10/21 03:53 PM


Post A Reply Comment Options
Unread 12/07/21, 11:03 AM  
ChrisK

Forum posts: 0
File comments: 176
Uploads: 0
Love the update! Fantastic!

"Your character ... exists since March 30th 2014, based on your first achievement: [Superior Ransacker]"

EN client
Report comment to moderator  
Reply With Quote
Unread 12/06/21, 06:30 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Originally Posted by MrPikPik
I tried using the "GetAchievementTimestamp()" function fromt he API but it seems to be bugged (return value should be a integer, but it returns a float, internally the bits get cast to the wrong datatype, I already reported the issue), but once it gets fixed, the addon will function properly
This is no bug as sirinsidator alread answered to your bug report, it's a 64bit number and needs a "to safe string" cast.


Originally Posted by MrPikPik
As for checking client language, that wouldn't be a good idea. The date format used is independend of the game language, it comes from the locale used in Windows. Some people play the game in English but don't have English date formats selected in their OS
This is new to me. I always get the same results no matter what my OS' date format is set to? e.g. my OS uses german date dd.mm.yyyy and I'm playing with the de language set to the client.
Date format ingame is: dd.mm.yyyy

If I change to client language en ingame via /script SetCVar("language.2", "en") my date format ingame is yyyy-mm-dd.
if I change to other languages it changes as well.
Changed my OS date format to American English.
But ingame it always formats based on the game's client language for me afai can tell IF the return value is not a timestamp but a "time string"!

If the return value is a timestamp you are able to build your own format via os.date:
Code:
local myTimeStamp = 906000490
local myDateTimeTable = os.date("*t", myTimeStamp)
--produces the table
 -- myDateTimeTable  =  {year = 1998, month = 9, day = 16, yday = 259, wday = 4,
 --     hour = 23, min = 48, sec = 10, isdst = false}
You can use myDateTimeTable.year etc. to create your, or parse your own needed results then.
Last edited by Baertram : 12/06/21 at 06:34 PM.
Report comment to moderator  
Reply With Quote
Unread 11/17/21, 03:59 PM  
MrPikPik
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 34
Uploads: 27
Originally Posted by Baertram
Maybe this helps: https://github.com/esoui/esoui/blob/...obals/time.lua

ZOs time format functions.
Else try LibDateTime for your use-case.
Or simply use os.date() to format the time. But I guess if you read it from the achievement's text it will always be in the format of the game client.
You could only refer to the used format by using GetCVar("language.2") to get the lang string like "en", "de", "fr", "ru" and then define the standard offsets for the languages where you need to read the day, month and year from.
Thanks for the suggestions Baertram.
I tried using the "GetAchievementTimestamp()" function fromt he API but it seems to be bugged (return value should be a integer, but it returns a float, internally the bits get cast to the wrong datatype, I already reported the issue), but once it gets fixed, the addon will function properly.

As for checking client language, that wouldn't be a good idea. The date format used is independend of the game language, it comes from the locale used in Windows. Some people play the game in English but don't have English date formats selected in their OS
Report comment to moderator  
Reply With Quote
Unread 11/12/21, 02:00 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Maybe this helps: https://github.com/esoui/esoui/blob/...obals/time.lua

ZOs time format functions.
Else try LibDateTime for your use-case.
Or simply use os.date() to format the time. But I guess if you read it from the achievement's text it will always be in the format of the game client.
You could only refer to the used format by using GetCVar("language.2") to get the lang string like "en", "de", "fr", "ru" and then define the standard offsets for the languages where you need to read the day, month and year from.
Last edited by Baertram : 11/12/21 at 02:02 PM.
Report comment to moderator  
Reply With Quote
Unread 11/12/21, 02:14 AM  
MrPikPik
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 34
Uploads: 27
Re: Great Idea!

Originally Posted by ChrisK
[T]he following error pops up upon typing /age

Any suggestions?
Thank you for bringing this up! It seems like the addon parsed the values wrong. If I'd have a guess, you're system has dates in MM-DD-YYYY format and ESO also uses it therefore too. On my system I have the DD-MM-YYYY format so the order I programmed in works.

I'll try and see if I can detect this in ESO and update the addon.


Oh and as a bonus: From the values in the error message I can tell you your character has earned its first achievement on June 17th 2014 at 11:24pm
Report comment to moderator  
Reply With Quote
Unread 11/11/21, 08:19 PM  
ChrisK

Forum posts: 0
File comments: 176
Uploads: 0
Great Idea!

Love the idea for your Character Age addon, and thanks for creating it!

However, the following error pops up upon typing /age

Any suggestions?


Code:
error in getting time for year(2114), month(17), day(5), hours(23), minute(24), and second(36)
|rstack traceback:
[C]: in function 'os.time'
user:/AddOns/CharacterAge/CharacterAge.lua:23: in function 'GetOldestAchievement'
user:/AddOns/CharacterAge/CharacterAge.lua:40: in function 'fn'
/EsoUI/Ingame/SlashCommands/SlashCommands_Shared.lua:204: in function 'DoCommand'
/EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1807: in function 'SharedChatSystem:SubmitTextEntry'
/EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:2532: in function 'ZO_ChatTextEntry_Execute'
ZO_ChatWindowTextEntryEditBox_Enter:3: in function '(main chunk)'
(tail call): ?
(tail call): ?
Other loaded addons:

Addon Selector
LibDialog

DebugLogViewer (so I could copy the error details)
LibDebugLogger
LibGetText
LibAddonMenu-2.0
LibCustomMenu


The debug log is from a character created in 2014, but I've tried with an alt created in 2021 and it generates a similar error.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: