Thread Tools Display Modes
04/13/14, 05:34 AM   #1
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
I spent a while previously looking for functions that return ingame time or weather and there's nothing in the documentation on the wiki. There may be functions buried within the ZO API, but I don't have access to documentation on that.

Frame delta seconds is the number of milliseconds since the previous frame rendered.
  Reply With Quote
04/13/14, 07:49 AM   #2
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
As far as I know, there is not a way to tell what the in-game time is right now.

EDIT: Guess I was wrong about GetGameTimeRemaining. It is still there.

Last edited by skyraker : 04/13/14 at 07:54 AM.
  Reply With Quote
04/13/14, 11:31 AM   #3
Tyx
 
Tyx's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 23
GetGameTimeRemaining is for Alliance War only, or isn't it? If I test the function outside PvP (didn't test it inside until now) it shows only a 0.

Maybe we can emulate a weather function if we now how long a day lasts.

Does anybody know?

The FAQ says it is ~5h but i don't really think that this is true because it wouldn't make much sense that a day is not a divider of 24.
Some player state that a day lasts 8h, I try to test this right now.
  Reply With Quote
04/13/14, 01:36 PM   #4
Nogaruk
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 15
Edit: I think I miss read what you were asking. You're looking for the tamriel world time?

if so, I didn't see you mention
GetGameTimeMilliseconds() - Returns: integer gameTimeInMilliseconds

There are a few relative globals and functions as well as Formatting for time and clock time. Probably isn't a difference, but might be worth exploring. I'm not sure we have access to the games world time, though.

I don't recall anywhere in the game that they show game time. It seems as if everything they do is based on real world time. The only thing I can even think of that is game time related is the day/night cycle. So your best bet might actually be to use the midnight function, figure out how long an in-game day takes, and adjust for it yourself.

These may be real world related
GetTimeString() - Returns: string currentTimeString
GetFormattedTime() - Returns: integer formattedTime
EVENT_SHOW_TIME (bool state)
SI_STR_TIME_DESC_DAYS_HOURS_MINUTES_AND_SECONDS
TIME_FORMAT_STYLE_RELATIVE_TIMESTAMP - Not sure what relative is to in this case

Last edited by Nogaruk : 04/13/14 at 02:00 PM.
  Reply With Quote
04/13/14, 02:40 PM   #5
Tyx
 
Tyx's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 23
Yes I am looking for a way to emulate (with the 8h model) or get the current (ingame) time in Tamriel.

GetGameTime...() returns the time you spend in the game this session.

I would test the EVENT but I have no idea how to use that^^
Can we start events too? I thought until now we can only do something if an event occurs.

The SI_STR... gives back "203"
and the other TIME_FORMAT... will give back "10".

I think the API really doesn't contain a function to ask for the time.
Which is sad because Vamps need to know the time (ok they can look to the sky^^) for best use of their abilities.

EDIT forgot the other two^^
GetTimeString() = hh:mm:ss
GetFormattedTime() = hhmmss
  Reply With Quote
04/13/14, 03:01 PM   #6
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
EVENT_SHOW_TIME is definitely not in the new API.
  Reply With Quote
04/13/14, 03:03 PM   #7
Flamage
 
Flamage's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 60
Does this help?

local localTimeSinceMidnight = GetSecondsSinceMidnight()
local text = ZO_FormatTime(localTimeSinceMidnight, TIME_FORMAT_STYLE_CLOCK_TIME, TIME_FORMAT_PRECISION_TWELVE_HOUR)
  Reply With Quote
04/13/14, 03:30 PM   #8
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
Originally Posted by Flamage View Post
Does this help?

local localTimeSinceMidnight = GetSecondsSinceMidnight()
local text = ZO_FormatTime(localTimeSinceMidnight, TIME_FORMAT_STYLE_CLOCK_TIME, TIME_FORMAT_PRECISION_TWELVE_HOUR)
That's real world time since midnight.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » GameTime function


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