Skip to content

Clock

Functions

GetMinuteDuration

 function Clock.GetMinuteDuration()

Clock.GetMinuteDuration

Returns a float with the current minute duration

Example
Clock.GetMinuteDuration()

SetMinuteDuration

 function Clock.SetMinuteDuration((float)MinuteDuration)
Parameter Type 📝 Description
MinuteDuration float How long in seconds a minute takes to pass

Clock.SetMinuteDuration

Set how long a in-game minute takes to pass.

Example

Clock.SetMinuteDuration(1)
This example sets a minute in-game to pass every real-life second.


DaysSinceEvent

 function Clock.DaysSinceEvent((string) eventName)

Clock.DaysSinceEvent

Checks how many days have passed since a specifiv event. Returns -1 if the event hasn't passed yet.\n


CurrentTimeFormatted

 function Clock.CurrentTimeFormatted()

Clock.CurrentTimeFormatted

Returns the current time in a formatted form.


CurrentMinute

 function Clock.CurrentMinute()

Clock.CurrentMinute

Returns the current minute (Between 0 and 60 inclusive).


CurrentTimeFromEver

 function Clock.CurrentTimeFromEver()

Clock.CurrentTimeFromEver

Returns the current minute from all time (Between 0 and ???????? inclusive).


CurrentHour

 function Clock.CurrentHour()

Clock.CurrentHour

Returns the current hour (Between 0 and 24 inclusive).


CurrentDayOfSeason

 function Clock.CurrentDayOfSeason()

Clock.CurrentDayOfSeason

Returns the current day of the season (Between 1 and 30 inclusive).


CurrentDayFromEver

 function Clock.CurrentDayFromEver()

Clock.CurrentDayFromEver

Returns the current day from all time.


CurrentSeason

 function Clock.CurrentSeason()

Clock.CurrentSeason

Returns the number that represents the current season.


CurrentSeasonName

 function Clock.CurrentSeasonName()

Clock.CurrentSeasonName

Returns the current season in string form.


SetDayTime

 function Clock.SetDayTime((int)Hour , (int)Minutes)
Parameter Type 📝 Description
Hour int Desired hour, a number between 6 and 24 no decimals.
Minutes int Desired minute, a number between 0 and 60 no decimals.

Clock.SetDayTime

Sets a specific time relative to this day.

Example

Clock.SetDayTime(0,0)
This example sets the time to be noon.


SetDayHour

 function Clock.SetDayHour((int)Hour , (int)Minutes)
Parameter Type 📝 Description
Hour int Desired hour, a number between 6 and 24 no decimals.
Minutes int Desired minute, a number between 0 and 60 no decimals.

Clock.SetDayHour

Sets a specific time relative to this day.

Example

Clock.SetDayTime(0,0)
This example sets the time to be noon.


SetDayMinute

 function Clock.SetDayMinute((int)Minute)
Parameter Type 📝 Description
Minute int Desired minute, a number between 0 and 60 no decimals.

Clock.SetDayMinute

Sets a specific minute relative to the current hour.

Example

Clock.SetDayMinute(5)
If this is current 12:00 it sets the current time to be 12:05.


AddDays

 function Clock.AddDays((int)Days , (optional bool)Refresh World)
Parameter Type 📝 Description
Days int Amount of days to travel
Refresh World optional bool If set to true it refreshes the world (quests, mail, etc) for the new day.

Clock.AddDays

Time travels days to the future.

Example

Clock.AddDays(2,true)
This example time travel 2 days to the future.


SetDayFromEver

 function Clock.SetDayFromEver((int)Days , (optional bool)Refresh World)
Parameter Type 📝 Description
Days int Specific day from ever to set, not limited by the 30 day month. So it can go up to infinite.
Refresh World optional bool If set to true it refreshes the world (quests, mail, etc) for the new day.

Clock.SetDayFromEver

Sets a specific day from ever.

Example

Clock.SetDayFromEver(2,true)
This example time travels to the second day ever of game. Spring 2.


SetMinuteFromEver

 function Clock.SetMinuteFromEver((int)MinuteFromEver , (optional bool)Refresh World)
Parameter Type 📝 Description
MinuteFromEver int Specific minute from ever to set, not limited by the 60 minutes in an hour. So it can go up to infinite.
Refresh World optional bool If set to true it refreshes the world (quests, mail, etc) for the new day.

Clock.SetMinuteFromEver

Sets a specific time using minutes from ever.

Example

Clock.SetMinuteFromEver(15689,true)
This example time travels to an abitrary point in time I set in this event for no particular reason.

Comments