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

来自部落与弯刀Wiki

第132行: 第132行:
 
|-
 
|-
 
|KILL_ALL
 
|KILL_ALL
|'''全灭目标'''
+
|'''Eliminate All Targets'''
用途:立即对一方所有单位造成足以秒杀此单位的巨量伤害
 
  
格式:KILL_ALL*0为我方 1:为敌方
+
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
 
|UNDEAD_PLAYER
|'''主角不死'''
+
|'''Player Will Not Die'''
用途:给玩家控制的角色增加一个不死的BUFF
+
 
 +
Function: buff the character controlled by the player so that it will not die.
  
格式:UNDEAD_PLAYER*1
+
Format: UNDEAD_PLAYER*1.
 
|-
 
|-
 
|UNDEAD_ALL
 
|UNDEAD_ALL
|'''所有单位不死'''
+
|'''All Units Will Not Die'''
  
用途:给场上所有的单位增加一个不死的BUFF
+
Function: buff all units on the battlefield so that they will not die.
  
格式:UNDEAD_ALL*0:仅我方 1:敌我双方
+
Format: UNDEAD_ALL*0 (0: Ally; 1: All units).
 
|-
 
|-
|<s>STOP_ALL</s>
+
|EXEC_SKILL
|'''<s>所有单位停止行动</s>'''
+
|'''Unit Uses Ability'''
<s>用途:命令场上所有的单位停止当前行动</s>
+
 
 +
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.
  
<s>格式:STOP_ALL*0:恢复 1:停</s>
+
Caster ID is the identification ID of the target and can have the following unique values:
|-
 
|EXEC_SKILL
 
|'''单位使用技能'''
 
用途:命令场上指定单位使用技能
 
  
格式:EXEC_SKILL*释放者ID#技能ID,技能等级(默认1级)#目标坐标的x,y#坐标参数1的x,y
+
'''· 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).
  
释放者ID为目标的识别ID,可以有以下特殊值
+
'''· EMITTER=ID:''' a dungeon emitter of a specific ID, which can be “THIS” to represent the current dungeon emitter.
  
*PLAYER:玩家  GM_A:进攻方的预设对象 GM_B:防守方的预设对象
+
'''· RND_FRIEND_UNIT:''' random ally units '''RND_ENEMY_UNIT:''' random enemy units.
*THIS:指令发起者(一般返回发射器自身)
 
*EMITTER=ID:指定ID的地城发射器,可为this表示当前地城发射器
 
*RND_FRIEND_UNIT:随机友方单位 RND_ENEMY_UNIT:随机敌方单位
 
  
当释放者为预设对象时,坐标参数1代表技能释放的其起始坐标
+
When a caster is a pre-set object, coordinate parameter 1 represents its initial coordinate.
 
|-
 
|-
 
|DUNGEON_SPAWN
 
|DUNGEON_SPAWN
|'''刷新地城单位'''
+
|'''Refresh Dungeon Unit'''
用途:刷新战场地图上已经定义过的地城单位
 
  
格式:DUNGEON_SPAWN*控制ID#是否无视状态(当该单位已被击败时仍可刷新 0:否[默认] 1是)
+
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_TS
|'''设置地城触发器状态'''
+
|'''Set Dungeon Emitter Status'''
用途:设置地城中指定触发器的状态
 
  
格式:SET_DUNGEON_TS*控制ID#状态(0正常 -1禁用)
+
Function: set the status of a specific emitter in a dungeon.
 +
 
 +
Format: SET_DUNGEON_TS*control ID#status (0: Enabled; -1: Disabled).
 
|-
 
|-
 
|DUNGEON_OVER
 
|DUNGEON_OVER
|'''结束本次地城战斗'''
+
|'''End Dungeon Fight'''
用途:结束本次地城战斗并执行相应操作
+
 
 +
Function: end this dungeon fight and execute relative actions.
  
格式:DUNGEON_OVER*结果代码(0:退出 1:胜利 2:失败)
+
Format: DUNGEON_OVER*result value (0: exit; 1: victory; 2: loss).
 
|-
 
|-
 
|SET_AREA
 
|SET_AREA
|'''设置障碍区域状态'''
+
|'''Set Obstacle Area Status'''
用途:启用或禁用指定的障碍区域
+
 
 +
Function: enable or disable a specific obstacle area.
  
格式:SET_AREA*控制ID#状态(0正常 -1禁用)
+
Format: SET_AREA*control ID#status (0: Enabled; -1: Disabled).
 
|-
 
|-
 
|SET_WIDGET
 
|SET_WIDGET
|'''设置装饰物件状态'''
+
|'''Set Decoration Status'''
用途:启用或禁用指定的地图装饰物件
 
  
格式:SET_WIDGET*控制ID#状态(0正常 -1隐藏)
+
Function: enable or disable a specific map decoration.
 +
 
 +
Format: SET_WIDGET*control ID#status (0: Normal; -1: Hidden).
 
|-
 
|-
 
|SET_TP
 
|SET_TP
|'''设置地城传送器状态'''
+
|'''Set Dungeon Teleporter Status'''
用途:设置地城中的传送器及其关联模型的状态
 
  
格式:SET_TP*控制ID#状态(0正常 -1禁用)
+
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
|'''设置发射器状态'''
+
|'''Set Emitter Status'''
用途:设置指定发射器的状态
 
  
格式:SET_EMITTER*控制ID#状态(0正常 -1禁用)
+
Function: set the status of a specific emitter.
 +
 
 +
Format: SET_EMITTER*control ID#status (0: Enabled; -1: Disabled).
 
|-
 
|-
 
|SET_PLAYER_MODEL
 
|SET_PLAYER_MODEL
|'''设置玩家角色模型'''
+
|'''Set Player Model'''
用途:设置玩家角色的模型
+
 
 +
Function: set the model of the character controlled by the player.
  
格式:SET_PLAYER_MODEL*单位模型描述信息
+
Format: SET_PLAYER_MODE*unit model description info.
 
|-
 
|-
 
|SET_PLAYER_SKILL
 
|SET_PLAYER_SKILL
|'''设置玩家当前技能'''
+
|'''Set Player’s Current Skills'''
用途:设置玩家角色当前的技能
+
 
 +
Function: set the current skills of the player’s character.
  
格式:SET_PLAYER_SKILL*技能ID1,等级|技能ID2,等级|...|技能ID n,等级 (最多4个技能)
+
Format: SET_PLAYER_SKILL*skill ID 1, level| skill ID 1, level| | skill ID N, level (4 skills at most).
 
|-
 
|-
 
|SKILL_CMD
 
|SKILL_CMD
|'''执行技能指令'''
+
|'''Execute Skill Directive'''
用途:直接执行技能指令
+
 
 +
Function: execute skill directives.
  
格式:SKILL_CMD*技能指令内容
+
Format: SKILL_CMD*content of the skill directive.
 
|-
 
|-
 
|SET_DG_INTVAR
 
|SET_DG_INTVAR
|'''设置战斗中的自定义整形字段'''
+
|'''Set Custom Int Field in Battles'''
用途:设置战斗中的自定义整形字段
+
 
 +
Function: set a custom int field in battles
  
格式:SET_DG_INTVAR*字段ID#设置值#设置模式(可选 1为增加模式(原值加上设置值) 其他为直接赋值模式)#监视信息(可选,当存在时在变量监视界面上显示变量监视信息)
+
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
|'''设置镜头模式'''
+
|'''Set Camera Mode'''
用途:设置战斗中的镜头跟随模式
+
 
 +
Function: set the camera mode in battles.
 +
 
 +
Format: SET_CAMERA*camera mode#parameter.
 +
 
  
格式:SET_CAMERA*跟随模式#参数
+
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.
  
*0:跟随主角,无参数(默认)
+
· 2: coordinate on the battlefield. The parameter is X and Y.
*1:跟随指定目标,参数为目标单位的对象ID
 
*2:战场坐标位置,参数为坐标X,Y
 
 
|-
 
|-
 
|ATTACK
 
|ATTACK
|'''命令攻击'''
+
|'''Compulsory Attack'''
用途:强制命令一个单位开始攻击另外一个单位
+
 
 +
Function: command a unit to attack another unit.
  
格式:ATTACK*攻击发起者对象ID#攻击目标对象ID
+
Format: ATTACK*attacker object ID#target object ID.
 
|-
 
|-
 
|CMD_QUEUE
 
|CMD_QUEUE
|'''单位控制命令序列'''
+
|'''Unit Control Directive Sequence'''
用途:为一个单位指定控制命令队列,该单位会强制优先按照此命令队列进行执行
 
  
格式:CMD_QUEUE*目标对象ID#命令脚本的事件ID(将命令队列的内容填写至该战斗中事件当中来执行)
+
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).
  
命令队列的格式为(时间参数表示该秒数后执行下一条):
 
  
指令类型1[,时间参数]:指令参数
+
The command sequence (the time parameter stands for the time before the next directive is executed) can be:
  
指令类型2[,时间参数]:指令参数
+
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.
  
*skill_cmd:执行技能指令:参数为一行技能指令
+
· use_skill: use abilities: ability ID, ability level#target unit object parameter#target position parameter.
*use_skill:使用技能:技能ID,技能等级#目标单位对象参数#目标位置参数
 
*event:执行战斗事件:战斗中事件ID#执行条件(可选)
 
*move_to:移动至指定点:目标坐标参数#速度参数(该指令中时间参数无效,只有当单位正确到达目标后执行下一条)
 
*set_dir:设置单位方向:参数为方向
 
*keep_act:保持一个动作:动作ID(为空时表示待机动作)#循环次数(小于等于0为无限循环 默认1)#单次动作时间(<=0为始终保持 默认0)  注:此命令中时间参数无效,需等待动作循环执行结束为止,当无限循环时只有对该单位下达新指令方可结束动作保持
 
  
'''注意,以上命令中所有的坐标参数当为2参数时表示目标位置的x,y地图坐标,当3参数时第三个参数表示位置类型(0:地图坐标 1:战场坐标)'''
+
· 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).
 
<br />
 
<br />
 
|-
 
|-
 
|SET_POLICY
 
|SET_POLICY
|'''设置单位的战斗策略'''
+
|'''Set Unit Battle Tactic'''
用途:为一个单位设置当前战斗策略
 
  
格式:SET_POLICY*目标对象ID#主策略类型#参数1#位置参数#单位TAG筛选标记(仅当目标对象ID为空时生效)#目标单位ID(主要用于跟随等策略指定目标)
+
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).
  
当前支持的主策略类型有:
 
  
*0:强攻(参数为唤醒半径,小于等于0为无限距离)
+
Currently, available main tactic types are:
*1:固守(参数为守卫半径)  
+
 
*2:跟随(参数为跟随半径)
+
· 0: Attack (the parameter is the radius of awakening, which becomes endless long when the parameter is lower than 0).
*3:攻略目标点
+
 
 +
· 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
|'''设置单位挂载计时器'''
+
|'''Set Unit Timer'''
用途:为一个单位设置一个具有触发功能的计时器并完成特定的触发事件
+
 
 +
Function: set a timer on a unit, which will trigger and complete a specific event.
  
格式:SET_UNIT_TIMER*目标对象ID#计时器ID#时间参数(<=0时为关闭 只有当单位身上挂有”on_timer”触发器事件时有效)
+
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).
 +
<br />
 
|-
 
|-
 
|FINISH_CAST
 
|FINISH_CAST
|'''立即释放吟唱中的技能'''
+
|'''Use Channeling Skill Instantly'''
用途:立即释放出单位当前正在吟唱中的技能(只有当目标正在吟唱该技能时生效)
+
 
 +
Function: stop channeling and use the skill instantly (works only when the target is channeling their skill.)
  
段1,值1|字段2.,值2|...)
+
Field 1, value 1|Field 2, value 2|
 
|-
 
|-
 
|REPLACE_SKILLS
 
|REPLACE_SKILLS
|'''替换单位技能'''
+
|'''Replace Unit Skill'''
用途:替换单位当前的技能
+
 
 +
Function: replace the current skill of a unit.
  
格式:REPLACE_SKILLS*目标对象ID#技能ID1,等级|技能ID2,等级|...|技能ID n,等级 (一次最多4个技能,当等级为0时表示移除该技能)
+
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.)
 +
<br />
 
|-
 
|-
 
|REPLACE_DGSKILL
 
|REPLACE_DGSKILL
|'''替换单位地城技能'''
+
|'''Replace Unit Dungeon Skill'''
用途:替换单位当前的地城技能
+
 
 +
Function: replace the current dungeon skill of a unit.
  
格式:REPLACE_DGSKILL*目标对象ID#地城技能ID,等级(技能ID为空或者null表示关闭该角色地城技能)
+
Format: REPLACE_DGSKILL*target object ID#dungeon skill ID, level (empty skill ID or null means the dungeon skill is disabled).
 
|-
 
|-
 
|BATTLE_MSG
 
|BATTLE_MSG
|'''播放战场消息'''
+
|'''Battlefield Message'''
  
用途:播放一条战场消息
+
Function: broadcast a battlefield message.
  
格式:BATTLE_MSG*消息内容#消息类型(0:普通 1:警告)
+
Format: BATTLE_MSG*message type (0: Normal; 1: Warning).
 
|-
 
|-
 
|SET_BATTLE_CHECKER
 
|SET_BATTLE_CHECKER
|'''设置战斗结束检查器工作状态'''
+
|'''Set Battle Checker Status'''
用途: 设置战斗结束检查器工作状态
 
  
格式:SET_BATTLE_CHECKER*工作状态(0:关闭 1:开启)
+
Function: set the status of Battle Checker.
 +
 
 +
Format: SET_BATTLE_CHECKER*status (0: Disabled; 1: Enabled).
 
|-
 
|-
 
|SHOW_BATTLEOVER_BTN
 
|SHOW_BATTLEOVER_BTN
|'''显示手动结束战斗按钮'''
+
|'''Show End-Battle Button'''
用途: 显示手动结束战斗按钮
 
  
格式:SHOW_BATTLEOVER_BTN*1
+
Function: show the button for the player to end battles manually.
 +
 
 +
Format: SHOW_BATTLEOVER_BTN*1.
 
|-
 
|-
 
|SHOW_DEBUG_INFO
 
|SHOW_DEBUG_INFO
|'''显示调试信息'''
+
|'''Show Debug Info'''
用途: 显示调试信息
+
 
 +
Function: show debug info.
  
格式:SHOW_DEBUG_INFO*状态代码(0:关闭 1:开启主角身上BUFF状态显示)
+
Format: SHOW_DEBUG_INFO*status value (0: Disabled; 1: Show buff info of player’s character).
 
|-
 
|-
 
|OPENSTORE
 
|OPENSTORE
|'''打开交易界面'''
+
|'''Open Trade Panel'''
用途:打开与指定商人的交易界面
+
 
 +
Function: open the trade panel between the player’s character and a specific merchant.
  
格式:OPENSTORE*商人ID
+
Format: OPENSTORE*merchant ID.
 
|-
 
|-
 
|RESET_STORE
 
|RESET_STORE
|'''刷新商人所持商品表'''
+
|'''Refresh Merchant’s Items'''
用途:根据配置刷新商人所持的商品表
 
  
格式:RESET_STORE*商人ID
+
Function: refresh a merchant’s item based on the configuration.
 +
 
 +
Format: RESET_STORE*merchant ID.
 
|-
 
|-
 
|SET_TIMER
 
|SET_TIMER
|'''设置全局定时器'''
+
|'''Set Global Timer'''
用途:设置一个定时器来延时执行一些脚本
 
  
格式:SET_TIMER*计时器ID#时间参数(<=0为关闭)#定时器结束时执行的事件ID#监视字段信息(可选,如果存在则在变量监视UI中显示剩余时间)
+
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
 
|AREA_SPAWN
|'''区域刷新出单位'''
+
|'''Generate Unit in Area'''
用途:在指定的刷新区域批量刷新出指定的单位
 
  
格式:AREA_SPAWN*目标区域控制ID#英雄列表#单位表(格式同ENEMY_REINF指令)#所属阵营索引#默认策略(格式为:策略代码:策略参数 同SET_POLICY指令)#刷新出单位的Tag标记(可选)#单位附加属性表(可选)
+
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
 
|GETITEMS
|'''主角获得道具或资源'''
+
|'''Player Gets Items or Resources'''
用途:主角直接获得指定的道具列表(注意:游戏中的金钱、经验等资源都可以通过此方法来获得,只要传入正确的映射ID即可)
 
  
格式:GETITEMS*道具列表信息
+
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
|'''移除指定道具或资源'''
+
|'''Remove Items or Resources'''
用途:根据指定的道具数量从主角道具表中移除指定数量的道具
 
  
格式:REMOVE_ITEMS*道具列表
+
Function: remove a certain number of items from the player’s inventory.
 +
 
 +
Format: REMOVE_ITEMS*item list.
 
|-
 
|-
 
|LOOT
 
|LOOT
|'''执行掉落判定'''
+
|'''Execute Drop Check'''
用途:按照列表执行一次掉落检定(LOOT格式见 物品掉落信息格式)
+
 
 +
Function: execute a check according to the loot list (please refer to the format of Item Dropping Info).
  
格式:LOOT*Loot列表
+
Format: LOOT*Loot list.
 
|-
 
|-
 
|ADD_EXP
 
|ADD_EXP
|'''指定英雄获取经验'''
+
|'''Hero Gains EXP'''
用途:对一个指定的英雄角色增加经验值
+
 
 +
Function: a specific hero gains EXP.
  
格式:ADD_EXP*经验#目标英雄ID(可选,默认为主角)
+
Format: ADD_EXP*EXP#target hero ID(optional; player’s character by default).
 
|-
 
|-
 
|SETSKILL
 
|SETSKILL
|'''对指定英雄设置技能'''
+
|'''Manage Hero Skill'''
用途:对一个指定的英雄角色设置技能,根据操作对象可实现增加、替换、移除操作
 
  
格式:SETSKILL*角色ID(可选,默认为主角)#需要添加的技能信息表(格式为"技能ID1,等级|技能ID2,等级|...")#需要移除的技能表(可选 多个技能以"|"分隔)
+
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
 
|CALL_LUAFUNC
|'''执行LUA函数'''
+
|'''Execute LUA Function'''
用途:执行当前加载的LUA脚本中的指定函数名
 
  
格式:CALL_LUAFUNC*脚本中的函数名
+
Function: execute specific functions in the currently loaded LUA script.
 +
 
 +
Format: CALL_LUAFUNC*function name in the script.
 
|-
 
|-
 
|ADD_INTER_OBJECT
 
|ADD_INTER_OBJECT
|'''添加一个战斗内可交互对象'''
+
|'''Add Interactive Object in Battles'''
用途:向当前的战斗中添加一个可交互对象
 
  
格式:ADD_INTER_OBJECT*交互说明信息#地图位置坐标#普通状态模型ID(定义在D大地图单位模型表)#可见不可交互状态模型ID#粒子效果信息(仅普通状态可见,格式为:粒子效果文件名(位于映射路径:Asset\BuildSource\map_res\Particles\),偏移x,偏移y)#初始状态(0:普通 1:可见不可交互 2:隐藏)#控制ID(用来进行控制定位)#内含物品道具信息列表(可为空)#交互时触发的事件ID(可选)#交互后行为(可选,默认为0 0:移除消失 1:隐藏待自动刷新或手动刷新 2:可见不可交互并待刷新  3:不进行操作在脚本中手动处理)#自动刷新时间(可选,仅当前一个参数不为0时生效 默认0, 当<=0时为手动刷新)#自动刷新事件ID(当自动刷新时触发的事件ID)
+
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_INTER_OBJECT
|'''移除战斗内可交互对象'''
+
|'''Remove Interactive Object in Battles'''
用途:按照控制ID移除指定的可交互对象
+
 
 +
Function: remove an interactive object based on its ID.
  
格式:REMOVE_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置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
 
|SET_INTER_OBJECT
|'''修改可交互对象的状态'''
+
|'''Change Status of Interactive Object'''
用途:按照控制ID修改指定可交互对象的状态
+
 
 +
Function: change the status of an interactive object based on its ID.
  
格式:SET_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)#新的状态值(0:普通 1:可见不可交互 2:隐藏)
+
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
|'''传送至其他副本地图'''
+
|'''Teleport to Other Instance Maps'''
用途:将当前的所有玩家角色都传送到指定的副本地图位置
+
 
 +
Function: teleport all allies to the target instance map.
  
格式:TELEPORT*副本地图ID(需定义在“F副本地图信息表”中):地图坐标X,地图坐标Y
+
Format: TELEPORT*map ID (needs to be defined in “F副本地图信息表”); X coordinate, Y coordinate.
 
|-
 
|-
 
|REMOTE_EVENT
 
|REMOTE_EVENT
|'''远程请求执行事件'''
+
|'''Remote Execution Request'''
用途:本地请求所有客户端执行一个事件
+
 
 +
Function: Send a request to all clients to execute an event.
  
格式:REMOTE_EVENT*事件ID
+
Format: REMOTE_EVENT*event ID.
 
|-
 
|-
 
|
 
|
第447行: 第495行:
 
<br />
 
<br />
  
===专门用于战斗场景中条件查询方法===
+
===Value Query in Battles===
 
{| class="wikitable"
 
{| class="wikitable"
 
|+
 
|+
!查询指令
+
|'''Query Directive'''
!说明
+
|'''Explanation'''
 
|-
 
|-
 
|[%result_code%]
 
|[%result_code%]
|战斗中各种事件脚本的查询结果(如:选择框的结果)
+
|Results of different event scripts in battles (e.g., the result of an option box).
 
|-
 
|-
 
|[%bs_time%]
 
|[%bs_time%]
|当前战斗进行的时间(整秒数)
+
|How long the current battle has been going on (integer).
 
|-
 
|-
 
|[%rnd:A,B%]
 
|[%rnd:A,B%]
|返回一个每次都不相同的大于等于A小于等于B的随机值
+
|Return a different random number each time (A<= this number <= B.)
 
|-
 
|-
 
|[%last_rnd%]
 
|[%last_rnd%]
|返回上一次[%rnd:A,B%]查询到的结果
+
|Return the result of the last [%rnd:A,B%] query.
 
|-
 
|-
 
|[%const_rnd%]
 
|[%const_rnd%]
|返回一个执行周期内相同的0-100的随机值
+
|Return a random number (0~100)that stays the same during the execution period.
 
|-
 
|-
 
|[%last_rnd_pos_x%]
 
|[%last_rnd_pos_x%]
|返回上一个随机位置结果的X
+
|Return the X value of the last random position.
 
|-
 
|-
 
|[%last_rnd_pos_y%]
 
|[%last_rnd_pos_y%]
|返回上一个随机位置结果的Y
+
|Return the Y value of the last random position.
 
|-
 
|-
 
|[%last_rnd_pos%]
 
|[%last_rnd_pos%]
|返回上一个随机位置坐标
+
|Return the coordinate of the last random position.
 
|-
 
|-
 
|[%last_skill%]
 
|[%last_skill%]
|当前查询源对象上一个使用技能的ID
+
|The ID of the last skill used by the current queried source object.
 
|-
 
|-
 
|[%this_type%]
 
|[%this_type%]
|当前查询源对象的类型 0英雄 1小兵
+
|Type of the executor of the current directive (0: Hero; 1: Minion).
 
|-
 
|-
 
|[%aim_type%]
 
|[%aim_type%]
|当前查询目标对象的类型 0英雄 1小兵
+
|Type of the current queried target object (0: Hero; 1: Minion).
 
|-
 
|-
 
|[%this_level%]
 
|[%this_level%]
|当前查询源对象的等级
+
|Level of the executor of the current directive.
 
|-
 
|-
 
|[%aim_level%]
 
|[%aim_level%]
|当前查询目标对象的等级
+
|Level of the current queried target object.
 
|-
 
|-
 
|[%this_hp_pct%]
 
|[%this_hp_pct%]
|当前查询源对象的HP百分比
+
|HP percentage of the executor of the current directive.
 
|-
 
|-
 
|[%aim_hp_pct%]
 
|[%aim_hp_pct%]
|当前查询目标对象的HP百分比
+
|HP percentage of the current queried target object.
 
|-
 
|-
 
|[%this_mp_pct%]
 
|[%this_mp_pct%]
|当前查询源对象的MP百分比
+
|MP percentage of the executor of the current directive.
 
|-
 
|-
 
|[%aim_mp_pct%]
 
|[%aim_mp_pct%]
|当前查询目标对象的MP百分比
+
|MP percentage of the current queried target object.
 
|-
 
|-
 
|[%friends_num%]
 
|[%friends_num%]
|我方剩余人数
+
|The number of ally units left.
 
|-
 
|-
 
|[%enemy_num%]
 
|[%enemy_num%]
|敌方剩余人数
+
|The number of enemy units left.
 
|-
 
|-
 
|[%hit_enemy%]
 
|[%hit_enemy%]
|判断当前命中的目标是否caster的敌人。敌方1 非敌方0
+
|Check if the current hit target is an enemy of the caster (1: Enemy; 0: Not Enemy.)
 
|-
 
|-
 
|[%battle_res%]
 
|[%battle_res%]
|当前当前战斗结果
+
|Current battle result.
 
|-
 
|-
 
|[%skill_lv:SKILL_ID%]
 
|[%skill_lv:SKILL_ID%]
|查询当前source对象指定技能ID的等级,无则返回0
+
|Level of a specific skill ID of the current source object; returns 0 if the level is 0.
 
|-
 
|-
 
|[%base_atk%]
 
|[%base_atk%]
|当前技能等级所对应的基础物理攻击力
+
|A basic physical attack based on the current skill level.
 
|-
 
|-
 
|[%base_magic_atk%]
 
|[%base_magic_atk%]
|当前技能等级所对应的基础魔法攻击力
+
|A basic magic attack based on the current skill level.
 
|-
 
|-
 
|[%standard_magic_atk%]
 
|[%standard_magic_atk%]
|当前技能等级所对应的魔法最终攻击力
+
|An overall magic attack based on the current skill level.
 
|-
 
|-
 
|[%this_buff:BUFF_ID%]
 
|[%this_buff:BUFF_ID%]
|查询当前source对象指定BUFF_ID的当前层数
+
|Number of stacks of source object’s current BUFF_ID.
 
|-
 
|-
 
|[%aim_buff:BUFF_ID%]
 
|[%aim_buff:BUFF_ID%]
|查询当前target对象指定BUFF_ID的当前层数
+
|The current number of stacks of target object’s specific BUFF_ID.
 
|-
 
|-
 
|[%stat:STAT_FIELD%]
 
|[%stat:STAT_FIELD%]
|查询当前source指定属性字段的当前数值
+
|The current value of a specific field attribute of a source object.
 
|-
 
|-
 
|[%aim_stat:STAT_FIELD%]
 
|[%aim_stat:STAT_FIELD%]
|查询当前target对象指定属性字段的当前数值
+
|The current value of a specific field attribute of a target object.
 
|-
 
|-
 
|[%this_weapon%]
 
|[%this_weapon%]
|当前查询source对象的武器类型
+
|Weapon type of the queried source object.
 
|-
 
|-
 
|[%aim_weapon%]
 
|[%aim_weapon%]
|当前查询target对象的武器类型
+
|Weapon type of the queried target object.
 
|-
 
|-
 
|[%charge_val%]
 
|[%charge_val%]
|本次伤害的蓄力值(0~100)
+
|Value of charging of this damage(0~100).
 
|-
 
|-
 
|[%cmd_argval%]
 
|[%cmd_argval%]
|当前命令行的参数值
+
|The parameter of the current command line.
 
|-
 
|-
 
|[%cmd_argval_next%]
 
|[%cmd_argval_next%]
|返回当前命令行参数值后立即加1
+
|Return the parameter of the current command line, and the parameter increases by 1 instantly.
 
|-
 
|-
 
|[%rpt_index%]
 
|[%rpt_index%]
|当前命令行所在循环的INDEX值
+
|INDEX value of the loop where the current command line is located.
 
|-
 
|-
 
|[%find_tag:TAGINFO%]
 
|[%find_tag:TAGINFO%]
|执行一次目标单位查找,TAGINFO为目标单位信息,参数格式见 技能对象格式说明,当查询到合适目标时返回1否则返回0
+
|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_find_tag:TAGINFO%]
|从已查找单位列表中增加目标单位,始终返回1,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%]
 
|[%rm_find_tag:TAGINFO%]
|从已查找单位列表中排除目标单位,始终返回1,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_find_list%]
|重置当前查找列表,始终返回1
+
|Reset the current search list. It always returns 1.
 
|-
 
|-
 
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]
 
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]
|随机枚举值,根据所有项的概率分布返回其中一个项的RES值。
+
|Randomly enumerate values, and return the RES value of one of the enumerated ones according to their probability distribution.
比如:[%rnd_enum:25,1:40,2:35,3%]表示有25%的概率返回”1”,40%的概率返回”2”,35%的概率返回”3”
+
 
 +
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%]
 
|[%dg_sp_state:ID%]
|返回当前战斗地图中ControlID为ID的刷新单位的当前状态 0:未刷新 1:已刷新 -1:已击败
+
|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%]
 
|[%dg_unitnum:TAG%]
|返回当前战斗地图中剩余未击败并且Tag为TAG的刷新单位的个数
+
|Return the number of refreshed units that have not been defeated and have the “TAG” tag on the current battlefield.
 
|-
 
|-
 
|[%fd_sum%]
 
|[%fd_sum%]
|当前查询source对象的友军倒下计数器值
+
|Value of the defeated ally counter of the current source object.
 
|-
 
|-
 
|[%ed_sum%]
 
|[%ed_sum%]
|当前查询source对象的敌军倒下计数器值
+
|Value of the defeated enemy counter of the current source object.
 
|-
 
|-
 
|[%fd_mod:MOD_VAL%]
 
|[%fd_mod:MOD_VAL%]
|当前查询source对象的友军倒下计数器值与MOD_VAL取余后的值
+
|Value of defeated-ally counter of source object divided by MOD_VAL, and take the remainder.
 
|-
 
|-
 
|[%ed_mod:MOD_VAL%]
 
|[%ed_mod:MOD_VAL%]
|当前查询source对象的敌军倒下计数器值与MOD_VAL取余后的值
+
|Value of defeated enemy -counter of source object divided by MOD_VAL, and take the remainder.
 
|-
 
|-
 
|[%dg_int_val:KEY%]
 
|[%dg_int_val:KEY%]
|返回指定KEY的自定义地城整形字段的值
+
|Return the value in a custom dungeon int field of a specific KEY.
 
|-
 
|-
 
|[%emitter_pos:ID,MIN-MAX%]
 
|[%emitter_pos:ID,MIN-MAX%]
|返回指定指定ID的发射器中心位置,距其中心MIN至MAX的一个随机位置,并记录入last_rnd_pos
+
|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%]
 
|[%unit_timer:UNIT_ID,TIMER_ID%]
|返回指定UNIT_ID单位身上所附加的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%]
 
|[%this_intvar:ID%]
|返回当前查询source对象身上的自定义整形数值(技能指令set_unit_intvar设置)
+
|Return the custom int value of the current directive executor (skill directive set_unit_intvar setting).
 
|-
 
|-
 
|[%aim_intvar:ID%]
 
|[%aim_intvar:ID%]
|返回当前查询target对象身上的自定义整形数值(技能指令set_unit_intvar设置)
+
|Return the custom int value of the current queried target object (skill directive set_unit_intvar setting).
 
|-
 
|-
 
|[%defeat_hit%]
 
|[%defeat_hit%]
|查询当前命令是否是在击杀单位指令中执行的并且目标单位已被击杀(0:否 1:是) 注意:只能在技能中的命中命令指令中生效
+
|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%]
 
|[%eft_count:TAG%]
|查询当前场上指定TAG的特效体数量 '''注意:仅支持查询由caster本单位创建的特效体'''
+
|Number of special effect units with a specific TAG
 +
 
 +
Please note: this only counts the special effect units created by the caster.
 
|-
 
|-
 
|[%this_id%]
 
|[%this_id%]
|当前查询对象的单位ID
+
|The unit ID of the current queried object.
 
|-
 
|-
 
|[%aim_id%]
 
|[%aim_id%]
|当前查询目标对象的单位ID
+
|The unit ID of the current queried target object.
 
|-
 
|-
 
|[%hit_dmg_val%]
 
|[%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%]
 
|[%stealth_hit%]
|查询当前技能或伤害是否是在隐身状态下进行的 0否1是
+
|Check if the current skill or damage comes into effect when the caster is invisible (0: No; 1: Yes).
 
|-
 
|-
 
|[%hit_count%]
 
|[%hit_count%]
|查询当前技能命中判定生效的次数
+
|Times of the current skill is actually hitting units.
 
|-
 
|-
| colspan="2" |以下指令需要客户端版本高于0.7.4.2
+
| colspan="2" |Following directives need client higher than 0.7.4.2 to be executed.
 
|-
 
|-
 
|[%this_skills%]
 
|[%this_skills%]
|返回当前查询source对象当前的技能列表
+
|Return the skill list of the current source object.
 
|-
 
|-
 
|[%aim_skills%]
 
|[%aim_skills%]
|返回当前查询target对象当前的技能列表
+
|Return the skill list of the current target object.
 
|-
 
|-
| colspan="2" |以下指令需要客户端版本高于0.8.0.1
+
| colspan="2" |Following directives need client higher than 0.8.0.1 to be executed
 
|-
 
|-
 
|[%this_userid%]
 
|[%this_userid%]
|返回当前查询source对象当前的客户端ID
+
|Return the client ID of the current source object.
 
|-
 
|-
 
|[%aim_userid%]
 
|[%aim_userid%]
|返回当前查询target对象当前的客户端ID
+
|Return the client ID of the current target object.
 
|-
 
|-
 
|[%player_money%]
 
|[%player_money%]
|玩家身上的金钱数
+
|Player’s money in the game.
 
|-
 
|-
 
|[%item_number:物品key%]
 
|[%item_number:物品key%]
|返回背包中某种物品(或者资源)的数目
+
|Return the number of a specific item or resource in the player’s bag.
 
|-
 
|-
 
|
 
|
第654行: 第709行:
 
|}
 
|}
  
===伤害表达式格式===
+
===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
 
  key1:value1;key2:value2;...;keyN:valueN
伤害值表达式可以嵌入到一些数值表里(如BUFF列表的状态值等),或者直接嵌入到数值计算公式([&expression&]格式中);
+
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 伤害类型:0:普通近战攻击 1:普通远程攻击 2:技能伤害 3:治疗 4:回蓝
+
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen
*dmg 物理伤害数值,值为伤害值公式
+
*dmg: physical damage value. The value is the damage expression.
*t_dmg 真实伤害数值(所有治疗效果都为此值),值为伤害值公式
+
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.
*hit 命中参数(-1000~1000) 当不能闪避时为-1000
+
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000.
*blk 被招架参数(-1000~1000) 当不能被招架时为-1000
+
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.
*cri 暴击参数(-1000~1000) 当不能暴击时为-1000
+
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.
*act 是否播放受击动作 1是 0否
+
*act: play unit action when they are hit. 0: No; 1: Yes
*eft 受击特效ID
+
*eft ID: special effect ID (when the unit is hit).
*trig 是否触发伤害效果(如反伤等)
+
*trig: trigger damage effect (e.g., damage reflection).
*attack_type 指定伤害的武器攻击类型
+
*attack_type: decide the type of weapon attacks that caused the damage.
*buff 受到该伤害时附带的BUFF效果, 格式为 BuffID,[time],[overlay],两个参数为可选参数,分别表示时间及层数
+
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.
  
  
伤害值公式仅支持标准数学公式,包含以下运算符号:+-*/^%(),可嵌入一些预定义字段,所有预定义字段写在形如[%cmd%]的格式内,目前支持的预定义字段有:
+
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%]:随机一个大于等于min_val,小于等于max_val的整数
+
*[%rnd:min_val,max_val%]: a random integer (min_val<= this integer<= max_val).
*[%field%]:field表示任意一个定义在角色属性字段中的数值
+
*[%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.
  
在技能配置表中技能命令条目以”\n”换行符分隔,每条由延迟时间*[条件表达式(可选)]#命令内容组成,参考格式如下:
+
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*条件表达式1#技能命令1
 
  0*条件表达式1#技能命令1
 
  0.2#技能命令2
 
  0.2#技能命令2

2020年9月22日 (二) 00:47的版本

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*条件表达式1#技能命令1
0.2#技能命令2
……

当条件表达式不为空时,根据条件表达式判定结果执行。

条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果,例如

*REPEAT_START:9
语句1
语句2
[@0.01*[%rpt_index%]@]#技能命令
...
语句N
*REPEAT_END

表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍,期间可以通过[%rpt_index%]来查询当前语句处于第几次循环

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

表示对SELECT_UNITS行与SELECT_END之间所有的命令行,对SELECT_UNITS:后所有满足指定条件表达式的对象使用,并以该对象作为caster对象

其中,嵌入到[@...@]中的语句为保留两位小数的结果运算取值,此类查询仅在技能命令中有效。

目前支持的技能命令有:

技能指令 说明
stop_act 立即停止当前所有技能动作并按照之前指令行动


stop_act#1
add_eft 向战场中添加一个预定义的特效体


add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选,为空时为默认)#附带伤害表达式(可选,为空时按照特效表中定义的伤害表达式计算,格式见6.4节)#目标参数(见7.4节说明)#特效体TAG(用于replace_eft指令查询)

初始位置格式为:位置类型,偏移x,偏移y,偏移z(偏移量为相对于初始方向的偏移)

支持的位置类型有:

  • cast_pos:技能施放动作的预设位置
  • 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.....)

支持的运动类型有:

  • 0:不运动 无参数
  • 1:运动至技能目标点 偏移x,偏移y,偏移z
  • 2:运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标,否则按照技能释放目标)
  • 3:向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)
  • 4:向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)
  • 5:跟随目标运动 跟随类型(0固定相对位置,1发射点位置),偏移x,偏移y,偏移z,持续时间(-1为永久)
  • 6:运动至dim_pos 偏移x,偏移y,偏移z


dmg_check 进行伤害判定


dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选,默认关闭)

支持的判断类型有:

  • 0:单体判断(目标对象参数为目标单位见下一小节,为空表示技能目标)
  • 1:半径范围判断 目标对象参数为目标类型(0:敌方 1:我方 2:双方) 参数表中参数1为参考位置类型(见add_eft命令的位置类型) 参数2,3,4,5分别为偏移坐标的x,y,z及半径
  • 2:多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数,参数4以后为以参考点坐标为(0,0)的多边形坐标信息


add_buff 对目标施加BUFF
add_buff#buff ID#BUFF目标参数#持续时间(如不指定则采用BUFF默认持续时间)#叠加层数(默认为1)#上限层数(默认为配置表中的数值,只有大于0时生效)


可支持的内置目标参数有:

  • caster:技能释放者
  • target:目标单位(指向性技能的目标或技能命中的目标)
  • roleid,ROLEID:查询单位绑定人物ID为ROLEID的一个目标对象
  • buffgiver,BUFFID:查询当前caster身上一个ID为BUFFID的BUFF给与者
  • find_tag_res:查询指定目标的结果单位(必须先执行一次[%find_tag:TAGINFO%]查询才可调用)
  • tag_next_fu,距离D:当前命中目标的下一个小于距离D的友方单位
  • caster_next_fu,距离D:施法者的下一个小于距离D的友方目标
  • caster_next_eu,距离D:施法者的下一个小于距离D的敌方目标


remove_buff 移除目标的BUFF
remove_buff#移除目标(同上)#移除方式#参数1,参数2,参数3...

目前支持的移除方式如下

  • 0:全部移除
  • 1:移除指定BUFF 参数1为BUFF ID,参数2为移除层数(默认-1为全部移除)
  • 2:移除有害BUFF 参数1为移除数量(默认-1全部移除),参数2为BUFF子类型(默认-1不限)
  • 3:移除有益BUFF 参数1为移除数量(默认-1全部移除),参数2为BUFF子类型(默认-1不限)


dart_move 突进类移动
dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒,在运动结束前开始执行承接技能向前的时间偏移量>=0)[可为空]#操作对象(可选,默认为caster)#修正目标位置(可选,参数格式见节2)#是否强制(默认0  为1时强制移动)

移动类型分为:

  • 0:匀速运动
  • 1:跳跃
  • 2:击退运动
  • 3:击飞运动 (当为击飞运动时,速度参数为击飞的滞空时间)

速度参数为角色移动时的水平速度(当速度小于等于0时为闪现至目标)

冲撞质量在匀速运动时表示刚体质量,0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了,目前暂时无用了,参数还必须要填写。

绑定特效为运动时附加在单位上的特效ID

运动结束承接技能为执行运动结束后立即执行的技能ID


stop_dartmove 停止当前突进运动
stop_dartmove#1


explode 在目标位置进行一次爆破物理效果
explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数


add_force 对目标单位进行一次击退效果
add_force#力度参数#目标单位(可省略,默认target)


play_sound 播放一个指定音效
play_sound#音效ID#音效位置(同第一节解释)


unit_sound_dic 单位根据模型配置播放指定音效字典中的字段对应音效
unit_sound_dic#音效字典KEY值#单位目标参数


cast_sound 播放一个指定音效(在施法者处)
cast_sound#音效ID


chain_eft_to 播放一个链式特效
chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式

释放目标的参数见 技能 指令目标参数说明

taunt 嘲讽效果,让目标立即攻击释放者
taunt#释放者#目标单位


use_skill 立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)
use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数


set_cmd_val 操作当前命令行参数
set_cmd_val#操作方式#操作值D

操作方式:0:设置为值D  1:增加值D 2:减少值D


注意:与其他缓冲后依次执行的指令不同,该指令不会进入执行队列,将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。


set_dimpos 设置预设位置参数
set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]

操作方式:

  • 0:我方增援出兵位置 操作参数分别为 x,y,z的偏移
  • 1:查询目标单位位置 操作参数为查询指令(见第4小节)
  • 2:查询技能参数位置 操作参数为查询指令(见第2小节位置信息)


play_sk_act 播放一个已定义的技能动作
play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)


summon_unit 召唤一个单位
summon_unit#召唤方式#对象参数[,血量百分比(可选参数,默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数(可选参数,默认为caster)#替换角色技能(可选参数,为空为不替换)#默认策略参数

召唤方式:0:对象的镜像  1:通过人物ID召唤  2:通过小兵ID召唤

对象参数: 当召唤方式为0时表示对象单位(参考本章4节);当召唤方式为1时表示人物模版ID,等级;当召唤方式为2时表示兵种单位ID

初始位置参数见本章2节

持续时间小于等于0时表示本次战斗永久持续,大于0时表示持续秒数

附加状态为该单位的附加属性表,如: s_生命,-[&[%s_生命%]*0.5&]|s_攻击,-[&[%s_攻击%]*0.5&]   表示召唤出的单位生命与攻击力均为原单位的一半

附加特效参数:默认为0 当为1时显示半透明影子效果

单位阵营参考目标参数:以指定的目标当前的阵营作为召唤单位当前的阵营,默认为施法者所在的阵营

替换角色技能参数:格式为普通角色技能表信息,如: 技能1,1|技能2,1|... 如果需要复制角色技能,可使用[%this_skills%]或[%aim_skills%]来复制施法者或者目标的技能

默认策略参数:格式为:策略类型,策略参数(默认为“0,0“,支持的策略类型参考SET_POLICY指令,但是不支持攻略地点类型3。例如:参数“2,500”,表示在半径500范围内进行跟随)

set_unitpos 强制改变目标单位的当前位置
set_unitpos#操作对象(同4节)#位置信息(同2节)


set_active 设置目标单位的激活状态
set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否,仅在非激活时有效)


kill_unit 目标立即被击倒(无视无敌属性)
kill_unit#操作对象参数(同4节)


down_unit 目标主动倒下
down_unit#操作对象参数(同4节)


b_talk 在目标头上弹出一个对话气泡
b_talk#操作对象#对话内容#持续时间(秒数,可省略)


yell 目标呼喊出几个字(多为技能)
yell#操作对象#喊话内容


warning_area 播放一个圆形战场警告区域
warning_area#目标位置信息#半径#持续时间(秒)


timeline 播放一个TimeLine技能对象
播放Timeline动作并执行对应的技能指令文件(.txt)
timeline#指定的TimeLine ID


timeline_anim 播放一个TimeLine技能的动作部分
只播放Timeline动作,不执行对应的技能指令文件(.txt)
timeline_anim#指定的TimeLine ID


block_act 设置当前施法者的动作锁定状态
block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位:秒 Timeline里编辑时可不指定该时间,以再度调用 block_act#0#0#0的时间差为准)

可用的锁定状态

  • 0:不锁定
  • 1:锁定攻击及移动
  • 2:仅锁定攻击


camera_shake 镜头抖动
camera_shake#时长(秒)#幅度


rotate 控制角色进行旋转
rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间(秒)


replace_eft 查找并用指定的特效体在当前位置替换目标特效体
replace_eft#指定的特效体TAG#匹配数量(≤0时为匹配全部,>0为匹配生成时间最早的有限几个)#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式(同add_eft)#运动参数(可选,同add_eft)#修改伤检对象(可选,为空时为默认)#附带伤害表达式(可选,同add_eft)#目标参数(同add_eft)#特效体TAG(用于replace_eft指令查询)#原特效体创建者的对象参数(可选,用于查询时筛选,默认为所有人)


hitstop 角色顿帧
hitstop#操作对象#曲线起点降速幅度(倍率)#曲线终点降速幅度(倍率)#时长(秒)

(结束后角色动作速度恢复为1倍)

global_hitstop 全局顿帧
global_hitstop#曲线起点降速幅度(倍率)#曲线终点降速幅度(倍率)#时长(秒)

(结束后全局速度恢复为1倍)


set_skill_cd 更改施法者的指定技能CD
set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能,多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)


get_items 战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)
get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数


set_unit_intvar 为此单位设置一个自定义的整形变量值
set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选,默认为施法者)


call_battle_event 执行一个指定的战斗事件
call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)


change_skill 替换施法者单位的当前技能列表
change_skill#技能列表信息


revert_skill 还原施法者的当前技能列表
revert_skill#1


change_dungeon_skill 替换施法者的地城技能
change_dungeon_skill#技能ID,等级


revert_dungeon_skill 还原施法者的地城技能
revert_dungeon_skill#1


replace_tag_skill 将一个单位的指定技能暂时替换为其他技能
replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久,>0为持续指定秒数)#对象单位目标参数


change_mp 改变一个单位当前的MP值
change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0:否 1:是)#播放受击特效ID(可选,为空不播放)



战斗中的特殊对象ID

战斗指令中经常需要进行一些目标单位的查询,通常是通过角色ID来查找,但是可以通过以下内置ID返回特定的查询对象:

特殊内置ID 说明
PLAYER 玩家单位
GM_A A方的固定内置单位(用于实现一些无特定施法者的技能指令)
GM_B B方的固定内置单位(用于实现一些无特定施法者的技能指令)
THIS 当前执行指令单位自身(一般用于单位挂载脚本中)
RND_ENEMY_UNIT 随机的敌方小兵单位(非当前PLAYER一方)
RND_FRIEND_UNIT 随机的友方小兵单位(非当前PLAYER一方)
EMITTER={EMITER_ID} 指定ID为EMITER_ID的发射器单位


单位对象附加触发脚本编辑说明

通过在地城单位对象中的触发命令中定义,可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为:

[CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)
命令行1
命令行2
...
命令行N
[CMD_END]
[CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)
命令行1
命令行2
...
命令行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]