Animations (.air)
The .air format - actions and elements, timing and -1 frames, Clsn1 and Clsn2 collision boxes, Loopstart, flip and blend flags, scale and angle, interpolation, and what rugen supports.
An .air file is a list of actions (animations). Each action is a list
of elements (frames): which sprite to show, where, for how long, and
which collision boxes it has.
; Light punch
[Begin Action 200]
Clsn2Default: 2
Clsn2[0] = -10, 0, 10, -78
Clsn2[1] = -6, -78, 8, -92
200,0, 0,0, 3
200,1, 0,0, 3
Clsn1: 1
Clsn1[0] = 12, -72, 46, -60
200,2, 0,0, 4
200,1, 0,0, 3
200,0, 0,0, 3
Actions
[Begin Action n] starts action n (0 to 2147483647). Characters use
numbers that match their states by convention: 0 stand, 20 walk, 200 a
punch. A few numbers have fixed meanings:
| Action | Used for |
|---|---|
| 0 | Standing |
| 5000 .. 5300 | Get-hit animations used by common1 |
| 9000, 9001 | Not animations: sprite groups 9000,0 / 9000,1 are portraits |
If an action number appears twice, rugen uses the first. An empty action copies the next non-empty one.
Elements
group, image, x, y, time [, flip [, blend [, xscale, yscale [, angle]]]]
| Field | Meaning |
|---|---|
group, image | Sprite in the .sff. -1, -1 shows nothing. |
x, y | Offset added to the sprite’s own axis. |
time | Ticks to show it (60 per second). -1 means forever. |
flip | H mirror, V upside down, HV both. |
blend | Transparency, see below. |
xscale, yscale | Per-frame scale (MUGEN 1.1). |
angle | Per-frame rotation in degrees (MUGEN 1.1). |
Timing. An action plays its elements in order and loops back to the
start (or to Loopstart). AnimTime counts down to 0 on the last tick of
the action, which is how states know a move is over. If the last element
has time -1, the action holds on it and AnimTime never reaches 0 again.
Loopstart
Put Loopstart on its own line before an element: after the last element
the action continues from there instead of from the first element.
[Begin Action 1010]
1010,0, 0,0, 3 ; plays once
1010,1, 0,0, 3
Loopstart
1010,2, 0,0, 3 ; these two loop
1010,3, 0,0, 3
Collision boxes
Boxes are rectangles x1, y1, x2, y2 relative to the axis (rugen accepts
corners in any order).
| Line | Meaning |
|---|---|
Clsn2Default: n | n hurt boxes for this and every following element, until replaced |
Clsn1Default: n | n default attack boxes |
Clsn2: n | Hurt boxes for the next element only |
Clsn1: n | Attack boxes for the next element only |
Clsn1[i] = ... | The i-th box (0-based) of the block above |
- Clsn1 (red in the F2 overlay) is where the character hits. It only does something while a HitDef or ReversalDef is active.
- Clsn2 (blue) is where the character can be hit, and is also used for ReversalDef contact. No Clsn2 means the frame cannot be hit.
- Push between players uses the
[Size]widths, not boxes.
Blending
| Value | Effect |
|---|---|
| (empty) | Normal drawing |
A | Additive (full) |
A1 | Additive at half strength |
S | Subtractive |
AS<src>D<dst> | Additive with source and destination weights 0 to 256, e.g. AS128D128 for 50 % see-through |
[Begin Action 1006]
1006,0, 0,0, 2, , A ; additive flash
1006,1, 0,0, 2, H, AS160D96
The Trans controller and the trans parameter of Explod and
AfterImage can override an element’s blend.
Interpolation (MUGEN 1.1)
MUGEN 1.1 can tween between elements with Interpolate Offset,
Interpolate Scale, Interpolate Angle and Interpolate Blend lines.
rugen notes
| Feature | Status |
|---|---|
Actions, elements, timing, -1 frames, Loopstart | Supported |
Clsn1 / Clsn2 / default boxes | Supported |
H / V / HV flips | Supported |
A, A1, S, AS..D.. blending | Supported |
Per-frame xscale, yscale | Supported |
Per-frame angle | Parsed, not drawn yet |
Interpolate ... | Parsed, not applied yet |
| Duplicate action numbers | First one wins |
Original reference: elecbyte.com/mugendocs-11b1.
Something wrong on this page? Edit it on GitHub.