update GlobalFunctions prose in LuaDocumentation

Expand and clarify the prose for many gloabl Lua functions described in
in LuaDocumentation.xml.

Get Lua.xml's GlobalFunctions listing current with 5_1-new.  Remove old
global functions (those moved to 5.1's "legacy" theme) from Lua.xml.
This commit is contained in:
quietly-turning
2020-06-25 04:24:24 -04:00
parent c57279f6b8
commit 7804efb103
2 changed files with 247 additions and 117 deletions
+42 -11
View File
@@ -9,6 +9,8 @@
<Function name='AreStagePlayerModsForced'/>
<Function name='AreStageSongModsForced'/>
<Function name='ArgsIfPlayerJoinedOrNil'/>
<Function name='BGFitChoiceExample'/>
<Function name='BGFitInputActor'/>
<Function name='Basename'/>
<Function name='BoostColor'/>
<Function name='Brightness'/>
@@ -24,6 +26,11 @@
<Function name='ComboPerRow'/>
<Function name='ComboTransformCommand'/>
<Function name='ComboUnderField'/>
<Function name='ConfAspectRatio'/>
<Function name='ConfDisplayMode'/>
<Function name='ConfDisplayResolution'/>
<Function name='ConfFullscreenType'/>
<Function name='ConfRefreshRate'/>
<Function name='ConnectToServer'/>
<Function name='CourseDifficultyToLocalizedString'/>
<Function name='CourseTypeToLocalizedString'/>
@@ -42,11 +49,13 @@
<Function name='FormatNumberAndSuffix'/>
<Function name='FormatPercentScore'/>
<Function name='GameCompatibleModes'/>
<Function name='GamePrefDefaultFail'/>
<Function name='GameOverOrContinue'/>
<Function name='GameplayMargins'/>
<Function name='GetCodeForGame'/>
<Function name='GetCoursesToShowRanking'/>
<Function name='GetCustomDifficulty'/>
<Function name='GetDefaultOptionLines'/>
<Function name='GetDisplayRatesForResolution'/>
<Function name='GetEditModeSubScreens'/>
<Function name='GetExtraColorThreshold'/>
<Function name='GetGamePref'/>
@@ -55,6 +64,7 @@
<Function name='GetGamePrefN'/>
<Function name='GetGradeFromPercent'/>
<Function name='GetLifeDifficulty'/>
<Function name='GetOptionsListMapping'/>
<Function name='GetPlayerOrMachineProfile'/>
<Function name='GetProTiming'/>
<Function name='GetRandomSongBackground'/>
@@ -63,6 +73,7 @@
<Function name='GetScreenAspectRatio'/>
<Function name='GetServerName'/>
<Function name='GetSongBackground'/>
<Function name='GetSpeedModeAndValueFromPoptions'/>
<Function name='GetTapPosition'/>
<Function name='GetThemeAspectRatio'/>
<Function name='GetThemePref'/>
@@ -87,6 +98,7 @@
<Function name='InitGamePrefs'/>
<Function name='InitUserPrefs'/>
<Function name='IsArcade'/>
<Function name='IsCourse'/>
<Function name='IsFreePlay'/>
<Function name='IsGame'/>
<Function name='IsHome'/>
@@ -118,12 +130,14 @@
<Function name='OldStyleStringToDifficulty'/>
<Function name='OptionRowProTiming'/>
<Function name='OptionRowScreenFilter'/>
<Function name='OptionsNavigationMode'/>
<Function name='OptionsRandomJukebox'/>
<Function name='OptionsRowTest'/>
<Function name='OptionsWeight'/>
<Function name='PeakComboAwardToLocalizedString'/>
<Function name='PlayModeToLocalizedString'/>
<Function name='PlayerColor'/>
<Function name='PlayerDarkColor'/>
<Function name='PlayerNumberToLocalizedString'/>
<Function name='PlayerNumberToString'/>
<Function name='PlayerScoreColor'/>
@@ -137,7 +151,6 @@
<Function name='ReadGamePrefFromFile'/>
<Function name='ReadPrefFromFile'/>
<Function name='ReportStyle'/>
<Function name='ResetDefaultFail'/>
<Function name='ResolveRelativePath'/>
<Function name='RoutineSkinP1'/>
<Function name='RoutineSkinP2'/>
@@ -146,7 +159,10 @@
<Function name='SaveProfileCustom'/>
<Function name='SaveScreenshot'/>
<Function name='ScoreKeeperClass'/>
<Function name='ScreenColor'/>
<Function name='ScreenMetric'/>
<Function name='ScreenSelectStyleChoices'/>
<Function name='ScreenSelectStylePositions'/>
<Function name='ScreenString'/>
<Function name='Second'/>
<Function name='SecondsToHHMMSS'/>
@@ -158,18 +174,13 @@
<Function name='SelectMusicOrCourse'/>
<Function name='SelectProfileKeys'/>
<Function name='Serialize'/>
<Function name='SetFail'/>
<Function name='SetGamePref'/>
<Function name='SetThemePref'/>
<Function name='SetUserPref'/>
<Function name='ShowHoldJudgments'/>
<Function name='ShowStandardDecoration'/>
<Function name='SongMeterDisplayCommand'/>
<Function name='SongMeterDisplayX'/>
<Function name='SongMeterDisplayY'/>
<Function name='SongPrefFail'/>
<Function name='SortOrderToLocalizedString'/>
<Function name='SpeedModIncMultiple'/>
<Function name='SpeedModIncLarge'/>
<Function name='SpeedModIncSize'/>
<Function name='SpeedMods'/>
<Function name='StageAwardToLocalizedString'/>
@@ -190,9 +201,9 @@
<Function name='ToEnumShortString'/>
<Function name='Trace'/>
<Function name='TrailToCustomDifficulty'/>
<Function name='TwoPartSelection'/>
<Function name='URLEncode'/>
<Function name='UnlockRewardTypeToLocalizedString'/>
<Function name='update_centering'/>
<Function name='Var'/>
<Function name='VersionDate'/>
<Function name='VersionTime'/>
@@ -203,25 +214,33 @@
<Function name='WriteGamePrefToFile'/>
<Function name='WritePrefToFile'/>
<Function name='Year'/>
<Function name='alias_one'/>
<Function name='alias_set'/>
<Function name='approach'/>
<Function name='assert'/>
<Function name='check_stop_course_early'/>
<Function name='clamp'/>
<Function name='class'/>
<Function name='collectgarbage'/>
<Function name='color'/>
<Function name='commify'/>
<Function name='convert_text_to_indented_lines'/>
<Function name='convert_xml_bgs'/>
<Function name='create_bezier'/>
<Function name='create_spline'/>
<Function name='dofile'/>
<Function name='error'/>
<Function name='fapproach'/>
<Function name='find_missing_strings_in_theme_translations'/>
<Function name='force_to_range'/>
<Function name='foreach_by_sorted_keys'/>
<Function name='foreach_ordered'/>
<Function name='gcinfo'/>
<Function name='get_music_file_length'/>
<Function name='get_sound_driver_list'/>
<Function name='getenv'/>
<Function name='getfenv'/>
<Function name='getmetatable'/>
<Function name='get_music_file_length'/>
<Function name='get_sound_driver_list'/>
<Function name='ipairs'/>
<Function name='ivalues'/>
<Function name='join'/>
@@ -230,23 +249,29 @@
<Function name='load'/>
<Function name='loadfile'/>
<Function name='loadstring'/>
<Function name='make_camel_aliases'/>
<Function name='mbstrlen'/>
<Function name='module'/>
<Function name='multiapproach'/>
<Function name='new_numpad_entry'/>
<Function name='newproxy'/>
<Function name='next'/>
<Function name='oitg_zoom_mode_actor'/>
<Function name='pairs'/>
<Function name='pause_controller_actor'/>
<Function name='pcall'/>
<Function name='pname'/>
<Function name='print'/>
<Function name='rawequal'/>
<Function name='rawget'/>
<Function name='rawset'/>
<Function name='rec_count_children'/>
<Function name='rec_print_children'/>
<Function name='rec_print_table'/>
<Function name='require'/>
<Function name='round'/>
<Function name='scale'/>
<Function name='scale_to_fit'/>
<Function name='select'/>
<Function name='setenv'/>
<Function name='setfenv'/>
@@ -254,12 +279,18 @@
<Function name='split'/>
<Function name='tableshuffle'/>
<Function name='tableslice'/>
<Function name='thified_curstage_index'/>
<Function name='tobool'/>
<Function name='tonumber'/>
<Function name='tostring'/>
<Function name='type'/>
<Function name='unpack'/>
<Function name='update_centering'/>
<Function name='width_clip_limit_text'/>
<Function name='width_clip_text'/>
<Function name='width_limit_text'/>
<Function name='wrap'/>
<Function name='wrapped_index'/>
<Function name='xpcall'/>
</GlobalFunctions>
<Classes>
+205 -106
View File
@@ -28,30 +28,54 @@ save yourself some time, copy this for undocumented things:
<Documentation xmlns='http://www.stepmania.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.stepmania.com Lua.xsd'>
<!-- Global functions -->
<GlobalFunctions>
<Description>
Many global functions are available when scripting with Lua for StepMania.<br />
Some, like <Link class='GLOBAL' function='collectgarbage' />, are core functions of Lua 5.1's <a href="https://www.lua.org/manual/5.1/manual.html#5.1" target="_blank" rel="noopener noreferrer">basic Library</a>.<br />
Others, like <Link class='GLOBAL' function='Basename' />, are defined in the StepMania engine's C++ but made available to Lua.<br />
And others, like <Link class='GLOBAL' function='DeepCopy' />, are defined in the _fallback theme's Lua files.<br />
When scripting with StepMania, keep in mind that if you do not scope your functions (and variables) using the <code>local</code> keyword, they will be global.
</Description>
<Function name='AllowOptionsMenu' theme='_fallback' return='bool' arguments=''>
[03 Gameplay.lua] Returns <code>false</code> if the player should be disallowed from entering the options menu from ScreenSelectMusic (i.e. during <Link class='GameState' function='IsAnExtraStage'>an ExtraStage</Link> or when the <Link class='ENUM' function='PlayMode' /> is Oni). Returns <code>true</code> otherwise.
</Function>
<Function name='Alpha' theme='_fallback' return='color' arguments='color c, float percent'>
[02 Colors.lua] Returns a <code>color</code> with the specified alpha.
[02 Colors.lua] Returns a <code>color</code> with HSV values matching <code>c</code> and alpha set to <code>percent</code>, where <code>percent</code> is in the range <code>0</code>..<code>1</code>.
</Function>
<Function name='approach' return='float' arguments='float current, float goal, float speed'>
Use this to make a current value approach a goal value at the given speed. Speed must not be negative. The value will not overshoot the goal.<br />
Note: When you see the error "approach: speed 1 is negative." it means that the speed value passed was negative. The 1 is there because approach and multiapproach use the same internal function and can be ignored when using approach.
</Function>
<Function name='ArbitrarySpeedMods' theme='_fallback' return='LuaOptionRow' arguments=''>
[03 CustomSpeedMods.lua]
[03 CustomSpeedMods.lua] Returns an <Link class='OptionRow' /> of speed mod choices generated from the comma-delimited list in <em>SpeedMods.txt</em> in the root of the current Profile directory (player if available, machine otherwise).
</Function>
<Function name='AreStagePlayerModsForced' theme='_fallback' return='bool' arguments=''>
[02 StageMods.lua]
[02 StageMods.lua] Returns <code>true</code> if player modifiers should be forced. This is effectively the negation of <Link class='GLOBAL' function='AllowOptionsMenu' />.
</Function>
<Function name='AreStageSongModsForced' theme='_fallback' return='bool' arguments=''>
[02 StageMods.lua]
[02 StageMods.lua] Returns <code>true</code> if song modifiers should be forced (i.e. during <Link class='GameState' function='IsAnExtraStage'>an ExtraStage</Link>, or when the <Link class='ENUM' function='PlayMode' /> is Oni, Battle, or Rave).
</Function>
<Function name='assert' return='various' arguments='LuaReference v, string sAssertMessage'>
Issues an error when <code>v</code> is <code>false</code> (or <code>nil</code>). Returns all arguments otherwise. <code>sAssertMessage</code> is an optional error message (the default is "assertion failed!").
Issues an error when <code>v</code> is <code>false</code> (or <code>nil</code>). Returns all arguments otherwise. <code>sAssertMessage</code> is an optional error message (the default is "assertion failed!").<br />
<code>assert</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='ArgsIfPlayerJoinedOrNil' theme='_fallback' return='various, various' arguments='various arg1, various arg2'>
[02 Utilities.lua] Returns two results.<br />
If P1 <Link class='GameState' function='IsSideJoined'>is joined</Link>, the first return value will be <code>arg1</code>, and <code>nil</code> otherwise.<br />
If P2 is joined, the second return value will be <code>arg2</code>, and <code>nil</code> otherwise.
</Function>
<Function name='BGFitChoiceExample' theme='_fallback' return='ActorFrame' arguments='table params'>
[04 SetBGFitHelpers.lua] Returns an ActorFrame containing examples of how a given background image (with set aspect ratio) will appear in a particular <Link class='ENUM' function='BackgroundFitMode' />.<br />
The _fallback theme uses this to visually represent choices for ScreenSetBGFit, intended to help players choose a BackgroundFitMode preference.
</Function>
<Function name='BGFitInputActor' theme='_fallback' return='ActorFrame' arguments='table choices, function LoseFocus, function GainFocus'>
[04 SetBGFitHelpers.lua] Returns an ActorFrame with an <Link class='Screen' Function='AddInputCallback'>InputCallback</Link> attached.<br />
The _fallback theme uses this to manage input on ScreenSetBGFit, intended to help players choose a <Link class='ENUM' function='BackgroundFitMode' /> preference.
</Function>
<Function name='Basename' return='string' arguments='string path'>
Returns the base name of file path.
Returns the last named component of <code>path</code>. For example, passing in <code>"/path/to/file.txt"</code> will return <code>"file.txt"</code>, while <code>"/path/to/some/directory/"</code> will return <code>"directory"</code>.
</Function>
<Function name='BoostColor' theme='_fallback' return='color' arguments='color c, float fBoost'>
[02 Colors.lua] Boosts the specified color by multiplying its values by <code>fBoost</code>.
[02 Colors.lua] Returns the color that results from multiplying <code>c</code>'s R, G, and B values by <code>fBoost</code>.
</Function>
<Function name='Brightness' theme='_fallback' return='color' arguments='color c, float percent'>
[02 Colors.lua] Modifies the brightness of the specified color.
@@ -71,7 +95,8 @@ save yourself some time, copy this for undocumented things:
Closes any connection to an online server.
</Function>
<Function name='collectgarbage' return='void' arguments='string opt, float arg'>
A generic interface to Lua's garbage collector. Performs different functions based on the value of <code>opt</code>.
A generic interface to Lua's garbage collector. Performs different functions based on the value of <code>opt</code>.<br />
<code>collectgarbage</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='color' return='color' arguments='string color'>
Returns a color from a string. <code>color</code> can be in hex (<code>"#FFFFFFFF"</code>) or 0..1 values (<code>"1.0,1.0,1.0,1.0"</code>), in RGBA order.
@@ -86,10 +111,10 @@ save yourself some time, copy this for undocumented things:
[02 Colors.lua] Returns a midtone of the color. (Specifically <code>c[1]/1.5, c[2]/1.5, c[3]/1.5, c[4]</code>)
</Function>
<Function name='ColorToHex' theme='_fallback' return='string' arguments='color c'>
[02 Colors.lua] Returns a hex representation for the specified color.
[02 Colors.lua] Accepts a color and returns the hex representation. For example, passing in <code>{1, 0, 0.4, 1}</code> will return <code>"FF0066FF"</code>.
</Function>
<Function name='ColorToHSV' theme='_fallback' return='table' arguments='color c'>
[02 Colors.lua] Takes in a color and returns a table with the HSV values.
[02 Colors.lua] Accepts a color and returns a table with the HSV values, indexed by <code>Hue</code>, <code>Sat</code>, <code>Value</code>, and <code>Alpha</code>.
</Function>
<Function name='ComboContinue' theme='_fallback' return='TapNoteScore' arguments=''>
[03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo.
@@ -101,10 +126,8 @@ save yourself some time, copy this for undocumented things:
[03 Gameplay.lua] Determines if combo should be per row (Jump = 1) or per column (Jump = 2).
</Function>
<Function name='ComboTransformCommand' theme='_fallback' return='void' arguments='Actor self, params p'>
[02 Other.lua] The combo trasform command.
</Function>
<Function name='ComboUnderField' theme='_fallback' return='bool' arguments=''>
[03 Gameplay.lua] Returns the <code>UserPrefComboUnderField</code> user preference value.
[02 Other.lua] Defines the transform function used to position player combo during gameplay. <code>params</code> will contain two boolean values indexed by <code>bReverse</code> and <code>bCentered</code>.<br />
Not intended to be called directly by themes.
</Function>
<Function name='commify' return='string' arguments='string number, string comma, string dot'>
This will take the number and insert a comma every three digits, as normal in English for writing large numbers.<br />
@@ -118,10 +141,18 @@ save yourself some time, copy this for undocumented things:
<Function name='ConnectToServer' return='bool' arguments='string sAddress'>
Tries to connect to the server at <code>sAddress</code>.
</Function>
<Function name='CourseDifficultyToLocalizedString' return='string' arguments='Difficulty d'>
Returns <Link class='ENUM' function='Difficulty' /> <code>d</code> localized for the current language using strings defined under <code>[CourseDifficulty]</code>.
</Function>
<Function name='CourseTypeToLocalizedString' return='string' arguments='CourseType ct'>
Returns <Link class='ENUM' function='CourseType' /> <code>ct</code> localized for the current language using strings defined under <code>[CourseType]</code>.
</Function>
<Function name='convert_text_to_indented_lines' theme='_fallback' return='table' arguments='BitmapText text, int indent, float width, float text_zoom'>
[02 Utilities.lua] Utillity function used to format log output for presenting on-screen. <code>indent</code> is the number of pixels to indent lines. <code>width</code> is the width in pixels that lines should be constrained to.
</Function>
<Function name='convert_xml_bgs' return='' arguments='string dir'>
Recursively searches <code>dir</code> for xml files of actors and
converts them to equivalent lua files. See Docs/Themerdocs/XmlToLua.txt
for details.
Recursively searches <code>dir</code> for xml files of actors and converts them to equivalent lua files.
See <a href="https://github.com/stepmania/stepmania/blob/HEAD/Docs/Themerdocs/XmlToLua.txt" target="_blank" rel="noopener noreferrer">Docs/Themerdocs/XmlToLua.txt</a>.
</Function>
<Function name='create_bezier' return='RageBezier2D' arguments=''>
Creates a RageBezier2D for you to use. Make sure you destroy the RageBezier2D when you're done with it, or you will have a memory leak.
@@ -138,17 +169,21 @@ save yourself some time, copy this for undocumented things:
<Function name='CustomDifficultyToLightColor' theme='_fallback' return='color' arguments='string cd'>
[02 Colors.lua]
</Function>
<Function name='CustomDifficultyToLocalizedString' return='string' arguments='string cd'>
Returns <code>cd</code> localized for the current language using strings defined under <code>[CustomDifficulty]</code>.
</Function>
<Function name='DayOfMonth' return='int' arguments=''>
Returns the current day of the month.
Returns the current day of the month in the range <code>1</code>-<code>31</code>.
</Function>
<Function name='DayOfYear' return='int' arguments=''>
Returns the current day of the year.
Returns the current day of the year in the range <code>0</code>-<code>365</code>.
</Function>
<Function name='DeepCopy' theme='_fallback' return='table' arguments='table from, table to, table already_copied'>
[02 Serialize] Recursively deep-copy a table.
</Function>
<Function name='dofile' theme='_fallback' return='chunk' arguments='string sFilePath'>
[01 base.lua] "Override Lua's dofile to use our <Link function="loadfile">loadfile</Link>."
<code>dofile</code> is normally a core function of Lua's basic library. StepMania overrides this in
[01 base.lua] to use <Link function="loadfile">loadfile</Link>, which itself has been overridden.
</Function>
<Function name='EvalUsesCheckpointsWithJudgments' theme='_fallback' return='bool' arguments=''>
[03 Gameplay.lua]
@@ -162,8 +197,8 @@ save yourself some time, copy this for undocumented things:
<Function name='find_missing_strings_in_theme_translations' return='' arguments='string theme_name, string master_lang_name'>
This function creates files in the theme's Languages folder listing all the strings that have no translation and all the strings that are unused.<br />
Strings that do not have an entry in the master language are considered unused.<br />
master_lang_name is the name of the ini file that contains the language with all strings used by the theme.<br />
Example: find_missing_strings_in_theme_translations("my_best_theme", "en.ini")
<code>master_lang_name</code> is the name of the ini file that contains the language with all strings used by the theme.<br />
Example: find_missing_strings_in_theme_translations( "my_best_theme", "en.ini" )
</Function>
<Function name='FindSelection' theme='_fallback' return='int' arguments='table list'>
[02 Utilities.lua] Return the index of a true value in <code>list</code>.
@@ -172,12 +207,16 @@ save yourself some time, copy this for undocumented things:
[02 Utilities.lua] Find a key in <code>tab</code> with the given <code>value</code>.
</Function>
<Function name='foreach_ordered' theme='_fallback' return='void' arguments='table t, function f'>
<code>func</code> takes a key and a value.
<code>f</code> takes a key and a value.
</Function>
<Function name='force_to_range' theme='default' return='float' args='float min, float number, float max'>
</Function>
<Function name='FormatNumberAndSuffix' return='string' arguments='int num'>
Returns the number passed to the function followed by its suffix (&quot;th&quot;, &quot;nd&quot;, and so on).
</Function>
<!-- FormatNumSongsPlayed -->
<Function name='FormatNumSongsPlayed' return='string' arguments='int num'>
[02 Other.lua] Concatenates <code>num</code> with " songs played" and returns the resulting string.
</Function>
<Function name='FormatPercentScore' return='string' arguments='float fPercentDancePoints'>
Returns <code>fPercentDancePoints</code> formatted as a percentage.
</Function>
@@ -187,6 +226,10 @@ save yourself some time, copy this for undocumented things:
<Function name='GetCodeForGame' theme='_fallback' return='string' arguments=''>
[03 Gameplay.lua]
</Function>
<Function name='GetCoursesToShowRanking' theme='_fallback' return='string' arguments=''>
[02 Other.lua] Returns the value of the <code>CoursesToShowRanking</code> preference if it is not an empty string.<br />
Otherwise, returns a comma-delimited set of paths to the .crs files included with StepMania as a string. This string is hardcoded and does not accurately reflect whether those crs files exist in the filesystem.
</Function>
<Function name='GetCustomDifficulty' return='string' arguments='StepsType st, Difficulty d, CourseType ct'>
Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination.
</Function>
@@ -206,23 +249,20 @@ save yourself some time, copy this for undocumented things:
Returns a corresponding <Link class='ENUM' function='Grade' /> for the given percentage.
</Function>
<Function name='GetLifeDifficulty' return='int' arguments=''>
Returns the current Life Difficulty.
Returns the current Life difficulty in the range of <code>1</code>-<code>7</code>
</Function>
<Function name='get_music_file_length' return='float' arguments='string path'>
Returns the length of the music file found at path.<br />
If you are loading the sound into an ActorSound, ActorSound:get to get its RageSound then use RageSound's get_length function instead to avoid loading the file twice.
Returns the length of the music file found at <code>path</code> in seconds.<br />
If the file has already been loaded into an ActorSound, use <Link class='ActorSound' function='get' /> to get its <code>RageSound</code>, and then use <Link class='RageSound' function='get_length' /> to avoid loading the file twice.
</Function>
<Function name='get_sound_driver_list' return='table' arguments=''>
Returns a table of the names of the sound drivers available. If the SoundDriver preference is set to something that is not in this list, StepMania WILL NOT START UP. Changes to the SoundDriver preference do not take effect until the next time StepMania starts up.
</Function>
<Function name='GetOSName' return='string' arguments=''>
Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown")
Returns a table of the names of the sound drivers available. If the SoundDriver preference is set to something that is not in this list, StepMania will not start up. Changes to the SoundDriver preference do not take effect until the next time StepMania starts up.
</Function>
<Function name='GetPlayerOrMachineProfile' theme='_fallback' return='Profile' arguments='PlayerNumber pn'>
[02 Utilities.lua] "This returns a profile, preferably a player one. If there isn't one, [it falls] back on the machine profile."
</Function>
<Function name='GetProTiming' theme='default' return='bool' arguments='PlayerNumber pn'>
[03 ThemePrefs.lua] Returns <code>true</code> if player <code>pn</code> is using ProTiming.
[03 ThemePrefs.lua] Returns <code>true</code> if player <code>pn</code> is using the <em>ProTiming</em> <Link class='GLOBAL' function='GetUserPref'>UserPref</Link>.
</Function>
<Function name='GetRandomSongBackground' theme='_fallback' return='string' arguments=''>
[02 Utilities.lua] Returns a path to a random song background.
@@ -234,7 +274,7 @@ save yourself some time, copy this for undocumented things:
[02 Actor.lua]
</Function>
<Function name='GetScreenAspectRatio' return='float' arguments=''>
Returns the display aspect ratio.
Returns the screen display aspect ratio (i.e. the <code>DisplayAspectRatio</code> preference).
</Function>
<Function name='GetServerName' return='string' arguments=''>
Returns the name of the currently connected server.
@@ -242,17 +282,21 @@ save yourself some time, copy this for undocumented things:
<Function name='GetSongBackground' theme='_fallback' return='string' arguments=''>
[02 Utilities.lua] Returns a path to the current songs background.
</Function>
<Function name='GetTapPosition' theme='_fallback' return='float' arguments=''>
<Function name='GetSpeedModeAndValueFromPoptions' theme='_fallback' return='float' arguments=''>
[03 Gameplay.lua]
</Function>
<Function name='GetTapPosition' theme='_fallback' return='int, string' arguments='PlayerNumber pn'>
[03 CustomSpeedMods.lua]
</Function>
<Function name='GetThemeAspectRatio' return='float' arguments=''>
Returns the theme's aspect ratio.
Returns the theme's aspect ratio.<br />
Specifically, this is the result of dividing <code>ScreenWidth</code> by <code>ScreenHeight</code> as each is defined under the theme's <code>[Common]</code> metric.
</Function>
<Function name='GetThemePref' theme='_fallback' return='various' arguments='string pref'>
[03 ThemePrefs.lua] (Alias for <Link class='ThemePrefs' function='Get' />.)
[03 ThemePrefs.lua] Alias for <Link class='ThemePrefs' function='Get' />.
</Function>
<Function name='GetTimingDifficulty' return='int' arguments=''>
Returns the current Timing difficulty.
Returns the current Timing difficulty in the range of <code>1</code>-<code>9</code>.
</Function>
<Function name='GetTimeSinceStart' return='float' arguments=''>
Returns the current time since the program was started. Includes time that was spent loading songs.
@@ -288,24 +332,28 @@ save yourself some time, copy this for undocumented things:
[03 Gameplay.lua] Returns <code>true</code> if you need to step on hold heads to activate them.
</Function>
<Function name='HoldTiming' theme='_fallback' return='float' arguments=''>
[03 Gameplay.lua] Returns 0 in <code>pump</code> mode, <code>TimingWindowSecondsHold</code> preference value in any other game mode.
[03 Gameplay.lua] Returns 0 when the current <Link class='Game' /> is pump. Returns the <code>TimingWindowSecondsHold</code> preference value in other games.
</Function>
<Function name='Hour' return='int' arguments=''>
Returns the current hour.
</Function>
<Function name='HSV' theme='_fallback' return='color' arguments='float h, float s, float v'>
[02 Colors.lua] Converts a color from HSV values to something StepMania can understand.
hue is from <code>0-360</code>, saturation and value are <code>0..1</code>
<Function name='HSV' theme='_fallback' return='color' arguments='float hue, float saturation, float value'>
[02 Colors.lua] Converts a color from HSV values to something StepMania can understand.<br />
<code>hue</code> is from <code>0</code>-<code>360</code><br />
<code>saturation</code> and <code>value</code> are <code>0</code>..<code>1</code>
</Function>
<Function name='HSVA' theme='_fallback' return='color' arguments='float h, float s, float v, float a'>
[02 Colors.lua] Converts a color from HSV values with alpha to something StepMania can understand.
hue is from <code>0-360</code>, saturation, value, and alpha are <code>0..1</code>
<Function name='HSVA' theme='_fallback' return='color' arguments='float hue, float saturation, float value, float alpha'>
[02 Colors.lua] Converts a color from HSV values with alpha to something StepMania can understand.<br />
hue is from <code>0</code>-<code>360</code><br />
<code>saturation</code>, <code>value</code>, and <code>alpha</code> are <code>0</code>..<code>1</code>
</Function>
<Function name='HSVToColor' theme='_fallback' return='color' arguments='table hsv'>
[02 Colors.lua] "Converts a set of HSV values to a color."
[02 Colors.lua] Converts a table of HSV values to a color.<br />
The <code>hsv</code> table should use indexes <code>Hue</code>, <code>Sat</code>, <code>Value</code>, <code>Alpha</code>.
</Function>
<Function name='HSVToHex' theme='_fallback' return='string' arguments='table hsv'>
[02 Colors.lua] "Takes in a normal color and returns the hex representation. (Adapted from code in LuaBit)"
[02 Colors.lua] Accepts a table of HSV values and returns the hex representation.
The <code>hsv</code> table should use indexes <code>Hue</code>, <code>Sat</code>, <code>Value</code>, <code>Alpha</code>.
</Function>
<Function name='Hue' theme='_fallback' return='color' arguments='color c, int newHue'>
[02 Colors.lua] Changes the hue of the input color.
@@ -313,17 +361,21 @@ save yourself some time, copy this for undocumented things:
<Function name='InitUserPrefs' theme='default' return='void' arguments=''>
[03 ThemePrefs.lua] Initializes various user preferences.
</Function>
<Function name='ipairs' theme='_fallback' return='function' arguments='table t'>
[01 base.lua] "Like ipairs(), but returns only values."
<Function name='ipairs' theme='_fallback' return='function, table, int' arguments='table t'>
Returns three values: an iterator function, the table <code>t</code>, and <code>0</code>,
so that the construction <code>for i,v in ipairs(t) do body end</code>
will iterate over the pairs (1,t[1]), (2,t[2]), ···, up to the first integer key absent from the table.<br />
<code>ipairs</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='IsArcade' theme="_fallback" return='bool' arguments=''>
[02 Utilities.lua] Returns <code>true</code> if the coin mode is not set to <Link class='ENUM' function='CoinMode'>CoinMode_Home</Link>.
</Function>
<Function name='IsEventMode' return='bool' arguments=''>
Returns <code>true</code> if Event Mode is turned on.
<Function name='IsCourse' theme="_fallback" return='bool' arguments=''>
Returns <code>true</code> if the current <Link class='ENUM' function='PlayMode' /> is Nonstop, Oni, or Endless.<br />
This is effectively the same as <Link class='GameState' function='IsCourseMode' />.
</Function>
<Function name='IsFreePlay' theme="_fallback" return='bool' arguments=''>
[02 Utilities.lua] Returns <code>true</code> <Link function='IsArcade'>if Arcade</Link> and the coin mode is <Link class='ENUM' function='CoinMode'>CoinMode_Free</Link>.
[02 Utilities.lua] Returns <code>true</code> if <Link function='IsArcade'>IsArcade()</Link> and the coin mode is <Link class='ENUM' function='CoinMode'>CoinMode_Free</Link>.
</Function>
<Function name='IsGame' theme='_fallback' return='bool' arguments='string sGame'>
[03 Gameplay.lua] Returns <code>true</code> if the current game is <code>sGame</code>.
@@ -358,6 +410,9 @@ save yourself some time, copy this for undocumented things:
<Function name='JudgmentLineToColor' theme='_fallback' return='color' arguments='JudgmentLine jl'>
[02 Colors.lua]
</Function>
<Function name='JudgmentLineToLocalizedString' return='string' arguments='JudgmentLine jl'>
Returns <Link class='ENUM' function='JudgmentLine' /> <code>jl</code> localized for the current language using strings defined under <code>[JudgmentLine]</code>.
</Function>
<Function name='JudgmentLineToStrokeColor' theme='_fallback' return='color' arguments='JudgmentLine jl'>
[02 Colors.lua]
</Function>
@@ -365,7 +420,7 @@ save yourself some time, copy this for undocumented things:
Returns a number linearly interpolated between start and end by percent.
</Function>
<Function name='lerp_color' return='color' arguments='float percent, color start, color end'>
Same as lerp, but for colors. All channels will reach the end of the interpolation at the same time.
Same as <Link class='GLOBAL' function='lerp' />, but for colors. All channels will reach the end of the interpolation at the same time.
</Function>
<Function name='LoadActor' return='ActorDef' arguments='string sPath, ...'>
Returns an Actor definition for the actor at <code>sPath</code>. If <code>sPath</code> points to a Lua file, any additional arguments will be passed to that script.
@@ -377,7 +432,8 @@ save yourself some time, copy this for undocumented things:
[02 ActorDef.lua] Loads an actor with params.
</Function>
<Function name='loadfile' theme='_fallback' return='chunk' arguments='string sFilePath'>
[01 base.lua] "Override Lua's loadfile to use <Link class="lua" function="ReadFile">lua.ReadFile</Link>."
<code>loadfile</code> is normally a core function of Lua's basic library. StepMania overrides this in
[01 base.lua] to use <Link class="lua" function="ReadFile">lua.ReadFile</Link>.
</Function>
<Function name='LoadFallbackB' theme='_fallback' return='ActorDef' arguments=''>
[02 ActorDef.lua] Load the fallback BGA for the element that is currently being loaded.
@@ -388,6 +444,9 @@ save yourself some time, copy this for undocumented things:
<Function name='LoadSongBackground' theme='_fallback' return='Sprite' arguments=''>
[02 Sprite.lua] Returns a Sprite with the current song's background.
</Function>
<Function name='make_camel_aliases' theme='_fallback' return='' arguments='Actor class'>
Iterates over all functions exposed to Lua in <code>class</code>, creating CamelCase aliases for each function. Not intended to be used by themers.
</Function>
<Function name='mbstrlen' return='int' arguments='string sString'>
Returns the length of the multi-byte character string <code>sString</code>.
</Function>
@@ -398,16 +457,17 @@ save yourself some time, copy this for undocumented things:
[03 Gameplay.lua] Returns the value to start showing the miss combo at.
</Function>
<Function name='module' return='void' arguments='string name, ...'>
Creates a module. See the Lua manual for more details.
Creates a module.<br />
<code>module</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='MonthOfYear' return='int' arguments=''>
Returns the current month of the year (<code>0</code>-<code>11</code>).
Returns the current month of the year in the range <code>0</code>-<code>11</code>.
</Function>
<Function name='MonthToLocalizedString' return='string' arguments='Month m'>
Returns Month <code>m</code> as a localized string.
Returns <Link class='ENUM' function='Month' /> <code>m</code> localized for the current language using strings defined under <code>[Month]</code>.
</Function>
<Function name='MonthToString' return='string' arguments='Month m'>
Returns Month <code>m</code> as a string.
Returns <Link class='ENUM' function='Month' /> <code>m</code> as a non-localized string.
</Function>
<Function name='multiapproach' return='table' arguments='table currents, table goals, table speeds, float multiplier'>
Similar to approach, but operates on tables of values instead of single values. This will modify the contents of <code>currents</code> in place, as well as returning <code>currents</code>.<br />
@@ -416,10 +476,10 @@ save yourself some time, copy this for undocumented things:
Note: When you see the error "approach: speed 1 is negative." it means that a speed value passed was negative. The 1 tells you which entry in the table was invalid.
</Function>
<Function name='next' return='void' arguments='table t, int index'>
"Allows a program to traverse all fields of a table. Its first argument is a
Allows a program to traverse all fields of a table. Its first argument is a
table and its second argument is an index in this table.
<code>next</code> returns the next index of the table and its associated value."
See the Lua manual for more details.
<code>next</code> returns the next index of the table and its associated value.<br />
<code>next</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='OldStyleStringToDifficulty' return='Difficulty' arguments='string dc'>
Converts a string such as 'oni' or 'expert' or 'trick' to the appropriate difficulty.
@@ -427,10 +487,12 @@ save yourself some time, copy this for undocumented things:
<Function name='OptionRowProTiming' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for ProTiming.
</Function>
<Function name='OptionRowScreenFilter' return='OptionRow' arguments=''></Function>
<Function name='pairs' return='function' arguments='table t'>
"Returns three values: the <Link class='GLOBAL' function='next' /> function, the table <code>t</code>, and <code>nil</code>,
Returns three values: the <Link class='GLOBAL' function='next' /> function, the table <code>t</code>, and <code>nil</code>,
so that the construction <code>for k,v in pairs(t) do body end</code>
will iterate over all keyvalue pairs of table <code>t</code>."
will iterate over all keyvalue pairs of table <code>t</code>.<br />
<code>pairs</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='PlayerColor' theme='_fallback' return='color' arguments='PlayerNumber pn'>
[02 Colors.lua]
@@ -438,6 +500,15 @@ save yourself some time, copy this for undocumented things:
<Function name='PlayerScoreColor' theme='_fallback' return='color' arguments='PlayerNumber pn'>
[02 Colors.lua]
</Function>
<Function name='PeakComboAwardToLocalizedString' return='string' arguments='PeakComboAward pma'>
Returns <Link class='ENUM' function='PeakComboAward' /> <code>pma</code> localized for the current language using strings defined under <code>[PeakComboAward]</code>.
</Function>
<Function name='PlayModeToLocalizedString' return='string' arguments='PlayMode pm'>
Returns <Link class='ENUM' function='PlayMode' /> <code>pm</code> localized for the current language using strings defined under <code>[PlayMode]</code>.
</Function>
<Function name='PlayerNumberToLocalizedString' return='string' arguments='PlayerNumber pn'>
Returns <Link class='ENUM' function='PlayerNumber' /> <code>pn</code> localized for the current language using strings defined under <code>[PlayerNumber]</code>.
</Function>
<Function name='pname' theme='_fallback' return='string' arguments='PlayerNumber pn'>
[02 Utilities.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2").
</Function>
@@ -448,10 +519,10 @@ save yourself some time, copy this for undocumented things:
Returns a formatted percent with the specified <code>num</code>erator and <code>den</code>ominator.
</Function>
<Function name='print' theme='_fallback' return='void' arguments='string s'>
[00 init.lua]
[00 init.lua] Alias for <Link class='GLOBAL' function='Trace' />.
</Function>
<Function name='PrintTable' theme='_fallback' return='void' arguments='table t'>
[03 ThemePrefs.lua] Prints a table's contents to the log.
[03 ThemePrefs.lua] Prints a table's contents to log.txt using <Link class='GLOBAL' function='Trace'/>.
</Function>
<Function name='ProductFamily' return='string' arguments=''>
Returns the product family. (e.g. "StepMania")
@@ -460,17 +531,23 @@ save yourself some time, copy this for undocumented things:
Returns the product ID. (e.g. "StepMania 5")
</Function>
<Function name='ProductVersion' return='string' arguments=''>
Returns the product version.
Returns the product version. (e.g. "5.0.11" or "5.1.0" or "5.2-git-96f9771")
</Function>
<Function name='RadarCategoryToLocalizedString' return='string' arguments='RadarCategory cat'>
Returns <Link class='ENUM' function='RadarCategory' /> <code>cat</code> localized for the current language using strings defined under <code>[RadarCategory]</code>.
</Function>
<Function name='rawequal' return='bool' arguments='various v1, various v2'>
"Checks whether <code>v1</code> is equal to <code>v2</code>, without invoking any metamethod."
Checks whether <code>v1</code> is equal to <code>v2</code>, without invoking any metamethod.<br />
<code>rawequal</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='rawget' return='various' arguments='table t, various index'>
"Gets the real value of <code>t[index]</code>, without invoking any metamethod."
Gets the real value of <code>t[index]</code>, without invoking any metamethod.<br />
<code>rawget</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='rawset' return='table' arguments='table t, int index, various value'>
"Sets the real value of <code>t[index]</code> to <code>value</code>, without invoking any metamethod."
The modified <code>t</code> is then returned.
Sets the real value of <code>t[index]</code> to <code>value</code>, without invoking any metamethod.
The modified <code>t</code> is then returned.<br />
<code>rawset</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='ResolveRelativePath' theme='_fallback' return='string' arguments='string path, int level, bool optional'>
[02 ActorDef.lua] Used internally by LoadActor to resolve a path. If <code>optional</code> is true, then a nil path is returned instead of emitting an error if no file is found.
@@ -482,18 +559,19 @@ save yourself some time, copy this for undocumented things:
[03 UserPreferences2.lua] (internal) Reads the specified user preference from its config file.
</Function>
<Function name='rec_print_children' theme='_fallback' return='' arguments='ActorFrame a, string indent'>
Recursively prints all the children of the actor frame to the log file. This can be useful for finding out what actors are on a screen or just seeing what the structure of the actor tree looks like.<br />
[02 Utilities.lua] Recursively prints all the children of the actor frame to the log file. This can be useful for finding out what actors are on a screen or just seeing what the structure of the actor tree looks like.<br />
<code>indent</code> is an optional argument that will be prepended to every line.
</Function>
<Function name='rec_print_table' theme='_fallback' return='' arguments='table t, string indent'>
Recursively prints all values in the table to the log file in the form "(key_type) key: (value_type) value" so that you know the type of the key and the value. Useful if you're not sure exactly what is in a table passed as a parameter.<br />
[02 Utilities.lua] Recursively prints all values in the table to the log file in the form "(key_type) key: (value_type) value" so that you know the type of the key and the value. Useful if you're not sure exactly what is in a table passed as a parameter.<br />
<code>indent</code> is an optional argument that will be prepended to every line.
</Function>
<Function name='ReportStyle' return='void' arguments=''>
Sends the current style to the server.
</Function>
<Function name='require' return='void' arguments='string modname'>
Loads the specified module. See the Lua manual for more information.
Loads the specified module.<br />
<code>require</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='round' theme='_fallback' return='int' arguments='float val, int decimal'>
[02 Utilities.lua] Round a number.
@@ -508,20 +586,27 @@ save yourself some time, copy this for undocumented things:
[02 Colors.lua] Modifies the saturation of the specified color
</Function>
<Function name='SaveScreenshot' return='bool, string' arguments='PlayerNumber pn, bool compress, bool sign, string prefix, string suffix'>
Saves a screenshot. If pn is nil, saves to the machine's Screenshots dir, otherwise saves to the profile's Screenshots dir. Saves as jpg if compress is true, or png if compress is false. The screenshot is signed if sign is true. prefix and suffix are optional strings to add to the beginning and end of the filename.<br/>
Saves a screenshot. If pn is nil, saves to the machine's Screenshots dir, otherwise saves to the profile's Screenshots dir. Saves as jpg if compress is true, or png if compress is false. The screenshot is signed if sign is true. prefix and suffix are optional strings to add to the beginning and end of the filename.<br />
Returns success and full path of the resulting screenshot.
</Function>
<Function name='scale' return='float' arguments='float x, float low1, float high1, float low2, float high2'>
Scales <code>x</code>, originally within <code>low1</code> and <code>high1</code>, to fall between <code>low2</code> and <code>high2</code>.
</Function>
<Function name='scale_to_fit' theme='default' return='' arguments='Actor a, float width, float height'>
</Function>
<Function name='ScoreKeeperClass' theme='_fallback' return='string' arguments=''>
[03 Gameplay.lua] Returns the primary ScoreKeeper class to use.
</Function>
<Function name='ScreenColor' theme='default' return='string' arguments='string screen'>
[02 Colors.lua]
</Function>
<Function name='ScreenMetric' theme='_fallback' return='string' arguments='string s'>
[00 alias.lua, 02 Other.lua] alias for <Link class='Screen' function='Metric' />.
[02 Other.lua] alias for <Link class='Screen' function='Metric' />.
</Function>
<Function name='ScreenSelectStylePositions' arguments='int count' return='{{float, float}}'>
</Function>
<Function name='ScreenString' theme='_fallback' return='string' arguments='string s'>
[00 alias.lua, 02 Other.lua] alias for <Link class='Screen' function='String' />.
[02 Other.lua] alias for <Link class='Screen' function='String' />.
</Function>
<Function name='Second' return='int' arguments=''>
Returns the current second.
@@ -570,15 +655,24 @@ save yourself some time, copy this for undocumented things:
<Function name='ShowStandardDecoration' theme='_fallback' return='bool' arguments='string sMetricsName'>
[02 ActorDef.lua] Returns <code>true</code> if a decoration should be shown on the current screen or not.
</Function>
<Function name='SortOrderToLocalizedString' return='string' arguments='SortOrder so'>
Returns <Link class='ENUM' function='SortOrder' /> <code>so</code> localized for the current language using strings defined under <code>[SortOrder]</code>.
</Function>
<Function name='SpeedMods' theme='_fallback' return='LuaOptionRow' arguments=''>
[03 CustomSpeedMods.lua] Returns a Lua option row with the custom speed mods defined in SpeedMods.txt.
</Function>
<Function name='split' theme='_fallback' return='table' arguments='string delimiter, string text'>
[02 Utilities.lua] Splits a string at every occurence of <code>delimiter</code>, returning a table of the results.
</Function>
<Function name='StageAwardToLocalizedString' return='string' arguments='StageAward sa'>
Returns <Link class='ENUM' function='StageAward' /> <code>sa</code> localized for the current language using strings defined under <code>[StageAward]</code>.
</Function>
<Function name='StageToColor' theme='_fallback' return='color' arguments='Stage s'>
[02 Colors.lua]
</Function>
<Function name='StageToLocalizedString' return='string' arguments='Stage i'>
Returns <Link class='ENUM' function='Stage' /> <code>i</code> localized for the current language using strings defined under <code>[Stage]</code>.
</Function>
<Function name='StageToStrokeColor' theme='_fallback' return='color' arguments='Stage s'>
[02 Colors.lua]
</Function>
@@ -600,58 +694,82 @@ save yourself some time, copy this for undocumented things:
<Function name='TableStringLookup' theme='_fallback' return='table' arguments='table t, string group'>
[02 Utilities.lua] Look up each value in a table, returning a table with the resulting strings.
</Function>
<Function name='TapNoteScoreToLocalizedString' return='string' arguments='TapNoteScore tns'>
Returns <Link class='ENUM' function='TapNoteScore' /> <code>tns</code> localized for the current language using strings defined under <code>[TapNoteScore]</code>.
</Function>
<Function name='TextBannerAfterSet' theme='default' return='void' arguments=''>
[02 TextBanner.lua] This function defines how the TextBanner is laid out.
[02 TextBanner.lua] Defines how the <Link class='TextBanner' /> is laid out.
</Function>
<Function name='thified_curstage_index' theme='default' return='string' arguments='bool OnEval'>
[04 Other.lua]
</Function>
<Function name='tobool' theme='_fallback' return='bool' arguments='various v'>
[02 Utilities.lua] Converts a string or number to a bool.
</Function>
<Function name='tonumber' return='float' arguments='various e, int base'>
Tries to convert <code>e</code> to a number. Returns <code>nil</code> if
it can't convert the input to a number. (<code>base</code> is optional.)
Tries to convert <code>e</code> to a number. Returns <code>nil</code> if it can't convert the input to a number. (<code>base</code> is optional.) <br />
<code>tonumber</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='tostring' return='string' arguments='various e'>
Converts <code>e</code> to a string.
Converts <code>e</code> to a string.<br />
<code>tostring</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='ToEnumShortString' theme='_fallback' return='string' arguments='enum e'>
[02 Enum.lua] Returns a string representing an enum starting from '_'. For example, passing <Link class='ENUM' function='PlayerNumber'>PlayerNumber_P1</Link> to this function will return <code>P1</code>.
[02 Enum.lua] Returns a string representing an enum starting from '_'. For example, passing <Link class='ENUM' function='PlayerNumber'>PlayerNumber_P1</Link> to this function will return "P1".
</Function>
<Function name='Trace' theme='_fallback' return='void' arguments='string sString'>
[00 init.lua] Alias for <Link class='lua' function='Trace' />.
</Function>
<Function name='type' return='string' arguments='various v'>
Returns the type of the object as a string. See the Lua manual for valid return values.
Returns the type of the object as a string. There are eight basic types in Lua:
<em>nil</em>, <em>boolean</em>, <em>number</em>, <em>string</em>, <em>function</em>, <em>userdata</em>, <em>thread</em>, and <em>table</em>. <br />
See the Lua manual for more details.
</Function>
<Function name='UnlockRewardTypeToLocalizedString' return='string' arguments='UnlockRewardType i'>
Returns <Link class='ENUM' function='UnlockRewardType' /> <code>i</code> localized for the current language using strings defined under <code>[UnlockRewardType]</code>.
</Function>
<Function name='unpack' return='various' arguments='table list, int i, int j'>
"Returns the elements from the given table.
This function is equivalent to <code>return list[i], list[i+1], ···, list[j]</code>"
(<code>i</code> and <code>j</code> are optional; "by default, i is 1 and j is the length of the list.")
Returns the elements from table <code>list</code>. This function is equivalent to <code>return list[i], list[i+1], ···, list[j]</code>.<br />
<code>i</code> and <code>j</code> are optional; by default, <code>i</code> is <code>1</code> and <code>j</code> is the length of the list.<br />
<code>unpack</code> is a core function of Lua's basic library; see the Lua manual for more details.
</Function>
<Function name='URLEncode' return='string' arguments='string sInput'>
Returns a string with characters escaped for URLs. (e.g. a space becomes '%20')
</Function>
<Function name='update_centering' return='' arguments=''>
This tells Stepmania to update the screen position for any changes to these preferences: CenterImageAddWidth, CenterImageAddHeight, CenterImageTranslateX, CenterImageTranslateY.<br />
This tells StepMania to update the screen position for any changes to these preferences: CenterImageAddWidth, CenterImageAddHeight, CenterImageTranslateX, CenterImageTranslateY.<br />
This way, a theme can implement a custom interactive screen for adjusting those preferences.
</Function>
<Function name='Var' theme='_fallback' return='ThreadVariable' arguments=''>
[01 base.lua] Alias for <Link class="lua" function="GetThreadVariable">lua.GetThreadVariable</Link>.
</Function>
<Function name='VersionDate' return='string' arguments=''>
Returns the current version's build date.
Returns the current version's build date, formatted as YYYYMMDD.
</Function>
<Function name='VersionTime' return='string' arguments=''>
Returns the current version's build time.
Returns the current version's build time, formatted as HH:MM:SS.
</Function>
<Function name='Warn' theme='_fallback' return='void' arguments='string sString'>
[00 init.lua] Alias for <Link class='lua' function='Warn' />.
</Function>
<Function name='Weekday' return='int' arguments=''>
Returns the current weekday in the range of <code>0</code>-<code>6</code>, where Sunday is <code>0</code>.
</Function>
<Function name='WideScale' theme='_fallback' return='float' arguments='float ar43, float ar169'>
[04 WidescreenHelpers.lua] Depending on the screen width, scales between <code>ar43</code> (4:3; 640px) and <code>ar169</code> (16:9; 854px).
</Function>
<Function name='wrap' theme='_fallback' return='float' arguments='float val, float n'>
[02 Utilities.lua]
</Function>
<Function name='width_limit_text' theme='_fallback' return='' arguments='BitmapText text, float limit, float natural_zoom'>
[02 Utilities.lua]
</Function>
<Function name='width_clip_text' theme='_fallback' return='' arguments='BitmapText text, float limit'>
[02 Utilities.lua]
</Function>
<Function name='width_clip_limit_text' theme='_fallback' return='' arguments='BitmapText text, float limit, float natural_zoom'>
[02 Utilities.lua]
</Function>
<Function name='WrapInActorFrame' theme='_fallback' return='ActorFrame' arguments='table children'>
[02 ActorDef.lua] Wraps the children in an ActorFrame.
</Function>
@@ -667,25 +785,6 @@ save yourself some time, copy this for undocumented things:
<Function name='Year' return='int' arguments=''>
Returns the current year.
</Function>
<Function name='UserPrefAutoSetStyle' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for toggling AutoSetStyle.
</Function>
<Function name='UserPrefGameplayShowScore' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for displaying the score on ScreenGameplay.
</Function>
<Function name='UserPrefGameplayShowStepsDisplay' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for displaying the StepsDisplay on ScreenGameplay.
</Function>
<Function name='UserPrefGameplayLongFail' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for determining the fail length.
</Function>
<Function name='UserPrefNotePosition' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for determining the receptor arrow position.
</Function>
<Function name='UserPrefShowLotsaOptions' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row determining how deep the player options menu should go.
</Function>
</GlobalFunctions>
<!-- Namespaces -->