Decorations

Decorations are a construct (of sorts) available in StepMania 5 and sm-ssc. They are used for placing elements on the screen, as opposed to writing all of the Lua code out in the overlay.

Commands
The decorations system is exposed with a few commands.

is used when initializing the table to be returned. It fills the table with any fallback decorations (usually ones from ScreenWithMenuElements). Most decorations files will want this (ScreenGameplay's usually won't).

This table will be used for all the below examples.

returns the metric " " from the currently loaded screen. It's useful for putting chunks of content behind a toggle.

The primary way to load decorations is with StandardDecorationFromFile(MetricsName,FileName). This makes a new set of basic metrics with the desired prefix (  var). It also loads the specified file in the format. This can be any possible filetype StepMania can load, but is usually a graphic or Lua script.

Similar to, but also checks for the " " metric.

For more complex decorations, you may need to run some code in order to generate some items. This is where  comes in.