Difference between revisions of "Utility Script"
Jump to navigation
Jump to search
imported>Fatlenin |
imported>Qazaaq m |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Collection of generic utility global functions. | |||
Collection of generic utility global functions | |||
== Definition == | == Definition == | ||
Line 74: | Line 70: | ||
*Function [[WaitMenuMode - Utility|WaitMenuMode]](float afSeconds) | *Function [[WaitMenuMode - Utility|WaitMenuMode]](float afSeconds) | ||
**Pauses the script for at least the specified time (latent). ''Does'' count time spent in a menu. | **Pauses the script for at least the specified time (latent). ''Does'' count time spent in a menu. | ||
== F4SE Global Functions == | |||
*var[] Function [[VarToVarArray - Utility|VarToVarArray]](var v) | |||
**Converts var to var[], for [[UI_Script|UI Script]] functions. | |||
*var Function [[VarArrayToVar - Utility|VarArrayToVar]](var[] v) | |||
**Converts var[] to var, for [[UI_Script|UI Script]] functions. | |||
== Member Functions == | == Member Functions == | ||
Line 80: | Line 83: | ||
== Events == | == Events == | ||
None | None | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:Script Objects]] |
Latest revision as of 18:56, 21 January 2018
Collection of generic utility global functions.
Definition[edit | edit source]
ScriptName Utility Native Hidden
Properties[edit | edit source]
None
Global Functions[edit | edit source]
- Var Function CallGlobalFunction(string asScriptName, string asFuncName, Var[] aParams)
- Call a global function synchronously without depending on the script containing the function.
- Function CallGlobalFunctionNoWait(string asScriptName, string asFuncName, Var[] aParams)
- Call a global function asynchronously without depending on the script containing the function.
- string Function CaptureFrameRate(int numFrames)
- Obtains a string describing the frame rate for a certain number of frames. The string will be no longer than 1,000 characters, and will be separated by commas.
- Function EndFrameRateCapture()
- Ends a framerate capture.
- Function EnterTestData(string astestType, string astestMatter, string astestDetails, string astestResultContext, string astestResult)
- Sends the passed in test data to the tests website.
- string Function GameTimeToString(float afGameTime)
- Converts a float game time (in terms of game days passed) to a string detailing the date and time it represents.
- float Function GetAverageFrameRate()
- Gets the average frame rate achieved during the frame rate capture.
- string Function GetCurrentBudget(int aiBudgetNumber)
- Obtains the current memory budget.
- float Function GetCurrentGameTime()
- Obtains the current game time in terms of game days passed (the same as the global variable of a similar name).
- string Function GetCurrentMemory()
- This function must be called first when using memory tracking functions, as it sets up the memory stats used by the other functions.
- 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).
- int Function GetCurrentStackID()
- Obtains the ID number of the stack this function was called on.
- int Function GetBudgetCount()
- Obtains the memory budget count.
- string Function GetBudgetLimit(int aiBudgetNumber)
- Returns the specified memory budget's limit.
- string Function GetBudgetName(int aiBudgetNumber)
- Returns the name of the specified memory budget.
- float Function GetMinFrameRate()
- Obtains the minimum frame rate achieved during the frame rate capture.
- float Function GetMaxFrameRate()
- Obtains the maximum frame rate achieved during the frame rate capture.
- bool Function IsInMenuMode()
- Returns whether the game is currently in "menu mode" or not.
- bool Function OverBudget(int aiBudgetNumber)
- Returns whether the system is over the memory budget limit.
- Function PostStartUpTimes()
- Sends the start up times to the tests website.
- 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 SetINIBool(string ini, bool value)
- Sets a pre-existing bool ini value.
- Function SetINIFloat(string ini, float value)
- Sets a pre-existing float ini value.
- Function SetINIInt(string ini, int value)
- Sets a pre-existing int ini value.
- Function SetINIString(string ini, string value)
- Sets a pre-existing string ini value.
- Function StartFrameRateCapture()
- Starts a frame rate capture.
- 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.
F4SE Global Functions[edit | edit source]
- var[] Function VarToVarArray(var v)
- Converts var to var[], for UI Script functions.
- var Function VarArrayToVar(var[] v)
- Converts var[] to var, for UI Script functions.
Member Functions[edit | edit source]
None
Events[edit | edit source]
None