アニメーション(AIR)

From M.U.G.E.N Wiki

< AIR
Jump to: navigation, search


AIRの書式と規格

M.U.G.E.N version 1.0 向けの文書

まずはじめに

AIRファイルは、アニメーションの動作や当たり判定の設定を記述するファイルです。

M.U.G.E.N上で描画されるキャラクターやステージ、ライフバーなどのアニメーションは、このAIRファイルによって設定されています。

アニメーション(M.U.G.E.N上ではActionと呼ばれる)の設定は、表示させるスプライトをそれぞれ1セットにして記述します。

それぞれの動作に必要な分のActionを好きなだけ設定する事が出来ます。

書式

以下に、AIRファイルの一般的な書式の例を掲載しました。

その後に書式について説明してあります。

; Standing Animation
[Begin Action 000]
Clsn2Default: 2
 Clsn2[0] = -10,  0, 10,-79
 Clsn2[1] =  -4,-92,  6,-79
0,1, 0,0, 7
0,2, 0,0, 7
0,3, 0,0, 7
0,4, 0,0, 50
0,5, 0,0, 7
0,6, 0,0, 7
0,7, 0,0, 7
0,8, 0,0, 60

;(セミコロン)は、コメントを記述するのに使用します。

行の最中にセミコロンが置かれた場合、それ以降の記述はM.U.G.E.N上では無視されます。

[Begin Action N] アクションを定義します。Nはアクション番号と呼ばれるものです。 それぞれのアクションと区別が出来るように、アクション番号はそれぞれ異なったものにしてください。 アクション番号はほぼ自由に設定できますが、M.U.G.E.Nのcommonステートで使用しなくてはならない予約済みのアクション番号があるので、それと被らないように注意してください。 予約されたアクション番号については、下の方に掲載してありますのでAIRファイルを作成する前に必ず目を通して置いてください。


Clsn2Default: 2

これは当たり判定の設定項目です。 それぞれのスプライトの上に記述する事により、そのスプライトに当たり判定を設定できます。

Clsn2は自分が攻撃を"受ける"判定の設定項目で、

Clsn1は自分の攻撃が"当たる"判定の設定項目です。

これらをテキストのまま編集するのは難しいので、M.U.G.E.Nに付属しているtoolフォルダ内の"AirEdit"を使用してください。


0,3,0,0,7 これら五つの数値はアニメーション要素、もしくは単に要素と呼ばれるものです。 一つ目の数値( 0 )はスプライトのグループ番号です。 二つ目の数値( 3 )はスプライトのイメージ番号です。 スプライトのグループ・イメージ番号は、SFFを製作する時に設定したものです。

三つ目と四つ目の数値は、スプライトのX・Y座標軸設定です。 スプライトの表示を5ピクセル前方にずらしたい場合は、三つ目の数値を5にします。 また、15ピクセル上方にずらしたければ、四つ目の数値を-15、に設定します。

これらはスプライトの表示座標を変更する設定ですが、なるべくなら0,0のまま数値を変更しないことを推奨します。

五つ目の数値は、アニメーション全体を通してのそのスプライトが表示される時間の設定です。単位はフレーム(1/60)です。 全てのスプライトの再生が終了すると、また一番最初のスプライトに戻ります。 もし、スプライトの再生を停止させたい場合は、"-1"と記述してください。

上の例の場合では以下のフレーム数だけ再生が行われます。

7 + 7 + 7 + 50 + 7 + 7 + 7 + 60 = 152 フレーム


また、ある一定のアニメーション要素の範囲内をループ再生させたい場合は、以下のように設定します。

; Standing Animation
[Begin Action 000]
Clsn2Default: 2
 Clsn2[0] = -10,  0, 10,-79
 Clsn2[1] =  -4,-92,  6,-79
0,1, 0,0, 7
0,2, 0,0, 7
Loopstart
0,3, 0,0, 7
0,4, 0,0, 50
0,5, 0,0, 7
0,6, 0,0, 7
0,7, 0,0, 7
0,8, 0,0, 60

見ての通り、"Loopstart"と記述する事により、ループ再生を行わせる事が可能です。 今回の例の場合、七つ目のアニメーション要素( 0,8, 0,0, 60 )の再生が終了した後、三つ目( 0,3, 0,0, 7 )の再生が開始されます。


アニメーションの動きを1要素ずつ確認したい時は、フレームアドバンス機能を使用します。 まず、"Pause"キーを押すとポーズをかけられます。このポーズが掛かっている時に"Scroll Lock"キーを押し続けてください。 そうすれば、1フレーム毎に再生されるので1要素ずつの確認が容易に行なえます。

付加効果

例としてこのアニメーション要素を使用します。

15,1, 0,0, 5

まず、水平・垂直方向にスプライトを反転させる方法について記述します。 垂直方向に反転させる場合は"V"、水平方向に反転させる場合は"H"を使用します。 以下に、実際の使用例を掲載します。

15,1, 0,0, 5, H  ;<-- 水平方向に反転
15,2, 0,0, 5, V  ;<-- 垂直方向に反転
15,3, 0,0, 5, VH ;<-- 180度回転

スプライトの反転の多くは、投げられた時の動作に用いられています。 投げられている時の動作に合うように反転を用いることにより、綺麗に投げられるアニメーションにする事ができます。

For certain things such as hit sparks, you might like to use color addition to draw the sprite, making it look "transparent". You won't need to use this to make a character, so you don't have to worry about this if you choose not to. The parameters for color addition and subtraction are "A" and "S" respectively, and should go as the 7th on the line. For example:

15,4, 0,0, 5, ,A   ;<-- Color addition (flip parameter omitted)
15,4, 0,0, 5, H, S ;<-- Flips horizontally and does color subtraction

If you wish to specify alpha values for color addition, use the parameter format "AS???D???", where ??? represents the values of the source and destination alpha respectively. Values range from 0 (low) to 256 (high). For example, "AS64D192" stands for "Add Source_64 to Dest_192". Also, "AS256D256" is equivalent to just "A". A shorthand for "AS256D128" is "A1".

15,4, 0,0, 5, ,A1  ;<-- Color addition to 50% darkened dest
15,4, 0,0, 5, ,AS128D128 ;<-- Mix 50% source with 50% dest

common予約済みAction番号とその詳細

M.U.G.E.Nは共用ステートを標準で搭載しています(common1.cns)。 これにより、全てのキャラクターにやられ動作等の共通動作が制御されています。 共用ステートで使用されている必須アニメは必ず登録しておかないと不具合の元になります。 以下に必須アニメの一覧表を掲載しました。 それぞれの効果を確認しながらAIRファイルの製作に臨んで下さい。

今回は、M.U.G.E.Nの標準サンプルキャラクター、kfmを例に挙げています。 chars/kfm/kfm.airを参考にしてください。

尚、Action番号『5000~5999』までの範囲は表の効果に従って設定してください。 範囲内で表に載っていないものは、なるべく使用を避けてください。 これらの番号は、キャラの特殊やられ等に用いられる可能性があるからです。

※optが付いているものは必ず登録する必要はありません。

Number Description Comments
0 立ち動作  
5 立っている時の振り向き動作 Must have finite looptime
6 しゃがんでいる時の振り向き Must have finite looptime
10 立ち状態からしゃがみ状態へ Finite looptime
11 しゃがみ  
12 しゃがみ状態から立ち状態へ Finite looptime
20 前に歩く動作  
21 後ろに歩く動作  
40 ジャンプ開始(地面に接地) Shown just before player leaves ground
41 垂直ジャンプ上昇 Shown when player is going up
42 前方ジャンプ上昇 Shown when player is going up-towards
43 後方ジャンプ上昇 Shown when player is going up-back
44 opt 垂直ジャンプ下降 Activated when Y-velocity > -2
45 opt 前方ジャンプ下降 Same as above
46 opt 後方ジャンプ下降 Same as above
47 着地動作 Shown as player lands on ground
100 前方ダッシュ/フロントステップ  
105 バックステップ  
120 立ちガード開始 Finite looptime
121 しゃがみガード開始 Finite looptime
122 空中ガード開始 Finite looptime
130 立ちガード  
131 しゃがみガード  
132 空中ガード  
140 立ちガード終了 Finite looptime
141 しゃがみガード終了 Finite looptime
142 空中ガード終了 Finite looptime
150 立ちガード喰らい Finite looptime
151 しゃがみガード喰らい Finite looptime
152 空中ガード喰らい No loop
170 opt 敗北 (See Note 1)
175 opt 時間切れ (See Note 1)
180 opt 勝利 No loop (181-189 for multiple) (See Note 1)
190 opt イントロ No loop (See Note 1)
195 opt 挑発 Finite looptime (See Note 1)
5000 Stand/Air Hit high (light) Looptime around 10-20
5001 Stand/Air Hit high (medium) " (See Note 2)
5002 Stand/Air Hit high (hard) "
5005 Stand Recover high (light) No loop (See Note 3)
5006 Stand Recover high (medium) "
5007 Stand Recover high (hard) "
5010 Stand/Air Hit low (light) Looptime around 10-20
5011 Stand/Air Hit low (medium) "
5012 Stand/Air Hit low (hard) "
5015 Stand Recover low (light) No loop
5016 Stand Recover low (medium) "
5017 Stand Recover low (hard) "
5020 Crouch Hit (light) Looptime around 10-20
5021 Crouch Hit (medium) "
5022 Crouch Hit (hard) "
5025 Crouch Recover (light) No loop
5026 Crouch Recover (medium) "
5027 Crouch Recover (hard) "
5030 Stand/Air Hit back Looptime around 10-20
5035 opt Stand/Air Hit transition Looptime around 5-15 (See Note 3)
5040 Air Recover No loop
5050 Air Fall No loop
5060 opt Air Fall (coming down) No loop
5070 Tripped  
5080 LieDown Hit (stay down) (See Note 4)
5090 LieDown Hit (hit up into air)  
5100 Hitting ground from fall Looptime around 3
5160 Bounce into air  
5170 Hit ground from bounce Looptime around 3 or 4
5110 LieDown  
5120 Get up from LieDown  
5140 opt LieDead (first rounds)  
5150 opt LieDead (final round)  
5200 Fall-recovery near ground  
5210 Fall-recovery in mid-air  
5300 Dizzy  
5500 opt "Continue?" screen If omitted, plays dizzy anim
5510 opt "Yes" to "Continue" If omitted, plays first win anim (not yet implemented)
5520 opt "No" to "Continue" (not yet implemented)

Optional Hit Up animations (see Note 5):

Number Description Comments
5051 opt Air fall -- hit up  
5061 opt Coming down from hit up  
5081 opt LieDown Hit (stay down)  
5101 opt Bounce from ground into air Looptime around 3
5161 opt Bounce into air  
5171 opt Hit ground from bounce Looptime around 3 or 4
5111 opt LieDown  
5121 opt Get up from LieDown  
5151 opt LieDead (first rounds)  
5156 opt LieDead (final round)  

Optional Hit Up-Diagonal animations (see Note 6):

Number Description Comments
5052 opt Air fall -- hit up  
5062 opt Coming down from hit up  
5082 opt LieDown Hit (stay down)  
5102 opt Bounce from ground into air Looptime around 3
5162 opt Bounce into air  
5172 opt Hit ground from bounce Looptime around 3 or 4
5112 opt LieDown  
5122 opt Get up from LieDown  
5152 opt LieDead (first rounds)  
5157 opt LieDead (final round)  

Note 1: これ以外の番号も、それぞれの動作に使用できます。 ですが、必ず記載されている番号は登録しておいてください。

Note 2: やられ動作の"中・強"攻撃のAction番号の登録が省略された時は、やられ動作の弱攻撃のActionを流用します。

Note 3: "No loop" means last frame has a time of -1.
For recover animation, the first frame of each recovery should be the last frame of the corresponding hit. Eg. If action 5000 has frame 5000,0 and 5000,1, then action 5005 should start with frame 5000,1. This is because the animation will be locked in the first frame of the recovery after the hit animation is over, but before the player has recovered from the hit. If you have a Stand/Air Hit transition animation, then the first frame of Air Recover and Air Fall should be the last frame of the transition animation.
Note 4: The Stand/Air Hit transition animation is played back after each
hit animation in (or into) the air, but before the Air Recover and Air Fall animations.
Note 5: You can loop the LieDown Hit if you want the player to look like he
is "twitching" while being hit
Note 6: This set of animations is optional. It is an alternate set of
falling animations, which is used if hit by a HitDef with "Up" as the animtype.
Note 7: This set of animations is optional. It is an alternate set of
falling animations, which is used if hit by a HitDef with "DiagUp" as the animtype.

Action番号の登録の薦め

AIRファイルを製作する時に、統一性をもたせるためにそれぞれの動作で推奨するAction番号を以下の表に記載しました。

必ず表に従い、その通りに製作する必要はありませんが、余程の理由がない限りはその通りに製作する事を推奨します。

Number Description
0-199 予約済み
200-299 立ち状態の時の通常攻撃
300-399 立ち状態の時の特殊攻撃、ダッシュ時の攻撃
400-499 しゃがみ状態の時の通常攻撃
500-599 しゃがみ状態の時の特殊攻撃
600-699 ジャンプ時の通常攻撃
700-799 ジャンプ時の特殊攻撃
800-999 この範囲内は自由に登録可能です
1000-2999 必殺技
3000-4999 超必殺技
5000-5999 予約済み


Personal tools