ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Request: Small change to AI Vampire Status (https://www.esoui.com/forums/showthread.php?t=7599)

Doombug 01/30/18 11:47 AM

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

Baertram 01/31/18 03:44 AM

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.

Doombug 01/31/18 07:50 AM

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


All times are GMT -6. The time now is 12:20 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI