Скриптовые утилиты

From the CreationKit Wiki
Jump to navigation Jump to search


Коллекция общих утилит глобальных функций

Definition[edit | edit source]

ScriptName Utility

Properties[edit | edit source]

None

Global Functions[edit | edit source]

string Function GameTimeToString()

  • Converts a float game time (in terms of game days passed) to a string detailing the date and time it represents.

float Function GetCurrentGameTime()

  • Obtains the current game time in terms of game days passed (the same as the global variable of a similar name)

float Function GetCurrentRealTime()

  • Obtains the number of real-world seconds that have passed since the game has launched (ignoring time alt-tabbed away, or other cases where the game might be frozen)

bool Function IsInMenuMode()

  • Returns whether the game is currently in "menu mode" or not.

float Function RandomFloat(float afMin, float afMax)

  • Generates a random float between the minimum and maximum (inclusive)

int Function RandomInt(int aiMin, int aiMax)

  • Generates a random integer between the minimum and maximum (inclusive)

Function Wait(float afSeconds)

  • Pauses the script for at least the specified time (latent). Does not count time spent in a menu.

Function WaitGameTime(float afHours)

  • Pauses the script for at least the specified amount of game time (latent).

Function WaitMenuMode(float afSeconds)

  • Pauses the script for at least the specified time (latent). Does count time spent in a menu.

Function SetINIFloat(string ini, float value)

  • Sets the float value of the associated INI entry.

Function SetINIInt(string ini, int value)

  • Sets the integer value of the associated INI entry.

Function SetINIBool(string ini, bool value)

  • Sets the boolean value of the associated INI entry.

Function SetINIString(string ini, string value)

  • Sets the string value of the associated INI entry.

SKSE Global Functions[edit | edit source]

float Function GetINIFloat(string ini)

  • Returns the float value of the associated INI entry.

int Function GetINIInt(string ini)

  • Returns the integer value of the associated INI entry.

bool Function GetINIBool(string ini)

  • Returns the boolean value of the associated INI entry.

string Function GetINIString(string ini)

  • Returns the string value of the associated INI entry.

Member Functions[edit | edit source]

None

Events[edit | edit source]

None