Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
World

Data Structures

class  BaseTimeAndWeatherManagerEntityClass
 
class  LocalWeatherSituation
 

Functions

BaseTimeAndWeatherManagerEntityClass BaseWeatherManagerEntityClass GetCurrentWeatherState ()
 
proto external bool IsNightHour (float hour24)
 
proto external bool IsDayHour (float hour24)
 
proto void SetTimeEvent (string time, Managed inst, func callback, bool delayed=true, bool singleUse=false)
 
proto external float GetMoonPhase (float timeOfTheDay24)
 
proto float GetMoonPhaseForDate (int year, int month, int day, float timeOfTheDay24, float timezone, float dstOffset)
 
proto external bool SetDate (int year, int month, int day, bool immediateChange=false)
 
proto external void UpdateWeather (float timeSlice)
 
proto external bool SetTimeOfTheDay (float hours24, bool immediateChange=false)
 
proto external bool CheckValidDate (int year, int month, int day)
 
proto void GetCurrentSunMoonDirAndPhase (out vector outSunDir, out vector outMoonDir, out float outMoonPhase01)
 
proto external float GetTimeOfTheDay ()
 
proto external float GetEngineTime ()
 
proto external int GetYear ()
 
proto external int GetMonth ()
 
proto external int GetDay ()
 
proto external int GetWeekDay ()
 
proto external int GetWeekDayForDate (int year, int month, int day)
 
proto external float GetTimeZoneOffset ()
 
proto external void SetTimeZoneOffset (float utcTimeZone)
 
proto external float GetDSTOffset ()
 
proto external bool SetDSTOffset (float dstOffsetHours)
 
proto external bool IsDSTEnabled ()
 
proto external bool SetDSTEnabled (bool enabled)
 
proto bool GetSunriseHour (out float hour24)
 
proto bool GetSunsetHour (out float hour24)
 
proto bool GetSunriseHourForDate (int year, int month, int day, float latitude, float longitude, float timezone, float dstOffset, out float hour24)
 
proto bool GetSunsetHourForDate (int year, int month, int day, float latitude, float longitude, float timezone, float dstOffset, out float hour24)
 
proto external bool TryGetCompleteLocalWeather (LocalWeatherSituation lws, float swayFrequency, vector location)
 
proto external bool SetDayDuration (float realtimeSeconds)
 
proto external float GetDayDuration ()
 
proto external bool SetIsDayAutoAdvanced (bool autoAdvanced)
 
proto external bool GetIsDayAutoAdvanced ()
 
proto external bool SetCurrentLongitude (float longitude)
 
proto external float GetCurrentLongitude ()
 
proto external bool SetCurrentLatitude (float latitude)
 
proto external float GetCurrentLatitude ()
 
proto external bool SetHoursMinutesSeconds (int hours, int minutes, int seconds, bool immediateChange=false)
 
proto void GetDate (out int year, out int month, out int day)
 
proto void GetHoursMinutesSeconds (out int hours, out int minutes, out int seconds)
 
proto external void GetWeatherStatesList (out notnull array< ref WeatherState > outStates)
 
proto ref WeatherStateTransitionManager GetTransitionManager ()
 
proto external bool SetWindSpeedOverride (bool doOverride, float windSpeed=0)
 
proto external float GetWindSpeed ()
 
proto external bool SetWindDirectionOverride (bool doOverride, float windDirection=0)
 
proto external float GetWindDirection ()
 
proto external bool IsWindSpeedOverridden ()
 
proto external bool IsWindDirectionOverridden ()
 
proto external bool SetRainIntensityOverride (bool doOverride, float rainIntensity=0)
 
proto external float GetRainIntensity ()
 
proto external bool IsRainIntensityOverridden ()
 
proto external bool SetCurrentWetness (float wetness)
 
proto external float GetCurrentWetness ()
 
proto external bool SetCurrentWaterAccumulation (float waterAccumulationCracks, float waterAccumulationPuddles)
 
proto external float GetCurrentWaterAccumulationCracks ()
 
proto external float GetCurrentWaterAccumulationPuddles ()
 
proto external void AddLightning (WeatherLightning lightning)
 

Detailed Description

Function Documentation

◆ AddLightning()

proto external void AddLightning ( WeatherLightning  lightning)

◆ CheckValidDate()

proto external bool CheckValidDate ( int  year,
int  month,
int  day 
)

Checks if date is valid (checks for leap years and correct day of the month)

Parameters
yearYear
monthMonth (in 1-12 range)
dayDay (in 1-31 range)
Returns
Returns true when date is valid, false otherwise.

◆ GetCurrentLatitude()

proto external float GetCurrentLatitude ( )

Returns current latitude.

◆ GetCurrentLongitude()

proto external float GetCurrentLongitude ( )

Returns current longitude.

◆ GetCurrentSunMoonDirAndPhase()

proto void GetCurrentSunMoonDirAndPhase ( out vector  outSunDir,
out vector  outMoonDir,
out float  outMoonPhase01 
)

Retrieve current sun direction, moon direction and moon phase.

Parameters
outSunDirCurrent sun direction
outMoonDirCurrent moon direction
outMoonPhase01Moon phase (0 = new moon, 1 = full moon)

◆ GetCurrentWaterAccumulationCracks()

proto external float GetCurrentWaterAccumulationCracks ( )

◆ GetCurrentWaterAccumulationPuddles()

proto external float GetCurrentWaterAccumulationPuddles ( )

◆ GetCurrentWeatherState()

BaseTimeAndWeatherManagerEntityClass BaseWeatherManagerEntityClass GetCurrentWeatherState ( )

Manager entity responsible for managing in-game time and weather, providing the script and gamecode with usable in-game API.

◆ GetCurrentWetness()

proto external float GetCurrentWetness ( )

◆ GetDate()

proto void GetDate ( out int  year,
out int  month,
out int  day 
)

Retrieves the current date (year/month/day).

Returns
Returns Current date (Year, Month in 1-12 range, Day in 1-31 range)

◆ GetDay()

proto external int GetDay ( )

Returns current in-game day of the month (Range 1-31)

◆ GetDayDuration()

proto external float GetDayDuration ( )

Retrieves in-game day duration as realtime seconds.

Returns
Returns the duration of one in-game day as realtime seconds.

◆ GetDSTOffset()

proto external float GetDSTOffset ( )

Gets DST offset (in hours)

◆ GetEngineTime()

proto external float GetEngineTime ( )

Retrieves the current engine time (synchronized between clients), this value is not affected by time multiplier nor automatic time advancement attributes.

◆ GetHoursMinutesSeconds()

proto void GetHoursMinutesSeconds ( out int  hours,
out int  minutes,
out int  seconds 
)

Retrieves the current time of the day.

Returns
Returns script wrapper for time Example:
int h, m, s;
Print(h);
Print(m);
Print(s);
>> int h = 16
>> int m = 30
>> int s = 00

◆ GetIsDayAutoAdvanced()

proto external bool GetIsDayAutoAdvanced ( )

Retrieves whether automatic time advancement is enabled or not.

Returns
Returns true if daytime is advaned automatically, false otherwise.

◆ GetMonth()

proto external int GetMonth ( )

Returns current in-game month of the year (Range 1-12)

◆ GetMoonPhase()

proto external float GetMoonPhase ( float  timeOfTheDay24)

Gets moon phase for supplied time of the day.

Returns
phase in <0...1> range. 0 = new moon, 1 = full moon

◆ GetMoonPhaseForDate()

proto float GetMoonPhaseForDate ( int  year,
int  month,
int  day,
float  timeOfTheDay24,
float  timezone,
float  dstOffset 
)

Gets moon phase for supplied date, geo location is not needed but timezone yes in order to calculate UTC correctly.

Parameters
yearYear.
monthMonth in range <1, 12>
dayDay in range <1, 31>
timeOfTheDay24Time of the day in 24 hour floating point format.
timezoneTimeZone Offset in hours ranging <-12, +14>
dstOffsetDST (daylight savings time) offset, must be 0.0 or positive value.
Returns
phase in <0...1> range. 0 = new moon, 1 = full moon

◆ GetRainIntensity()

proto external float GetRainIntensity ( )

◆ GetSunriseHour()

proto bool GetSunriseHour ( out float  hour24)

Gets sunrise hour in 24 hour format e.g. 12.50 is 12:30 A.M

Returns
True if there is a valid sunrise with current latitude/longitude/date configuration, false otherwise

◆ GetSunriseHourForDate()

proto bool GetSunriseHourForDate ( int  year,
int  month,
int  day,
float  latitude,
float  longitude,
float  timezone,
float  dstOffset,
out float  hour24 
)

Gets sunrise hour in 24 hour format e.g. 12.50 is 12:30 A.M. For specific date, geolocation, timezone and DST.

Parameters
yearYear.
monthMonth in range <1, 12>
dayDay in range <1, 31>
latitudeLatitude in range <-90, 90> where +90 equals north pole, 0 equator and -90.0 south pole
longitudeLongitude in range <-180.0, 180.0> where 0 equals (almost) greenwich meridian.
timezoneTimeZone Offset in hours ranging <-12, +14>
dstOffsetDST (daylight savings time) offset, must be 0.0 or positive value.
Returns
True if there is a valid sunrise with current latitude/longitude/date configuration, false otherwise

◆ GetSunsetHour()

proto bool GetSunsetHour ( out float  hour24)

Gets sunset hour in 24 hour format e.g. 12.50 is 12:30 A.M

Returns
True if there is a valid sunset with current latitude/longitude/date configuration, false otherwise

◆ GetSunsetHourForDate()

proto bool GetSunsetHourForDate ( int  year,
int  month,
int  day,
float  latitude,
float  longitude,
float  timezone,
float  dstOffset,
out float  hour24 
)

Gets sunset hour in 24 hour format e.g. 12.50 is 12:30 A.M for specific date.

Returns
True if there is a valid sunset with current latitude/longitude/date configuration, false otherwise

◆ GetTimeOfTheDay()

proto external float GetTimeOfTheDay ( )

Retrieves the current time of the day.

Returns
Time fraction in hours <0.0, 24.0> Example:
float totd = GetTimeOfTheDay();
Print(totd);
>> float totd = 16.5

◆ GetTimeZoneOffset()

proto external float GetTimeZoneOffset ( )

Returns time zone offset (in hours)

◆ GetTransitionManager()

proto ref WeatherStateTransitionManager GetTransitionManager ( )

Get weather state transition manager

Returns
Transition manager, null if client is not master.

◆ GetWeatherStatesList()

proto external void GetWeatherStatesList ( out notnull array< ref WeatherState >  outStates)

Gets all Weather States.

◆ GetWeekDay()

proto external int GetWeekDay ( )

Returns current in-game week day in range [0-6], starts at Monday=0.

Returns
positive integer 0-6 representing each day of the week, starting at Monday. -1 if current date is invalid.

◆ GetWeekDayForDate()

proto external int GetWeekDayForDate ( int  year,
int  month,
int  day 
)

Returns week day in range [0-6], starts at Monday=0, for the supplied date.

Returns
positive integer 0-6 representing each day of the week, starting at Monday. -1 if supplied date is invalid.
Parameters
yearYear.
monthMonth in range <1, 12>
dayDay in range <1, 31>

◆ GetWindDirection()

proto external float GetWindDirection ( )

Retrieves in-game wind direction angle in degrees.

Returns
Returns the in-game wind direction angle in degrees <0, 360.0>

◆ GetWindSpeed()

proto external float GetWindSpeed ( )

Retrieves in-game wind speed in meters per second.

Returns
Returns the in-game wind speed in meters per second.

◆ GetYear()

proto external int GetYear ( )

Returns current in-game year

◆ IsDayHour()

proto external bool IsDayHour ( float  hour24)

◆ IsDSTEnabled()

proto external bool IsDSTEnabled ( )

Retrieves whether DST (daylight savings time) is enabled.

◆ IsNightHour()

proto external bool IsNightHour ( float  hour24)

◆ IsRainIntensityOverridden()

proto external bool IsRainIntensityOverridden ( )

◆ IsWindDirectionOverridden()

proto external bool IsWindDirectionOverridden ( )

◆ IsWindSpeedOverridden()

proto external bool IsWindSpeedOverridden ( )

◆ SetCurrentLatitude()

proto external bool SetCurrentLatitude ( float  latitude)

Sets latitude as <-90, +90>. Can only be set by the authority (server, singleplayer...)

Returns
Returns true when command is authorized, false otherwise.

◆ SetCurrentLongitude()

proto external bool SetCurrentLongitude ( float  longitude)

Sets longitude as <-180, +180>. Can only be set by the authority (server, singleplayer...)

Returns
Returns true when command is authorized, false otherwise.

◆ SetCurrentWaterAccumulation()

proto external bool SetCurrentWaterAccumulation ( float  waterAccumulationCracks,
float  waterAccumulationPuddles 
)

◆ SetCurrentWetness()

proto external bool SetCurrentWetness ( float  wetness)

◆ SetDate()

proto external bool SetDate ( int  year,
int  month,
int  day,
bool  immediateChange = false 
)

Sets the current in-game date (year/month/day). Only issuable by the authority. Automatically broadcast to all clients. You may check date validity prior to this call with CheckValidDate method.

Parameters
yearYear
monthMonth (in 1-12 range)
dayDay (in 1-31 range)
immediateChangeWhether change should be applied immediately, forcing recomputation. This should be true only in case of editor and similar items.
Returns
Returns true when command is issued successfully and date is VALID, false otherwise.

◆ SetDayDuration()

proto external bool SetDayDuration ( float  realtimeSeconds)

Sets in-game day duration as realtime seconds. Only issuable by the authority. Automatically broadcast to all clients.

Parameters
realtimeSecondsSeconds in real time one ingame day will take.
Returns
Returns true when command is issued successfully, false otherwise.

◆ SetDSTEnabled()

proto external bool SetDSTEnabled ( bool  enabled)

Sets whether DST (daylight savings time) is enabled or disabled.

◆ SetDSTOffset()

proto external bool SetDSTOffset ( float  dstOffsetHours)

Sets DST Offset (in hours). Can only be set by authority.

◆ SetHoursMinutesSeconds()

proto external bool SetHoursMinutesSeconds ( int  hours,
int  minutes,
int  seconds,
bool  immediateChange = false 
)

Sets the current time of the day. Only issuable by the authority. Automatically broadcast to all clients.

Parameters
hoursHours <0,24>
minutesMinutes <0,60>
secondsSeconds <0,60>
immediateChangeWhether change should be applied immediately, forcing recomputation. This should be true only in case of editor and similar items.
Returns
Returns true when command is issued successfully, false otherwise. Example:
int h, m, s;
Print(h);
Print(m);
Print(s);
>> int h = 16
>> int m = 30
>> int s = 00

◆ SetIsDayAutoAdvanced()

proto external bool SetIsDayAutoAdvanced ( bool  autoAdvanced)

Enables or disabled automatic daytime advancement. Only issuable by the authority. Automatically broadcast to all clients.

Parameters
autoAdvancedTrue to enable, false to disable.
Returns
Returns true when command is issued successfully, false otherwise.

◆ SetRainIntensityOverride()

proto external bool SetRainIntensityOverride ( bool  doOverride,
float  rainIntensity = 0 
)

Sets current rain intensity override (in range <0.0, 1.0>) Can only be set by the authority (server, singleplayer...)

Returns
Returns true when command is authorized, false otherwise.

◆ SetTimeEvent()

proto void SetTimeEvent ( string  time,
Managed  inst,
func  callback,
bool  delayed = true,
bool  singleUse = false 
)

◆ SetTimeOfTheDay()

proto external bool SetTimeOfTheDay ( float  hours24,
bool  immediateChange = false 
)

Sets the current time of the day. Only issuable by the authority. Automatically broadcast to all clients.

Parameters
hoursTime fraction in hours <0.0, 24.0>
immediateChangeWhether change should be applied immediately, forcing recomputation. This should be true only in case of editor and similar items.
Returns
Returns true when command is issued successfully, false otherwise. Example:
int h, m, s;
Print(h);
Print(m);
Print(s);
>> int h = 16
>> int m = 30
>> int s = 00

◆ SetTimeZoneOffset()

proto external void SetTimeZoneOffset ( float  utcTimeZone)

Sets time zone offset (in hours) in range <-12.0, +14.0>

◆ SetWindDirectionOverride()

proto external bool SetWindDirectionOverride ( bool  doOverride,
float  windDirection = 0 
)

Sets in-game wind direction angle in degrees. Only issuable by the authority. Automatically broadcast to all clients.

Parameters
windDirectionWind direction angle in degrees <0, 360.0>
Returns
Returns true when command is issued successfully, false otherwise.

◆ SetWindSpeedOverride()

proto external bool SetWindSpeedOverride ( bool  doOverride,
float  windSpeed = 0 
)

Sets in-game wind speed in meters per second. Only issuable by the authority. Automatically broadcast to all clients.

Parameters
windSpeedWind speed in m/s.
Returns
Returns true when command is issued successfully, false otherwise.

◆ TryGetCompleteLocalWeather()

proto external bool TryGetCompleteLocalWeather ( LocalWeatherSituation  lws,
float  swayFrequency,
vector  location 
)

Returns all information about current weather - rain, fog, overcast, wind. If swayFrequency and location are set, sway is calculated as well (works as with trees and grass). Mind that wetness and water accumulation effects are WIP and they will not be set yet. You can use ref LocalWeatherSituation weatherSituation = new LocalWeatherSituation(); to create the object and pass it as an argument.

◆ UpdateWeather()

proto external void UpdateWeather ( float  timeSlice)
SetHoursMinutesSeconds
proto external bool SetHoursMinutesSeconds(int hours, int minutes, int seconds, bool immediateChange=false)
GetTimeOfTheDay
proto external float GetTimeOfTheDay()
SetTimeOfTheDay
proto external bool SetTimeOfTheDay(float hours24, bool immediateChange=false)
GetHoursMinutesSeconds
proto void GetHoursMinutesSeconds(out int hours, out int minutes, out int seconds)