home *** CD-ROM | disk | FTP | other *** search
/ Igromania 2000 February / Igromania_02.iso / FILES / mugen.exe / docs / air.txt next >
Text File  |  1999-12-19  |  11KB  |  290 lines

  1. The AIR format and standard
  2. ===========================
  3. M.U.G.E.N, Elecbyte (c)1999
  4.  
  5. Beta-release documentation (incomplete)
  6. Updated 11 Aug 99
  7.  
  8. I.   The format
  9. II.  Reserved Action Numbers
  10. III. Recommended Action Numbers
  11.  
  12. I. The format
  13. -------------
  14.  
  15. Here's a typical entry from an .air file:
  16.  
  17. ; Standing Animation
  18. [Begin Action 000]
  19. Clsn2Default: 2
  20.  Clsn2[0] = -10,  0, 10,-79
  21.  Clsn2[1] =  -4,-92,  6,-79
  22. 0,3, 0,0, 7
  23. 0,2, 0,0, 7
  24. 0,1, 0,0, 7
  25. 0,0, 0,0, 50
  26. 0,1, 0,0, 7
  27. 0,2, 0,0, 7
  28. 0,3, 0,0, 7
  29. 0,4, 0,0, 60
  30.  
  31.  
  32. Semicolon (;) is used for comments.  They can be used anywhere and
  33. everything after the semicolon on the same line is ignored.
  34.  
  35. [Begin Action nnn]
  36. This defines an action.  You can have many actions, but keep in 
  37. mind that there are reserved actions numbers.  These numbers and 
  38. their associated actions are listed below.
  39.  
  40. Clsn2Default: 2
  41. This says that there are two collision boxes being defined and they
  42. will be defined for all the entries below the Clsn definition.  In
  43. this case for every sprite in this action.  If you don't want to 
  44. have a default collision box, then change Clsn2Default to Clsn2.
  45. You must put the Clsn definition before a sprite entry.  Each
  46. sprite entry can have its own collision boxes.  Clsn2 refers to a
  47. plain collision box and Clsn1 refers to an "attacking" box.  You 
  48. use attacking boxes when making attacking actions such as punching
  49. and kicking or special moves.
  50.  
  51. Sprite entries-
  52. 0,3, 0,0, 7
  53. 1st number is the sprite's group number.  
  54. 2nd number is the sprite's image number.
  55. You assign these numbers to your sprites when you make an .sff file.
  56.  
  57. So group #0 and image #3 were defined with sprmaker with an entry 
  58. such as:
  59. work\mypic.pcx
  60. 0   (group number)
  61. 3   (image number)
  62. 40  X axis
  63. 40  Y axis
  64.  
  65. 3rd and 4th numbers are the X and Y offsets from this sprite's axis.
  66. These are usually 0,0.  If you want the sprite to appear 5 pixels
  67. forwards, put "5" for the 3rd number.  To make the sprite 15 pixels
  68. up, put "-15" for the 4th number, and so on.
  69.  
  70. 5th number is the length of time to display the sprite before moving
  71. onto the next, measured in game-ticks.  There are 60 game-ticks in
  72. one second at normal game speed.
  73. For the 5th number, you can specify "-1" if you want that sprite
  74. to be displayed indefinitely, or until you switch to a different
  75. action.  If you choose to do this, do it only on the last sprite
  76. of the action.
  77.  
  78. We will refer to each of these sprites as an "element".
  79. The "looptime" of an action is the sum of all the times of each
  80. element.  Basically, it is the total length of the action in
  81. game-ticks.  If the last sprite has a time of "-1", the looptime
  82. will be considered infinite.  We call that "no loop".  Actions
  83. with a finite loop time will go back to the first element
  84. after it has finished displaying the last element, and keep
  85. looping until the you switch to another action.
  86.  
  87. ; Standing Animation
  88. [Begin Action 000]
  89. Clsn2Default: 2
  90.  Clsn2[0] = -10,  0, 10,-79
  91.  Clsn2[1] =  -4,-92,  6,-79
  92. 0,3, 0,0, 7
  93. 0,2, 0,0, 7
  94. Loopstart      ;<---
  95. 0,1, 0,0, 7
  96. 0,0, 0,0, 50
  97. 0,1, 0,0, 7
  98. 0,2, 0,0, 7
  99. 0,3, 0,0, 7
  100. 0,4, 0,0, 60
  101.  
  102. Adding a line with the word "Loopstart" will make the animation
  103. begin looping from the element on the following line.
  104.  
  105. When testing out your animations, you may find the pause and
  106. frame-advance functions useful.  To pause, hit the "Pause" button.
  107. To advance the game by one game-tick, press Scroll Lock.  Frame-
  108. advance only works when the game is paused.
  109.  
  110. Optional paramters
  111. ------------------
  112. Here's an entry:
  113. 15,1, 0,0, 5
  114.  
  115. If you want to flip the sprite horizontally and/or vertically, you
  116. will need to use the "flip" parameters: V for vertical flip, and
  117. H for horizontal flip.  These parameters will be 6th on the line.
  118. For example:
  119.  
  120. 15,1, 0,0, 5, H   ;<-- This flips it horizonally
  121. 15,2, 0,0, 5, V   ;<-- This flips it vertically
  122. 15,3, 0,0, 5, VH  ;<-- This flips it both ways, ie. rotates 180 deg
  123.  
  124. Flipping the sprite around is especially useful for making throws.
  125. The opponent who is being thrown will temporarily get the player's
  126. animation data, and enter the "being thrown" animation action.
  127. You'll might have to flip the sprites around to make the "thrown"
  128. action look correct.
  129.  
  130. For certain things such as hit sparks, you might like to use
  131. color addition to draw the sprite, making it look "transparent".
  132. You won't need to use this to make a character, so you don't have
  133. to worry about this if you choose not to.  The parameters for
  134. color addition and subtraction are "A" and "S" respectively, and
  135. should go as the 7th on the line.
  136. For example:
  137.  
  138. 15,4, 0,0, 5, ,A   ;<-- Color addition (flip parameter omitted)
  139. 15,4, 0,0, 5, H, S ;<-- Flips horizontally and does color subtraction
  140.  
  141.  
  142.  
  143. ====================================================================
  144. II. Reserved Action Numbers
  145. ---------------------------
  146.  
  147. You might want to make these actions first before working on your
  148. own.  
  149.  
  150. The states that use these are mostly in common.cns. Others are
  151. coded-in.
  152.  
  153.  
  154. An "opt" besides the number means the animation is optional
  155.  
  156.  
  157. Number    Description                  Comments
  158. -------   ------------                 --------
  159. 0         Standing
  160. 5   opt   Turning                      Must have finite looptime
  161. 10        Stand to crouch              Finite looptime
  162. 11        Crouching
  163. 12        Crouch to stand              Finite looptime
  164. 20        Walking forwards
  165. 21        Walking backwards
  166. 40        Jump start (on ground)       Shown just before player leaves ground
  167. 41        Jump neutral (upwards)       Shown when player is going up
  168. 42        Jump forwards (upwards)      Shown when player is going up-towards
  169. 43        Jump back (upwards)          Shown when player is going up-back
  170. 44  opt   Jump neutral (downwards)     Activated when Y-velocity > -2
  171. 45  opt   Jump fwd (downwards)         Same as above
  172. 46  opt   Jump back (downwards)        Same as above
  173. 47        Jump landing                 Shown as player lands on ground
  174. 100       Run fwd/hop forward
  175. 105       Hop back
  176. 110       Dodge up                     
  177. 115       Dodge down
  178. 120       Start guarding (stand)       Finite looptime
  179. 121       Start guarding (crouch)      Finite looptime
  180. 122       Start guarding (air)         Finite looptime
  181. 130       Guard (stand)
  182. 131       Guard (crouch)
  183. 132       Guard (air)
  184. 140       Stop guarding (stand)        Finite looptime
  185. 141       Stop guarding (crouch)       Finite looptime
  186. 142       Stop guarding (air)          Finite looptime
  187. 150       Guarding a hit (stand)       Finite looptime
  188. 151       Guarding a hit (crouch)      Finite looptime
  189. 152       Guarding a hit (air)         No loop
  190. 170 opt   Lose                         
  191. 175 opt   Time Over
  192. 180 opt   Win                          No loop (181-189 for multiple)
  193. 190 opt   Intro                        No loop
  194. 195 opt   Taunt                        Finite looptime (See Note 1)
  195.  
  196. 5000      Stand/Air Hit high (light)   Looptime around 10-20
  197. 5001 opt  Stand/Air Hit high (medium)    "     (See Note 2)
  198. 5002 opt  Stand/Air Hit high (hard)      "
  199. 5005      Stand Recover high (light)   No loop (See Note 3)
  200. 5006 opt  Stand Recover high (medium)    "
  201. 5007 opt  Stand Recover high (hard)      "
  202. 5010      Stand/Air Hit low (light)    Looptime around 10-20
  203. 5011 opt  Stand/Air Hit low (medium)     "
  204. 5012 opt  Stand/Air Hit low (hard)       "
  205. 5015      Stand Recover low (light)    No loop
  206. 5016 opt  Stand Recover low (medium)     "
  207. 5017 opt  Stand Recover low (hard)       "
  208. 5020      Crouch Hit (light)           Looptime around 10-20
  209. 5021 opt  Crouch Hit (medium)            "
  210. 5022 opt  Crouch Hit (hard)              "
  211. 5025      Crouch Recover (light)       No loop
  212. 5026 opt  Crouch Recover (medium)        "
  213. 5027 opt  Crouch Recover (hard)          "
  214. 5030      Stand/Air Hit back           Looptime around 10-20
  215. 5035      Stand/Air Hit transition     Looptime around 5-15 (See Note 3)
  216. 5040      Air Recover                  No loop
  217. 5050      Air Fall                     No loop
  218. 5051 opt  Air Fall (coming down)       No loop
  219. 5060 opt  Air going straight up        --- new ---
  220. 5061 opt  Coming down from hit up      --- new ---
  221. 5070      Tripped
  222. 5080      LieDown Hit (stay down)      (See Note 4)
  223. 5090      LieDown Hit (hit up into air)
  224. 5100      Bounce from ground into air
  225. 5105      Hit ground from bounce       Looptime around 3 or 4
  226. 5110      LieDown
  227. 5120      Get up from LieDown
  228. 5150 opt  LieDead (first rounds)
  229. 5155 opt  LieDead (final round)
  230. 5200      Fall-recovery near ground
  231. 5210      Fall-recovery in mid-air
  232. 5300      Dizzy
  233. 5500 opt  "Continue?" screen           If omitted, plays dizzy anim
  234. 5510 opt  "Yes" to "Continue"          If omitted, plays first win anim
  235. 5520 opt  "No" to "Continue"
  236.  
  237. Note 1: Taunts do not actually have to use only this state number.
  238.         It is more of a recommended number than a reserved one. If your
  239.         character has multiple taunts, feel free to use any other state
  240.         numbers.
  241. Note 2: If medium and heavy hits are omitted, they default to the light hits
  242. Note 3: "No loop" means last frame has a time of -1.
  243.         For recover animation, the first frame of each recovery should be the
  244.         last frame of the corresponding hit. Eg. If action 5000 has frame
  245.         5000,0 and 5000,1, then action 5005 should start with frame 5000,1.
  246.         This is because the animation will be locked in the first frame of
  247.         the recovery after the hit animation is over, but before the player
  248.         has recovered from the hit.
  249.         If you have a Stand/Air Hit transition animation, then the first
  250.         frame of Air Recover and Air Fall should be the last frame of the
  251.         transition animation.
  252. Note 3: The Stand/Air Hit transition animation is played back after each
  253.         hit animation in (or into) the air, but before the Air Recover
  254.         and Air Fall animations.
  255. Note 4: You can loop the LieDown Hit if you want the player to look like he
  256.         is "twitching" while being hit
  257.  
  258.  
  259. ====================================================================
  260. III. Recommended Action Numbers
  261. -------------------------------
  262.  
  263. You don't have to follow this exactly, but it should serve as a
  264. guideline. In general, the states in the CNS should have the same
  265. numbers as the animation they use, to reduce confusion.
  266.  
  267. You might want space out your animation and state numbers nicely.
  268. This gives room for you to add in more actions as necessary.
  269. For instance, Stand_a and Stand_b could have action numbers 200
  270. and 210 respectively.
  271.  
  272.  
  273. Number    Description
  274. -------   ------------
  275. 0-199     - reserved -
  276.           Basic attacks:
  277. 200-299   Standing attacks
  278. 300-399   More standing attacks, running attacks
  279. 400-499   Crouch attacks
  280. 500-599   More crouch attacks
  281. 600-699   Air attacks
  282. 700-799   More air attacks
  283. 800-999   Unused - use if you need more states
  284.           Special attacks:
  285. 1000-2999 All special attacks
  286.           Hyper (super) attacks:
  287. 3000-4999 All hyper attacks
  288. 5000-5999 - reserved -
  289.  
  290.