M.U.G.E.N格斗游戏引擎简介


by AKara 2011-10-23 @  http://blog.csdn.net/akara  @ akarachen(at)gmail.com @ weibo.com/akaras


   M.U.G.E.N   是经历了12年的(1999-2011)格斗游戏引擎(http://elecbyte.com),
官方称已忘记它的缩写:本是一个射击游戏,但MUGEN日文意思是:无限 (unlimited)。
稍微详细的信息推荐前往官网或wiki:
   http://en.wikipedia.org/wiki/M.U.G.E.N

  本文分 4 部分简介M.U.G.E.N(2011 v1.0)的机制:
  (1) 术语 :格斗/动作游戏的术语非常多,M.U.G.E.N中出现的只是一部分,不过足矣。
  (2) 核心 :精炼格斗系统5要素:1.anim 2.state 3.state controller 4.trigger 5.command
  (3) 其他 :control api, trigger api, .def, .sff, .ai, storyboard
  (4) 总结 :总结。


  身为一个曾经的KOF高手,同时身为一个按轻脚通关M.U.G.E.N并看到如下画面的玩家,
  激发了我简单翻译和整理一下M.U.G.E.N功能的热情。


---------------------------------------------------------------------
术语
---------------------------------------------------------------------
基础篇

* P1:己方
* P2:对手
* round:回合
* has control:受控(受键盘事件)
* not has control:不受控
* attack boxes:攻击判定盒s
* hit boxes:受击判断盒s
* power bar:能量槽
* helper:援助者
* parent:helper的召唤者(仍可为helper)
* root:helper的根玩家
* KO:KO(又称kill)


招式篇

* move:动作(广义)
* attack:攻击(狭义的move,常与move混称)
* trip sweep:下盘attack
* throw:投技
* special:特殊技(方向+按钮)
* super:超杀技(又称hyper)
* projectile:飞行道具


状态篇

* hit:受击
* stand:站立
* crouch:蹲下
* miss:未命中
* dodge:躲避
* guard:防御
* air:空中has control的状态
* fall:空中not has control的状态
* lying down:倒地not has control的状态
* ground:指地面一切has control的状态
* slide:hit导致的滑退
* recoil:从pause回复到has control
* back:击倒
* up:浮空(垂直击起)
* diaup:击飞(又称吹飞:向后击起)
* pause:硬直(hit/attack均有)
* superpause:super导致的pause


进阶篇

* charge-move:蓄气技(按键指定时间才可发动)
* chain-move:连续技(要求对方处于get-hit state)
* connect:attack成功产生hit(有时特指发生chain-move)
* contact:attack成功产生hit或attack被guarded
* block:截击(又称counter,指从attack起手打断)
* move cancel:取消(又称move interrupt,指技巧性缩短pause)
* juggle:追击(对fall或lying down的角色进行attack)
* juggle point:追击点(attack和P2均携带,此设定防止无限追击)
* superarmor:超级护甲(受击后除了扣血,不应用任何效果[物理...];
  另有partial superarmor,指不能无视throw和AOE super)
* grazing:掠步(可过projectile)


设计实现篇

* state:状态
* FSM:Finite State Machine
* transition:state间的跳转
* command:键序
* trigger:触发器(condition-type / function-type)
* trigger redirection:触发器(属主)重定向(parent / root / helper / ...)
* state controller:简称controller:
  由trigger触发指定control api实现指定功能。
  M.U.G.E.N中state controller与control api常混称;
  为免混淆,下面state controller与control api严格区分。
* time:时间,M.U.G.E.N中所有时间的单位均为tick。
* game-time:round开始时置0,每tick加1
* state-time:state重入时置0,每tick加1
* anim:动画(M.U.G.E.N中常与action混称)
* anim-time:anim开始/结束时置0,每tick加1
* anim-element:anim的element下标(anim由N个element组成)
* looptime:一个anim的所有times字段值之和;如有一值为-1即总为-1
* no loop anim:looptime为-1的anim(不会重头播放)
* clsn1:attack boxes(编辑态显红色) 
 (常不设于anim-element 1,否则瞬发伤害不可block)
* clsn2:hit boxes(编辑态显蓝色)


---------------------------------------------------------------------
核心
---------------------------------------------------------------------

  M.U.G.E.N将格斗系统精炼为 5 种核心要素:
  (1)  anim  
  (2)  state  
  (3)  state controller
  (4)  trigger
  (5)  command

  而且都支持文本化配置,强大地定义格斗中的方方面面!
  下面逐个简介。

anim(.air)

*  配置实例:
  [Begin Action 200]
  Clsn2Default: 1  ;定义默认hit boxes
  Clsn2[0] = -10,  0, 10,-79
  0,1, 0,0, 7     ; group,image,  offset_x,offset_y, times(-1表示inf)

  Clsn1: 1        ; 定义element 2有attack boxes
  Clsn1[0] =  27,-86, 64,-60
  Clsn2: 2        ; 定义element 2使用特殊hit boxes
  Clsn2[0] =  47,-31, -6,  0
  Clsn2[1] =  17,-31, 47,-78
  0,2, 0,0, 7

   LoopStart       ; 指定anim从这element开始循环
                            ; element 3以后没有attack boxes,hit boxes使用默认值
   0,3, 0,0, 7
  15,1, 0,0, 5, H    ;<-- 水平翻转(做throw很方便)
  15,2, 0,0, 5, V    ;<-- 垂直翻转
  15,3, 0,0, 5, VH   ;<-- 水平+垂直翻转
  15,4, 0,0, 5, ,A    ;<-- 不翻转 + color Addition
  15,4, 0,0, 5, H, S  ;<-- 水平翻转 + color Subtraction
  15,4, 0,0, 5, ,AS128D128   ;<-- color Addition

* 定义anim序列,应用于所有可视物件:
  > 动作(move)
  > 特效
  > 背景动画
  > 血条动画
  > ...


state(.cns, .cmd)

* 配置实例:
  [Statedef 200]
  type = S  
  ; state的类型。最重要的作用是用于受击判断。
  ; S(Standing,默认) C(Crouching) I(In The Air) L(Lying Down)
  ; U(Unchanged, 保持上个state的type)


  movetype = I   ; 当前动作的类型:A(attack) I(Idle,默认) H(being Hit)  U(Unchanged)

  physics = S
  ; 物理类型。S(Stand,接受地面摩擦力) C(Crouch,接受地面摩擦力)
  ; A(Air,加速向下直至y>=0落地) 
  ; N(None,默认。不应用预设物理,此时可通过后续controller设定特殊物理)
  ; U(Unchanged)


  anim = 200          ; 动画编号
  velset = 0, 1         ; x, y速度设置
  ctrl = 1/0                ; 是否可控,默认保持前state的ctrl
  poweradd = 40    ; 本state为power bar添加的数值
  juggle = 8             ; juggle值
  facep2 = 1/0         ; 是否强制面向P2; 默认为0
  hitdefpersist = 1/0         ; Hit Def的开启或禁用
  movehitpersist = 1/0     ; move hit是否从上个state继承。默认0(即重置)
  hitcountperisist = 1/0    ; hit counter是否从上个state继承。默认0(即重置)
                                            ; 可供trigger判断。
  sprpriority = 0  ; sprite渲染层次。(0)standing/crouching (1)jumping (2)attacking(使攻击态最上)

* state ID分段规则
  -3          unpause_heartbeat
  -2          alltime_heartbeat
  -1          alltime_heartbeat(command ONLY)
  0-199       reserved
  200-299     Standing attacks
  300-399     More standing attacks, running attacks
  400-499     Crouch attacks
  500-599     More crouch attacks
  600-699     Air attacks
  700-799     More air attacks
  800-999     Unused - use if you need more states
  1000-2999   All special attacks
  3000-4999   All hyper attacks
  5000-5999   reserved

* helper角色:没有-3,-2;而-1有无取决于配置
* FSM:-3 -> -2 -> -1 -> 当前
* 该分段推荐和anim分段一致
* 两层优先级:player*.cns > common*.cns (.snd, .air亦然...)


state controller(.cns, .cmd)

* 配置实例:
  [State 200, 1]
  type = [control api]
  param1 = *
  param2 = *
  ...
  paramN = *
  triggerall = [condition_exp_all_1]
  triggerall = [condition_exp_all_2]
  trigger1 = [condition_exp1]
  trigger2 = [condition_exp2_1]
  trigger2 = [condition_exp2_2]
  ignorehitpause = [0/1]
  persistent = [0/1/2/3...]

* 功能:满足triggers的触发条件后,
  调用control api(param1, param2, ..., paramN)
* 任何statedef必须定义至少一个的controller
* 配置顺序敏感:配置越前,执行优先级越高


trigger(.cns, .cmd)

* 配置实例:
  [State 200, 1]
  type = [control api]
  param1 = *
  param2 = *
  ...
  paramN = *
  triggerall = [condition_exp_all_1]
  triggerall = [condition_exp_all_2]
  trigger1 = [condition_exp1]
  trigger2 = [condition_exp2_1]
  trigger2 = [condition_exp2_2]
  ignorehitpause = [0/1]
  persistent = [0/1/2/3...]

* 上述triggers语义为:
  if (triggerall AND triggerall) AND (trigger1 OR (trigger2 AND trigger2)):
    control api(param1, param2, ..., paramN)

* 任一controller至少拥有trigger1
* 支持null trigger:debug
* condition_exp支持类似C语言的表达式,但数据类型只有3种:
  > 32bit signed int
  > 32bit float
  > bottom(只由引擎隐式产生)
    更像一个异常对象:除0/负数开方/对象不存在的exp结果便是bottom对象。
    结果为bottom的trigger不触发。
  > string(?)
* persistent参数用于修饰controller内所有trigger的持续性
  0:本state一次进入/离开期间,只能触发一次
  1:每次满足条件即触发(默认)
  2:累积2次满足条件才触发
  3:.........3次..............


command(.cmd)

* 配置实例:
  [Command]
  name = "Two_quarter_circles_forward_plus_y"
  command = ~D, DF, F, D, DF, F, y
  time = time             ;可选,指定command须在time内完成
  buffer.time = time  ; 可选,如command达成,
                                   ; 那它在本time内有效。
                                   ; 1表示瞬间有效;
                                   ; time越大combo越易:因可提早输入;
                                   ; 本参数对纯pressing系列(/F)不生效,
                                   ; 这系列command.buffer.time强制为1


* 支持 8 个方向键:B, DB, D, DF, F, UF, U, UB
* 支持 6 个功能键:a, b, c, x, y, z
* 支持 5 个修饰符前缀:
  (无修饰符则表示键必须press)
  /:被修饰键必须pressing
  ~:被修饰键必须released
  $:只能修饰方向键,语义:$D 等价于 /D, /DB, /DF
  +:只能修饰功能键,语义:a+b 表示 a和b键同时被press
  >:在被修饰键和前一个键定义间,如果有其他按键事件发生,则不成功。
     如:a, >~a 表示在press a和released a这两事件间,不能有其他事件。
* 可以组合修饰:
  ~30$D, a+b 表示 
  先pressing (D或DB或DF) 30 tick,然后release,最后同时press a和b
* 连续出现的键,MUGEN会按固定规则强制转化,用作快进语义:
  F, F 经强制转化后为 F, >~F, >F

* 简易发招考虑,motion command(如前四分一圆),应以~开始第一个键。
* 如一move使用两个同样的[Command].name而又有不同的[Command].command,
  则两种command都可以发动该move。
* state -1(AtHc)出场:将command和state跳转联系起来
  [State -1, Super  AKara ]
  type = ChangeState
  value = 1020
  trigger1 = command ="Two_quarter_circles_forward_plus_y"
   ; 注:trigger1处command为一fucntion-type trigger api


---------------------------------------------------------------------
其他
---------------------------------------------------------------------
* control api 库(见<< M.U.G.E.N格斗游戏引擎简介(2) >> )
* trigger api 库
* .def:各种预设参数。
* .sff:sprite。教程:anim序列基准点(脚,腰,头)
* .ai:
  难度:基于人类1/6秒反应时间原则,调整CPU的反应时间。
  功能:trigger(AILevel)+ control api + 定制state -1/any;
  效果:实时取P1/P2/Env属性,当前tick反应,智能到无限。
   http://www.elecbyte.com/wiki/index.php/AI
* storyboard:cutscene = anim + text + music + sound
* 如需更细致更潮流的设定,可往SSF4 frame/box data参考。

---------------------------------------------------------------------
总结
---------------------------------------------------------------------

啥都不说了,自己看 M.U.G.E.N DNF
http://www.youtube.com/watch?v=95-E-NtJMuw


---------------------------------------------------------------------
相关文章
---------------------------------------------------------------------

  << M.U.G.E.N格斗游戏引擎简介(2) >> by  AKara  
   http://blog.csdn.net/akara/article/details/6954612

  << 游戏中的有限状态机 >> by  AKara  
   http://blog.csdn.net/akara/article/details/6003703

  << 使用行为树(Behavior Tree)实现游戏AI >> by  AKara  
   http://blog.csdn.net/akara/article/details/6084786

---------------------------------------------------------------------


by AKara 2011-10-23 @  http://blog.csdn.net/akara @ akarachen(at)gmail.com @ weibo.com/akaras
 
 
  上一篇文章中提到的「 control api库」对应官方docs/sctrls.html。
  api总共89个,但不是每个都值得翻译。
  如果说有一个必须要翻,那就是  HitDef 。
  因为从  HitDef 中可了解招式设计要素的一个概况。
 
  它是我见过的最多参数的函数(如果它能叫做函数的话):80个参数。
 
 
---------------------------------------------------------------------
函数原型
---------------------------------------------------------------------
 
HitDef(attr, 
    [hitflag], [guardflag], [affectteam], 
    [animtype], [air.animtype], [fall.animtype],
    [priority], [damage], 
    [pausetime], [guard.pausetime],
    [sparkno], [guard.sparkno],
    [sparkxy], [hitsound],
    [guardsound], [ground.type], [air.type],
    [ground.slidetime], [guard.slidetime],
    [ground.hittime], [guard.hittime], [air.hittime],
    [guard.ctrltime], [guard.dist], [yaccel],
    [ground.velocity], [guard.velocity],
    [air.velocity], [airguard.velocity],
    [ground.cornerpush.veloff], [air.cornerpush.veloff],
    [down.cornerpush.veloff], [guard.cornerpush.veloff],
    [airguard.cornerpush.veloff], [airguard.ctrltime],
    [air.juggle], 
    [mindist], [maxdist],
    [snap], [p1sprpriority], [p2sprpriority],
    [p1facing], [p1getp2facing],
    [p2facing], [p1stateno], [p2stateno],
    [p2getp1state], [forcestand], [fall],
    [fall.xvelocity], [fall.yvelocity],
    [fall.recover], [fall.recovertime], [fall.damage],
    [air.fall], [forcenofall],
    [down.velocity], [down.hittime],
    [down.bounce], [id],
    [chainid], [nochainid],
    [hitonce], [kill],
    [guard.kill], [fall.kill],
    [numhits], [getpower], [givepower],
    [palfx.time], [palfx.mul], [palfx.add],
    [envshake.time], [envshake.freq], 
    [envshake.ampl], [envshake.phase],
    [fall.envshake.time], [fall.envshake.freq], 
    [fall.envshake.ampl], [fall.envshake.phase],
    )
 
 
 
   我知道,到了这里,99%的读者都准备或已经跳出页面。
  
 
---------------------------------------------------------------------
必填参数(1个)
---------------------------------------------------------------------
 
attr = arg1, arg2
定本HitDef的形态属性。
 
arg1(string):"S"(Standing) / "C"(Crouching) / "A"(Aerial Attack)
arg2(string)+:字符1:"N"(Normal) / "S"(Special) / "H"(Hyper or Super)
              字符2:"A"(Attack) / "T"(Throw) / "P"(Projectile)
 
 
---------------------------------------------------------------------
可选参数(79个)
---------------------------------------------------------------------
 
hitflag = hit_flags
定义P2处于何种状态下才能被P1击中并产生hit。
  
hit_flags(string)+:
  H(High), L(Low), A(Air), F(Fall), D(lying Down),M(等价于HL)
  (hit_flags至少应该包含 H/L/A/M 之一)
  
  额外还可以搭配: 
  "+"(本HitDef只能命中处于get-hit状态下的player,chain-move用) 
  或 
  "-"(本HitDef只能命中不处于get-hit状态下的player,比如Throw)。
  
  hit_flags默认参数为"MAF"
 
---------------------------------------------------------------------
 
guardflag = guard_flags
定义P2通过何种guard形式可以guard本HitDef。
 
guard_flags(string)+:
  H(High), L(Low), A(Air), M(Mid, ==HL)
 
  默认为"":即P2不能guard本HitDef。
 
---------------------------------------------------------------------
 
affectteam = team_type
定义可attack何种队伍属性的P2。
 
team_type(string):
  B(Both team), E(Enemy/Opponent team;默认), F(Friendly team)
  
---------------------------------------------------------------------
 
animtype = anim_type
定义P2受Hit后的表现类型。
 
anim_type(string):
  "light", "medium", "hard"
  "back"(击倒), "up"(浮空:垂直击起), "diagup"(吹飞/击飞:向后击起)
 
默认值:"light"。
 
---------------------------------------------------------------------
 
air.animtype = anim_type
定义P2处于air时的受击后anim。取值同animtype参数。
 
默认值:取animtype配置值。
 
---------------------------------------------------------------------
 
fall.animtype = anim_type
定义P2处于fall时的受击后anim。取值同animtype参数。
 
默认值:如果air.animtype为"up",取"up";否则取"back"。
 
---------------------------------------------------------------------
 
priority = hit_prior, priority_class
定义本次HitDef的优先级别。
例:P1高优先级的HitDef 碰撞上P2低优先级的HitDef,则P1 attack成功:P2受hit。
 
hit_prior(int): 1-7。默认为4。
priority_class(string):
  可选Dodge, Hit(默认), Miss三者之一。
  本参数用于在hit_prior值相等情况下,再做受击结果的最后细分裁决。
  假设P1 vs P2,结果规则为:
  * (P1)Hit vs (P2)Hit:双方均受击
  * (P1)Hit vs (P2)Miss:P1受击,P2不受击
  * (P1)Hit vs (P2)Dodge:双方不受击
  * (P1)Dodge vs (P2)Dodge:双方不受击
  * (P1)Dodge vs (P2)Miss:双方不受击
  * (P1)Miss vs (P2)Miss:双方不受击
  * ...其余同理...
 
  在双方不受击的情况下,双方的HitDef继续有效,不需要再次trigger设置。
  Miss和Dodge常用于throws:因为双方不可能同事throw对方。
 
---------------------------------------------------------------------
 
damage = hit_damage, guard_damage
定义P2受击后的损血量,以及如果P2挡格后的损血量。
 
默认值:0,0。
 
---------------------------------------------------------------------
 
pausetime = p1_pausetime, p2_shaketime
定义P1和P2双方对于这次Hit事件的Pause时间(tick为单位)
 
p1_pausetime(int):定义攻击者P1的attack pause。
p2_shaketime(int):定义受击者P2的hit pause。
 
默认值:0,0。
 
---------------------------------------------------------------------
 
guard.pausetime = p1_pausetime, p2_shaketime
定义当P1的本次HitDef被P2 guarded后,双方的Pause时间。
参数定义与pausetime类似。
 
默认值:取pausetime值。
 
---------------------------------------------------------------------
 
sparkno = action_no
定义本次Hit的闪光特效编号。
如果添加"S"前缀,则从player.air文件索引,否则从common.air索引。
 
默认值:player属性配置中的编号。
 
---------------------------------------------------------------------
 
guard.sparkno = action_no
定义本次Hit在被guarded后的闪光特效编号。
参数定义与sparkno一致。
 
---------------------------------------------------------------------
 
sparkxy = spark_x, spark_y
定义sparkno/guard.sparkno播放的位置。
 
spark_x(int):相对于P2。负值越多,越往P2背后。
spark_y(int):相对于P1。负值越多,位置越高。
 
默认值:0,0。
 
---------------------------------------------------------------------
 
hitsound = snd_grp, snd_item
定义Hit发生时的音效。
如果添加"S"前缀,则从player.snd文件索引,否则从common.snd索引。
 
默认值:player属性配置中的编号。
 
---------------------------------------------------------------------
 
guardsound = snd_grp, snd_item
定义本HitDef被guarded时P1发生的音效。
如果添加"S"前缀,则从player.snd文件索引,否则从common.snd索引。
 
默认值:player属性配置中的编号。
 
---------------------------------------------------------------------
 
ground.type = attack_type
定义当P2处于ground时的type。
 
attack_type(string):"High", "Low", "Trip", "None"
 
默认值:"High"。
 
---------------------------------------------------------------------
 
air.type = attack_type
定义当P2处于air时的type。
 
参数定义同ground.type。
 
默认值:取ground.type值。
 
---------------------------------------------------------------------
 
ground.slidetime = slide_time
定义在ground上Hit发生后P2后退的时长(不含pausetime)。
顾名思义,Hit后如果导致P2不处于ground,本设定不生效。
 
默认值:0。
 
---------------------------------------------------------------------
 
guard.slidetime = slide_time
定义在ground上Hit被guarded后P2后退的时长(不含pausetime)。
 
默认值:取guard.hittime值。
 
---------------------------------------------------------------------
 
ground.hittime = hit_time
定义在ground上Hit发生后P2处于gethit state中的时长。
小心设置本值,使得combo成为可能。
显然:Hit后如果导致P2不处于ground,本设定不生效。
 
默认值:0。
 
---------------------------------------------------------------------
 
guard.hittime = hit_time
同ground.hittime。除了时机变为:Hit被guarded后。
 
默认值:取ground.hittime值。
 
---------------------------------------------------------------------
 
air.hittime = hit_time
同ground.hittime。除了时机变为:P2处于air时被Hit,或Hit导致P2到air。
特殊地,当下面将说到的fall参数为1时,本参数无效。
 
默认值:20。
 
---------------------------------------------------------------------
 
guard.ctrltime = ctrl_time
ground guard状态下P2回复可控的时长。
 
默认值:取guard.slidetime值。
 
---------------------------------------------------------------------
 
guard.dist = x_dist
P2 guarded Hit后,如果按着和P1反方向键时,退开的距离。
本参数基本不用设置。
 
默认值:取player的属性配置。
 
---------------------------------------------------------------------
 
yaccel = accel
连击情况下,给予P2的y向加速度。
 
默认值:0.35 in 240p / 0.7 in 460p / 1.4 in 720p。
 
---------------------------------------------------------------------
 
ground.velocity = x_velocity, y_velocity
Hit发生时,P2的初始x和y速度。y速度如果存在,P2会浮空。
y_velocity不指定时,P2仍然处于ground。
 
默认值:0,0。
 
---------------------------------------------------------------------
 
guard.velocity = x_velocity
Hit被在ground上guarded后,P2的x初速度。
 
默认值:取ground.velocity值。
 
---------------------------------------------------------------------
 
air.velocity = x_velocity, y_velocity
P2被在air中Hit后,P2的x和y初速度。
 
默认值:0,0。
 
---------------------------------------------------------------------
 
airguard.velocity = x_velocity, y_velocity
Hit被P2在air中Guarded后,P2的x和y初速度。
 
默认值:取air.velocity.x_velocity * 1.5 , air.velocity.y_velocity / 2.0。
 
---------------------------------------------------------------------
 
ground.cornerpush.veloff = x_velocity
定义P2处于角落时受Hit后的额外位移速度。
 
默认值:如果attr参数值为"A",则本参数为0;否则本参数为 1.3 * guard.velocity。
 
---------------------------------------------------------------------
 
air.cornerpush.veloff = x_velocity
P2处于air态。其余同ground.cornerpush.veloff。
 
默认值:取ground.cornerpush.veloff值。
 
---------------------------------------------------------------------
 
down.cornerpush.veloff = x_velocity
P2处于down态。其余同ground.cornerpush.veloff。
 
默认值:取ground.cornerpush.veloff值。
 
---------------------------------------------------------------------
 
guard.cornerpush.veloff = x_velocity
攻击被P2成功guard。其余同ground.cornerpush.veloff。
 
默认值:取ground.cornerpush.veloff值。
 
---------------------------------------------------------------------
 
airguard.cornerpush.veloff = x_velocity
攻击被P2成功airguard。其余同guard.cornerpush.veloff。
 
默认值:取guard.cornerpush.veloff值。
 
---------------------------------------------------------------------
 
airguard.ctrltime = ctrl_time
air guard状态下P2回复可控的时长。
 
默认值:取guard.ctrltime值。
 
---------------------------------------------------------------------
 
air.juggle = juggle_points
本Hit发生air juggle时对P2身上剩余的juggle point的【额外】需求值。
通常不需要设置本参数,除了飞行道具的HitDef定义。
 
默认值:0。
 
---------------------------------------------------------------------
 
mindist = x_pos, y_pos
maxdist = x_pos, y_pos
定义P2受Hit后,和P1的相对距离范围。
 
默认值:维持P2的当前位置不动的设置。
 
---------------------------------------------------------------------
 
snap = x_pos, y_pos
设置P2受Hit后相对P1的固定距离。
不常用,如果需要表现投技的效果,建议用"TargetBind"函数实现。
 
默认值:维持P2的当前位置不动的设置。
 
---------------------------------------------------------------------
 
p1sprpriority = drawing_priority
Hit发生时,P1的画面渲染优先级。
 
默认值:1。
 
---------------------------------------------------------------------
 
p2sprpriority = drawing_priority
Hit发生时,P2的画面渲染优先级。
 
默认值:0。
 
---------------------------------------------------------------------
 
p1facing = facing
Hit发生时,P1的面向。
 
facing(int):-1表示强制转换面向。
 
默认值:0。不转换。
 
---------------------------------------------------------------------
 
p1getp2facing = facing
Hit发生时,P1的面向。
 
facing(int):1,强制P1同步到P2当前面向;-1,强制P1和P2相反面向;0,不变。
 
当非0值时,p1getp2facing覆盖p1facing的作用。
 
默认值:0。
 
---------------------------------------------------------------------
 
p2facing = facing
Hit发生时,P2的面向。
 
facing(int):1,强制P2同步为P1当前面向;-1,强制P2和P1相反面向;0,不变。
 
默认值:0。
 
---------------------------------------------------------------------
 
p1stateno = state_no
Hit发生时,P1强制设置到的state_no。state必须是一个attack state(movetype=A)。
在throws中常用。
 
默认值:-1。不改变state。
 
---------------------------------------------------------------------
 
p2stateno = state_no
Hit发生时,P2强制设置到的state_no。state必须是一个get-hit state(movetype=H)。
在throws中常用?
 
默认值:-1。不改变state。
 
---------------------------------------------------------------------
 
p2getp1state = bvalue
Hit发生时,P2是否转为P1的state和animation。
如果p2stateno不设置,则本参数无效。
 
bvalue(int):0,不转;1,转
 
默认值:1。
 
---------------------------------------------------------------------
 
forcestand = bvalue
定义是否Hit发生时如果P2出于crouching state,强制为standing state-type。
当P2在air state中受击时,本设置不生效。
 
默认值:当ground.velocity.y_velocity不为0(即可能击浮空)时,为1。否则为0。
 
---------------------------------------------------------------------
 
fall = bvalue
Hit发生时,是否使得P2转为fall状态(击浮空,然后落地,即:knock down效果)
 
默认值:0。
 
---------------------------------------------------------------------
 
fall.xvelocity = x_velocity
fall参数效果发生后,P2从地面上击起的x初速度。
 
默认值:0。
 
---------------------------------------------------------------------
 
fall.yvelocity = y_velocity
fall参数效果发生后,P2从地面上击起的y初速度。
 
默认值:-4.5 in 240p, -9 in 480p, -18 in 720p。
 
---------------------------------------------------------------------
 
fall.recover = bvalue
fall参数效果发生后,P2是否能从fall中恢复控制。
 
默认值:1。可以恢复。
 
---------------------------------------------------------------------
 
fall.recovertime = recover_time
fall参数效果发生后,P2需要经过多少时间才能has control(不含 shaking pause时间 )。
 
默认值:4。
 
---------------------------------------------------------------------
 
fall.damage = damage_amt
fall参数效果发生后,P2 fall完结时碰触地面瞬间的损血量。
 
默认值:0。
 
---------------------------------------------------------------------
 
air.fall = bvalue
Hit发生时,是否使得处于air的P2转为fall(击浮空,然后落地,即:knock down)
 
默认值:取fall值。
 
---------------------------------------------------------------------
 
forcenofall = bvalue
Hit发生时,如果P2处于fall,是否取消fall。
如果fall参数为1,则本参数无效。
 
默认值:0。
 
---------------------------------------------------------------------
 
down.velocity = x_velocity, y_velocity
Hit发生时,如果P2处于lying down,赋予的x和y初速度。
显然:如果y_velocity不为0,则击浮空;如果y_velocity为0,则击滑行。
 
默认值:取air.velocity值。
 
---------------------------------------------------------------------
 
down.hittime = hit_time
Hit发生时,如果P2处于lying down,被击滑行的时间。
如果down.velocity.y_velocity不为0,则本参数无效。
 
默认值:0。
 
---------------------------------------------------------------------
 
down.bounce = bvalue
Hit发生时,如果P2处于lying down,是否支持弹起效果(使用fall.x_velocity和fall.y_velocity)。
如果down.velocity.y_velocity为0,则本参数无效。
 
默认值:0。
 
---------------------------------------------------------------------
 
id = id_number
本次Hit的ID,又称TargetID。用于连招(chain moves)判断。
 
id_number(int):取值范围[0, 无穷大]
 
默认值:0。表示无ID。
 
---------------------------------------------------------------------
 
chainid = id_number
如果P2上次被P1用id参数指出的id的一个attack击中,
那之后必须需要用 id == 本chainID 的attack才能接上。
(也就是说P2会记录最后打在身上的一个id)
 
id_number(int):取值范围-1或[1, 无穷大]
 
默认值:-1。表示任何HitDef的attack都可以接上(使得Hit发生)。
 
---------------------------------------------------------------------
 
nochainid = nochain_1, nochain_2
如果P2上次被P1用【以nochain_2或nochain_2】作为id的一个attack击中,
那么本次HitDef必定失效。
(也就是说P2会记录最后打在身上的一个id)
 
注意:除了-1,本参数两个值都不能和chainID参数值相同。
注意:如果P2的受击序列为:P1 , 3rd, P1;那么本参数不生效。
 
默认值:-1,-1。表示不禁止任何HitDef id的attack。
 
---------------------------------------------------------------------
 
hitonce = hitonce_flag
是否一次只能击中一个目标。
 
hitonce_flag(int):1,只击中一个目标,其他发生碰撞的目标不受击。0,可同时击中多目标。
特殊地,如果attr参数为throw类型,那么hitonce默认为1。
 
默认值:0。
 
---------------------------------------------------------------------
 
kill = bvalue
是否本Hit发生时具有KO P2的功能。
 
默认值:1。
 
---------------------------------------------------------------------
 
guard.kill = bvalue
是否本Hit被guarded后也具有KO P2的功能。
 
默认值:1。
 
---------------------------------------------------------------------
 
fall.kill = bvalue
是否本Hit造成fall后触地时具有KO P2的功能。
 
默认值:1。
 
---------------------------------------------------------------------
 
numhits = hit_count
Hit发生时,算多少点combo值。
hit_count(int):[1, 正无穷大)。
 
默认值:1。
 
---------------------------------------------------------------------
 
getpower = p1power, p1gpower
p1power定义Hit发生时P1的能量增长;
p1gpower定义Hit被Guarded后的P1能量增长。
 
默认值:p1power = damage值 * Default.Attack.LifeToPowerMul(data/mugen.cfg中)
      p1gpower = p1power / 2.0
 
---------------------------------------------------------------------
 
givepower = p2power, p2gpower
p2power定义Hit发生时P2的能量增长;
p2gpower定义定义Hit被Guarded后的P1能量增长。
 
默认值:p2power = damage值 * Default.GetHit.LifeToPowerMul(data/mugen.cfg中)
      p2gpower = p2power / 2.0
 
---------------------------------------------------------------------
 
palfx.time = palfx_time
palfx.mul = r1, g1, b1
palfx.add = r2, g2, b2
上面三个参数定义P2在Hit发生时的调色板效果。
palfx_time(int):时长;默认为0(即无效果)
 
其他两个参数与PalFX control api中的意义一致。
 
---------------------------------------------------------------------
 
envshake.time = envshake_time(int)
envshake.freq = envshake_freq(float)
envshake.ampl = envshake_ampl(int)
envshake.phase = envshake_phase(float)
当Hit发生时,如果有如上4个参数设定,则以指定参数震屏。
envshake.time为震屏的时长。
其他3个参数见 EnvShake control api的定义。
 
---------------------------------------------------------------------
 
fall.envshake.time = envshake_time (int)
fall.envshake.freq = envshake_freq (float)
fall.envshake.ampl = envshake_ampl (int)
fall.envshake.phase = envshake_phase (float)
当Hit生效后并导致P2 fall,那么P2触地的瞬间以指定参数震屏。
 
参数意义与envshake_*系列一致。
 
 
---------------------------------------------------------------------

谢谢你拖拽到这里,为免沉闷,再贴个别人的视频链接。
Mugen Female Ranger vs Blademaster

 
---------------------------------------------------------------------
相关文章
---------------------------------------------------------------------
 
 
 
 
---------------------------------------------------------------------
 

  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值