Thread Tools Display Modes
01/30/18, 11:47 AM   #1
Doombug
Join Date: Jan 2018
Posts: 2
Request: Small change to AI Vampire Status

I have no idea how easy this would be to change or implement but if it is fairly easy I'm hoping some kind soul will either tell me how or show me how to do it. The mod AI Vampire Status is still working fine but I was wondering if someone could change how it displays the time left. Right now it only displays minutes I'd really love it if someone out there could make it display the time the way it is displayed in the character sheet xxH xxM xxS. It's a small aesthetic change but reading it as 300 minutes really bothers me for some reason.

downloads/info340-AIVampireStatus.html
  Reply With Quote
01/31/18, 03:44 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
If you have a look here you'll find some functions for time formatting ZOs uses ingame:
https://github.com/esoui/esoui/blob/...obals/time.lua

I think the function here fits your needs:
function ZO_FormatCountdownTimer(seconds)

Maybe you can find in the addon the code where the time left is calculated and you can change it to use this function. The functions uses as parameter the seconds and you need to use it like this:

Lua Code:
  1. --Assuming the seconds left in the addon is stored in variable "secondsLeft"
  2. local timeLeft = ZO_FormatCountdownTimer(secondsLeft)
  3.  
  4. --Then use your variable "timeLeft" for the output.
  Reply With Quote
01/31/18, 07:50 AM   #3
Doombug
Join Date: Jan 2018
Posts: 2
Thanks for the suggestion it helped me solve my aesthetics problem while the function you gave didn't help the linked page did have my answer. First I changed the math so the time would be displayed in seconds (was originally in minutes) then I fed that into ZO_FormatTime and it came out correct

Last edited by Doombug : 01/31/18 at 08:45 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Request: Small change to AI Vampire Status

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off