“Skill and Battle Directives in Combat”的版本间的差异

来自部落与弯刀Wiki

第717行: 第717行:
  
 
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen
 
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen
*dmg: physical damage value. The value is the damage expression.  
+
*dmg: physical damage value. The value is the damage expression.
 
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.
 
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000.  
+
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000.
 
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.
 
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.
 
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.
 
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.
第725行: 第725行:
 
*eft ID: special effect ID (when the unit is hit).
 
*eft ID: special effect ID (when the unit is hit).
 
*trig: trigger damage effect (e.g., damage reflection).
 
*trig: trigger damage effect (e.g., damage reflection).
*attack_type: decide the type of weapon attacks that caused the damage.  
+
*attack_type: decide the type of weapon attacks that caused the damage.
 
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.
 
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.
  
第731行: 第731行:
 
Damage expressions only support standard mathematic expressions, containing the following math symbols: +-*/^%(). Certain pre-defined fields can be used, and all pre-defined fields should follow the format of [%cmd%]. Currently, we support the following pre-defined fields:
 
Damage expressions only support standard mathematic expressions, containing the following math symbols: +-*/^%(). Certain pre-defined fields can be used, and all pre-defined fields should follow the format of [%cmd%]. Currently, we support the following pre-defined fields:
  
*[%rnd:min_val,max_val%]: a random integer (min_val<= this integer<= max_val).  
+
*[%rnd:min_val,max_val%]: a random integer (min_val<= this integer<= max_val).
 
*[%field%]: field stands for a random value defined in a character attribute field.
 
*[%field%]: field stands for a random value defined in a character attribute field.
  
第742行: 第742行:
 
  0.2#skill directive 2
 
  0.2#skill directive 2
 
  ……
 
  ……
当条件表达式不为空时,根据条件表达式判定结果执行。
+
When the conditional expression is not empty, the execution of results will be judged accordingly.
  
条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果,例如
+
In conditional statements, you can use built-in directives to realize some special effects, such as repetition.
 
  *REPEAT_START:9
 
  *REPEAT_START:9
 
  Statement 1
 
  Statement 1
第752行: 第752行:
 
  Statement N
 
  Statement N
 
  *REPEAT_END
 
  *REPEAT_END
表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍,期间可以通过[%rpt_index%]来查询当前语句处于第几次循环
+
The lines above repeat all lines between REPEAT_START and REPEAT_END for 9 times, during which you can use [%rpt_index%] to see how many times the lines have been repeated.
 
  <nowiki>*</nowiki>SELECT_UNITS:[目标筛选条件表达式](注意,次数查询cast_info中的target为当前单位)
 
  <nowiki>*</nowiki>SELECT_UNITS:[目标筛选条件表达式](注意,次数查询cast_info中的target为当前单位)
 
  语句1
 
  语句1
第759行: 第759行:
 
  语句N
 
  语句N
 
  <nowiki>*</nowiki>SELECT_END
 
  <nowiki>*</nowiki>SELECT_END
表示对SELECT_UNITS行与SELECT_END之间所有的命令行,对SELECT_UNITS:后所有满足指定条件表达式的对象使用,并以该对象作为caster对象
+
The lines above contain all command lines between SELECT_UNITS and SELECT_END, which will be used towards all objects that meet specific conditional expressions after “SELECT_UNITS:” make these objects “caster objects”.
  
其中,嵌入到[@...@]中的语句为保留两位小数的结果运算取值,此类查询仅在技能命令中有效。
+
The first two digits after the decimal point of the result of statements embedded in [@...@] will be maintained. This kind of query only works in skill directives.
  
目前支持的技能命令有:
+
Currently, supported skill directives are:
 
{| class="wikitable"
 
{| class="wikitable"
 
|+
 
|+
!技能指令
+
|'''Skill Directive'''
!说明
+
|'''Instruction'''
 
|-
 
|-
 
|stop_act
 
|stop_act
|'''立即停止当前所有技能动作并按照之前指令行动'''
+
|'''Stop all current skill casting actions instantly and act according to previous directives.'''
 
<br />
 
<br />
 
  stop_act#1
 
  stop_act#1
 
|-
 
|-
 
|add_eft
 
|add_eft
|'''向战场中添加一个预定义的特效体'''
+
|'''Add a pre-defined special effect unit onto the battlefield.'''
 
<br />
 
<br />
  add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选,为空时为默认)#附带伤害表达式(可选,为空时按照特效表中定义的伤害表达式计算,格式见6.4节)#目标参数(见7.4节说明)#特效体TAG(用于replace_eft指令查询)
+
  add_eft#special effect unit ID#intial position#movement parameter#change object of damage check (optional; set empty by default)#addtional damage expression (optional; calculate according to the damage expression defined in the special effect table when this is empty; format: please refer to Section 6.4)#target parameter (see Section 7.4)#special effect unit TAG (used for a query on replace_eft directive.)
初始位置格式为:位置类型,偏移x,偏移y,偏移z(偏移量为相对于初始方向的偏移)
+
Initial position format: position type, offset X, offset Y, offset Z (the offset value is the offset from the initial direction.)
  
支持的位置类型有:
 
  
*cast_pos:技能施放动作的预设位置
+
Supported position types:
*tag_pos:技能施放目标单位或者目标坐标的位置
 
*hit_pos:技能命中目标单位当前的位置
 
*unit_pos:技能施放单位当前的位置
 
*start_pos:技能释放时的开始位置
 
*rnd_pos:技能释放单位周围一个任意的位置
 
*dim_pos:通过set_dimpos命令定义的预设位置
 
*reinf_pos:施法者阵营方的增援位置
 
*emitter_pos=EMITTER_ID:ID为EMITTER_ID的发射器发射点位置
 
*unit_round=DIR:LEN:距离施法者正方向偏移DIR角度,距离为LEN的位置
 
*rnd_round=RAD[-MIN_RAD]:施法者半径RAD范围内的随机位置,可选参数MIN_RAD表示随机范围距中心的最小距离,默认为0
 
*eft_pos=TAG:返回查询到的第一个指定特效体TAG的特效体位置,如不存在则返回caster的当前位置 '''注意:仅支持查询由caster本单位创建的特效体'''
 
*……
 
  
运动参数格式为:运动类型:运动参数(形如:参数1,参数2,参数3.....
+
* cast_pos: the preset position of skill casting.
 +
* tag_pos: the target position or target coordinate of skills.
 +
* hit_pos: the position of units hit by skills.
 +
* unit_pos: the position of the skilled caster.
 +
* start_pos: the beginning position of the caster when they cast skills.  
 +
* rnd_pos: any position around the skilled caster.
 +
* dim_pos: the preset position defined by the set_dimpos directive.
 +
* reinf_pos: the position of reinforcement of the skill caster’s side.
 +
* emitter_pos=EMITTER_ID: the position of emitter whose ID is EMITTER_ID.
 +
* unit_round=DIR:LEN: the position that is LEN away from the skilled caster, with an offset degree of DIR from the positive direction.
 +
* rnd_round=RAD[-MIN_RAD]: a random position within a radius of RAD around the skilled caster (MIN_RAD stands for the minimum distance between this random position and the  centre, set default by 0).
 +
* eft_pos=TAG: return the special effect position of the first specific special effect unit TAG. If there is no result, return to the current position of the caster. Note: this only supports query on special effect units created by the caster.
 +
* ……
  
支持的运动类型有:
 
  
*0:不运动 无参数
+
Supported movement types are:
*1:运动至技能目标点 偏移x,偏移y,偏移z
 
*2:运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标,否则按照技能释放目标)
 
*3:向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)
 
*4:向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)
 
*5:跟随目标运动 跟随类型(0固定相对位置,1发射点位置),偏移x,偏移y,偏移z,持续时间(-1为永久)
 
*6:运动至dim_pos 偏移x,偏移y,偏移z
 
  
<br />
+
* 0: No movement and no parameter.
 +
* 1: move to the target position of a skill. Offset X, offset Y, and offset Z.
 +
* 2: move to the target position of a skill. No parameter (when the target parameter is not empty, use the selected target of the parameter. Otherwise, cast the skill to its original target unit).
 +
* 3: move in a specific direction. Offset degree, distance (no longer than the width of the battlefield).
 +
* 4: move back and forth in a specific direction. Offset degree, distance (no longer than the width of the battlefield).
 +
* 5: follow a target. Following type (0: Fixed Relative Position; 1: Emitter’s Position), offset X, offset Y, offset Z, duration (-1: Eternal).
 +
* 6: move to dim_pos. Offset X, offset Y, offset Z.<br />
 
|-
 
|-
 
|dmg_check
 
|dmg_check
|'''进行伤害判定'''
+
|'''Damage check'''
 
<br />
 
<br />
  dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选,默认关闭)
+
  dmg_check#check type#damage expression#target object parameter#check parameter list (use “,” to separate)# filter repetitive check object(optional; set disabled by default.)
支持的判断类型有:
+
Supported check types are:
  
*0:单体判断(目标对象参数为目标单位见下一小节,为空表示技能目标)
+
*0: single check (see next section when the target unit is the target object parameter; emptiness means the target of skills).
*1:半径范围判断 目标对象参数为目标类型(0:敌方 1:我方 2:双方) 参数表中参数1为参考位置类型(见add_eft命令的位置类型) 参数2,3,4,5分别为偏移坐标的x,y,z及半径
+
*1: radius check. The target object parameter is the target type (0: Enemy; 1: Ally; 2: Both Sides). Parameter 1 in the parameter list stands for the reference position type (see the position type of the add_eft directive). Parameter 2~5 stands for the X, Y, Z, and radius in the offset coordinate.
*2:多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数,参数4以后为以参考点坐标为(0,0)的多边形坐标信息
+
*2: polygon check. The target object parameter and parameter 1 are the same as the second type. Parameter 3 is the number of vertices of the polygon; parameter 4 and the following parameters are the coordinate info of the polygon whose reference point coordinate is (0,0).
  
 
<br />
 
<br />
 
|-
 
|-
 
|add_buff
 
|add_buff
|'''对目标施加BUFF'''<br />
+
|'''Grant a BUFF on a target'''<br />
  add_buff#buff ID#BUFF目标参数#持续时间(如不指定则采用BUFF默认持续时间)#叠加层数(默认为1)#上限层数(默认为配置表中的数值,只有大于0时生效)
+
  add_buff#buff ID#BUFF target parameter#duration (same as the default BUFF duration if designed specifically)#number of stacks(set default by 1)#uppder limit of stacks (same as the value in the configuration table by default; comes into effect when the number is bigger than 0.)
  
  
可支持的内置目标参数有:
+
Currently, supported built-in target parameters are:
  
*caster:技能释放者
+
* caster: skill caster.
*target:目标单位(指向性技能的目标或技能命中的目标)
+
* target: target unit (unit of target-oriented skills or unit hit by skills.)
*roleid,ROLEID:查询单位绑定人物ID为ROLEID的一个目标对象
+
* roleid,ROLEID: search for a target object whose unit-bound ID is ROLEID.
*buffgiver,BUFFID:查询当前caster身上一个ID为BUFFID的BUFF给与者
+
* buffgiver,BUFFID: search for a buff giver who gave the buff (whose ID is BUFFID field) to the current caster.
*find_tag_res:查询指定目标的结果单位(必须先执行一次[%find_tag:TAGINFO%]查询才可调用)
+
* find_tag_res: search for a result of a specific target (must execute [%find_tag:TAGINFO%] before calling.)
*tag_next_fu,距离D:当前命中目标的下一个小于距离D的友方单位
+
* tag_next_fu,distance D:the next ally unit whose distance from the current hit target is shorter than distance D.
*caster_next_fu,距离D:施法者的下一个小于距离D的友方目标
+
* caster_next_fu,distance D: the next ally unit whose distance from the current caster is shorter than distance D.
*caster_next_eu,距离D:施法者的下一个小于距离D的敌方目标
+
* caster_next_eu,distance D: the next enemy unit whose distance from the current caster is shorter than distance D.
  
 
<br />
 
<br />
 
|-
 
|-
 
|remove_buff
 
|remove_buff
|'''移除目标的BUFF'''<br />
+
|'''Remove a BUFF from a target'''<br />
  remove_buff#移除目标(同上)#移除方式#参数1,参数2,参数3...
+
  remove_buff#remove target (same as above)#removal type#parameter 1, parameter 2,parameter 3...
目前支持的移除方式如下
+
Currently, supported removal methods are:
  
*0:全部移除
+
*0· : remove all.
*1:移除指定BUFF 参数1为BUFF ID,参数2为移除层数(默认-1为全部移除)
+
*1: remove a specific buff. Parameter 1 is the BUFF ID; parameter 2 is the number of removed stacks (-1: remove all by default).
*2:移除有害BUFF 参数1为移除数量(默认-1全部移除),参数2为BUFF子类型(默认-1不限)
+
*2: remove a negative buff (debuff). Parameter 1 is the number of removed buffs (-1: remove all by default), parameter 2 is the subtype of buffs (-1: unlimited by default).
*3:移除有益BUFF 参数1为移除数量(默认-1全部移除),参数2为BUFF子类型(默认-1不限)
+
*3: remove a buff. Parameter 1 is the number of removed buffs (-1: remove all by default), parameter 2 is the subtype of buffs (-1: unlimited by default).
  
 
<br />
 
<br />
 
|-
 
|-
 
|dart_move
 
|dart_move
|'''突进类移动'''<br />
+
|'''Dash'''<br />
  dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒,在运动结束前开始执行承接技能向前的时间偏移量>=0)[可为空]#操作对象(可选,默认为caster)#修正目标位置(可选,参数格式见节2)#是否强制(默认0  为1时强制移动)
+
  dart_move#action ID#movement type#speed parameter#collision quallity#bound special effect#skill to cast after the movement, skill level(set default by 1)[can be empty], time offset(count by second; if a skill is cast before the movement ends, the time offset >= 0) [can be empty]#operation object (optional; caster by default)#correct target position (optional; see Section 2 for the format)#compulsory or not(set 0 by default; 1: compulsory move).
移动类型分为:
+
Movement types are:
  
*0:匀速运动
+
*0: uniform motion.
*1:跳跃
+
*1: jump.
*2:击退运动
+
*2: knockback.
*3:击飞运动 (当为击飞运动时,速度参数为击飞的滞空时间)
+
*3: knock up (when the movement type is knock-up, the speed parameter stands for the air time of the hit unit).
  
速度参数为角色移动时的水平速度(当速度小于等于0时为闪现至目标)
+
The speed parameter is the horizontal speed of the characters’ movement (when the speed is lower than0, the character flash to the target position).
  
冲撞质量在匀速运动时表示刚体质量,0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了,目前暂时无用了,参数还必须要填写。
+
Collision quality stands for the quality of a rigid body under uniform motion. 0 means ignoring the collision (when the movement type is jump, the parameter stands for the height of jumping)—as we do not use a physical engine now, the collision quality is of no use now. However, we still need to fill in the parameter.
  
绑定特效为运动时附加在单位上的特效ID
+
“Bound Special Effect” is the special effect ID attached to the unit when they are moving.
  
运动结束承接技能为执行运动结束后立即执行的技能ID
+
“Skill to cast after movement” is the ID of the skill that will be cast right after the movement.
  
 
<br />
 
<br />
 
|-
 
|-
 
|stop_dartmove
 
|stop_dartmove
|'''停止当前突进运动'''<br />
+
|'''Stop dashing'''
 
  stop_dartmove#1
 
  stop_dartmove#1
 
<br />
 
<br />
 
|-
 
|-
 
|explode
 
|explode
|'''在目标位置进行一次爆破物理效果'''<br />
+
|'''Physical explosion at the target position'''<br />
  explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数
+
  explode#initial position (see the instruction on Skill Position Parameter Format)#explosion radius#intensity parameter
 
<br />
 
<br />
 
|-
 
|-
 
|add_force
 
|add_force
|'''对目标单位进行一次击退效果'''<br />
+
|'''Physical explosion at the target position'''<br />
 
  add_force#力度参数#目标单位(可省略,默认target)
 
  add_force#力度参数#目标单位(可省略,默认target)
 
<br />
 
<br />
 
|-
 
|-
 
|play_sound
 
|play_sound
|'''播放一个指定音效'''<br />
+
|'''Knock back the target once'''<br />
  play_sound#音效ID#音效位置(同第一节解释)
+
  play_sound#sound effect ID#sound effect position (see explanation in Section 1)
 
<br />
 
<br />
 
|-
 
|-
 
|unit_sound_dic
 
|unit_sound_dic
|'''单位根据模型配置播放指定音效字典中的字段对应音效'''<br />
+
|'''Play a sound effect from the SFX Dictionary according to the model configuration.'''<br />
  unit_sound_dic#音效字典KEY值#单位目标参数
+
  unit_sound_dic#SFX Dictionary KEY#unit target parameter
 
<br />
 
<br />
 
|-
 
|-
 
|cast_sound
 
|cast_sound
|'''播放一个指定音效(在施法者处)'''<br />
+
|'''Play a specific sound effect at a caster’s position'''
  cast_sound#音效ID
+
  cast_sound#sound effect ID
 
<br />
 
<br />
 
|-
 
|-
 
|chain_eft_to
 
|chain_eft_to
|'''播放一个链式特效'''<br />
+
|'''Play a chain-like special effect'''<br />
  chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式
+
  chain_eft_to#caster unit#target unit#pre-made special effect unit#spreading speed(-1: instantly)#duration# damage expression when targets get hit.
释放目标的参数见 技能 指令目标参数说明
+
For the parameter of caster unit, please refer to the instruction on the Skill Directive Target Parameter.<br />
<br />
 
 
|-
 
|-
 
|taunt
 
|taunt
|'''嘲讽效果,让目标立即攻击释放者'''<br />
+
|'''Taunt and make target attack the caster instantly'''<br />
  taunt#释放者#目标单位
+
  taunt#caster#targe
 
<br />
 
<br />
 
|-
 
|-
 
|use_skill
 
|use_skill
|'''立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)'''<br />
+
|'''ast any single-target skill that does not need channeling''' <br />
  use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数
+
  use_skill#skill ID,skill level (set default by 1)#caster#target#target position parameter
 
<br />
 
<br />
 
|-
 
|-
 
|set_cmd_val
 
|set_cmd_val
|'''操作当前命令行参数<br />'''
+
|'''Operate the parameter of the current command line<br />'''
  set_cmd_val#操作方式#操作值D
+
  set_cmd_val#operation method#operation value D
操作方式:0:设置为值D  1:增加值D 2:减少值D
+
Methods: 0: set to be valued D; 1: increase value D; 2: decrease value D
 
 
  
'''''注意:与其他缓冲后依次执行的指令不同,该指令不会进入执行队列,将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。'''''
+
'''''Please note: different from other directives that are executed procedurally after the buffer, this directive will not enter the execution queue but will instantly come into effect. This is a structure designed for the case where you need to use temporary variables within statements to relay information.'''''
  
 
<br />
 
<br />
 
|-
 
|-
 
|set_dimpos
 
|set_dimpos
|'''设置预设位置参数'''<br />
+
|'''Preset position parameter'''<br />
  set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]
+
  set_dimpos#operation method#operation parameter[#offset parameter(only works when inquiring on the unit’s position)].
操作方式:
+
Methods:
  
*0:我方增援出兵位置 操作参数分别为 x,y,z的偏移
+
*0: Ally reinforcement position. Parameters are the offset of X, Y, and Z.
*1:查询目标单位位置 操作参数为查询指令(见第4小节)
+
*1: Query target unit position query. Parameters are query directives (see Section 4).
*2:查询技能参数位置 操作参数为查询指令(见第2小节位置信息)
+
*2: Query skill parameter position query Parameters are query directives (see Section 2).
  
 
<br />
 
<br />
 
|-
 
|-
 
|play_sk_act
 
|play_sk_act
|'''播放一个已定义的技能动作'''<br />
+
|'''Play a defined skill action'''<br />
  play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)
+
  play_sk_act#target unit#skill action ID#play speed coefficient (set 1 by default)#stop moving or not(set No by default).
 
<br />
 
<br />
 
|-
 
|-
 
|summon_unit
 
|summon_unit
|'''召唤一个单位'''<br />
+
|'''Summon a unit'''<br />
  summon_unit#召唤方式#对象参数[,血量百分比(可选参数,默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数(可选参数,默认为caster)#替换角色技能(可选参数,为空为不替换)#默认策略参数
+
  summon_unit#summoning method#object parameter[,hp percentage (optional parameter, set 100 by default)]#initial position parameter#duration#additional status list#additional special effect parameter#unit faction reference target parameter (optional parameter, caster by default)#replace character skill (optional parameter; emptiness means maintenance of the original skill)#default tactic parameter.
召唤方式:0:对象的镜像  1:通过人物ID召唤  2:通过小兵ID召唤
+
Method: 0: a mirror image of the object; 1: summon by character ID; 2:summon by minion ID.
 +
 
  
对象参数: 当召唤方式为0时表示对象单位(参考本章4节);当召唤方式为1时表示人物模版ID,等级;当召唤方式为2时表示兵种单位ID
+
Object parameter: when the summoning method is 0, the parameter stands for the object unit (see Section 4 of this chapter); when the summoning method is 1, the parameter stands for the character template ID, level; when the summoning method is 2, the parameter stands for minion unit ID.
  
初始位置参数见本章2节
 
  
持续时间小于等于0时表示本次战斗永久持续,大于0时表示持续秒数
+
For the initial position parameter, please see Section 2 of this chapter.
  
附加状态为该单位的附加属性表,如: s_生命,-[&[%s_生命%]*0.5&]|s_攻击,-[&[%s_攻击%]*0.5&]   表示召唤出的单位生命与攻击力均为原单位的一半
 
  
附加特效参数:默认为0 当为1时显示半透明影子效果
+
If the duration is lower than 0, the battle will last forever; when it is higher than 0, it stands for the actual duration time (count by seconds).
  
单位阵营参考目标参数:以指定的目标当前的阵营作为召唤单位当前的阵营,默认为施法者所在的阵营
 
  
替换角色技能参数:格式为普通角色技能表信息,如:  技能1,1|技能2,1|...   如果需要复制角色技能,可使用[%this_skills%][%aim_skills%]来复制施法者或者目标的技能
+
Attached status is the attached attribute list of the unit. E.g. “s_HP,-[&[%s_生命%]*0.5&]|s_Attack,-[&[%s_攻击%]*0.5&]” means that the summoned unit has half of the original unit’s HP and Attack.
  
默认策略参数:格式为:策略类型,策略参数(默认为“0,0“,支持的策略类型参考SET_POLICY指令,但是不支持攻略地点类型3。例如:参数“2,500”,表示在半径500范围内进行跟随)<br />
+
 
 +
Attached special effect parameter: 0: Default; 1: Show half-transparent shadow effect.
 +
 
 +
 
 +
Unit Faction Reference Target Parameter: the current faction of the target is the faction of the summoned units (caster’s faction by default).<br />
 
|-
 
|-
 
|set_unitpos
 
|set_unitpos
|'''强制改变目标单位的当前位置'''<br />
+
|'''Change the current position of a target by force'''<br />
  set_unitpos#操作对象(同4节)#位置信息(同2节)
+
  set_unitpos#operation object (same as Section 4)#position info (same as Section 2.)
 
<br />
 
<br />
 
|-
 
|-
 
|set_active
 
|set_active
|'''设置目标单位的激活状态'''<br />
+
|'''Set activation status of a target'''<br />
  set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否,仅在非激活时有效)
+
  set_active#operation object parameter (same as Section 4)#activate or not (1: Yes; 0: No), hide or not(1: Yes; 0: No; only works when the target is inactivated).
 
<br />
 
<br />
 
|-
 
|-
 
|kill_unit
 
|kill_unit
|'''目标立即被击倒(无视无敌属性)'''<br />
+
|'''Target is knocked down instantly (ignore invincibility)'''<br />
  kill_unit#操作对象参数(同4节)
+
  kill_unit# operation object parameter (same as Section 4).
 
<br />
 
<br />
 
|-
 
|-
 
|down_unit
 
|down_unit
|'''目标主动倒下'''<br />
+
|'''Target falls automatically'''<br />
  down_unit#操作对象参数(同4节)
+
  down_unit# operation object parameter (same as Section 4).
 
<br />
 
<br />
 
|-
 
|-
 
|b_talk
 
|b_talk
|'''在目标头上弹出一个对话气泡'''<br />
+
|'''Chat bubble above the target’s head'''<br />
  b_talk#操作对象#对话内容#持续时间(秒数,可省略)
+
  b_talk#operation object#dialogue content#duration (count by second; neglectable).
 
<br />
 
<br />
 
|-
 
|-
 
|yell
 
|yell
|'''目标呼喊出几个字(多为技能)'''<br />
+
|'''Target shouts out words (mostly skills)'''<br />
  yell#操作对象#喊话内容
+
  yell#operation object#words.
 
<br />
 
<br />
 
|-
 
|-
 
|warning_area
 
|warning_area
|'''播放一个圆形战场警告区域'''<br />
+
|'''Set around battlefield warning area'''<br />
  warning_area#目标位置信息#半径#持续时间()
+
  warning_area#target position info#radius#duration (second).
 
<br />
 
<br />
 
|-
 
|-
 
|timeline
 
|timeline
|'''播放一个TimeLine技能对象'''<br />播放Timeline动作并执行对应的技能指令文件(.txt)
+
|'''TimeLine skill object'''
  timeline#指定的TimeLine ID
+
<br />Play Timeline action and execute the according to skill directive file (.txt)
 +
  timeline#specific TimeLine ID.
 
<br />
 
<br />
 
|-
 
|-
 
|timeline_anim
 
|timeline_anim
|'''播放一个TimeLine技能的动作部分'''<br />只播放Timeline动作,不执行对应的技能指令文件(.txt)
+
|'''TimeLine skill action'''
  timeline_anim#指定的TimeLine ID
+
<br />Play Timeline action but does not execute the according to skill directive file (.txt).
 +
  timeline_anim# specific TimeLine ID.
 
<br />
 
<br />
 
|-
 
|-
 
|block_act
 
|block_act
|'''设置当前施法者的动作锁定状态'''<br />
+
|'''Lock actions of the current caster'''<br />
  block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位:秒 Timeline里编辑时可不指定该时间,以再度调用 block_act#0#0#0的时间差为准)
+
  block_act#status type (shown below)#status can be interrupted or not(0: No; 1: Yes)#lock time(count by second; when editing in Timeline, you can choose not to select this point of time and refer to the time difference of recalling block_act#0#0#0).
可用的锁定状态
+
Available action-locking status:
  
*0:不锁定
+
*0: do not lock action.
*1:锁定攻击及移动
+
*1: lock character’s attack and movement.
*2:仅锁定攻击
+
*2: lock character’s attack only.
  
 
<br />
 
<br />
 
|-
 
|-
 
|camera_shake
 
|camera_shake
|'''镜头抖动'''<br />
+
|'''Camera Shake'''<br />
  camera_shake#时长(秒)#幅度
+
  camera_shake#duration (second)#intensity.
 
<br />
 
<br />
 
|-
 
|-
 
|rotate
 
|rotate
|'''控制角色进行旋转'''<br />
+
|'''Control and rotate a character'''<br />
  rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间()
+
  rotate#target unit parameter#initial rotation degree (compared to the current direction)#total rotation degree (rotate the target in the anti-clockwise way when the degree is below 0)#duration (second).
 
<br />
 
<br />
 
|-
 
|-
 
|replace_eft
 
|replace_eft
|'''查找并用指定的特效体在当前位置替换目标特效体'''<br />
+
|'''Query and use specific special effect unit to replace the target special effect unit at the current position'''<br />
  replace_eft#指定的特效体TAG#匹配数量(≤0时为匹配全部,>0为匹配生成时间最早的有限几个)#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式(同add_eft)#运动参数(可选,同add_eft)#修改伤检对象(可选,为空时为默认)#附带伤害表达式(可选,同add_eft)#目标参数(同add_eft)#特效体TAG(用于replace_eft指令查询)#原特效体创建者的对象参数(可选,用于查询时筛选,默认为所有人)
+
  replace_eft#specific special effect unit TAG#match number (match all when ≤0; match the earliest generated ones when >0)#ID of the special effect unit used to replace(stop the target special effect when this is left empty)#initial position(set empty by default; or use the hit_pos (same as add_eft)expression here by default)#movement parameter(optional; same as add_eft)# change object of damage check (optional; set empty by default)#addtional damage expression(optional; same as add_eft)#target parameter(same as add_eft)#special effect uint TAG (used for replace_eft directive query)#object parameter of the original special effect unit creator (optional; used to filter when querying; every unit by default).
 
<br />
 
<br />
 
|-
 
|-
 
|hitstop
 
|hitstop
|'''角色顿帧'''<br />
+
|'''Character frame pause'''<br />
  hitstop#操作对象#曲线起点降速幅度(倍率)#曲线终点降速幅度(倍率)#时长(秒)
+
  hitstop#operation object#decline speed of the beginning point of the curve (multiplier)# decline speed of the ending point of the curve (multiplier)#time (second)
(结束后角色动作速度恢复为1倍)<br />
+
(Character’s action speed becomes normal after the pause of the frame).<br />
 
|-
 
|-
 
|global_hitstop
 
|global_hitstop
|'''全局顿帧'''<br />
+
|'''Global frame pause'''<br />
  global_hitstop#曲线起点降速幅度(倍率)#曲线终点降速幅度(倍率)#时长(秒)
+
  global_hitstop# decline speed of the beginning point of the curve (multiplier)# decline speed of the ending point of the curve (multiplier)#time (second)
(结束后全局速度恢复为1倍)
+
(Running speed of the world becomes normal after the pause of the frame).<br />
 
 
<br />
 
 
|-
 
|-
 
|set_skill_cd
 
|set_skill_cd
|'''更改施法者的指定技能CD'''<br />
+
|'''Change the cooldown of a specific skill of a caster'''<br />
  set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能,多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)
+
  set_skill_cd#skill ID list (can be left empty; fill in All to refer to all skills of the unit; use “|” to separate multiple skill IDs#operation method (0: Decrease; 1: add a new value)#operation value (second).
 
<br />
 
<br />
 
|-
 
|-
 
|get_items
 
|get_items
|'''战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)'''<br />
+
|'''Gain items or resources in battles instantly (items obtained can be used by the main character only)'''<br />
  get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数
+
  get_items#item list (format of item list is the same as the GETITEMS directive in the scenario directives)# target parameter of the object who gains the items.
 
<br />
 
<br />
 
|-
 
|-
 
|set_unit_intvar
 
|set_unit_intvar
|'''为此单位设置一个自定义的整形变量值'''<br />
+
|'''Set a custom int variable for the unit'''<br />
  set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选,默认为施法者)
+
  set_unit_intvar#variable ID#operation method(0:±change; 1: add a new value)#operation value#target parameter of the operation object (optional; caster by default).
 
<br />
 
<br />
 
|-
 
|-
 
|call_battle_event
 
|call_battle_event
|'''执行一个指定的战斗事件'''<br />
+
|'''Execute a specific battle event'''<br />
  call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)
+
  call_battle_event#event ID#target parameter of the executor (optional; the default value of THIS object in the event script).
 
<br />
 
<br />
 
|-
 
|-
 
|change_skill
 
|change_skill
|'''替换施法者单位的当前技能列表'''<br />
+
|'''Replace the current skill list of the caster'''
  change_skill#技能列表信息
+
<br />
 +
  change_skill#skill list info.
 
<br />
 
<br />
 
|-
 
|-
 
|revert_skill
 
|revert_skill
|'''还原施法者的当前技能列表'''<br />
+
|'''Revert the current skill list of the caster to the original one'''<br />
 
  revert_skill#1
 
  revert_skill#1
 
<br />
 
<br />
 
|-
 
|-
 
|change_dungeon_skill
 
|change_dungeon_skill
|'''替换施法者的地城技能'''<br />
+
|'''Replace the dungeon skill of the caster'''<br />
  change_dungeon_skill#技能ID,等级
+
  change_dungeon_skill#skill ID, level.
 
<br />
 
<br />
 
|-
 
|-
 
|revert_dungeon_skill
 
|revert_dungeon_skill
|'''还原施法者的地城技能'''<br />
+
|'''Revert the dungeon skill of the caster to the original one'''<br />
 
  revert_dungeon_skill#1
 
  revert_dungeon_skill#1
 
<br />
 
<br />
 
|-
 
|-
 
|replace_tag_skill
 
|replace_tag_skill
|'''将一个单位的指定技能暂时替换为其他技能'''<br />
+
|'''Replace a specific skill of a unit to another skill temporarily'''<br />
  replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久,>0为持续指定秒数)#对象单位目标参数
+
  replace_tag_skill#original skill ID#new skill ID, level (left empty if you want to revert to the original skill)#substitution duration (permanent when ≤0; last for seconds when >0)#target parameter of the object unit.
 
<br />
 
<br />
 
|-
 
|-
 
|change_mp
 
|change_mp
|'''改变一个单位当前的MP值'''<br />
+
|'''Change the current MP value of a unit'''<br />
  change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0:否 1:是)#播放受击特效ID(可选,为空不播放)
+
  change_mp#target parameter of the object unit#new MP value (can be an expression)#show number special effect(0: No; 1: Yes)#ID of the special effect shown when the unit is hit(optional; do not show the effect when this is left empty).
 
<br />
 
<br />
 
|-
 
|-
第1,104行: 第1,103行:
 
<br />
 
<br />
  
===战斗中的特殊对象ID===
+
===Special Object IDs in Battles===
战斗指令中经常需要进行一些目标单位的查询,通常是通过角色ID来查找,但是可以通过以下内置ID返回特定的查询对象:
+
We always query some target units with battle directives through character IDs. However, we can also return specific query objects with the following built-in IDs:
 
{| class="wikitable"
 
{| class="wikitable"
 
|+
 
|+
!特殊内置ID
+
|'''Special Built-in ID'''
!说明
+
|'''Explanation'''
 
|-
 
|-
 
|PLAYER
 
|PLAYER
|玩家单位
+
|Player.
 
|-
 
|-
 
|GM_A
 
|GM_A
|A方的固定内置单位(用于实现一些无特定施法者的技能指令)
+
|Fixed built-in units of A (used to realize some skill directives when there is no specific caster).
 
|-
 
|-
 
|GM_B
 
|GM_B
|B方的固定内置单位(用于实现一些无特定施法者的技能指令)
+
|Fixed built-in units of B (used to realize some skill directives when there is no specific caster).
 
|-
 
|-
 
|THIS
 
|THIS
|当前执行指令单位自身(一般用于单位挂载脚本中)
+
|The current executor of the directive (usually in the unit-mounting script).
 
|-
 
|-
 
|RND_ENEMY_UNIT
 
|RND_ENEMY_UNIT
|随机的敌方小兵单位(非当前PLAYER一方)
+
|Random enemy minions (not on the current player’s side).
 
|-
 
|-
 
|RND_FRIEND_UNIT
 
|RND_FRIEND_UNIT
|随机的友方小兵单位(非当前PLAYER一方)
+
|Random ally minions (not on the current player’s side).
 
|-
 
|-
 
|EMITTER={EMITER_ID}
 
|EMITTER={EMITER_ID}
|指定ID为EMITER_ID的发射器单位
+
|Emitter unit whose ID is EMITER_ID.
 
|-
 
|-
 
|
 
|
第1,136行: 第1,135行:
 
|}
 
|}
 
<br />
 
<br />
===单位对象附加触发脚本编辑说明===
+
===Editing of Trigger Scripts Attached to Unit Object===
通过在地城单位对象中的触发命令中定义,可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为:
+
We can attach several trigger scripts to the unit by defining the trigger command on a dungeon unit object. . Characters in the character list can also have trigger scripts if we assign the attached_script field to be a script event ID in TAG.
  [CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)
+
  [CMD_BEGIN]#trigger type 1#trigger condition (optional)#trigger parameter (optional)
  命令行1
+
  CommanCommand-line 1
  命令行2
+
  Command-line 2
 
  ...
 
  ...
  命令行N
+
  Command line N
 
  [CMD_END]
 
  [CMD_END]
  [CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)
+
  [CMD_BEGIN]# trigger type 1#trigger condition (optional)#trigger parameter (optional)
  命令行1
+
  Command line 1
  命令行2
+
  Command line 2
 
  ...
 
  ...
  命令行N
+
  Command line N
 
  [CMD_END]
 
  [CMD_END]
 
  ...
 
  ...
 
  
 
每个对象可挂载多个地城对象触发器,当前已支持的触发类型有:
 
每个对象可挂载多个地城对象触发器,当前已支持的触发类型有:

2020年9月22日 (二) 01:13的版本

Please pay special attention: when editing scripts, you must use half-size punctuations!!! Meanwhile, in scenarios and all configuration tables, please avoid using strings that contain special characters. Otherwise, there might be errors when scripts are injected.

Script Directives in Battles

We use an independent event operating system to realize specific scenario events or complex battle mechanics in battles. The way this system function resembles that of the scenario executor in common scenario events. The difference is that the system will not pause the game by force unless players call PAUSE/RESUME directives manually.

You can open the Console in battles and use “bs@” followed by script directives to debug. For example, you can enter “bs@KILL_ALL*1” to eliminate all enemies.

List of Script Directives in Battles

Directive Instruction
(null) Character Text Box

Function: show a paragraph with a character painting and typewriter effect.

Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N

NOTHING Empty Directive

Function: an empty directive. Nothing happens.

Format: NOTHING*1.

EVENT Jump To

Function: jump to and execute another scenario event ID.

Format: EVENT*EVENT ID#ID of the user who runs the client (0 means executing everything)#index value of the subcommand line of the target event (starting from 0.)

SELECT Dialogue Option

Function: based on the text box, after the dialogue, is printed, an option box pops up, let the player choose an option, and returns the result (the according [%result_code%] of the resulting directive in the event.)

Format: SELECT*character ID#dialogue content#1:option 1*condition group 1;2:option 2*condition group 2;…:N: option N*condition group N (only when a set of conditions are met or the group is empty will the option shows up; otherwise, it will be hidden.)

SCREEN Fullscreen Subtitle

Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)

Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).

SHAKE_SCREEN Screen Shake

Function: execute a screen shake effect.

Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)

DELAY Delay

Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)

Format: DELAY*waiting time (second)

PAUSE Pause Current Game

Function: pause the current battle scene.

Format: PAUSE*.

RESUME Continue Current Game

Function: continue the current battle scene.

Format: RESUME*.

SET_WEATHER Set Weather

Function: set and replace the current weather in the game.

Format: SET_WEATHER*weather effect directive.

Please refer to Format of Weather Effect Info.

BB Character Icon Pop-up

Function: a character text box pops up at the specific position, without disturbing the current game. The player does not need to perform actions. The text box will disappear in a while.

Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original current time of the dialogue, which is measured by the length of text).

B_TALK Unit Chat Bubble

Function: units on the battlefield can have chat bubbles over their heads, which show their words.

Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.

ENEMY_REINF Enemy Reinforcement

Function: all enemies send reinforcement according to a specific unit list.

Format: ENEMY_REINF*minion list.

Please refer to the format of Minion List.

FRIEND_REINF Ally Reinforcement

Function: all allies send reinforcement according to a specific unit configuration list.

Format: FRIEND _REINF*minion list

Please refer to the format of Minion List.

CMD_RETREAT Retreat Order

Function: order all allies to retreat.

Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).

BATTLE_OVER End Battle by Force

Function: end the current battle instantly.

Format: BATTLE_OVER*code (0: Victory; 1: Loss).

KILL_ALL Eliminate All Targets

Function: deals massive damage to all units of one side to kill them within a second.

Format: KILL_ALL*0 (0: Ally; 1: Enemy).

UNDEAD_PLAYER Player Will Not Die

Function: buff the character controlled by the player so that it will not die.

Format: UNDEAD_PLAYER*1.

UNDEAD_ALL All Units Will Not Die

Function: buff all units on the battlefield so that they will not die.

Format: UNDEAD_ALL*0 (0: Ally; 1: All units).

EXEC_SKILL Unit Uses Ability

Function: command-specific units on the battlefield to use skills.

Format: EXEC_SKILL*caster ID#skill ID, skill level (set 1 by default by)#x, y of target’s coordinate#x, y of the coordinate parameter 1.

Caster ID is the identification ID of the target and can have the following unique values:

· PLAYER: player GM_A: the pre-set object of the attacking side GM_B: the pre-set object of the defending side.

· THIS: directive giver (usually goes back to the emitter itself).

· EMITTER=ID: a dungeon emitter of a specific ID, which can be “THIS” to represent the current dungeon emitter.

· RND_FRIEND_UNIT: random ally units RND_ENEMY_UNIT: random enemy units.

When a caster is a pre-set object, coordinate parameter 1 represents its initial coordinate.

DUNGEON_SPAWN Refresh Dungeon Unit

Function: refresh units that have been defined on the battlefield.

Format: DUNGEON_SPAWN*control ID#value of ignoring status (unit will be refreshed even they are defeated; 0: Yes by default; 1: No).

SET_DUNGEON_TS Set Dungeon Emitter Status

Function: set the status of a specific emitter in a dungeon.

Format: SET_DUNGEON_TS*control ID#status (0: Enabled; -1: Disabled).

DUNGEON_OVER End Dungeon Fight

Function: end this dungeon fight and execute relative actions.

Format: DUNGEON_OVER*result value (0: exit; 1: victory; 2: loss).

SET_AREA Set Obstacle Area Status

Function: enable or disable a specific obstacle area.

Format: SET_AREA*control ID#status (0: Enabled; -1: Disabled).

SET_WIDGET Set Decoration Status

Function: enable or disable a specific map decoration.

Format: SET_WIDGET*control ID#status (0: Normal; -1: Hidden).

SET_TP Set Dungeon Teleporter Status

Function: set the status of a dungeon teleporter and its relevant model.

Format:  SET_TP*control ID#status (0: Enabled; -1: Disabled).

SET_EMITTER Set Emitter Status

Function: set the status of a specific emitter.

Format: SET_EMITTER*control ID#status (0: Enabled; -1: Disabled).

SET_PLAYER_MODEL Set Player Model

Function: set the model of the character controlled by the player.

Format: SET_PLAYER_MODE*unit model description info.

SET_PLAYER_SKILL Set Player’s Current Skills

Function: set the current skills of the player’s character.

Format: SET_PLAYER_SKILL*skill ID 1, level| skill ID 1, level| …| skill ID N, level (4 skills at most).

SKILL_CMD Execute Skill Directive

Function: execute skill directives.

Format: SKILL_CMD*content of the skill directive.

SET_DG_INTVAR Set Custom Int Field in Battles

Function: set a custom int field in battles

Format: SET_DG_INTVAR*field ID#set value#mode setting (1: Addition Mode, adds set value based on the original value; other numbers: Direct Mode)#monitor info (optional; you can view the variable info on the monitor panel).

SET_CAMERA Set Camera Mode

Function: set the camera mode in battles.

Format: SET_CAMERA*camera mode#parameter.


Currently, available camera modes and meanings of the parameters are:

· 0: follows the player’s character. No parameter (default)..

· 1: follows a specific target. The parameter is the object ID of the target unit.

· 2: coordinate on the battlefield. The parameter is X and Y.

ATTACK Compulsory Attack

Function: command a unit to attack another unit.

Format: ATTACK*attacker object ID#target object ID.

CMD_QUEUE Unit Control Directive Sequence

Function: give an array of directives to one unit. The unit will execute the directives according to their sequence.

Format: CMD_QUEUE*target object ID#event IDs in the commanding script (fill the content of command sequence into this event to execute).


The command sequence (the time parameter stands for the time before the next directive is executed) can be:

Directive type 1 [,time parameter]:directive parameter.

Directive type 2 [,time parameter]:directive parameter.

...

Currently, available sequence directive types are:

· skill_cmd: execute skill directives: the parameter is a line of skill directives.

· use_skill: use abilities: ability ID, ability level#target unit object parameter#target position parameter.

· event: execute battle events: event ID in battles#execution condition (optional).

· move_to: move to the target position: target coordinate parameter#speed parameter (in this directive, time parameter is invalidated. Only when the target has reached the current position will the next directive be executed).

· set_dir: set unit’s direction: direction is the parameter.

· keep_act: keep performing one action: action ID (default action when empty)#loop times (loop endlessly when <=0; 1 by default)#time per action (default action when <=0; 0 by default).

Please note: in this directive, the time parameter is invalidated before the action loop is over. When in an endless loop, you need to give a new directive to the unit to end the old action.

When the coordinate has 2 parameters, the directive shows the X and Y of the target on the map; when there are 3 parameters, the third stands for the type of the position (0: map coordinate; 1: battlefield coordinate).

SET_POLICY Set Unit Battle Tactic

Function: set the current battle tactic for a unit.

Format: SET_POLICY*target object ID#main tactic type#parameter 1#position parameter#unit filter tag (validated when the target object ID is empty)#target ID (used for target-oriented tactic like Follow).


Currently, available main tactic types are:

· 0: Attack (the parameter is the radius of awakening, which becomes endless long when the parameter is lower than 0).

· 1: Defend (the parameter is the radius of defending).

· 2: Follow (the parameter is the radius of following).

· 3: Occupy.

SET_UNIT_TIMER Set Unit Timer

Function: set a timer on a unit, which will trigger and complete a specific event.

Format: SET_UNIT_TIMER*target object ID#timer ID#time parameter (disabled when <=0; a timer only works when the unit has an “on timer” trigger event).

FINISH_CAST Use Channeling Skill Instantly

Function: stop channeling and use the skill instantly (works only when the target is channeling their skill.)

Field 1, value 1|Field 2, value 2|…

REPLACE_SKILLS Replace Unit Skill

Function: replace the current skill of a unit.

Format: REPLACE_SKILLS*target object ID#skill ID 1, level| skill ID 2, level|…|skill ID N, level (4 skills at most; a skill is removed when its level is 0.)

REPLACE_DGSKILL Replace Unit Dungeon Skill

Function: replace the current dungeon skill of a unit.

Format: REPLACE_DGSKILL*target object ID#dungeon skill ID, level (empty skill ID or null means the dungeon skill is disabled).

BATTLE_MSG Battlefield Message

Function: broadcast a battlefield message.

Format: BATTLE_MSG*message type (0: Normal; 1: Warning).

SET_BATTLE_CHECKER Set Battle Checker Status

Function: set the status of Battle Checker.

Format: SET_BATTLE_CHECKER*status (0: Disabled; 1: Enabled).

SHOW_BATTLEOVER_BTN Show End-Battle Button

Function: show the button for the player to end battles manually.

Format: SHOW_BATTLEOVER_BTN*1.

SHOW_DEBUG_INFO Show Debug Info

Function: show debug info.

Format: SHOW_DEBUG_INFO*status value (0: Disabled; 1: Show buff info of player’s character).

OPENSTORE Open Trade Panel

Function: open the trade panel between the player’s character and a specific merchant.

Format: OPENSTORE*merchant ID.

RESET_STORE Refresh Merchant’s Items

Function: refresh a merchant’s item based on the configuration.

Format: RESET_STORE*merchant ID.

SET_TIMER Set Global Timer

Function: set a timer to delay the execution of some scripts.

Format: SET_TIMER*timer ID#time parameter (second; function is disabled when the parameter <= 0)#ID of event that will be executed when the timing ends#monitor field info (optional; allows you to view the remaining time on the variable monitor UI).

AREA_SPAWN Generate Unit in Area

Function: generate units in batch in a specific area.

Format: AREA_SPAWN*target area control ID#hero list#unit list (same format as the ENEMY_REINF directive)#faction index#default tactic (format: tactic code:tactic parameter; same as the SET_POLICY directive)#refreshed unit tag (optional)#extra unit attribute list (optional).

GETITEMS Player Gets Items or Resources

Function: player’s character gains a list of items (please note: money, EXP, and resources in the game can all be gained this way, as long as you have the correct mapping IDs).

Format: GETITEMS*item list info.

REMOVE_ITEMS Remove Items or Resources

Function: remove a certain number of items from the player’s inventory.

Format: REMOVE_ITEMS*item list.

LOOT Execute Drop Check

Function: execute a check according to the loot list (please refer to the format of Item Dropping Info).

Format: LOOT*Loot list.

ADD_EXP Hero Gains EXP

Function: a specific hero gains EXP.

Format: ADD_EXP*EXP#target hero ID(optional; player’s character by default).

SETSKILL Manage Hero Skill

Function: manage the skills of a hero. You can add, replace, or remove the skills of the hero.

Format: SETSKILL*Character ID (optional; player’s character by default)#skill list that needs to be added (format: skill ID 1, level| skill ID 2, level|…)#skill list that needs to be removed (optional; use “|” to separate skills).

CALL_LUAFUNC Execute LUA Function

Function: execute specific functions in the currently loaded LUA script.

Format: CALL_LUAFUNC*function name in the script.

ADD_INTER_OBJECT Add Interactive Object in Battles

Function: add an interactive object on the current battlefield.

Format: ADD_INTER_OBJECT*Interactive Instruction Info#location coordinate#normal model ID (defined in the D World Map Unit Model Table)#visible but noninteractive model ID#particle effect info (visible under normal status; format file name of particle effect: path: Asset\BuildSource\map_res\Particles\), offset X, offset Y)#initial status (0: Normal; 1: Visible but non-interactive; 2: Hidden)#control ID (used to control navigation)#built-in item info list (can be empty)#IDs of events triggered during interaction (optional)#behaviours after the interaction (optional; set default by 0). (0: remove from the scene;1: hide “waiting to auto-refresh” or refresh manually; 2: visible but non-interactive, waiting to be refreshed; 3: do not perform the action and handle this in the script)#auto refreshment time (optional; validated only when this parameter is not 0; set default by 0; manually refresh when >= 0)# event ID after refreshment (the ID of the event-triggered after refreshment).

REMOVE_INTER_OBJECT Remove Interactive Object in Battles

Function: remove an interactive object based on its ID.

Format: REMOVE_INTER_OBJECT#control ID (“THIS” can be used to refer to the object itself in an interactive script event).

SET_INTER_OBJECT Change Status of Interactive Object

Function: change the status of an interactive object based on its ID.

Format: SET_INTER_OBJECT#control ID (“THIS” can be used to refer to the object itself in an interactive script event)#new status value (0: Normal; 1: Visible but non-interactive 2: Hidden).

TELEPORT Teleport to Other Instance Maps

Function: teleport all allies to the target instance map.

Format: TELEPORT*map ID (needs to be defined in “F副本地图信息表”); X coordinate, Y coordinate.

REMOTE_EVENT Remote Execution Request

Function: Send a request to all clients to execute an event.

Format: REMOTE_EVENT*event ID.



Value Query in Battles

Query Directive Explanation
[%result_code%] Results of different event scripts in battles (e.g., the result of an option box).
[%bs_time%] How long the current battle has been going on (integer).
[%rnd:A,B%] Return a different random number each time (A<= this number <= B.)
[%last_rnd%] Return the result of the last [%rnd:A,B%] query.
[%const_rnd%] Return a random number (0~100)that stays the same during the execution period.
[%last_rnd_pos_x%] Return the X value of the last random position.
[%last_rnd_pos_y%] Return the Y value of the last random position.
[%last_rnd_pos%] Return the coordinate of the last random position.
[%last_skill%] The ID of the last skill used by the current queried source object.
[%this_type%] Type of the executor of the current directive (0: Hero; 1: Minion).
[%aim_type%] Type of the current queried target object (0: Hero; 1: Minion).
[%this_level%] Level of the executor of the current directive.
[%aim_level%] Level of the current queried target object.
[%this_hp_pct%] HP percentage of the executor of the current directive.
[%aim_hp_pct%] HP percentage of the current queried target object.
[%this_mp_pct%] MP percentage of the executor of the current directive.
[%aim_mp_pct%] MP percentage of the current queried target object.
[%friends_num%] The number of ally units left.
[%enemy_num%] The number of enemy units left.
[%hit_enemy%] Check if the current hit target is an enemy of the caster (1: Enemy; 0: Not Enemy.)
[%battle_res%] Current battle result.
[%skill_lv:SKILL_ID%] Level of a specific skill ID of the current source object; returns 0 if the level is 0.
[%base_atk%] A basic physical attack based on the current skill level.
[%base_magic_atk%] A basic magic attack based on the current skill level.
[%standard_magic_atk%] An overall magic attack based on the current skill level.
[%this_buff:BUFF_ID%] Number of stacks of source object’s current BUFF_ID.
[%aim_buff:BUFF_ID%] The current number of stacks of target object’s specific BUFF_ID.
[%stat:STAT_FIELD%] The current value of a specific field attribute of a source object.
[%aim_stat:STAT_FIELD%] The current value of a specific field attribute of a target object.
[%this_weapon%] Weapon type of the queried source object.
[%aim_weapon%] Weapon type of the queried target object.
[%charge_val%] Value of charging of this damage(0~100).
[%cmd_argval%] The parameter of the current command line.
[%cmd_argval_next%] Return the parameter of the current command line, and the parameter increases by 1 instantly.
[%rpt_index%] INDEX value of the loop where the current command line is located.
[%find_tag:TAGINFO%] Execute target unit searching once. TAGINFO is the target unit info (format: please refer to the instruction on Skill Object Format). When a proper target is found, returns 1, otherwise, 0.
[%add_find_tag:TAGINFO%] Add the target unit to the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.
[%rm_find_tag:TAGINFO%] Remove the target unit from the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.
[%reset_find_list%] Reset the current search list. It always returns 1.
[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%] Randomly enumerate values, and return the RES value of one of the enumerated ones according to their probability distribution.

E.g.,

[%rnd_enum:25,1:40,2:35,3%] means that is a 25% chance to return “1”, 40% for “2”, and 35% for “3”.

[%dg_sp_state:ID%] Return the current status of the refreshed units whose Control ID is the ID field in the directive on the current battlefield (0:Not refreshed; 1: Refreshed; -1: Defeated).
[%dg_unitnum:TAG%] Return the number of refreshed units that have not been defeated and have the “TAG” tag on the current battlefield.
[%fd_sum%] Value of the defeated ally counter of the current source object.
[%ed_sum%] Value of the defeated enemy counter of the current source object.
[%fd_mod:MOD_VAL%] Value of defeated-ally counter of source object divided by MOD_VAL, and take the remainder.
[%ed_mod:MOD_VAL%] Value of defeated enemy -counter of source object divided by MOD_VAL, and take the remainder.
[%dg_int_val:KEY%] Return the value in a custom dungeon int field of a specific KEY.
[%emitter_pos:ID,MIN-MAX%] Return the emitter’s central position of a specific ID and a random position between its centre MIN and MAX. Record them in last_rnd_pos.
[%unit_timer:UNIT_ID,TIMER_ID%] Return the remaining time of the timer (whose ID is “TIMER_ID”) on a unit with a specific UNIT_ID.
[%this_intvar:ID%] Return the custom int value of the current directive executor (skill directive set_unit_intvar setting).
[%aim_intvar:ID%] Return the custom int value of the current queried target object (skill directive set_unit_intvar setting).
[%defeat_hit%] Check if the current directive is executed in a kill-unit directive and if the target unit has been killed (0: No; 1: Yes). Please note this only works in the hit directive.
[%eft_count:TAG%] Number of special effect units with a specific TAG

Please note: this only counts the special effect units created by the caster.

[%this_id%] The unit ID of the current queried object.
[%aim_id%] The unit ID of the current queried target object.
[%hit_dmg_val%] Actual damage or healing amount to a target unit in the current casting.

Please: this only works in the hit directive.

[%stealth_hit%] Check if the current skill or damage comes into effect when the caster is invisible (0: No; 1: Yes).
[%hit_count%] Times of the current skill is actually hitting units.
Following directives need client higher than 0.7.4.2 to be executed.
[%this_skills%] Return the skill list of the current source object.
[%aim_skills%] Return the skill list of the current target object.
Following directives need client higher than 0.8.0.1 to be executed
[%this_userid%] Return the client ID of the current source object.
[%aim_userid%] Return the client ID of the current target object.
[%player_money%] Player’s money in the game.
[%item_number:物品key%] Return the number of a specific item or resource in the player’s bag.

Format of Damage Expression

All kinds of damages from attacks, skills, special effects, and directives towards units are settled through a unified port. The primary parameter injected into the port is a data structure, which can be decided by damage expressions in various scripts. The common format of damage expressions is:

key1:value1;key2:value2;...;keyN:valueN

Damage expressions can be put into some data lists (e.g., the status value of the BUFF list), or into a value calculation expression (the [&expression&] format);

Currently supported damage expression key-value is:

  • type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen
  • dmg: physical damage value. The value is the damage expression.
  • t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.
  • hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000.
  • blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.
  • cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.
  • act: play unit action when they are hit. 0: No; 1: Yes
  • eft ID: special effect ID (when the unit is hit).
  • trig: trigger damage effect (e.g., damage reflection).
  • attack_type: decide the type of weapon attacks that caused the damage.
  • buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.


Damage expressions only support standard mathematic expressions, containing the following math symbols: +-*/^%(). Certain pre-defined fields can be used, and all pre-defined fields should follow the format of [%cmd%]. Currently, we support the following pre-defined fields:

  • [%rnd:min_val,max_val%]: a random integer (min_val<= this integer<= max_val).
  • [%field%]: field stands for a random value defined in a character attribute field.


Skill Directive Editing

Skill directives are the essential elements used to realize different skill effects in battles. On the battlefield, when units cast abilities, their skill directives will be put into an execution queue, carried out one by one according to their execution environment.

In the skill configuration table, skill directive strings are separated with ”\n” , a line breaker. Every directive consists of: delay time*[conditional expression(optional)]#directive content. Please refer to the following format:

0*conditional expression 1#skill directive 1
0.2#skill directive 2
……

When the conditional expression is not empty, the execution of results will be judged accordingly.

In conditional statements, you can use built-in directives to realize some special effects, such as repetition.

*REPEAT_START:9
Statement 1
Statement 1
[@0.01*[%rpt_index%]@]#skill directive
...
Statement N
*REPEAT_END

The lines above repeat all lines between REPEAT_START and REPEAT_END for 9 times, during which you can use [%rpt_index%] to see how many times the lines have been repeated.

*SELECT_UNITS:[目标筛选条件表达式](注意,次数查询cast_info中的target为当前单位)
语句1
语句2
...
语句N
*SELECT_END

The lines above contain all command lines between SELECT_UNITS and SELECT_END, which will be used towards all objects that meet specific conditional expressions after “SELECT_UNITS:” make these objects “caster objects”.

The first two digits after the decimal point of the result of statements embedded in [@...@] will be maintained. This kind of query only works in skill directives.

Currently, supported skill directives are:

Skill Directive Instruction
stop_act Stop all current skill casting actions instantly and act according to previous directives.


stop_act#1
add_eft Add a pre-defined special effect unit onto the battlefield.


add_eft#special effect unit ID#intial position#movement parameter#change object of damage check (optional; set empty by default)#addtional damage expression (optional; calculate according to the damage expression defined in the special effect table when this is empty; format: please refer to Section 6.4)#target parameter (see Section 7.4)#special effect unit TAG (used for a query on replace_eft directive.)

Initial position format: position type, offset X, offset Y, offset Z (the offset value is the offset from the initial direction.)


Supported position types:

  • cast_pos: the preset position of skill casting.
  • tag_pos: the target position or target coordinate of skills.
  • hit_pos: the position of units hit by skills.
  • unit_pos: the position of the skilled caster.
  • start_pos: the beginning position of the caster when they cast skills.  
  • rnd_pos: any position around the skilled caster.
  • dim_pos: the preset position defined by the set_dimpos directive.
  • reinf_pos: the position of reinforcement of the skill caster’s side.
  • emitter_pos=EMITTER_ID: the position of emitter whose ID is EMITTER_ID.
  • unit_round=DIR:LEN: the position that is LEN away from the skilled caster, with an offset degree of DIR from the positive direction.
  • rnd_round=RAD[-MIN_RAD]: a random position within a radius of RAD around the skilled caster (MIN_RAD stands for the minimum distance between this random position and the  centre, set default by 0).
  • eft_pos=TAG: return the special effect position of the first specific special effect unit TAG. If there is no result, return to the current position of the caster. Note: this only supports query on special effect units created by the caster.
  • ……


Supported movement types are:

  • 0: No movement and no parameter.
  • 1: move to the target position of a skill. Offset X, offset Y, and offset Z.
  • 2: move to the target position of a skill. No parameter (when the target parameter is not empty, use the selected target of the parameter. Otherwise, cast the skill to its original target unit).
  • 3: move in a specific direction. Offset degree, distance (no longer than the width of the battlefield).
  • 4: move back and forth in a specific direction. Offset degree, distance (no longer than the width of the battlefield).
  • 5: follow a target. Following type (0: Fixed Relative Position; 1: Emitter’s Position), offset X, offset Y, offset Z, duration (-1: Eternal).
  • 6: move to dim_pos. Offset X, offset Y, offset Z.
dmg_check Damage check


dmg_check#check type#damage expression#target object parameter#check parameter list (use “,” to separate)# filter repetitive check object(optional; set disabled by default.)

Supported check types are:

  • 0: single check (see next section when the target unit is the target object parameter; emptiness means the target of skills).
  • 1: radius check. The target object parameter is the target type (0: Enemy; 1: Ally; 2: Both Sides). Parameter 1 in the parameter list stands for the reference position type (see the position type of the add_eft directive). Parameter 2~5 stands for the X, Y, Z, and radius in the offset coordinate.
  • 2: polygon check. The target object parameter and parameter 1 are the same as the second type. Parameter 3 is the number of vertices of the polygon; parameter 4 and the following parameters are the coordinate info of the polygon whose reference point coordinate is (0,0).


add_buff Grant a BUFF on a target
add_buff#buff ID#BUFF target parameter#duration (same as the default BUFF duration if designed specifically)#number of stacks(set default by 1)#uppder limit of stacks (same as the value in the configuration table by default; comes into effect when the number is bigger than 0.)


Currently, supported built-in target parameters are:

  • caster: skill caster.
  • target: target unit (unit of target-oriented skills or unit hit by skills.)
  • roleid,ROLEID: search for a target object whose unit-bound ID is ROLEID.
  • buffgiver,BUFFID: search for a buff giver who gave the buff (whose ID is BUFFID field) to the current caster.
  • find_tag_res: search for a result of a specific target (must execute [%find_tag:TAGINFO%] before calling.)
  • tag_next_fu,distance D:the next ally unit whose distance from the current hit target is shorter than distance D.
  • caster_next_fu,distance D: the next ally unit whose distance from the current caster is shorter than distance D.
  • caster_next_eu,distance D: the next enemy unit whose distance from the current caster is shorter than distance D.


remove_buff Remove a BUFF from a target
remove_buff#remove target (same as above)#removal type#parameter 1, parameter 2,parameter 3...

Currently, supported removal methods are:

  • 0· : remove all.
  • 1: remove a specific buff. Parameter 1 is the BUFF ID; parameter 2 is the number of removed stacks (-1: remove all by default).
  • 2: remove a negative buff (debuff). Parameter 1 is the number of removed buffs (-1: remove all by default), parameter 2 is the subtype of buffs (-1: unlimited by default).
  • 3: remove a buff. Parameter 1 is the number of removed buffs (-1: remove all by default), parameter 2 is the subtype of buffs (-1: unlimited by default).


dart_move Dash
dart_move#action ID#movement type#speed parameter#collision quallity#bound special effect#skill to cast after the movement, skill level(set default by 1)[can be empty], time offset(count by second; if a skill is cast before the movement ends, the time offset >= 0) [can be empty]#operation object (optional; caster by default)#correct target position (optional; see Section 2 for the format)#compulsory or not(set 0 by default; 1: compulsory move).

Movement types are:

  • 0: uniform motion.
  • 1: jump.
  • 2: knockback.
  • 3: knock up (when the movement type is knock-up, the speed parameter stands for the air time of the hit unit).

The speed parameter is the horizontal speed of the characters’ movement (when the speed is lower than0, the character flash to the target position).

Collision quality stands for the quality of a rigid body under uniform motion. 0 means ignoring the collision (when the movement type is jump, the parameter stands for the height of jumping)—as we do not use a physical engine now, the collision quality is of no use now. However, we still need to fill in the parameter.

“Bound Special Effect” is the special effect ID attached to the unit when they are moving.

“Skill to cast after movement” is the ID of the skill that will be cast right after the movement.


stop_dartmove Stop dashing
stop_dartmove#1


explode Physical explosion at the target position
explode#initial position (see the instruction on Skill Position Parameter Format)#explosion radius#intensity parameter


add_force Physical explosion at the target position
add_force#力度参数#目标单位(可省略,默认target)


play_sound Knock back the target once
play_sound#sound effect ID#sound effect position (see explanation in Section 1)


unit_sound_dic Play a sound effect from the SFX Dictionary according to the model configuration.
unit_sound_dic#SFX Dictionary KEY#unit target parameter


cast_sound Play a specific sound effect at a caster’s position
cast_sound#sound effect ID


chain_eft_to Play a chain-like special effect
chain_eft_to#caster unit#target unit#pre-made special effect unit#spreading speed(-1: instantly)#duration# damage expression when targets get hit.

For the parameter of caster unit, please refer to the instruction on the Skill Directive Target Parameter.

taunt Taunt and make target attack the caster instantly
taunt#caster#targe


use_skill ast any single-target skill that does not need channeling
use_skill#skill ID,skill level (set default by 1)#caster#target#target position parameter


set_cmd_val Operate the parameter of the current command line
set_cmd_val#operation method#operation value D

Methods: 0: set to be valued D; 1: increase value D; 2: decrease value D

Please note: different from other directives that are executed procedurally after the buffer, this directive will not enter the execution queue but will instantly come into effect. This is a structure designed for the case where you need to use temporary variables within statements to relay information.


set_dimpos Preset position parameter
set_dimpos#operation method#operation parameter[#offset parameter(only works when inquiring on the unit’s position)].

Methods:

  • 0: Ally reinforcement position. Parameters are the offset of X, Y, and Z.
  • 1: Query target unit position query. Parameters are query directives (see Section 4).
  • 2: Query skill parameter position query Parameters are query directives (see Section 2).


play_sk_act Play a defined skill action
play_sk_act#target unit#skill action ID#play speed coefficient (set 1 by default)#stop moving or not(set No by default).


summon_unit Summon a unit
summon_unit#summoning method#object parameter[,hp percentage (optional parameter, set 100 by default)]#initial position parameter#duration#additional status list#additional special effect parameter#unit faction reference target parameter (optional parameter, caster by default)#replace character skill (optional parameter; emptiness means maintenance of the original skill)#default tactic parameter.

Method: 0: a mirror image of the object; 1: summon by character ID; 2:summon by minion ID.


Object parameter: when the summoning method is 0, the parameter stands for the object unit (see Section 4 of this chapter); when the summoning method is 1, the parameter stands for the character template ID, level; when the summoning method is 2, the parameter stands for minion unit ID.


For the initial position parameter, please see Section 2 of this chapter.


If the duration is lower than 0, the battle will last forever; when it is higher than 0, it stands for the actual duration time (count by seconds).


Attached status is the attached attribute list of the unit. E.g. “s_HP,-[&[%s_生命%]*0.5&]|s_Attack,-[&[%s_攻击%]*0.5&]” means that the summoned unit has half of the original unit’s HP and Attack.


Attached special effect parameter: 0: Default; 1: Show half-transparent shadow effect.


Unit Faction Reference Target Parameter: the current faction of the target is the faction of the summoned units (caster’s faction by default).

set_unitpos Change the current position of a target by force
set_unitpos#operation object (same as Section 4)#position info (same as Section 2.)


set_active Set activation status of a target
set_active#operation object parameter (same as Section 4)#activate or not (1: Yes; 0: No), hide or not(1: Yes; 0: No; only works when the target is inactivated).


kill_unit Target is knocked down instantly (ignore invincibility)
kill_unit# operation object parameter (same as Section 4).


down_unit Target falls automatically
down_unit# operation object parameter (same as Section 4).


b_talk Chat bubble above the target’s head
b_talk#operation object#dialogue content#duration (count by second; neglectable).


yell Target shouts out words (mostly skills)
yell#operation object#words.


warning_area Set around battlefield warning area
warning_area#target position info#radius#duration (second).


timeline TimeLine skill object


Play Timeline action and execute the according to skill directive file (.txt)

timeline#specific TimeLine ID.


timeline_anim TimeLine skill action


Play Timeline action but does not execute the according to skill directive file (.txt).

timeline_anim# specific TimeLine ID.


block_act Lock actions of the current caster
block_act#status type (shown below)#status can be interrupted or not(0: No; 1: Yes)#lock time(count by second; when editing in Timeline, you can choose not to select this point of time and refer to the time difference of recalling block_act#0#0#0).

Available action-locking status:

  • 0: do not lock action.
  • 1: lock character’s attack and movement.
  • 2: lock character’s attack only.


camera_shake Camera Shake
camera_shake#duration (second)#intensity.


rotate Control and rotate a character
rotate#target unit parameter#initial rotation degree (compared to the current direction)#total rotation degree (rotate the target in the anti-clockwise way when the degree is below 0)#duration (second).


replace_eft Query and use specific special effect unit to replace the target special effect unit at the current position
replace_eft#specific special effect unit TAG#match number (match all when ≤0; match the earliest generated ones when >0)#ID of the special effect unit used to replace(stop the target special effect when this is left empty)#initial position(set empty by default; or use the hit_pos (same as add_eft)expression here by default)#movement parameter(optional; same as add_eft)# change object of damage check (optional; set empty by default)#addtional damage expression(optional; same as add_eft)#target parameter(same as add_eft)#special effect uint TAG (used for replace_eft directive query)#object parameter of the original special effect unit creator (optional; used to filter when querying; every unit by default).


hitstop Character frame pause
hitstop#operation object#decline speed of the beginning point of the curve (multiplier)# decline speed of the ending point of the curve (multiplier)#time (second)

(Character’s action speed becomes normal after the pause of the frame).

global_hitstop Global frame pause
global_hitstop# decline speed of the beginning point of the curve (multiplier)# decline speed of the ending point of the curve (multiplier)#time (second)

(Running speed of the world becomes normal after the pause of the frame).

set_skill_cd Change the cooldown of a specific skill of a caster
set_skill_cd#skill ID list (can be left empty; fill in All to refer to all skills of the unit; use “|” to separate multiple skill IDs#operation method (0: Decrease; 1: add a new value)#operation value (second).


get_items Gain items or resources in battles instantly (items obtained can be used by the main character only)
get_items#item list (format of item list is the same as the GETITEMS directive in the scenario directives)# target parameter of the object who gains the items.


set_unit_intvar Set a custom int variable for the unit
set_unit_intvar#variable ID#operation method(0:±change; 1: add a new value)#operation value#target parameter of the operation object (optional; caster by default).


call_battle_event Execute a specific battle event
call_battle_event#event ID#target parameter of the executor (optional; the default value of THIS object in the event script).


change_skill Replace the current skill list of the caster


change_skill#skill list info.


revert_skill Revert the current skill list of the caster to the original one
revert_skill#1


change_dungeon_skill Replace the dungeon skill of the caster
change_dungeon_skill#skill ID, level.


revert_dungeon_skill Revert the dungeon skill of the caster to the original one
revert_dungeon_skill#1


replace_tag_skill Replace a specific skill of a unit to another skill temporarily
replace_tag_skill#original skill ID#new skill ID, level (left empty if you want to revert to the original skill)#substitution duration (permanent when ≤0; last for seconds when >0)#target parameter of the object unit.


change_mp Change the current MP value of a unit
change_mp#target parameter of the object unit#new MP value (can be an expression)#show number special effect(0: No; 1: Yes)#ID of the special effect shown when the unit is hit(optional; do not show the effect when this is left empty).



Special Object IDs in Battles

We always query some target units with battle directives through character IDs. However, we can also return specific query objects with the following built-in IDs:

Special Built-in ID Explanation
PLAYER Player.
GM_A Fixed built-in units of A (used to realize some skill directives when there is no specific caster).
GM_B Fixed built-in units of B (used to realize some skill directives when there is no specific caster).
THIS The current executor of the directive (usually in the unit-mounting script).
RND_ENEMY_UNIT Random enemy minions (not on the current player’s side).
RND_FRIEND_UNIT Random ally minions (not on the current player’s side).
EMITTER={EMITER_ID} Emitter unit whose ID is EMITER_ID.


Editing of Trigger Scripts Attached to Unit Object

We can attach several trigger scripts to the unit by defining the trigger command on a dungeon unit object. . Characters in the character list can also have trigger scripts if we assign the attached_script field to be a script event ID in TAG.

[CMD_BEGIN]#trigger type 1#trigger condition (optional)#trigger parameter (optional)
CommanCommand-line 1
Command-line 2
...
Command line N
[CMD_END]
[CMD_BEGIN]# trigger type 1#trigger condition (optional)#trigger parameter (optional)
Command line 1
Command line 2
...
Command line N
[CMD_END]
...

每个对象可挂载多个地城对象触发器,当前已支持的触发类型有:

  • on_spawn:当刷新出时
  • enter_combat:进入战斗
  • get_hurt:单位受到伤害
  • dead:单位死亡时
  • on_timer:当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发
  • on_skill:该单位开始释放技能时触发 触发参数位技能ID
  • hp_pct:单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比
  • interactive:具有战斗内可交互对象的单位在进行交互行为时触发


以下为一段示例附加脚本:

[CMD_BEGIN]#enter_combat#
B_TALK*THIS#关门,放狗!
[CMD_END]
[CMD_BEGIN]#get_hurt#[%this_hp_pct%][<=]5&[%dg_int_val:测试计数器1%][<=]0
SET_DG_INTVAR*测试计数器1#1#1
SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了!别打了!我认输,什么都给你!
CMD_RETREAT*1
[CMD_END]