RUGENDOCS
Creating content

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:

ActionUsed for
0Standing
5000 .. 5300Get-hit animations used by common1
9000, 9001Not 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]]]]
FieldMeaning
group, imageSprite in the .sff. -1, -1 shows nothing.
x, yOffset added to the sprite’s own axis.
timeTicks to show it (60 per second). -1 means forever.
flipH mirror, V upside down, HV both.
blendTransparency, see below.
xscale, yscalePer-frame scale (MUGEN 1.1).
anglePer-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).

LineMeaning
Clsn2Default: nn hurt boxes for this and every following element, until replaced
Clsn1Default: nn default attack boxes
Clsn2: nHurt boxes for the next element only
Clsn1: nAttack 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

ValueEffect
(empty)Normal drawing
AAdditive (full)
A1Additive at half strength
SSubtractive
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

FeatureStatus
Actions, elements, timing, -1 frames, LoopstartSupported
Clsn1 / Clsn2 / default boxesSupported
H / V / HV flipsSupported
A, A1, S, AS..D.. blendingSupported
Per-frame xscale, yscaleSupported
Per-frame angleParsed, not drawn yet
Interpolate ...Parsed, not applied yet
Duplicate action numbersFirst one wins

Original reference: elecbyte.com/mugendocs-11b1.

Something wrong on this page? Edit it on GitHub.

SEARCH !!

    ↑↓ to move, Enter to open