[02 Colors.lua] Returns a `color` with the specified alpha.
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.
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.
[03 CustomSpeedMods.lua]
[02 StageMods.lua]
[02 StageMods.lua]
Issues an error when `v` is `false` (or `nil`). Returns all arguments otherwise. `sAssertMessage` is an optional error message (the default is "assertion failed!").
Returns the base name of file path.
[02 Colors.lua] Boosts the specified color by multiplying its values by `fBoost`.
[02 Colors.lua] Modifies the brightness of the specified color.
[02 Utilities.lua] Returns `true` if Center 1P is being used.
[03 Gameplay.lua] Returns `true` if checkpoint judgments and tap judgments are considered separate, or `false` otherwise.
CLAMP is an all-female Japanese mangaka group that formed in the mid 1980s. Erm, I mean... Clamps `fValue` between `fLow` and `fHigh`.
[04 KeymapGuard.lua]
Closes any connection to an online server.
A generic interface to Lua's garbage collector. Performs different functions based on the value of `opt`.
Returns a color from a string. `color` can be in hex (`"#FFFFFFFF"`) or 0..1 values (`"1.0,1.0,1.0,1.0"`), in RGBA order.
[02 Colors.lua] Returns a darker tone of the color. (Specifically `c[1]/2, c[2]/2, c[3]/2, c[4]`)
[02 Colors.lua] Returns a lighter tone of the color. (Specifically `c[1]+(c[1]/2), c[2]+(c[2]/2), c[3]+(c[3]/2), c[4]`)
[02 Colors.lua] Returns a midtone of the color. (Specifically `c[1]/1.5, c[2]/1.5, c[3]/1.5, c[4]`)
[02 Colors.lua] Returns a hex representation for the specified color.
[02 Colors.lua] Takes in a color and returns a table with the HSV values.
[03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo.
[03 Gameplay.lua] Determines what TapNoteScore allows for maintaining the combo.
[03 Gameplay.lua] Determines if combo should be per row (Jump = 1) or per column (Jump = 2).
[02 Other.lua] The combo trasform command.
[03 Gameplay.lua] Returns the `UserPrefComboUnderField` user preference value.
This will take the number and insert a comma every three digits, as normal in English for writing large numbers.
number
can be a string, an integer, or a float.
comma
is an optional argument that is used instead of a comma.
"commify(1234, 'cat')" will result in "1cat234".
dot
is an optional argument that is used instead of a dot to find the end of the part that should be commified.
"commify('1234cat5678', ',', 'cat')" will result in "1,234cat5678", but "commify('1234cat5678')" will result in "12,34c,at5,678".
The `comma` and `dot` arguments are provided to ease compliance with locales or languages that do not use comma and dot in numbers the way English does.
Tries to connect to the server at `sAddress`.
Recursively searches `dir` for xml files of actors and converts them to equivalent lua files. See Docs/Themerdocs/XmlToLua.txt for details.
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.
Creates a CubicSplineN for you to use. Make sure you destroy the CubicSplineN when you're done with it, or you will have a memory leak.
[02 Colors.lua]
[02 Colors.lua]
[02 Colors.lua]
Returns the current day of the month.
Returns the current day of the year.
[02 Serialize] Recursively deep-copy a table.
[01 base.lua] "Override Lua's dofile to use our loadfile."
[03 Gameplay.lua]
[03 Gameplay.lua]
[02 Utilities.lua] Old name for approach.
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.
Strings that do not have an entry in the master language are considered unused.
master_lang_name is the name of the ini file that contains the language with all strings used by the theme.
Example: find_missing_strings_in_theme_translations("my_best_theme", "en.ini")
[02 Utilities.lua] Return the index of a true value in `list`.
[02 Utilities.lua] Find a key in `tab` with the given `value`.
func
takes a key and a value.
Returns the number passed to the function followed by its suffix ("th", "nd", and so on).
Returns `fPercentDancePoints` formatted as a percentage.
[03 Gameplay.lua] Returns a list of valid styles for the current gametype.
[03 Gameplay.lua]
Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination.
[04 Scoring.lua] "Get the radar values directly. The individual steps aren't used much."
[02 Other.lua] Returns a string with the Edit Mode SubScreens.
[03 EnvUtils2.lua] Returns the value of `name` from the Env table.
[03 Gameplay.lua] Returns the number at which the Extra color should be used.
Returns a corresponding for the given percentage.
Returns the current Life Difficulty.
Returns the length of the music file found at path.
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 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.
Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown")
[02 Utilities.lua] "This returns a profile, preferably a player one. If there isn't one, [it falls] back on the machine profile."
[03 ThemePrefs.lua] Returns `true` if player `pn` is using ProTiming.
[02 Utilities.lua] Returns a path to a random song background.
[02 Actor.lua]
[02 Actor.lua]
Returns the display aspect ratio.
Returns the name of the currently connected server.
[02 Utilities.lua] Returns a path to the current songs background.
[03 Gameplay.lua]
Returns the theme's aspect ratio.
[03 ThemePrefs.lua] (Alias for .)
Returns the current Timing difficulty.
Returns the current time since the program was started. Includes time that was spent loading songs.
[01 alias.lua]
[01 alias.lua]
[04 Scoring.lua] "Retrieve the amount of taps/holds/rolls involved." Used in some scoring formulas.
[03 UserPreferences2.lua] Themer-facing function for getting a user preference.
[03 UserPreferences2.lua] Themer-facing function for getting a user preference as a boolean.
[03 UserPreferences2.lua] Themer-facing function for getting a user preference as a color.
[03 UserPreferences2.lua] Themer-facing function for getting a user preference as a number.
[02 Colors.lua] Returns the color's alpha if it has any, otherwise returns 1.
[03 Gameplay.lua] Returns the value to start showing the combo at.
[03 Gameplay.lua] Returns `true` if you need to step on hold heads to activate them.
[03 Gameplay.lua] Returns 0 in `pump` mode, `TimingWindowSecondsHold` preference value in any other game mode.
Returns the current hour.
[02 Colors.lua] Converts a color from HSV values to something StepMania can understand. hue is from `0-360`, saturation and value are `0..1`
[02 Colors.lua] Converts a color from HSV values with alpha to something StepMania can understand. hue is from `0-360`, saturation, value, and alpha are `0..1`
[02 Colors.lua] "Converts a set of HSV values to a color."
[02 Colors.lua] "Takes in a normal color and returns the hex representation. (Adapted from code in LuaBit)"
[02 Colors.lua] Changes the hue of the input color.
[03 ThemePrefs.lua] Initializes various user preferences.
[01 base.lua] "Like ipairs(), but returns only values."
[02 Utilities.lua] Returns `true` if the coin mode is not set to CoinMode_Home.
Returns `true` if Event Mode is turned on.
[02 Utilities.lua] Returns `true` if Arcade and the coin mode is CoinMode_Free.
[03 Gameplay.lua] Returns `true` if the current game is `sGame`.
[02 Utilities.lua] Returns `true` if the coin mode is set to CoinMode_Home.
Returns `true` if connected to the Internet.
Returns `true` if connected to StepMania Online.
Returns `true` if Player `pn` is logged on to a SMOnline server.
[04 Scoring.lua] Returns `true` if W1 is allowed (and `tns == 'TapNoteScore_W2'`)
[02 Branches.lua] Returns `true` if Routine mode is being played.
[04 WidescreenHelpers.lua] Returns `true` if the aspect ratio is 16:10 (`1.6`) or higher.
[01 base.lua] "Like ipairs(), but returns only values."
[02 Utilities.lua] Joins a table, splitting each item with `delimiter`, returning a string of the results.
[02 Colors.lua]
[02 Colors.lua]
Returns a number linearly interpolated between start and end by percent.
Same as lerp, but for colors. All channels will reach the end of the interpolation at the same time.
Returns an Actor definition for the actor at `sPath`. If `sPath` points to a Lua file, any additional arguments will be passed to that script.
[02 ActorDef.lua] Loads an actor template. This is the actual core of LoadActor.
[02 ActorDef.lua] Loads an actor with params.
[01 base.lua] "Override Lua's loadfile to use lua.ReadFile."
[02 ActorDef.lua] Load the fallback BGA for the element that is currently being loaded.
[02 ActorDef.lua] Loads a font.
[02 Sprite.lua] Returns a Sprite with the current song's background.
Returns the length of the multi-byte character string `sString`.
Returns the current Minute.
[03 Gameplay.lua] Returns the value to start showing the miss combo at.
Creates a module. See the Lua manual for more details.
Returns the current month of the year (`0`-`11`).
Returns Month `m` as a localized string.
Returns Month `m` as a string.
Similar to approach, but operates on tables of values instead of single values. This will modify the contents of `currents` in place, as well as returning `currents`.
currents
, `goals`, and `speeds` must all be the same size and contain only numbers.
multiplier
is optional. The speeds in the speeds table will be multiplied by `multiplier`. This makes it more convenient to use multiapproach in a per-frame update: pass in the frame delta and the speeds will be scaled to the time that passed.
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.
"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. `next` returns the next index of the table and its associated value." See the Lua manual for more details.
Converts a string such as 'oni' or 'expert' or 'trick' to the appropriate difficulty.
[03 ThemePrefs.lua] Returns a Lua option row for ProTiming.
"Returns three values: the function, the table `t`, and `nil`, so that the construction `for k,v in pairs(t) do body end` will iterate over all key–value pairs of table `t`."
[02 Colors.lua]
[02 Colors.lua]
[02 Utilities.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2").
[02 Actor.lua] Returns either `p1val` or `p2val` depending on `pn`.
Returns a formatted percent with the specified `num`erator and `den`ominator.
[00 init.lua]
[03 ThemePrefs.lua] Prints a table's contents to the log.
Returns the product family. (e.g. "StepMania")
Returns the product ID. (e.g. "StepMania 5")
Returns the product version.
"Checks whether `v1` is equal to `v2`, without invoking any metamethod."
"Gets the real value of `t[index]`, without invoking any metamethod."
"Sets the real value of `t[index]` to `value`, without invoking any metamethod." The modified `t` is then returned.
[02 ActorDef.lua] Used internally by LoadActor to resolve a path. If `optional` is true, then a nil path is returned instead of emitting an error if no file is found.
[04 FileUtils.lua] Reads the file at `path` and returns its contents.
[03 UserPreferences2.lua] (internal) Reads the specified user preference from its config file.
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.
indent
is an optional argument that will be prepended to every line.
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.
indent
is an optional argument that will be prepended to every line.
Sends the current style to the server.
Loads the specified module. See the Lua manual for more information.
[02 Utilities.lua] Round a number.
[03 Gameplay.lua] Returns the routine noteskin for player .
[03 Gameplay.lua] Returns the routine noteskin for player 2.
[02 Colors.lua] Modifies the saturation of the specified color
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.
Returns success and full path of the resulting screenshot.
Scales `x`, originally within `low1` and `high1`, to fall between `low2` and `high2`.
[03 Gameplay.lua] Returns the primary ScoreKeeper class to use.
[00 alias.lua, 02 Other.lua] alias for .
[00 alias.lua, 02 Other.lua] alias for .
Returns the current second.
Converts `fSecs` to Minutes:Seconds:Milliseconds format using two digits for each section.
Converts `fSecs` to Minutes:Seconds.Milliseconds format using two digits for each section except Minutes (uses 1).
Converts `fSecs` to Minutes:Seconds format.
Converts `fSecs` to Minutes:Seconds.Milliseconds format.
Converts `fSecs` to Minutes:Seconds.Milliseconds format using two digits for each section.
Converts `fSecs` to Minutes:Seconds.Milliseconds format using two digits for each section except Milliseconds (uses 3).
"If `index` is a number, returns all arguments after argument number `index`. Otherwise, `index` must be the string `"#"`, and [it] returns the total number of extra arguments it received."
[02 Branches.lua] Determines the correct music/course selection screen to use and returns it.
[03 Gameplay.lua] (soon to be deprecated) Returns a list of codes to use on ScreenSelectProfile.
[02 Serialize.lua] Serialize the table `t`.
[03 EnvUtils2.lua] Sets the value of `name` to `value` in the Env table.
[03 UserPreferences2.lua] Themer-facing function for setting a user preference.
[03 Gameplay.lua]
[02 ActorDef.lua] Returns `true` if a decoration should be shown on the current screen or not.
[03 CustomSpeedMods.lua] Returns a Lua option row with the custom speed mods defined in SpeedMods.txt.
[02 Utilities.lua] Splits a string at every occurence of `delimiter`, returning a table of the results.
[02 Colors.lua]
[02 Colors.lua]
[02 ActorDef.lua]
[02 ActorDef.lua]
[02 ActorDef.lua]
[02 Utilities.lua] Returns a shuffled version of `t`.
[02 Utilities.lua] Returns a slice of the specified table of size `num`.
[02 Utilities.lua] Look up each value in a table, returning a table with the resulting strings.
[02 TextBanner.lua] This function defines how the TextBanner is laid out.
[02 Utilities.lua] Converts a string or number to a bool.
Tries to convert `e` to a number. Returns `nil` if it can't convert the input to a number. (`base` is optional.)
Converts `e` to a string.
[02 Enum.lua] Returns a string representing an enum starting from '_'. For example, passing PlayerNumber_P1 to this function will return `P1`.
[00 init.lua] Alias for .
Returns the type of the object as a string. See the Lua manual for valid return values.
"Returns the elements from the given table. This function is equivalent to `return list[i], list[i+1], ···, list[j]`" (`i` and `j` are optional; "by default, i is 1 and j is the length of the list.")
Returns a string with characters escaped for URLs. (e.g. a space becomes '%20')
This tells Stepmania to update the screen position for any changes to these preferences: CenterImageAddWidth, CenterImageAddHeight, CenterImageTranslateX, CenterImageTranslateY.
This way, a theme can implement a custom interactive screen for adjusting those preferences.
[01 base.lua] Alias for lua.GetThreadVariable.
Returns the current version's build date.
Returns the current version's build time.
[00 init.lua] Alias for .
[04 WidescreenHelpers.lua] Depending on the screen width, scales between `ar43` (4:3; 640px) and `ar169` (16:9; 854px).
[02 Utilities.lua]
[02 ActorDef.lua] Wraps the children in an ActorFrame.
[04 FileUtils.lua] Writes `buf` to the file at `path`.
[03 GamePreferences.lua]
[03 UserPreferences2.lua] (internal) Writes user preference `prefName` to its config file with `value` being `tostring`'d.
Returns the current year.
[03 ThemePrefs.lua] Returns a Lua option row for toggling AutoSetStyle.
[03 ThemePrefs.lua] Returns a Lua option row for displaying the score on ScreenGameplay.
[03 ThemePrefs.lua] Returns a Lua option row for displaying the StepsDisplay on ScreenGameplay.
[03 ThemePrefs.lua] Returns a Lua option row for determining the fail length.
[03 ThemePrefs.lua] Returns a Lua option row for determining the receptor arrow position.
[03 ThemePrefs.lua] Returns a Lua option row determining how deep the player options menu should go.
Returns the for the file at `sPath`.
Returns `true` if `sClassName` is a registered Class.
Loads all commands and sets X and Y for the specified Actor.
Used internally by LoadActor to resolve a path. If `optional` is true, then a nil path is returned instead of emitting an error if no file is found.
Updates ArrowEffects, which sets current values for Tornado, Invert, and Beat.
Returns the Y Offset of a note in column `iCol` at beat `fNoteBeat` for the provided PlayerState. Y Offset is affected by Speed mods and Accel mods, and impacts most other arrow effects.
Returns the Y position of a note in column `iCol` with a Y offset of `fYOffset` for the provided PlayerState.
fYReverseOffsetPixels
is the separation between targets with and without reverse. This argument is optional and will pull defaults from the metrics for `[Player]`
Returns the Y offset of a note in column `iCol` with a Y position of `fYPos` for the provided PlayerState.
fYReverseOffsetPixels
is the separation between targets with and without reverse. This argument is optional and will pull defaults from the metrics for `[Player]`
Returns the X position of a note in column `iCol` with a Y offset of `fYOffset` for the provided PlayerState.
Returns the Z position of a note in column `iCol` with a Y offset of `fYOffset` for the provided PlayerState.
Returns the X rotation of a note with a Y offset of `fYOffset` for the provided PlayerState.
Returns the Y rotation of a note with a Y offset of `fYOffset` for the provided PlayerState.
Returns the Z rotation of a note at beat `fNoteBeat` for the provided PlayerState.
bIsHoldHead
is an optional argument which defaults to false. If true, this function will return `0` if the [ArrowEffects] metric `DizzyHoldHeads` is false.
Returns the Z rotation of the receptors for the provided PlayerState.
Returns the Alpha of a note in column `iCol` with a Y offset of `fYOffset` for the provided PlayerState.
fPercentFadeToFail
is optional and defaults to -1.
fYReverseOffsetPixels
is the separation between targets with and without reverse. This argument is optional and will pull defaults from the metrics for `[Player]`
fDrawDistanceBeforeTargetsPixels
is optional and will pull defaults from the `[Player]` metric `DrawDistanceBeforeTargetsPixels`
fFadeInPercentOfDrawFar
is optional and will pull defaults from the `[NoteField]` metric `FadeBeforeTargetsPercent`
Returns the Glow of a note in column `iCol` with a Y offset of `fYOffset` for the provided PlayerState. The arguments are the same as for GetAlpha.
Returns the brightness of a note at beat `fNoteBeat` for the provided PlayerState.
Returns true if any arrow effects for the provided PlayerState require the z buffer.
Returns the zoom of a note for the provided PlayerState.
Returns the FrameWidthScale of a hold part with a Y offset of `fYOffset` for the provided PlayerState.
fOverlappedTime
is optional and will default to 0.
Enumerated types are lookup tables associating a string to each numerical value for each Enum. For example, `[1]` would be the string `'PlayerNumber_P1'`.
The functions defined in the `Enum` namespace are valid member functions of every Enum where the first argument is omitted and the name of the Enum is used in place of `Enum`. Instead of `Enum.GetName( )` or `Enum.Reverse( )`, one can use `:GetName()` or `:Reverse()`, respectively.
Both `x` and `y` need to be elements of the enumerated type `e`. Returns a value less than/greater than/equal to `0` corresponding to the numerical value of `x` being less than/greater than/equal to the numerical value of `y` as determined by `Enum.Reverse( e )`.
Returns the type of `e`. For example, `Enum.GetName( )` will return the string `'PlayerNumber'`.
Returns a reverse lookup table for the enumerated type `e`. For example:
local r = Enum.Reverse( );
local n = r['PlayerNumber_P2'];
The value of `n` in this case would be `1` corresponding to the 0-based indexing using in C++ and not `2` as might be expected for the 1-based indexing used in Lua.
Returns `true` if the type of `v` is `sType`.
Flushes log files to disk.
Tries to read the file at `sPath`. If successful, it returns the file's contents. If unsuccessful, it returns two values: `nil` and `"error"`.
Reports the error through the error reporting system. error_type is the type used for the dialog that is presented, a dialog will not appear for a type the user has chosen to ignore.
error is optional an defaults to "Script error occurred.". error_type is optional and defaults to "LUA_ERROR".
Calls `func(...)` with two LuaThreadVariables set, and returns the return values of `func()`.
Writes `sString` to log.txt. Aliased by .
Writes `sString` to info.txt and log.txt as a warning. Aliased by .
Returns a random number. Without arguments, the number is in the range `0..1`. With a single argument (`n`), the number is in the range of `1..n`. With two arguments (`lower`, `upper`), the number is in the range of `l..u`.
Sets the seed of the random number generator to `seed`.
Creates a RageFile handle with which one can use the commands in .
Gets the credits message for Player `pn`.
Returns a table with the playable Steps for the present Song based on the present Game.
Returns true if the song's steps (`st`) are playable.
Returns true if the song's StepsType (`st`) are playable.
Returns the number of songs in a Trail.
Returns the Trail's total length in seconds.
This adds a wrapper state around the Actor, which is like wrapping the Actor in an ActorFrame, except that you can use it on any actor, and add or remove wrapper states in response to things that happen while the screen is being used. (wrapping an Actor in an ActorFrame normally requires setting it up before the screen starts)
The ActorFrame that is returned is the wrapper state, for convenience.
An Actor can have any number of wrapper states. Use GetWrapperState to access wrapper states for the actor.
Returns the number of wrapper states the actor has.
Returns the wrapper state at index i. Think of wrapper states with a higher index as being "further out". Actor is inside Wrapper 1, Wrapper 1 is inside Wrapper 2, Wrapper 2 is inside Wrapper 3, and so on.
Removes the wrapper state at index i.
Returns the Actor's parent, or `nil` if it doesn't have one.
Returns the Actor's fake parent, or `nil` if it doesn't have one.
Sets the Actor's fake parent to p, or clears it if p is nil.
Returns the Actor's visibility.
Returns the Actor's x position.
Returns the Actor's y position.
Returns the Actor's z position.
Returns what the Actor's x position will be when it reaches its destination tween state.
Returns what the Actor's y position will be when it reaches its destination tween state.
Returns what the Actor's z position will be when it reaches its destination tween state.
Returns the Actor's zoom.
Returns the Actor's X zoom.
Returns the Actor's Y zoom.
Returns the Actor's Z zoom.
Sets Texture Filtering for an Actor to `b`.
Plays the commands that follow at an accelerated rate (`fRate` * `fRate`), where `fRate` is in seconds.
Adds a command to the Actor.
Adds `rot` to the Actor's current x rotation.
Adds `rot` to the Actor's current y rotation.
Adds `rot` to the Actor's current z rotation.
Adds `xPos` to the Actor's current x position.
Adds `yPos` to the Actor's current y position.
Adds `zPos` to the Actor's current z position.
[02 Actor.lua] Sets the alignment of an Actor, where `h` and `v` are in the range 0..1.
Sets whether or not the Actor should animate.
Sets the Actor's aux value. (This can be a solution for coupling data with an Actor.)
If `true`, cull the Actor's back faces. See also: .
Sets the Actor's base alpha to `fAlpha`, where `fAlpha` is in the range 0..1.
Sets the Actor's base X rotation to `rot`.
Sets the Actor's base Y rotation to `rot`.
Sets the Actor's base Z rotation to `rot`.
Sets the Actor's base zoom to `zoom`.
Sets the Actor's base X zoom to `zoom`.
Sets the Actor's base Y zoom to `zoom`.
Sets the Actor's base Z zoom to `zoom`.
Sets the Actor to use the specified blend mode.
Makes the Actor bob up and down. Can use to define different bobbing behavior.
Makes the Actor bounce, similar to bob but with one point acting as the ground. Can use to define different bouncing behavior (with effectmagnitude values relating to x, y, and z movement).
[02 Actor.lua]
[02 Actor.lua]
[02 Actor.lua] Centers an Actor on the screen. (equivalent to `x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y`)
[02 Actor.lua] Centers an Actor on the X axis. (equivalent to `x,SCREEN_CENTER_X`)
[02 Actor.lua] Centers an Actor on the y axis. (equivalent to `y,SCREEN_CENTER_Y`)
Determines if the z-buffer should be cleared or not.
[02 Actor.lua] Combines multiple interpolators for complex tweens. `tweens` can either be a string like `"linear,0.25,accelerate,0.75"` or a table with tween information `{ {Type="linear", Percent=0.25, Bezier=nil}, {Type="accelerate", Percent=0.75, Bezier=nil} }`
Crops `percent` of the Actor from the bottom, where `percent` is in the range 0..1.
Crops `percent` of the Actor from the left, where `percent` is in the range 0..1.
Crops `percent` of the Actor from the right, where `percent` is in the range 0..1.
Crops `percent` of the Actor from the top, where `percent` is in the range 0..1.
Sets the Actor's cull mode to `mode`.
Plays the commands that follow at an decelerated rate (1 - (1-`fRate`) * (1-`fRate`)), where `fRate` is in seconds.
Set the Actor's diffuse color to `c`.
Sets the Actor's alpha level to `fAlpha`, where `fAlpha` is in the range 0..1.
Makes the Actor switch between two colors immediately. See Themerdocs/effect_colors.txt for an example.
Sets the Actor's bottom edge color to `c`.
Set the Actor's diffuse color to `c`, ignoring any alpha value in `c`.
Sets the Actor's left edge color to `c`.
Sets the Actor's lower left corner color to `c`.
Sets the Actor's lower right corner color to `c`.
Makes the Actor switch between two colors, jumping back to the first after reaching the second. See Themerdocs/effect_colors.txt for an example.
Sets the Actor's right edge color to `c`.
Makes the Actor shift between two colors smoothly. See Themerdocs/effect_colors.txt for an example.
Sets the Actor's top edge color to `c`.
Sets the Actor's upper left corner color to `c`.
Sets the Actor's upper right corner color to `c`.
Tells the Actor to draw itself.
Sets the Actor's draworder to `iOrder`, where larger values display first.
[02 Actor.lua] (Added in sm-ssc)
[02 Actor.lua]
Set the Actor's effect clock to `s`.
Sets the first effect color to `c`.
Sets the second effect color to `c`.
Set the Actor's effect magnitude in each direction to the given values.
Set the Actor's effect offset to `fTime`. The offset is added to the time into the effect before calculating percent_through_effect.
Set the Actor's effect period to `fTime`.
Set the Actor's effect timing.
hold_at_zero is before hold_at_full in the argument list for compatibility. A future version will probably swap them because it makes more sense to have hold_at_full come before hold_at_zero.
All effect timings must be greater than or equal to zero, at least one of them must be greater than zero.
The effect timing controls how long it takes an effect to cycle and how long it spends in each phase.
Depending on the effect clock, the actor's time into effect is updated every frame. That time is then translated into a percent_through_effect using the parameters to this function.
ramp_to_half is the amount of time for percent_through_effect to reach 0.5.
hold_at_half is the amount of time percent_through_effect will stay at 0.5.
ramp_to_full is the amount of time percent_through_effect will take to go from 0.5 to 1.0.
hold_at_full is the amount of time percent_through_effect will stay at 1.0.
After reaching the end of hold_at_full, percent_through_effect stays at 0 until hold_at_zero is over.
The different effects use percent_through_effect in different ways. Some use it to calculate percent_between_colors with this sine wave: sin((percent_through_effect + 0.25f) * 2 * PI ) / 2 + 0.5f
Some effects check the internal bool blink_on. blink_on is true if percent_through_effect is greater than 0.5 and false if percent_through_effect is less than or equal to 0.5.
Check the effect functions for individual explanations: diffuseblink, diffuseshift, glowblink, glowshift, glowramp, rainbow, wag, bounce, bob, pulse, spin, vibrate.
Set the hold_at_full part of the effect timing while leaving the others unchanged.
Fades `percent` of the Actor from the bottom where `percent` is in the range 0..1.
Fades `percent` of the Actor from the left where `percent` is in the range 0..1.
Fades `percent` of the Actor from the right where `percent` is in the range 0..1.
Fades `percent` of the Actor from the top where `percent` is in the range 0..1.
Finishes up an Actor's tween immediately.
[02 Actor.lua] Stretches an Actor to fill the entire screen.
Returns the Actor's aux value.
Returns the Actor's base X zoom value.
Returns the Actor's base Y zoom value.
Returns the Actor's base Z zoom value.
Returns `true` if the Actor has a command named `sCmdName`.
Returns the Actor's current diffuse color.
Returns the Actor's current diffusealpha.
Returns the Actor's current effect delta.
Returns the Actor's current effect magnitude as three floats (not one; I hate Lua.xsd).
Returns the Actor's current glow color.
Returns the Actor's horizontal alignment as a number in the range 0..1.
Returns the Actor's name.
Returns the number of states the Actor has.
Returns the Actor's current height.
Returns the Actor's current X rotation.
Returns the Actor's current Y rotation.
Returns the Actor's current Z rotation.
Returns the number of seconds into the currently running effect (e.g. diffuseshift, bob).
Returns how much time is remaining for the current tween.
Returns the Actor's vertical alignment as a number in the range 0..1.
Returns the Actor's current width.
Returns the zoomed height of an Actor.
Returns the zoomed width of an Actor.
Returns true if this actor is currently set to use the effect delta for tweening.
Sets the Actor's glow color.
Makes the Actor glow between two colors immediately. See Themerdocs/effect_colors.txt for an example.
Makes the Actor glow between two colors smoothly, jumping back to the first at the end. See Themerdocs/effect_colors.txt for an example.
Makes the Actor glow between two colors smoothly. See Themerdocs/effect_colors.txt for an example.
Set the fractional horizontal alignment of the Actor according to `fAlign` which should be a float in the range 0..1. An alignment of 0 is left aligned while an alignment of 1 is right aligned. See for the common case.
Sets the heading of this Actor to `fHeading`.
Hides the Actor for the specified amount of time.
[Deprecated] Compatibility alias for the hidden command, which was removed in sm-ssc. Use instead.
[02 Actor.lua] "Hide if `b` is `true`, but don't unhide if `b` is `false`."
Set the horizontal alignment of the Actor according to `align`. See for fractional alignment.
Hurries up an Actor's tweening by `factor`.
Plays the commands that follow at a normal rate, where `fRate` is in seconds.
[02 Lyrics.lua] Plays the lyric command for the specified `side` (`"Back"` or `"Front"`).
Sets the Actor's name to `sName`.
Stops the Actor's movement. (Usually used for Sprites or Models.)
Sets the pitch of this Actor to `fPitch`.
Starts the Actor's movement. (Usually used for Sprites or Models.)
Plays a command named `sCommandName`. `params` is passed to the command as an argument if it is a table.
[02 Actor.lua] Sets the visibility of the Actor based on `p` being a human player.
Makes the Actor grow and shrink. Can use to define different pulsing behavior.
Queues a command named `sCommandName` to be played.
Basically creates a command named `!sMessageName` (Note the ! at the beginning. The source code says this: "Hack: use "!" as a marker to broadcast a command, instead of playing a command, so we don't have to add yet another element to every tween state for this rarely-used command.")
Makes the Actor change colors continually using colors of the rainbow. Each channel follows a cosine wave, red starts at 0, green starts at 2pi/3, and blue starts at 4pi/3.
Sets the roll of this Actor to `fRoll`.
Set the Actor's rotation on the X axis to `fAlign`.
Set the Actor's rotation on the Y axis to `fAlign`.
Set the Actor's rotation on the Z axis to `fAlign`.
[02 Actor.lua] An alternative version of .
[02 Actor.lua]
Scales the Actor to cover a rectangle defined by the four float arguments.
Scales the Actor to fit inside a rectangle defined by the four float arguments.
Sets the height of the Actor.
Sets the size of the Actor.
[01 alias.lua] Alias for setsize.
Sets a multi-framed Actor's state to `iNewState`.
Sets the width of the Actor.
Use this to make the actor use the effect clock to tween instead of using the global frame delta.
Sets the shadow's color to `c`.
Sets the Actor's shadow length to `fLength`.
Sets the Actor's horizontal shadow length to `fLength`.
Sets the Actor's vertical shadow length to `fLength`.
Skews the Actor on the x axis by `fAmount`.
Skews the Actor on the y axis by `fAmount`.
Waits `fSeconds` before executing the next command.
[02 Actor.lua]
Tells the Actor to spin. Can use to define different spinning behavior.
Stops any effect the Actor has.
Stops any tweening.
Stretches the Actor to a rectangle of a specific size.
Translates the texture of the actor by x and y.
Determines if the Actor should use texture wrapping or not.
Uses type to determine the tween to use. The type must be one of the TweenType enum values. If the type is note TweenType_Bezier, the params table is ignored. If the type is TweenType_Bezier, then the params table must have 4 or 8 numbers. 4 numbers in the params creates a 1 dimensional bezier curve, 8 numbers creates a 2 dimensional bezier curve.
It's usually more convenient to use Actor:linear, Actor:accelerate, and so on, rather than using Actor:tween directly.
Set the fractional vertical alignment of the Actor according to `fAlign` which should be a float in the range 0..1. An alignment of 0 is top aligned while an alignment of 1 is bottom aligned. See for the common case.
Set the vertical alignment of the Actor according to `align`. See for fractional alignment.
Makes the Actor vibrate violently. Can use to define different vibration behavior.
Sets an Actor's visibility to b.
Makes the Actor wag. Use to define different wag behavior.
Set the x position of the Actor to `xPos`.
Set the y position of the Actor to `yPos`.
Set the z position of the Actor to `zPos`.
Sets the z bias to `fBias`.
Enables/disables z-buffer depending on `bUse`.
Zooms the Actor to `zoom` scale.
Zooms the Actor on both the X and Y axis using `zoomX` and `zoomY`.
Zooms the Actor to `zoom` height. See also: .
Zooms the Actor to `zoom` width. See also: .
Zooms the Actor to `zoom` scale on the X axis.
Zooms the Actor to `zoom` scale on the Y axis.
Zooms the Actor to `zoom` scale on the Z axis.
Sets the z testing mode to write on pass if `true`, turns it off if `false`
Sets the z testing mode to `testMode`.
Sets z writing to `true` or `false` based on `bWrite`.
[02 Actor.lua] Plays the commands that follow using a bezier curve to determine the rate. The curve must have 4 or 8 elements. This is a convenience wrapper around calling Actor:tween with TweenType_Bezier.
[02 Actor.lua] Stretches an Actor to cover the screen. (equivalent to `stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT`)
[02 Actor.lua] A customized version of pulse that is more appealing for on-beat effects.
[02 Actor.lua] Sets and Actor as a mask destination.
[02 Actor.lua] Sets an Actor as a mask source. (Also clears zbuffer; other mask sources need to not clear the zbuffer)
[02 Actor.lua] Make graphics their true size at any resolution.
[02 Actor.lua] Scale things back up after they have already been scaled down.
[02 Actor.lua] A customized version of pulse that is more appealing for on-beat effects.
Sets the x and y location of the Actor in one command.
Adds a child to the ActorFrame from the specified path.
Sets the field of view for the ActorFrame.
Returns the child with a name of `sName`.
If there are multiple children with that name, returns an array of those children.
The table also acts as a pass through layer, function calls pass through to the last child of that name.
Returns a table of all the children in the ActorFrame.
The table is indexed by the names of the children.
If there are multiple children with the same name, the entry for that name is an array of those children.
The table also acts as a pass through layer, function calls pass through to the last child of that name.
Gets the ActorFrame's Draw function.
Returns the number of children in the ActorFrame.
Gets the update function's rate.
Plays the `sCommandName` command on the ActorFrame's children.
Plays the `sCommandName` command on the ActorFrame's leaves.
Sets if the Actorframe should propagate commands to its children.
[02 Actor.lua] Propagates a command to the ActorFrame's children.
Removes all the children from the ActorFrame.
Removes the specified child from the ActorFrame.
Runs the commands in `cmds` on the ActorFrame's children.
Runs the commands in `cmds` on the ActorFrame's leaves.
Sets the ActorFrame's ambient light color to `c`.
Sets the ActorFrame's diffuse light color to `c`.
Sets if the ActorFrame should draw by Z position.
Sets the ActorFrame's Draw function to the specified Lua function.
Sets the field of view for the ActorFrame.
Currently unimplemented since it does not handle errors correctly. Arguments must be passed in as a table.
Sets the ActorFrame's specular light color to `c`.
Sets the ActorFrame's update function to the specified Lua function.
Sets the update function's rate to `fRate`.
Tells the ActorFrame to sort by draw order.
Sets the vanishing point for the ActorFrame.
Creates the ActorFrameTexture.
Enables/disables the Alpha Buffer.
Enables/disables the Depth Buffer.
Enables/disables
Enables/disables the Preserve Texture option.
Returns the texture.
Sets the Texture's name to `sName`.
Adds a texture to the ActorMultiTexture. Returns the number of texture units.
Clears all the textures from the ActorMultiTexture.
Sets the EffectMode on the ActorMultiTexture.
Sets the size of the ActorMultiTexture from the specified texture.
Sets the coordinates of the ActorMultiTexture.
Sets a TextureMode on the specified index.
The list of quad states is used to determine which animation state is used for each quad. The offset is added to the AMV's current state, and the resulting state is used.
Adds an animation state to the ActorMultiVertex. The state_data table must be like this:
{{left, top, right, bottom}, delay}
left, top, right, and bottom are pixel coordinates, starting at 0. If delay is 0 or negative, the state will last forever.
Forces the AMV to update the texture coordinates on all its quads, even if the current state has not changed.
Returns whether the AMV uses the animation state.
Sets whether the AMV uses the animation state.
This works best when using DrawMode_Quads.
AMV's can have animated textures like sprites. Each state tells the AMV what part of the texture to use, and how long the state lasts.
Use AddState to add a state onto the end, or SetStateProperties to set all the states at once, or SetState to set a single state.
Each quad has its own offset that is added to the current state. Use AddQuadState to add to the list of quad states, or SetQuadState to set an existing quad state.
Returns the number of states the AMV has.
Returns the number of quad states in the destination tween state for the AMV.
Returns the id of the current state.
Gets whether the AMV should call the decode function for its texture during updates.
Sets whether the AMV should call the decode function for its texture during updates.
Sets the current state.
Returns the offset of the requested quad state.
Sets the offset of the requested quad state.
Returns a table containing the data for the requested state.
Sets the requested state to the data in state_data. Similar to AddState, but SetStateData only works on states that have already been added.
Each element of the table must be a state_data table, and is used to construct one state. The table as a whole is the entire list of all states for the AMV.
Removes the requested state from the state list.
Removes the requested quad state from the quad state list.
Sets the delay for every state to delay.
Sets how far into its animation the AMV is.
Sets vertex number `index` with the properties provided. The tables of properties are each optional and can be provided in any order.
Sets multiple vertices at once. The elements of `vertices` should themselves be tables, of the form provided to SetVertex. If `vertices` is the first argument it will start from vertex 1. If an integer is provided before `vertices` it will start from that vertex. It will add vertices as necessary. Example: self:SetVertices( { { { x1, y1, z1 } , { r1,g1,b1,a1 } , { tcx1,tcy1 } }; { { x2, y2, z2 } , { r2,g2,b2,a2 } , { tcx2,tcy2 } } } )
Sets all the drawn verts of the ActorMultiVertex by evaluating the splines.
("all the drawn verts" means all the verts between FirstToDraw and NumToDraw, the verts that are set to draw in the current tween state.)
The parts of the ActorMultiVertex are evenly spaced along the spline in terms of t value.
The exact behavior depends on the draw mode.
DrawMode_Quads uses all 4 splines, one for each corner.
DrawMode_QuadStrip and DrawMode_Strip use 2 splines, one for each edge of the strip.
DrawMode_Fan uses one spline, for the edge verts of the fan. The first vert is not touched because it is the center.
DrawMode_Triangles uses 3 splines, one for each corner.
DrawMode_SymmetricQuadStrip uses 3 splines, one on each edge and one in the center.
DrawMode_LineStrip uses 1 spline.
Returns the requested spline. Spline indices range from 1 to 4.
ActorMultiVertex splines are not inside the tween state, and will not change the verts until you call SetVertsFromSplines.
Sets the number of vertices.
Returns the number of vertices
Sets the draw state variables to the values in the table.
Mode must be a DrawMode.
First is the index of the first vertex to draw.
Num is the number of vertices to draw. -1 for Num means draw all verts after First.
Any value not in the table defaults to the already set value.
Examples:
-- Sets all three parts of the draw state.
self:SetDrawState{Mode="DrawMode_Quads", First= 1, Num= -1}
-- Set only the draw mode. First and Num remain unchanged from previous.
self:SetDrawState{Mode="DrawMode_Quads"}
-- Set the first and number to draw. Draw mode remains unchanged.
self:SetDrawState{First= 3, Num= 4}
Get the DrawMode of the destination tween state.
Get the FirstToDraw of the destination tween state.
Get the NumToDraw of the destination tween state.
Get the DrawMode of the current tween state.
Get the FirstToDraw of the current tween state.
Get the NumToDraw of the current tween state.
Returns the ActorMultiVertex's texture.
Sets the EffectMode of the ActorMultiVertex.
Sets the TextureMode of the ActorMultiVertex.
Sets the width of the line for DrawMode_LineStrip.
Sets the texture to `texture`
Sets the texture at from the file path `path`.
Returns the target of the ActorProxy.
Sets the ActorProxy target to `a`.
Returns the scroller's current item.
Returns the item the scroller's going to.
Returns how long it will take for the scroller to completely scroll through all its items.
Returns the number of items in the ActorScroller.
Returns the number of seconds the scroller pauses between items.
Returns the number of seconds until the scroller reaches its destination.
Compatibility alias for .
Positions the scroller items.
Scrolls through all the items in the scroller.
Compatibility alias for .
Scrolls through all the items in the scroller with padding at the beginning and end.
Compatibility alias for .
Sets the item the scroller should scroll to next and makes it the current item.
Sets the item the scroller should scroll to next.
Sets if the scroller should catch up fast.
Compatibility alias for .
Specifies if the scroller should loop or not.
Sets the scroller's mask to a Quad that is `fWidth` by `fHeight` pixels.
Sets the scroller to draw `fNumItems` items.
Sets the number of subdivisions in the scroller.
Compatibility alias for .
Sets the scroller's pause countdown to `fSecs`.
Sets the scroller's pause between items to `fSeconds`.
Sets how many seconds the scroller should spend on each item.
A value of `0` means the scroller will not scroll.
Compatibility alias for .
Sets the scroller's transform function to the specified Lua function.
Sets the scroller's transform function from `fItemHeight`.
Sets the scroller's transform function from `fItemWidth`.
This Actor represents a playable sound. There are two attributes that can be set on load.
* `SupportPan` - Let the sound pan from side to side.
* `SupportRateChanging` - Let the sound change rate and pitch.
* `IsAction` - If true, the sound is an action sound, and will be muted if the MuteActions preference is turned on.
Returns the that can be played by this Actor.
Returns whether the sound is an action.
Loads the sound at `sPath`.
Pauses or unpauses the sound based on `bPause`.
Plays the sound.
[02 Sound.lua] Plays the sound on the given player's side. You must set `SupportPan = true` on load.
Sets whether the sound is an action.
Stops the sound.
Returns true if Announcer `sAnnouncer` exists.
Returns a table of installed announcers.
Returns the current announcer's name.
Sets the announcer to `sNewAnnouncer`.
Returns `true` if the application presently has focus.
Returns the name of the architecture in use.
Returns `true` if the Banner is currently scrolling.
Loads the background from an UnlockEntry.
Loads the banner from an UnlockEntry.
Loads the card image from the specified Character.
Loads the banner from the cache based on `sPath` (typically or ).
Loads a Banner from a specified Course.
Loads a Banner from a specified Song.
Loads a Banner from a specified Song Group.
Loads a Banner from a specified SortOrder.
Loads an icon from the specified Character.
See .
See .
Add the attribute `attr` to the string at position `iPos`.
The attribute is a table that must contain `Length` which specifies how many (multi-byte) characters the attribute is to apply. If `Length=-1`, then the attribute applies until another attribute overrides it.
If the table contains `Diffuse`, then the color value is applied to the range of text.
If the table contains `Diffuses`, then it should be an array of 4 colors which specify the diffuse color for the top left, top right, bottom left, and bottom right.
If the table contains `Glow`, then the color value is applied as a glow to the range of text.
Example:
attr = { Length = 10; Diffuse = color("#AABBCC"); }
Clear all attributes associated with the BitmapText.
[02 Actor.lua] Sets the diffuse and stroke color of text in one command.
Returns the text that is currently set.
Causes each character of text to be randomly distorted by distortion_percentage of its size when the text is set. The distortion only changes when the text changes.
Turns off distortion.
Returns whether the diffuse colors in the attributes are multiplied by the general diffuse colors of the BitmapText.
If mult_attrs_with_diffuse is set to true, then the diffuse colors in the attributes are multiplied by the general diffuse colors of the BitmapText.
If `bJitter` is `true`, move each character of the string around by a small random amount.
If use_zoom is true, this BitmapText will use the zoom that has been applied to it when calculating to change its base zoom from maxheight or maxwidth.
Set the maximum height of the unzoomed text to `fHeight`. If `fHeight` is `0`, then there is no maximum height.
Set the maximum width of the unzoomed text to `fWidth`. If `fWidth` is `0`, then there is no maximum width.
[02 Actor.lua] Remove any stroke color.
[02 Actor.lua] Alias for setting to `false`.
If `true`, set each character of the text in turn to the rainbow colors in the metrics `BitmapText::RainbowColor#`.
Set the text to `sText`. This clears all attributes.
[02 Actor.lua] Sets text using `string.format(sFormat, ...)`.
[02 Actor.lua] Alias for .
Sets the stroke color to `c`.
If the text is glowing, specify if just the stroke layer, just the inner layer, or both are affected by the glow.
If `true`, make all text uppercase.
Add `iSpacing` pixels of padding between lines of text.
Wrap the unzoomed text at `iWidth` pixels. If you or by `x` and you want the text wrapped at `width`, then you should use `wrapwidthpixels(width/x)`.
Returns the text that is currently set at the exact moment you call it. This is likely only going to be useful in an Update command.
Sets the BPMDisplay from the specified Course.
Sets the BPMDisplay from the GameState.
Sets the BPMDisplay from the specified Song.
Sets the BPMDisplay from the specified Steps.
Returns the path to the character's card graphic.
Returns this character's directory.
Returns this character's ID.
Returns the path of the dancing animation of this character.
Returns the character's display name.
Returns the path to the character's icon.
Returns the path of the model of this character.
Returns the path of the rest animation of this character.
Returns the path to the character's ScreenSelectMode icon.
Returns the path to the character's ScreenStage icon.
Returns the path of the warm-up animation of this character.
Returns a table of all characters installed.
Return the corresponding to `sID`.
Returns a random character.
Returns the number of characters available.
Loads the ComboGraph commands from the Metrics in group `sMetricsGroup`.
Sets the values of the ComboGraph using the specified StageStats and PlayerStageStats.
Loads the ControllerStateDisplay from the specified GameController.
Loads the ControllerStateDisplay from the specified MultiPlayer.
Returns `true` if all of the songs in the course have been defined (as opposed to random songs).
Returns a table of all the Trails in the Course.
Returns the path to the Course's background.
Returns the path to the Course's banner.
Returns the Course's directory.
Returns a table of CourseEntry items.
Gets the CourseEntry at `iIndex` from the Course.
Returns the Course's . (Returns CourseType in SM5; integer in SM4)
Returns the description for this Course.
Returns the full display title of the Course.
Returns the estimated number of stages for the Course.
Returns the goal seconds for the Course.
Returns the Course's group name.
Returns the Course's . (Returns PlayMode in SM5; integer in SM4)
Returns the name of the person who scripted the Course.
Returns the total length of the Course in seconds.
Returns the full transliterated title of the Course.
Returns `true` if the Course has a background.
Returns `true` if the Course has a banner.
Returns `true` if the Course has modifiers.
Returns `true` if the Course has timed modifiers.
Returns `true` if the Course is an edit.
Returns `true` if the Course was automatically generated.
Returns `true` if the Course is Endless.
Returns `true` if the Course is Nonstop.
Returns `true` if the Course is Oni.
Returns `true` if the Course is playable in StepsType `st`.
Returns `true` if the Course is a ranking course.
Sets the CourseContentsList from the GameState.
Returns the Song that this CourseEntry corresponds to.
Returns the number of lives gained after completing the song.
Returns the number of seconds gained after completing the song.
Returns any stage (non-timed) modifiers.
Returns the number of modifier changes in this CourseEntry.
Returns a comma-delimited string representing various facts about the CourseEntry.
Returns `true` if this CourseEntry is a fixed song.
Returns `true` if this CourseEntry is secret.
Generates a random UUID (version 4).
Returns the MD5 hash for the file at `sPath`.
Returns the MD5 hash for `s`.
Returns the SHA-1 hash for the file at `sPath`.
Returns the SHA-1 hash for `s`.
All functions in this class have camel case equivalents, use whichever naming style you prefer.
This spline implementation is a cubic spline.
A spline is a line calculated from a small set of points with mathematical smooting applied.
Splines can have any number of dimensions, but splines owned by actors (the ones inside NCSplineHandler and ActorMultiVertex) always have 3 dimensions.
Solves the spline, setting the coefficients.
Evaluates the spline at the given t value, returning a table of the results for each dimension of the spline.
t can range from 0 to the value returned by get_max_t().
A normal spline will return its starting point for any t value less than 0 and its end point for any t value greater than the max.
A looped spline adjust the t value to be within the its range by adding or subtracting the max t as needed. (so if the max t is 4 and you evaluate at 5, it will return the same as if you evaluated at 1.)
Evaluates the derivative at t.
Evaluates the second derivative at t.
Evaluates the third derivative at t.
Second and third derivative functions exist because they're possible, not because they're expected to be useful. The fourth derivative would be 0 because the equation for evaluating the spline is "a + (b*t) + (c*t^2) + (d*t^3)".
Sets point i of the spline to the position specified by the table p.
Sets the coefficients of the spline at point i.
Each table must contain a value for each dimension of the spline.
Solving the spline normally should cover all normal usage, this is for people that want a spline with an abnormal behavior, so if you set the coefficients directly, expect to end up with an unsmooth shape.
Returns a table containing the tables of coefficients for the point i.
Sets the spatial extent of dimension d of the spline to e.
The spatial extent exists to handle numbers that exist in a finite looped space, instead of the flat infinite space.
To put it more concretely, spatial extent exists to allow a spline to control rotation with wrapping behavior at 0.0 and 2pi, instead of suddenly jerking from 2pi to 0.0.
Returns the spatial extent of dimension d of the spline.
Returns the max t value the spline extends to. For a normal spline, this will be size()-1. For a looped spline, this will be size().
Sets the number of points in the spline. You must set the number of points before trying to set the position of any point.
Returns the number of points in the spline.
Sets the number of dimensions the spline has.
Splines that are owned by actors (the ones inside ActorMultiVertex and NCSplineHandler) cannot have their number of dimensions changed because the actors require them to have 3 dimensions.
Returns the number of dimensions the spline has.
Returns true of the spline has zero points, or false if it has more than zero points.
Sets whether the spline is looped. A looped spline is one where the end point is connected to the start point.
Returns whether the spline is looped.
Sets whether the spline is polygonal. If the spline is polygonal, then it will have straight lines between the points instead of curves.
Returns whether the spline is polygonal.
Sets whether the spline is dirty. A dirty spline is one that has been changed in some way that affects its shape. When solve() is called, the spline will only be solved if it is dirty. The dirty flag is automatically set by everything, so you should never have to call this function.
Returns whether the spline is currently dirty.
Destroys the spline, freeing the memory allocated for it. This can only be called on splines created with create_spline().
Sets the DifficultyIcon's state from the difficulty passed in.
Sets the DifficultyIcon's Player to `pn`, then sets the DifficultyIcon's state from the difficulty of Steps `pSteps`
Sets the DifficultyIcon's Player to `pn`, then sets the DifficultyIcon's state from the difficulty of Trail `pTrail`
Sets the DifficultyIcon's Player to `pn`.
Blanks the DifficultyIcon.
Returns the index of the last banner loaded.
Loads the fallback course banner.
Loads the fallback banner.
Loads the card image from the specified Character.
Loads a Banner from a specified Course.
Loads a Banner from a specified Song.
Loads a Banner from a specified Song Group.
Loads a Banner from a specified SortOrder.
Loads an icon from the specified Character.
Loads the Random banner.
Loads the Roulette banner.
See .
See .
Sets the StepsDisplayList from the GameState.
Returns `true` if notes are counted separately in this game.
Returns the mapped judgment for `tns`.
Returns the name of the game such as "dance" or "pump".
Returns whether this game allows the players to have separate styles.
Returns any announcer that may have been set.
Returns any Character associated with this item (or `nil` if there isn't one).
Returns any Course that may have been set.
Returns a course difficulty, if one is set in the GameCommand.
Returns a difficulty, if one is set in the GameCommand.
Returns the index of this item.
Returns any MultiPlayer that may have been set.
Returns the choice name.
Returns the PlayMode associated with this GameCommand.
Returns any preferred modifiers that may have been set.
Returns any Profile ID that may have been set.
Returns any screen that may have been set as a string.
Returns any Song that may have been set.
Returns the name of any song group that may have been set.
Returns the sort order, if the GameCommand has set one.
Returns any stage modifiers that may have been set.
Returns any Steps that may have been set.
Returns any Style that may have been set.
Returns the display text.
Returns any Trail that may have been set.
Returns any Url that may have been set.
Return the first for the specified `game`.
Returns `true` if any noteskins exist for the specified Game `s`.
Return the localized string representation of `st`.
Returns a table of all selectable games.
Returns a table of all the styles for the that exist for `game`.
Sets the current game to `Game`. The second argument is optional, and if provided will determine which theme is loaded when the game changes. If the second argument is not provided, the default theme from the preferences for the new game type will be loaded.
If only the game changes, the screen specified by the Common::AfterGameChangeScreen metric will be loaded.
If the game and the theme both change, the screen specified by the Common::AfterGameAndThemeChangeScreen metric will be loaded.
The Common::InitialScreen metric will be used if the appropriate metric for the change is blank or invalid.
Set the music volume to `fVolume` for `fDuration` seconds.
Return the sound balance for `pn`.
Plays a sound from the current announcer.
Play the sound at `musicPath` starting from `musicStart` for `musicLength` seconds one time. Both `fadeIn` and `fadeOut` can be customized as required. `loop` tells the sound manager to loop the music part. `applyRate` tells the sound manager to apply the current music rate. If `alignBeat` is true or nil, the length is automatically adjusted to cover an integer number of beats.
Play the sound at `sPath` one time. `is_action` is optional, if it is true, the sound is an action sound, and will be muted if the MuteActions preference is turned on.
Stops the music.
When music is requested to change, the new music does not start immediately due to latency and buffering. This will return true if the newest music has not yet actually begun.
Adds another stage to the specifed player.
Applies the specified modifiers for the specified player's preferred modifier set.
Applies the song options of ModsLevel_Preferred to the other ModsLevels.
Applies the specified modifiers for the specified player for the current stage.
Returns `true` if any player has performed a feat worthy of ranking.
The second argument is optional. Apply the GameCommand represented by `sCommand` for `pn`, if given. See .
Checks various things to determine whether the game will crash when gameplay starts. Returns false and a string if gameplay cannot be entered safely.
Might not work in all cases, but will catch things like a player not having steps set or no current song or style. Mainly exists for people with a custom ScreenSelectMusic replacement.
Example:
local can, reason= GAMESTATE:CanSafelyEnterGameplay()
if not can then
lua.ReportScriptError("Cannot safely enter gameplay: " .. tostring(reason))
end
Removes any stage modifiers that are illegal for course play.
Returns `true` if `pn`'s options will disqualify them for ranking.
Returns `true` if enough credits have been inserted to join.
fishpolk.mid; See also: Rise of the Triad
Returns the environment table. See .
Returns the current for the specified .
Returns the current .
Return the number of inserted but unused coins. This number is decremented when players join.
Return the number of coins needed to join based on the current coin and premium modes as well as the number of people joined, if that matters for the premium mode. See and .
The s in a are numbered sequentially starting from 0. Return the number of the current .
Return the current number of seconds that have passed in the current song. This value can be negative.
Return the current .
Return the current .
Return the current .
Return the current .
Returns the current stage index (starts at 0).
Return the current for the specified Player.
Return a variable number of arguments based on the being played by all players. For each distinct being played by the players, in increasing order, the difficulty and description of the is returned as strings.
For example,
local credits = {GAMESTATE:GetCurrentStepsCredits()};
will make a table of the difficulties and descriptions.
Return the current .
Return the current for the specified player.
Return a string representation of the default song options.
Returns the value.
Return the easiest of the currently selected steps by all players. For example, if player 1 has selected Hard steps and player 2 has selected Medium steps, Medium will be returned.
Return the Edit Local (during Profile editing) or `nil` if it does not exist.
Returns the ID of the Edit Local (during Profile editing).
Return the source for the editor or `nil` if it does not exist.
Returns a table of enabled players.
Returns the name of the currently expanded section.
Return the random seed for the game.
Return `true` if the gameplay lead in is enabled. If `false`, gameplay begins immediately.
Return the hardest of the currently selected steps by all players. For example, if player 1 has selected Hard steps and player 2 has selected Medium steps, Hard will be returned.
Returns an array of s corresponding to Human players.
Returns the index of the next song in the course.
Returns the master player number.
Returns `true` if the game is Multiplayer.
Returns the PlayerState for the specified MultiPlayer.
Returns the number of active multiplayer NoteFields.
Returns the number of players enabled.
Returns the number of sides joined.
Returns the number of stages for the current Song and its Steps or the current Course.
Returns the number of stages left for player `pn`.
Returns the display name for player `pn`.
Returns the PlayerState for player `pn`.
Returns the current PlayMode.
Returns the preferred difficulty.
Returns the preferred song.
Returns the preferred song group.
Returns the current Premium.
Returns the smallest number of stages left for any human player.
[01 alias.lua] Returns the current beat of the song.
[01 alias.lua] Returns the current beat of the song without an offset.
Returns the current visible beat of the song.
[01 alias.lua] Returns the song's current beats per second.
[01 alias.lua] Returns `true` if a delay is active in the song.
[01 alias.lua] Returns `true` if the song is currently in a freeze.
Returns the song options for the specified ModsLevel as a string.
Returns the song options as a string.
Returns the song options for the specified ModsLevel as an object.
Returns how much of the song is through at beat `fBeat`.
Returns the current SongPosition.
Returns the current SortOrder.
Returns the StageResult for player `pn`.
Returns the current stage index.
Returns the current StepsSeconds, which is the time value used to set the samples in a player's life record.
Return the random seed for the current stage.
Returns `true` if the workout goal is complete.
Returns `true` if an extra stage was earned.
Returns `true` if either player does not have a profile loaded, and there is a loadable profile.
Returns `true` if either player has a profile loaded.
Returns `true` if we are specifically in the Step Editor's editing portion. If in recording or playing mode, this will return `false`.
Inserts `iCoins` number of coins. `iCoins` can be negative or positive.
Inserts one credit. To deduct a credit, pass a negative integer representing the number of coins per credit to InsertCoin.
Returns `true` if this is an extra stage.
Returns `true` if any human player is using a memory card.
Returns `true` if playing in Battle mode.
Returns `true` if playing in a Course mode.
Returns `true` if in Demonstration mode.
Returns `true` if the match was a draw.
Returns `true` if Event Mode is on, temporary or otherwise.
Returns `true` if this is the first extra stage.
Returns `true` if this is the second extra stage.
Returns `true` if player `pn` has completed the current Goal.
Returns `true` if player `pn` is human.
Returns `true` if player `pn` is enabled.
Returns `true` if player `pn` has joined the game.
Returns `true` if player `pn` is the winner.
Joins player `pn`. Does not deduct coins.
Similar to JoinPlayer, but checks whether the player is allowed to join and returns false if the player is not allowed to join. Also deducts coins for joining. A player can't join if PlayersCanJoin() returns false, or that side is already joined (is true for both sides when in a style that is OnePlayerTwoSides), or there are not enough coins.
If profiles are not loaded, this will load the profiles for each player. It will load from memory cards if they are present, and local profiles otherwise. It will load edits if `LoadEdits` is true, or by default if the argument is omitted.
Returns `true` if player `pn` is using modifier `sModifier`.
Returns `true` if players can join the game.
Refreshes the NoteSkin data for the current game.
Resets the GameState.
Resets the specific Player's mods to the default settings.
Saves the bookkeeping and machine profile data.
Save profiles.
Sets the current for the specified .
Sets the current Course to `course`.
Sets the current PlayMode to `pm`.
Sets the current Song to `song`.
Sets Player `pn`'s current Steps to `steps`.
Sets current Style to the provided style. Either a style object or a style string can be provided. If current steps for either player are not valid in the new style, they will be cleared.
Sets the current Trail to `trail`.
Tells the engine that the theme explicitly set the fail type for the players so that it won't override it with the easier settings for beginner or easy.
Sets if the Jukebox should use modifiers.
Sets the number of multiplayer notefields to `iFields`
Sets the preferred difficulty of Player `pn` to Difficulty `dc`.
Sets the preferred Song to `song`.
Sets the preferred song group to `sGroup`.
Sets the Song Options from `so` using ModsLevel `m`.
Turns temporary Event Mode on or off, depending on `bOn`.
Stores the ranking name for the player. Use this at the end of a round, on a name entry screen or similar, to set the name for the high scores the player has earned.
Determines if Judgment W1 should be shown based on `bOn`.
Unjoins player `pn`.
Loads the GradeDisplay commands from the Metrics in group `sMetricsGroup`.
Sets the GradeDisplay to show Grade `g`.
Loads the GraphDisplay commands from the Metrics in group `sMetricsGroup`.
Sets the values of the GraphDisplay using the specified StageStats and PlayerStageStats.
Sets the GrooveRadar values for Player `pn` to empty.
Sets the GrooveRadar values for Player `pn` from RadarValues `rv`
Sets the GrooveRadar values for Player `pn` to the specified (floating point) values in the table.
Returns two tables representing the tips and alternate tips in the HelpDisplay.
[02 HelpDisplay.lua] Sets the tips from a Song or Course.
Sets the seconds between switches of tips to `fSeconds`.
Sets the HelpDisplay's tips using `tips` (and optionally `altTips`).
Sets the HelpDisplay's text from `sTips` using colons to separate new sections.
Returns the date and time the high score was achieved.
Returns the Grade of this high score.
Returns the HighScore for this PlayerStageStats.
Return the number of HoldNoteScores that match `hns`.
Returns the Max Combo of this high score.
Returns the modifiers used for this HighScore.
Returns the name associated with the high score.
Returns the Peak Combo Award for this high score.
Returns the percentage of dance points associated with the high score.
Returns the RadarValues for this HighScore.
Returns the score associated with the high score.
Retrns the Stage Award for this high score.
Returns the number of seconds survived associated with the high score.
Return the number of TapNoteScores that match `tns`.
Returns `true` if this high score's name uses a fill-in marker.
You can get a HighScoreList using .
Returns a table of the high scores.
Returns the highest score for name in the list. Returns nil if there is no score for name in the list.
Returns the rank of the highest score for name in the list. Returns 0 if there is no score for name in the list. (returns 1 if name has the top score, 2 if name has the second place score, and so on)
Loads the HoldJudgment for the specified MultiPlayer.
Returns the mouse wheel value.
Returns the X position of the mouse.
Returns the Y position of the mouse.
Returns the amount of life left in the LifeMeter as a float in the range 0..1.
Returns `true` if failing.
Returns `true` if the LifeMeter is "hot".
Returns `true` if in danger.
Changes the player's life by `iNumLives`. (Negative values subtract lives.)
Returns the number of lives remaining.
Returns the number of total lives.
Returns `true` if player `pn`'s card is locked.
Return the state for player `pn`.
Returns the name of the storage device.
Returns `true` if player `pn`'s name is available.
Stops the MenuTimer by setting it to 99.99 and pausing.
Returns the current MenuTimer's value.
Pauses the MenuTimer, stopping it from counting down.
Compatibility alias for SetSeconds.
Sets the MenuTimer's value to `fSeconds`.
Sets the MenuTimer's silent setting to `bSilent`.
Starts up the timer.
Sets the MenuTimer's stealth setting to `bStealth`. If `true`, the timer will be invisible and silent.
Stops the MenuTimer by setting it to 0 and pausing.
Broadcast the message to all listeners subscribed to `sMessage`. The second argument is an optional table of parameters. It may be omitted or explicitly set to `nil`.
Sets whether logging of messages is enabled. If log is true, all messages that pass through Broadcast (from the engine for from the theme or from anywhere else), will be logged with Trace.
Sets the width of the MeterDisplay to `fWidth`.
Returns the model's default animation.
Controls if the model should loop or not.
Plays animation `sAniName` at `fPlayRate` speed (default 1.0).
Sets how far into the animation the model is.
Sets the current animation's playback rate to `fRate`.
Sets the model's default animation to `sAnimation` at `fPlayRate` speed (default 1.0).
Returns the number of states the Model has.
Loads the ModIconRow of Player `pn` from the Metrics in group `sMetricsGroup`.
Changes the sort order of the wheel. Returns `true` if the order was changed.
Returns the name of the currently selected section.
Returns `true` if the MusicWheel is currently handling Roulette selection.
Selects a song. Returns `false` on failure.
Selects a course. Returns `false` on failure.
Returns a string from the specified element and value.
Returns a string from the specified element and value using NoteSkin `sNoteSkin`.
Returns a command from the specified element and value.
Returns a command from the specified element and value using NoteSkin `sNoteSkin`.
Returns a bool from the specified element and value.
Returns a bool from the specified element and value using NoteSkin `sNoteSkin`.
Returns a float from the specified element and value.
Returns a float from the specified element and value using NoteSkin `sNoteSkin`.
Returns a integer from the specified element and value.
Returns a integer from the specified element and value using NoteSkin `sNoteSkin`.
Returns the path for the specified `sButton sElement`.
Returns the path for the specified `sButton sElement` using NoteSkin `sNoteSkin`.
Returns the actor for the specified `sButton sElement`.
Returns the actor for the specified `sButton sElement` using NoteSkin `sNoteSkin`.
Returns `true` if the `strName` noteskin exists in the current gametype.
Returns a table of noteskin names for the current gametype.
All functions in this class have camel case equivalents, use whichever naming style you prefer.
The spline handler holds info on how the spline is used by the engine.
Each get/set pair of functions in this class is for a different aspect of the spline's behavior.
Returns the spline for this handler.
Returns the beats per t value of the spline. If the beats_per_t is 4, then a note must be on screen for 4 beats to traverse from one point on the spline to the next.
Sets the beats per t value for the spline.
Returns the t value that receptors are evaluated at.
the t value that receptors are evaluated at.
Returns the mode the spline is set to.
"NoteColumnSplineMode_Disabled" means the spline will not affect the notes or receptors at all.
"NoteColumnSplineMode_Offset" means the spline will added to the effects from the mods.
"NoteColumnSplineMode_Position" means only the spline affect the notes and mods will be ignored. (but only mods that affect the same aspect of the note as the spline will be disabled. So a rotation spline won't disable Mini or Tiny, but a zoom spline will, and a zoom spline won't disable Dizzy, Twirl, or Roll, but a rotation spline will.)
Sets the current spline mode for this handler.
Returns whether the current song beat is subtracted from a note's beat when calculating the t value to use on the spline.
Sets whether the current song beat is subtracted from a note's beat when calculating the t value to use on the spline.
All functions in this class have camel case equivalents, use whichever naming style you prefer.
Position, rotation, and zoom each have separate spline handlers to allow them to have separate independent behavior.
It is important to note that the spline handlers are inside the tween state, so whenever you start a new tween on the actor, you need to refetch the spline handlers.
Returns the handler for the position spline.
Returns the handler for the rotation spline.
The rotation applied by the rotation spline is in radians.
For convenience, the spatial extent of the rotation spline defaults to 2pi.
Returns the handler for the zoom spline.
All functions in this class have camel case equivalents, use whichever naming style you prefer.
Makes the NoteField act as if a hold note was hit in the column, with the given score and bright setting.
The callback for did_hold_note will not be called.
Makes the NoteField act as if a tap note was hit in the column, with the given score and bright setting.
The callback for did_tap_note will not be called.
Returns a table of the actors for the columns. This means that each column is an actor, so you can move it around or animate it like an actor. See the NoteColumnRenderer class for a list of special functions for the column's actor.
Same as SetDidTapNoteCallback, but for hold notes. Uses HoldNoteScore instead of TapNoteScore.
Sets the function that the NoteField will call whenever a tap note is hit.
The callback function is passed the column, the TapNoteScore, and whether the explosion will be bright.
The callback function can return changed values for the NoteField to use instead of the ones that were passed.
Pass nil instead of a function to clear the callback.
Makes the NoteField act as if a press occurred in the column.
The callback for set_pressed will not be called.
Sets the function that the NoteField will call whenever a press occurs.
The callback function is passed the column for the press.
The callback function can return changed values for the NoteField to use instead of the ones that were passed.
Pass nil instead of a function to clear the callback.
Sets the function that the NoteField will call whenever a step occurs.
The callback function is passed the column and the TapNoteScore for the step.
The callback function can return changed values for the NoteField to use instead of the ones that were passed.
Pass nil instead of a function to clear the callback.
Makes the NoteField act as if a step occurred in the column with the given score. The callback for Step will not be called.
Returns `true` if the first item in the row goes down.
Returns an index of the choice in the row that player `pn` is on.
Returns the OptionRow's layout type.
Returns the name of the OptionRow.
Returns the number of choices in this OptionRow.
Returns the row title string.
Returns the OptionRow's select type.
Returns `true` if this row is focused by player `pn`.
Returns `true` if this row forces one choice on all players.
Sets the PaneDisplay from the GameState.
Sets the PercentageDisplay from the specified PlayerState and PlayerStageStats.
Changes the life value by delta. This will broadcast a LifeChangedMessageCommand, to allow custom life bars to update to the new value. Do not call ChangeLife from within LifeChangedMessageCommand.
Sets the life to value. This will broadcast a LifeChangedMessageCommand, to allow custom life bars to update to the new value. Do not call SetLife from within LifeChangedMessageCommand.
Returns the current TimingData for this player.
Sets Actor with Combo position.
Sets Actor with Judgment position.
(PlayerInfo is a part of ScreenGameplay.)
Returns the of player `pn`.
Returns the Steps located at `index` in the current steps queue.
All these functions have an optional last argument: If the last argument is the boolean value true, then instead of returning the previous settings as normal, they will instead return the PlayerOptions object.
This allows you to chain them like this:
player_options:Twirl(5, 1, true):Roll(5, true):Dizzy(true):Twirl()
Special note: Functions that take a bool as their arg must have true as the second arg to be used with chaining.
"player_options:Backwards(true, true):Beat(5)" will chain, "player_options:Backwards(true):Beat(5)" will not chain.
Most options fall into one of four types: float, int, bool, or enum.
Float type options have this interface:
Option(value, approach_speed)
If value is a float, sets the TimeSpacing modifier to value.
If approach_speed is a float, sets the speed of the transition to approach_speed. Returns the previous values of both.
approach_speed is in units of n per second. value will be approached at the rate of approach_speed per second.
Note that the value and the approach speed arguments are both independently optional.
Example:
a,b= options:Boost() -- Sets a to the current value and b to the current approach_speed.
a,b= options:Boost(5, .5) -- Stores the previous values in a and b, NOT to 5 and .5. Sets the value to 5 and the approach speed to .5.
a,b= options:Boost(5) -- Sets a and b to the previous values, NOT to 5 and .5. Sets the value to 5 and leaves the approach speed at whatever it was.
Setting the approach speed only matters when modifying the PlayerOptions from ModsLevel_Song.
Int type options are similar to float in that they return and take a number, but they do not have an approach speed.
Bool type options have an almost identical interface, the difference is that they can not have an approach speed.
Enum type options are almost identical to bool type. They take and return an enum value.
For brevity, the functions are only given a description if the option requires careful handling or does not follow the float or bool interfaces.
If the player has a CMod set, returns the value of that CMod and its associated approach speed. Returns nil otherwise.
If the optional first argument is passed, sets the CMod to the value and disables any XMod or MMod that is set.
If the optional second argument is passed, sets the speed at which the transition occurs.
If the player is using Distant (zero skew and positive tilt), returns the value of tilt and its approach_speed.
Returns nil otherwise.
If the optional first argument is passed, sets tilt to value and skew to zero.
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
Sets the for the player, if the optional argument is provided. Returns the that was previously set.
Returns true if step attacks or random attacks are enabled.
Returns `true` if the current PlayerOptions makes the current Course/Trail easier.
Returns `true` if the current PlayerOptions makes the current Song/Steps easier.
If the player is using Hallway (zero skew and negative tilt), returns the value of tilt and its approach_speed.
Returns nil otherwise.
If the optional first argument is passed, sets tilt to negative value and skew to zero.
Pass in a positive value for the familiar meaning of Hallway.
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
If the player is using Incoming ((positive skew and negative tilt) or (negative skew and positive tilt)), returns the value of skew and its approach_speed.
Returns nil otherwise.
If the optional first argument is passed, sets tilt to negative value and skew to value.
Pass in a positive value for the familiar meaning of Incoming.
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
MaxScrollBPM is one of the variables for controlling the speed mod.
Use CMod, XMod, or MMod to set the speed mod unless you have a good reason not to.
It is the setting for the MMod.
MMods are not tweenable or settable on ScreenGameplay. Use XMods if you need such an effect.
Sets the min TapNoteScore required for the notes to disappear after being hit.
If the player has a MMod set, returns the value of that MMod and its associated approach speed. Returns nil otherwise.
If the optional first argument is passed, sets the MMod to the value and disables any CMod or XMod that is set.
If the optional second argument is passed, sets the speed at which the transition occurs.
MMods are not tweenable or settable on ScreenGameplay. Use XMods if you need such an effect.
Sets the NoteSkin to the named noteskin, unless name is nil or the noteskin does not exist. Returns the name of the previous noteskin and whether the set attempt succeeded.
Changing the noteskin during a song is not supported.
Example:
note_name= options:NoteSkin() -- Sets note_name to the player's current noteskin.
prev_note_name, succeeded= options:NoteSkin("cel") -- Sets prev_note_name to the noteskin the player had set, changes the current noteskin to "cel", sets succeeded to true if the "cel" noteskin exists.
If the player is using Overhead (0 tilt, 0 skew), returns true.
If true is passed, sets the tilt and skew to 0.
ScrollBPM is one of the variables for controlling the speed mod.
Use CMod, XMod, or MMod to set the speed mod unless you have a good reason not to.
It is the setting for the CMod.
ScrollSpeed is one of the variables for controlling the speed mod.
Use CMod, XMod, or MMod to set the speed mod unless you have a good reason not to.
It is the setting for the XMod.
Skew is one of the mods for controlling the perspective. Use Overhead, Distant, Incoming, Space, Distant, or Hallway for controlling the perspective in the old way.
Skew moves the vanishing point for the note field away from the center of the screen.
Skew has no effect in single mode if Center1Player is true.
Skew has no effect in double mode.
If the player is using Space ((positive skew and positive tilt) or (negative skew and negative tilt)), returns the value of skew and its approach_speed.
Returns nil otherwise.
If the optional first argument is passed, sets tilt to value and skew to value.
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
TimeSpacing is one of the variables for controlling the speed mod.
Use CMod, XMod, or MMod to set the speed mod unless you have a good reason not to.
It controls whether the speed mod is in X mode or C mode. It should only be set to 0 or 1, and is only a float value to allow tweening between the two states.
Tilt is one of the mods for controlling the perspective. Use Overhead, Distant, Incoming, Space, Distant, or Hallway for controlling the perspective in the old way.
Tilt tilts the note field forward and back.
Returns `true` if the player is using reverse. (equivalent to `GetReverse() == 1.0`)
If the player has a XMod set, returns the value of that XMod and its associated approach speed. Returns nil otherwise.
If the optional first argument is passed, sets the XMod to the value and disables any CMod or MMod that is set.
If the optional second argument is passed, sets the speed at which the transition occurs.
Fails the player.
Returns `true` if a full combo (TNS_W3 and up) was obtained.
Returns `true` if a full combo (`tns` and up) was obtained.
Returns the number of Dance Points obtained by the player.
Returns how long the player has been alive.
Returns the best tap note score for a full combo.
Returns the number of calories burned.
Returns a table of all the combos. Each entry in the table is a table containing the StartSecond, SizeSeconds, Count, Rollover, StageCount, and IsZero information for that combo.
Returns the current possible maximum score.
Returns the player's current combo.
Returns the player's current life from 0..1.
Returns the player's current miss combo.
Returns the number of Dance Points possible to be obtained by the player.
Returns the player's current score multiplier.
Returns `true` if the player failed.
Returns the player's grade.
Returns the player's HighScore.
Returns the number of judgments for a specified HoldNoteScore.
Returns the player's actual score on the lesson.
Returns the score needed to pass the lesson.
Returns table of samples of the life record from 0 to last_second. 'samples' determines the size of the table. 'samples' defaults to 100 if not specified.
Returns the player's life remaining seconds.
Returns the machine high score index for this performance.
Returns the number of controller steps.
Returns the peak combo award for this performance.
Returns the personal high score index for this performance.
Returns a table of played steps.
Gets the percentage of taps that were scored as `tns`.
Returns the player's Dance Point percentage.
Returns the number of possible Dance Points.
Returns a table of possible steps.
Returns a RadarValues object representing the player's actual performance.
Returns a RadarValues object representing the total values for the song.
Returns the score.
Returns the number of songs passed.
Returns the number of songs played.
Returns the stage award for this performance.
Returns how long the player survived in seconds.
Returns the number of judgments for a specified TapNoteScore.
Returns the max combo for this performance.
Returns `true` if the player was disqualified from ranking.
Applies the player options of ModsLevel_Preferred to the other ModsLevels.
Returns the current PlayerOptions for this PlayerState.
Returns the HealthState for this PlayerState.
Returns the multiplayer number for this PlayerState.
Returns the PlayerController for this PlayerState.
Returns the player number for this PlayerState.
Returns a PlayerOptions object for the specified ModsLevel.
Returns a string of player options for the specified ModsLevel. (was `GetPlayerOptions` before sm-ssc v1.2.3)
Returns a table of strings, containing the player options for the specified ModsLevel.
Returns the SongPosition for this PlayerState.
Returns the current Super Meter level for this PlayerState.
Sets the player options to `sPlayerOptions` for the specified ModsLevel.
Return the value of the preference `sPreference`.
Return true if preference `sPreference` exists.
Set the value of the preference `sPreference` to `value`.
Reset preference `sPreference` to the default value.
Saves preferences to disk.
Adds cals to the daily total.
Adds a screenshot entry to the profile. filename must be the full path of the screenshot, as returned by SaveScreenshot.
Calculates the number of calories burned based on the heart rate (in beats per minute), the duration (in seconds), and data in the profile.
Returns the age.
Returns a table of all high score names that have been used on this profile.
Returns the birth year.
Returns the number of calories burned during the current day.
Returns the profile's high scores for the specified ranking category.
Returns the Character being used by this profile.
Returns a composite of your high scores over courses with the specified StepsType and Difficulty.
Returns the percentage of courses that you've completed with the specified StepsType and Difficulty.
Returns the possible score of courses with the specified StepsType and Difficulty.
Returns the profile's display name.
Return the number of calories burned as a string.
Returns the number of calories needed to reach the goal.
Returns the number of seconds needed to reach the goal.
Returns the current goal type.
Returns the GUID of this Profile.
Returns whether this profile ignores the step count based calorie calculation.
Returns whether this profile uses the male formula when CalculateCaloriesFromHeartRate is used.
Gets the profile's HighScoreList for a specified Song and Steps. (Alternate arguments for Courses: `Course c, Trail t`)
Gets the profile's HighScoreList for a specified Song and Steps. (Alternate arguments for Courses: `Course c, Trail t`)
If the profile does not have a HighScoreList for the Song and Steps, returns nil. Use this to avoid increasing the memory footprint of the profile when checking the score lists for every song and steps.
Returns the last played Course for this profile.
Returns the last played Song for this profile.
Returns the last used high score name.
Returns the number of Toasties gotten using the specified profile.
Returns the profile's most popular course.
Returns the profile's most popular song.
Returns the total number of songs played with the profile.
Returns the position the profile should have in its category in the list.
Returns the number of times song `s` has been played with the profile.
Returns a composite of your high scores over songs with the specified StepsType and Difficulty.
Returns the percent complete for all songs and courses for the specified StepsType `st`.
Returns the percentage of songs that you've completed with the specified StepsType and Difficulty.
Returns the possible score of songs with the specified StepsType and Difficulty.
Return the total number of calories burned.
Returns the number of dance points earned.
Returns the number of Hands stepped on.
Returns the number of successful Holds.
Returns the number of Jumps stepped on.
Returns the number of successful Lifts.
Returns the number of Mines stepped on.
Returns the total number of songs played with the profile.
Returns the number of successful Rolls.
Returns the number of steps with the specified StepsType and Difficulty that you've scored a certain Grade `g` on.
Returns the number of Taps and successful Holds.
Returns the number of trails with the specified StepsType and Difficulty that you've scored a certain Grade `g` on.
Returns the type of the profile. The type of the profile is only used to determine where the profile shows up in the list of profiles, and that problem is already handled by ProfileManager, so if you're reading this, this function only exists so you can make your theme color this profile's list entry based on the type or something like that.
Returns the user table for this Profile.
Returns the VO2 max for this profile.
Returns how much the player weighs.
Returns `true` if the player has passed any steps in the specified Song `s`.
Returns `true` if the specified code `sUnlockEntryID` is unlocked.
Sets the birth year of the profile.
Sets the current for the Profile.
Sets the display name of the profile to name.
Sets the goal to `iCals` calories.
Sets the goal to `iSecs` seconds.
Sets the current goal type to `gt`.
Sets whether this profile ignores the step count based calorie counting.
Sets whether this profile uses the male formula when CalculateCaloriesFromHeartRate is used.
Sets last used high score name.
Sets the VO2 max for the profile. 0 is treated as unset.
Sets how much the player weighs (in pounds) to `weightPounds`.
Returns the amount of time this profile has spent in gameplay (in seconds).
Returns the number of sessions this profile has had.
Returns the total session length (in seconds) of this profile.
Returns the Profile for the specified profile ID.
Returns a table of the local profile display names.
Returns a table of the local profile IDs.
Retuns the machine profile.
Retuns the amount of local profiles.
Returns the player name for player `pn`.
Returns the profile for player `pn`.
Returns the profile directory of the specified `ProfileSlot`.
Returns the number of times Song s has been played with the specified ProfileSlot.
Returns the current stats prefix.
Returns `true` if player `pn`'s profile is persistent.
Returns `true` if Song `s` has never been played before (according to the machine profile).
Returns `true` if the profile from the memory card is new.
Returns `true` if `pn`'s Profile was loaded from a memory card.
Returns `true` if the last load of player `pn`'s profile was a LastGood copy of the profile.
Returns `true` if the last load of player `pn`'s profile resulted in a tampered or corrupt profile.
Saves the local profile with the specified ID.
Saves the machine profile.
Saves the profile for player `pn`.
Sets the current stats prefix. The stats prefix is prepended to the Stats.xml file when loading or saving a profile. SetStatsPrefix will reload all profiles from the Stats.xml that has the given prefix. In general, score entries are the only thing not preserved when changing the stats prefix. Profile::HandleStatsPrefixChange in Profile.cpp lists the fields that are preserved.
Returns the value of `rc` from .
You must call create_bezier to create a RageBezier2D to use any of these functions. When you are done with the object, destroy it with its destroy function to avoid a memory leak.
A RageBezier2D is two RageQuadratics, one for the x coordinate and one for the y.
This class is provided as a tool for designers working with bezier tweens who need a tool that displays the tween curve visually.
If you use Actor:tween(time, "TweenType_Bezier", {xa, ya, xb, yb, xc, yc, xd, yd}) to tween an actor, the actor creates a RageBezier2D internally and calls evaluate_y_from_x each frame to set where it is in the tween.
Destroys the RageBezier2D. Do not attempt to use it after it has been destroyed.
Evaluates the bezier curve at the given t and returns the x and y values. This is equivalent to using get_x and get_y to fetch the quadratic parts and calling evaluate on them directly.
Takes the x given and converts it to a t value, then evaluates the y quadratic with the t value and returns the result.
Returns the RageQuadratic used for the x component.
Returns the RageQuadratic used for the y component.
Sets the values used by the two quadratics. This is equivalent to using get_x and get_y to get the quadratics and setting them directly. Note that the components for the x quadratic and the y quadratic are interleaved.
Return the height of the display.
Return the width of the display.
Return the number of frames per second.
Return the VPF.
Return the cumulative FPS.
These commands require a RageFile handle. You can create one using .
Returns `true` if the current position within the file is the end. (EOF = End of File)
Clears the last error message.
Closes the file and releases it from memory.
Safely deletes the file handle.
Flushes the buffer for the file handle, writing any pending output to disk.
Gets the last error message and returns it.
Gets a line and returns it.
Opens a file at `sPath` (relative to the StepMania root directory).
iAccessType
can be set to read (`1`), write (`2`), stream (`4`) or flush to disk on close (`8`).
These can also be combined with addition. For example, to set up read and write, set `iAccessType` to `3` (1+2).
Puts a new line in the file.
Returns a string containing the entire contents of the file.
Returns `length` bytes from the RageFile's current position.
Seeks to a position in the file and returns the new position.
Returns the current position in the file.
Writes a file with the contents of `str`.
Returns `true` if a file exists at `sPath`.
Returns a listing of files from `sPath`. The last two arguments are optional (and default to false).
Returns a file's size in bytes.
Returns the hash of the file at `sPath`.
Return an array of connected input device descriptions.
If you use Actor:tween(time, "TweenType_Bezier", {a, b, c, d}) to tween an actor, the actor creates a RageQuadratic internally and calls evaluate each frame to set where it is in the tween.
Evaluates the quadratic at the given t value and returns the result.
Returns the four values that form the quadratic equation. This function returns multiple values, so you must do something like this to get them:
a, b, c, d= quadratic:get_bezier()
Equivalent to evaluate(1), but faster.
Equivalent to evaluate(0), but faster.
Returns the slope of the curve at the given t value.
Sets the four values that form the quadratic equation.
Sets the four values that form the quadratic equation, treating the arguments as from a cubic equation instead of as from a bezier curve.
See for loading a sound.
Returns the length of the sound loaded into this RageSound. Returns -1 if no sound is loaded.
Actually sets the value of `sProperty` to `fVal`. The supported properties depend on how the associated was loaded.
Attempts (and typically fails) to set the value of `sProperty` to `fVal`. The supported properties depend on how the associated was loaded.
Sets the pitch to `fPitch`. The associated have `SupportsRateChanging = true` on load.
Sets the speed (that is, the rate at which the sound plays) to `fSpeed`. The associated must have `SupportsRateChanging = true` on load.
Sets the volume to `fVolume`, which is between 0..1.
Returns the source width.
Returns the source height.
Returns the texture width.
Returns the texture height.
Returns the image width.
Returns the image height.
Returns the number of frames in this texture.
Returns the path to the texture's file.
Return the texture coordinate rectangle as `{left, top, right, bottom}`.
Sets the animation or movie looping to `bLoop`.
Sets the animation or movie position to `fPos`.
Sets the animation or movie playback rate to `fRate`.
Reloads the texture.
Loads the metrics for this RollingNumbers from `sGroupName`.
Sets the target number to `f`.
This adds the lua function "callback" to the list of functions the screen will pass input to. Whenever an input event occurs, callback will be passed a table with the details of the event. callback must return a bool to indicate whether the event was handled. If callback returns true, the event will not be passed any further.
This should not be used to provide text input because that would not handle localization or different keyboard layouts.
The screen and the callbacks will both be passed input events, so be aware of what input the current screen responds to and consider the effects.
Details of the table containing the event data:
{
DeviceInput= { -- The raw details of the event.
device= string, -- The type of device. The first half of the string will be "Device_", the second half will be from InputDeviceNames in RageInputDevice.cpp.
button= string, -- The button that was pressed. the first half of the string will be "DeviceButton_", the second half will be from InitNames in RageInputDevice.cpp.
level= float, -- A floating point value for analog input.
z= float, -- Mousewheel input.
down= bool, -- Whether the button is down. This is level with a threshold and debouncing applied.
ago= float, -- How long ago this input occurred, in seconds.
is_joystick= bool, -- True if the device is a joystick.
is_mouse= bool -- True if the device is a mouse.
}, -- This ends the list of things inside the DeviceInput part of the table.
controller= string, -- The game controller this event was mapped to. "GameController_1" or "GameController_2", or nil if the event wasn't mapped to either controller.
button= string, -- The semi-raw button that was pressed. This is what the button was mapped to by the keymap settings, but without the conversions that occur when OnlyDedicatedMenuButtons is true. Will be empty if the button was not mapped.
type= string, -- The type of event. "InputEventType_FirstPress", "InputEventType_Repeat", or "InputEventType_Release".
GameButton= string, -- The cooked button that was pressed. This is button with mapping that occurs when OnlyDedicatedMenuButtons is true applied. This is nil for unmapped buttons.
PlayerNumber= PlayerNumber, -- The player that the controller is mapped to, or nil.
MultiPlayer= string, -- Unknown purpose.
}
Returns the name of the next Screen.
Returns the name of the previous Screen.
Returns the ScreenType for this Screen.
Locks input for `f` seconds.
[02 Other.lua] Gets a metric from the current Screen.
Posts a message with the text `sScreenMsg` to the Screen after `fDelay` seconds.
This removes the callback from the list.
Sets the NextScreen value to name.
Sets the PrevScreen value to name.
[02 Other.lua] Gets a string from the current Screen in the current language.
Returns the current .
Returns the current StageStats.
This should behave identically to the normal back button behavior. This function is for the pause menu to use when the player forfeits or restarts, so that a score isn't saved.
Returns `true` if a single has its NoteField centered.
Returns a dummy PlayerInfo for the specified index.
Returns the current haste rate. HasteRate * MusicRate is the current total rate the music is multiplied by.
Returns the for the specified `pn`.
Returns the next in the current .
Returns the PlayerInfo for player `pn`.
Returns the current true beats per second for the specified player.
This takes into account the current music rate and the current haste effect.
If you are displaying the BPM on ScreenGameplay, this is what you should use to have correct behavior when Haste and/or a music rate mod are in effect.
This is part of the system for controlling how haste behaves.
Read Docs/Themerdocs/haste.txt.
This is part of the system for controlling how haste behaves.
Read Docs/Themerdocs/haste.txt.
This is part of the system for controlling how haste behaves.
Read Docs/Themerdocs/haste.txt.
This is part of the system for controlling how haste behaves.
Read Docs/Themerdocs/haste.txt.
Sets the next Screen to be loaded.
Returns `true` if the game is paused.
Pauses or unpauses the game, depending on the value of `bPause`.
Returns the LifeMeter.
Adds a screen at the top of the screen stack. (`sMessage` is an optional ScreenMessage posted once the new screen is finished.)
Gets the screen at the top of the screen stack.
Returns whether the input for the player has been redirected away from the normal screen input function. Input that has been redirected is only sent to lua input callbacks.
Plays the invalid sound.
Plays the start sound.
Plays the coin sound.
Plays the cancel sound.
Plays the screenshot sound.
Reloads any loaded overlay screens.
Returns `true` if screen class `s` exists.
Returns `true` if screen `s` is prepared.
Sets the next screen to `s`.
Sets whether the input for the player has been redirected away from the normal screen input function. Input that has been redirected is only sent to lua input callbacks.
This can be useful when putting a custom menu on a screen, and you want to disable the built in actors while the menu is open. Then you handle input through an input callback until the player closes the menu.
Broadcasts a system message.
Returns `true` if Player `pn` backspaced successfully.
Returns `true` if Player `pn` was able to add `sKey` to their name.
Attempts to finish Player `pn` and returns `true` if successful.
Returns `true` if anyone is entering their name.
Returns `true` if anyone is still entering their name.
(As opposed to those who are Finalized; see )
Returns `true` if Player `pn` is entering their name.
Returns `true` if Player `pn` is finished entering their name.
Gets the currently selected letter of Player `pn`.
Returns the number of active players.
Returns `true` if all active players are on the last options row.
Returns `true` if the specified player is on an items that ends the screen.
Returns the current row that player `pn` is on. (Was previously `GetCurrentRow`.)
Returns the number of rows on the screen.
Returns the specified OptionRow.
Returns `true` if we are going to PlayerOptions.
Continues to the next screen.
Returns `true` if there is a profile that can be loaded.
Continues to the next screen.
Returns `true` if there is a profile that can be saved.
Returns player `pn`'s current selected item as an integer.
Returns false if the options list is already open or the UseOptionsList metric is false.
Returns `true` if the player is going to the options screen.
Returns the MusicWheel used on this screen.
Opens the OptionsList for Player `pn`
[02 StageMods.lua] Sets up modifiers for course modes.
[02 StageMods.lua] Sets up modifiers for non-course modes.
Tells the screen to go to the previous screen.
Attempts to finish the screen and returns `true` if successful.
Returns the profile index of the specified Player.
Sets the profile index of Player `pn` to `iProfileIndex`.
TextEntrySettings is implemented similar to the Attributes in BitmapText. Formatting issues prevent the sample from being properly shown here.
Please see docs/Themerdocs/ScreenTextEntry.txt for the TextEntrySettings format.
Sets up a ScreenTextEntry's values.
Tells the screen to go to the previous screen.
Returns `true` if the screen is currently transitioning.
Tells the screen to go to play its Out transition, and then posts the ScreenMessage `sScreenMsg`. To go to the next screen, use "SM_GoToNextScreen" as the argument.
Sets whether the screen allows late joining. This only works for screens that are just ScreenWithMenuElements, as most derived screens have their own hard coded function for whether late joining is allowed.
Returns an array of all the available objects for a .
Returns the path to the song's background image.
Returns the path to the song's banner.
Returns a table with all the data for the song's BGCHANGES line.
Each element of the table is one change like this:
{start_beat= 1.0, rate= 1.0, transition= "example", effect= "example", file1= "example", file2= "example", color1= "#FFFFFFFF", color2= "#FFFFFFFF"}
Returns the path to the song's CD image.
Gets the path to the CDTitle.
Returns the path to the song's disc image (different from CD, think Pump).
Returns the displayed artist of the song.
Returns a table of 2 floats containing the display BPMs.
Returns the displayed full title of the song, including subtitle.
Returns the displayed main title of the song.
Returns the displayed subtitle of the song.
Returns the first beat of the song.
Returns the first second of the song.
Returns the genre of the song.
Returns the group name that the song is in.
Returns the path to the song's jacket image.
Returns the last beat of the song.
Returns the last second of the song.
Gets the path to the lyrics.
GetDisplayMainTitle checks the ShowNativeLanguage pref and returns the transliterated title is that pref is false.
GetMainTitle (this function) does not check that pref. Instead, it directly returns the title, exactly as it is in the #TITLE field in the simfile.
Gets the path to the music file.
Returns a Step object if the StepType and Difficulty exist.
Gets the Song's origin.
Returns the path to the Song's preview music. This handles the #PREVIEW tag internally, so it works with songs that use it and songs that don't.
Returns the path to the Song's preview video, if it exists. (Returns `nil` otherwise.)
Gets the length of a song's sample time in seconds.
Gets the starting position of a song sample in seconds.
Returns the song's directory.
Returns the songfile path.
[02 Other.lua] Returns the number of stages this song costs.
Returns a table of Steps that have StepsType `st`.
Returns how long the longest stepchart is in seconds.
Returns the song's TimingData.
Returns the transliterated artist of the song.
Returns the transliterated full title of the song, including subtitle.
Returns the transliterated main title of the song.
Returns the transliterated subtitle of the song.
Returns `true` if the song has steps for the specified difficulty in `st`.
Returns `true` if the song has attacks.
Returns `true` if the song has a background.
Returns `true` if the song has a banner.
Returns `true` if the song has BGChanges.
Returns `true` if the song has a CD image.
Returns `true` if the song has a CDTitle.
Returns `true` if the song has a Disc graphic.
Returns `true` if the song has edits.
Returns `true` if the song has a jacket graphic.
Returns `true` if the song has lyrics.
Returns `true` if the song has music.
Returns `true` if the song has a preview video.
Returns `true` if the song has significant BPM changes or stops.
Returns `true` if the song has the specified StepsType.
Returns `true` if the song's DisplayBPM is constant.
Returns `true` if the song's DisplayBPM is random.
Returns `true` if the song's DisplayBPM is secret.
Returns `true` if the song is considered easy.
Returns `true` if the song is enabled.
Returns `true` if the song meets the criteria for a "Long Version".
Returns `true` if the song meets the criteria for "Marathon" length.
Returns `true` if the song and the specified steps have different timing.
Returns `true` if the song only has Beginner steps.
Returns the length of the song in seconds.
Returns `true` if the song is normally displayed.
Returns `true` if the song is shown in Demonstration and Ranking.
Returns `true` if the specified course group exists.
Returns `true` if the specified song group exists.
Returns a Course if one matching `sCourse` is found.
Returns a Song if one matching `sSong` is found.
Returns an array of all the installed courses.
Returns an array of all the installed songs.
Returns the course color of Course `c`.
Returns the path to the specified course group's banner.
Returns a table containing all of the course group names.
Returns a table with all of the courses in the specified group.
Returns the extra stage info (Song, Steps) for the specified Style `s`. (If `bExtra2` is true, it will use the second Extra Stage data instead of the first. Again, Lua.xsd sucks)
Returns the number of courses loaded via Additional folders.
Returns the number of songs loaded via Additional folders.
Returns the number of course groups.
Returns the number of courses.
Returns the number of selectable and unlocked songs.
Returns the number of song groups.
Returns the number of songs.
Returns the number of locked songs, regardless of reason for locking.
Returns the number of unlocked songs.
Returns a table of popular courses for the specified CourseType.
Returns a table of popular songs.
Returns a table of courses as they'd appear in preferred sort.
Returns a table of songs as they'd appear in preferred sort.
Returns a random course.
Returns a random song.
Returns the song color of Song `s`.
Returns a Song given a set of Steps `st`.
Returns the path to the specified song group's banner.
Returns the song group color of `sGroupName`.
Returns a table containing all of the song group names.
Returns the rank (popularity) of Song `s`.
Returns a table containing all of the songs in group `sGroupName`.
Returns the shortened group name (based on entries in Translations.xml).
Loads preferred courses from `{theme}/Other/SongManager sListName.txt`.
Loads preferred songs from `{theme}/Other/SongManager sListName.txt`.
Returns the preferred sort section name for the specified Song.
Returns `true` if the specified course was loaded from AdditionalCourses.
Returns `true` if the specified song was loaded from AdditionalSongs.
See the description for PlayerOptions. The functions follow the same design.
Limited to the range 0 < rate <= 3 because speeds greater than 3 are likely to crash.
A multiplier for the haste system. Limited to the range -1 to 1.
Returns the current beats per second.
Returns `true` if a Delay is active.
Returns `true` if a Freeze is active.
Returns the row where a warp appears.
Returns the warp destination length.
Returns the length of the animation in seconds.
Gets whether the Sprite should call the decode function for its texture during updates.
Return the number of states this Sprite has.
Returns the Sprite's current state (frame number in a multi-frame sprite).
Returns the Sprite's texture.
[02 Sprite.lua] Returns a `Frames` table consisting of `iNumFrames` frames lasting for a total of `fSeconds` seconds. This function is not a member function and should be used as `Frames = Sprite.LinearFrames( 5, 2.6 )`.
If `sPath` is `nil`, then unload the texture. Otherwise, load the texture at path `sPath`.
Load the song background texture at `sPath`.
Load the song banner texture at `sPath`.
[02 Sprite.lua] Loads the background from the current Song or the first Trail entry.
[02 Sprite.lua] Load the texture for `song`'s background.
[02 Sprite.lua] Load the texture for `song`'s banner.
Sets the custom image rectangle. (Works in image pixel space.)
Sets custom offsets for the corners of the Sprite. Coordinates are paired, corner order is upper left, lower left, lower right, upper right.
Turns off the custom pos coords for the sprite.
Sets whether the Sprite should call the decode function for its texture during updates.
Set the to `mode`.
Sets the number of seconds into the animation to `fSeconds`.
Sets the properties of the states of the sprite. The properties table is identical to the "Frames" table that can be put in the sprite when calling Def.Sprite.
Example:
{{Frame= 0, Delay= .016, {0, 0}, {.25, .25}},
{Frame= 1, Delay= .016, {0, 0}, {.25, .25}},
{Frame= 2, Delay= .016, {0, 0}, {.25, .25}},
{Frame= 3, Delay= .016, {0, 0}, {.25, .25}},
}
Frame is optional, defaulting to 0.
Delay is optional, defaulting to 0.
The two tables are optional upper left and lower right corners of the fraction of the frame to use. The example makes the sprite only use the upper left corner of each frame.
Simpler example:
{{Frame= 0, Delay= .016}, {Frame= 1, Delay= .016}, {Frame= 2, Delay= .016}, {Frame= 3, Delay= .016}}
This example makes the sprite use the whole of each frame.
Set the texture to `texture`.
Allows the themer to set a custom texture rectangle that effects the way the texture is drawn.
Returns true if the sprite is using the effect clock for texcoordvelocity.
[02 Sprite.lua] Call `RageTexture:loop``( bLoop )` on the texture.
[02 Sprite.lua] Call `RageTexture:position``( fPos )` on the texture.
[02 Sprite.lua] Call `RageTexture:rate``( fRate )` on the texture.
Scale the Sprite to width `fWidth` and height `fHeight` clipping if the dimensions do not match.
Set the Sprite's state to `iNewState`.
If `use` is true, then the sprite will use the effect clock for texcoordvelocity.
Set the texture coordinate velocity which controls how the Sprite changes as it animates. A velocity of 1 makes the texture scroll all the way once per second.
Crops the Sprite to `fWidth`x`fHeight`.
[01 alias.lua] Alias for CropTo.
Sets all the state delays to `fRate`. Useful for Sprites that need to change by BPM (e.g. Tran from DDR 5th Mix, the cube from DS EuroMix 2).
Returns `true` if everyone failed.
Returns the EarnedExtraStage value.
Returns the number of seconds played.
Returns the PlayerStageStats of multiplayer `mp`.
Returns the PlayerStageStats of player `pn`.
Returns the Stage value.
Returns the stage index.
Returns `true` if at least one person passed.
Returns `true` if player `pn` has a high score.
Returns the accumulated played StageStats.
Returns the best final grade.
Returns the best grade.
Returns the current StageStats.
Returns player `pn`'s final grade.
Get the StageStats from `iAgo` rounds ago.
Returns the number of stages played.
Returns the worst grade.
Resets the stats.
Returns the author that made that particular Steps pattern.
Returns the Steps chart name.
Returns the Chart Style for this Steps.
Returns the Steps description.
Returns the Steps difficulty.
Returns a table with the minimum and maximum values from the DisplayBPM.
Returns the DisplayBPM type.
Returns the Steps filename from the Cache.
Returns a hash of the Steps.
Returns the numerical difficulty of the Steps.
Returns `true` if the Steps has any attacks.
Returns `true` if the Steps pattern has significant timing changes.
Returns the complete list of RadarValues for player `pn`. Use to grab a specific value.
Returns the Steps type.
Returns the TimingData for the Steps.
Returns `true` if the Steps are an edit.
Returns `true` if the Steps are a player edit (loaded from a profile).
Returns `true` if the steps were automatically generated.
Returns `true` if the DisplayBPM is constant.
Returns `true` if the DisplayBPM is random.
Returns `true` if the DisplayBPM is secret.
Returns the predicted meter for this Step.
Returns `true` if the Steps use different `TimingData` from the Song.
Loads the StepsDisplay commands from the Metrics in group `sMetricsGroup`.
Sets the StepsDisplay from the GameState using Player `pn`.
Sets the StepsDisplay based on Steps `pSteps`.
Sets the StepsDisplay based on the passed in StepsType, `iMeter`, and Difficulty.
Sets the StepsDisplay based on Trail `pTrail`.
Returns the number of total tracks per player this Style contains (e.g. 4 for dance-versus, but 8 for dance-double).
Returns the name of the Style.
Returns the StepsType for this Style.
Returns the StyleType for this Style.
Returns a table containing the Track, XOffset, and Name of the column.
Returns the draw order of the column.
Returns the width of the notefield for the given player with this style.
Returns `true` if this style locks the difficulty for both players.
Deprecated. Always returns false.
Returns the of the Tap Note.
Returns the of the Tap Note.
Returns the of the Tap Note.
Returns the of the Tap Note.
Returns the of the Tap Note. Relevant for routine steps.
Returns the Attack Modifiers of the Tap Note.
Returns the Attack Duration of the Tap Note in seconds.
Returns the Keysound Index of the Tap Note.
Returns the Hold Duration of the Tap Note in beats.
Returns the of the Tap Note.
Returns the of the Tap Note.
Returns the TapNotOffset of the Tap Note.
Returns true if the Tap Note was judged with a result that would stop it from drawing.
Returns the of the Hold Note.
Returns the life of the Hold Note.
Returns the amount of time the hold has overlapped the target.
Returns the last beat the Hold Note was held.
Returns the number of checkpoints hit.
Returns the number of checkpoints missed.
Returns true if the note was initiated and is being held.
Returns true if the note was initiated.
Loads the TextBanner from the specified metrics group.
Loads the TextBanner's child elements from a .
Loads the TextBanner's child elements from strings.
Returns `true` if the specified language exists in the current theme.
Returns `true` if the specified theme exists.
[02 Utilities.lua] Returns the absolute path of a file in the theme.
Returns the current language.
Returns the theme's current directory.
Returns the name of the current theme.
Returns the value of `Element` in `Class` from metrics.ini.
Returns the names of all elements in `Class` from metrics.ini.
Returns the number of selectable themes.
Returns the path of `ClassName Element` in the BGAnimations folder.
Returns the path of an element in the Fonts folder.
Returns the path of an element in the Graphics folder.
returns three strings: BGAnimation ResolvedPath, MatchingMetricsGroup, MatchingElement. Used in LoadFallbackB in themes/_fallback/02 Other.lua. (Lua.xsd sucks)
Returns the path of an element in the Other folder.
Returns the path of an element in the Sounds folder.
Returns a table of selectable theme directories.
Returns the value of `Element` in `Class` for the currently loaded language.
Returns the names of all elements in `Class` for the currently loaded language.
Returns the author of the current theme or "[unknown author]".
Returns the display name of the current theme.
Returns `true` if the theme has the specified metric.
Returns `true` if the theme has the specified string.
Returns `true` if the specified theme is selectable.
Reloads the current theme's metrics.
Changes the current theme.
After the theme changes, the screen specified by the Common::AfterThemeChangeScreen metric will be loaded.
The Common::InitialScreen metric will be used if Common::AfterThemeChangeScreen is blank or invalid.
GetBPMsAndTimes, GetStops, GetDelays, GetLabels, GetWarps, GetCombos, GetTimeSignatures, GetTickcounts, GetFakes, GetScrolls, and GetSpeeds all have two different modes.
If false (or nothing) is the argument to these functions, they return tables of strings. The strings are numbers separated by '='.
If the argument is true, they return tables of tables, and the inner tables contain numbers as described for each function.
The first form is kept around and is the default for compatibility with older themes. The advantage of the second form is that you no longer need to have a bit of code in your theme to transform the string into a table of numbers before you can use it.
Example:
local bpmsand= timing_data:GetBPMsAndTimes()
for i, s in ipairs(bpmsand) do
local sand= split("=", s)
bpmsand[i]= {tonumber(sand[1]), tonumber(sand[2])}
end
-- do something that looks at all the bpms and times.
Becomes:
local bpmsand= timing_data:GetBPMsAndTimes(true)
-- do something that looks at all the bpms and times.
Returns the minimum and maximum BPM of the song in a table (in that order).
Returns the beat from `fElapsedTime`.
Returns the BPM at `fBeat`.
Returns a table of the BPMs as floats.
Returns a table of the BPMs and the times they happen as tables. The first value is the beat. The second value is the bpm.
Returns the elapsed time from `fBeat`.
Returns a table of the Stops and the times they happen as tables. The first value is the beat. The second value is the length.
Returns a table of the Delays and the times they happen as tables. The first value is the beat. The second value is the length.
Returns a table of the Labels and the times they happen as tables. The first value is the beat. The second value is the label.
Returns a table of the Warps and the times they happen as tables. The first value is the beat. The second value is the number of beats to warp over.
Returns a table of the Combos and the times they happen as tables. The first value is the beat. The second value is the combo. The third value is the miss combo.
Returns a table of the Time Signatures and the times they happen as tables. The first value is the beat. The second value is the numerator. The third value is the denominator.
Returns a table of the Tickcounts and the times they happen as tables. The first value is the beat. The second value is the number of ticks per beat.
Returns a table of the Fakes and the times they happen as tables. The first value is the beat. The second value is the number of beats to not judge.
Returns a table of the Scrolls and the times they happen as tables. The first value is the beat. The second value is the scroll rate ratio.
Returns a table of the Speeds and the times they happen as tables. The first value is the beat. The second value is the scroll rate ratio. The third value is the length of time to fully activate. The fourth value is the unit of activation (0 for beats, 1 for seconds).
Returns `true` if the TimingData contains BPM changes.
Returns `true` if the TimingData contains delays.
Returns `true` if the TimingData contains any BPM changes with a negative BPM.
Returns `true` if the TimingData contains stops.
Returns `true` if the TimingData contains warps.
returns `true` if the TimingData contains fake segments.
Returns `true` if the TimingData contains speed scrolling changes.
Returns `true` if the TimingData contains general scrolling changes.
Returns `true` if song `s` is in the Trail.
Returns an array with all the artists in the Trail.
Returns the Trail's difficulty.
Returns the length of this Trail in seconds.
Returns a table of TrailEntry items.
Returns the Trail's difficulty rating.
Returns the Trail's RadarValues.
Returns the Trail's StepsType.
Returns the Trail's total meter
Returns the TrailEntry at index `iEntry`.
Returns `true` if any of the Trail entries are secret.
Returns a string of modifiers used in this TrailEntry.
Returns the Song used in this TrailEntry.
Returns the Steps used in this TrailEntry.
(why'd I think this was a good idea when we have ?)
Sets the UnlockEntry's ID to `m_sEntryID`.
Sets the UnlockEntry's course to `sCourseName`.
Example: `course,"Driven"`
Returns the code for this unlock.
Returns the Course for this unlock.
Returns the unlock description.
Returns the UnlockRequirement.
Returns `true` if the UnlockEntry requires you to pass Hard steps.
Returns `true` if the UnlockEntry requires you to pass Challenge steps.
Returns the Song related to the UnlockEntry.
Get all of the steps locked based on StepsType.
Get all of the steps locked based on difficulty.
Returns the UnlockRewardType for this entry.
Returns `true` if the UnlockEntry is locked.
Sets the UnlockEntry's modifier to `sModifier`.
Sets the requirement for this unlock to `m_fRequirement`.
Makes the UnlockEntry require passing Hard steps.
Makes the UnlockEntry require passing Challenge steps.
Makes the UnlockEntry hide in Roulette.
Sets the UnlockEntry's song to `sSongName`. `sSongName` also requires the group.
Example: `song,"In The Groove/Pandemonium"`
Sets the UnlockEntry to unlock a specified song's steps.
Example: `steps,"In The Groove/Pandemonium","expert"`
Sets the UnlockEntry to unlock a specified song's stepstype.
Returns `true` if there are any unlocks to celebrate.
Returns the associated EntryID.
Returns the number of unlocked items.
Returns the number of all unlock items, regardless of status.
Returns the number of points for the machine profile based on the specified UnlockRequirement.
Returns the number of points for the specified profile based on the specified UnlockRequirement.
Returns the number of points until the next unlock.
Returns a table of songs unlocked by UnlockEntry `sEntryID`.
Returns a table of steps unlocked by UnlockEntry `sEntryID`.
Returns the UnlockEntry at `iIndex`.
Returns the UnlockEntry index to celebrate.
Sets the preferred Song/Course to the specified `sUnlockEntryID`
Unlocks an entry by ID.
Unlocks an entry by index.
Determines if a song is locked by any means. The number returned determines how the song is locked.
Returns the wheel's current index.
Returns the total number of items in the wheel.
Returns the WheelItemDataType of the selected item.
Returns the WheelItem at index `iIndex`.
Returns `true` if the wheel is locked.
Returns `true` if the wheel is settled/stopped moving.
Moves the wheel by `n`.
Attempts to set the open section to `sSection`.
Returns the color of this wheel item.
Returns the text of this wheel item.
Returns the type of this wheel item.
Returns whether the wheel item has been loaded yet. If this function returns false, calling any other WheelItemBase function will result in an error.
A specific case where this is known to happen is commands that trigger on CurrentSongChanged because the music wheel clears the current song before it finishes loading if the current song is longer than the number of stages remaining.
Sets the WorkoutGraph from the current Workout.
Sets the WorkoutGraph from GameState and song index `iSongIndex`.
Blending modes. See .
Horizontal alignment. See .
Vertical alignment. See .