Stage Scripting

Advanced stages can be given access to custom scripts and articles by setting the scripting parameter in its config.ini to “1”.

Stages with scripting enabled get two new tabs in addition to terrain and player spawns: Markers and Article spawners.

Markers

Markers are simply a set of immovable coordinates. They can be used in a variety of ways, such as creating a path for a moving platform to follow or arbitrary boundaries for things like goalposts or spawn areas.

To find a specific marker’s coordinates in a match, use the functions get_marker_x()  Reference→ and get_marker_y()  Reference→.

Selecting or placing one opens a small menu that lets you change the marker’s color and symbol for better organization.

Article Spawners

For more details on how stage articles themselves work, check the Articles and Stage Articles pages.

At the start of a match, article spawners will create an article that uses the script set corresponding to the spawner’s number, shown on the upper-right of its icon in the top bar. Selecting or placing one opens a menu with the following properties:

Obj Type – Whether the article is normal, a platform or a solid block.

Layout – Whether the article will spawn in both stage layouts, or is exclusive to either Aether or Basic.

Depth – The depth of the article, which determines whether it shows in front of (negative value) or behind (positive value) other layers. A depth of 0 is the ground layer.

Parallax X – The article’s horizontal parallax (only applies to normal articles)

Parallax Y – The article’s vertical parallax (only applies to normal articles)

ARG0 – ARG7 – These values will be transferred to the article’s spawn_variables array when created.

Folders

Scripted stages will detect the following additional folders: /scripts/, /scripts/attacks/, /sounds/sfx/, and /sprites/articles/.

The scripts and attacks folder behave similarly to character scripts. To see what scripts stages normally use and when they use them, check the Stage Scripts page.

The sfx folder loads sounds to be used with the sound_get function, much like the sounds folder in players. Likewise, the articles folder loads sprites for use with sprite_get.

Rule Overrides

Custom stages can also override the normal rules, accessible via the stage’s config.ini file, under the section labelled [scripting_overrides]. A value of -1 means the rule will not be overridden.

Setting the stocks override to 0 will disable stock limits entirely, and setting the time override to 0 will disable the timer. Setting teams to 1 will auto-sort every other player into opposite teams if teams were not enabled in the lobby beforehand.