The storyboard Lua API is the set of globals injected byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/InventiveRhythm/fluXis/llms.txt
Use this file to discover all available pages before exploring further.
StoryboardScriptRunner on top of the shared base. It gives your process() function everything needed to build a complete visual layer: constructors for every element type, a function to commit elements to the storyboard, read-only global objects describing the screen, the current map, and the player’s settings, and a rich animation system on every element.
Entry Point — the process() Function
Every storyboard script must define a top-level function called process. The engine calls it once per Script-type storyboard element and passes that element as the parent argument. All element creation and Add() calls should happen inside this function or in functions it calls.
The
parent argument is a StoryboardElement userdata that represents the Script element itself. You can read custom parameters from it with parent:param("myKey", defaultValue).Add(element)
Commits a constructed element to the storyboard so it is rendered during gameplay. Call this once per element after you have finished configuring all its fields and animations.Any element object returned by one of the constructor functions below.
Element Constructors
Each constructor returns a new element object pre-populated with default values. Set fields on the returned object before passing it toAdd().
StoryboardBox()
A solid filled rectangle. Supports
Width, Height, Color, and blend options. Animatable dimensions: Width, Height.StoryboardOutlineBox()
A hollow rectangle with a configurable border thickness. Adds the
border field on top of the base element fields. Animatable: Width, Height, Border.StoryboardSprite()
A textured sprite loaded from the map folder. Requires the
texture field to be set to a file path relative to the map directory.StoryboardText()
A rendered text label. Set
text for content and size for the font size in pixels.StoryboardCircle()
A solid filled circle/ellipse. Supports
Width and Height for radius control. Animatable: Width, Height. Rotation is disabled by default.StoryboardOutlineCircle()
A hollow circle with a configurable
border thickness. Animatable: Width, Height, Border, Rotate.StoryboardSkinSprite(str)
Renders a sprite sourced from the active player skin. The
str argument must be one of the SkinSprite enum values (see table below).StoryboardSkinSprite — SkinSprite Values
| Value | Description |
|---|---|
"HitObject" | Standard hit note body |
"LongNoteStart" | Head of a long note |
"LongNoteBody" | Repeating body of a long note |
"LongNoteEnd" | Tail of a long note |
"TickNote" | Full-size tick note |
"TickNoteSmall" | Small tick note variant |
"Receptor" | The receptor / judgement line column |
"StageBackground" | Main stage background panel |
"StageBackgroundTop" | Top cap of the stage background |
"StageBackgroundBottom" | Bottom cap of the stage background |
"StageLeftTop" | Top of the left stage border |
"StageLeft" | Middle of the left stage border |
"StageLeftBottom" | Bottom of the left stage border |
"StageRightTop" | Top of the right stage border |
"StageRight" | Middle of the right stage border |
"StageRightBottom" | Bottom of the right stage border |
StoryboardSkinSprite also exposes three extra fields:
Numeric index of the skin sprite (set automatically from the
str constructor argument).The lane index the sprite should be visually tied to.
The key count used to look up lane-specific skin metrics.
Base Element Fields (StoryboardElement)
Every element type inherits these fields. All numeric fields accept plain Lua numbers.
Render layer. Use the
Layer() helper: Layer("Background"), Layer("Foreground"), or Layer("Overlay"). The numeric values are Background=0, Foreground=1, Overlay=2.Absolute map time in milliseconds at which the element appears (spawns).
Absolute map time in milliseconds at which the element disappears (despawns).
Anchor point of the element’s container relative to its parent. Use
Anchor("Centre"), Anchor("TopLeft"), etc. See the full anchor table below. Defaults to TopLeft.Origin point within the element itself — the pivot used for position, rotation, and scale transforms. Same values as
anchor. Defaults to TopLeft.Horizontal position in pixels. Measured from the anchor point.
Vertical position in pixels. Measured from the anchor point.
Z-index / depth ordering within the same layer. Higher values render on top.
Width of the element in pixels.
Height of the element in pixels.
Tint colour as a packed ARGB hex integer, e.g.
0xFFFFFFFF for opaque white or 0xFF4488FF for a solid blue.When
true, enables custom blending using blendMode.The blend equation to use when
blend is true. Use BlendMode("Add"), BlendMode("Screen"), etc.Anchor / Origin Values
Use theAnchor(name) helper to convert a name string to its numeric value.
| Name | Position |
|---|---|
"TopLeft" | Top-left corner |
"TopCentre" | Top edge, centred horizontally |
"TopRight" | Top-right corner |
"CentreLeft" | Left edge, centred vertically |
"Centre" | Dead centre |
"CentreRight" | Right edge, centred vertically |
"BottomLeft" | Bottom-left corner |
"BottomCentre" | Bottom edge, centred horizontally |
"BottomRight" | Bottom-right corner |
BlendMode Values
| Name | Behaviour |
|---|---|
"None" | No blending |
"Inherit" | Inherit parent blend mode |
"Mix" | Standard alpha compositing |
"Difference" | Absolute difference |
"Add" | Additive blending (brightens) |
"Subtract" | Subtractive blending |
"Screen" | Screen blend |
"Multiply" | Multiply blend |
"Premultiplied" | Premultiplied alpha |
Element Methods
:animate(type, time, len, startVal, endVal, ease)
Attaches an animation keyframe to the element. Multiple calls stack to form a full animation timeline.
What property to animate. See the table below.
When this animation starts, in milliseconds. In script version 2+, this is relative to the element’s own
time field, not absolute map time.Duration of the animation in milliseconds.
The starting value encoded as a string. Format depends on
type — a number for scalar properties, "r,g,b,a" for Color.The ending value in the same format as
startVal.The easing curve to apply. Use
Easing("OutQuad"), Easing("InOutSine"), etc. See the full list in the Global Functions reference.AnimationType Values
| Type | Animated Property |
|---|---|
"MoveX" | Horizontal position (x) |
"MoveY" | Vertical position (y) |
"Scale" | Uniform scale |
"ScaleVector" | Non-uniform scale (x,y vector) |
"Width" | Element width |
"Height" | Element height |
"Rotate" | Rotation in degrees |
"Fade" | Opacity / alpha |
"Color" | Tint colour (RGBA) |
"Border" | Border thickness (outline elements only) |
:param(key, fallback)
Reads a user-defined parameter value from the Script element that owns this script. Falls back to fallback if the key is not present.
The parameter key registered with
DefineParameter().Value to return when the key is absent.
Global Objects
screen — Vector2
A Vector2 containing the storyboard canvas resolution. Use it to position elements relative to the actual rendered size rather than hard-coding pixel values.
metadata — map information
Read-only object exposing the current map’s metadata.
The non-romanised title of the map.
The non-romanised artist name.
Username of the mapper.
Difficulty name as shown in the game.
Relative file path to the map’s background image.
Relative file path to the map’s cover image.
settings — player preferences
The player’s current scroll speed setting.
true if the player has enabled upscroll (notes travel upward).Full Worked Example
The following script creates a pulsing animated sprite that fades in at the start of the map, stays visible for 20 seconds, and fades out at the end. It also reads a user parameter to optionally flip the image vertically using upscroll preference.Map Event Types
Themap:EventsInRange() function accepts an EventType string to filter which events are returned. The full list of supported event types is:
"BeatPulse", "ColorFade", "Flash", "LaneSwitch", "LayerFade", "Pulse", "Shader", "Shake", "HitObjectEase", "ScrollMultiplier", "TimeOffset", "PlayfieldMove", "PlayfieldRotate", "PlayfieldScale", "Loop", "CameraMove", "CameraRotate", "CameraScale"
Each returned event object has at least time and group fields, plus type-specific fields documented in the events.lua library file included with your fluXis installation.