Aero mod template docs
Setting Up A Mod Chart.
To set up Aero place the /lua folder in your chart folder, then set the chart to change FG on the 0th beat to /lua/AERO.lua. You can do this in SMEditor using the edit timing button, like so:

Once you did that you can begin making your mod file, write your code within /lua/main.lua
Useful Global Variables
These are variables you can use throughout your mod chart.
-
Actors- A dictionary containing the actors defined usingActors.xml -
Notefield- The Player1 notefield actor -
PlayerOptions- The playeroptions actor. If you want to change player options useeaseorSetPlayerOptionelse it will not changepo_known_states -
po_known_states- A dictionary holding all the player options current values. This table is vital for easing as its used as the initial state of the player option. You can alter this table like so:po_known_states["Mod"] = Value -
SCREEN_WIDTH- Self explanatory -
SCREEN_HEIGHT- Self explanatory -
CurrentSongTime- The current song time as a floating point in seconds. -
CurrentSongBeat- The current song beat as a floating point.
Global Functions
Functions that provide all the functionality required in making a mod chart.
-
beatevent(x, func)- Calls func on beat x with x as a parameter. Use this to run functions at specific beats. -
be(x, func)- Alias to beatevent. -
timeevent(t, func)- Same as beatevent but rather than run on a beat it will call the function at a specific time. Intended to be used to call functions during 'stops' in charts, as the beat value wont continue until the stop is done. -
te(t, func)- Alias to timeevent. -
GetCurrentBeat()- Returns the current beat as a float. -
GetSongBeatsPerSecond()- Returns beats per second. -
GetSongBeatsPerMinute()- Returns beats per minute. -
BeatsToSeconds(x)- Coverts the amount of beats to seconds. Useful for using the standard stepmania easing functions on actors. -
Lerp(a, b, t)- Lerp a to value b with t as percent (between 0 and 1) -
ease(x, t, easingstyle, value, mod)- Probably the most essential function in this list. Ease will interpolate the player mod 'mod' on beat x to value using easing style as the style. -
CreateFrameEvent(func)- Aero will run f every frame (with no parameters) until the function returns 1 or true. -
CreatePlayerOption(Name, func)- Defines a new player option as Name, which you can then use ease to alter. Note that the default value of this player option will be 0, if you want to change this look atpo_known_states -
SetPlayerOption(Option, Value)- Sets the player option to value. -
SetDefaultPlayerOptions()- Sets every player option supported by aero to 0, except for MMod and CMod which are set to 550, note the final result will be CMod.
Actor Functions
Functions that can be called on actors that are useful to know when making mod charts. There are many more of these and this list may be expanded upon in the future. If you want to see more Actor functions check out this very useful page by quietly-turning
-
Actor:x(pos)- Changes the actor's x position. -
Actor:y(pos)- Changes the actor's y position. -
Actor:z(pos)- Changes the actor's z position. -
Actor:Width(Size)- Changes the actor's width. -
Actor:Height(Size)- Changes the actor's height. -
Actor:rotationx(rot)- Changes the x rotation. -
Actor:rotationy(rot)- Changes the y rotation. -
Actor:rotationz(rot)- Changes the z rotation.
Defining New Actors.
Aero uses a file called Actors.xml to create new actors in the mod chart, since this is an XML file you can initiate actors within each other, creating an easy way to keep track of what is layered and where. Note that actors defined after each other will be over the previous layer. All actors will be placed within the dictionary Actors which you can then refrence using their name, like so: Actors.MyCoolSprite or Actors["MyCoolSprite"]
You can also set properties of an actor within this file, here is an example:
<ActorFrame Name="MainActorFrame">
<Sprite Name="MyCoolSprite" Texture="/lua/sprites/bg.png"></Sprite>
</ActorFrame>
This example will create a Sprite with the texture /lua/sprites/bg.png within an ActorFrame.
You can also call Fullscreen() and Center() using the Actors.xml like so:
<Sprite Name="MyCoolSprite" Texture="/lua/sprites/bg.png" Center="true" FullScreen="true"></Sprite>
Easing Styles.
Here is a list of every easing style you can use with ease
- bounce
- trie
- pop
- tap
- pulse
- spike
- inverse
- instant
- linear
- inQuad
- outQuad
- inOutQuad
- inCubic
- outCubic
- inOutCubic
- inQuart
- outQuart
- inOutQuart
- inQuint
- outQuint
- inOutQuint
- inExpo
- outExpo
- inOutExpo
- inCirc
- outCirc
- inOutCirc
- inElastic
- outElastic
- inOutElastic
- inBack
- outBack
- inOutBack
- inBounce
- outBounce
- inOutBounce
- inBounce
- outBounce
- inOutBounce
- inSine
- outSine
- inOutSine
The power of defining your own player option
As you may have seen in the function list, there is a function called CreatePlayerOption this is an extremely useful function because it lets you create a player option to ease the properties of something that is NOT a player option. For example, the notefield's position or rotation, so how do we do that? Well quite simple.
CreatePlayerOption("NotefieldX", function(value)
Notefield:x(value)
end)
Easy right? We make a new player option called "NotefieldX" and we can now use ease on it to change the notefield's x position, except smoothly but wait, there's an issue.
The notefield starts in the center of the screen but for some reason ease will make it start at the very left of the screen? The reason for that is new player options will always start at 0, but there's an easy fix.
CreatePlayerOption("NotefieldX", function(value)
Notefield:x(value)
end)
po_known_states.NotefieldX = Notefield:GetX()
With that set up, we can now smoothly ease the notefield's x position!
ease(0, 1, outQuad, SCREEN_WIDTH/3, "NotefieldX")
Mod Example And Explanation.
ease(0, 2, outQuad, 1, "Dark")
ease(0, 2, outQuad, 4, "Drunk")
ease(0, 2, outQuad, 7, "Tipsy")
ease(0, 2, outQuad, math.pi * 2, "ConfusionOffset")
So, what does this code do? Well we've got 4 ease functions on beat 0 each taking 2 beats.
-
Dark sets the receptors opacity to 0 making them invisible.
-
Drunk begins moving the receptors left and right.
-
Tipsy makes the receptors sway up and down in a wave.
-
ConfusionOffset rotates the receptors 360 degrees.
Overall we get this neat note explosion effect:

But this code seems bulky, I mean do we really need to say what beat we want the ease to be on? No we do not, well we can make it shorter.
This is where beatevent comes in use.
function NoteExplosion(b)
ease(b, 2, outQuad, 1, "Dark")
ease(b, 2, outQuad, 4, "Drunk")
ease(b, 2, outQuad, 7, "Tipsy")
ease(b, 2, outQuad, math.pi * 2, "ConfusionOffset")
end
beatevent(0, NoteExplosion)
beatevent will call a function on whatever beat you specify with the beat it should be called on as a parameter, this lets you use the same ease functions on different beats. In this example it lets us reuse the note explosion effect seen above.