StepMania (and it's many forks) use what's known as the Actor model. OutFox inherits this behaviour. Everything in the engine is an Actor at its' very core.
Because everything is an actor, there are many types of actors, which are described below. Not everything listed is able to be created in Lua. Those that aren't will be noted as such. However, all of these can be found in the Lua environment.
A note on LoadActor()
This is a helper function that can be used to dynamically load an actor based on the file type. However, this should not be used as it is more resource intensive and can be easily avoided when the filetype is known. For loading external lua files,
loadfile(path)()
can be used, though the full path is required.
The following actors cannot be generated with Lua, but instead can be accessed based on the current screen with self:GetChild
.
A song or course banner, meant for use with custom music wheels or any other place a song's banner would show up.
Shows the combos that were held throughout the song, with combo breaks separating the blocks, and the largest combo being colored.
Def.ComboGraph{
InitCommand=function(self)
-- Load the MetricsGroup that will create the basis for the graph.
self:Load("ComboGraph")
local playerStageStats = STATSMAN:GetCurStageStats():GetPlayerStageStats(player)
local stageStats = STATSMAN:GetCurStageStats()
-- Data is graph from the current stage stats and the player's stats.
self:Set(stageStats, playerStageStats)
end
}
A list of the songs for a given course. Can be given a limit for how many songs to show and how many to show at a time.
Displays a list of all input devices. Often, Keyboard and Mouse will be listed.
Functions like most other BitmapText actors.
A Sprite-type actor that shows a different icon for each difficulty.
If there number of frames are double the amount of difficulties available in the engine, the player number will offset the icon shown.
A song or course banner that can fade between the banner for different songs or courses.
Often seen in ScreenSelectMusic.
Displays a graph containing data points for a player's life throughout the stage.
Settings for a GraphDisplay can only be defined through metrics.
Def.GraphDisplay{
InitCommand=function(self)
-- Load the MetricsGroup that will create the basis for the graph.
self:Load("GraphDisplay")
local playerStageStats = STATSMAN:GetCurStageStats():GetPlayerStageStats(player)
local stageStats = STATSMAN:GetCurStageStats()
-- Data is graph from the current stage stats and the player's stats.
self:Set(stageStats, playerStageStats)
end
}
A recreation of the five-point "Groove Radar" from DDR. Can take arbitrary values as well as the song's radar values.
Note that the visual aspect of the GrooveRadar depends on metrics set on the GrooveRadar
metrics group, and the
GrooveRadar graphics set.
Def.GrooveRadar {
InitCommand=function(self)
-- Let's use random values to fill the graph.
self:SetFromValues({1,0.5,0.8,0.4,1})
end
}
Often found in Player, though there is no way to grab the ones that are in Player.
The judgment that shows up on a column when dropping or clearing a hold & roll.
There is an extra function to allow tracking the hold judgments from a MultiPlayer.
Def.HoldJudgment{
File=THEME:GetPathG("Hold","Judgment"),
InitCommand=function(self)
end
}
This is an actor type created from _fallback's scripts.
Displays lua script errors as they happen. Most themers shouldn't need to touch this.
Cannot be created from lua, but can be grabbed from ScreenGameplay.
Often used in gameplay screens. This shows how much life a Player currently has.
Cannot be created from lua.
Often used in gameplay screens. This shows how many more mistakes a player is allowed before failing.
Shows the current state of a player's inserted memory card. Made of images, with one for each state.
Def.MemoryCardDisplay{
PlayerNumber=PLAYER_1
}
Cannot be created from lua, but is a part of every screen that inherits from ScreenWithMenuElements.
A Timer that counts down and proceeds to the next screen when it reaches 0.
Shows the current progress of an operation. It appears to only show the progress as 50%.
Shows icons for the currently set modifiers of a player.
Not all modifiers have an icon, and the settings can only be set through metrics.
Cannot be created from lua, but can be grabbed from the TopScreen.
The wheel used to select songs in ScreenSelectMusic or courses in ScreenSelectCourse.
Cannot be created from lua, but can be grabbed from NoteField.
This is a dedicated actor for a column in the notefield, and can be treated like any other actor.
Cannot be created from lua.
Often seen in options screens, this actor allows for picking and choosing various options for a given setting.
Shows the number of steps, jumps, holds, rolls, mines, hands, lifts, fakes, the machine profile's highscore & name and the current profile's high score for a given chart.
Settings must be defined through Metrics.
Cannot be created from lua, but is part of ScreenGameplay
The entirety of the playfield. Holds the judgment, hold judgments, combo and the NoteField.
An arbitrary rectangle. Acts like a Sprite with a blank texture.
-- Generate a 64 x 64 rectangle on the center of the screen, and color it Yellow.
Def.Quad{
OnCommand=function(self)
self:zoomto( 64,64 ):diffuse( Color.Yellow )
:xy( SCREEN_CENTER_X, SCREEN_CENTER_Y )
end
}
Can't be defined in lua, but can be defined in a theme's metrics.
A screen the theme can go to. There are screens for gameplay, selecting music, pre-gameplay, etc. Each screen has a background, underlay, overlay and decorations that can be used.
Displays the data for a given chart. Can show difficulty number, description, credit, if it's autogen and steps type.
Currently, all setings are done through metrics.
Shows the list of steps available for a given song.
The name given determines what metrics group to load from.
Def.StepsDisplayList {
Name="StepsDisplayList",
-- These define the cursor the players will be controlling. The rest of the elements are defined
-- by the metrics.
CursorP1=Def.Actor{},
CursorP2=Def.Actor{},
CursorP1Frame=Def.Actor{},
CursorP2Frame=Def.Actor{}
}
A "Banner" that contains the song name, artist and subtitle.
Usually seen in the CourseContentsList of ScreenSelectMusic or the ScrollerItem in ScreenHighScores.
-- This example uses this set from a CourseContentsList, hence the SetSong command.
Def.TextBanner {
InitCommand=function(self)
self:Load("TextBannerCourse"):SetFromString("", "", "", "", "", "")
end,
SetSongCommand=function(self, params)
if params.Song then
self:SetFromSong( params.Song )
self:diffuse(color("#FFFFFF"))
else
self:SetFromString( "??????????", "??????????", "", "", "", "" )
self:diffuse( color("#FFFFFF") )
end
end
}
Cannot be created from lua.
A base class for wheels. Currently, the MusicWheel and RoomWheel inherit from this.
Cannot be created from lua.
A base class for items residing in wheels. MusicWheelItems inherit from this.