Difference between revisions of "Utility Script"

1,999 bytes added ,  20:28, 11 June 2016
imported>Plplecuyer
 
imported>Fatlenin
Line 18: Line 18:
*Function [[CallGlobalFunctionNoWait - Utility|CallGlobalFunctionNoWait]](string asScriptName, string asFuncName, Var[] aParams)
*Function [[CallGlobalFunctionNoWait - Utility|CallGlobalFunctionNoWait]](string asScriptName, string asFuncName, Var[] aParams)
**Call a global function asynchronously without depending on the script containing the function.
**Call a global function asynchronously without depending on the script containing the function.
*string Function [[CaptureFrameRate - Utility|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 - Utility|EndFrameRateCapture]]()
**Ends a framerate capture.
*Function [[EnterTestData - Utility|EnterTestData]](string astestType, string astestMatter, string astestDetails, string astestResultContext, string astestResult)
**Sends the passed in test data to the tests website.
*string Function [[GameTimeToString - Utility|GameTimeToString]](float afGameTime)
*string Function [[GameTimeToString - Utility|GameTimeToString]](float afGameTime)
**Converts a float game time (in terms of game days passed) to a string detailing the date and time it represents.
**Converts a float game time (in terms of game days passed) to a string detailing the date and time it represents.
*float Function [[GetAverageFrameRate - Utility|GetAverageFrameRate]]()
**Gets the average frame rate achieved during the frame rate capture.
*string Function [[GetCurrentBudget - Utility|GetCurrentBudget]](int aiBudgetNumber)
**Obtains the current memory budget.
*float Function [[GetCurrentGameTime - Utility|GetCurrentGameTime]]()
*float Function [[GetCurrentGameTime - Utility|GetCurrentGameTime]]()
**Obtains the current game time in terms of game days passed (the same as the global variable of a similar name)
**Obtains the current game time in terms of game days passed (the same as the global variable of a similar name).
*string Function [[GetCurrentMemory - Utility|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 - Utility|GetCurrentRealTime]]()
*float Function [[GetCurrentRealTime - Utility|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)
**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 - Utility|GetCurrentStackID]]()
*int Function [[GetCurrentStackID - Utility|GetCurrentStackID]]()
**Obtains the ID number of the stack this function was called on.
**Obtains the ID number of the stack this function was called on.
*int Function [[GetBudgetCount - Utility|GetBudgetCount]]()
**Obtains the memory budget count.
*string Function [[GetBudgetLimit - Utility|GetBudgetLimit]](int aiBudgetNumber)
** Returns the specified memory budget's limit.
*string Function [[GetBudgetName - Utility|GetBudgetName]](int aiBudgetNumber)
**Returns the name of the specified memory budget.
*float Function [[GetMinFrameRate - Utility|GetMinFrameRate]]()
**Obtains the minimum frame rate achieved during the frame rate capture.
*float Function [[GetMaxFrameRate - Utility|GetMaxFrameRate]]()
**Obtains the maximum frame rate achieved during the frame rate capture.
*bool Function [[IsInMenuMode - Utility|IsInMenuMode]]()
*bool Function [[IsInMenuMode - Utility|IsInMenuMode]]()
**Returns whether the game is currently in "menu mode" or not.
**Returns whether the game is currently in "menu mode" or not.
*bool Function [[OverBudget - Utility|OverBudget]](int aiBudgetNumber)
**Returns whether the system is over the memory budget limit.
*Function [[PostStartUpTimes - Utility|PostStartUpTimes]]()
**Sends the start up times to the tests website.
*float Function [[RandomFloat - Utility|RandomFloat]](float afMin, float afMax)
*float Function [[RandomFloat - Utility|RandomFloat]](float afMin, float afMax)
**Generates a random float between the minimum and maximum (inclusive)
**Generates a random float between the minimum and maximum (inclusive).
*int Function [[RandomInt - Utility|RandomInt]](int aiMin, int aiMax)
*int Function [[RandomInt - Utility|RandomInt]](int aiMin, int aiMax)
**Generates a random integer between the minimum and maximum (inclusive)
**Generates a random integer between the minimum and maximum (inclusive).
*Function [[SetINIBool - Utility|SetINIBool]](string ini, bool value)
*Function [[SetINIBool - Utility|SetINIBool]](string ini, bool value)
**Sets a pre-existing bool ini value
**Sets a pre-existing bool ini value.
*Function [[SetINIFloat - Utility|SetINIFloat]](string ini, float value)
*Function [[SetINIFloat - Utility|SetINIFloat]](string ini, float value)
**Sets a pre-existing float ini value
**Sets a pre-existing float ini value.
*Function [[SetINIInt - Utility|SetINIInt]](string ini, int value)
*Function [[SetINIInt - Utility|SetINIInt]](string ini, int value)
**Sets a pre-existing int ini value
**Sets a pre-existing int ini value.
*Function [[SetINIString - Utility|SetINIString]](string ini, string value)
*Function [[SetINIString - Utility|SetINIString]](string ini, string value)
**Sets a pre-existing string ini value
**Sets a pre-existing string ini value.
*Function [[StartFrameRateCapture - Utility|StartFrameRateCapture]]()
**Starts a frame rate capture.
*Function [[Wait - Utility|Wait]](float afSeconds)
*Function [[Wait - Utility|Wait]](float afSeconds)
**Pauses the script for at least the specified time (latent). Does not count time spent in a menu.
**Pauses the script for at least the specified time (latent). Does not count time spent in a menu.
Anonymous user