<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://blywd.hanjiasongshu.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rehtaf</id>
	<title>部落与弯刀Wiki - 用户贡献 [zh-cn]</title>
	<link rel="self" type="application/atom+xml" href="https://blywd.hanjiasongshu.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rehtaf"/>
	<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/Rehtaf"/>
	<updated>2026-05-03T19:18:44Z</updated>
	<subtitle>用户贡献</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=MODDeveloperManual&amp;diff=723</id>
		<title>MODDeveloperManual</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=MODDeveloperManual&amp;diff=723"/>
		<updated>2020-09-22T08:10:30Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* Teaching video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[文件:Banner.jpg|替代=|无框|1037x1037像素|class=noviewer]]&lt;br /&gt;
&lt;br /&gt;
==[[Terminology|Terminology]]==&lt;br /&gt;
&lt;br /&gt;
==[[Introduction to MOD|Introduction to MOD]]==&lt;br /&gt;
&lt;br /&gt;
==[[Development Environment Building|Development Environment Building]]==&lt;br /&gt;
&lt;br /&gt;
==[[Development Tutorial|Development Tutorial]]==&lt;br /&gt;
&lt;br /&gt;
==[[Debugging and Release|Debugging and Release]]==&lt;br /&gt;
&lt;br /&gt;
==[[Common Scenario Directives|Common Scenario Directives]]==&lt;br /&gt;
&lt;br /&gt;
==[[Skill and Battle Directives in Combat|Skill and Battle Directives in Combat]]==&lt;br /&gt;
&lt;br /&gt;
==[[Map Editor|Map Editor]]==&lt;br /&gt;
&lt;br /&gt;
==[[Tutorial Videos|Tutorial Videos]]==&lt;br /&gt;
&lt;br /&gt;
==[[FAQ for English|FAQ for English]]==&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=722</id>
		<title>Common Scenario Directives</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=722"/>
		<updated>2020-09-22T08:08:53Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* TAGs with Special Meanings in Faction List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Scenario Event===&lt;br /&gt;
A scenario event is a basic element used to realize scenario scripts in the game. All scenario events in the game are called by emitters or executors and put into the directive queue. These scenario events will be run by the GameWorldManager one by one according to the in-game time. An integrate scenario event consists of the following parts:&lt;br /&gt;
&lt;br /&gt;
1. Scenario Event ID: a unique label of a scenario event;&lt;br /&gt;
&lt;br /&gt;
2. Directive Content: directives that will be executed after a scenario event is triggered;&lt;br /&gt;
&lt;br /&gt;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.&lt;br /&gt;
&lt;br /&gt;
===Scenario Event Trigger===&lt;br /&gt;
Currently, all stories and events are established according to the mechanics of the scenario event trigger. The mechanics of a trigger is: event ports are set at different positions in advanced, and when the program accesses a position, it will call the port and import the current environment variables. The program will then traverse all defined triggers in the port event and return the trigger with the highest priority or all triggers that meet the conditions (to return one or all triggers is decided by the type of a port). Finally, a scenario event is executed. Triggers’ calling events is not executed immediately. Relevant events are put into the execution queue and get carried out procedurally until all events in the queue are executed.&lt;br /&gt;
&lt;br /&gt;
Following is the list of scenario events defined in the game (port types in bold indicate that they execute all trigger events that meet the conditions instead of executing the one of the highest priority): &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Port Type&lt;br /&gt;
!Explanation&lt;br /&gt;
!Object Type&lt;br /&gt;
!Object ID&lt;br /&gt;
|-&lt;br /&gt;
|passive&lt;br /&gt;
|Triggered passively; &lt;br /&gt;
&lt;br /&gt;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|talk&lt;br /&gt;
|Triggered when interacting with NPC.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|first_in&lt;br /&gt;
|Triggered when the player enters the game for the first time.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter&lt;br /&gt;
|Triggered when interacting with units on the sandbox map.&lt;br /&gt;
|&lt;br /&gt;
|Control ID of the target Unit.&lt;br /&gt;
|-&lt;br /&gt;
|before_enter_map&lt;br /&gt;
|Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_map&lt;br /&gt;
|Triggered when entering a map.&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_map&lt;br /&gt;
|Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_map&lt;br /&gt;
|Triggered when leaving a map.&lt;br /&gt;
|&lt;br /&gt;
|Current map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_place&lt;br /&gt;
|Triggered when entering the target location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_place&lt;br /&gt;
|Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted)&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_place&lt;br /&gt;
|Triggered when leaving the current location.&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_place&lt;br /&gt;
|Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_building&lt;br /&gt;
|Triggered when entering the target building&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_building&lt;br /&gt;
|Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_building&lt;br /&gt;
|Triggered when leaving the target building.&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_building&lt;br /&gt;
|Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|battle_start&lt;br /&gt;
|Triggered at the start of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|battle_over&lt;br /&gt;
|Triggered at the end of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|set_lord&lt;br /&gt;
|Triggered when AI appoints player as the ruler of a city.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|job_cmd&lt;br /&gt;
|Triggered when the player is given a working order.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|see_warband&lt;br /&gt;
|Triggered when encountering another squad and battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|curplace_inwar&lt;br /&gt;
|Triggered when the location where the player is currently settling in is attacked.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quest_done&lt;br /&gt;
|Triggered when all conditions of a mission are met (mission incomplete).&lt;br /&gt;
|&lt;br /&gt;
|Mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''on_end_work'''&lt;br /&gt;
|Triggered when completing a mission of a location.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|'''occupy_place'''&lt;br /&gt;
|Triggered when the player occupied a location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''new_day'''&lt;br /&gt;
|Triggered when starting a new day.&lt;br /&gt;
|&lt;br /&gt;
|The target number of days.&lt;br /&gt;
|-&lt;br /&gt;
|reward_follower&lt;br /&gt;
|Triggered when the player rewards their followers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reward_player&lt;br /&gt;
|Triggered when the player is rewarded.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dip_event&lt;br /&gt;
|Triggered when the player’s faction meets diplomatic affairs.&lt;br /&gt;
|Affair types:&lt;br /&gt;
&lt;br /&gt;
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice.&lt;br /&gt;
|Target Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_success&lt;br /&gt;
|Triggered when the player’s diplomatic request is met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_fail&lt;br /&gt;
|The diplomatic request is not met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|player_failed&lt;br /&gt;
|Triggered when the player failed in a skirmish. &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reinforce_request&lt;br /&gt;
|Triggered when reinforcement related to player happens.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|is_fall&lt;br /&gt;
|Triggered when a faction collapsed.&lt;br /&gt;
|&lt;br /&gt;
|Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|is_to_fall&lt;br /&gt;
|Triggered when a faction loses all bases and is about to collapse.&lt;br /&gt;
|&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|before_cash_present&lt;br /&gt;
|Triggered before being rewarded (action of rewarding is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|before_present&lt;br /&gt;
|Triggered before sending a gift (action of sending the gift is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_present&lt;br /&gt;
|Triggered when sending a gift.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter_role&lt;br /&gt;
|Triggered before the common dialogue that happens when the player encounters a character.&lt;br /&gt;
|&lt;br /&gt;
|Target Character ID.&lt;br /&gt;
|-&lt;br /&gt;
|helped_camp&lt;br /&gt;
|Triggered when the player encounters a conflict between two sides and helped one side.&lt;br /&gt;
|&lt;br /&gt;
|The faction of the leadrole of target’s squad.&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_up&lt;br /&gt;
|Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_down&lt;br /&gt;
|Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_dismiss&lt;br /&gt;
|Triggered when a squad is dismissed.&lt;br /&gt;
|Squad Type: &lt;br /&gt;
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_into_place&lt;br /&gt;
|Triggered when a squad enters a location.&lt;br /&gt;
|Squad Type: same as above.&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Script Directive List===&lt;br /&gt;
&lt;br /&gt;
Script directives in the game usually follow the format of directive type*parameter 1#parameter2#...#parameter N, and uses line break to separate multiple lines of directives.&lt;br /&gt;
&lt;br /&gt;
Currently, supported script directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Directive&lt;br /&gt;
!Instruction&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
Function: show a dialogue with the typewriter effect and character painting. &lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N.&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
&lt;br /&gt;
 When certain paragraph needs to be bound with audios, add &amp;lt;voice:audio ID&amp;gt; in the front of the paragraph to show the according to the audio file for the words. The audio will be turned off when you skip the paragraph.&lt;br /&gt;
 You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly.&lt;br /&gt;
 When the paragraph begins with “inner:...”, a special piece of information is used;&lt;br /&gt;
 The built-in special information IDs and meanings are as follow:  &lt;br /&gt;
 inner:set_player_job: object’s words when they give orders to player&lt;br /&gt;
 inner:set_player_lord: text when the player is appointed as a ruler&lt;br /&gt;
 inner:self_introduce: self-introduction of a character &lt;br /&gt;
 inner:cur_doing: the content of what the current character has been doing&lt;br /&gt;
 inner:cur_team_intent: intension of the current squad&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side. &lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump-to Event'''&lt;br /&gt;
&lt;br /&gt;
Function: Jump to and execute another specific scenario event ID.&lt;br /&gt;
&lt;br /&gt;
Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0).&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT&lt;br /&gt;
|'''Jump-to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT*scenario event ID.&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT_RETURN&lt;br /&gt;
|'''Return to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump back to the last subevent from the current subevent.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT_RETURN*&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Selection List Box'''&lt;br /&gt;
&lt;br /&gt;
Function:  Based on the text box, after the dialogue content is printed, a selection list box pops up, lets the player choose an option, and returns the result (the according [%result_code%] of the result command in the event).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 when the KEY of an option begins with &amp;quot;+&amp;quot;, the text box will not disappear after the player selects an option. &lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TALK&lt;br /&gt;
|'''Plugin Dialogue Option'''&lt;br /&gt;
Function: a selection list box that can present new options via a trigger list.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by &amp;quot;|&amp;quot;; set to be &amp;quot;any&amp;quot; by default)&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be &amp;quot;any&amp;quot; by default if nothing is filled in), but certain options (whose trigger type is SELECT and meet conditions) will be selected from the trigger and be added as new options; the text shown is bound in the trigger, and the content of the triggered event is decided by the trigger event ID.&lt;br /&gt;
&lt;br /&gt;
 Please note: when using this directive, you need to add &amp;quot;[%result_code%][&amp;gt;]99:EVENTPOJO_EVENT* &amp;quot; to the result&lt;br /&gt;
 In the trigger list, you can add a prefix &amp;quot;SUB_EVENT.&amp;quot; to a trigger event ID to mark it as a subevent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|CMD_SELECT&lt;br /&gt;
|'''System Selection List Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_SELECT*select text info#option group (same as SELECT directive).&lt;br /&gt;
|-&lt;br /&gt;
|CONFIRM&lt;br /&gt;
|'''Text Confirmation Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CONFIRM*text to confirm&lt;br /&gt;
|-&lt;br /&gt;
|TOAST&lt;br /&gt;
|'''Message on Screen'''&lt;br /&gt;
Function: a message pops up on the screen, which disappears after a short while.&lt;br /&gt;
&lt;br /&gt;
Format: TOAST*message content&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text).&lt;br /&gt;
|-&lt;br /&gt;
|GAME_MSG&lt;br /&gt;
|'''In-game News'''&lt;br /&gt;
Function: show a text in the UI message box, which can be reviewed in the News Log.&lt;br /&gt;
&lt;br /&gt;
Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System).&lt;br /&gt;
|-&lt;br /&gt;
|INPUT&lt;br /&gt;
|'''Input Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]).&lt;br /&gt;
&lt;br /&gt;
Format: INPUT*notice text#Len number limit of digit#default text.&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay).&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second).）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable).&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|BLACK_SCREEN&lt;br /&gt;
|'''Screen Curtain'''&lt;br /&gt;
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain.&lt;br /&gt;
&lt;br /&gt;
Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
Function: Set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Annotation:&lt;br /&gt;
 Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity.&lt;br /&gt;
 E.g., 雪,60|雾,20&lt;br /&gt;
 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled&lt;br /&gt;
 For weather effect ID, please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]]&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE&lt;br /&gt;
|'''Start Battle'''&lt;br /&gt;
Function: start a skirmish or a battle defined in a specific battle table.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE*battle ID (if you do not fill in a specific battle ID or fill in “ENCOUNTER”, you start a skirmish)#BGM (optional; if there is a BGM in a particular battle).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH&lt;br /&gt;
|'''Fight with Specific Unit'''&lt;br /&gt;
Function: start a custom fight with a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH*target character info (optional)#minion info of the target (optional)#battle map info (optional)#battle location info (optional)#battlefield weather (optional)#BGM (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH_TAGROLE&lt;br /&gt;
|'''Fight with Target Character'''&lt;br /&gt;
&lt;br /&gt;
Function: start a specific fight with the target character immediately.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH_TAGROLE*battle ID (battle ID is used to trigger scenario event only)#specific BGM (optional; if there is a BGM for a specific battle).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_BGM&lt;br /&gt;
|'''Change Current BGM of the Game'''&lt;br /&gt;
Function: change the current BGM of the game based on the need of stories.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_BGM*parameter 1#paramter 2&lt;br /&gt;
&lt;br /&gt;
 Parameter 1: AudioID of the target BGM (switch back to the default BGM of the current map if this is empty; when the remaining field of this ID is “MUTE”, which means no BGM is played currently).&lt;br /&gt;
 Parameter 2: validation type (0: invalidated when switching scenes; 1: always validated even when you save the game and come back unless you recall the CHANGE_BGM directive and define an empty AudioID).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_SOUND&lt;br /&gt;
|'''Sound Effect'''&lt;br /&gt;
Function: play a sound effect in the game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_ROLE_VOICE&lt;br /&gt;
|'''Play Character Voice-over'''&lt;br /&gt;
Function: play an audio file that is defined in “Voice” of the character’s tags.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|NUMSEL&lt;br /&gt;
|'''Input Value Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]).&lt;br /&gt;
&lt;br /&gt;
Format: NUMSEL*text of input box#min value#max value#default value#item price#price message(when the item price is 0, system does not show the price message. Otherwise, the message needs to follow the format of “{0} Utar(s) for each unit, {1} Utar(s) in total”).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_MONEY&lt;br /&gt;
|'''Change Player’s Money in Hand '''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_MONEY*change value.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_CHANGE_MONEY&lt;br /&gt;
|'''Change a Specific Hero’s Money in Hand'''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_CHANGE_MONEY*Hero ID#change value.&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1).&lt;br /&gt;
|-&lt;br /&gt;
|AI_CAMP_GETITEMS&lt;br /&gt;
|'''All Factions Get Items or Resources'''&lt;br /&gt;
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive.&lt;br /&gt;
&lt;br /&gt;
Format: AI_CAMP_GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_ITEMS&lt;br /&gt;
|'''Convert Item'''&lt;br /&gt;
Function: convert a specific item in the current item list into a new item proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time.&lt;br /&gt;
&lt;br /&gt;
E.g., “TRANSFER_ITEMS*小麦#小麦粉#1#1#10” means converting wheat(小麦) into wheat powder(小麦粉) at a 1:1 proportion. If during the conversion, the original item becomes insufficient, the conversion stops.&lt;br /&gt;
|-&lt;br /&gt;
|GET_RND_ITEM&lt;br /&gt;
|'''Select a Type of Item Randomly'''&lt;br /&gt;
Function: select a type of item randomly among several items.&lt;br /&gt;
&lt;br /&gt;
Format: GET_RND_ITEM*object item list (e.g., GET_RND_ITEMS*茶叶(Tea), 3|面包(Bread), 1|牛奶(Milk), 2. This means that you will get one type of the three.)&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Specific Item or Resource'''&lt;br /&gt;
Function: remove a certain number of items from the item list of the player.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_SELECT_ITEMS&lt;br /&gt;
|'''Remove the Selected Item'''&lt;br /&gt;
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_SELECT_ITEMS*maximum number of selected groups (choose object groups in the front from the selected targets)#number of removal(optional; set -1 by default. When the number is lower than 0 or higher than the number of the object’s stacks, remove the whole group. Otherwise, draw a specific number of all selected targets).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_PRESENT&lt;br /&gt;
|'''Remove Specific Gift Item That Meet Requirement'''&lt;br /&gt;
Function: remove a gift item from the item list based on a specific gift tag.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of &amp;quot;Like&amp;quot; in the mission list.&lt;br /&gt;
|-&lt;br /&gt;
|ITEMS_SELECTOR&lt;br /&gt;
|'''Open Item Selection Text Box'''&lt;br /&gt;
Function: an item selection text box pops up. You can restore your choice in a queriable variable ([%last_seled_items%],[%last_seled_item_id%], etc).&lt;br /&gt;
&lt;br /&gt;
Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list &lt;br /&gt;
|-&lt;br /&gt;
|TEAM_GAINEXP&lt;br /&gt;
|'''Player’s Squad Gains EXP'''&lt;br /&gt;
Function: members in the player’s squad gain average EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|TEST_ADD_ROLE_EXP&lt;br /&gt;
|'''Specific Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEST_ADD_ROLE_EXP*hero ID#exp.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_ROLE_LV&lt;br /&gt;
|'''Change Character Level'''&lt;br /&gt;
Function: change the level of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_ROLE_LV*hero ID#expected level.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_GUARDS_LEVELUP&lt;br /&gt;
|'''All Defending Heroes Level Up'''&lt;br /&gt;
Function: all heroes in a specific location increase their level by 1.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_GUARDS_LEVELUP*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_TEAM_LEVELUP&lt;br /&gt;
|'''All Heroes in Player’s Squad Level UP'''&lt;br /&gt;
Function: all heroes in the player’s squad level up directly.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_TEAM_LEVELUP*.&lt;br /&gt;
|-&lt;br /&gt;
|SETTRIGG&lt;br /&gt;
|'''Set Trigger Switch'''&lt;br /&gt;
Function: turn on or turn off a trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: SETTRIGG*trigger ID#status value (0: On; 1: Off)&lt;br /&gt;
|-&lt;br /&gt;
|TRIGGER&lt;br /&gt;
|'''Execute Trigger'''&lt;br /&gt;
Function: execute a specific trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: TRIGGER*trigger ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_ES&lt;br /&gt;
|'''Manually Set Scenario Event Status'''&lt;br /&gt;
Function: set the execution status of a scenario event manually (after the logics have been executed, the result will be marked with ResultCode of the current event).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event).&lt;br /&gt;
|-&lt;br /&gt;
|SETINTVAR&lt;br /&gt;
|'''Set Custom Int Variable'''&lt;br /&gt;
Function: set a custom int variable (recorded by saves). Some variable fields will be connected the in-game logic parameter (for custom int variable that are defined inside the program, please see the“[[Common Scenario Directives#Built-in Custom Variable Field|Built-in Custom Variable Field]]”) and can be queried via built-in query parameter ([%int_val:ID%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETINTVAR*parameter ID#current int value&lt;br /&gt;
|-&lt;br /&gt;
|CHANGEINTVAR&lt;br /&gt;
|'''Change Custom Int Variable'''&lt;br /&gt;
Function: change the value of the current custom int variable.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TEMP_ID&lt;br /&gt;
|'''Set Temporary ID Variable'''&lt;br /&gt;
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TEMP_ID*ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETSTRVAR&lt;br /&gt;
|'''Set Custom String Variable'''&lt;br /&gt;
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETSTRVAR*Variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIMETAG&lt;br /&gt;
|'''Tag a Custom Crucial Time Point '''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can use [%tag_gametime_elapse%] to load the time span since the time point you record.&lt;br /&gt;
&lt;br /&gt;
Please note: this directive is only used to transfer temporary variables in a series of stories, and the tag will not be stored in saves. Do not use this for scenes that need permanent data.&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIMETAG*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIME&lt;br /&gt;
|'''Tag a Custom In-game Time Point'''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can query the relevant info of this time point via query parameter (see[%gametime_elapse%] and [%gametime_elapse_by_day%], etc.).&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIME*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CUSTOM_CD&lt;br /&gt;
|'''Set a Custom Cooldown Time'''&lt;br /&gt;
Function: set a custom cooldown timer and see whether the current cooldown is in use by checking if [%is_custom_cd:ID%] is 1 or not.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;＞0: set a specific time (count by day)).&lt;br /&gt;
|-&lt;br /&gt;
|GET_QUEST&lt;br /&gt;
|'''Claim a Mission'''&lt;br /&gt;
Function: claim a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: GET_QUEST*mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_QS&lt;br /&gt;
|'''Add Mission Subitem Counter'''&lt;br /&gt;
Function: add a subitem counter of missions manually.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter.&lt;br /&gt;
|-&lt;br /&gt;
|SETQUESTIEM&lt;br /&gt;
|'''Set Value of Mission Subitem'''&lt;br /&gt;
Function: set the value of the subitem of missions.&lt;br /&gt;
&lt;br /&gt;
Format: SETQUESTIEM*mission ID#subitem index#value&lt;br /&gt;
|-&lt;br /&gt;
|DONE_QUEST&lt;br /&gt;
|'''Complete a Mission'''&lt;br /&gt;
Function: mark and complete a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: DONE_QUEST*mission ID#reward or not(1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_IMG&lt;br /&gt;
|'''Show a Character Painting Frame'''&lt;br /&gt;
Function: [not suggested; recommend using the SHOW_CG direcitve].&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*name of image*preset special effect 0*duration (second).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_IMG&lt;br /&gt;
|'''Disable Character Painting Frame'''&lt;br /&gt;
Function: disable the current character painting frame.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_IMG*preset special effect 0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_ROLE&lt;br /&gt;
|'''Force Character to Join'''&lt;br /&gt;
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel.&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_ROLE&lt;br /&gt;
|'''Force Character to Leave'''&lt;br /&gt;
Function: force a character to leave your squad.&lt;br /&gt;
&lt;br /&gt;
Format: QUIT_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE&lt;br /&gt;
|'''Change Location Status'''&lt;br /&gt;
Function: set the current status of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLEPOS&lt;br /&gt;
|'''Set Character Position'''&lt;br /&gt;
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLEPOS*character ID#position info&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_PLACE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport Player to Specific Position'''&lt;br /&gt;
Function: teleport player’s squad to a specific position in the world.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*world position info.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_PLACE&lt;br /&gt;
|'''Teleport Player to Specific Location'''&lt;br /&gt;
Function: teleport player’s squad to a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_PLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_ROLE&lt;br /&gt;
|'''Teleport Player to Target Character'''&lt;br /&gt;
Function: teleport player’s squad to where the target character is currently staying (this only works when the target is in a squad or a location).&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CMD&lt;br /&gt;
|'''Exclusive Directive Group for Unit Control on Sandbox Map '''&lt;br /&gt;
Function: control various units to execute specific directives on a sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: MAP_CMD*directive content&lt;br /&gt;
&lt;br /&gt;
 Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes).&lt;br /&gt;
 Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate.&lt;br /&gt;
 Hide current battle mark: HIDE_BATTLE_MARK#1.&lt;br /&gt;
|-&lt;br /&gt;
|RESTORE&lt;br /&gt;
|'''Player’s Squad Get Recovered'''&lt;br /&gt;
Function: all units in the player’s squad are recovered.&lt;br /&gt;
&lt;br /&gt;
Format: RESTORE*parameter (&amp;lt;=0: squad fully recovered; &amp;gt;0: squad recovered by a specific point).&lt;br /&gt;
|-&lt;br /&gt;
|TIME_ELAPSE&lt;br /&gt;
|'''Time Acceleration'''&lt;br /&gt;
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up.&lt;br /&gt;
&lt;br /&gt;
Format: TIME_ELAPSE*in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#show time bar (0: No(default); 1: Yes)#operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|WAIT_EXEC&lt;br /&gt;
|'''Wait and Execute a Script Event'''&lt;br /&gt;
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: WAIT_EXEC* in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#script event ID #operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSEIGE&lt;br /&gt;
|'''Open Siege Management Panel'''&lt;br /&gt;
Function: show a siege management panel and operate reinforcement squads based on the preset (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
Format: OPENSEIGE*panel mode(0: attack city; 1: defend city)#target location ID (optional; set to be the target location of the current environment variable by default).&lt;br /&gt;
|-&lt;br /&gt;
|OCCUPY&lt;br /&gt;
|'''Execute City Occupation'''&lt;br /&gt;
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
&lt;br /&gt;
Format: OCCUPY*0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_WARBAND&lt;br /&gt;
|'''Join Warband'''&lt;br /&gt;
Function: joined an existed warband（a group of fighting squads from two different sides） (use [$tagwb:id$] to obtain the Warband info of the current skirmish).&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_WARBAND*warband ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_CAMP&lt;br /&gt;
|'''Change Character Faction'''&lt;br /&gt;
Function: change the faction of a target character directly.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_CAMP*faction ID#target character ID#recruiter ID(if this field is player then the character will join the player’s squad directly).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_OWN_CAMP&lt;br /&gt;
|'''Player Creates Their Faction'''&lt;br /&gt;
Function: player creates and activates their own faction. Player’s faction has a fixed default ID: Self-built Faction. This faction exists since the beginning of the game, but it is inactivated. Calling this directive will activate the player’s faction, making player and their followers join this faction.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_OWN_CAMP*name of self-built faction.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_ACTIVE&lt;br /&gt;
|'''Change Faction Project Status'''&lt;br /&gt;
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_RL&lt;br /&gt;
|'''Change Faction Relationship'''&lt;br /&gt;
Function: change diplomatic relationship or friendliness between factions.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_RL*faction A#faction B#relationship (-1: Remain the same; 0: Neutral; 1: Hostile; 2: Friendly)#friendliness value change#expected friendliness value (if this field exists).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_CAMP_REP&lt;br /&gt;
|'''Change Player’s Prestige (Tribute) towards Faction'''&lt;br /&gt;
Function: change player’s prestige (Tribute) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_CAMP_REP*target faction ID#value change#expected value (this works when the value is not empty). The faction refers to the player’s current faction if the faction ID is empty.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_REP&lt;br /&gt;
|'''Change Player’s Prestige (Friendliness) towards Faction'''&lt;br /&gt;
Faction: change the player’s prestige (Friendliness) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|FAME&lt;br /&gt;
|'''Change Player’s Global Prestige'''&lt;br /&gt;
Function: change the player’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: FAME*value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_FAME&lt;br /&gt;
|'''Change Character’s Global Prestige'''&lt;br /&gt;
Function: change a specific character’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_FAME*target character ID#value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PERSON_FV&lt;br /&gt;
|'''Change Favor between the Player and a Character'''&lt;br /&gt;
Function: change favor between the player and another character.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_ACTIVE&lt;br /&gt;
|'''Change Character Project Status'''&lt;br /&gt;
Function: change the project status of a character (not controlled by the player). When this character is inactive, they will not be refreshed in Taverns or execute AI actions like moving.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PROSP_BY_CAMP&lt;br /&gt;
|'''Change Prosperity of All Bases of Faction'''&lt;br /&gt;
Function: change the prosperity of all bases of a specific faction proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PROSP_BY_CAMP*faction ID#percentage(&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY&lt;br /&gt;
|'''Change Location Prosperity''' &lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY*location ID#value change#expected value (this works when the value is not empty; cannot exceed the maximum Prosperity of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY_BY_PCT&lt;br /&gt;
|'''Change Location Prosperity by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF&lt;br /&gt;
|'''Change Location Defense'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Defense of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF*location ID#value change#expected value(this works when the value is not empty; cannot exceed the maximum Defense of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF_BY_PCT&lt;br /&gt;
|'''Change Location Defense by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the defense of a location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_SECURITY&lt;br /&gt;
|'''Change Location Security'''&lt;br /&gt;
&lt;br /&gt;
Function: change the security of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CUSTOM_INT&lt;br /&gt;
|'''Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: a custom int field value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. &lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_CUSTOM_INT&lt;br /&gt;
|'''Change Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the custom int value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_ADD_BUILDING&lt;br /&gt;
|'''Add Custom Facility'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom facility to a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_REMOVE_BUILDING&lt;br /&gt;
|'''Remove Custom Facility from Location'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom facility from a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_REMOVE_BUILDING*location ID#facility ID.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_CARAVAN&lt;br /&gt;
|'''Create Caravan'''&lt;br /&gt;
&lt;br /&gt;
Function: create a caravan in a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_TEAM&lt;br /&gt;
|'''Create Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad, which takes actions according to specific directives.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_TEAM*position on the map#faction#character list (characters included will leave their current squads or locations compulsorily)#minion card list (card ID#level, number |card ID2#level 2, number 2|.......)#directive method (see below)#directive parameter#squad TAG(used to search for specific squads).&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive methods are:&lt;br /&gt;
&lt;br /&gt;
· 0: custom directive: the parameter of the custom directive is the directive for the squad (format: directive type 1, parameter 1; directive type 2, parameter 2;……; directive type N, parameter N) For detailed directive format, please see the Squad Preset Directive.&lt;br /&gt;
&lt;br /&gt;
· 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default).&lt;br /&gt;
&lt;br /&gt;
· 2: premade directive of invading faction: the parameter is the ID of the target faction, priority of target (0: Distance first; 1: Defense first), invasion method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|DISMISS_TEAM&lt;br /&gt;
|'''Dismiss Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss a specific squad.&lt;br /&gt;
&lt;br /&gt;
Format: DISMISS_TEAM*map unit identification ID&lt;br /&gt;
|-&lt;br /&gt;
|TEAM_ORDER&lt;br /&gt;
|'''Change Squad Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: change the current directive list of the squad.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_PLACE&lt;br /&gt;
|'''Attack Location'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside.&lt;br /&gt;
&lt;br /&gt;
Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_CAMP&lt;br /&gt;
|'''Attack Faction'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to attack another faction immediately. Please note: these two factions must be hostile towards each other or both stand neutral. If the attacker does not have sufficient military power, the attack might not happen.&lt;br /&gt;
&lt;br /&gt;
Format: IVASION_CAMP*attacker (faction) ID#target faction ID#priority of target(0: Distance first; 1: Defense first)#invasion type (0: Occupation; 1:Raid)#number of bases involved (0: All; &amp;gt;0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel with a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_LOCAL_PRODUCT&lt;br /&gt;
|'''Add Map Specialty'''&lt;br /&gt;
&lt;br /&gt;
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y.&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERMISSION&lt;br /&gt;
|'''Set Trade Permission'''&lt;br /&gt;
&lt;br /&gt;
Function: set trade permission for a location.&lt;br /&gt;
&lt;br /&gt;
Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|TROOPS_ALLOC&lt;br /&gt;
|'''Garrison Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the garrison panel of a location.&lt;br /&gt;
&lt;br /&gt;
Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|GETSKILL&lt;br /&gt;
|'''Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill to a character.&lt;br /&gt;
&lt;br /&gt;
Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills).&lt;br /&gt;
|-&lt;br /&gt;
|LEARN_SKILL&lt;br /&gt;
|'''Consume Skill Point to Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character in a squad and make them learn a new skill. If they do not have enough skill point, they cannot learn the skill.&lt;br /&gt;
&lt;br /&gt;
Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVESKILL&lt;br /&gt;
|'''Forget Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a skill from a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills)&lt;br /&gt;
|-&lt;br /&gt;
|RESET_SP&lt;br /&gt;
|'''Reset Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the skill points of a character.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_SP*character ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_UNUSEDSP&lt;br /&gt;
|'''Change Available Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill point to a player and allocate the skill point.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_UNUSEDSP*number of skill point.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SKILLPAGE&lt;br /&gt;
|'''Activate or Remove Player’s Skill Page'''&lt;br /&gt;
&lt;br /&gt;
Function: activate or remove a skill page of the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_TEAMINFO&lt;br /&gt;
|'''Show Info of Current Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: show the information on the current squad that you encounter.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_TEAMINFO*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_FLAG&lt;br /&gt;
|'''Set Complete Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story.&lt;br /&gt;
&lt;br /&gt;
Format: SET_FLAG*name of the mark#mark value.&lt;br /&gt;
|-&lt;br /&gt;
|UPDATE_MARKS&lt;br /&gt;
|'''Mark Update'''&lt;br /&gt;
&lt;br /&gt;
Function: update marks on the map.&lt;br /&gt;
&lt;br /&gt;
Format: UPDATE_MARKS*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUMMY&lt;br /&gt;
|'''Set Dummy or Creep Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode on Sandbox Map'''&lt;br /&gt;
&lt;br /&gt;
Function: control the camera mode on the sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter&lt;br /&gt;
&lt;br /&gt;
and meanings of the parameters:&lt;br /&gt;
&lt;br /&gt;
0: follows the player’s character. No parameter (default).&lt;br /&gt;
&lt;br /&gt;
1: follows a specific target. The parameter is the particular map unit identification ID.&lt;br /&gt;
&lt;br /&gt;
2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Map'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of all cities on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|TRY_RECRUIT_FREE_ROLE&lt;br /&gt;
|'''Try Neutral Hero Recruitment'''&lt;br /&gt;
&lt;br /&gt;
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full).&lt;br /&gt;
&lt;br /&gt;
Format: TRY_RECRUIT_FREE_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHK_RECRUIT_CAPTIVE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_CAP&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|SEND_ENVOY&lt;br /&gt;
|'''Send Diplomatic Envoy'''&lt;br /&gt;
&lt;br /&gt;
Function: send a diplomatic envoy for specific diplomatic missions.&lt;br /&gt;
&lt;br /&gt;
Format: SEND_ENVOY*faction ID (refer to player’s faction when empty)#diplomatic behaviour (1: Ransom; 2:Friendly; 3: War; 4: Alliance; 5: Alliance broke; 6: Armistice)#target ID (when you ransomed a character, it is the character ID; otherwise it is the target faction ID)#additional parameter(usually it is the required amount of money)#envoy arrival (1: No waiting time; 0: Need to wait).&lt;br /&gt;
|-&lt;br /&gt;
|DIP_DECIDE&lt;br /&gt;
|'''Execute Diplomatic Event Check'''&lt;br /&gt;
&lt;br /&gt;
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event).&lt;br /&gt;
&lt;br /&gt;
Format: DIP_DECIDE*result code (1: Agreement; 0: Decline).&lt;br /&gt;
|-&lt;br /&gt;
|EXPEL_ROLE&lt;br /&gt;
|'''Expel Character'''&lt;br /&gt;
&lt;br /&gt;
Function: expel a character out of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: EXPEL_ROLE*faction ID#character ID.&lt;br /&gt;
|-&lt;br /&gt;
|TRY_REWARD_ROLE&lt;br /&gt;
|'''Try to Reward a Follower'''&lt;br /&gt;
&lt;br /&gt;
Function: try to reward a follower.&lt;br /&gt;
&lt;br /&gt;
Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Add Global Buff to Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: add a global buff to the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_GLOBAL_BUFF*buffID#duration (in-game days)#number of stacks (set 1 by default)#upper limit of stacks (set -1 by default, no limit).&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF*buffID&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF_BYCLASS&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove All Global Buffs of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all global buffs of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_FAILED&lt;br /&gt;
|'''Game Failed'''&lt;br /&gt;
&lt;br /&gt;
Function: a common result of the player failing their game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_FAILED*1.&lt;br /&gt;
|-&lt;br /&gt;
|LOSE_INVENTORY&lt;br /&gt;
|'''Player Loses Common Items'''&lt;br /&gt;
&lt;br /&gt;
Function: the player loses their items once (only goods and money).&lt;br /&gt;
&lt;br /&gt;
Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGROLE&lt;br /&gt;
|'''Change Object Character of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object character of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGPLACE&lt;br /&gt;
|'''Change Object Location of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object location of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGPLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|SURRENDER&lt;br /&gt;
|'''Faction Surrenders'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender).&lt;br /&gt;
&lt;br /&gt;
Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter&lt;br /&gt;
|-&lt;br /&gt;
|GEN_RND_PLACE&lt;br /&gt;
|'''Select Random Location to Query'''&lt;br /&gt;
&lt;br /&gt;
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives.&lt;br /&gt;
&lt;br /&gt;
Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction)&lt;br /&gt;
|-&lt;br /&gt;
|HERO_UPGRADE&lt;br /&gt;
|'''Hero Enhancement'''&lt;br /&gt;
&lt;br /&gt;
Function: enhance an attribute permanently of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit).&lt;br /&gt;
|-&lt;br /&gt;
|HERO_SET_STATU&lt;br /&gt;
|'''Set Character Attribute Field'''&lt;br /&gt;
&lt;br /&gt;
Function: set a value of an attribute field for a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_BUFF&lt;br /&gt;
|'''BUFF Add Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: add a faction buff to a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_BUFF*faction ID#buff ID#duration (in-game days; when this value is lower than 0, the buff becomes permanent unless it is removed compulsorily).&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF&lt;br /&gt;
|'''Remove Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF*faction ID#buff ID.&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF_BYCLASS&lt;br /&gt;
|'''Remove Faction Buff by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''Remove All Faction Buffs'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all faction buffs from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Add Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: add a dynamic attribute field to a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Reset Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: reset all values in the dynamic attribute field in a faction.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_CAMP_EXTRA_STATU*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|WEAPON_DURABILITY_DOWN&lt;br /&gt;
|'''Weapon Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of the current weapon. When the durability is below 0, the weapon is destroyed. If the weapon’s durability is -1 (does not have durability), nothing happens with this directive.&lt;br /&gt;
&lt;br /&gt;
Format: WEAPON_DURABILITY_DOWN*value.&lt;br /&gt;
|-&lt;br /&gt;
|ITEM_DURABILITY_DOWN&lt;br /&gt;
|'''Specific Item Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of an item (with the right tag and meets the level condition(&amp;gt;= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed.&lt;br /&gt;
&lt;br /&gt;
Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SYNTH_STATE&lt;br /&gt;
|'''Set Status of Recipe'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific recipe.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned)&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SYNTH_DLG&lt;br /&gt;
|'''Open Item Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of item crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SYNTH_DLG*if locked (0: Do not lock the main category; 1: Lock display category)#catagory page shown by default (can be set empty by default; use “,” to separate pages; show the first page by default; this field can show hidden categories when the main category is locked)#story key to execute after closing the crafting dialogue (can be empty).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CARD_SYNTH_DLG&lt;br /&gt;
|'''Open Card Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of card crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CARD_SYNTH_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_EFT&lt;br /&gt;
|'''Play Special Effect'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect on the current map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#map coordinate#initial rotation degree (can be the rotation vector of the three directions or a spinning degree of the Y-axis)#scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_MU_EFT&lt;br /&gt;
|'''Unit Following Special Effect on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect that follows a unit on a specific map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_MU_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#map unit ID#object range (0: hero only; 1: all units)#initial rotation degree (can be the rotation vector of the three directions, or a spinning degree of the Y-axis))# scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_MAPAREA_SELECTOR&lt;br /&gt;
|'''Open Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a UI panel of area selector on the current sandbox map. You can select a location for the current object in the predefined area on this panel, and then a result is returned. If the result_code returns 1, the location setting succeeded; if 0, the setting failed. The location info is recorded in [$last_selpos$].&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_FREEAREA_SELECTOR&lt;br /&gt;
|'''Open Free Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_SELECTOR&lt;br /&gt;
|'''Open Location Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a suggested location selector panel. Selected result will be stored in [$tagplace$], its number stored in [%result_code%].If [%result_code%] is 9999, player cancels the selection. &lt;br /&gt;
&lt;br /&gt;
Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter).&lt;br /&gt;
|-&lt;br /&gt;
|SET_LORD&lt;br /&gt;
|'''Set City Ruler'''&lt;br /&gt;
&lt;br /&gt;
Function: set a city ruler for a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_LORD*character ID#location ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_CHEST&lt;br /&gt;
|'''Add a Custom Chest'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom chest on the world map according to the setting info (this “chest” can be any interactive object on the world map, such as materials, ruins, and soldier recruitment point).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (&amp;gt;0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CHEST&lt;br /&gt;
|'''Set Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a controllable chest on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CHEST*map ID#chest ID#status (&amp;gt;0: How many times you can open the chest; &amp;lt;=0: Chest Opened).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CURCHEST&lt;br /&gt;
|'''Set Current Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of the target chest in the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CURCHEST*statu (same as SET_CHEST).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_SYSTEM_UI&lt;br /&gt;
|'''Turn Off System UI'''&lt;br /&gt;
&lt;br /&gt;
Function: turn of the current system UI.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_SYSTEM_UI*.&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_ITEM_PANEL&lt;br /&gt;
|'''Close Bag UI'''&lt;br /&gt;
&lt;br /&gt;
Function: close the current UI panel of the player’s bag (if it exists).&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_ITEM_PANEL*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLES_SELECTOR&lt;br /&gt;
|'''Turn Off Character Selector UI'''&lt;br /&gt;
Function: turn off the current system UI of the character selector.&lt;br /&gt;
&lt;br /&gt;
Format: ROLES_SELECTOR*title of selection list box#number limit of options (&amp;lt;0: No limit)#option range (0: Global non-template character; 1: Player squad character; 2: Character in the Character Table)#conditional expression#parameter (the parameter is the character list when the selection range is the specific Character Table).&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
 ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&amp;amp;[$tagrole:campid$][&amp;lt;&amp;gt;][$null$]#&lt;br /&gt;
 ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4.&lt;br /&gt;
The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%].&lt;br /&gt;
|-&lt;br /&gt;
|ASK_ABOUT_SOMEBODY_SELECTOR&lt;br /&gt;
|'''Ask-about Character Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: the character who you ask whereabout of is currently not involved in the logic calculation. The character selection list box pops up, and the result is stored in [%arg_str_val1%]. When the result [%result_code%] is 9999, player cancels the selection.&lt;br /&gt;
&lt;br /&gt;
Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about.&lt;br /&gt;
|-&lt;br /&gt;
|CARD_SELECTOR&lt;br /&gt;
|'''Card Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: show the panel of current card list for the player to select.&lt;br /&gt;
&lt;br /&gt;
Format: CARD_SELECTOR*title of selection list box#number limit of selection (&amp;lt;0: No limit)#selection range (0: Card in the player squad; 2: Specific unit list) #parameter (optional; the parameter is the unit list when the selection range is the specific Unit Table).&lt;br /&gt;
|-&lt;br /&gt;
|ASSEMBLE_ARMY&lt;br /&gt;
|'''Gather Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: gather all troops and followers of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ASSEMBLE_ARMY#Gatherer ID#follower ID (can be empty; use “|” to separate; can use [%last_seled_roles%], the result of ROLES_SELECTOR). If the follower ID is empty, all characters under the faction are selected by default.&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_ALL_ASSEMBLE_ARMY&lt;br /&gt;
|'''Dismiss All Gathered Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss all troops that have been gathered or gathering.&lt;br /&gt;
&lt;br /&gt;
Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_IN_PROJECT&lt;br /&gt;
|'''Character Starts to Execute Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a character starts to execute a specific project.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_IN_PROJECT*character ID#project ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_FINISH_PROJECT&lt;br /&gt;
|'''Character Ends Current Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific character ends their current project compulsorily.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,...&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PROJECT_ADMIN&lt;br /&gt;
|'''Open Personal Project Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the personal project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default).&lt;br /&gt;
|-&lt;br /&gt;
|GROUP_PROJECT_ADMIN&lt;br /&gt;
|'''Open Group Project Panel'''&lt;br /&gt;
Function: open the group project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default).&lt;br /&gt;
 Currently, supported project binding types are:&lt;br /&gt;
 Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty&lt;br /&gt;
 world: custom building construction; object parameter format: custom area control ID; belong to which base (when this field is empty, the building does not belong to any city).&lt;br /&gt;
|-&lt;br /&gt;
|SET_REVIVE_POS&lt;br /&gt;
|'''Set Respawn Position'''&lt;br /&gt;
&lt;br /&gt;
Function: set a new respawn position.&lt;br /&gt;
&lt;br /&gt;
Format: SET_REVIVE_POS*world map position (map ID:x,y).&lt;br /&gt;
|-&lt;br /&gt;
|SET_SILENCE_MODE&lt;br /&gt;
|'''Set Silence Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable message silence mode. &lt;br /&gt;
&lt;br /&gt;
Format: SET_SILENCE_MODE*silence mode (0: Disabled; 1: Do not show TOAST box and deliver messages only; TOAST info of obtaining items is shown in the message; 2: Do not show TOAST and messages).&lt;br /&gt;
|-&lt;br /&gt;
|START_RAID_PLACE&lt;br /&gt;
|[Abolished]&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_PLACE&lt;br /&gt;
|'''Add Custom Location'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom location on a specific spot on the world map.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_PLACE*custom location ID (globally unique)#belong to the city (can be empty; the location does not belong to any city when this field is empty#location info template ID#location info#default faction of the location.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_NAME&lt;br /&gt;
|'''Change Location Name'''&lt;br /&gt;
&lt;br /&gt;
Function: change the name of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_NAME*location ID#custom name. &lt;br /&gt;
|-&lt;br /&gt;
|OPEN_PLACE_BUILD_UI&lt;br /&gt;
|'''Open Location Building Construction Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the location building construction panel.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD&lt;br /&gt;
|'''Add New Card'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD_PIECE&lt;br /&gt;
|'''Add Card with Specific Durability'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card, whose durability is a specific number (lower than the durability limit).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|SET_OBS_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of an obstacle area on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_AREA&lt;br /&gt;
|'''Explore Area'''&lt;br /&gt;
&lt;br /&gt;
Function: explore an area of the current map (dispel the war fog).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_MAP&lt;br /&gt;
|'''Explore the Whole Map'''&lt;br /&gt;
&lt;br /&gt;
Function: explore the whole map (dispel the war fog of the entire map).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_MAP*map ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTVAL_WATCHER&lt;br /&gt;
|'''Add Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. &lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTVAL_WATCHER*variable monitor info.&lt;br /&gt;
&lt;br /&gt;
(Format: field Key1,displayed name1,enumerated value 1a=enumerated name1a|enumerated value 1b=enumerated name1b|...|enumerated value 1N=enumerated name 1N, visibility status in battles([optional，set 0 by default] 0: No; 1: Yes);...; monitor field info N).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTVAL_WATCHER&lt;br /&gt;
|'''Remove Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom variable monitor filed.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTVAL_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_INTVAL_WATCHERS&lt;br /&gt;
|'''All Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: exact all variable monitor fields.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_INTVAL_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set an event timer, and a specific event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (&amp;lt;0: the timer is closed; when the timer type is Preset, this parameter is the number of days since the beginning of the game; when the timer type is Countdown, the parameter is the number of days)#timer type (0: Preset (triggered when time is reached); 1: Countdown)#Event ID when time reached#compulsory update (1: Compulsory update; 0: Non-compulsory update(will not change the current data of existing timer); set 1 if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER&lt;br /&gt;
|'''Remove Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER*timer ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TIMER_TIME&lt;br /&gt;
|'''Change Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: increase/decrease the time of a timer.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_TIMER_WATCHER&lt;br /&gt;
|'''Add Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] &lt;br /&gt;
&lt;br /&gt;
coefficient of the scaling of time parameter), visibility in battles ([optional; set 0 by default]; 0: No; 1: Yes)|...|timer ID N, displayed time format N, scale parameter N.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER_WATCHER&lt;br /&gt;
|'''Remove Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the monitor field of a custom event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_TIMER_WATCHERS&lt;br /&gt;
|'''Clear All Monitor Fields of Custom Event Timer''' &lt;br /&gt;
&lt;br /&gt;
Function: clear all monitor fields of custom event timer.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_TIMER_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_RECRUIT_CARD_IN_PLACE&lt;br /&gt;
|'''Open City Recruitment Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the player’s recruitment panel in a city.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_RECRUIT_CARD_IN_PLACE*city ID#ID of the event executed after recruitment (optional)#ID of the event executed after player cancels the recruitment (optional).&lt;br /&gt;
|-&lt;br /&gt;
|STORY_CARD_START&lt;br /&gt;
STORY_CARD_LINE&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END&lt;br /&gt;
|'''Open Story Card (2D Image)''' '''Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the story card panel. There must be a STORY_CARD_START and a STORY_CARD_END to avoid errors. STORY_CARD_LINE stands for the story paragraphs that need to be put between the start and the end (no number limit).&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_START*file name of the card.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 1.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 2.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 3.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END*.&lt;br /&gt;
|-&lt;br /&gt;
|AUTOSAVE&lt;br /&gt;
|'''AutoSave'''&lt;br /&gt;
&lt;br /&gt;
Function: execute autosave immediately.&lt;br /&gt;
&lt;br /&gt;
Format: AUTOSAVE*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Saving Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game-saving dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SAVE_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Loading Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game loading dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_LOAD_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|EXCHANGE_CARD&lt;br /&gt;
|'''Open Card Exchange Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the card exchange panel.&lt;br /&gt;
&lt;br /&gt;
Format: EXCHANGE_CARD*object type (0: Location; 1: Squad)#object ID([optional; set to be the current location by default]; when the object is a location, the ID is the location ID, squad ID for squad object).&lt;br /&gt;
|-&lt;br /&gt;
|LEVEL_FINISH&lt;br /&gt;
|'''Complete Level'''&lt;br /&gt;
&lt;br /&gt;
Function: used in scenarios to indicate the accomplishment of a level.&lt;br /&gt;
&lt;br /&gt;
Format: LEVEL_FINISH*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA_FILTER&lt;br /&gt;
|'''Set Camera Filter'''&lt;br /&gt;
&lt;br /&gt;
Function: set a filter for the camera. &lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10).&lt;br /&gt;
&lt;br /&gt;
Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100.&lt;br /&gt;
|-&lt;br /&gt;
|TLACTION&lt;br /&gt;
|'''Timeline Action'''&lt;br /&gt;
&lt;br /&gt;
Function: specific units on the world map do TIMELINE actions.&lt;br /&gt;
&lt;br /&gt;
Format: TLACTION*map character ID#file name of Timeline action#lasting time of action.&lt;br /&gt;
|-&lt;br /&gt;
|SELECTION_VIEW&lt;br /&gt;
|'''Fullscreen Special Story Selection'''&lt;br /&gt;
&lt;br /&gt;
Function: open a fullscreen selection panel of a special story.&lt;br /&gt;
&lt;br /&gt;
Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*).&lt;br /&gt;
|-&lt;br /&gt;
|DIALOG_BUBBLE&lt;br /&gt;
|'''Map Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying.&lt;br /&gt;
|-&lt;br /&gt;
|TEXT_EXPLORE_START&lt;br /&gt;
TEXT_EXPLORE_OVER&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD&lt;br /&gt;
|'''Text Adventure Relevant'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific text adventure mode.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_OVER*. Ends the current instance.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_CG&lt;br /&gt;
|'''Show CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: create an interface for showing CG images (please note: after enabling this function, you need to use HIDE_CG* manually to hide the CG. Otherwise the CG will get to player).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_CG*image name (no suffix; if this field is empty, the background will become black. The relevant directory is: Assets\BuildSource\Backgrounds\. Only .png file accepted).&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_CG&lt;br /&gt;
|'''Hide CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: hide the CG interface.&lt;br /&gt;
&lt;br /&gt;
Format: HIDE_CG*.&lt;br /&gt;
|-&lt;br /&gt;
|GENERATE_RANDOM_CARD&lt;br /&gt;
|'''Select a Card Randomly'''&lt;br /&gt;
&lt;br /&gt;
Function: select a card randomly, which will be stored in the tag card of the current variable.&lt;br /&gt;
&lt;br /&gt;
Format: GENERATE_RANDOM_CARD#1.&lt;br /&gt;
|-&lt;br /&gt;
|VOICE_OVER&lt;br /&gt;
|'''Voice Over'''&lt;br /&gt;
&lt;br /&gt;
Function: show a voice-over interface.&lt;br /&gt;
&lt;br /&gt;
Format: VOICE_OVER*voice over the content.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_STORYARMY&lt;br /&gt;
|'''Create a Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad only for stories.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_STORYARMY*tagkey#map position#faction#character list (all selected characters will leave their current squads or locations compulsorily)#card unit list (card ID1,number1,level1|card ID2,number 2,level 2|.......)#movement info (e.g., WANDER,2500).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_STORYARMY&lt;br /&gt;
|'''Remove Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a story squad.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_STORYARMY*tagkey.&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_BUY_ITEM&lt;br /&gt;
|'''Bazaar Merchant Buy-in'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants buy items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_SELL_ITEM&lt;br /&gt;
|'''Bazaar Merchant Sell-out'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants sell items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SHOWROLE&lt;br /&gt;
|'''Show Character Painting'''&lt;br /&gt;
Function: show character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;painting position &lt;br /&gt;
|-&lt;br /&gt;
|HIDEROLE&lt;br /&gt;
|'''Hide Character Painting'''&lt;br /&gt;
Function: hide character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: HIDEROLE*position of character 1 painting (#position of character 2 painting) (optional).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; L stands hiding the painting on the left side, R for hiding the painting on the right side.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_QUEST_ASK&lt;br /&gt;
|'''Mission Query'''&lt;br /&gt;
&lt;br /&gt;
Function: add a mission query that meets conditions based on the standard SELECT directive.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_QUEST_ASK*.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TEAMROLE&lt;br /&gt;
|'''Select Squad Character'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character from a squad.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TEAMROLE*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PLAYER_ACTIVE&lt;br /&gt;
|'''Activate Character Indo Status'''&lt;br /&gt;
&lt;br /&gt;
Function: make a character visible on the “Report” interface and import the character ID (this is usually used in scenarios. E.g., the tavern ladies).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PLAYER_ACTIVE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_ORDER&lt;br /&gt;
|'''Built-in Character Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: give some built-in directives to a character and execute these directives immediately. &lt;br /&gt;
&lt;br /&gt;
Format: ROLE_ORDER*character ID [refer to the current target character when this field is empty]#directive code: refer to Directive Parameter Table.&lt;br /&gt;
&lt;br /&gt;
The current directive code supports:&lt;br /&gt;
&lt;br /&gt;
*RETURN_JOBCITY: the character goes back to the location they belong to. No parameter. If the character is the squad leader, the squad directive is changed directly; if the character is not a squad leader, they leave the current squad and go back to the original squad; if they are in another location, they create a squad and return.&lt;br /&gt;
&lt;br /&gt;
*GOTO_PLACE: the character goes to the target location. The parameter is the target location ID.&lt;br /&gt;
&lt;br /&gt;
*JOIN_PLAYER_TEAM: the character joins the player’s squad directly. No parameter.&lt;br /&gt;
&lt;br /&gt;
*FOLLOW_ME: the character comes to rally and follows the player’s squad. No parameter.&lt;br /&gt;
&lt;br /&gt;
*EXPEL_FROM_CAMP: expel the character from their faction. No parameter.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTERACTIVE_MSG&lt;br /&gt;
|'''Add Interactive Message'''&lt;br /&gt;
Function: add a custom interactive message and show it in the corresponding UI.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTERACTIVE_MSG*info type#title#info text #parameter text#duration(&amp;lt;=0: Permanent; &amp;gt;0: number of days)#message sender info #TAG parameter.&lt;br /&gt;
&lt;br /&gt;
Currently supported message types are:&lt;br /&gt;
&lt;br /&gt;
msg (message); request; finance.&lt;br /&gt;
&lt;br /&gt;
When the message type is not financed, the format of the parameter text is:&lt;br /&gt;
 Parameter Key1: parameter value 1;parameter Key2:parameter value 2;...;parameter Key N:parameter N&lt;br /&gt;
Currently, the built-in KEY types of system are:&lt;br /&gt;
&lt;br /&gt;
*ask: assign this message to be a request with at most 2 directive options according to the parameter. Format: ask: option 1 text=event ID of option 1 [: option 2 text=event ID of option 2].&lt;br /&gt;
&lt;br /&gt;
E.g., ask: “Yes”=Event1: “No”=Event2. &lt;br /&gt;
&lt;br /&gt;
*items: assign this message to be a message of obtaining the item table. The parameter is the corresponding item list info. E.g., items: money,10000|紫金之刃,1,mf=0-3|黄金之枪,1,mf=0-3|幻刃月光,1,mf=0-3.&lt;br /&gt;
*You can define other fields, and use [$tagmsg:arg=parameter KEY$] (in the triggered directive of interactive messages) to query the value of the corresponding parameter field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the message type is finance, the format of the parameter text is:&lt;br /&gt;
 Receipt field 1=receipt detail list (format: resource 1, number 1| resource 2, number 2|…|resource N, number N); receipt field 1= receipt detail list; […]; receipt field N=receipt detail list.&lt;br /&gt;
Message sender format: sender type: sender ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported sender types are:&lt;br /&gt;
&lt;br /&gt;
*0: system; empty ID.&lt;br /&gt;
&lt;br /&gt;
*1: character; ID= character ID.&lt;br /&gt;
&lt;br /&gt;
*2: location; ID= location ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TAG parameter is a random string field TAG used to mark.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive message that meets specific conditions. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTERACTIVE_MSG*message type#sender info#TAG parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message type and TAG parameter can be empty (no type or TAG limit).&lt;br /&gt;
&lt;br /&gt;
Format of sender info: ADD_INTERACTIVE_MSG.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_THIS_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Current Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the current interactive message of the existing environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_THIS_INTERACTIVE_MSG*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.1.3 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_HEADAVATA&lt;br /&gt;
|'''Change Player Painting Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the painting of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_HEADAVATA*character painting ID.&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_MODEL&lt;br /&gt;
|'''Change Player Model Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the model of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_MODEL*model ID.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.2.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_INTVAR_CONFIG&lt;br /&gt;
|'''Show Option Panel of Configurable Custom Int Field'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom field configuration panel in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_INTVAR_CONFIG*mode(0: Create game mode; 1: In-game mode).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_MARKER&lt;br /&gt;
|'''Add or Set Custom Mark on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: add or set a custom mark on the world map. When the mark ID already exists, the older mark info will be covered.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_MARKER*mark ID#title#annotation info #map position info#file name of mark image (this field can be empty; set to be &amp;quot;map_flag&amp;quot; by default; this mark image is a PNG image resource under directory“\BuildSource\map_res\MinimapMakers\”).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_MAP_MARKER&lt;br /&gt;
|'''Remove a Custom Map Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a custom mark on the map with a specific ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_MAP_MARKER*mark ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|RUN_SCRIPT_FUNC&lt;br /&gt;
|'''Execute Function of Specific Lua Script'''&lt;br /&gt;
&lt;br /&gt;
Function: execute the standard function of a specific Lua script.&lt;br /&gt;
&lt;br /&gt;
Format: RUN_SCRIPT_FUNC*file name of the relative directory of script (same as RUN_SCRIPT)#standard function name (the function name in the script; the parameter is the imported environment variable).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_GUI&lt;br /&gt;
|'''Open Custom GUI Form'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom GUI form.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_GUI*GUI pack name#form component name#script file path of the form (relative script root directory “Asset\BuildSource\LuaScripts\”. No file expansions)#form parameter(format: json format. E.g., {&amp;quot;arg1&amp;quot;:&amp;quot;val1&amp;quot;,&amp;quot;arg2&amp;quot;:&amp;quot;val2&amp;quot;})#block directive queue (default 0: Yes; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CONTAINER_GUI&lt;br /&gt;
|'''Open Container GUI'''&lt;br /&gt;
&lt;br /&gt;
Function: open a defined container GUI.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CONTAINER_GUI*container ID (instance ID used to identify)#template info ID (info ID defined in Container Definition Table).&lt;br /&gt;
&lt;br /&gt;
When the parameter list is empty or is “This”, the specific container in the current environment variable (if existed) will be opened. E.g., OPEN_CONTAINER_GUI*THIS.&lt;br /&gt;
|-&lt;br /&gt;
|CONTAINER_CMD&lt;br /&gt;
|'''Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a specific directive for a particular container in the current environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: CONTAINER_CMD*container directive type#parameter 1#parameter 2#...#parameter N&lt;br /&gt;
&lt;br /&gt;
Currently supported collective built-in directive types are:&lt;br /&gt;
&lt;br /&gt;
add_exp: add EXP to all cards in the container. The parameter is the EXP value.&lt;br /&gt;
&lt;br /&gt;
add_items: add a specific element into the container (E.g., the format of the item container is: CONTAINER_CMD*add_items#item 1,10|item 2,5 ；format of the card container is: ID list of cards, separated by “|”).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CONTAINER_CMD&lt;br /&gt;
|'''Location Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: see a location as a container object and execute the same container directives.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CONTAINER_CMD*location ID (when this field is empty or “THIS”, refer to the location assigned by the current environment parameter)#container directive list (same as CONTAINER_CMD parameters).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP&lt;br /&gt;
|'''Set Map Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the visibility of a specific map. &lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP*map ID#status value (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_LUAENV&lt;br /&gt;
|'''Reset Current LUA Environment'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the current environment of LUA script and clear cache; this directive can be used when you need to debug the LUA script but do not want to restart the game.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_LUAENV*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.4.1 or above version'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_ARG_INT&lt;br /&gt;
|'''Set Parameter Value in Current Environment Variable'''&lt;br /&gt;
&lt;br /&gt;
Function: set the int parameter value stored in the environment variable of the current script (correspond to [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ARG_INT*new value#target parameter index (optional;set to be 0 by default; 0~2 correspond to [%arg_int_val1%] ~ [%arg_int_val3%] respectively).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Global Save Directive===&lt;br /&gt;
Global save is a type of saving used to record some data shared by all saves. Data recorded in the global save can be accessed in all saves after being changed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_INTVAR&lt;br /&gt;
|'''Set Custom Int Variable of Global Save''' &lt;br /&gt;
&lt;br /&gt;
Function: set a custom int variable in the global save. The variable, recorded in the global save, can be accessed via the [%global_int:ID%] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_INTVAR*variable ID#current int value.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_GLOBAL_INTVAR&lt;br /&gt;
|'''Change Custom Int Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: change a custom int variable in the global.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_GLOBAL_INTVAR*variable ID#value change (can be a negative number)#minimum value (optional; no limit if this field is empty)#maximum value (optional; no limit if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_STRVAR&lt;br /&gt;
|'''Set Custom String Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom string variable. The variable, recorded in the global save, can be accessed via the [$global_str:ID$] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_STRVAR*variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|PUSH_GLOBAL_ROLES&lt;br /&gt;
|'''Globally Save Character Status'''&lt;br /&gt;
&lt;br /&gt;
Function: save specific character list to the global character status list.&lt;br /&gt;
&lt;br /&gt;
Format: PUSH_GLOBAL_ROLES*custom global save Key#character ID (this character can only be a non-template character).&lt;br /&gt;
|-&lt;br /&gt;
|PULL_GLOBAL_ROLES&lt;br /&gt;
|'''Load Character Status from Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: load the status of specific character list from the global character status list, and apply it to the current game mode.&lt;br /&gt;
&lt;br /&gt;
Format: PULL_GLOBAL_ROLES*custom global save KEY (the character of this KEY must be a character from the character template of the current game mode.&lt;br /&gt;
|-&lt;br /&gt;
|LOCK_CMD_QUEUE&lt;br /&gt;
|'''Lock Current Directive Queue'''&lt;br /&gt;
&lt;br /&gt;
Function: lock the current directive queue. The directive queue will not be cleared after switching from different game saves or resetting the game modes.&lt;br /&gt;
&lt;br /&gt;
Format: LOCK_CMD_QUEUE*lock queue (0: No;1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SWITCH_GAME_MODE&lt;br /&gt;
|'''Switch Game Modes'''&lt;br /&gt;
&lt;br /&gt;
Function: switch to the target game mode and load it.&lt;br /&gt;
&lt;br /&gt;
Format: SWITCH_GAME_MODE*target game mode ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Built-in Directive List===&lt;br /&gt;
Built-in directives are directives used to realize certain functions inside the program, usually for some specific scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|ENCOUNTER&lt;br /&gt;
|'''Creep Encountering UI'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info panel of the creep encountered.&lt;br /&gt;
&lt;br /&gt;
Format: ENCOUNTER*1.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_INFO_DLG&lt;br /&gt;
|'''Chest Guardian Info Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info dialogue of the chest guardian.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_INFO_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_COST_DLG&lt;br /&gt;
|'''Price of Chest Opening Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open a dialogue to show the price of opening a chest.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_COST_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_CALLBACK&lt;br /&gt;
|'''Logic Callback of Chest Opening'''&lt;br /&gt;
&lt;br /&gt;
Function: command a logic callback of chest opening.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_CALLBACK*callback value (1: Defeat the guardian; 2: Opening completed)#target chest ID.&lt;br /&gt;
|}&lt;br /&gt;
===Preset Fields of Scripts and Their Meanings===&lt;br /&gt;
Sometimes we use certain directives to refer to specific objects in script editing. For example, we can use CUR_ROLE to replace the ID of the current character player encountered. We can realize some common application scenarios via script editing. &lt;br /&gt;
&lt;br /&gt;
Currently, supported preset fields are: &lt;br /&gt;
&lt;br /&gt;
*CUR_ROLE: ID of current character template encounter, used primarily for dialogue and selection list box&lt;br /&gt;
*CUR_BATTLE: ID of the battle between player and refreshed unit encountered on the current map&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Script Directive of Results in Scenario Event===&lt;br /&gt;
The format of script directives of results in a scenario event is (separated by a line break): &lt;br /&gt;
 conditional expression group 1: executed command 1&lt;br /&gt;
 conditional expression group 2: executed command 2&lt;br /&gt;
 ...&lt;br /&gt;
 conditional expression group N: executed command N&lt;br /&gt;
Execute the command: judge conditional expression group 1 first, if the conditions are met, execute command 1. Otherwise, judge conditional expression group 2……judge all listed groups until one group of conditions is met, or all conditions are not met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Conditional Expression Group===&lt;br /&gt;
A conditional expression group consists of multiple conditional expression like “[%CONDITION%][=]1”, and the expressions are connected by “|” (Or) or “&amp;amp;” (And). '''The priority of “&amp;amp;” (And) is higher than “|” (Or)'''. When both sides of the expression are integer characters, return the comparison result of the two values. Otherwise, compare the strings, and only [=] and [&amp;lt;&amp;gt;] judgements are supported.&lt;br /&gt;
&lt;br /&gt;
For example:  &lt;br /&gt;
&lt;br /&gt;
 [%result_code%][=]1|[%player_money%][&amp;gt;=]100 means “execute when the result is 1 or when the player has 100 utars”.&lt;br /&gt;
 [%player:level%][&amp;gt;=]3&amp;amp;[%player_money%][&amp;gt;]100 means “execute when player’s level is 3 or above, and they have more than 100 utars”.&lt;br /&gt;
&lt;br /&gt;
'''The followings are the comparison symbols in conditional expressions:'''&lt;br /&gt;
&lt;br /&gt;
*[=]: equal&lt;br /&gt;
*[&amp;gt;]: larger than&lt;br /&gt;
*[&amp;gt;=]: greater than or equal to&lt;br /&gt;
*[&amp;lt;]: less than&lt;br /&gt;
*[&amp;lt;=]: less than or equal to&lt;br /&gt;
*[&amp;lt;&amp;gt;]: not equal to&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game Data Calculation Expression System===&lt;br /&gt;
We can embed some value expressions like “[&amp;amp;expression&amp;amp;]” in many places in the game (e.g., the status value of the BUFF list)&lt;br /&gt;
&lt;br /&gt;
In value expression, the basic mathematic calculation is supported. Currently, supported calculation symbols are: &lt;br /&gt;
&lt;br /&gt;
*+: addition&lt;br /&gt;
*-: subtraction&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;*: multiplication&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*/: division&lt;br /&gt;
*%: modulo (take the remainder)&lt;br /&gt;
*^: exponentiation&lt;br /&gt;
*( ) : change the priority of calculation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the expression takes the @func(expression1, expression2...) format, call the relevant built-in function to return the calculation result. Currently supported built-in functions are (note: these built-in functions are can only be used in the calculation of the most external layer): &lt;br /&gt;
&lt;br /&gt;
*@min(a,b): return the smaller value between a and b&lt;br /&gt;
*@max(a,b): return the greater value between a and b&lt;br /&gt;
&lt;br /&gt;
E.g., in a specific piece of data, [&amp;amp;1+2*3&amp;amp;] will be replaced by 7, [&amp;amp;@max(1+2*3, 8)&amp;amp;] will be replaced by 8, [&amp;amp;@min(1+2*3, 8)&amp;amp;] will be replaced by 7……&lt;br /&gt;
&lt;br /&gt;
'''Please note: for scripts and skill directives in battles, you can use the “[@expression@]” format to embed some expressions to return a decimal result.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Embedded Query Directive in Scenario Event===&lt;br /&gt;
There are many places in the game that support embedded query directives, through which we can insert values or query result of the string type in texts or conditional expressions. All embedded query directives follow the format of [%QUERY:arg1:arg2...%] or [$QUERY:arg1:arg2...$] (these two formats are the same) to insert to the target position.&lt;br /&gt;
&lt;br /&gt;
'''Note: currently you cannot re-embed a query directive in a query.'''&lt;br /&gt;
&lt;br /&gt;
Currently, supported query directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Return the last directive result that can cause “return” in the current event (E.g., an option that stands for “return” of the selection list box, input value and battle result, in the script of scenario events).&lt;br /&gt;
Following are the different meanings of result_code in various directive types. &lt;br /&gt;
&lt;br /&gt;
*It means the option ID when returning from the selection list box.&lt;br /&gt;
*When returning after battles:  0: Battle won; 1: Battle failed.&lt;br /&gt;
*It means the input number when returning for an integer input box.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_num%]&lt;br /&gt;
|Return an integer. (0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_range:A:B%]&lt;br /&gt;
|Return a random number that is greater than A but smaller than B.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the random number that was generated last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|The amount of the player’s money.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_wood%]&lt;br /&gt;
|The amount of the player’s wood.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_iron%]&lt;br /&gt;
|The amount of player’s ironstone.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_jade%]&lt;br /&gt;
|The amount of player’s jade.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_food%]&lt;br /&gt;
|Player’s current Hunger.&lt;br /&gt;
|-&lt;br /&gt;
|[%game_time%]&lt;br /&gt;
|Number of in-game days currently.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_night%]&lt;br /&gt;
|Judge whether it is nighttime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_daytime%]&lt;br /&gt;
|Judge whether it is daytime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%mod_day:MOD%]&lt;br /&gt;
|Number of the in-game day divided by MOD, take the remainder&lt;br /&gt;
|-&lt;br /&gt;
|[%generate_rob_money%]&lt;br /&gt;
|Generate the amount of money when the player is robbed under the current level.&lt;br /&gt;
|-&lt;br /&gt;
|[%rob_money%]&lt;br /&gt;
|Generate the amount of money when the player was robbed last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_ts:ID%]&lt;br /&gt;
|Return the current status of a trigger (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es:ID%]&lt;br /&gt;
|Return the current status of a scenario event (-1: Not executed; otherwise, return Result Code).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_first_time:ID%]&lt;br /&gt;
|Return the first completion time of a scenario event.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_time_score:ID:minTime:maxTime:maxScore%]&lt;br /&gt;
|Return the first completion time score of a scenario event. minTime is the shortest completion time (time before the shortest time brings a full score); maxTime is the longest completion time (time before the longest time brings a zero score); maxScore is the highest score.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val:ID%]&lt;br /&gt;
|Return the custom int value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val_for_calc:ID%]&lt;br /&gt;
|Return the custom int value, whose numbering is its ID, to calculate. There must a result. If the ID does not exist, the result is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%str_val:ID%]&lt;br /&gt;
|Return the custom string value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_num%]&lt;br /&gt;
|The current number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_max%]&lt;br /&gt;
|Maximum number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_name:兵种key%]&lt;br /&gt;
|Return the name of a certain minion.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a certain item in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag:tag%]&lt;br /&gt;
|Return the number of an item with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag_and_level:tag:level%]&lt;br /&gt;
|Return the number of an item, whose item level &amp;gt;= level, with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_qualify_as_present:present_desc%]&lt;br /&gt;
|Return the number of a certain item whose gift description string meets requirements in the player’s bag. For the format of gift description string, please see the “Like” format in the Tag column of “人物列表”(Character Table) (Excel).&lt;br /&gt;
|-&lt;br /&gt;
|[%item_name:物品ID%]&lt;br /&gt;
|Return the displayed name of an item.&lt;br /&gt;
|-&lt;br /&gt;
|[%admin_level%]&lt;br /&gt;
|Return the administration status of the player in the current location (0: None; 1: Appointed; 2: City ruler; 3: Faction leader).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; take a rounding integer number after (current time-ID time)).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse_by_day:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; (current day- the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current time-ID time) and take the rounding integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse_by_day%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current day-the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_custom_cd:ID%]&lt;br /&gt;
|Return the result of whether a custom cooldown (whose numbering is its ID) is ready (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%has_gametime_elapse_tag:ID%]&lt;br /&gt;
|Query whether the custom game time ID mentioned above exists (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%realtime_elapse:ID%]&lt;br /&gt;
|Return the realistic period since the setting of last custom time point ID (count by second).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID%]&lt;br /&gt;
|Return the status of specific mission ID (0: Unclaimed; 1: Ongoing; 2: Unfinished; 3: Ended).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID:index%]&lt;br /&gt;
|Return the subevent value of specific mission ID (index is the subevent’s sequence number starting from 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_flag:ID%]&lt;br /&gt;
|Return the current value of a completion mark; return -1 if there is no such a value.&lt;br /&gt;
|-&lt;br /&gt;
|[%camp_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_player_triggered_encounter%]&lt;br /&gt;
|Check if an encounter chat is started by player manually (0: No; 1: Yes) (if the player is caught up by other units, the value is 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%place_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target location.&lt;br /&gt;
|-&lt;br /&gt;
|[%arg_int_val1%]&lt;br /&gt;
[%arg_int_val2%]&lt;br /&gt;
&lt;br /&gt;
[%arg_int_val3%]&lt;br /&gt;
|Value parameter 1, 2, and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buffs%]&lt;br /&gt;
|Return the number of global BUFFs of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_battle_res%]&lt;br /&gt;
|Return the battle result of last battle (0: Victory; 1: Loss; 2: Retreatment).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_dungeon_res%]&lt;br /&gt;
|Last dungeon result (0: Exited; 1: Passed; 2: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff:ID%]&lt;br /&gt;
|Query whether the current squad has a global BUFF of the target ID. Return 1 if such a BUFF exists.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff_c:CLASS%]&lt;br /&gt;
|Query the number of global BUFFs whose type are CLASS of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_stat:STAT_FILED%]&lt;br /&gt;
|Return the current value (whose field is STAT_FILED) of the current squad status.&lt;br /&gt;
|-&lt;br /&gt;
|[%has_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return 1; otherwise, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return the relevant value; otherwise, return null.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_place_id:CAMP_ID%]:&lt;br /&gt;
|Return the ID of a random location that is controlled by a faction. IF there is no camp_id, return an ID of a location controlled by the player’s faction.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_id%]&lt;br /&gt;
|Return the ID of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_name%]&lt;br /&gt;
|Return the name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_map_name%]&lt;br /&gt;
|Return the map name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products%]&lt;br /&gt;
|Return the Production list of the current location (follow the format of GETITEMS).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products_name%]&lt;br /&gt;
|Return the Production description of the current location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_has_products%]&lt;br /&gt;
|Check if the current location has production (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_items%]&lt;br /&gt;
|Return the item list of the last item selection directive (ITEMS_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles%]&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Return the character list of the last character selection directive (ROLES_SELECTOR) (Note: this method cannot be used in conditional expression groups since the result returned contains “|” when multiple characters are selected; you can use [%last_seled_roles_count%] instead to judge).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles_count%]&lt;br /&gt;
|Return the number of selected characters of the last character selection directive (ROLES_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%weather:ID%]&lt;br /&gt;
|Query the current value of the specific weather effect (with specific ID) on the current map.&lt;br /&gt;
|-&lt;br /&gt;
|[%monster_news:X:Y%]&lt;br /&gt;
|Query the info of creeps near coordinate (X, Y) on the current map. X and Y will be the default position of the player if left empty.&lt;br /&gt;
|-&lt;br /&gt;
|[%attack_intend_code%]&lt;br /&gt;
|Query the attack intension of units encountered on the current map.&lt;br /&gt;
&lt;br /&gt;
Please see: MuUnitBase.IntendToAttack&lt;br /&gt;
|-&lt;br /&gt;
|[%place_randmom_pos%]&lt;br /&gt;
|Query a random position near a location. Output specific strings. E.g., Sandbox Redstone Keep: 123, 123.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_role_relation%]&lt;br /&gt;
|Relationship between the input parameter and tag character/location.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_city_relation%]&lt;br /&gt;
|Relationship between Tag character and input character&lt;br /&gt;
|-&lt;br /&gt;
|[%result_val%]&lt;br /&gt;
|Query the curResultVal value of the current environment variable.&lt;br /&gt;
|-&lt;br /&gt;
|[$player:INFO$]&lt;br /&gt;
[$tagrole:INFO:ID$]&lt;br /&gt;
|Query a specific info field of player/ specific character (tag character) When it is tag character, and ID field does not exist, return the query result of the interactive object. &lt;br /&gt;
INFO can be:  &lt;br /&gt;
&lt;br /&gt;
*id: character ID.&lt;br /&gt;
&lt;br /&gt;
*name: character name.&lt;br /&gt;
&lt;br /&gt;
*level: character level.&lt;br /&gt;
&lt;br /&gt;
*job_type: job types (0: Citizen; 1: Faction member; 2: city ruler; 3: Faction leader).&lt;br /&gt;
&lt;br /&gt;
*campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
*campname: faction name.&lt;br /&gt;
&lt;br /&gt;
*campleaderid: faction leader ID.&lt;br /&gt;
&lt;br /&gt;
*campleadername: faction leader name.&lt;br /&gt;
&lt;br /&gt;
*campleader: nickname of faction leader.&lt;br /&gt;
&lt;br /&gt;
*fame_val: personal prestige.&lt;br /&gt;
&lt;br /&gt;
*maxhp: max hp.&lt;br /&gt;
&lt;br /&gt;
*maxmp: max mana.&lt;br /&gt;
&lt;br /&gt;
*job_cityid: job assignment location ID.&lt;br /&gt;
&lt;br /&gt;
*job_cityname: job assignment location name.&lt;br /&gt;
&lt;br /&gt;
*state: current status (0: Normal; 1: Captured; -1: Dead).&lt;br /&gt;
&lt;br /&gt;
*is_recruitable: recruitable (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*is_leave_team_enable: able to leave squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*recruit_val: current recruitable mark (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*inteam: if the character is in the player’s squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep: player’s prestige in the target faction.&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep_desc: player’s prestige description in the target faction.&lt;br /&gt;
&lt;br /&gt;
*fv: friendliness with the player.&lt;br /&gt;
&lt;br /&gt;
*player_relation_score: assessment on overall favour on the player.&lt;br /&gt;
&lt;br /&gt;
*weapon_tag= (custom tag field): query the specific tag on equipment and weapons. If there is no such a tag or the weapon does not exist, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*skill_level= (skill ID): query the current level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_maxlevel= (skill ID): query the maximum level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_exp= (skill ID): query the current EXP of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_upexp= (skill ID): query the amount of EXP needed for a character’s target skill to level up.&lt;br /&gt;
&lt;br /&gt;
*statu= (custom ID): query the value of the corresponding ID in the Character Attribute Table. If there is no value, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*statu_int= (custom ID): 0 query the int value of the corresponding ID in the Character Attribute Table. If there is no value, return 0.&lt;br /&gt;
&lt;br /&gt;
*has_girl_friend: [player only] check if the player has a girlfriend (1: Yes; 2: No).&lt;br /&gt;
&lt;br /&gt;
*current_girl_friend_name: [player only] girlfriend’s name.&lt;br /&gt;
&lt;br /&gt;
*girl_friend=character ID: [player only] check if someone is a player’s girlfriend.&lt;br /&gt;
&lt;br /&gt;
*is_female: check if someone is a female character (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
*available_quest: available missions.&lt;br /&gt;
|-&lt;br /&gt;
|[$called:call1:call2$]&lt;br /&gt;
|How NPC addresses player (the player’s character is male: call1; female: call2).&lt;br /&gt;
|-&lt;br /&gt;
|[$null$]&lt;br /&gt;
|Replaced by an empty string.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagtype$]&lt;br /&gt;
|Trigger object type of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagid$]&lt;br /&gt;
|Trigger object ID of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$input_str$]&lt;br /&gt;
|The input result of the last input box.&lt;br /&gt;
|-&lt;br /&gt;
|[$argvs:INDEX$]&lt;br /&gt;
|Query currently additional parameter info, starting from 0 (used to fill in the parameter of a random event).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagplace:INFO:ID$]&lt;br /&gt;
|Query info of a location; query the current location if the ID field does not exist.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: location ID.&lt;br /&gt;
&lt;br /&gt;
· name: location name.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· mapid: map ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· prosperity: location prosperity. &lt;br /&gt;
&lt;br /&gt;
· defence: location defence &lt;br /&gt;
&lt;br /&gt;
· rep: location friendliness.&lt;br /&gt;
&lt;br /&gt;
· security: location security.&lt;br /&gt;
&lt;br /&gt;
· size: location size.&lt;br /&gt;
&lt;br /&gt;
· lord_id: city ruler ID.&lt;br /&gt;
&lt;br /&gt;
· lord_name: city ruler name.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom field.&lt;br /&gt;
&lt;br /&gt;
· is_stronghold: if this location is a base (a location for troops to the garrison).&lt;br /&gt;
&lt;br /&gt;
· is_weekhold: a resource point that does not allow the garrison.&lt;br /&gt;
&lt;br /&gt;
· is_couldoccupy: if this location can be occupied.&lt;br /&gt;
&lt;br /&gt;
· is_couldraid: if this location can be raided.&lt;br /&gt;
&lt;br /&gt;
· is_inwar: if this location is being attacked.&lt;br /&gt;
&lt;br /&gt;
· is_raided: if this location has been raided (recovering).&lt;br /&gt;
&lt;br /&gt;
· is_subplace: if this place has been occupied. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain a specific status value of the current location.&lt;br /&gt;
&lt;br /&gt;
· building= (specific facility ID): query the number of facilities of a building with specific ID in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· r_building= (specific facility ID): query the number of facilities of a building with a specific ID (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· r_building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· custom_int= (custom field ID): obtain the int value of the custom field of the current location.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally)&lt;br /&gt;
&lt;br /&gt;
· func_map= (specific field KEY): query a field of the corresponding directive event mapping table. E.g., func_map= hire list.&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in where they are currently staying. &lt;br /&gt;
&lt;br /&gt;
· hire_states: query the recruitment status of the current location.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the player’s current position and the target position. If the target is unreachable, return -1.&lt;br /&gt;
&lt;br /&gt;
· project_count: the number of projects under construction. &lt;br /&gt;
&lt;br /&gt;
· project_max: the maximum number of projects under construction currently.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmap:INFO:ID$]&lt;br /&gt;
|Query tile info on a map:&lt;br /&gt;
&lt;br /&gt;
· id: tile id.&lt;br /&gt;
&lt;br /&gt;
· name: tile name.&lt;br /&gt;
&lt;br /&gt;
· dominant_camp: if there is an overall dominating faction, return the name of the faction; otherwise, return null.&lt;br /&gt;
&lt;br /&gt;
· dominant_camps= (custom field ID): if there are only several factions with specific IDs existing, return 1; otherwise, return 0; format of custom field: faction 1#faction 2#faction 3.&lt;br /&gt;
&lt;br /&gt;
· camp_place_count= faction ID: return the number of bases owned by a specific faction on this tile.&lt;br /&gt;
&lt;br /&gt;
· ExploreInfo= Info ID: query the value of an exploration map info.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbuilding:INFO$]&lt;br /&gt;
|Query info of the current target building&lt;br /&gt;
&lt;br /&gt;
· id: building ID.&lt;br /&gt;
&lt;br /&gt;
· name: name.&lt;br /&gt;
&lt;br /&gt;
· inner_id: built-in location ID of the target building.&lt;br /&gt;
&lt;br /&gt;
· type: building type.&lt;br /&gt;
&lt;br /&gt;
· level: building level.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return value of a specific custom filed.&lt;br /&gt;
&lt;br /&gt;
· container_id: scenario ID of the container bound to this building.&lt;br /&gt;
&lt;br /&gt;
· container_info: info ID of the container bound to this building.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagwb:INFO$]&lt;br /&gt;
|Query the info of current skirmish.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: battle ID.&lt;br /&gt;
&lt;br /&gt;
· camp_a: faction ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· camp_b: faction ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· leader_a: leader ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· leader_b: leader ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· camp_a_rl: the relationship between squad A and the player’s faction &lt;br /&gt;
&lt;br /&gt;
· camp_b_rl: the relationship between squad B and the player’s faction.&lt;br /&gt;
&lt;br /&gt;
· teamname_a: faction name and hero names of squad A.&lt;br /&gt;
&lt;br /&gt;
· teamname_b: faction name and hero names of squad B.&lt;br /&gt;
&lt;br /&gt;
· seige_time: current siege preparation time (if it is a siege battle) (count by day).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagteam:INFO(:QUERY_INFO)$]&lt;br /&gt;
[$playerteam:INFO$]&lt;br /&gt;
|Query info of the current encountered team (tagteam)/player’s team (playerteam).&lt;br /&gt;
&lt;br /&gt;
When querying tag team, you can choose a specific query parameter. If this parameter is set, only info of the query target will be returned.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: squad ID.&lt;br /&gt;
&lt;br /&gt;
· is_active: check if the current squad status is normal; return 1 if it is normal.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· state_num: StateNum value of the current squad.&lt;br /&gt;
&lt;br /&gt;
· from_id: ID of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· from_name: name of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· lifetime: period since the squad is established (day).&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and character faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· max_attr_lv=attribute field ID: the highest value of a certain attribute of all characters in the squad.&lt;br /&gt;
&lt;br /&gt;
· exist_role= character ID: check if there is a specific character ID in the squad (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
· role_vacancy: available hero slots in squad.&lt;br /&gt;
&lt;br /&gt;
· soldier_vacancy: available minion slot in the squad.&lt;br /&gt;
&lt;br /&gt;
· map_info: current map info.&lt;br /&gt;
&lt;br /&gt;
· tag: return the TAG of the squad. &lt;br /&gt;
&lt;br /&gt;
· is_defeated: check if the squad is dismissed because they are defeated (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· defeated_by: ID of the faction which defeated the squad.&lt;br /&gt;
&lt;br /&gt;
QUERY_INFOformat: [query type]=[query target] E.g.,: leader=ROLE_ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported query types are:&lt;br /&gt;
&lt;br /&gt;
· bind_id: bound info ID. When the squad type is creep or dummy, the ID is the creep/dummy ID; otherwise, it is the leader ID.&lt;br /&gt;
&lt;br /&gt;
· leader: squad leader ID.&lt;br /&gt;
&lt;br /&gt;
· tag: TAG mark of the squad (used for squad created by the CREATE_TEAM directive).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcamp:INFO:ID$]&lt;br /&gt;
|Query info of the target faction. When the ID does not exist, query info of the current faction. INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· leaderid: ruler ID.&lt;br /&gt;
&lt;br /&gt;
· leadercalled: nickname of faction ruler. &lt;br /&gt;
&lt;br /&gt;
· lands_count: number of bases of the current faction.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· camp_rl_value: the actual number of favour between the target faction and player’s faction. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain the specific status value of the current faction.&lt;br /&gt;
&lt;br /&gt;
· buff= (Target BUFF ID): query if a specific BUFF of the current faction exists (1: Yes).&lt;br /&gt;
&lt;br /&gt;
· buff_c= (BUFF type): query the number of BUFFs of specific types of the current faction.&lt;br /&gt;
&lt;br /&gt;
· active_state: project status of target faction (0: Inactive; 1: Active).&lt;br /&gt;
&lt;br /&gt;
· is_story_camp: if this is a scenario faction (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in this faction. &lt;br /&gt;
&lt;br /&gt;
· attitude: faction’s attitude towards the player (0: Normal; -1: Wanted; -2: At war).&lt;br /&gt;
&lt;br /&gt;
· is_fall: if a faction is eliminated (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzar:INFO$]&lt;br /&gt;
|Query current bazaar info imported by the system.&lt;br /&gt;
&lt;br /&gt;
· start_day: number of days of the beginning of the bazaar.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzarItem:INFO:bazzarID:merchantID$]&lt;br /&gt;
|Query info of items bought/sold by a merchant in a bazaar.&lt;br /&gt;
&lt;br /&gt;
· item_desc: item description (detailed).&lt;br /&gt;
&lt;br /&gt;
· item_desc_short: item description (simple).&lt;br /&gt;
&lt;br /&gt;
· item_buy_price: buy-in price of the item. &lt;br /&gt;
&lt;br /&gt;
· item_sell_price: sell-out price of the item. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproduct:INFO:ID$]&lt;br /&gt;
|Query info of a speciality. Query info of the current speciality if the ID is left empty.&lt;br /&gt;
&lt;br /&gt;
· item_name: item name. &lt;br /&gt;
&lt;br /&gt;
· item_id: item id.&lt;br /&gt;
&lt;br /&gt;
· item_level: item level.&lt;br /&gt;
&lt;br /&gt;
· item_price: single fair value of the item.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the central position of the speciality and the current position of the player (-1: the central position is unreachable). &lt;br /&gt;
&lt;br /&gt;
· place_include=location ID: when the item is not sold in the specific location, return 0; if it is being sold, return 1. &lt;br /&gt;
&lt;br /&gt;
· place_include_tagQuestPlace: automatically use the currently imported info of mission location.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagquest:INFO:ID$]&lt;br /&gt;
|Query Mission Info&lt;br /&gt;
&lt;br /&gt;
status: 0: Unclaimed; 1: Ongoing; 2: Completed; 3:Time limit exceeded (receive punishment); 4: Time limit exceeded (wait to claim rewards automatically) 5: 已Ended.&lt;br /&gt;
|-&lt;br /&gt;
|[$arg_str_val1$]&lt;br /&gt;
[$arg_str_val2$]&lt;br /&gt;
&lt;br /&gt;
[$arg_str_val3$]&lt;br /&gt;
|String parameters 1, 2 and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$]&lt;br /&gt;
|Enumerate numbers randomly and return a RES value according to the probability distribution. E.g., [%rnd_enum:25,A:40,B:35,C%] means there is a 25% chance to return “A”, 40% to return “B” and 35% to return “C”.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagitem:INFO$]&lt;br /&gt;
|Query info of the current item. INFO can be: &lt;br /&gt;
&lt;br /&gt;
· id: item ID.&lt;br /&gt;
&lt;br /&gt;
· name: item name.&lt;br /&gt;
&lt;br /&gt;
· count: item number.&lt;br /&gt;
&lt;br /&gt;
· group_n: maximum number of stacks.&lt;br /&gt;
&lt;br /&gt;
· quality: item quality.&lt;br /&gt;
&lt;br /&gt;
· level: item level.&lt;br /&gt;
&lt;br /&gt;
· main_type:  main item type.&lt;br /&gt;
&lt;br /&gt;
· sub_type: item sub-type.&lt;br /&gt;
&lt;br /&gt;
· equip_type: equipment type.&lt;br /&gt;
&lt;br /&gt;
· gendays:  period (day) since the production date.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom filed. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproject:INFO:ID$]&lt;br /&gt;
|Query project info. Read from the specific ID of SET_TEMP_ID if the ID field is left empty.&lt;br /&gt;
&lt;br /&gt;
· id: project id.&lt;br /&gt;
&lt;br /&gt;
· state: project status (works only in group events) (0: Not started; 1: Ongoing; 2: Completed).&lt;br /&gt;
&lt;br /&gt;
· showPlaceName: project location description.&lt;br /&gt;
&lt;br /&gt;
· showProjectName: project name.&lt;br /&gt;
&lt;br /&gt;
· roles: all characters involved in the current project.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagunit:INFO$]&lt;br /&gt;
|Query info of the current target minion.&lt;br /&gt;
&lt;br /&gt;
· id: unit id.&lt;br /&gt;
&lt;br /&gt;
· name: unit name.&lt;br /&gt;
&lt;br /&gt;
· level: unit level.&lt;br /&gt;
&lt;br /&gt;
· statu= (custom ID): query the value of the corresponding ID in the Unit Attribute table.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcard:INFO$]&lt;br /&gt;
|Query info of a specific card.&lt;br /&gt;
&lt;br /&gt;
· id: bound id of the card.&lt;br /&gt;
&lt;br /&gt;
· name: displayed name of the card.&lt;br /&gt;
&lt;br /&gt;
· lv: card level.&lt;br /&gt;
&lt;br /&gt;
· recruit_name: displayed name with recruitment info of the card. &lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific Tag field of the card.&lt;br /&gt;
&lt;br /&gt;
· has_tag= (KEY of custom expansion field): query if there is a particular Tag field of card (1: Yes; 0: No).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$save_version$]&lt;br /&gt;
|Return the version number of when the current game save is created.&lt;br /&gt;
|-&lt;br /&gt;
|[$version_compare:TAG_VERSION$]&lt;br /&gt;
|Compare the version number of when the current game save is created with TAG_VERSION; if the former version is higher than TAG_VERSION, return 1; when equal, return 0; when lower, return -1.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmsg:INFO$]&lt;br /&gt;
|Query info of the current interactive messages.&lt;br /&gt;
&lt;br /&gt;
· title: title&lt;br /&gt;
&lt;br /&gt;
· content: message content&lt;br /&gt;
&lt;br /&gt;
· arg=(field KEY): query the parameter of the KEY in the custom parameter table&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下查询需要游戏版本高于0.7.4.1&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_str:KEY$]&lt;br /&gt;
|Return the string value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_int:KEY$]&lt;br /&gt;
|Return the int value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[%envoy_enable%]&lt;br /&gt;
|Return the status of whether the envoy of the player’s faction is available.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Directive Field of Global Save Query===&lt;br /&gt;
These are used to query some directives in the global save.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%global_int:ID%]&lt;br /&gt;
|Return the value of global int field ID　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|[$global_str:ID$]&lt;br /&gt;
|Return the value of global string field ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Built-in Global Variable Field===&lt;br /&gt;
&lt;br /&gt;
Following are key fields of a built-in global variable: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Filed KEY'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|save_max_hard_level&lt;br /&gt;
|The greatest difficulty has been unlocked. Set to be 0 by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Built-in Custom Variable Field===&lt;br /&gt;
&lt;br /&gt;
You can use directives like SETINTVAR and CHANGEINTVAR to change and save the built-in custom variable of the system. Different variables have a different function.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|system_探索地图点数&lt;br /&gt;
|Morale.　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|system_星星&lt;br /&gt;
|The number of stars.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色血量百分比&lt;br /&gt;
|When the player is fighting an enemy the extra hp multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色攻击百分比&lt;br /&gt;
|When the player is fighting an enemy, the extra physical/magic attack multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|config_ai_level&lt;br /&gt;
|The intensity level of AI (0: Easy; 1: Normal; 2: Difficult).&lt;br /&gt;
|-&lt;br /&gt;
|config_roll_limit&lt;br /&gt;
|Enable Roll Limit in battles 0: Disabled; 1: Enabled (By enabling the Roll Limit, there will be a CD and limit of rolling times).&lt;br /&gt;
|-&lt;br /&gt;
|config_hunger_penalty&lt;br /&gt;
|Enable Hunger Debuff 0: Disabled 1: Enabled (By enabling the Hunger Debuff, the movement of the player’s squad will be influenced when in hunger).&lt;br /&gt;
|-&lt;br /&gt;
|config_upgrade_cost_reduce&lt;br /&gt;
|EXP and materials needed to upgrade the current unit after discount (0~100 percentage; set to be 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|config_soldier_dead_scale&lt;br /&gt;
|A multiplier of death probability of the current minion (percentage; set to be 100 by default, final death probability = basic death probability *(config_soldier_dead_scale/100)).&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|config_project_concurrent&lt;br /&gt;
|Maximum cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
===Built-in Field in Initial Setting Table===&lt;br /&gt;
&lt;br /&gt;
In the initial setting table, we can configure some initial fields that have actual functions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|'''Default Value'''&lt;br /&gt;
|-&lt;br /&gt;
|init_pos&lt;br /&gt;
|Default info of respawning location.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_statu&lt;br /&gt;
|Default attribute status info when the player respawns.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_money&lt;br /&gt;
|Default initial property.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|home_place&lt;br /&gt;
|Default initial location ID.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skillpages&lt;br /&gt;
|Initially enabled skill page (format: see SET_SKILLPAGE directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skills&lt;br /&gt;
|Initial skill page of the player (format: see GETSKILL directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_equip&lt;br /&gt;
|Initial equipment list info of the player.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_camp_rl&lt;br /&gt;
|Initial faction relationship list. Format:&lt;br /&gt;
&lt;br /&gt;
Faction A, faction B, relationship, friendliness (-100~100)| faction A, faction C, relationship, friendliness(-100~100)|...|faction N, faction N, relationship, friendliness(-100~100).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unchanged_diplomatic_relationship&lt;br /&gt;
|Unable to change the relationships between factions dynamically? (0: Yes; 1: No).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|gametime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second).&lt;br /&gt;
|0.01&lt;br /&gt;
|-&lt;br /&gt;
|battletime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second), when this coefficient is 0, the time in skirmish or siege battles will stop.&lt;br /&gt;
|0.005&lt;br /&gt;
|-&lt;br /&gt;
|no_card_auto_supply&lt;br /&gt;
|Card durability cannot restore automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|drop_card_when_no_durability&lt;br /&gt;
|When card durability becomes 0 in this mode, the card will disappear.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|enable_card_upgrade&lt;br /&gt;
|Enable card upgrading.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|equipment_loss_durability&lt;br /&gt;
|The equipment has durability.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|levelup_exp_scale&lt;br /&gt;
|Level up EXP multiplier.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|seige_time&lt;br /&gt;
|Basic preparation time for siege battle (day). Preparation time = basic time + Weapons degree* coefficient of extra time per Weapons degree (the siege_time_per_armvalue feild).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|siege_time_per_armvalue&lt;br /&gt;
|The coefficient of extra time per weapon degree when preparing for a siege battle.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|project_time_scale&lt;br /&gt;
|The proportion of project time. &amp;lt;1: shorten time; &amp;gt;1: extend time.&lt;br /&gt;
|0.99&lt;br /&gt;
|-&lt;br /&gt;
|dailyIncomeScale&lt;br /&gt;
|The multiplier of daily city resource income.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|recruit_cost_scale&lt;br /&gt;
|The multiplier of the cost of recruitment/supply/upgrade/chest opening.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|building_cost_scale&lt;br /&gt;
|The multiplier of the cost of building construction/other projects.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|custom_intval_watcher&lt;br /&gt;
|Default custom variable field of the monitor (same as the ADD_INTVAL_WATCHER directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|show_star_info&lt;br /&gt;
|Show prestige (star).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_add_exp_per_period&lt;br /&gt;
|Cardinal number of daily AI soldier (units from other factions) EXP increase.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|team_role_count_base&lt;br /&gt;
|The basic number of character slot each squad.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
|team_role_max&lt;br /&gt;
|Maximum number of character slot each squad.&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|team_card_count_base&lt;br /&gt;
|The basic number of minion slot each squad.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|team_card_max&lt;br /&gt;
|Maximum number of minion slot each squad.&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_resource_scale&lt;br /&gt;
|Resource multiplier of AI recruitment.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_build_resource_scale&lt;br /&gt;
|Resource multiplier of AI construction.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_upgrade_resource_scale&lt;br /&gt;
|Resource multiplier of AI minion upgrading.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_highlevel_upgrade_average_days&lt;br /&gt;
|AI simulation of upgrading minions when the player’s level is high (expected number of days).&lt;br /&gt;
&lt;br /&gt;
The higher this value is, the slower AI upgrades a type of minion.&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ai_auto_balance_resource&lt;br /&gt;
|If AI will balance each kind of resources automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_invade_prob&lt;br /&gt;
|Coefficient of AI invasion probability (0~1) The closer to 1, the more likely AI will invade.&lt;br /&gt;
|0.8&lt;br /&gt;
|-&lt;br /&gt;
|invasion_destroy_factor&lt;br /&gt;
|Destruction rate after invasion or occupation. Format:&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 1: probability 1.&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 2: probability 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility N: probability N.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
1:50&lt;br /&gt;
&lt;br /&gt;
2:30&lt;br /&gt;
&lt;br /&gt;
3:10&lt;br /&gt;
&lt;br /&gt;
4:5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|monster_move_speed_random&lt;br /&gt;
|Correction range of random creep movement speed of creep emitter (0.75 at most).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|soldier_battle_killed_prob&lt;br /&gt;
|The basic casualty of the soldiers. The probability of soldiers being poorly wounded after losing a battle.&lt;br /&gt;
|0.2&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_battle_killed_prob&lt;br /&gt;
|Death probability of AI troops after losing a battle.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_hero_free&lt;br /&gt;
|AI recruits heroes for free&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed&lt;br /&gt;
|Basic movement speed of squads.&lt;br /&gt;
|240&lt;br /&gt;
|-&lt;br /&gt;
|monster_min_movespeed&lt;br /&gt;
|Minimum movement speed of creeps.&lt;br /&gt;
|150&lt;br /&gt;
|-&lt;br /&gt;
|caravan_move_speed_range&lt;br /&gt;
|Range of movement speed of Caravans. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|farmers_move_speed_range&lt;br /&gt;
|Range of movement speed of farmers. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed_range&lt;br /&gt;
|Range of movement speed of troops. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|global_move_speed_range&lt;br /&gt;
|Range of global movement speed. Format: min speed, max speed. &lt;br /&gt;
&lt;br /&gt;
This value influences all movable units on all maps.&lt;br /&gt;
|20,400&lt;br /&gt;
|-&lt;br /&gt;
|battle_gain_money_scale&lt;br /&gt;
|Scale coefficient of obtaining money in battles.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment&lt;br /&gt;
|If NPC will drop weapons (0: No; 1: Yes).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment_prob&lt;br /&gt;
|Probability of NPC dropping weapon.&lt;br /&gt;
|0.15&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_soldier&lt;br /&gt;
|Probability of each group of soldiers dropping food.&lt;br /&gt;
|0.1&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_hero&lt;br /&gt;
|Probability of each hero dropping food.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|hungry_fail_days&lt;br /&gt;
|Failed after being hungry for a certain number of days.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.2.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|ai_dailyfight_period&lt;br /&gt;
|The period between each AI compulsory invasion checks &amp;lt;=0: Disable the check (this logic is different from default AI invasion check；the default parameter (in-game day) is 5 before version 0.7.2.1) In addition, this check will be influenced by AI intensity from this version.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_active_level_default&lt;br /&gt;
|Default AI intensity level, which influences the default value of the custom filed of config_ai_level.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_roll_limit&lt;br /&gt;
|Whether to enable Roll Limit by default. This influences the default value of the custom field of config_roll_limit.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_hunger_penalty&lt;br /&gt;
|Whether to enable Hunger Debuff. This influences the default value of the custom field of config_hunger_penalty.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_seige_battlemap&lt;br /&gt;
|Default map ID of siege battle.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.3.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|init_inventory_capicity&lt;br /&gt;
|Default cardinal number of initial bag capacity.&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|def_project_concurrent&lt;br /&gt;
|Default cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.4.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_wanted_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “Wanted” of a faction (when player’s prestige is lower than “Wanted” but has not reached the “At War” status, the player will not be attacked by squads of this faction in the wild, but they will not be allowed to enter certain cities).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_war_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “At War” of a faction (when player’s prestige is lower than the point, the player will be attacked in the wild by squads of this faction).&lt;br /&gt;
| -10&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.8.0.1'''&lt;br /&gt;
|-&lt;br /&gt;
|dg_levelup_skill&lt;br /&gt;
|Skill ID of level-up special effect in battles.&lt;br /&gt;
|升级特效&lt;br /&gt;
|-&lt;br /&gt;
|init_items&lt;br /&gt;
|Initial item list.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_dropitem_model&lt;br /&gt;
|Model and special effect info of items dropped in battles (Format: world map unit model#special effect info).&lt;br /&gt;
|chest1#psChestFlash1,0,0&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}Besides specific initial fields above, there are some UI-resetting fields, starting with “gui”, in the initial set list, which are used to do a custom reset on certain built-in UI in the game. For more details, please see instruction on game interface reset. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Codes of Text Color in Common UI===&lt;br /&gt;
In dialogues, text boxes or other common UI, we can follow certain formats to change the colours of texts.&lt;br /&gt;
&lt;br /&gt;
E.g., This is a imp:red font text, red:red font text, &amp;amp;ff6699ff:custom color text font.&lt;br /&gt;
&lt;br /&gt;
Currently, we support preset colours for the following types (to use custom colours, replace “#” with “&amp;amp;” ).&lt;br /&gt;
&lt;br /&gt;
*place: unified colour for the location name.&lt;br /&gt;
*role: unified colour for the character name.&lt;br /&gt;
*camp: unified colour for faction name.&lt;br /&gt;
*item: unified colour for item name.&lt;br /&gt;
*imp: unified colour for an important message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Character Position Directive===&lt;br /&gt;
Format: position code:position parameter.&lt;br /&gt;
&lt;br /&gt;
Supported position codes are: 0: Unallocated; 1: In position; 2: In squad; 3: In a project.&lt;br /&gt;
&lt;br /&gt;
*when the code is 1: Format:  1: location ID, facility ID (if the facility ID is empty, it means the character is outside the facility).&lt;br /&gt;
*when the code is 2: Format:  2: squad ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of In-game Global Position Directive===&lt;br /&gt;
When assigning the position for a squad or object on the world map, we can follow a format of globally position assignment (e.g., the TELEPORT directive).&lt;br /&gt;
&lt;br /&gt;
Format of global position:   &lt;br /&gt;
 Map ID:coordinate X,coordinate Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Unit-Limitation Directive in Specific Battles===&lt;br /&gt;
In a specific battle table, you can fill in a directive of the following types in the “Limit” column, to execute unit or special restrictions. &lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Directive 1:parameter 1;directive 2:parameter 2;...directive N:parameter N;&lt;br /&gt;
Currently supported types of limitation directives are: &lt;br /&gt;
&lt;br /&gt;
*player: reset squad hero list. Format: character ID1,reset level (-1 or left empty: Do not reset)|. character ID2,reset level| character ID3, reset level|...| character ID N,reset level.&lt;br /&gt;
*units: reset squad minion list. Format: same as the common minion list.&lt;br /&gt;
*add_stat: additional character attribute status. Format: target character ID#status list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Directive List of Unit Control on the World Map===&lt;br /&gt;
World map unit (squad) control directives are methods used to manage the action order of world map units. When a unit has specific control directive list, it will execute every directive in sequence until the execution is finished. After the game is saved halfway of the execution of the directives and the player exits the game, the execution will continue when the save is loaded.&lt;br /&gt;
&lt;br /&gt;
Please note: after the execution of all directives of a squad, the squad will be dismissed. Dummies (creeps and dummies needed for stories included) are an exception.&lt;br /&gt;
&lt;br /&gt;
Control directive consists of int-number directives and directive content, separated by “;”. Directive of each line starts with a directive-type code and “+”, followed by a directive parameter. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 1,test map:100,100;1,test map:100,200;99,0&lt;br /&gt;
The code above means that the squad will move to coordinate 1 (100,100) first, and then to coordinate 2 (100,200). Finally, the squad will be dismissed.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive-type codes are: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Control Directive Code'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Move towards a coordinate on the world map. The parameter is the target coordinate (coordinate format: map ID: coordinate X, coordinate Y).&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Stay where you are. The parameter is the time of staying (count by in-game day).&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Enter a location. The parameter is the target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Attack the target location. The parameter is the target location ID. (invasion type: 0: Occupy; 1: Raid).&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Stay in the target location. The parameter is the target location ID, time of staying.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Execute an event. The parameter is the event ID.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Change the current StateNum value. The parameter is the new StateNum value.&lt;br /&gt;
&lt;br /&gt;
Note: StateNum can be used to mark the current status of some controlled squad. E.g., you can command a unit to a specific location on the map and execute an action. Before the unit reaches the destination, StateNum is 0; after its arrival, StateNum becomes 1. By doing so, we get to know the current status of a squad.&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|Execute custom movement directives permanently. (For directive format, see [[Common Scenario Directives#Format of Default Movement Directive of Unit Squad|Format of Default Movement Directive of Unit Squad]]).&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|Join a Warband. The parameter is the Warband ID (built-in method of the system. We do not suggest calling this).&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Execute an action. Parameter format: action ID, loop times (-1: Endless; &amp;gt;=1: Limited times; set 1 when the action itself is a looping animation), single-action time (count by second; execute the next directive when the action finishes looping, if it does not loop permanently), object(0: All units by default; 1: Leader only; 2: All followers), initial frame range (0~1; 1: the last frame of the animation; -1: a random number between 0 and 1), whether to execute the next directive after playing the animation (0: No by default; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
Supported default action list of models:&lt;br /&gt;
&lt;br /&gt;
· Loop action: standby, move, walk slowly, charge, recharging.&lt;br /&gt;
&lt;br /&gt;
· Single action: being hit, evade, block, attack, shoot, horizontal. slash, vertical slash, release, roar, knock up, jump, celebrate, die.&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|Open a chest. The parameter ID is the chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|Execute a TimeLine action. Format: TimeLineID, duration (set -1 by default, permanent; &amp;gt;0: Action ends after the time set).&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Change the attitude of the current squad towards the player (0: Neutral; 1: Hostile).&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|Change the current movement speed of the current squad. The parameter is the target movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Trade succeeded. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|Trade with a merchant. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|Follow a squad target. The parameter is the control ID of the target being followed.&lt;br /&gt;
|-&lt;br /&gt;
|99&lt;br /&gt;
|Dismiss the current squad.&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Default Movement Directive of Unit Squad===&lt;br /&gt;
Dummies, creeps and squads on the world map will change their movement modes based on the default way of moving or the changes of scripts. After choosing a movement mode, units will perform default actions according to the directive.&lt;br /&gt;
&lt;br /&gt;
Format of unit movement directive: &lt;br /&gt;
 Movement mode,parameter 1[,parameter 2,...,parameter N]&lt;br /&gt;
Currently supported movement modes and the formats of the parameter are: &lt;br /&gt;
&lt;br /&gt;
*Wander within range: WANDER, movement radius,[central coordinate X, central coordinate Y](the current position is the centre if the central coordinate is not assigned).&lt;br /&gt;
*Patrol: PATROL, coordinate 1X, coordinate 1Y, coordinate 2X, coordinate 2Y,..., coordinate NX, coordinate NY(when the first coordinate is the same as the final coordinate, the patrol movement loops in a circle; otherwise, the patrolling movement goes back and forth).&lt;br /&gt;
*Others: Stay still.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item List Info===&lt;br /&gt;
The item list info is one of the most common info formats. We use this format in the directives of obtaining various items (GETITEMS, etc.) and configuration tables.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Item code 1,number 1[,detailed info list]|item code 2,number 2[,detailed info list]|....|item code N,number N[,detailed info list].&lt;br /&gt;
The format of the detailed info list is the dictionary list of &amp;quot;key1=val1,key2=val2,...&amp;quot;. Following fields are supported: &lt;br /&gt;
&lt;br /&gt;
*[mf] auto-match the created affixes: mf=lowest quality; N-highest quality; N[-additional cardinal number of variable value]. E.g., Longsword,1,mf=0-3  Explanation: the “mf” field helps the current weapon to automatically match a quality (0~3) affix (0 means no affix).&lt;br /&gt;
&lt;br /&gt;
*[cw] create custom affix: cw= affix ID+ additional cardinal number of variable value (0-100). E.g., Longsword,1,cw=Lifesteal Sword+50 Explanation: the variable value of items with the affix of Lifesteal Sword, is between 50 and 100.&lt;br /&gt;
&lt;br /&gt;
*[w] assign the affix details of items: w=affix ID$ [variable code array]&lt;br /&gt;
*[qv] assign the variable array of item attribute: qv= variable code array&lt;br /&gt;
*[p] assign the buy-in price of items: p= buy-in price&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variable code array consists of two columns of 2-dimensional arrays. Column 1 is enumerated numbers, and column 2 is quality numbers (0~100). The two columns are connected by “/”. If a affix has 3 parts, then its variable array might be: 0/50/0/100/0/100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Weather Effect Info===&lt;br /&gt;
When using directives to control weathers, we mainly use directives to control a list weathers, which is separated by “|”. &lt;br /&gt;
&lt;br /&gt;
Format of weather effects description: &lt;br /&gt;
 Weather effect ID1, intensity|weather effect ID2,intensity|...weather effect IDN,intensity&lt;br /&gt;
Currently, supported weather effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*雨（Rain）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
&lt;br /&gt;
*雪（Snow）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
*风沙（Sandy）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雷电（Thunder）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雾（Fog）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*黑暗（Darkness）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*炎热（Hot）: Disabled when the intensity is 0 (1~100) (Heat Distortion Effect).&lt;br /&gt;
*云（Cloudy）: Disabled when the intensity is 0 (1~100) (shadows of cloud in clear days).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of weather effect field in map editor or config tables: &lt;br /&gt;
 Probability 1,duration 1:[weather effect description 1]; Probability 2,duration 2:[weather effect description 2]; Probability 3,duration 3:[weather effect description 3];[...]; Probability N,duration N:[weather effect description N]&lt;br /&gt;
E.g., 30,1:;50,3:雨,20|雾,10;20,5:风沙,30&lt;br /&gt;
&lt;br /&gt;
The above code means there is a 30% chance of not having any weather effect for a whole day, 50% chance of raining for 3 consecutive days, and 20% chance of having 5 consecutive sandy days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Camera Filter Effect Info===&lt;br /&gt;
We can use directives like SET_CAMERA_FILTER to set the camera filter of the current game.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Filter effect ID1,intensity|filter effect ID2,intensity|...filter effect IDN,intensity&lt;br /&gt;
Currently, supported filter effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*暗角 (Vignetting): Disabled when the intensity is 0 (0~100). The degree of darkness of camera’s corners.&lt;br /&gt;
*黑白 (Black&amp;amp;white): Disabled when the intensity is 0 (0~100). The black-and-white version of the camera.&lt;br /&gt;
*老旧 (Classic): Disabled when the intensity is 0 (0~100). The yellowing classic style of camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction List===&lt;br /&gt;
The following are the character TAGs used in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|LIKE&lt;br /&gt;
|Mark the type of items a specific character likes, which affects the increased speed of favour.&lt;br /&gt;
&lt;br /&gt;
Format: LIKE:type 1|type 2|...&lt;br /&gt;
|-&lt;br /&gt;
|DEF_WEAPON_SPEED&lt;br /&gt;
|Default weapon speed. Characters with this tag will take this speed as the default weapon speed even if they do not have a weapon.&lt;br /&gt;
|-&lt;br /&gt;
|FVChangeUnit&lt;br /&gt;
|Change the coefficient of character’s favour via sending gifts. Set to be the default value without this field.&lt;br /&gt;
|-&lt;br /&gt;
|dg_skill&lt;br /&gt;
|Replace the dungeon skill of this character.&lt;br /&gt;
|-&lt;br /&gt;
|attached_script&lt;br /&gt;
|ID of script event mounted on characters in battles.&lt;br /&gt;
|-&lt;br /&gt;
|loot_list&lt;br /&gt;
|The dropping list of this character in dungeon battles (can use the“EXP” item IDs as a specific source of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|IsNoExpel&lt;br /&gt;
|This character is not allowed to be expelled (enabled when this field is not empty)&lt;br /&gt;
|-&lt;br /&gt;
|IsNoBetray&lt;br /&gt;
|This character will not betray or leave their faction automatically (enabled when this field is not empty)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Location List===&lt;br /&gt;
The following is a TAG list of locations with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|Show minimap&lt;br /&gt;
|City maps are shown by default. If there are other places that need to be shown by default, this tag must be 1.&lt;br /&gt;
|-&lt;br /&gt;
|Do not show minimap&lt;br /&gt;
|It is what the field means.&lt;br /&gt;
|-&lt;br /&gt;
|Disable AI invasion&lt;br /&gt;
|Bases with this tag will not invade, patrol or occupy resources automatically.&lt;br /&gt;
|-&lt;br /&gt;
|SharedPermission&lt;br /&gt;
|The ID of the location that shares the trade permission. When this field exists, the trade permission of the current location is shared with the target location with this specific ID. &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction Table===&lt;br /&gt;
The following is a TAG list of factions with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|NO_CHANGE_DIP&lt;br /&gt;
|Will not be affected by dynamic diplomatic relations in the game, unless you use script directives to change directly.&lt;br /&gt;
|-&lt;br /&gt;
|UNFAILED&lt;br /&gt;
|This faction cannot be eliminated in a usual way.&lt;br /&gt;
|-&lt;br /&gt;
|EMBARGO&lt;br /&gt;
|Cities occupied by this faction will not send out caravans or trade with other cities.&lt;br /&gt;
|-&lt;br /&gt;
|NO_FARMER&lt;br /&gt;
|There will not be farmer migration in cities occupied by this faction.&lt;br /&gt;
|-&lt;br /&gt;
|CAMP_COLOR&lt;br /&gt;
|Set a specific colour for a faction. Sample format: CAMP_COLOR=FFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_BY_ACTIVESTATE&lt;br /&gt;
|Hide relevant info according to the current ActiveState. If the “是否隐藏” field is set to be 1 in the configuration table, then this TAG is invalidated.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===TAGs with Special Meanings in Item Table===&lt;br /&gt;
The following is a TAG list of items with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|IgnoreBagSpace&lt;br /&gt;
|This item will not occupy a slot of player’s bag. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|NoSellOrDrop&lt;br /&gt;
|This item cannot be discarded or sold. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|BatchUse&lt;br /&gt;
|Weather player can use the item in the batch. Function enabled when the field is 1. When an item with this TAG is used, the [%arg_int_val1%] in its script will be the selected number of the item.&lt;br /&gt;
|-&lt;br /&gt;
|DoNotCostWhenUse&lt;br /&gt;
|This item will not be consumed when used. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Present&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The tag field of gift type, separated by “|”.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|AiNotLoot&lt;br /&gt;
|This item cannot be accessed by AI in a normal way. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Mendable&lt;br /&gt;
|If this item is mendable, unmendable item will self-destroy after the durability becomes 0. (1: Yes ).&lt;br /&gt;
|-&lt;br /&gt;
|DropModel&lt;br /&gt;
|The model info of the item when it is on the ground in battles. (format: world map unit model ID#special effect info (replaced by the def_dropitem_model field in the initial set list if the info is left empty)).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Ones of Map Exploration Info Fields in Map List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!字段&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|BattleLoseStay&lt;br /&gt;
|Stay still after losing a battle. Only available in adventure mode (0: No; 1: Yes)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following fields are suitable for version above or higher than 0.7.2.1'''&lt;br /&gt;
|-&lt;br /&gt;
|RolePlay&lt;br /&gt;
|When the player is on this map, their character model and name will be replaced by the info of character whose ID is filled into this field. The models of the following minions will be hidden too. The bag and squad panels become inaccessible.&lt;br /&gt;
|-&lt;br /&gt;
|FixedGameTime&lt;br /&gt;
|When this field is not empty, the in-game time will be frozen at a certain point of a day (0~1.0, 0.5 means 12 pm). When the time is frozen, the world will not run on. Only units on the current map can take actions.&lt;br /&gt;
|-&lt;br /&gt;
|CameraFilter&lt;br /&gt;
|When on this map, use this field compulsorily as a camera filter. The effect is the same as the SET_CAMERA_FILTER directives.&lt;br /&gt;
|-&lt;br /&gt;
|NoFoodConsume&lt;br /&gt;
|When this field is 1, the player will not consume food on this map and will not die because of hunger.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Fields of TAG in Instance Info List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PlayerInitType&lt;br /&gt;
|The initial mode of player’s character (0: Default (use the default character template and initial position in the instance to initialize the character) 1: Manual (initialize the character via the LUA port)).&lt;br /&gt;
|-&lt;br /&gt;
|ExpMode&lt;br /&gt;
|EXP allocation mode. Format: allocation mode[,radius parameter].&lt;br /&gt;
&lt;br /&gt;
The allocation modes are: &lt;br /&gt;
&lt;br /&gt;
*0: Killer mode (default; the enemy killer has all EXP).&lt;br /&gt;
*1: Average Mode (the parameter is the allocation radius; when the parameter &amp;lt;=0, all allies share EXP).&lt;br /&gt;
*2: Share Mode (if the radius parameter &amp;gt;0, share EXP with allies with the radius).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Item Entry Info===&lt;br /&gt;
Entries of items follow the format of “entry type:{enumerated info 1, value 1; enumerated info 2, value 2;… }”, and they are set in the item list. Entries can be sorted as:&lt;br /&gt;
&lt;br /&gt;
*a: increase the character’s attribute passively. Enumerated info is the KEY to the increased attribute.&lt;br /&gt;
*skill: add new available skills to a character. Enumerated info is the skill ID.&lt;br /&gt;
*dg_skill: replace the current dungeon skill of the character. Enumerated info is the dungeon skill ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item Dropping Info===&lt;br /&gt;
Format:&lt;br /&gt;
 Probability 1,item ID1,min number,max number [,additional parameter list(see [[Common Scenario Directives#Format of Item List Info|Format of Item List Info]])]|probability 2,item ID2,min number, max number [,parameter list]|...|probability N,item N,min number,max number[,parameter list]. &lt;br /&gt;
(E.g., “LOOT*100.0, 金钱,100,200|50.0, 经验,100,200” means that there is a 100% chance of obtaining 100~200 utars and a 50% chance to obtain 100~200 EXP).&lt;br /&gt;
&lt;br /&gt;
'''In Item ID, you can execute a special ID Query, which is to query and return a result of item dropping from the global dropping list (see the format in Q全局掉落表.xlsx).'''&lt;br /&gt;
&lt;br /&gt;
The format of the parameter list of QUERY is: “parameter 1=val1, parameter 2=val2,....” Following query parameters are supported: &lt;br /&gt;
&lt;br /&gt;
*[id] obtain the result of the target ID from the global dropping list (ignore all the other query conditions when this exists and is not empty).&lt;br /&gt;
*[lv] specific conational query level（-1：return all query results; 0: query based on the current level of player）.&lt;br /&gt;
*[t1] query TAG 1 (a condition).&lt;br /&gt;
*[t2] query TAG 2.&lt;br /&gt;
*[t3] query TAG 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Script Directive in Special Effect Object Event===&lt;br /&gt;
You can attach the eftEffectEventHelper script to a special effect object to add a new play-effect event. Format of every event: event time point (number of seconds after the start), parameter 1, parameter 2,…, parameter N.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive types are:&lt;br /&gt;
&lt;br /&gt;
shake_cam: screen shake. Parameter 1 is the duration of screen shake, and parameter 2 is the intensity. &lt;br /&gt;
&lt;br /&gt;
play_sound: play audio. Parameter 1 is the audio ID.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=716</id>
		<title>Common Scenario Directives</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=716"/>
		<updated>2020-09-22T02:18:38Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Scenario Event===&lt;br /&gt;
A scenario event is a basic element used to realize scenario scripts in the game. All scenario events in the game are called by emitters or executors and put into the directive queue. These scenario events will be run by the GameWorldManager one by one according to the in-game time. An integrate scenario event consists of the following parts:&lt;br /&gt;
&lt;br /&gt;
1. Scenario Event ID: a unique label of a scenario event;&lt;br /&gt;
&lt;br /&gt;
2. Directive Content: directives that will be executed after a scenario event is triggered;&lt;br /&gt;
&lt;br /&gt;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.&lt;br /&gt;
&lt;br /&gt;
===Scenario Event Trigger===&lt;br /&gt;
Currently, all stories and events are established according to the mechanics of the scenario event trigger. The mechanics of a trigger is: event ports are set at different positions in advanced, and when the program accesses a position, it will call the port and import the current environment variables. The program will then traverse all defined triggers in the port event and return the trigger with the highest priority or all triggers that meet the conditions (to return one or all triggers is decided by the type of a port). Finally, a scenario event is executed. Triggers’ calling events is not executed immediately. Relevant events are put into the execution queue and get carried out procedurally until all events in the queue are executed.&lt;br /&gt;
&lt;br /&gt;
Following is the list of scenario events defined in the game (port types in bold indicate that they execute all trigger events that meet the conditions instead of executing the one of the highest priority): &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Port Type&lt;br /&gt;
!Explanation&lt;br /&gt;
!Object Type&lt;br /&gt;
!Object ID&lt;br /&gt;
|-&lt;br /&gt;
|passive&lt;br /&gt;
|Triggered passively; &lt;br /&gt;
&lt;br /&gt;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|talk&lt;br /&gt;
|Triggered when interacting with NPC.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|first_in&lt;br /&gt;
|Triggered when the player enters the game for the first time.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter&lt;br /&gt;
|Triggered when interacting with units on the sandbox map.&lt;br /&gt;
|&lt;br /&gt;
|Control ID of the target Unit.&lt;br /&gt;
|-&lt;br /&gt;
|before_enter_map&lt;br /&gt;
|Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_map&lt;br /&gt;
|Triggered when entering a map.&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_map&lt;br /&gt;
|Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_map&lt;br /&gt;
|Triggered when leaving a map.&lt;br /&gt;
|&lt;br /&gt;
|Current map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_place&lt;br /&gt;
|Triggered when entering the target location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_place&lt;br /&gt;
|Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted)&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_place&lt;br /&gt;
|Triggered when leaving the current location.&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_place&lt;br /&gt;
|Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_building&lt;br /&gt;
|Triggered when entering the target building&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_building&lt;br /&gt;
|Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_building&lt;br /&gt;
|Triggered when leaving the target building.&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_building&lt;br /&gt;
|Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|battle_start&lt;br /&gt;
|Triggered at the start of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|battle_over&lt;br /&gt;
|Triggered at the end of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|set_lord&lt;br /&gt;
|Triggered when AI appoints player as the ruler of a city.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|job_cmd&lt;br /&gt;
|Triggered when the player is given a working order.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|see_warband&lt;br /&gt;
|Triggered when encountering another squad and battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|curplace_inwar&lt;br /&gt;
|Triggered when the location where the player is currently settling in is attacked.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quest_done&lt;br /&gt;
|Triggered when all conditions of a mission are met (mission incomplete).&lt;br /&gt;
|&lt;br /&gt;
|Mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''on_end_work'''&lt;br /&gt;
|Triggered when completing a mission of a location.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|'''occupy_place'''&lt;br /&gt;
|Triggered when the player occupied a location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''new_day'''&lt;br /&gt;
|Triggered when starting a new day.&lt;br /&gt;
|&lt;br /&gt;
|The target number of days.&lt;br /&gt;
|-&lt;br /&gt;
|reward_follower&lt;br /&gt;
|Triggered when the player rewards their followers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reward_player&lt;br /&gt;
|Triggered when the player is rewarded.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dip_event&lt;br /&gt;
|Triggered when the player’s faction meets diplomatic affairs.&lt;br /&gt;
|Affair types:&lt;br /&gt;
&lt;br /&gt;
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice.&lt;br /&gt;
|Target Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_success&lt;br /&gt;
|Triggered when the player’s diplomatic request is met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_fail&lt;br /&gt;
|The diplomatic request is not met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|player_failed&lt;br /&gt;
|Triggered when the player failed in a skirmish. &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reinforce_request&lt;br /&gt;
|Triggered when reinforcement related to player happens.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|is_fall&lt;br /&gt;
|Triggered when a faction collapsed.&lt;br /&gt;
|&lt;br /&gt;
|Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|is_to_fall&lt;br /&gt;
|Triggered when a faction loses all bases and is about to collapse.&lt;br /&gt;
|&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|before_cash_present&lt;br /&gt;
|Triggered before being rewarded (action of rewarding is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|before_present&lt;br /&gt;
|Triggered before sending a gift (action of sending the gift is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_present&lt;br /&gt;
|Triggered when sending a gift.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter_role&lt;br /&gt;
|Triggered before the common dialogue that happens when the player encounters a character.&lt;br /&gt;
|&lt;br /&gt;
|Target Character ID.&lt;br /&gt;
|-&lt;br /&gt;
|helped_camp&lt;br /&gt;
|Triggered when the player encounters a conflict between two sides and helped one side.&lt;br /&gt;
|&lt;br /&gt;
|The faction of the leadrole of target’s squad.&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_up&lt;br /&gt;
|Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_down&lt;br /&gt;
|Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_dismiss&lt;br /&gt;
|Triggered when a squad is dismissed.&lt;br /&gt;
|Squad Type: &lt;br /&gt;
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_into_place&lt;br /&gt;
|Triggered when a squad enters a location.&lt;br /&gt;
|Squad Type: same as above.&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Script Directive List===&lt;br /&gt;
&lt;br /&gt;
Script directives in the game usually follow the format of directive type*parameter 1#parameter2#...#parameter N, and uses line break to separate multiple lines of directives.&lt;br /&gt;
&lt;br /&gt;
Currently, supported script directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Directive&lt;br /&gt;
!Instruction&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
Function: show a dialogue with the typewriter effect and character painting. &lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N.&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
&lt;br /&gt;
 When certain paragraph needs to be bound with audios, add &amp;lt;voice:audio ID&amp;gt; in the front of the paragraph to show the according to the audio file for the words. The audio will be turned off when you skip the paragraph.&lt;br /&gt;
 You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly.&lt;br /&gt;
 When the paragraph begins with “inner:...”, a special piece of information is used;&lt;br /&gt;
 The built-in special information IDs and meanings are as follow:  &lt;br /&gt;
 inner:set_player_job: object’s words when they give orders to player&lt;br /&gt;
 inner:set_player_lord: text when the player is appointed as a ruler&lt;br /&gt;
 inner:self_introduce: self-introduction of a character &lt;br /&gt;
 inner:cur_doing: the content of what the current character has been doing&lt;br /&gt;
 inner:cur_team_intent: intension of the current squad&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side. &lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump-to Event'''&lt;br /&gt;
&lt;br /&gt;
Function: Jump to and execute another specific scenario event ID.&lt;br /&gt;
&lt;br /&gt;
Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0).&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT&lt;br /&gt;
|'''Jump-to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT*scenario event ID.&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT_RETURN&lt;br /&gt;
|'''Return to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump back to the last subevent from the current subevent.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT_RETURN*&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Selection List Box'''&lt;br /&gt;
&lt;br /&gt;
Function:  Based on the text box, after the dialogue content is printed, a selection list box pops up, lets the player choose an option, and returns the result (the according [%result_code%] of the result command in the event).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 when the KEY of an option begins with &amp;quot;+&amp;quot;, the text box will not disappear after the player selects an option. &lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TALK&lt;br /&gt;
|'''Plugin Dialogue Option'''&lt;br /&gt;
Function: a selection list box that can present new options via a trigger list.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by &amp;quot;|&amp;quot;; set to be &amp;quot;any&amp;quot; by default)&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be &amp;quot;any&amp;quot; by default if nothing is filled in), but certain options (whose trigger type is SELECT and meet conditions) will be selected from the trigger and be added as new options; the text shown is bound in the trigger, and the content of the triggered event is decided by the trigger event ID.&lt;br /&gt;
&lt;br /&gt;
 Please note: when using this directive, you need to add &amp;quot;[%result_code%][&amp;gt;]99:EVENTPOJO_EVENT* &amp;quot; to the result&lt;br /&gt;
 In the trigger list, you can add a prefix &amp;quot;SUB_EVENT.&amp;quot; to a trigger event ID to mark it as a subevent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|CMD_SELECT&lt;br /&gt;
|'''System Selection List Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_SELECT*select text info#option group (same as SELECT directive).&lt;br /&gt;
|-&lt;br /&gt;
|CONFIRM&lt;br /&gt;
|'''Text Confirmation Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CONFIRM*text to confirm&lt;br /&gt;
|-&lt;br /&gt;
|TOAST&lt;br /&gt;
|'''Message on Screen'''&lt;br /&gt;
Function: a message pops up on the screen, which disappears after a short while.&lt;br /&gt;
&lt;br /&gt;
Format: TOAST*message content&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text).&lt;br /&gt;
|-&lt;br /&gt;
|GAME_MSG&lt;br /&gt;
|'''In-game News'''&lt;br /&gt;
Function: show a text in the UI message box, which can be reviewed in the News Log.&lt;br /&gt;
&lt;br /&gt;
Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System).&lt;br /&gt;
|-&lt;br /&gt;
|INPUT&lt;br /&gt;
|'''Input Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]).&lt;br /&gt;
&lt;br /&gt;
Format: INPUT*notice text#Len number limit of digit#default text.&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay).&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second).）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable).&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|BLACK_SCREEN&lt;br /&gt;
|'''Screen Curtain'''&lt;br /&gt;
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain.&lt;br /&gt;
&lt;br /&gt;
Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
Function: Set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Annotation:&lt;br /&gt;
 Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity.&lt;br /&gt;
 E.g., 雪,60|雾,20&lt;br /&gt;
 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled&lt;br /&gt;
 For weather effect ID, please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]]&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE&lt;br /&gt;
|'''Start Battle'''&lt;br /&gt;
Function: start a skirmish or a battle defined in a specific battle table.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE*battle ID (if you do not fill in a specific battle ID or fill in “ENCOUNTER”, you start a skirmish)#BGM (optional; if there is a BGM in a particular battle).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH&lt;br /&gt;
|'''Fight with Specific Unit'''&lt;br /&gt;
Function: start a custom fight with a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH*target character info (optional)#minion info of the target (optional)#battle map info (optional)#battle location info (optional)#battlefield weather (optional)#BGM (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH_TAGROLE&lt;br /&gt;
|'''Fight with Target Character'''&lt;br /&gt;
&lt;br /&gt;
Function: start a specific fight with the target character immediately.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH_TAGROLE*battle ID (battle ID is used to trigger scenario event only)#specific BGM (optional; if there is a BGM for a specific battle).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_BGM&lt;br /&gt;
|'''Change Current BGM of the Game'''&lt;br /&gt;
Function: change the current BGM of the game based on the need of stories.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_BGM*parameter 1#paramter 2&lt;br /&gt;
&lt;br /&gt;
 Parameter 1: AudioID of the target BGM (switch back to the default BGM of the current map if this is empty; when the remaining field of this ID is “MUTE”, which means no BGM is played currently).&lt;br /&gt;
 Parameter 2: validation type (0: invalidated when switching scenes; 1: always validated even when you save the game and come back unless you recall the CHANGE_BGM directive and define an empty AudioID).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_SOUND&lt;br /&gt;
|'''Sound Effect'''&lt;br /&gt;
Function: play a sound effect in the game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_ROLE_VOICE&lt;br /&gt;
|'''Play Character Voice-over'''&lt;br /&gt;
Function: play an audio file that is defined in “Voice” of the character’s tags.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|NUMSEL&lt;br /&gt;
|'''Input Value Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]).&lt;br /&gt;
&lt;br /&gt;
Format: NUMSEL*text of input box#min value#max value#default value#item price#price message(when the item price is 0, system does not show the price message. Otherwise, the message needs to follow the format of “{0} Utar(s) for each unit, {1} Utar(s) in total”).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_MONEY&lt;br /&gt;
|'''Change Player’s Money in Hand '''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_MONEY*change value.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_CHANGE_MONEY&lt;br /&gt;
|'''Change a Specific Hero’s Money in Hand'''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_CHANGE_MONEY*Hero ID#change value.&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1).&lt;br /&gt;
|-&lt;br /&gt;
|AI_CAMP_GETITEMS&lt;br /&gt;
|'''All Factions Get Items or Resources'''&lt;br /&gt;
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive.&lt;br /&gt;
&lt;br /&gt;
Format: AI_CAMP_GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_ITEMS&lt;br /&gt;
|'''Convert Item'''&lt;br /&gt;
Function: convert a specific item in the current item list into a new item proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time.&lt;br /&gt;
&lt;br /&gt;
E.g., “TRANSFER_ITEMS*小麦#小麦粉#1#1#10” means converting wheat(小麦) into wheat powder(小麦粉) at a 1:1 proportion. If during the conversion, the original item becomes insufficient, the conversion stops.&lt;br /&gt;
|-&lt;br /&gt;
|GET_RND_ITEM&lt;br /&gt;
|'''Select a Type of Item Randomly'''&lt;br /&gt;
Function: select a type of item randomly among several items.&lt;br /&gt;
&lt;br /&gt;
Format: GET_RND_ITEM*object item list (e.g., GET_RND_ITEMS*茶叶(Tea), 3|面包(Bread), 1|牛奶(Milk), 2. This means that you will get one type of the three.)&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Specific Item or Resource'''&lt;br /&gt;
Function: remove a certain number of items from the item list of the player.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_SELECT_ITEMS&lt;br /&gt;
|'''Remove the Selected Item'''&lt;br /&gt;
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_SELECT_ITEMS*maximum number of selected groups (choose object groups in the front from the selected targets)#number of removal(optional; set -1 by default. When the number is lower than 0 or higher than the number of the object’s stacks, remove the whole group. Otherwise, draw a specific number of all selected targets).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_PRESENT&lt;br /&gt;
|'''Remove Specific Gift Item That Meet Requirement'''&lt;br /&gt;
Function: remove a gift item from the item list based on a specific gift tag.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of &amp;quot;Like&amp;quot; in the mission list.&lt;br /&gt;
|-&lt;br /&gt;
|ITEMS_SELECTOR&lt;br /&gt;
|'''Open Item Selection Text Box'''&lt;br /&gt;
Function: an item selection text box pops up. You can restore your choice in a queriable variable ([%last_seled_items%],[%last_seled_item_id%], etc).&lt;br /&gt;
&lt;br /&gt;
Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list &lt;br /&gt;
|-&lt;br /&gt;
|TEAM_GAINEXP&lt;br /&gt;
|'''Player’s Squad Gains EXP'''&lt;br /&gt;
Function: members in the player’s squad gain average EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|TEST_ADD_ROLE_EXP&lt;br /&gt;
|'''Specific Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEST_ADD_ROLE_EXP*hero ID#exp.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_ROLE_LV&lt;br /&gt;
|'''Change Character Level'''&lt;br /&gt;
Function: change the level of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_ROLE_LV*hero ID#expected level.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_GUARDS_LEVELUP&lt;br /&gt;
|'''All Defending Heroes Level Up'''&lt;br /&gt;
Function: all heroes in a specific location increase their level by 1.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_GUARDS_LEVELUP*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_TEAM_LEVELUP&lt;br /&gt;
|'''All Heroes in Player’s Squad Level UP'''&lt;br /&gt;
Function: all heroes in the player’s squad level up directly.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_TEAM_LEVELUP*.&lt;br /&gt;
|-&lt;br /&gt;
|SETTRIGG&lt;br /&gt;
|'''Set Trigger Switch'''&lt;br /&gt;
Function: turn on or turn off a trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: SETTRIGG*trigger ID#status value (0: On; 1: Off)&lt;br /&gt;
|-&lt;br /&gt;
|TRIGGER&lt;br /&gt;
|'''Execute Trigger'''&lt;br /&gt;
Function: execute a specific trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: TRIGGER*trigger ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_ES&lt;br /&gt;
|'''Manually Set Scenario Event Status'''&lt;br /&gt;
Function: set the execution status of a scenario event manually (after the logics have been executed, the result will be marked with ResultCode of the current event).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event).&lt;br /&gt;
|-&lt;br /&gt;
|SETINTVAR&lt;br /&gt;
|'''Set Custom Int Variable'''&lt;br /&gt;
Function: set a custom int variable (recorded by saves). Some variable fields will be connected the in-game logic parameter (for custom int variable that are defined inside the program, please see the“[[Common Scenario Directives#Built-in Custom Variable Field|Built-in Custom Variable Field]]”) and can be queried via built-in query parameter ([%int_val:ID%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETINTVAR*parameter ID#current int value&lt;br /&gt;
|-&lt;br /&gt;
|CHANGEINTVAR&lt;br /&gt;
|'''Change Custom Int Variable'''&lt;br /&gt;
Function: change the value of the current custom int variable.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TEMP_ID&lt;br /&gt;
|'''Set Temporary ID Variable'''&lt;br /&gt;
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TEMP_ID*ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETSTRVAR&lt;br /&gt;
|'''Set Custom String Variable'''&lt;br /&gt;
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETSTRVAR*Variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIMETAG&lt;br /&gt;
|'''Tag a Custom Crucial Time Point '''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can use [%tag_gametime_elapse%] to load the time span since the time point you record.&lt;br /&gt;
&lt;br /&gt;
Please note: this directive is only used to transfer temporary variables in a series of stories, and the tag will not be stored in saves. Do not use this for scenes that need permanent data.&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIMETAG*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIME&lt;br /&gt;
|'''Tag a Custom In-game Time Point'''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can query the relevant info of this time point via query parameter (see[%gametime_elapse%] and [%gametime_elapse_by_day%], etc.).&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIME*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CUSTOM_CD&lt;br /&gt;
|'''Set a Custom Cooldown Time'''&lt;br /&gt;
Function: set a custom cooldown timer and see whether the current cooldown is in use by checking if [%is_custom_cd:ID%] is 1 or not.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;＞0: set a specific time (count by day)).&lt;br /&gt;
|-&lt;br /&gt;
|GET_QUEST&lt;br /&gt;
|'''Claim a Mission'''&lt;br /&gt;
Function: claim a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: GET_QUEST*mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_QS&lt;br /&gt;
|'''Add Mission Subitem Counter'''&lt;br /&gt;
Function: add a subitem counter of missions manually.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter.&lt;br /&gt;
|-&lt;br /&gt;
|SETQUESTIEM&lt;br /&gt;
|'''Set Value of Mission Subitem'''&lt;br /&gt;
Function: set the value of the subitem of missions.&lt;br /&gt;
&lt;br /&gt;
Format: SETQUESTIEM*mission ID#subitem index#value&lt;br /&gt;
|-&lt;br /&gt;
|DONE_QUEST&lt;br /&gt;
|'''Complete a Mission'''&lt;br /&gt;
Function: mark and complete a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: DONE_QUEST*mission ID#reward or not(1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_IMG&lt;br /&gt;
|'''Show a Character Painting Frame'''&lt;br /&gt;
Function: [not suggested; recommend using the SHOW_CG direcitve].&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*name of image*preset special effect 0*duration (second).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_IMG&lt;br /&gt;
|'''Disable Character Painting Frame'''&lt;br /&gt;
Function: disable the current character painting frame.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_IMG*preset special effect 0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_ROLE&lt;br /&gt;
|'''Force Character to Join'''&lt;br /&gt;
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel.&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_ROLE&lt;br /&gt;
|'''Force Character to Leave'''&lt;br /&gt;
Function: force a character to leave your squad.&lt;br /&gt;
&lt;br /&gt;
Format: QUIT_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE&lt;br /&gt;
|'''Change Location Status'''&lt;br /&gt;
Function: set the current status of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLEPOS&lt;br /&gt;
|'''Set Character Position'''&lt;br /&gt;
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLEPOS*character ID#position info&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_PLACE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport Player to Specific Position'''&lt;br /&gt;
Function: teleport player’s squad to a specific position in the world.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*world position info.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_PLACE&lt;br /&gt;
|'''Teleport Player to Specific Location'''&lt;br /&gt;
Function: teleport player’s squad to a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_PLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_ROLE&lt;br /&gt;
|'''Teleport Player to Target Character'''&lt;br /&gt;
Function: teleport player’s squad to where the target character is currently staying (this only works when the target is in a squad or a location).&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CMD&lt;br /&gt;
|'''Exclusive Directive Group for Unit Control on Sandbox Map '''&lt;br /&gt;
Function: control various units to execute specific directives on a sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: MAP_CMD*directive content&lt;br /&gt;
&lt;br /&gt;
 Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes).&lt;br /&gt;
 Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate.&lt;br /&gt;
 Hide current battle mark: HIDE_BATTLE_MARK#1.&lt;br /&gt;
|-&lt;br /&gt;
|RESTORE&lt;br /&gt;
|'''Player’s Squad Get Recovered'''&lt;br /&gt;
Function: all units in the player’s squad are recovered.&lt;br /&gt;
&lt;br /&gt;
Format: RESTORE*parameter (&amp;lt;=0: squad fully recovered; &amp;gt;0: squad recovered by a specific point).&lt;br /&gt;
|-&lt;br /&gt;
|TIME_ELAPSE&lt;br /&gt;
|'''Time Acceleration'''&lt;br /&gt;
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up.&lt;br /&gt;
&lt;br /&gt;
Format: TIME_ELAPSE*in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#show time bar (0: No(default); 1: Yes)#operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|WAIT_EXEC&lt;br /&gt;
|'''Wait and Execute a Script Event'''&lt;br /&gt;
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: WAIT_EXEC* in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#script event ID #operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSEIGE&lt;br /&gt;
|'''Open Siege Management Panel'''&lt;br /&gt;
Function: show a siege management panel and operate reinforcement squads based on the preset (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
Format: OPENSEIGE*panel mode(0: attack city; 1: defend city)#target location ID (optional; set to be the target location of the current environment variable by default).&lt;br /&gt;
|-&lt;br /&gt;
|OCCUPY&lt;br /&gt;
|'''Execute City Occupation'''&lt;br /&gt;
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
&lt;br /&gt;
Format: OCCUPY*0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_WARBAND&lt;br /&gt;
|'''Join Warband'''&lt;br /&gt;
Function: joined an existed warband（a group of fighting squads from two different sides） (use [$tagwb:id$] to obtain the Warband info of the current skirmish).&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_WARBAND*warband ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_CAMP&lt;br /&gt;
|'''Change Character Faction'''&lt;br /&gt;
Function: change the faction of a target character directly.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_CAMP*faction ID#target character ID#recruiter ID(if this field is player then the character will join the player’s squad directly).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_OWN_CAMP&lt;br /&gt;
|'''Player Creates Their Faction'''&lt;br /&gt;
Function: player creates and activates their own faction. Player’s faction has a fixed default ID: Self-built Faction. This faction exists since the beginning of the game, but it is inactivated. Calling this directive will activate the player’s faction, making player and their followers join this faction.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_OWN_CAMP*name of self-built faction.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_ACTIVE&lt;br /&gt;
|'''Change Faction Project Status'''&lt;br /&gt;
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_RL&lt;br /&gt;
|'''Change Faction Relationship'''&lt;br /&gt;
Function: change diplomatic relationship or friendliness between factions.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_RL*faction A#faction B#relationship (-1: Remain the same; 0: Neutral; 1: Hostile; 2: Friendly)#friendliness value change#expected friendliness value (if this field exists).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_CAMP_REP&lt;br /&gt;
|'''Change Player’s Prestige (Tribute) towards Faction'''&lt;br /&gt;
Function: change player’s prestige (Tribute) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_CAMP_REP*target faction ID#value change#expected value (this works when the value is not empty). The faction refers to the player’s current faction if the faction ID is empty.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_REP&lt;br /&gt;
|'''Change Player’s Prestige (Friendliness) towards Faction'''&lt;br /&gt;
Faction: change the player’s prestige (Friendliness) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|FAME&lt;br /&gt;
|'''Change Player’s Global Prestige'''&lt;br /&gt;
Function: change the player’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: FAME*value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_FAME&lt;br /&gt;
|'''Change Character’s Global Prestige'''&lt;br /&gt;
Function: change a specific character’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_FAME*target character ID#value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PERSON_FV&lt;br /&gt;
|'''Change Favor between the Player and a Character'''&lt;br /&gt;
Function: change favor between the player and another character.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_ACTIVE&lt;br /&gt;
|'''Change Character Project Status'''&lt;br /&gt;
Function: change the project status of a character (not controlled by the player). When this character is inactive, they will not be refreshed in Taverns or execute AI actions like moving.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PROSP_BY_CAMP&lt;br /&gt;
|'''Change Prosperity of All Bases of Faction'''&lt;br /&gt;
Function: change the prosperity of all bases of a specific faction proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PROSP_BY_CAMP*faction ID#percentage(&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY&lt;br /&gt;
|'''Change Location Prosperity''' &lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY*location ID#value change#expected value (this works when the value is not empty; cannot exceed the maximum Prosperity of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY_BY_PCT&lt;br /&gt;
|'''Change Location Prosperity by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF&lt;br /&gt;
|'''Change Location Defense'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Defense of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF*location ID#value change#expected value(this works when the value is not empty; cannot exceed the maximum Defense of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF_BY_PCT&lt;br /&gt;
|'''Change Location Defense by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the defense of a location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_SECURITY&lt;br /&gt;
|'''Change Location Security'''&lt;br /&gt;
&lt;br /&gt;
Function: change the security of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CUSTOM_INT&lt;br /&gt;
|'''Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: a custom int field value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. &lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_CUSTOM_INT&lt;br /&gt;
|'''Change Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the custom int value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_ADD_BUILDING&lt;br /&gt;
|'''Add Custom Facility'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom facility to a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_REMOVE_BUILDING&lt;br /&gt;
|'''Remove Custom Facility from Location'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom facility from a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_REMOVE_BUILDING*location ID#facility ID.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_CARAVAN&lt;br /&gt;
|'''Create Caravan'''&lt;br /&gt;
&lt;br /&gt;
Function: create a caravan in a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_TEAM&lt;br /&gt;
|'''Create Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad, which takes actions according to specific directives.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_TEAM*position on the map#faction#character list (characters included will leave their current squads or locations compulsorily)#minion card list (card ID#level, number |card ID2#level 2, number 2|.......)#directive method (see below)#directive parameter#squad TAG(used to search for specific squads).&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive methods are:&lt;br /&gt;
&lt;br /&gt;
· 0: custom directive: the parameter of the custom directive is the directive for the squad (format: directive type 1, parameter 1; directive type 2, parameter 2;……; directive type N, parameter N) For detailed directive format, please see the Squad Preset Directive.&lt;br /&gt;
&lt;br /&gt;
· 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default).&lt;br /&gt;
&lt;br /&gt;
· 2: premade directive of invading faction: the parameter is the ID of the target faction, priority of target (0: Distance first; 1: Defense first), invasion method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|DISMISS_TEAM&lt;br /&gt;
|'''Dismiss Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss a specific squad.&lt;br /&gt;
&lt;br /&gt;
Format: DISMISS_TEAM*map unit identification ID&lt;br /&gt;
|-&lt;br /&gt;
|TEAM_ORDER&lt;br /&gt;
|'''Change Squad Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: change the current directive list of the squad.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_PLACE&lt;br /&gt;
|'''Attack Location'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside.&lt;br /&gt;
&lt;br /&gt;
Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_CAMP&lt;br /&gt;
|'''Attack Faction'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to attack another faction immediately. Please note: these two factions must be hostile towards each other or both stand neutral. If the attacker does not have sufficient military power, the attack might not happen.&lt;br /&gt;
&lt;br /&gt;
Format: IVASION_CAMP*attacker (faction) ID#target faction ID#priority of target(0: Distance first; 1: Defense first)#invasion type (0: Occupation; 1:Raid)#number of bases involved (0: All; &amp;gt;0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel with a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_LOCAL_PRODUCT&lt;br /&gt;
|'''Add Map Specialty'''&lt;br /&gt;
&lt;br /&gt;
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y.&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERMISSION&lt;br /&gt;
|'''Set Trade Permission'''&lt;br /&gt;
&lt;br /&gt;
Function: set trade permission for a location.&lt;br /&gt;
&lt;br /&gt;
Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|TROOPS_ALLOC&lt;br /&gt;
|'''Garrison Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the garrison panel of a location.&lt;br /&gt;
&lt;br /&gt;
Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|GETSKILL&lt;br /&gt;
|'''Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill to a character.&lt;br /&gt;
&lt;br /&gt;
Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills).&lt;br /&gt;
|-&lt;br /&gt;
|LEARN_SKILL&lt;br /&gt;
|'''Consume Skill Point to Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character in a squad and make them learn a new skill. If they do not have enough skill point, they cannot learn the skill.&lt;br /&gt;
&lt;br /&gt;
Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVESKILL&lt;br /&gt;
|'''Forget Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a skill from a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills)&lt;br /&gt;
|-&lt;br /&gt;
|RESET_SP&lt;br /&gt;
|'''Reset Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the skill points of a character.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_SP*character ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_UNUSEDSP&lt;br /&gt;
|'''Change Available Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill point to a player and allocate the skill point.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_UNUSEDSP*number of skill point.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SKILLPAGE&lt;br /&gt;
|'''Activate or Remove Player’s Skill Page'''&lt;br /&gt;
&lt;br /&gt;
Function: activate or remove a skill page of the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_TEAMINFO&lt;br /&gt;
|'''Show Info of Current Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: show the information on the current squad that you encounter.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_TEAMINFO*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_FLAG&lt;br /&gt;
|'''Set Complete Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story.&lt;br /&gt;
&lt;br /&gt;
Format: SET_FLAG*name of the mark#mark value.&lt;br /&gt;
|-&lt;br /&gt;
|UPDATE_MARKS&lt;br /&gt;
|'''Mark Update'''&lt;br /&gt;
&lt;br /&gt;
Function: update marks on the map.&lt;br /&gt;
&lt;br /&gt;
Format: UPDATE_MARKS*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUMMY&lt;br /&gt;
|'''Set Dummy or Creep Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode on Sandbox Map'''&lt;br /&gt;
&lt;br /&gt;
Function: control the camera mode on the sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter&lt;br /&gt;
&lt;br /&gt;
and meanings of the parameters:&lt;br /&gt;
&lt;br /&gt;
0: follows the player’s character. No parameter (default).&lt;br /&gt;
&lt;br /&gt;
1: follows a specific target. The parameter is the particular map unit identification ID.&lt;br /&gt;
&lt;br /&gt;
2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Map'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of all cities on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|TRY_RECRUIT_FREE_ROLE&lt;br /&gt;
|'''Try Neutral Hero Recruitment'''&lt;br /&gt;
&lt;br /&gt;
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full).&lt;br /&gt;
&lt;br /&gt;
Format: TRY_RECRUIT_FREE_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHK_RECRUIT_CAPTIVE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_CAP&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|SEND_ENVOY&lt;br /&gt;
|'''Send Diplomatic Envoy'''&lt;br /&gt;
&lt;br /&gt;
Function: send a diplomatic envoy for specific diplomatic missions.&lt;br /&gt;
&lt;br /&gt;
Format: SEND_ENVOY*faction ID (refer to player’s faction when empty)#diplomatic behaviour (1: Ransom; 2:Friendly; 3: War; 4: Alliance; 5: Alliance broke; 6: Armistice)#target ID (when you ransomed a character, it is the character ID; otherwise it is the target faction ID)#additional parameter(usually it is the required amount of money)#envoy arrival (1: No waiting time; 0: Need to wait).&lt;br /&gt;
|-&lt;br /&gt;
|DIP_DECIDE&lt;br /&gt;
|'''Execute Diplomatic Event Check'''&lt;br /&gt;
&lt;br /&gt;
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event).&lt;br /&gt;
&lt;br /&gt;
Format: DIP_DECIDE*result code (1: Agreement; 0: Decline).&lt;br /&gt;
|-&lt;br /&gt;
|EXPEL_ROLE&lt;br /&gt;
|'''Expel Character'''&lt;br /&gt;
&lt;br /&gt;
Function: expel a character out of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: EXPEL_ROLE*faction ID#character ID.&lt;br /&gt;
|-&lt;br /&gt;
|TRY_REWARD_ROLE&lt;br /&gt;
|'''Try to Reward a Follower'''&lt;br /&gt;
&lt;br /&gt;
Function: try to reward a follower.&lt;br /&gt;
&lt;br /&gt;
Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Add Global Buff to Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: add a global buff to the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_GLOBAL_BUFF*buffID#duration (in-game days)#number of stacks (set 1 by default)#upper limit of stacks (set -1 by default, no limit).&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF*buffID&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF_BYCLASS&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove All Global Buffs of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all global buffs of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_FAILED&lt;br /&gt;
|'''Game Failed'''&lt;br /&gt;
&lt;br /&gt;
Function: a common result of the player failing their game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_FAILED*1.&lt;br /&gt;
|-&lt;br /&gt;
|LOSE_INVENTORY&lt;br /&gt;
|'''Player Loses Common Items'''&lt;br /&gt;
&lt;br /&gt;
Function: the player loses their items once (only goods and money).&lt;br /&gt;
&lt;br /&gt;
Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGROLE&lt;br /&gt;
|'''Change Object Character of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object character of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGPLACE&lt;br /&gt;
|'''Change Object Location of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object location of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGPLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|SURRENDER&lt;br /&gt;
|'''Faction Surrenders'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender).&lt;br /&gt;
&lt;br /&gt;
Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter&lt;br /&gt;
|-&lt;br /&gt;
|GEN_RND_PLACE&lt;br /&gt;
|'''Select Random Location to Query'''&lt;br /&gt;
&lt;br /&gt;
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives.&lt;br /&gt;
&lt;br /&gt;
Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction)&lt;br /&gt;
|-&lt;br /&gt;
|HERO_UPGRADE&lt;br /&gt;
|'''Hero Enhancement'''&lt;br /&gt;
&lt;br /&gt;
Function: enhance an attribute permanently of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit).&lt;br /&gt;
|-&lt;br /&gt;
|HERO_SET_STATU&lt;br /&gt;
|'''Set Character Attribute Field'''&lt;br /&gt;
&lt;br /&gt;
Function: set a value of an attribute field for a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_BUFF&lt;br /&gt;
|'''BUFF Add Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: add a faction buff to a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_BUFF*faction ID#buff ID#duration (in-game days; when this value is lower than 0, the buff becomes permanent unless it is removed compulsorily).&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF&lt;br /&gt;
|'''Remove Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF*faction ID#buff ID.&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF_BYCLASS&lt;br /&gt;
|'''Remove Faction Buff by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''Remove All Faction Buffs'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all faction buffs from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Add Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: add a dynamic attribute field to a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Reset Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: reset all values in the dynamic attribute field in a faction.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_CAMP_EXTRA_STATU*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|WEAPON_DURABILITY_DOWN&lt;br /&gt;
|'''Weapon Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of the current weapon. When the durability is below 0, the weapon is destroyed. If the weapon’s durability is -1 (does not have durability), nothing happens with this directive.&lt;br /&gt;
&lt;br /&gt;
Format: WEAPON_DURABILITY_DOWN*value.&lt;br /&gt;
|-&lt;br /&gt;
|ITEM_DURABILITY_DOWN&lt;br /&gt;
|'''Specific Item Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of an item (with the right tag and meets the level condition(&amp;gt;= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed.&lt;br /&gt;
&lt;br /&gt;
Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SYNTH_STATE&lt;br /&gt;
|'''Set Status of Recipe'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific recipe.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned)&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SYNTH_DLG&lt;br /&gt;
|'''Open Item Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of item crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SYNTH_DLG*if locked (0: Do not lock the main category; 1: Lock display category)#catagory page shown by default (can be set empty by default; use “,” to separate pages; show the first page by default; this field can show hidden categories when the main category is locked)#story key to execute after closing the crafting dialogue (can be empty).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CARD_SYNTH_DLG&lt;br /&gt;
|'''Open Card Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of card crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CARD_SYNTH_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_EFT&lt;br /&gt;
|'''Play Special Effect'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect on the current map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#map coordinate#initial rotation degree (can be the rotation vector of the three directions or a spinning degree of the Y-axis)#scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_MU_EFT&lt;br /&gt;
|'''Unit Following Special Effect on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect that follows a unit on a specific map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_MU_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#map unit ID#object range (0: hero only; 1: all units)#initial rotation degree (can be the rotation vector of the three directions, or a spinning degree of the Y-axis))# scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_MAPAREA_SELECTOR&lt;br /&gt;
|'''Open Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a UI panel of area selector on the current sandbox map. You can select a location for the current object in the predefined area on this panel, and then a result is returned. If the result_code returns 1, the location setting succeeded; if 0, the setting failed. The location info is recorded in [$last_selpos$].&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_FREEAREA_SELECTOR&lt;br /&gt;
|'''Open Free Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_SELECTOR&lt;br /&gt;
|'''Open Location Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a suggested location selector panel. Selected result will be stored in [$tagplace$], its number stored in [%result_code%].If [%result_code%] is 9999, player cancels the selection. &lt;br /&gt;
&lt;br /&gt;
Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter).&lt;br /&gt;
|-&lt;br /&gt;
|SET_LORD&lt;br /&gt;
|'''Set City Ruler'''&lt;br /&gt;
&lt;br /&gt;
Function: set a city ruler for a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_LORD*character ID#location ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_CHEST&lt;br /&gt;
|'''Add a Custom Chest'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom chest on the world map according to the setting info (this “chest” can be any interactive object on the world map, such as materials, ruins, and soldier recruitment point).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (&amp;gt;0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CHEST&lt;br /&gt;
|'''Set Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a controllable chest on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CHEST*map ID#chest ID#status (&amp;gt;0: How many times you can open the chest; &amp;lt;=0: Chest Opened).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CURCHEST&lt;br /&gt;
|'''Set Current Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of the target chest in the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CURCHEST*statu (same as SET_CHEST).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_SYSTEM_UI&lt;br /&gt;
|'''Turn Off System UI'''&lt;br /&gt;
&lt;br /&gt;
Function: turn of the current system UI.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_SYSTEM_UI*.&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_ITEM_PANEL&lt;br /&gt;
|'''Close Bag UI'''&lt;br /&gt;
&lt;br /&gt;
Function: close the current UI panel of the player’s bag (if it exists).&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_ITEM_PANEL*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLES_SELECTOR&lt;br /&gt;
|'''Turn Off Character Selector UI'''&lt;br /&gt;
Function: turn off the current system UI of the character selector.&lt;br /&gt;
&lt;br /&gt;
Format: ROLES_SELECTOR*title of selection list box#number limit of options (&amp;lt;0: No limit)#option range (0: Global non-template character; 1: Player squad character; 2: Character in the Character Table)#conditional expression#parameter (the parameter is the character list when the selection range is the specific Character Table).&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
 ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&amp;amp;[$tagrole:campid$][&amp;lt;&amp;gt;][$null$]#&lt;br /&gt;
 ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4.&lt;br /&gt;
The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%].&lt;br /&gt;
|-&lt;br /&gt;
|ASK_ABOUT_SOMEBODY_SELECTOR&lt;br /&gt;
|'''Ask-about Character Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: the character who you ask whereabout of is currently not involved in the logic calculation. The character selection list box pops up, and the result is stored in [%arg_str_val1%]. When the result [%result_code%] is 9999, player cancels the selection.&lt;br /&gt;
&lt;br /&gt;
Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about.&lt;br /&gt;
|-&lt;br /&gt;
|CARD_SELECTOR&lt;br /&gt;
|'''Card Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: show the panel of current card list for the player to select.&lt;br /&gt;
&lt;br /&gt;
Format: CARD_SELECTOR*title of selection list box#number limit of selection (&amp;lt;0: No limit)#selection range (0: Card in the player squad; 2: Specific unit list) #parameter (optional; the parameter is the unit list when the selection range is the specific Unit Table).&lt;br /&gt;
|-&lt;br /&gt;
|ASSEMBLE_ARMY&lt;br /&gt;
|'''Gather Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: gather all troops and followers of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ASSEMBLE_ARMY#Gatherer ID#follower ID (can be empty; use “|” to separate; can use [%last_seled_roles%], the result of ROLES_SELECTOR). If the follower ID is empty, all characters under the faction are selected by default.&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_ALL_ASSEMBLE_ARMY&lt;br /&gt;
|'''Dismiss All Gathered Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss all troops that have been gathered or gathering.&lt;br /&gt;
&lt;br /&gt;
Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_IN_PROJECT&lt;br /&gt;
|'''Character Starts to Execute Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a character starts to execute a specific project.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_IN_PROJECT*character ID#project ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_FINISH_PROJECT&lt;br /&gt;
|'''Character Ends Current Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific character ends their current project compulsorily.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,...&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PROJECT_ADMIN&lt;br /&gt;
|'''Open Personal Project Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the personal project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default).&lt;br /&gt;
|-&lt;br /&gt;
|GROUP_PROJECT_ADMIN&lt;br /&gt;
|'''Open Group Project Panel'''&lt;br /&gt;
Function: open the group project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default).&lt;br /&gt;
 Currently, supported project binding types are:&lt;br /&gt;
 Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty&lt;br /&gt;
 world: custom building construction; object parameter format: custom area control ID; belong to which base (when this field is empty, the building does not belong to any city).&lt;br /&gt;
|-&lt;br /&gt;
|SET_REVIVE_POS&lt;br /&gt;
|'''Set Respawn Position'''&lt;br /&gt;
&lt;br /&gt;
Function: set a new respawn position.&lt;br /&gt;
&lt;br /&gt;
Format: SET_REVIVE_POS*world map position (map ID:x,y).&lt;br /&gt;
|-&lt;br /&gt;
|SET_SILENCE_MODE&lt;br /&gt;
|'''Set Silence Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable message silence mode. &lt;br /&gt;
&lt;br /&gt;
Format: SET_SILENCE_MODE*silence mode (0: Disabled; 1: Do not show TOAST box and deliver messages only; TOAST info of obtaining items is shown in the message; 2: Do not show TOAST and messages).&lt;br /&gt;
|-&lt;br /&gt;
|START_RAID_PLACE&lt;br /&gt;
|[Abolished]&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_PLACE&lt;br /&gt;
|'''Add Custom Location'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom location on a specific spot on the world map.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_PLACE*custom location ID (globally unique)#belong to the city (can be empty; the location does not belong to any city when this field is empty#location info template ID#location info#default faction of the location.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_NAME&lt;br /&gt;
|'''Change Location Name'''&lt;br /&gt;
&lt;br /&gt;
Function: change the name of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_NAME*location ID#custom name. &lt;br /&gt;
|-&lt;br /&gt;
|OPEN_PLACE_BUILD_UI&lt;br /&gt;
|'''Open Location Building Construction Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the location building construction panel.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD&lt;br /&gt;
|'''Add New Card'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD_PIECE&lt;br /&gt;
|'''Add Card with Specific Durability'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card, whose durability is a specific number (lower than the durability limit).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|SET_OBS_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of an obstacle area on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_AREA&lt;br /&gt;
|'''Explore Area'''&lt;br /&gt;
&lt;br /&gt;
Function: explore an area of the current map (dispel the war fog).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_MAP&lt;br /&gt;
|'''Explore the Whole Map'''&lt;br /&gt;
&lt;br /&gt;
Function: explore the whole map (dispel the war fog of the entire map).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_MAP*map ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTVAL_WATCHER&lt;br /&gt;
|'''Add Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. &lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTVAL_WATCHER*variable monitor info.&lt;br /&gt;
&lt;br /&gt;
(Format: field Key1,displayed name1,enumerated value 1a=enumerated name1a|enumerated value 1b=enumerated name1b|...|enumerated value 1N=enumerated name 1N, visibility status in battles([optional，set 0 by default] 0: No; 1: Yes);...; monitor field info N).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTVAL_WATCHER&lt;br /&gt;
|'''Remove Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom variable monitor filed.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTVAL_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_INTVAL_WATCHERS&lt;br /&gt;
|'''All Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: exact all variable monitor fields.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_INTVAL_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set an event timer, and a specific event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (&amp;lt;0: the timer is closed; when the timer type is Preset, this parameter is the number of days since the beginning of the game; when the timer type is Countdown, the parameter is the number of days)#timer type (0: Preset (triggered when time is reached); 1: Countdown)#Event ID when time reached#compulsory update (1: Compulsory update; 0: Non-compulsory update(will not change the current data of existing timer); set 1 if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER&lt;br /&gt;
|'''Remove Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER*timer ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TIMER_TIME&lt;br /&gt;
|'''Change Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: increase/decrease the time of a timer.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_TIMER_WATCHER&lt;br /&gt;
|'''Add Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] &lt;br /&gt;
&lt;br /&gt;
coefficient of the scaling of time parameter), visibility in battles ([optional; set 0 by default]; 0: No; 1: Yes)|...|timer ID N, displayed time format N, scale parameter N.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER_WATCHER&lt;br /&gt;
|'''Remove Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the monitor field of a custom event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_TIMER_WATCHERS&lt;br /&gt;
|'''Clear All Monitor Fields of Custom Event Timer''' &lt;br /&gt;
&lt;br /&gt;
Function: clear all monitor fields of custom event timer.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_TIMER_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_RECRUIT_CARD_IN_PLACE&lt;br /&gt;
|'''Open City Recruitment Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the player’s recruitment panel in a city.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_RECRUIT_CARD_IN_PLACE*city ID#ID of the event executed after recruitment (optional)#ID of the event executed after player cancels the recruitment (optional).&lt;br /&gt;
|-&lt;br /&gt;
|STORY_CARD_START&lt;br /&gt;
STORY_CARD_LINE&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END&lt;br /&gt;
|'''Open Story Card (2D Image)''' '''Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the story card panel. There must be a STORY_CARD_START and a STORY_CARD_END to avoid errors. STORY_CARD_LINE stands for the story paragraphs that need to be put between the start and the end (no number limit).&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_START*file name of the card.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 1.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 2.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 3.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END*.&lt;br /&gt;
|-&lt;br /&gt;
|AUTOSAVE&lt;br /&gt;
|'''AutoSave'''&lt;br /&gt;
&lt;br /&gt;
Function: execute autosave immediately.&lt;br /&gt;
&lt;br /&gt;
Format: AUTOSAVE*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Saving Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game-saving dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SAVE_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Loading Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game loading dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_LOAD_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|EXCHANGE_CARD&lt;br /&gt;
|'''Open Card Exchange Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the card exchange panel.&lt;br /&gt;
&lt;br /&gt;
Format: EXCHANGE_CARD*object type (0: Location; 1: Squad)#object ID([optional; set to be the current location by default]; when the object is a location, the ID is the location ID, squad ID for squad object).&lt;br /&gt;
|-&lt;br /&gt;
|LEVEL_FINISH&lt;br /&gt;
|'''Complete Level'''&lt;br /&gt;
&lt;br /&gt;
Function: used in scenarios to indicate the accomplishment of a level.&lt;br /&gt;
&lt;br /&gt;
Format: LEVEL_FINISH*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA_FILTER&lt;br /&gt;
|'''Set Camera Filter'''&lt;br /&gt;
&lt;br /&gt;
Function: set a filter for the camera. &lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10).&lt;br /&gt;
&lt;br /&gt;
Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100.&lt;br /&gt;
|-&lt;br /&gt;
|TLACTION&lt;br /&gt;
|'''Timeline Action'''&lt;br /&gt;
&lt;br /&gt;
Function: specific units on the world map do TIMELINE actions.&lt;br /&gt;
&lt;br /&gt;
Format: TLACTION*map character ID#file name of Timeline action#lasting time of action.&lt;br /&gt;
|-&lt;br /&gt;
|SELECTION_VIEW&lt;br /&gt;
|'''Fullscreen Special Story Selection'''&lt;br /&gt;
&lt;br /&gt;
Function: open a fullscreen selection panel of a special story.&lt;br /&gt;
&lt;br /&gt;
Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*).&lt;br /&gt;
|-&lt;br /&gt;
|DIALOG_BUBBLE&lt;br /&gt;
|'''Map Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying.&lt;br /&gt;
|-&lt;br /&gt;
|TEXT_EXPLORE_START&lt;br /&gt;
TEXT_EXPLORE_OVER&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD&lt;br /&gt;
|'''Text Adventure Relevant'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific text adventure mode.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_OVER*. Ends the current instance.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_CG&lt;br /&gt;
|'''Show CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: create an interface for showing CG images (please note: after enabling this function, you need to use HIDE_CG* manually to hide the CG. Otherwise the CG will get to player).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_CG*image name (no suffix; if this field is empty, the background will become black. The relevant directory is: Assets\BuildSource\Backgrounds\. Only .png file accepted).&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_CG&lt;br /&gt;
|'''Hide CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: hide the CG interface.&lt;br /&gt;
&lt;br /&gt;
Format: HIDE_CG*.&lt;br /&gt;
|-&lt;br /&gt;
|GENERATE_RANDOM_CARD&lt;br /&gt;
|'''Select a Card Randomly'''&lt;br /&gt;
&lt;br /&gt;
Function: select a card randomly, which will be stored in the tag card of the current variable.&lt;br /&gt;
&lt;br /&gt;
Format: GENERATE_RANDOM_CARD#1.&lt;br /&gt;
|-&lt;br /&gt;
|VOICE_OVER&lt;br /&gt;
|'''Voice Over'''&lt;br /&gt;
&lt;br /&gt;
Function: show a voice-over interface.&lt;br /&gt;
&lt;br /&gt;
Format: VOICE_OVER*voice over the content.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_STORYARMY&lt;br /&gt;
|'''Create a Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad only for stories.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_STORYARMY*tagkey#map position#faction#character list (all selected characters will leave their current squads or locations compulsorily)#card unit list (card ID1,number1,level1|card ID2,number 2,level 2|.......)#movement info (e.g., WANDER,2500).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_STORYARMY&lt;br /&gt;
|'''Remove Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a story squad.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_STORYARMY*tagkey.&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_BUY_ITEM&lt;br /&gt;
|'''Bazaar Merchant Buy-in'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants buy items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_SELL_ITEM&lt;br /&gt;
|'''Bazaar Merchant Sell-out'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants sell items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SHOWROLE&lt;br /&gt;
|'''Show Character Painting'''&lt;br /&gt;
Function: show character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;painting position &lt;br /&gt;
|-&lt;br /&gt;
|HIDEROLE&lt;br /&gt;
|'''Hide Character Painting'''&lt;br /&gt;
Function: hide character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: HIDEROLE*position of character 1 painting (#position of character 2 painting) (optional).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; L stands hiding the painting on the left side, R for hiding the painting on the right side.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_QUEST_ASK&lt;br /&gt;
|'''Mission Query'''&lt;br /&gt;
&lt;br /&gt;
Function: add a mission query that meets conditions based on the standard SELECT directive.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_QUEST_ASK*.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TEAMROLE&lt;br /&gt;
|'''Select Squad Character'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character from a squad.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TEAMROLE*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PLAYER_ACTIVE&lt;br /&gt;
|'''Activate Character Indo Status'''&lt;br /&gt;
&lt;br /&gt;
Function: make a character visible on the “Report” interface and import the character ID (this is usually used in scenarios. E.g., the tavern ladies).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PLAYER_ACTIVE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_ORDER&lt;br /&gt;
|'''Built-in Character Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: give some built-in directives to a character and execute these directives immediately. &lt;br /&gt;
&lt;br /&gt;
Format: ROLE_ORDER*character ID [refer to the current target character when this field is empty]#directive code: refer to Directive Parameter Table.&lt;br /&gt;
&lt;br /&gt;
The current directive code supports:&lt;br /&gt;
&lt;br /&gt;
*RETURN_JOBCITY: the character goes back to the location they belong to. No parameter. If the character is the squad leader, the squad directive is changed directly; if the character is not a squad leader, they leave the current squad and go back to the original squad; if they are in another location, they create a squad and return.&lt;br /&gt;
&lt;br /&gt;
*GOTO_PLACE: the character goes to the target location. The parameter is the target location ID.&lt;br /&gt;
&lt;br /&gt;
*JOIN_PLAYER_TEAM: the character joins the player’s squad directly. No parameter.&lt;br /&gt;
&lt;br /&gt;
*FOLLOW_ME: the character comes to rally and follows the player’s squad. No parameter.&lt;br /&gt;
&lt;br /&gt;
*EXPEL_FROM_CAMP: expel the character from their faction. No parameter.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTERACTIVE_MSG&lt;br /&gt;
|'''Add Interactive Message'''&lt;br /&gt;
Function: add a custom interactive message and show it in the corresponding UI.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTERACTIVE_MSG*info type#title#info text #parameter text#duration(&amp;lt;=0: Permanent; &amp;gt;0: number of days)#message sender info #TAG parameter.&lt;br /&gt;
&lt;br /&gt;
Currently supported message types are:&lt;br /&gt;
&lt;br /&gt;
msg (message); request; finance.&lt;br /&gt;
&lt;br /&gt;
When the message type is not financed, the format of the parameter text is:&lt;br /&gt;
 Parameter Key1: parameter value 1;parameter Key2:parameter value 2;...;parameter Key N:parameter N&lt;br /&gt;
Currently, the built-in KEY types of system are:&lt;br /&gt;
&lt;br /&gt;
*ask: assign this message to be a request with at most 2 directive options according to the parameter. Format: ask: option 1 text=event ID of option 1 [: option 2 text=event ID of option 2].&lt;br /&gt;
&lt;br /&gt;
E.g., ask: “Yes”=Event1: “No”=Event2. &lt;br /&gt;
&lt;br /&gt;
*items: assign this message to be a message of obtaining the item table. The parameter is the corresponding item list info. E.g., items: money,10000|紫金之刃,1,mf=0-3|黄金之枪,1,mf=0-3|幻刃月光,1,mf=0-3.&lt;br /&gt;
*You can define other fields, and use [$tagmsg:arg=parameter KEY$] (in the triggered directive of interactive messages) to query the value of the corresponding parameter field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the message type is finance, the format of the parameter text is:&lt;br /&gt;
 Receipt field 1=receipt detail list (format: resource 1, number 1| resource 2, number 2|…|resource N, number N); receipt field 1= receipt detail list; […]; receipt field N=receipt detail list.&lt;br /&gt;
Message sender format: sender type: sender ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported sender types are:&lt;br /&gt;
&lt;br /&gt;
*0: system; empty ID.&lt;br /&gt;
&lt;br /&gt;
*1: character; ID= character ID.&lt;br /&gt;
&lt;br /&gt;
*2: location; ID= location ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TAG parameter is a random string field TAG used to mark.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive message that meets specific conditions. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTERACTIVE_MSG*message type#sender info#TAG parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message type and TAG parameter can be empty (no type or TAG limit).&lt;br /&gt;
&lt;br /&gt;
Format of sender info: ADD_INTERACTIVE_MSG.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_THIS_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Current Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the current interactive message of the existing environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_THIS_INTERACTIVE_MSG*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.1.3 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_HEADAVATA&lt;br /&gt;
|'''Change Player Painting Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the painting of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_HEADAVATA*character painting ID.&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_MODEL&lt;br /&gt;
|'''Change Player Model Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the model of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_MODEL*model ID.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.2.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_INTVAR_CONFIG&lt;br /&gt;
|'''Show Option Panel of Configurable Custom Int Field'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom field configuration panel in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_INTVAR_CONFIG*mode(0: Create game mode; 1: In-game mode).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_MARKER&lt;br /&gt;
|'''Add or Set Custom Mark on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: add or set a custom mark on the world map. When the mark ID already exists, the older mark info will be covered.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_MARKER*mark ID#title#annotation info #map position info#file name of mark image (this field can be empty; set to be &amp;quot;map_flag&amp;quot; by default; this mark image is a PNG image resource under directory“\BuildSource\map_res\MinimapMakers\”).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_MAP_MARKER&lt;br /&gt;
|'''Remove a Custom Map Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a custom mark on the map with a specific ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_MAP_MARKER*mark ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|RUN_SCRIPT_FUNC&lt;br /&gt;
|'''Execute Function of Specific Lua Script'''&lt;br /&gt;
&lt;br /&gt;
Function: execute the standard function of a specific Lua script.&lt;br /&gt;
&lt;br /&gt;
Format: RUN_SCRIPT_FUNC*file name of the relative directory of script (same as RUN_SCRIPT)#standard function name (the function name in the script; the parameter is the imported environment variable).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_GUI&lt;br /&gt;
|'''Open Custom GUI Form'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom GUI form.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_GUI*GUI pack name#form component name#script file path of the form (relative script root directory “Asset\BuildSource\LuaScripts\”. No file expansions)#form parameter(format: json format. E.g., {&amp;quot;arg1&amp;quot;:&amp;quot;val1&amp;quot;,&amp;quot;arg2&amp;quot;:&amp;quot;val2&amp;quot;})#block directive queue (default 0: Yes; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CONTAINER_GUI&lt;br /&gt;
|'''Open Container GUI'''&lt;br /&gt;
&lt;br /&gt;
Function: open a defined container GUI.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CONTAINER_GUI*container ID (instance ID used to identify)#template info ID (info ID defined in Container Definition Table).&lt;br /&gt;
&lt;br /&gt;
When the parameter list is empty or is “This”, the specific container in the current environment variable (if existed) will be opened. E.g., OPEN_CONTAINER_GUI*THIS.&lt;br /&gt;
|-&lt;br /&gt;
|CONTAINER_CMD&lt;br /&gt;
|'''Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a specific directive for a particular container in the current environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: CONTAINER_CMD*container directive type#parameter 1#parameter 2#...#parameter N&lt;br /&gt;
&lt;br /&gt;
Currently supported collective built-in directive types are:&lt;br /&gt;
&lt;br /&gt;
add_exp: add EXP to all cards in the container. The parameter is the EXP value.&lt;br /&gt;
&lt;br /&gt;
add_items: add a specific element into the container (E.g., the format of the item container is: CONTAINER_CMD*add_items#item 1,10|item 2,5 ；format of the card container is: ID list of cards, separated by “|”).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CONTAINER_CMD&lt;br /&gt;
|'''Location Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: see a location as a container object and execute the same container directives.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CONTAINER_CMD*location ID (when this field is empty or “THIS”, refer to the location assigned by the current environment parameter)#container directive list (same as CONTAINER_CMD parameters).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP&lt;br /&gt;
|'''Set Map Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the visibility of a specific map. &lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP*map ID#status value (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_LUAENV&lt;br /&gt;
|'''Reset Current LUA Environment'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the current environment of LUA script and clear cache; this directive can be used when you need to debug the LUA script but do not want to restart the game.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_LUAENV*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.4.1 or above version'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_ARG_INT&lt;br /&gt;
|'''Set Parameter Value in Current Environment Variable'''&lt;br /&gt;
&lt;br /&gt;
Function: set the int parameter value stored in the environment variable of the current script (correspond to [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ARG_INT*new value#target parameter index (optional;set to be 0 by default; 0~2 correspond to [%arg_int_val1%] ~ [%arg_int_val3%] respectively).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Global Save Directive===&lt;br /&gt;
Global save is a type of saving used to record some data shared by all saves. Data recorded in the global save can be accessed in all saves after being changed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_INTVAR&lt;br /&gt;
|'''Set Custom Int Variable of Global Save''' &lt;br /&gt;
&lt;br /&gt;
Function: set a custom int variable in the global save. The variable, recorded in the global save, can be accessed via the [%global_int:ID%] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_INTVAR*variable ID#current int value.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_GLOBAL_INTVAR&lt;br /&gt;
|'''Change Custom Int Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: change a custom int variable in the global.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_GLOBAL_INTVAR*variable ID#value change (can be a negative number)#minimum value (optional; no limit if this field is empty)#maximum value (optional; no limit if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_STRVAR&lt;br /&gt;
|'''Set Custom String Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom string variable. The variable, recorded in the global save, can be accessed via the [$global_str:ID$] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_STRVAR*variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|PUSH_GLOBAL_ROLES&lt;br /&gt;
|'''Globally Save Character Status'''&lt;br /&gt;
&lt;br /&gt;
Function: save specific character list to the global character status list.&lt;br /&gt;
&lt;br /&gt;
Format: PUSH_GLOBAL_ROLES*custom global save Key#character ID (this character can only be a non-template character).&lt;br /&gt;
|-&lt;br /&gt;
|PULL_GLOBAL_ROLES&lt;br /&gt;
|'''Load Character Status from Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: load the status of specific character list from the global character status list, and apply it to the current game mode.&lt;br /&gt;
&lt;br /&gt;
Format: PULL_GLOBAL_ROLES*custom global save KEY (the character of this KEY must be a character from the character template of the current game mode.&lt;br /&gt;
|-&lt;br /&gt;
|LOCK_CMD_QUEUE&lt;br /&gt;
|'''Lock Current Directive Queue'''&lt;br /&gt;
&lt;br /&gt;
Function: lock the current directive queue. The directive queue will not be cleared after switching from different game saves or resetting the game modes.&lt;br /&gt;
&lt;br /&gt;
Format: LOCK_CMD_QUEUE*lock queue (0: No;1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SWITCH_GAME_MODE&lt;br /&gt;
|'''Switch Game Modes'''&lt;br /&gt;
&lt;br /&gt;
Function: switch to the target game mode and load it.&lt;br /&gt;
&lt;br /&gt;
Format: SWITCH_GAME_MODE*target game mode ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Built-in Directive List===&lt;br /&gt;
Built-in directives are directives used to realize certain functions inside the program, usually for some specific scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|ENCOUNTER&lt;br /&gt;
|'''Creep Encountering UI'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info panel of the creep encountered.&lt;br /&gt;
&lt;br /&gt;
Format: ENCOUNTER*1.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_INFO_DLG&lt;br /&gt;
|'''Chest Guardian Info Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info dialogue of the chest guardian.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_INFO_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_COST_DLG&lt;br /&gt;
|'''Price of Chest Opening Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open a dialogue to show the price of opening a chest.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_COST_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_CALLBACK&lt;br /&gt;
|'''Logic Callback of Chest Opening'''&lt;br /&gt;
&lt;br /&gt;
Function: command a logic callback of chest opening.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_CALLBACK*callback value (1: Defeat the guardian; 2: Opening completed)#target chest ID.&lt;br /&gt;
|}&lt;br /&gt;
===Preset Fields of Scripts and Their Meanings===&lt;br /&gt;
Sometimes we use certain directives to refer to specific objects in script editing. For example, we can use CUR_ROLE to replace the ID of the current character player encountered. We can realize some common application scenarios via script editing. &lt;br /&gt;
&lt;br /&gt;
Currently, supported preset fields are: &lt;br /&gt;
&lt;br /&gt;
*CUR_ROLE: ID of current character template encounter, used primarily for dialogue and selection list box&lt;br /&gt;
*CUR_BATTLE: ID of the battle between player and refreshed unit encountered on the current map&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Script Directive of Results in Scenario Event===&lt;br /&gt;
The format of script directives of results in a scenario event is (separated by a line break): &lt;br /&gt;
 conditional expression group 1: executed command 1&lt;br /&gt;
 conditional expression group 2: executed command 2&lt;br /&gt;
 ...&lt;br /&gt;
 conditional expression group N: executed command N&lt;br /&gt;
Execute the command: judge conditional expression group 1 first, if the conditions are met, execute command 1. Otherwise, judge conditional expression group 2……judge all listed groups until one group of conditions is met, or all conditions are not met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Conditional Expression Group===&lt;br /&gt;
A conditional expression group consists of multiple conditional expression like “[%CONDITION%][=]1”, and the expressions are connected by “|” (Or) or “&amp;amp;” (And). '''The priority of “&amp;amp;” (And) is higher than “|” (Or)'''. When both sides of the expression are integer characters, return the comparison result of the two values. Otherwise, compare the strings, and only [=] and [&amp;lt;&amp;gt;] judgements are supported.&lt;br /&gt;
&lt;br /&gt;
For example:  &lt;br /&gt;
&lt;br /&gt;
 [%result_code%][=]1|[%player_money%][&amp;gt;=]100 means “execute when the result is 1 or when the player has 100 utars”.&lt;br /&gt;
 [%player:level%][&amp;gt;=]3&amp;amp;[%player_money%][&amp;gt;]100 means “execute when player’s level is 3 or above, and they have more than 100 utars”.&lt;br /&gt;
&lt;br /&gt;
'''The followings are the comparison symbols in conditional expressions:'''&lt;br /&gt;
&lt;br /&gt;
*[=]: equal&lt;br /&gt;
*[&amp;gt;]: larger than&lt;br /&gt;
*[&amp;gt;=]: greater than or equal to&lt;br /&gt;
*[&amp;lt;]: less than&lt;br /&gt;
*[&amp;lt;=]: less than or equal to&lt;br /&gt;
*[&amp;lt;&amp;gt;]: not equal to&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game Data Calculation Expression System===&lt;br /&gt;
We can embed some value expressions like “[&amp;amp;expression&amp;amp;]” in many places in the game (e.g., the status value of the BUFF list)&lt;br /&gt;
&lt;br /&gt;
In value expression, the basic mathematic calculation is supported. Currently, supported calculation symbols are: &lt;br /&gt;
&lt;br /&gt;
*+: addition&lt;br /&gt;
*-: subtraction&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;*: multiplication&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*/: division&lt;br /&gt;
*%: modulo (take the remainder)&lt;br /&gt;
*^: exponentiation&lt;br /&gt;
*( ) : change the priority of calculation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the expression takes the @func(expression1, expression2...) format, call the relevant built-in function to return the calculation result. Currently supported built-in functions are (note: these built-in functions are can only be used in the calculation of the most external layer): &lt;br /&gt;
&lt;br /&gt;
*@min(a,b): return the smaller value between a and b&lt;br /&gt;
*@max(a,b): return the greater value between a and b&lt;br /&gt;
&lt;br /&gt;
E.g., in a specific piece of data, [&amp;amp;1+2*3&amp;amp;] will be replaced by 7, [&amp;amp;@max(1+2*3, 8)&amp;amp;] will be replaced by 8, [&amp;amp;@min(1+2*3, 8)&amp;amp;] will be replaced by 7……&lt;br /&gt;
&lt;br /&gt;
'''Please note: for scripts and skill directives in battles, you can use the “[@expression@]” format to embed some expressions to return a decimal result.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Embedded Query Directive in Scenario Event===&lt;br /&gt;
There are many places in the game that support embedded query directives, through which we can insert values or query result of the string type in texts or conditional expressions. All embedded query directives follow the format of [%QUERY:arg1:arg2...%] or [$QUERY:arg1:arg2...$] (these two formats are the same) to insert to the target position.&lt;br /&gt;
&lt;br /&gt;
'''Note: currently you cannot re-embed a query directive in a query.'''&lt;br /&gt;
&lt;br /&gt;
Currently, supported query directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Return the last directive result that can cause “return” in the current event (E.g., an option that stands for “return” of the selection list box, input value and battle result, in the script of scenario events).&lt;br /&gt;
Following are the different meanings of result_code in various directive types. &lt;br /&gt;
&lt;br /&gt;
*It means the option ID when returning from the selection list box.&lt;br /&gt;
*When returning after battles:  0: Battle won; 1: Battle failed.&lt;br /&gt;
*It means the input number when returning for an integer input box.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_num%]&lt;br /&gt;
|Return an integer. (0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_range:A:B%]&lt;br /&gt;
|Return a random number that is greater than A but smaller than B.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the random number that was generated last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|The amount of the player’s money.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_wood%]&lt;br /&gt;
|The amount of the player’s wood.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_iron%]&lt;br /&gt;
|The amount of player’s ironstone.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_jade%]&lt;br /&gt;
|The amount of player’s jade.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_food%]&lt;br /&gt;
|Player’s current Hunger.&lt;br /&gt;
|-&lt;br /&gt;
|[%game_time%]&lt;br /&gt;
|Number of in-game days currently.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_night%]&lt;br /&gt;
|Judge whether it is nighttime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_daytime%]&lt;br /&gt;
|Judge whether it is daytime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%mod_day:MOD%]&lt;br /&gt;
|Number of the in-game day divided by MOD, take the remainder&lt;br /&gt;
|-&lt;br /&gt;
|[%generate_rob_money%]&lt;br /&gt;
|Generate the amount of money when the player is robbed under the current level.&lt;br /&gt;
|-&lt;br /&gt;
|[%rob_money%]&lt;br /&gt;
|Generate the amount of money when the player was robbed last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_ts:ID%]&lt;br /&gt;
|Return the current status of a trigger (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es:ID%]&lt;br /&gt;
|Return the current status of a scenario event (-1: Not executed; otherwise, return Result Code).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_first_time:ID%]&lt;br /&gt;
|Return the first completion time of a scenario event.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_time_score:ID:minTime:maxTime:maxScore%]&lt;br /&gt;
|Return the first completion time score of a scenario event. minTime is the shortest completion time (time before the shortest time brings a full score); maxTime is the longest completion time (time before the longest time brings a zero score); maxScore is the highest score.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val:ID%]&lt;br /&gt;
|Return the custom int value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val_for_calc:ID%]&lt;br /&gt;
|Return the custom int value, whose numbering is its ID, to calculate. There must a result. If the ID does not exist, the result is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%str_val:ID%]&lt;br /&gt;
|Return the custom string value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_num%]&lt;br /&gt;
|The current number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_max%]&lt;br /&gt;
|Maximum number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_name:兵种key%]&lt;br /&gt;
|Return the name of a certain minion.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a certain item in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag:tag%]&lt;br /&gt;
|Return the number of an item with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag_and_level:tag:level%]&lt;br /&gt;
|Return the number of an item, whose item level &amp;gt;= level, with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_qualify_as_present:present_desc%]&lt;br /&gt;
|Return the number of a certain item whose gift description string meets requirements in the player’s bag. For the format of gift description string, please see the “Like” format in the Tag column of “人物列表”(Character Table) (Excel).&lt;br /&gt;
|-&lt;br /&gt;
|[%item_name:物品ID%]&lt;br /&gt;
|Return the displayed name of an item.&lt;br /&gt;
|-&lt;br /&gt;
|[%admin_level%]&lt;br /&gt;
|Return the administration status of the player in the current location (0: None; 1: Appointed; 2: City ruler; 3: Faction leader).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; take a rounding integer number after (current time-ID time)).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse_by_day:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; (current day- the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current time-ID time) and take the rounding integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse_by_day%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current day-the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_custom_cd:ID%]&lt;br /&gt;
|Return the result of whether a custom cooldown (whose numbering is its ID) is ready (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%has_gametime_elapse_tag:ID%]&lt;br /&gt;
|Query whether the custom game time ID mentioned above exists (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%realtime_elapse:ID%]&lt;br /&gt;
|Return the realistic period since the setting of last custom time point ID (count by second).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID%]&lt;br /&gt;
|Return the status of specific mission ID (0: Unclaimed; 1: Ongoing; 2: Unfinished; 3: Ended).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID:index%]&lt;br /&gt;
|Return the subevent value of specific mission ID (index is the subevent’s sequence number starting from 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_flag:ID%]&lt;br /&gt;
|Return the current value of a completion mark; return -1 if there is no such a value.&lt;br /&gt;
|-&lt;br /&gt;
|[%camp_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_player_triggered_encounter%]&lt;br /&gt;
|Check if an encounter chat is started by player manually (0: No; 1: Yes) (if the player is caught up by other units, the value is 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%place_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target location.&lt;br /&gt;
|-&lt;br /&gt;
|[%arg_int_val1%]&lt;br /&gt;
[%arg_int_val2%]&lt;br /&gt;
&lt;br /&gt;
[%arg_int_val3%]&lt;br /&gt;
|Value parameter 1, 2, and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buffs%]&lt;br /&gt;
|Return the number of global BUFFs of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_battle_res%]&lt;br /&gt;
|Return the battle result of last battle (0: Victory; 1: Loss; 2: Retreatment).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_dungeon_res%]&lt;br /&gt;
|Last dungeon result (0: Exited; 1: Passed; 2: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff:ID%]&lt;br /&gt;
|Query whether the current squad has a global BUFF of the target ID. Return 1 if such a BUFF exists.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff_c:CLASS%]&lt;br /&gt;
|Query the number of global BUFFs whose type are CLASS of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_stat:STAT_FILED%]&lt;br /&gt;
|Return the current value (whose field is STAT_FILED) of the current squad status.&lt;br /&gt;
|-&lt;br /&gt;
|[%has_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return 1; otherwise, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return the relevant value; otherwise, return null.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_place_id:CAMP_ID%]:&lt;br /&gt;
|Return the ID of a random location that is controlled by a faction. IF there is no camp_id, return an ID of a location controlled by the player’s faction.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_id%]&lt;br /&gt;
|Return the ID of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_name%]&lt;br /&gt;
|Return the name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_map_name%]&lt;br /&gt;
|Return the map name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products%]&lt;br /&gt;
|Return the Production list of the current location (follow the format of GETITEMS).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products_name%]&lt;br /&gt;
|Return the Production description of the current location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_has_products%]&lt;br /&gt;
|Check if the current location has production (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_items%]&lt;br /&gt;
|Return the item list of the last item selection directive (ITEMS_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles%]&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Return the character list of the last character selection directive (ROLES_SELECTOR) (Note: this method cannot be used in conditional expression groups since the result returned contains “|” when multiple characters are selected; you can use [%last_seled_roles_count%] instead to judge).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles_count%]&lt;br /&gt;
|Return the number of selected characters of the last character selection directive (ROLES_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%weather:ID%]&lt;br /&gt;
|Query the current value of the specific weather effect (with specific ID) on the current map.&lt;br /&gt;
|-&lt;br /&gt;
|[%monster_news:X:Y%]&lt;br /&gt;
|Query the info of creeps near coordinate (X, Y) on the current map. X and Y will be the default position of the player if left empty.&lt;br /&gt;
|-&lt;br /&gt;
|[%attack_intend_code%]&lt;br /&gt;
|Query the attack intension of units encountered on the current map.&lt;br /&gt;
&lt;br /&gt;
Please see: MuUnitBase.IntendToAttack&lt;br /&gt;
|-&lt;br /&gt;
|[%place_randmom_pos%]&lt;br /&gt;
|Query a random position near a location. Output specific strings. E.g., Sandbox Redstone Keep: 123, 123.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_role_relation%]&lt;br /&gt;
|Relationship between the input parameter and tag character/location.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_city_relation%]&lt;br /&gt;
|Relationship between Tag character and input character&lt;br /&gt;
|-&lt;br /&gt;
|[%result_val%]&lt;br /&gt;
|Query the curResultVal value of the current environment variable.&lt;br /&gt;
|-&lt;br /&gt;
|[$player:INFO$]&lt;br /&gt;
[$tagrole:INFO:ID$]&lt;br /&gt;
|Query a specific info field of player/ specific character (tag character) When it is tag character, and ID field does not exist, return the query result of the interactive object. &lt;br /&gt;
INFO can be:  &lt;br /&gt;
&lt;br /&gt;
*id: character ID.&lt;br /&gt;
&lt;br /&gt;
*name: character name.&lt;br /&gt;
&lt;br /&gt;
*level: character level.&lt;br /&gt;
&lt;br /&gt;
*job_type: job types (0: Citizen; 1: Faction member; 2: city ruler; 3: Faction leader).&lt;br /&gt;
&lt;br /&gt;
*campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
*campname: faction name.&lt;br /&gt;
&lt;br /&gt;
*campleaderid: faction leader ID.&lt;br /&gt;
&lt;br /&gt;
*campleadername: faction leader name.&lt;br /&gt;
&lt;br /&gt;
*campleader: nickname of faction leader.&lt;br /&gt;
&lt;br /&gt;
*fame_val: personal prestige.&lt;br /&gt;
&lt;br /&gt;
*maxhp: max hp.&lt;br /&gt;
&lt;br /&gt;
*maxmp: max mana.&lt;br /&gt;
&lt;br /&gt;
*job_cityid: job assignment location ID.&lt;br /&gt;
&lt;br /&gt;
*job_cityname: job assignment location name.&lt;br /&gt;
&lt;br /&gt;
*state: current status (0: Normal; 1: Captured; -1: Dead).&lt;br /&gt;
&lt;br /&gt;
*is_recruitable: recruitable (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*is_leave_team_enable: able to leave squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*recruit_val: current recruitable mark (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*inteam: if the character is in the player’s squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep: player’s prestige in the target faction.&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep_desc: player’s prestige description in the target faction.&lt;br /&gt;
&lt;br /&gt;
*fv: friendliness with the player.&lt;br /&gt;
&lt;br /&gt;
*player_relation_score: assessment on overall favour on the player.&lt;br /&gt;
&lt;br /&gt;
*weapon_tag= (custom tag field): query the specific tag on equipment and weapons. If there is no such a tag or the weapon does not exist, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*skill_level= (skill ID): query the current level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_maxlevel= (skill ID): query the maximum level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_exp= (skill ID): query the current EXP of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_upexp= (skill ID): query the amount of EXP needed for a character’s target skill to level up.&lt;br /&gt;
&lt;br /&gt;
*statu= (custom ID): query the value of the corresponding ID in the Character Attribute Table. If there is no value, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*statu_int= (custom ID): 0 query the int value of the corresponding ID in the Character Attribute Table. If there is no value, return 0.&lt;br /&gt;
&lt;br /&gt;
*has_girl_friend: [player only] check if the player has a girlfriend (1: Yes; 2: No).&lt;br /&gt;
&lt;br /&gt;
*current_girl_friend_name: [player only] girlfriend’s name.&lt;br /&gt;
&lt;br /&gt;
*girl_friend=character ID: [player only] check if someone is a player’s girlfriend.&lt;br /&gt;
&lt;br /&gt;
*is_female: check if someone is a female character (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
*available_quest: available missions.&lt;br /&gt;
|-&lt;br /&gt;
|[$called:call1:call2$]&lt;br /&gt;
|How NPC addresses player (the player’s character is male: call1; female: call2).&lt;br /&gt;
|-&lt;br /&gt;
|[$null$]&lt;br /&gt;
|Replaced by an empty string.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagtype$]&lt;br /&gt;
|Trigger object type of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagid$]&lt;br /&gt;
|Trigger object ID of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$input_str$]&lt;br /&gt;
|The input result of the last input box.&lt;br /&gt;
|-&lt;br /&gt;
|[$argvs:INDEX$]&lt;br /&gt;
|Query currently additional parameter info, starting from 0 (used to fill in the parameter of a random event).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagplace:INFO:ID$]&lt;br /&gt;
|Query info of a location; query the current location if the ID field does not exist.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: location ID.&lt;br /&gt;
&lt;br /&gt;
· name: location name.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· mapid: map ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· prosperity: location prosperity. &lt;br /&gt;
&lt;br /&gt;
· defence: location defence &lt;br /&gt;
&lt;br /&gt;
· rep: location friendliness.&lt;br /&gt;
&lt;br /&gt;
· security: location security.&lt;br /&gt;
&lt;br /&gt;
· size: location size.&lt;br /&gt;
&lt;br /&gt;
· lord_id: city ruler ID.&lt;br /&gt;
&lt;br /&gt;
· lord_name: city ruler name.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom field.&lt;br /&gt;
&lt;br /&gt;
· is_stronghold: if this location is a base (a location for troops to the garrison).&lt;br /&gt;
&lt;br /&gt;
· is_weekhold: a resource point that does not allow the garrison.&lt;br /&gt;
&lt;br /&gt;
· is_couldoccupy: if this location can be occupied.&lt;br /&gt;
&lt;br /&gt;
· is_couldraid: if this location can be raided.&lt;br /&gt;
&lt;br /&gt;
· is_inwar: if this location is being attacked.&lt;br /&gt;
&lt;br /&gt;
· is_raided: if this location has been raided (recovering).&lt;br /&gt;
&lt;br /&gt;
· is_subplace: if this place has been occupied. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain a specific status value of the current location.&lt;br /&gt;
&lt;br /&gt;
· building= (specific facility ID): query the number of facilities of a building with specific ID in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· r_building= (specific facility ID): query the number of facilities of a building with a specific ID (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· r_building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· custom_int= (custom field ID): obtain the int value of the custom field of the current location.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally)&lt;br /&gt;
&lt;br /&gt;
· func_map= (specific field KEY): query a field of the corresponding directive event mapping table. E.g., func_map= hire list.&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in where they are currently staying. &lt;br /&gt;
&lt;br /&gt;
· hire_states: query the recruitment status of the current location.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the player’s current position and the target position. If the target is unreachable, return -1.&lt;br /&gt;
&lt;br /&gt;
· project_count: the number of projects under construction. &lt;br /&gt;
&lt;br /&gt;
· project_max: the maximum number of projects under construction currently.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmap:INFO:ID$]&lt;br /&gt;
|Query tile info on a map:&lt;br /&gt;
&lt;br /&gt;
· id: tile id.&lt;br /&gt;
&lt;br /&gt;
· name: tile name.&lt;br /&gt;
&lt;br /&gt;
· dominant_camp: if there is an overall dominating faction, return the name of the faction; otherwise, return null.&lt;br /&gt;
&lt;br /&gt;
· dominant_camps= (custom field ID): if there are only several factions with specific IDs existing, return 1; otherwise, return 0; format of custom field: faction 1#faction 2#faction 3.&lt;br /&gt;
&lt;br /&gt;
· camp_place_count= faction ID: return the number of bases owned by a specific faction on this tile.&lt;br /&gt;
&lt;br /&gt;
· ExploreInfo= Info ID: query the value of an exploration map info.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbuilding:INFO$]&lt;br /&gt;
|Query info of the current target building&lt;br /&gt;
&lt;br /&gt;
· id: building ID.&lt;br /&gt;
&lt;br /&gt;
· name: name.&lt;br /&gt;
&lt;br /&gt;
· inner_id: built-in location ID of the target building.&lt;br /&gt;
&lt;br /&gt;
· type: building type.&lt;br /&gt;
&lt;br /&gt;
· level: building level.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return value of a specific custom filed.&lt;br /&gt;
&lt;br /&gt;
· container_id: scenario ID of the container bound to this building.&lt;br /&gt;
&lt;br /&gt;
· container_info: info ID of the container bound to this building.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagwb:INFO$]&lt;br /&gt;
|Query the info of current skirmish.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: battle ID.&lt;br /&gt;
&lt;br /&gt;
· camp_a: faction ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· camp_b: faction ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· leader_a: leader ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· leader_b: leader ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· camp_a_rl: the relationship between squad A and the player’s faction &lt;br /&gt;
&lt;br /&gt;
· camp_b_rl: the relationship between squad B and the player’s faction.&lt;br /&gt;
&lt;br /&gt;
· teamname_a: faction name and hero names of squad A.&lt;br /&gt;
&lt;br /&gt;
· teamname_b: faction name and hero names of squad B.&lt;br /&gt;
&lt;br /&gt;
· seige_time: current siege preparation time (if it is a siege battle) (count by day).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagteam:INFO(:QUERY_INFO)$]&lt;br /&gt;
[$playerteam:INFO$]&lt;br /&gt;
|Query info of the current encountered team (tagteam)/player’s team (playerteam).&lt;br /&gt;
&lt;br /&gt;
When querying tag team, you can choose a specific query parameter. If this parameter is set, only info of the query target will be returned.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: squad ID.&lt;br /&gt;
&lt;br /&gt;
· is_active: check if the current squad status is normal; return 1 if it is normal.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· state_num: StateNum value of the current squad.&lt;br /&gt;
&lt;br /&gt;
· from_id: ID of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· from_name: name of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· lifetime: period since the squad is established (day).&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and character faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· max_attr_lv=attribute field ID: the highest value of a certain attribute of all characters in the squad.&lt;br /&gt;
&lt;br /&gt;
· exist_role= character ID: check if there is a specific character ID in the squad (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
· role_vacancy: available hero slots in squad.&lt;br /&gt;
&lt;br /&gt;
· soldier_vacancy: available minion slot in the squad.&lt;br /&gt;
&lt;br /&gt;
· map_info: current map info.&lt;br /&gt;
&lt;br /&gt;
· tag: return the TAG of the squad. &lt;br /&gt;
&lt;br /&gt;
· is_defeated: check if the squad is dismissed because they are defeated (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· defeated_by: ID of the faction which defeated the squad.&lt;br /&gt;
&lt;br /&gt;
QUERY_INFOformat: [query type]=[query target] E.g.,: leader=ROLE_ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported query types are:&lt;br /&gt;
&lt;br /&gt;
· bind_id: bound info ID. When the squad type is creep or dummy, the ID is the creep/dummy ID; otherwise, it is the leader ID.&lt;br /&gt;
&lt;br /&gt;
· leader: squad leader ID.&lt;br /&gt;
&lt;br /&gt;
· tag: TAG mark of the squad (used for squad created by the CREATE_TEAM directive).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcamp:INFO:ID$]&lt;br /&gt;
|Query info of the target faction. When the ID does not exist, query info of the current faction. INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· leaderid: ruler ID.&lt;br /&gt;
&lt;br /&gt;
· leadercalled: nickname of faction ruler. &lt;br /&gt;
&lt;br /&gt;
· lands_count: number of bases of the current faction.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· camp_rl_value: the actual number of favour between the target faction and player’s faction. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain the specific status value of the current faction.&lt;br /&gt;
&lt;br /&gt;
· buff= (Target BUFF ID): query if a specific BUFF of the current faction exists (1: Yes).&lt;br /&gt;
&lt;br /&gt;
· buff_c= (BUFF type): query the number of BUFFs of specific types of the current faction.&lt;br /&gt;
&lt;br /&gt;
· active_state: project status of target faction (0: Inactive; 1: Active).&lt;br /&gt;
&lt;br /&gt;
· is_story_camp: if this is a scenario faction (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in this faction. &lt;br /&gt;
&lt;br /&gt;
· attitude: faction’s attitude towards the player (0: Normal; -1: Wanted; -2: At war).&lt;br /&gt;
&lt;br /&gt;
· is_fall: if a faction is eliminated (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzar:INFO$]&lt;br /&gt;
|Query current bazaar info imported by the system.&lt;br /&gt;
&lt;br /&gt;
· start_day: number of days of the beginning of the bazaar.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzarItem:INFO:bazzarID:merchantID$]&lt;br /&gt;
|Query info of items bought/sold by a merchant in a bazaar.&lt;br /&gt;
&lt;br /&gt;
· item_desc: item description (detailed).&lt;br /&gt;
&lt;br /&gt;
· item_desc_short: item description (simple).&lt;br /&gt;
&lt;br /&gt;
· item_buy_price: buy-in price of the item. &lt;br /&gt;
&lt;br /&gt;
· item_sell_price: sell-out price of the item. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproduct:INFO:ID$]&lt;br /&gt;
|Query info of a speciality. Query info of the current speciality if the ID is left empty.&lt;br /&gt;
&lt;br /&gt;
· item_name: item name. &lt;br /&gt;
&lt;br /&gt;
· item_id: item id.&lt;br /&gt;
&lt;br /&gt;
· item_level: item level.&lt;br /&gt;
&lt;br /&gt;
· item_price: single fair value of the item.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the central position of the speciality and the current position of the player (-1: the central position is unreachable). &lt;br /&gt;
&lt;br /&gt;
· place_include=location ID: when the item is not sold in the specific location, return 0; if it is being sold, return 1. &lt;br /&gt;
&lt;br /&gt;
· place_include_tagQuestPlace: automatically use the currently imported info of mission location.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagquest:INFO:ID$]&lt;br /&gt;
|Query Mission Info&lt;br /&gt;
&lt;br /&gt;
status: 0: Unclaimed; 1: Ongoing; 2: Completed; 3:Time limit exceeded (receive punishment); 4: Time limit exceeded (wait to claim rewards automatically) 5: 已Ended.&lt;br /&gt;
|-&lt;br /&gt;
|[$arg_str_val1$]&lt;br /&gt;
[$arg_str_val2$]&lt;br /&gt;
&lt;br /&gt;
[$arg_str_val3$]&lt;br /&gt;
|String parameters 1, 2 and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$]&lt;br /&gt;
|Enumerate numbers randomly and return a RES value according to the probability distribution. E.g., [%rnd_enum:25,A:40,B:35,C%] means there is a 25% chance to return “A”, 40% to return “B” and 35% to return “C”.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagitem:INFO$]&lt;br /&gt;
|Query info of the current item. INFO can be: &lt;br /&gt;
&lt;br /&gt;
· id: item ID.&lt;br /&gt;
&lt;br /&gt;
· name: item name.&lt;br /&gt;
&lt;br /&gt;
· count: item number.&lt;br /&gt;
&lt;br /&gt;
· group_n: maximum number of stacks.&lt;br /&gt;
&lt;br /&gt;
· quality: item quality.&lt;br /&gt;
&lt;br /&gt;
· level: item level.&lt;br /&gt;
&lt;br /&gt;
· main_type:  main item type.&lt;br /&gt;
&lt;br /&gt;
· sub_type: item sub-type.&lt;br /&gt;
&lt;br /&gt;
· equip_type: equipment type.&lt;br /&gt;
&lt;br /&gt;
· gendays:  period (day) since the production date.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom filed. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproject:INFO:ID$]&lt;br /&gt;
|Query project info. Read from the specific ID of SET_TEMP_ID if the ID field is left empty.&lt;br /&gt;
&lt;br /&gt;
· id: project id.&lt;br /&gt;
&lt;br /&gt;
· state: project status (works only in group events) (0: Not started; 1: Ongoing; 2: Completed).&lt;br /&gt;
&lt;br /&gt;
· showPlaceName: project location description.&lt;br /&gt;
&lt;br /&gt;
· showProjectName: project name.&lt;br /&gt;
&lt;br /&gt;
· roles: all characters involved in the current project.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagunit:INFO$]&lt;br /&gt;
|Query info of the current target minion.&lt;br /&gt;
&lt;br /&gt;
· id: unit id.&lt;br /&gt;
&lt;br /&gt;
· name: unit name.&lt;br /&gt;
&lt;br /&gt;
· level: unit level.&lt;br /&gt;
&lt;br /&gt;
· statu= (custom ID): query the value of the corresponding ID in the Unit Attribute table.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcard:INFO$]&lt;br /&gt;
|Query info of a specific card.&lt;br /&gt;
&lt;br /&gt;
· id: bound id of the card.&lt;br /&gt;
&lt;br /&gt;
· name: displayed name of the card.&lt;br /&gt;
&lt;br /&gt;
· lv: card level.&lt;br /&gt;
&lt;br /&gt;
· recruit_name: displayed name with recruitment info of the card. &lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific Tag field of the card.&lt;br /&gt;
&lt;br /&gt;
· has_tag= (KEY of custom expansion field): query if there is a particular Tag field of card (1: Yes; 0: No).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$save_version$]&lt;br /&gt;
|Return the version number of when the current game save is created.&lt;br /&gt;
|-&lt;br /&gt;
|[$version_compare:TAG_VERSION$]&lt;br /&gt;
|Compare the version number of when the current game save is created with TAG_VERSION; if the former version is higher than TAG_VERSION, return 1; when equal, return 0; when lower, return -1.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmsg:INFO$]&lt;br /&gt;
|Query info of the current interactive messages.&lt;br /&gt;
&lt;br /&gt;
· title: title&lt;br /&gt;
&lt;br /&gt;
· content: message content&lt;br /&gt;
&lt;br /&gt;
· arg=(field KEY): query the parameter of the KEY in the custom parameter table&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下查询需要游戏版本高于0.7.4.1&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_str:KEY$]&lt;br /&gt;
|Return the string value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_int:KEY$]&lt;br /&gt;
|Return the int value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[%envoy_enable%]&lt;br /&gt;
|Return the status of whether the envoy of the player’s faction is available.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Directive Field of Global Save Query===&lt;br /&gt;
These are used to query some directives in the global save.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%global_int:ID%]&lt;br /&gt;
|Return the value of global int field ID　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|[$global_str:ID$]&lt;br /&gt;
|Return the value of global string field ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Built-in Global Variable Field===&lt;br /&gt;
&lt;br /&gt;
Following are key fields of a built-in global variable: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Filed KEY'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|save_max_hard_level&lt;br /&gt;
|The greatest difficulty has been unlocked. Set to be 0 by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Built-in Custom Variable Field===&lt;br /&gt;
&lt;br /&gt;
You can use directives like SETINTVAR and CHANGEINTVAR to change and save the built-in custom variable of the system. Different variables have a different function.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|system_探索地图点数&lt;br /&gt;
|Morale.　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|system_星星&lt;br /&gt;
|The number of stars.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色血量百分比&lt;br /&gt;
|When the player is fighting an enemy the extra hp multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色攻击百分比&lt;br /&gt;
|When the player is fighting an enemy, the extra physical/magic attack multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|config_ai_level&lt;br /&gt;
|The intensity level of AI (0: Easy; 1: Normal; 2: Difficult).&lt;br /&gt;
|-&lt;br /&gt;
|config_roll_limit&lt;br /&gt;
|Enable Roll Limit in battles 0: Disabled; 1: Enabled (By enabling the Roll Limit, there will be a CD and limit of rolling times).&lt;br /&gt;
|-&lt;br /&gt;
|config_hunger_penalty&lt;br /&gt;
|Enable Hunger Debuff 0: Disabled 1: Enabled (By enabling the Hunger Debuff, the movement of the player’s squad will be influenced when in hunger).&lt;br /&gt;
|-&lt;br /&gt;
|config_upgrade_cost_reduce&lt;br /&gt;
|EXP and materials needed to upgrade the current unit after discount (0~100 percentage; set to be 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|config_soldier_dead_scale&lt;br /&gt;
|A multiplier of death probability of the current minion (percentage; set to be 100 by default, final death probability = basic death probability *(config_soldier_dead_scale/100)).&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|config_project_concurrent&lt;br /&gt;
|Maximum cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
===Built-in Field in Initial Setting Table===&lt;br /&gt;
&lt;br /&gt;
In the initial setting table, we can configure some initial fields that have actual functions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|'''Default Value'''&lt;br /&gt;
|-&lt;br /&gt;
|init_pos&lt;br /&gt;
|Default info of respawning location.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_statu&lt;br /&gt;
|Default attribute status info when the player respawns.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_money&lt;br /&gt;
|Default initial property.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|home_place&lt;br /&gt;
|Default initial location ID.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skillpages&lt;br /&gt;
|Initially enabled skill page (format: see SET_SKILLPAGE directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skills&lt;br /&gt;
|Initial skill page of the player (format: see GETSKILL directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_equip&lt;br /&gt;
|Initial equipment list info of the player.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_camp_rl&lt;br /&gt;
|Initial faction relationship list. Format:&lt;br /&gt;
&lt;br /&gt;
Faction A, faction B, relationship, friendliness (-100~100)| faction A, faction C, relationship, friendliness(-100~100)|...|faction N, faction N, relationship, friendliness(-100~100).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unchanged_diplomatic_relationship&lt;br /&gt;
|Unable to change the relationships between factions dynamically? (0: Yes; 1: No).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|gametime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second).&lt;br /&gt;
|0.01&lt;br /&gt;
|-&lt;br /&gt;
|battletime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second), when this coefficient is 0, the time in skirmish or siege battles will stop.&lt;br /&gt;
|0.005&lt;br /&gt;
|-&lt;br /&gt;
|no_card_auto_supply&lt;br /&gt;
|Card durability cannot restore automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|drop_card_when_no_durability&lt;br /&gt;
|When card durability becomes 0 in this mode, the card will disappear.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|enable_card_upgrade&lt;br /&gt;
|Enable card upgrading.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|equipment_loss_durability&lt;br /&gt;
|The equipment has durability.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|levelup_exp_scale&lt;br /&gt;
|Level up EXP multiplier.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|seige_time&lt;br /&gt;
|Basic preparation time for siege battle (day). Preparation time = basic time + Weapons degree* coefficient of extra time per Weapons degree (the siege_time_per_armvalue feild).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|siege_time_per_armvalue&lt;br /&gt;
|The coefficient of extra time per weapon degree when preparing for a siege battle.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|project_time_scale&lt;br /&gt;
|The proportion of project time. &amp;lt;1: shorten time; &amp;gt;1: extend time.&lt;br /&gt;
|0.99&lt;br /&gt;
|-&lt;br /&gt;
|dailyIncomeScale&lt;br /&gt;
|The multiplier of daily city resource income.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|recruit_cost_scale&lt;br /&gt;
|The multiplier of the cost of recruitment/supply/upgrade/chest opening.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|building_cost_scale&lt;br /&gt;
|The multiplier of the cost of building construction/other projects.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|custom_intval_watcher&lt;br /&gt;
|Default custom variable field of the monitor (same as the ADD_INTVAL_WATCHER directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|show_star_info&lt;br /&gt;
|Show prestige (star).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_add_exp_per_period&lt;br /&gt;
|Cardinal number of daily AI soldier (units from other factions) EXP increase.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|team_role_count_base&lt;br /&gt;
|The basic number of character slot each squad.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
|team_role_max&lt;br /&gt;
|Maximum number of character slot each squad.&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|team_card_count_base&lt;br /&gt;
|The basic number of minion slot each squad.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|team_card_max&lt;br /&gt;
|Maximum number of minion slot each squad.&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_resource_scale&lt;br /&gt;
|Resource multiplier of AI recruitment.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_build_resource_scale&lt;br /&gt;
|Resource multiplier of AI construction.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_upgrade_resource_scale&lt;br /&gt;
|Resource multiplier of AI minion upgrading.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_highlevel_upgrade_average_days&lt;br /&gt;
|AI simulation of upgrading minions when the player’s level is high (expected number of days).&lt;br /&gt;
&lt;br /&gt;
The higher this value is, the slower AI upgrades a type of minion.&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ai_auto_balance_resource&lt;br /&gt;
|If AI will balance each kind of resources automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_invade_prob&lt;br /&gt;
|Coefficient of AI invasion probability (0~1) The closer to 1, the more likely AI will invade.&lt;br /&gt;
|0.8&lt;br /&gt;
|-&lt;br /&gt;
|invasion_destroy_factor&lt;br /&gt;
|Destruction rate after invasion or occupation. Format:&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 1: probability 1.&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 2: probability 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility N: probability N.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
1:50&lt;br /&gt;
&lt;br /&gt;
2:30&lt;br /&gt;
&lt;br /&gt;
3:10&lt;br /&gt;
&lt;br /&gt;
4:5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|monster_move_speed_random&lt;br /&gt;
|Correction range of random creep movement speed of creep emitter (0.75 at most).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|soldier_battle_killed_prob&lt;br /&gt;
|The basic casualty of the soldiers. The probability of soldiers being poorly wounded after losing a battle.&lt;br /&gt;
|0.2&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_battle_killed_prob&lt;br /&gt;
|Death probability of AI troops after losing a battle.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_hero_free&lt;br /&gt;
|AI recruits heroes for free&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed&lt;br /&gt;
|Basic movement speed of squads.&lt;br /&gt;
|240&lt;br /&gt;
|-&lt;br /&gt;
|monster_min_movespeed&lt;br /&gt;
|Minimum movement speed of creeps.&lt;br /&gt;
|150&lt;br /&gt;
|-&lt;br /&gt;
|caravan_move_speed_range&lt;br /&gt;
|Range of movement speed of Caravans. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|farmers_move_speed_range&lt;br /&gt;
|Range of movement speed of farmers. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed_range&lt;br /&gt;
|Range of movement speed of troops. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|global_move_speed_range&lt;br /&gt;
|Range of global movement speed. Format: min speed, max speed. &lt;br /&gt;
&lt;br /&gt;
This value influences all movable units on all maps.&lt;br /&gt;
|20,400&lt;br /&gt;
|-&lt;br /&gt;
|battle_gain_money_scale&lt;br /&gt;
|Scale coefficient of obtaining money in battles.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment&lt;br /&gt;
|If NPC will drop weapons (0: No; 1: Yes).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment_prob&lt;br /&gt;
|Probability of NPC dropping weapon.&lt;br /&gt;
|0.15&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_soldier&lt;br /&gt;
|Probability of each group of soldiers dropping food.&lt;br /&gt;
|0.1&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_hero&lt;br /&gt;
|Probability of each hero dropping food.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|hungry_fail_days&lt;br /&gt;
|Failed after being hungry for a certain number of days.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.2.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|ai_dailyfight_period&lt;br /&gt;
|The period between each AI compulsory invasion checks &amp;lt;=0: Disable the check (this logic is different from default AI invasion check；the default parameter (in-game day) is 5 before version 0.7.2.1) In addition, this check will be influenced by AI intensity from this version.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_active_level_default&lt;br /&gt;
|Default AI intensity level, which influences the default value of the custom filed of config_ai_level.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_roll_limit&lt;br /&gt;
|Whether to enable Roll Limit by default. This influences the default value of the custom field of config_roll_limit.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_hunger_penalty&lt;br /&gt;
|Whether to enable Hunger Debuff. This influences the default value of the custom field of config_hunger_penalty.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_seige_battlemap&lt;br /&gt;
|Default map ID of siege battle.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.3.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|init_inventory_capicity&lt;br /&gt;
|Default cardinal number of initial bag capacity.&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|def_project_concurrent&lt;br /&gt;
|Default cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.4.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_wanted_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “Wanted” of a faction (when player’s prestige is lower than “Wanted” but has not reached the “At War” status, the player will not be attacked by squads of this faction in the wild, but they will not be allowed to enter certain cities).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_war_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “At War” of a faction (when player’s prestige is lower than the point, the player will be attacked in the wild by squads of this faction).&lt;br /&gt;
| -10&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.8.0.1'''&lt;br /&gt;
|-&lt;br /&gt;
|dg_levelup_skill&lt;br /&gt;
|Skill ID of level-up special effect in battles.&lt;br /&gt;
|升级特效&lt;br /&gt;
|-&lt;br /&gt;
|init_items&lt;br /&gt;
|Initial item list.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_dropitem_model&lt;br /&gt;
|Model and special effect info of items dropped in battles (Format: world map unit model#special effect info).&lt;br /&gt;
|chest1#psChestFlash1,0,0&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}Besides specific initial fields above, there are some UI-resetting fields, starting with “gui”, in the initial set list, which are used to do a custom reset on certain built-in UI in the game. For more details, please see instruction on game interface reset. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Codes of Text Color in Common UI===&lt;br /&gt;
In dialogues, text boxes or other common UI, we can follow certain formats to change the colours of texts.&lt;br /&gt;
&lt;br /&gt;
E.g., This is a imp:red font text, red:red font text, &amp;amp;ff6699ff:custom color text font.&lt;br /&gt;
&lt;br /&gt;
Currently, we support preset colours for the following types (to use custom colours, replace “#” with “&amp;amp;” ).&lt;br /&gt;
&lt;br /&gt;
*place: unified colour for the location name.&lt;br /&gt;
*role: unified colour for the character name.&lt;br /&gt;
*camp: unified colour for faction name.&lt;br /&gt;
*item: unified colour for item name.&lt;br /&gt;
*imp: unified colour for an important message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Character Position Directive===&lt;br /&gt;
Format: position code:position parameter.&lt;br /&gt;
&lt;br /&gt;
Supported position codes are: 0: Unallocated; 1: In position; 2: In squad; 3: In a project.&lt;br /&gt;
&lt;br /&gt;
*when the code is 1: Format:  1: location ID, facility ID (if the facility ID is empty, it means the character is outside the facility).&lt;br /&gt;
*when the code is 2: Format:  2: squad ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of In-game Global Position Directive===&lt;br /&gt;
When assigning the position for a squad or object on the world map, we can follow a format of globally position assignment (e.g., the TELEPORT directive).&lt;br /&gt;
&lt;br /&gt;
Format of global position:   &lt;br /&gt;
 Map ID:coordinate X,coordinate Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Unit-Limitation Directive in Specific Battles===&lt;br /&gt;
In a specific battle table, you can fill in a directive of the following types in the “Limit” column, to execute unit or special restrictions. &lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Directive 1:parameter 1;directive 2:parameter 2;...directive N:parameter N;&lt;br /&gt;
Currently supported types of limitation directives are: &lt;br /&gt;
&lt;br /&gt;
*player: reset squad hero list. Format: character ID1,reset level (-1 or left empty: Do not reset)|. character ID2,reset level| character ID3, reset level|...| character ID N,reset level.&lt;br /&gt;
*units: reset squad minion list. Format: same as the common minion list.&lt;br /&gt;
*add_stat: additional character attribute status. Format: target character ID#status list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Directive List of Unit Control on the World Map===&lt;br /&gt;
World map unit (squad) control directives are methods used to manage the action order of world map units. When a unit has specific control directive list, it will execute every directive in sequence until the execution is finished. After the game is saved halfway of the execution of the directives and the player exits the game, the execution will continue when the save is loaded.&lt;br /&gt;
&lt;br /&gt;
Please note: after the execution of all directives of a squad, the squad will be dismissed. Dummies (creeps and dummies needed for stories included) are an exception.&lt;br /&gt;
&lt;br /&gt;
Control directive consists of int-number directives and directive content, separated by “;”. Directive of each line starts with a directive-type code and “+”, followed by a directive parameter. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 1,test map:100,100;1,test map:100,200;99,0&lt;br /&gt;
The code above means that the squad will move to coordinate 1 (100,100) first, and then to coordinate 2 (100,200). Finally, the squad will be dismissed.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive-type codes are: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Control Directive Code'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Move towards a coordinate on the world map. The parameter is the target coordinate (coordinate format: map ID: coordinate X, coordinate Y).&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Stay where you are. The parameter is the time of staying (count by in-game day).&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Enter a location. The parameter is the target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Attack the target location. The parameter is the target location ID. (invasion type: 0: Occupy; 1: Raid).&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Stay in the target location. The parameter is the target location ID, time of staying.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Execute an event. The parameter is the event ID.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Change the current StateNum value. The parameter is the new StateNum value.&lt;br /&gt;
&lt;br /&gt;
Note: StateNum can be used to mark the current status of some controlled squad. E.g., you can command a unit to a specific location on the map and execute an action. Before the unit reaches the destination, StateNum is 0; after its arrival, StateNum becomes 1. By doing so, we get to know the current status of a squad.&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|Execute custom movement directives permanently. (For directive format, see [[Common Scenario Directives#Format of Default Movement Directive of Unit Squad|Format of Default Movement Directive of Unit Squad]]).&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|Join a Warband. The parameter is the Warband ID (built-in method of the system. We do not suggest calling this).&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Execute an action. Parameter format: action ID, loop times (-1: Endless; &amp;gt;=1: Limited times; set 1 when the action itself is a looping animation), single-action time (count by second; execute the next directive when the action finishes looping, if it does not loop permanently), object(0: All units by default; 1: Leader only; 2: All followers), initial frame range (0~1; 1: the last frame of the animation; -1: a random number between 0 and 1), whether to execute the next directive after playing the animation (0: No by default; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
Supported default action list of models:&lt;br /&gt;
&lt;br /&gt;
· Loop action: standby, move, walk slowly, charge, recharging.&lt;br /&gt;
&lt;br /&gt;
· Single action: being hit, evade, block, attack, shoot, horizontal. slash, vertical slash, release, roar, knock up, jump, celebrate, die.&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|Open a chest. The parameter ID is the chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|Execute a TimeLine action. Format: TimeLineID, duration (set -1 by default, permanent; &amp;gt;0: Action ends after the time set).&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Change the attitude of the current squad towards the player (0: Neutral; 1: Hostile).&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|Change the current movement speed of the current squad. The parameter is the target movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Trade succeeded. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|Trade with a merchant. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|Follow a squad target. The parameter is the control ID of the target being followed.&lt;br /&gt;
|-&lt;br /&gt;
|99&lt;br /&gt;
|Dismiss the current squad.&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Default Movement Directive of Unit Squad===&lt;br /&gt;
Dummies, creeps and squads on the world map will change their movement modes based on the default way of moving or the changes of scripts. After choosing a movement mode, units will perform default actions according to the directive.&lt;br /&gt;
&lt;br /&gt;
Format of unit movement directive: &lt;br /&gt;
 Movement mode,parameter 1[,parameter 2,...,parameter N]&lt;br /&gt;
Currently supported movement modes and the formats of the parameter are: &lt;br /&gt;
&lt;br /&gt;
*Wander within range: WANDER, movement radius,[central coordinate X, central coordinate Y](the current position is the centre if the central coordinate is not assigned).&lt;br /&gt;
*Patrol: PATROL, coordinate 1X, coordinate 1Y, coordinate 2X, coordinate 2Y,..., coordinate NX, coordinate NY(when the first coordinate is the same as the final coordinate, the patrol movement loops in a circle; otherwise, the patrolling movement goes back and forth).&lt;br /&gt;
*Others: Stay still.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item List Info===&lt;br /&gt;
The item list info is one of the most common info formats. We use this format in the directives of obtaining various items (GETITEMS, etc.) and configuration tables.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Item code 1,number 1[,detailed info list]|item code 2,number 2[,detailed info list]|....|item code N,number N[,detailed info list].&lt;br /&gt;
The format of the detailed info list is the dictionary list of &amp;quot;key1=val1,key2=val2,...&amp;quot;. Following fields are supported: &lt;br /&gt;
&lt;br /&gt;
*[mf] auto-match the created affixes: mf=lowest quality; N-highest quality; N[-additional cardinal number of variable value]. E.g., Longsword,1,mf=0-3  Explanation: the “mf” field helps the current weapon to automatically match a quality (0~3) affix (0 means no affix).&lt;br /&gt;
&lt;br /&gt;
*[cw] create custom affix: cw= affix ID+ additional cardinal number of variable value (0-100). E.g., Longsword,1,cw=Lifesteal Sword+50 Explanation: the variable value of items with the affix of Lifesteal Sword, is between 50 and 100.&lt;br /&gt;
&lt;br /&gt;
*[w] assign the affix details of items: w=affix ID$ [variable code array]&lt;br /&gt;
*[qv] assign the variable array of item attribute: qv= variable code array&lt;br /&gt;
*[p] assign the buy-in price of items: p= buy-in price&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variable code array consists of two columns of 2-dimensional arrays. Column 1 is enumerated numbers, and column 2 is quality numbers (0~100). The two columns are connected by “/”. If a affix has 3 parts, then its variable array might be: 0/50/0/100/0/100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Weather Effect Info===&lt;br /&gt;
When using directives to control weathers, we mainly use directives to control a list weathers, which is separated by “|”. &lt;br /&gt;
&lt;br /&gt;
Format of weather effects description: &lt;br /&gt;
 Weather effect ID1, intensity|weather effect ID2,intensity|...weather effect IDN,intensity&lt;br /&gt;
Currently, supported weather effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*雨（Rain）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
&lt;br /&gt;
*雪（Snow）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
*风沙（Sandy）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雷电（Thunder）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雾（Fog）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*黑暗（Darkness）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*炎热（Hot）: Disabled when the intensity is 0 (1~100) (Heat Distortion Effect).&lt;br /&gt;
*云（Cloudy）: Disabled when the intensity is 0 (1~100) (shadows of cloud in clear days).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of weather effect field in map editor or config tables: &lt;br /&gt;
 Probability 1,duration 1:[weather effect description 1]; Probability 2,duration 2:[weather effect description 2]; Probability 3,duration 3:[weather effect description 3];[...]; Probability N,duration N:[weather effect description N]&lt;br /&gt;
E.g., 30,1:;50,3:雨,20|雾,10;20,5:风沙,30&lt;br /&gt;
&lt;br /&gt;
The above code means there is a 30% chance of not having any weather effect for a whole day, 50% chance of raining for 3 consecutive days, and 20% chance of having 5 consecutive sandy days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Camera Filter Effect Info===&lt;br /&gt;
We can use directives like SET_CAMERA_FILTER to set the camera filter of the current game.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Filter effect ID1,intensity|filter effect ID2,intensity|...filter effect IDN,intensity&lt;br /&gt;
Currently, supported filter effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*暗角 (Vignetting): Disabled when the intensity is 0 (0~100). The degree of darkness of camera’s corners.&lt;br /&gt;
*黑白 (Black&amp;amp;white): Disabled when the intensity is 0 (0~100). The black-and-white version of the camera.&lt;br /&gt;
*老旧 (Classic): Disabled when the intensity is 0 (0~100). The yellowing classic style of camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction List===&lt;br /&gt;
The following are the character TAGs used in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|LIKE&lt;br /&gt;
|Mark the type of items a specific character likes, which affects the increased speed of favour.&lt;br /&gt;
&lt;br /&gt;
Format: LIKE:type 1|type 2|...&lt;br /&gt;
|-&lt;br /&gt;
|DEF_WEAPON_SPEED&lt;br /&gt;
|Default weapon speed. Characters with this tag will take this speed as the default weapon speed even if they do not have a weapon.&lt;br /&gt;
|-&lt;br /&gt;
|FVChangeUnit&lt;br /&gt;
|Change the coefficient of character’s favour via sending gifts. Set to be the default value without this field.&lt;br /&gt;
|-&lt;br /&gt;
|dg_skill&lt;br /&gt;
|Replace the dungeon skill of this character.&lt;br /&gt;
|-&lt;br /&gt;
|attached_script&lt;br /&gt;
|ID of script event mounted on characters in battles.&lt;br /&gt;
|-&lt;br /&gt;
|loot_list&lt;br /&gt;
|The dropping list of this character in dungeon battles (can use the“EXP” item IDs as a specific source of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Location List===&lt;br /&gt;
The following is a TAG list of locations with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|Show minimap&lt;br /&gt;
|City maps are shown by default. If there are other places that need to be shown by default, this tag must be 1.&lt;br /&gt;
|-&lt;br /&gt;
|Do not show minimap&lt;br /&gt;
|It is what the field means.&lt;br /&gt;
|-&lt;br /&gt;
|Disable AI invasion&lt;br /&gt;
|Bases with this tag will not invade, patrol or occupy resources automatically.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction Table===&lt;br /&gt;
The following is a TAG list of factions with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|NO_CHANGE_DIP&lt;br /&gt;
|Will not be affected by dynamic diplomatic relations in the game, unless you use script directives to change directly.&lt;br /&gt;
|-&lt;br /&gt;
|UNFAILED&lt;br /&gt;
|This faction cannot be eliminated in a usual way.&lt;br /&gt;
|-&lt;br /&gt;
|EMBARGO&lt;br /&gt;
|Cities occupied by this faction will not send out caravans or trade with other cities.&lt;br /&gt;
|-&lt;br /&gt;
|NO_FARMER&lt;br /&gt;
|There will not be farmer migration in cities occupied by this faction.&lt;br /&gt;
|-&lt;br /&gt;
|CAMP_COLOR&lt;br /&gt;
|Set a specific colour for a faction. Sample format: CAMP_COLOR=FFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===TAGs with Special Meanings in Item Table===&lt;br /&gt;
The following is a TAG list of items with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|IgnoreBagSpace&lt;br /&gt;
|This item will not occupy a slot of player’s bag. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|NoSellOrDrop&lt;br /&gt;
|This item cannot be discarded or sold. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|BatchUse&lt;br /&gt;
|Weather player can use the item in the batch. Function enabled when the field is 1. When an item with this TAG is used, the [%arg_int_val1%] in its script will be the selected number of the item.&lt;br /&gt;
|-&lt;br /&gt;
|DoNotCostWhenUse&lt;br /&gt;
|This item will not be consumed when used. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Present&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The tag field of gift type, separated by “|”.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|AiNotLoot&lt;br /&gt;
|This item cannot be accessed by AI in a normal way. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Mendable&lt;br /&gt;
|If this item is mendable, unmendable item will self-destroy after the durability becomes 0. (1: Yes ).&lt;br /&gt;
|-&lt;br /&gt;
|DropModel&lt;br /&gt;
|The model info of the item when it is on the ground in battles. (format: world map unit model ID#special effect info (replaced by the def_dropitem_model field in the initial set list if the info is left empty)).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Ones of Map Exploration Info Fields in Map List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!字段&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|BattleLoseStay&lt;br /&gt;
|Stay still after losing a battle. Only available in adventure mode (0: No; 1: Yes)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following fields are suitable for version above or higher than 0.7.2.1'''&lt;br /&gt;
|-&lt;br /&gt;
|RolePlay&lt;br /&gt;
|When the player is on this map, their character model and name will be replaced by the info of character whose ID is filled into this field. The models of the following minions will be hidden too. The bag and squad panels become inaccessible.&lt;br /&gt;
|-&lt;br /&gt;
|FixedGameTime&lt;br /&gt;
|When this field is not empty, the in-game time will be frozen at a certain point of a day (0~1.0, 0.5 means 12 pm). When the time is frozen, the world will not run on. Only units on the current map can take actions.&lt;br /&gt;
|-&lt;br /&gt;
|CameraFilter&lt;br /&gt;
|When on this map, use this field compulsorily as a camera filter. The effect is the same as the SET_CAMERA_FILTER directives.&lt;br /&gt;
|-&lt;br /&gt;
|NoFoodConsume&lt;br /&gt;
|When this field is 1, the player will not consume food on this map and will not die because of hunger.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Fields of TAG in Instance Info List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PlayerInitType&lt;br /&gt;
|The initial mode of player’s character (0: Default (use the default character template and initial position in the instance to initialize the character) 1: Manual (initialize the character via the LUA port)).&lt;br /&gt;
|-&lt;br /&gt;
|ExpMode&lt;br /&gt;
|EXP allocation mode. Format: allocation mode[,radius parameter].&lt;br /&gt;
&lt;br /&gt;
The allocation modes are: &lt;br /&gt;
&lt;br /&gt;
*0: Killer mode (default; the enemy killer has all EXP).&lt;br /&gt;
*1: Average Mode (the parameter is the allocation radius; when the parameter &amp;lt;=0, all allies share EXP).&lt;br /&gt;
*2: Share Mode (if the radius parameter &amp;gt;0, share EXP with allies with the radius).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Item Entry Info===&lt;br /&gt;
Entries of items follow the format of “entry type:{enumerated info 1, value 1; enumerated info 2, value 2;… }”, and they are set in the item list. Entries can be sorted as:&lt;br /&gt;
&lt;br /&gt;
*a: increase the character’s attribute passively. Enumerated info is the KEY to the increased attribute.&lt;br /&gt;
*skill: add new available skills to a character. Enumerated info is the skill ID.&lt;br /&gt;
*dg_skill: replace the current dungeon skill of the character. Enumerated info is the dungeon skill ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item Dropping Info===&lt;br /&gt;
Format:&lt;br /&gt;
 Probability 1,item ID1,min number,max number [,additional parameter list(see [[Common Scenario Directives#Format of Item List Info|Format of Item List Info]])]|probability 2,item ID2,min number, max number [,parameter list]|...|probability N,item N,min number,max number[,parameter list]. &lt;br /&gt;
(E.g., “LOOT*100.0, 金钱,100,200|50.0, 经验,100,200” means that there is a 100% chance of obtaining 100~200 utars and a 50% chance to obtain 100~200 EXP).&lt;br /&gt;
&lt;br /&gt;
'''In Item ID, you can execute a special ID Query, which is to query and return a result of item dropping from the global dropping list (see the format in Q全局掉落表.xlsx).'''&lt;br /&gt;
&lt;br /&gt;
The format of the parameter list of QUERY is: “parameter 1=val1, parameter 2=val2,....” Following query parameters are supported: &lt;br /&gt;
&lt;br /&gt;
*[id] obtain the result of the target ID from the global dropping list (ignore all the other query conditions when this exists and is not empty).&lt;br /&gt;
*[lv] specific conational query level（-1：return all query results; 0: query based on the current level of player）.&lt;br /&gt;
*[t1] query TAG 1 (a condition).&lt;br /&gt;
*[t2] query TAG 2.&lt;br /&gt;
*[t3] query TAG 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Script Directive in Special Effect Object Event===&lt;br /&gt;
You can attach the eftEffectEventHelper script to a special effect object to add a new play-effect event. Format of every event: event time point (number of seconds after the start), parameter 1, parameter 2,…, parameter N.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive types are:&lt;br /&gt;
&lt;br /&gt;
shake_cam: screen shake. Parameter 1 is the duration of screen shake, and parameter 2 is the intensity. &lt;br /&gt;
&lt;br /&gt;
play_sound: play audio. Parameter 1 is the audio ID.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=715</id>
		<title>Common Scenario Directives</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=715"/>
		<updated>2020-09-22T02:17:48Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Scenario Event===&lt;br /&gt;
A scenario event is a basic element used to realize scenario scripts in the game. All scenario events in the game are called by emitters or executors and put into the directive queue. These scenario events will be run by the GameWorldManager one by one according to the in-game time. An integrate scenario event consists of the following parts:&lt;br /&gt;
&lt;br /&gt;
1. Scenario Event ID: a unique label of a scenario event;&lt;br /&gt;
&lt;br /&gt;
2. Directive Content: directives that will be executed after a scenario event is triggered;&lt;br /&gt;
&lt;br /&gt;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.&lt;br /&gt;
&lt;br /&gt;
===Scenario Event Trigger===&lt;br /&gt;
Currently, all stories and events are established according to the mechanics of the scenario event trigger. The mechanics of a trigger is: event ports are set at different positions in advanced, and when the program accesses a position, it will call the port and import the current environment variables. The program will then traverse all defined triggers in the port event and return the trigger with the highest priority or all triggers that meet the conditions (to return one or all triggers is decided by the type of a port). Finally, a scenario event is executed. Triggers’ calling events is not executed immediately. Relevant events are put into the execution queue and get carried out procedurally until all events in the queue are executed.&lt;br /&gt;
&lt;br /&gt;
Following is the list of scenario events defined in the game (port types in bold indicate that they execute all trigger events that meet the conditions instead of executing the one of the highest priority): &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Port Type&lt;br /&gt;
!Explanation&lt;br /&gt;
!Object Type&lt;br /&gt;
!Object ID&lt;br /&gt;
|-&lt;br /&gt;
|passive&lt;br /&gt;
|Triggered passively; &lt;br /&gt;
&lt;br /&gt;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|talk&lt;br /&gt;
|Triggered when interacting with NPC.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|first_in&lt;br /&gt;
|Triggered when the player enters the game for the first time.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter&lt;br /&gt;
|Triggered when interacting with units on the sandbox map.&lt;br /&gt;
|&lt;br /&gt;
|Control ID of the target Unit.&lt;br /&gt;
|-&lt;br /&gt;
|before_enter_map&lt;br /&gt;
|Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_map&lt;br /&gt;
|Triggered when entering a map.&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_map&lt;br /&gt;
|Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_map&lt;br /&gt;
|Triggered when leaving a map.&lt;br /&gt;
|&lt;br /&gt;
|Current map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_place&lt;br /&gt;
|Triggered when entering the target location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_place&lt;br /&gt;
|Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted)&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_place&lt;br /&gt;
|Triggered when leaving the current location.&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_place&lt;br /&gt;
|Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_building&lt;br /&gt;
|Triggered when entering the target building&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_building&lt;br /&gt;
|Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_building&lt;br /&gt;
|Triggered when leaving the target building.&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_building&lt;br /&gt;
|Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|battle_start&lt;br /&gt;
|Triggered at the start of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|battle_over&lt;br /&gt;
|Triggered at the end of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|set_lord&lt;br /&gt;
|Triggered when AI appoints player as the ruler of a city.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|job_cmd&lt;br /&gt;
|Triggered when the player is given a working order.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|see_warband&lt;br /&gt;
|Triggered when encountering another squad and battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|curplace_inwar&lt;br /&gt;
|Triggered when the location where the player is currently settling in is attacked.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quest_done&lt;br /&gt;
|Triggered when all conditions of a mission are met (mission incomplete).&lt;br /&gt;
|&lt;br /&gt;
|Mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''on_end_work'''&lt;br /&gt;
|Triggered when completing a mission of a location.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|'''occupy_place'''&lt;br /&gt;
|Triggered when the player occupied a location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''new_day'''&lt;br /&gt;
|Triggered when starting a new day.&lt;br /&gt;
|&lt;br /&gt;
|The target number of days.&lt;br /&gt;
|-&lt;br /&gt;
|reward_follower&lt;br /&gt;
|Triggered when the player rewards their followers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reward_player&lt;br /&gt;
|Triggered when the player is rewarded.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dip_event&lt;br /&gt;
|Triggered when the player’s faction meets diplomatic affairs.&lt;br /&gt;
|Affair types:&lt;br /&gt;
&lt;br /&gt;
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice.&lt;br /&gt;
|Target Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_success&lt;br /&gt;
|Triggered when the player’s diplomatic request is met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_fail&lt;br /&gt;
|The diplomatic request is not met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|player_failed&lt;br /&gt;
|Triggered when the player failed in a skirmish. &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reinforce_request&lt;br /&gt;
|Triggered when reinforcement related to player happens.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|is_fall&lt;br /&gt;
|Triggered when a faction collapsed.&lt;br /&gt;
|&lt;br /&gt;
|Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|is_to_fall&lt;br /&gt;
|Triggered when a faction loses all bases and is about to collapse.&lt;br /&gt;
|&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|before_cash_present&lt;br /&gt;
|Triggered before being rewarded (action of rewarding is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|before_present&lt;br /&gt;
|Triggered before sending a gift (action of sending the gift is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_present&lt;br /&gt;
|Triggered when sending a gift.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter_role&lt;br /&gt;
|Triggered before the common dialogue that happens when the player encounters a character.&lt;br /&gt;
|&lt;br /&gt;
|Target Character ID.&lt;br /&gt;
|-&lt;br /&gt;
|helped_camp&lt;br /&gt;
|Triggered when the player encounters a conflict between two sides and helped one side.&lt;br /&gt;
|&lt;br /&gt;
|The faction of the leadrole of target’s squad.&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_up&lt;br /&gt;
|Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_down&lt;br /&gt;
|Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_dismiss&lt;br /&gt;
|Triggered when a squad is dismissed.&lt;br /&gt;
|Squad Type: &lt;br /&gt;
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_into_place&lt;br /&gt;
|Triggered when a squad enters a location.&lt;br /&gt;
|Squad Type: same as above.&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Script Directive List===&lt;br /&gt;
&lt;br /&gt;
Script directives in the game usually follow the format of directive type*parameter 1#parameter2#...#parameter N, and uses line break to separate multiple lines of directives.&lt;br /&gt;
&lt;br /&gt;
Currently, supported script directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Directive&lt;br /&gt;
!Instruction&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
Function: show a dialogue with the typewriter effect and character painting. &lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N.&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
&lt;br /&gt;
 When certain paragraph needs to be bound with audios, add &amp;lt;voice:audio ID&amp;gt; in the front of the paragraph to show the according to the audio file for the words. The audio will be turned off when you skip the paragraph.&lt;br /&gt;
 You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly.&lt;br /&gt;
 When the paragraph begins with “inner:...”, a special piece of information is used;&lt;br /&gt;
 The built-in special information IDs and meanings are as follow:  &lt;br /&gt;
 inner:set_player_job: object’s words when they give orders to player&lt;br /&gt;
 inner:set_player_lord: text when the player is appointed as a ruler&lt;br /&gt;
 inner:self_introduce: self-introduction of a character &lt;br /&gt;
 inner:cur_doing: the content of what the current character has been doing&lt;br /&gt;
 inner:cur_team_intent: intension of the current squad&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side. &lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump-to Event'''&lt;br /&gt;
&lt;br /&gt;
Function: Jump to and execute another specific scenario event ID.&lt;br /&gt;
&lt;br /&gt;
Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0).&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT&lt;br /&gt;
|'''Jump-to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT*scenario event ID.&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT_RETURN&lt;br /&gt;
|'''Return to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump back to the last subevent from the current subevent.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT_RETURN*&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Selection List Box'''&lt;br /&gt;
&lt;br /&gt;
Function:  Based on the text box, after the dialogue content is printed, a selection list box pops up, lets the player choose an option, and returns the result (the according [%result_code%] of the result command in the event).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 when the KEY of an option begins with &amp;quot;+&amp;quot;, the text box will not disappear after the player selects an option. &lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TALK&lt;br /&gt;
|'''Plugin Dialogue Option'''&lt;br /&gt;
Function: a selection list box that can present new options via a trigger list.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by &amp;quot;|&amp;quot;; set to be &amp;quot;any&amp;quot; by default)&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be &amp;quot;any&amp;quot; by default if nothing is filled in), but certain options (whose trigger type is SELECT and meet conditions) will be selected from the trigger and be added as new options; the text shown is bound in the trigger, and the content of the triggered event is decided by the trigger event ID.&lt;br /&gt;
&lt;br /&gt;
 Please note: when using this directive, you need to add &amp;quot;[%result_code%][&amp;gt;]99:EVENTPOJO_EVENT* &amp;quot; to the result&lt;br /&gt;
 In the trigger list, you can add a prefix &amp;quot;SUB_EVENT.&amp;quot; to a trigger event ID to mark it as a subevent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|CMD_SELECT&lt;br /&gt;
|'''System Selection List Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_SELECT*select text info#option group (same as SELECT directive).&lt;br /&gt;
|-&lt;br /&gt;
|CONFIRM&lt;br /&gt;
|'''Text Confirmation Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CONFIRM*text to confirm&lt;br /&gt;
|-&lt;br /&gt;
|TOAST&lt;br /&gt;
|'''Message on Screen'''&lt;br /&gt;
Function: a message pops up on the screen, which disappears after a short while.&lt;br /&gt;
&lt;br /&gt;
Format: TOAST*message content&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text).&lt;br /&gt;
|-&lt;br /&gt;
|GAME_MSG&lt;br /&gt;
|'''In-game News'''&lt;br /&gt;
Function: show a text in the UI message box, which can be reviewed in the News Log.&lt;br /&gt;
&lt;br /&gt;
Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System).&lt;br /&gt;
|-&lt;br /&gt;
|INPUT&lt;br /&gt;
|'''Input Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]).&lt;br /&gt;
&lt;br /&gt;
Format: INPUT*notice text#Len number limit of digit#default text.&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay).&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second).）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable).&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|BLACK_SCREEN&lt;br /&gt;
|'''Screen Curtain'''&lt;br /&gt;
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain.&lt;br /&gt;
&lt;br /&gt;
Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
Function: Set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Annotation:&lt;br /&gt;
 Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity.&lt;br /&gt;
 E.g., 雪,60|雾,20&lt;br /&gt;
 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled&lt;br /&gt;
 For weather effect ID, please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]]&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE&lt;br /&gt;
|'''Start Battle'''&lt;br /&gt;
Function: start a skirmish or a battle defined in a specific battle table.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE*battle ID (if you do not fill in a specific battle ID or fill in “ENCOUNTER”, you start a skirmish)#BGM (optional; if there is a BGM in a particular battle).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH&lt;br /&gt;
|'''Fight with Specific Unit'''&lt;br /&gt;
Function: start a custom fight with a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH*target character info (optional)#minion info of the target (optional)#battle map info (optional)#battle location info (optional)#battlefield weather (optional)#BGM (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH_TAGROLE&lt;br /&gt;
|'''Fight with Target Character'''&lt;br /&gt;
&lt;br /&gt;
Function: start a specific fight with the target character immediately.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH_TAGROLE*battle ID (battle ID is used to trigger scenario event only)#specific BGM (optional; if there is a BGM for a specific battle).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_BGM&lt;br /&gt;
|'''Change Current BGM of the Game'''&lt;br /&gt;
Function: change the current BGM of the game based on the need of stories.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_BGM*parameter 1#paramter 2&lt;br /&gt;
&lt;br /&gt;
 Parameter 1: AudioID of the target BGM (switch back to the default BGM of the current map if this is empty; when the remaining field of this ID is “MUTE”, which means no BGM is played currently).&lt;br /&gt;
 Parameter 2: validation type (0: invalidated when switching scenes; 1: always validated even when you save the game and come back unless you recall the CHANGE_BGM directive and define an empty AudioID).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_SOUND&lt;br /&gt;
|'''Sound Effect'''&lt;br /&gt;
Function: play a sound effect in the game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_ROLE_VOICE&lt;br /&gt;
|'''Play Character Voice-over'''&lt;br /&gt;
Function: play an audio file that is defined in “Voice” of the character’s tags.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|NUMSEL&lt;br /&gt;
|'''Input Value Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]).&lt;br /&gt;
&lt;br /&gt;
Format: NUMSEL*text of input box#min value#max value#default value#item price#price message(when the item price is 0, system does not show the price message. Otherwise, the message needs to follow the format of “{0} Utar(s) for each unit, {1} Utar(s) in total”).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_MONEY&lt;br /&gt;
|'''Change Player’s Money in Hand '''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_MONEY*change value.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_CHANGE_MONEY&lt;br /&gt;
|'''Change a Specific Hero’s Money in Hand'''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_CHANGE_MONEY*Hero ID#change value.&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1).&lt;br /&gt;
|-&lt;br /&gt;
|AI_CAMP_GETITEMS&lt;br /&gt;
|'''All Factions Get Items or Resources'''&lt;br /&gt;
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive.&lt;br /&gt;
&lt;br /&gt;
Format: AI_CAMP_GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_ITEMS&lt;br /&gt;
|'''Convert Item'''&lt;br /&gt;
Function: convert a specific item in the current item list into a new item proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time.&lt;br /&gt;
&lt;br /&gt;
E.g., “TRANSFER_ITEMS*小麦#小麦粉#1#1#10” means converting wheat(小麦) into wheat powder(小麦粉) at a 1:1 proportion. If during the conversion, the original item becomes insufficient, the conversion stops.&lt;br /&gt;
|-&lt;br /&gt;
|GET_RND_ITEM&lt;br /&gt;
|'''Select a Type of Item Randomly'''&lt;br /&gt;
Function: select a type of item randomly among several items.&lt;br /&gt;
&lt;br /&gt;
Format: GET_RND_ITEM*object item list (e.g., GET_RND_ITEMS*茶叶(Tea), 3|面包(Bread), 1|牛奶(Milk), 2. This means that you will get one type of the three.)&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Specific Item or Resource'''&lt;br /&gt;
Function: remove a certain number of items from the item list of the player.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_SELECT_ITEMS&lt;br /&gt;
|'''Remove the Selected Item'''&lt;br /&gt;
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_SELECT_ITEMS*maximum number of selected groups (choose object groups in the front from the selected targets)#number of removal(optional; set -1 by default. When the number is lower than 0 or higher than the number of the object’s stacks, remove the whole group. Otherwise, draw a specific number of all selected targets).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_PRESENT&lt;br /&gt;
|'''Remove Specific Gift Item That Meet Requirement'''&lt;br /&gt;
Function: remove a gift item from the item list based on a specific gift tag.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of &amp;quot;Like&amp;quot; in the mission list.&lt;br /&gt;
|-&lt;br /&gt;
|ITEMS_SELECTOR&lt;br /&gt;
|'''Open Item Selection Text Box'''&lt;br /&gt;
Function: an item selection text box pops up. You can restore your choice in a queriable variable ([%last_seled_items%],[%last_seled_item_id%], etc).&lt;br /&gt;
&lt;br /&gt;
Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list &lt;br /&gt;
|-&lt;br /&gt;
|TEAM_GAINEXP&lt;br /&gt;
|'''Player’s Squad Gains EXP'''&lt;br /&gt;
Function: members in the player’s squad gain average EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|TEST_ADD_ROLE_EXP&lt;br /&gt;
|'''Specific Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEST_ADD_ROLE_EXP*hero ID#exp.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_ROLE_LV&lt;br /&gt;
|'''Change Character Level'''&lt;br /&gt;
Function: change the level of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_ROLE_LV*hero ID#expected level.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_GUARDS_LEVELUP&lt;br /&gt;
|'''All Defending Heroes Level Up'''&lt;br /&gt;
Function: all heroes in a specific location increase their level by 1.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_GUARDS_LEVELUP*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_TEAM_LEVELUP&lt;br /&gt;
|'''All Heroes in Player’s Squad Level UP'''&lt;br /&gt;
Function: all heroes in the player’s squad level up directly.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_TEAM_LEVELUP*.&lt;br /&gt;
|-&lt;br /&gt;
|SETTRIGG&lt;br /&gt;
|'''Set Trigger Switch'''&lt;br /&gt;
Function: turn on or turn off a trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: SETTRIGG*trigger ID#status value (0: On; 1: Off)&lt;br /&gt;
|-&lt;br /&gt;
|TRIGGER&lt;br /&gt;
|'''Execute Trigger'''&lt;br /&gt;
Function: execute a specific trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: TRIGGER*trigger ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_ES&lt;br /&gt;
|'''Manually Set Scenario Event Status'''&lt;br /&gt;
Function: set the execution status of a scenario event manually (after the logics have been executed, the result will be marked with ResultCode of the current event).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event).&lt;br /&gt;
|-&lt;br /&gt;
|SETINTVAR&lt;br /&gt;
|'''Set Custom Int Variable'''&lt;br /&gt;
Function: set a custom int variable (recorded by saves). Some variable fields will be connected the in-game logic parameter (for custom int variable that are defined inside the program, please see the“[[Common Scenario Directives#Built-in Custom Variable Field|Built-in Custom Variable Field]]”) and can be queried via built-in query parameter ([%int_val:ID%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETINTVAR*parameter ID#current int value&lt;br /&gt;
|-&lt;br /&gt;
|CHANGEINTVAR&lt;br /&gt;
|'''Change Custom Int Variable'''&lt;br /&gt;
Function: change the value of the current custom int variable.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TEMP_ID&lt;br /&gt;
|'''Set Temporary ID Variable'''&lt;br /&gt;
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TEMP_ID*ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETSTRVAR&lt;br /&gt;
|'''Set Custom String Variable'''&lt;br /&gt;
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETSTRVAR*Variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIMETAG&lt;br /&gt;
|'''Tag a Custom Crucial Time Point '''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can use [%tag_gametime_elapse%] to load the time span since the time point you record.&lt;br /&gt;
&lt;br /&gt;
Please note: this directive is only used to transfer temporary variables in a series of stories, and the tag will not be stored in saves. Do not use this for scenes that need permanent data.&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIMETAG*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIME&lt;br /&gt;
|'''Tag a Custom In-game Time Point'''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can query the relevant info of this time point via query parameter (see[%gametime_elapse%] and [%gametime_elapse_by_day%], etc.).&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIME*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CUSTOM_CD&lt;br /&gt;
|'''Set a Custom Cooldown Time'''&lt;br /&gt;
Function: set a custom cooldown timer and see whether the current cooldown is in use by checking if [%is_custom_cd:ID%] is 1 or not.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;＞0: set a specific time (count by day)).&lt;br /&gt;
|-&lt;br /&gt;
|GET_QUEST&lt;br /&gt;
|'''Claim a Mission'''&lt;br /&gt;
Function: claim a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: GET_QUEST*mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_QS&lt;br /&gt;
|'''Add Mission Subitem Counter'''&lt;br /&gt;
Function: add a subitem counter of missions manually.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter.&lt;br /&gt;
|-&lt;br /&gt;
|SETQUESTIEM&lt;br /&gt;
|'''Set Value of Mission Subitem'''&lt;br /&gt;
Function: set the value of the subitem of missions.&lt;br /&gt;
&lt;br /&gt;
Format: SETQUESTIEM*mission ID#subitem index#value&lt;br /&gt;
|-&lt;br /&gt;
|DONE_QUEST&lt;br /&gt;
|'''Complete a Mission'''&lt;br /&gt;
Function: mark and complete a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: DONE_QUEST*mission ID#reward or not(1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_IMG&lt;br /&gt;
|'''Show a Character Painting Frame'''&lt;br /&gt;
Function: [not suggested; recommend using the SHOW_CG direcitve].&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*name of image*preset special effect 0*duration (second).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_IMG&lt;br /&gt;
|'''Disable Character Painting Frame'''&lt;br /&gt;
Function: disable the current character painting frame.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_IMG*preset special effect 0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_ROLE&lt;br /&gt;
|'''Force Character to Join'''&lt;br /&gt;
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel.&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_ROLE&lt;br /&gt;
|'''Force Character to Leave'''&lt;br /&gt;
Function: force a character to leave your squad.&lt;br /&gt;
&lt;br /&gt;
Format: QUIT_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE&lt;br /&gt;
|'''Change Location Status'''&lt;br /&gt;
Function: set the current status of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLEPOS&lt;br /&gt;
|'''Set Character Position'''&lt;br /&gt;
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLEPOS*character ID#position info&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_PLACE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport Player to Specific Position'''&lt;br /&gt;
Function: teleport player’s squad to a specific position in the world.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*world position info.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_PLACE&lt;br /&gt;
|'''Teleport Player to Specific Location'''&lt;br /&gt;
Function: teleport player’s squad to a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_PLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_ROLE&lt;br /&gt;
|'''Teleport Player to Target Character'''&lt;br /&gt;
Function: teleport player’s squad to where the target character is currently staying (this only works when the target is in a squad or a location).&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CMD&lt;br /&gt;
|'''Exclusive Directive Group for Unit Control on Sandbox Map '''&lt;br /&gt;
Function: control various units to execute specific directives on a sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: MAP_CMD*directive content&lt;br /&gt;
&lt;br /&gt;
 Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes).&lt;br /&gt;
 Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate.&lt;br /&gt;
 Hide current battle mark: HIDE_BATTLE_MARK#1.&lt;br /&gt;
|-&lt;br /&gt;
|RESTORE&lt;br /&gt;
|'''Player’s Squad Get Recovered'''&lt;br /&gt;
Function: all units in the player’s squad are recovered.&lt;br /&gt;
&lt;br /&gt;
Format: RESTORE*parameter (&amp;lt;=0: squad fully recovered; &amp;gt;0: squad recovered by a specific point).&lt;br /&gt;
|-&lt;br /&gt;
|TIME_ELAPSE&lt;br /&gt;
|'''Time Acceleration'''&lt;br /&gt;
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up.&lt;br /&gt;
&lt;br /&gt;
Format: TIME_ELAPSE*in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#show time bar (0: No(default); 1: Yes)#operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|WAIT_EXEC&lt;br /&gt;
|'''Wait and Execute a Script Event'''&lt;br /&gt;
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: WAIT_EXEC* in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#script event ID #operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSEIGE&lt;br /&gt;
|'''Open Siege Management Panel'''&lt;br /&gt;
Function: show a siege management panel and operate reinforcement squads based on the preset (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
Format: OPENSEIGE*panel mode(0: attack city; 1: defend city)#target location ID (optional; set to be the target location of the current environment variable by default).&lt;br /&gt;
|-&lt;br /&gt;
|OCCUPY&lt;br /&gt;
|'''Execute City Occupation'''&lt;br /&gt;
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
&lt;br /&gt;
Format: OCCUPY*0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_WARBAND&lt;br /&gt;
|'''Join Warband'''&lt;br /&gt;
Function: joined an existed warband（a group of fighting squads from two different sides） (use [$tagwb:id$] to obtain the Warband info of the current skirmish).&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_WARBAND*warband ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_CAMP&lt;br /&gt;
|'''Change Character Faction'''&lt;br /&gt;
Function: change the faction of a target character directly.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_CAMP*faction ID#target character ID#recruiter ID(if this field is player then the character will join the player’s squad directly).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_OWN_CAMP&lt;br /&gt;
|'''Player Creates Their Faction'''&lt;br /&gt;
Function: player creates and activates their own faction. Player’s faction has a fixed default ID: Self-built Faction. This faction exists since the beginning of the game, but it is inactivated. Calling this directive will activate the player’s faction, making player and their followers join this faction.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_OWN_CAMP*name of self-built faction.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_ACTIVE&lt;br /&gt;
|'''Change Faction Project Status'''&lt;br /&gt;
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_RL&lt;br /&gt;
|'''Change Faction Relationship'''&lt;br /&gt;
Function: change diplomatic relationship or friendliness between factions.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_RL*faction A#faction B#relationship (-1: Remain the same; 0: Neutral; 1: Hostile; 2: Friendly)#friendliness value change#expected friendliness value (if this field exists).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_CAMP_REP&lt;br /&gt;
|'''Change Player’s Prestige (Tribute) towards Faction'''&lt;br /&gt;
Function: change player’s prestige (Tribute) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_CAMP_REP*target faction ID#value change#expected value (this works when the value is not empty). The faction refers to the player’s current faction if the faction ID is empty.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_REP&lt;br /&gt;
|'''Change Player’s Prestige (Friendliness) towards Faction'''&lt;br /&gt;
Faction: change the player’s prestige (Friendliness) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|FAME&lt;br /&gt;
|'''Change Player’s Global Prestige'''&lt;br /&gt;
Function: change the player’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: FAME*value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_FAME&lt;br /&gt;
|'''Change Character’s Global Prestige'''&lt;br /&gt;
Function: change a specific character’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_FAME*target character ID#value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PERSON_FV&lt;br /&gt;
|'''Change Favor between the Player and a Character'''&lt;br /&gt;
Function: change favor between the player and another character.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_ACTIVE&lt;br /&gt;
|'''Change Character Project Status'''&lt;br /&gt;
Function: change the project status of a character (not controlled by the player). When this character is inactive, they will not be refreshed in Taverns or execute AI actions like moving.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PROSP_BY_CAMP&lt;br /&gt;
|'''Change Prosperity of All Bases of Faction'''&lt;br /&gt;
Function: change the prosperity of all bases of a specific faction proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PROSP_BY_CAMP*faction ID#percentage(&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY&lt;br /&gt;
|'''Change Location Prosperity''' &lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY*location ID#value change#expected value (this works when the value is not empty; cannot exceed the maximum Prosperity of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY_BY_PCT&lt;br /&gt;
|'''Change Location Prosperity by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF&lt;br /&gt;
|'''Change Location Defense'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Defense of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF*location ID#value change#expected value(this works when the value is not empty; cannot exceed the maximum Defense of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF_BY_PCT&lt;br /&gt;
|'''Change Location Defense by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the defense of a location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_SECURITY&lt;br /&gt;
|'''Change Location Security'''&lt;br /&gt;
&lt;br /&gt;
Function: change the security of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CUSTOM_INT&lt;br /&gt;
|'''Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: a custom int field value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. &lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_CUSTOM_INT&lt;br /&gt;
|'''Change Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the custom int value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_ADD_BUILDING&lt;br /&gt;
|'''Add Custom Facility'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom facility to a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_REMOVE_BUILDING&lt;br /&gt;
|'''Remove Custom Facility from Location'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom facility from a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_REMOVE_BUILDING*location ID#facility ID.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_CARAVAN&lt;br /&gt;
|'''Create Caravan'''&lt;br /&gt;
&lt;br /&gt;
Function: create a caravan in a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_TEAM&lt;br /&gt;
|'''Create Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad, which takes actions according to specific directives.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_TEAM*position on the map#faction#character list (characters included will leave their current squads or locations compulsorily)#minion card list (card ID#level, number |card ID2#level 2, number 2|.......)#directive method (see below)#directive parameter#squad TAG(used to search for specific squads).&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive methods are:&lt;br /&gt;
&lt;br /&gt;
· 0: custom directive: the parameter of the custom directive is the directive for the squad (format: directive type 1, parameter 1; directive type 2, parameter 2;……; directive type N, parameter N) For detailed directive format, please see the Squad Preset Directive.&lt;br /&gt;
&lt;br /&gt;
· 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default).&lt;br /&gt;
&lt;br /&gt;
· 2: premade directive of invading faction: the parameter is the ID of the target faction, priority of target (0: Distance first; 1: Defense first), invasion method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|DISMISS_TEAM&lt;br /&gt;
|'''Dismiss Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss a specific squad.&lt;br /&gt;
&lt;br /&gt;
Format: DISMISS_TEAM*map unit identification ID&lt;br /&gt;
|-&lt;br /&gt;
|TEAM_ORDER&lt;br /&gt;
|'''Change Squad Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: change the current directive list of the squad.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_PLACE&lt;br /&gt;
|'''Attack Location'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside.&lt;br /&gt;
&lt;br /&gt;
Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_CAMP&lt;br /&gt;
|'''Attack Faction'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to attack another faction immediately. Please note: these two factions must be hostile towards each other or both stand neutral. If the attacker does not have sufficient military power, the attack might not happen.&lt;br /&gt;
&lt;br /&gt;
Format: IVASION_CAMP*attacker (faction) ID#target faction ID#priority of target(0: Distance first; 1: Defense first)#invasion type (0: Occupation; 1:Raid)#number of bases involved (0: All; &amp;gt;0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel with a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_LOCAL_PRODUCT&lt;br /&gt;
|'''Add Map Specialty'''&lt;br /&gt;
&lt;br /&gt;
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y.&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERMISSION&lt;br /&gt;
|'''Set Trade Permission'''&lt;br /&gt;
&lt;br /&gt;
Function: set trade permission for a location.&lt;br /&gt;
&lt;br /&gt;
Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|TROOPS_ALLOC&lt;br /&gt;
|'''Garrison Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the garrison panel of a location.&lt;br /&gt;
&lt;br /&gt;
Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|GETSKILL&lt;br /&gt;
|'''Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill to a character.&lt;br /&gt;
&lt;br /&gt;
Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills).&lt;br /&gt;
|-&lt;br /&gt;
|LEARN_SKILL&lt;br /&gt;
|'''Consume Skill Point to Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character in a squad and make them learn a new skill. If they do not have enough skill point, they cannot learn the skill.&lt;br /&gt;
&lt;br /&gt;
Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVESKILL&lt;br /&gt;
|'''Forget Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a skill from a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills)&lt;br /&gt;
|-&lt;br /&gt;
|RESET_SP&lt;br /&gt;
|'''Reset Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the skill points of a character.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_SP*character ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_UNUSEDSP&lt;br /&gt;
|'''Change Available Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill point to a player and allocate the skill point.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_UNUSEDSP*number of skill point.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SKILLPAGE&lt;br /&gt;
|'''Activate or Remove Player’s Skill Page'''&lt;br /&gt;
&lt;br /&gt;
Function: activate or remove a skill page of the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_TEAMINFO&lt;br /&gt;
|'''Show Info of Current Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: show the information on the current squad that you encounter.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_TEAMINFO*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_FLAG&lt;br /&gt;
|'''Set Complete Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story.&lt;br /&gt;
&lt;br /&gt;
Format: SET_FLAG*name of the mark#mark value.&lt;br /&gt;
|-&lt;br /&gt;
|UPDATE_MARKS&lt;br /&gt;
|'''Mark Update'''&lt;br /&gt;
&lt;br /&gt;
Function: update marks on the map.&lt;br /&gt;
&lt;br /&gt;
Format: UPDATE_MARKS*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUMMY&lt;br /&gt;
|'''Set Dummy or Creep Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode on Sandbox Map'''&lt;br /&gt;
&lt;br /&gt;
Function: control the camera mode on the sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter&lt;br /&gt;
&lt;br /&gt;
and meanings of the parameters:&lt;br /&gt;
&lt;br /&gt;
0: follows the player’s character. No parameter (default).&lt;br /&gt;
&lt;br /&gt;
1: follows a specific target. The parameter is the particular map unit identification ID.&lt;br /&gt;
&lt;br /&gt;
2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Map'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of all cities on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|TRY_RECRUIT_FREE_ROLE&lt;br /&gt;
|'''Try Neutral Hero Recruitment'''&lt;br /&gt;
&lt;br /&gt;
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full).&lt;br /&gt;
&lt;br /&gt;
Format: TRY_RECRUIT_FREE_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHK_RECRUIT_CAPTIVE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_CAP&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|SEND_ENVOY&lt;br /&gt;
|'''Send Diplomatic Envoy'''&lt;br /&gt;
&lt;br /&gt;
Function: send a diplomatic envoy for specific diplomatic missions.&lt;br /&gt;
&lt;br /&gt;
Format: SEND_ENVOY*faction ID (refer to player’s faction when empty)#diplomatic behaviour (1: Ransom; 2:Friendly; 3: War; 4: Alliance; 5: Alliance broke; 6: Armistice)#target ID (when you ransomed a character, it is the character ID; otherwise it is the target faction ID)#additional parameter(usually it is the required amount of money)#envoy arrival (1: No waiting time; 0: Need to wait).&lt;br /&gt;
|-&lt;br /&gt;
|DIP_DECIDE&lt;br /&gt;
|'''Execute Diplomatic Event Check'''&lt;br /&gt;
&lt;br /&gt;
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event).&lt;br /&gt;
&lt;br /&gt;
Format: DIP_DECIDE*result code (1: Agreement; 0: Decline).&lt;br /&gt;
|-&lt;br /&gt;
|EXPEL_ROLE&lt;br /&gt;
|'''Expel Character'''&lt;br /&gt;
&lt;br /&gt;
Function: expel a character out of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: EXPEL_ROLE*faction ID#character ID.&lt;br /&gt;
|-&lt;br /&gt;
|TRY_REWARD_ROLE&lt;br /&gt;
|'''Try to Reward a Follower'''&lt;br /&gt;
&lt;br /&gt;
Function: try to reward a follower.&lt;br /&gt;
&lt;br /&gt;
Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Add Global Buff to Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: add a global buff to the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_GLOBAL_BUFF*buffID#duration (in-game days)#number of stacks (set 1 by default)#upper limit of stacks (set -1 by default, no limit).&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF*buffID&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF_BYCLASS&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove All Global Buffs of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all global buffs of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_FAILED&lt;br /&gt;
|'''Game Failed'''&lt;br /&gt;
&lt;br /&gt;
Function: a common result of the player failing their game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_FAILED*1.&lt;br /&gt;
|-&lt;br /&gt;
|LOSE_INVENTORY&lt;br /&gt;
|'''Player Loses Common Items'''&lt;br /&gt;
&lt;br /&gt;
Function: the player loses their items once (only goods and money).&lt;br /&gt;
&lt;br /&gt;
Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGROLE&lt;br /&gt;
|'''Change Object Character of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object character of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGPLACE&lt;br /&gt;
|'''Change Object Location of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object location of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGPLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|SURRENDER&lt;br /&gt;
|'''Faction Surrenders'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender).&lt;br /&gt;
&lt;br /&gt;
Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter&lt;br /&gt;
|-&lt;br /&gt;
|GEN_RND_PLACE&lt;br /&gt;
|'''Select Random Location to Query'''&lt;br /&gt;
&lt;br /&gt;
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives.&lt;br /&gt;
&lt;br /&gt;
Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction)&lt;br /&gt;
|-&lt;br /&gt;
|HERO_UPGRADE&lt;br /&gt;
|'''Hero Enhancement'''&lt;br /&gt;
&lt;br /&gt;
Function: enhance an attribute permanently of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit).&lt;br /&gt;
|-&lt;br /&gt;
|HERO_SET_STATU&lt;br /&gt;
|'''Set Character Attribute Field'''&lt;br /&gt;
&lt;br /&gt;
Function: set a value of an attribute field for a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_BUFF&lt;br /&gt;
|'''BUFF Add Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: add a faction buff to a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_BUFF*faction ID#buff ID#duration (in-game days; when this value is lower than 0, the buff becomes permanent unless it is removed compulsorily).&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF&lt;br /&gt;
|'''Remove Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF*faction ID#buff ID.&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF_BYCLASS&lt;br /&gt;
|'''Remove Faction Buff by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''Remove All Faction Buffs'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all faction buffs from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Add Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: add a dynamic attribute field to a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Reset Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: reset all values in the dynamic attribute field in a faction.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_CAMP_EXTRA_STATU*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|WEAPON_DURABILITY_DOWN&lt;br /&gt;
|'''Weapon Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of the current weapon. When the durability is below 0, the weapon is destroyed. If the weapon’s durability is -1 (does not have durability), nothing happens with this directive.&lt;br /&gt;
&lt;br /&gt;
Format: WEAPON_DURABILITY_DOWN*value.&lt;br /&gt;
|-&lt;br /&gt;
|ITEM_DURABILITY_DOWN&lt;br /&gt;
|'''Specific Item Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of an item (with the right tag and meets the level condition(&amp;gt;= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed.&lt;br /&gt;
&lt;br /&gt;
Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SYNTH_STATE&lt;br /&gt;
|'''Set Status of Recipe'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific recipe.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned)&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SYNTH_DLG&lt;br /&gt;
|'''Open Item Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of item crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SYNTH_DLG*if locked (0: Do not lock the main category; 1: Lock display category)#catagory page shown by default (can be set empty by default; use “,” to separate pages; show the first page by default; this field can show hidden categories when the main category is locked)#story key to execute after closing the crafting dialogue (can be empty).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CARD_SYNTH_DLG&lt;br /&gt;
|'''Open Card Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of card crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CARD_SYNTH_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_EFT&lt;br /&gt;
|'''Play Special Effect'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect on the current map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#map coordinate#initial rotation degree (can be the rotation vector of the three directions or a spinning degree of the Y-axis)#scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_MU_EFT&lt;br /&gt;
|'''Unit Following Special Effect on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect that follows a unit on a specific map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_MU_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#map unit ID#object range (0: hero only; 1: all units)#initial rotation degree (can be the rotation vector of the three directions, or a spinning degree of the Y-axis))# scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_MAPAREA_SELECTOR&lt;br /&gt;
|'''Open Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a UI panel of area selector on the current sandbox map. You can select a location for the current object in the predefined area on this panel, and then a result is returned. If the result_code returns 1, the location setting succeeded; if 0, the setting failed. The location info is recorded in [$last_selpos$].&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_FREEAREA_SELECTOR&lt;br /&gt;
|'''Open Free Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_SELECTOR&lt;br /&gt;
|'''Open Location Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a suggested location selector panel. Selected result will be stored in [$tagplace$], its number stored in [%result_code%].If [%result_code%] is 9999, player cancels the selection. &lt;br /&gt;
&lt;br /&gt;
Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter).&lt;br /&gt;
|-&lt;br /&gt;
|SET_LORD&lt;br /&gt;
|'''Set City Ruler'''&lt;br /&gt;
&lt;br /&gt;
Function: set a city ruler for a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_LORD*character ID#location ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_CHEST&lt;br /&gt;
|'''Add a Custom Chest'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom chest on the world map according to the setting info (this “chest” can be any interactive object on the world map, such as materials, ruins, and soldier recruitment point).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (&amp;gt;0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CHEST&lt;br /&gt;
|'''Set Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a controllable chest on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CHEST*map ID#chest ID#status (&amp;gt;0: How many times you can open the chest; &amp;lt;=0: Chest Opened).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CURCHEST&lt;br /&gt;
|'''Set Current Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of the target chest in the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CURCHEST*statu (same as SET_CHEST).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_SYSTEM_UI&lt;br /&gt;
|'''Turn Off System UI'''&lt;br /&gt;
&lt;br /&gt;
Function: turn of the current system UI.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_SYSTEM_UI*.&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_ITEM_PANEL&lt;br /&gt;
|'''Close Bag UI'''&lt;br /&gt;
&lt;br /&gt;
Function: close the current UI panel of the player’s bag (if it exists).&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_ITEM_PANEL*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLES_SELECTOR&lt;br /&gt;
|'''Turn Off Character Selector UI'''&lt;br /&gt;
Function: turn off the current system UI of the character selector.&lt;br /&gt;
&lt;br /&gt;
Format: ROLES_SELECTOR*title of selection list box#number limit of options (&amp;lt;0: No limit)#option range (0: Global non-template character; 1: Player squad character; 2: Character in the Character Table)#conditional expression#parameter (the parameter is the character list when the selection range is the specific Character Table).&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
 ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&amp;amp;[$tagrole:campid$][&amp;lt;&amp;gt;][$null$]#&lt;br /&gt;
 ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4.&lt;br /&gt;
The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%].&lt;br /&gt;
|-&lt;br /&gt;
|ASK_ABOUT_SOMEBODY_SELECTOR&lt;br /&gt;
|'''Ask-about Character Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: the character who you ask whereabout of is currently not involved in the logic calculation. The character selection list box pops up, and the result is stored in [%arg_str_val1%]. When the result [%result_code%] is 9999, player cancels the selection.&lt;br /&gt;
&lt;br /&gt;
Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about.&lt;br /&gt;
|-&lt;br /&gt;
|CARD_SELECTOR&lt;br /&gt;
|'''Card Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: show the panel of current card list for the player to select.&lt;br /&gt;
&lt;br /&gt;
Format: CARD_SELECTOR*title of selection list box#number limit of selection (&amp;lt;0: No limit)#selection range (0: Card in the player squad; 2: Specific unit list) #parameter (optional; the parameter is the unit list when the selection range is the specific Unit Table).&lt;br /&gt;
|-&lt;br /&gt;
|ASSEMBLE_ARMY&lt;br /&gt;
|'''Gather Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: gather all troops and followers of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ASSEMBLE_ARMY#Gatherer ID#follower ID (can be empty; use “|” to separate; can use [%last_seled_roles%], the result of ROLES_SELECTOR). If the follower ID is empty, all characters under the faction are selected by default.&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_ALL_ASSEMBLE_ARMY&lt;br /&gt;
|'''Dismiss All Gathered Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss all troops that have been gathered or gathering.&lt;br /&gt;
&lt;br /&gt;
Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_IN_PROJECT&lt;br /&gt;
|'''Character Starts to Execute Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a character starts to execute a specific project.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_IN_PROJECT*character ID#project ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_FINISH_PROJECT&lt;br /&gt;
|'''Character Ends Current Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific character ends their current project compulsorily.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,...&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PROJECT_ADMIN&lt;br /&gt;
|'''Open Personal Project Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the personal project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default).&lt;br /&gt;
|-&lt;br /&gt;
|GROUP_PROJECT_ADMIN&lt;br /&gt;
|'''Open Group Project Panel'''&lt;br /&gt;
Function: open the group project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default).&lt;br /&gt;
 Currently, supported project binding types are:&lt;br /&gt;
 Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty&lt;br /&gt;
 world: custom building construction; object parameter format: custom area control ID; belong to which base (when this field is empty, the building does not belong to any city).&lt;br /&gt;
|-&lt;br /&gt;
|SET_REVIVE_POS&lt;br /&gt;
|'''Set Respawn Position'''&lt;br /&gt;
&lt;br /&gt;
Function: set a new respawn position.&lt;br /&gt;
&lt;br /&gt;
Format: SET_REVIVE_POS*world map position (map ID:x,y).&lt;br /&gt;
|-&lt;br /&gt;
|SET_SILENCE_MODE&lt;br /&gt;
|'''Set Silence Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable message silence mode. &lt;br /&gt;
&lt;br /&gt;
Format: SET_SILENCE_MODE*silence mode (0: Disabled; 1: Do not show TOAST box and deliver messages only; TOAST info of obtaining items is shown in the message; 2: Do not show TOAST and messages).&lt;br /&gt;
|-&lt;br /&gt;
|START_RAID_PLACE&lt;br /&gt;
|[Abolished]&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_PLACE&lt;br /&gt;
|'''Add Custom Location'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom location on a specific spot on the world map.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_PLACE*custom location ID (globally unique)#belong to the city (can be empty; the location does not belong to any city when this field is empty#location info template ID#location info#default faction of the location.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_NAME&lt;br /&gt;
|'''Change Location Name'''&lt;br /&gt;
&lt;br /&gt;
Function: change the name of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_NAME*location ID#custom name. &lt;br /&gt;
|-&lt;br /&gt;
|OPEN_PLACE_BUILD_UI&lt;br /&gt;
|'''Open Location Building Construction Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the location building construction panel.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD&lt;br /&gt;
|'''Add New Card'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD_PIECE&lt;br /&gt;
|'''Add Card with Specific Durability'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card, whose durability is a specific number (lower than the durability limit).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|SET_OBS_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of an obstacle area on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_AREA&lt;br /&gt;
|'''Explore Area'''&lt;br /&gt;
&lt;br /&gt;
Function: explore an area of the current map (dispel the war fog).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_MAP&lt;br /&gt;
|'''Explore the Whole Map'''&lt;br /&gt;
&lt;br /&gt;
Function: explore the whole map (dispel the war fog of the entire map).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_MAP*map ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTVAL_WATCHER&lt;br /&gt;
|'''Add Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. &lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTVAL_WATCHER*variable monitor info.&lt;br /&gt;
&lt;br /&gt;
(Format: field Key1,displayed name1,enumerated value 1a=enumerated name1a|enumerated value 1b=enumerated name1b|...|enumerated value 1N=enumerated name 1N, visibility status in battles([optional，set 0 by default] 0: No; 1: Yes);...; monitor field info N).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTVAL_WATCHER&lt;br /&gt;
|'''Remove Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom variable monitor filed.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTVAL_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_INTVAL_WATCHERS&lt;br /&gt;
|'''All Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: exact all variable monitor fields.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_INTVAL_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set an event timer, and a specific event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (&amp;lt;0: the timer is closed; when the timer type is Preset, this parameter is the number of days since the beginning of the game; when the timer type is Countdown, the parameter is the number of days)#timer type (0: Preset (triggered when time is reached); 1: Countdown)#Event ID when time reached#compulsory update (1: Compulsory update; 0: Non-compulsory update(will not change the current data of existing timer); set 1 if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER&lt;br /&gt;
|'''Remove Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER*timer ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TIMER_TIME&lt;br /&gt;
|'''Change Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: increase/decrease the time of a timer.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_TIMER_WATCHER&lt;br /&gt;
|'''Add Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] &lt;br /&gt;
&lt;br /&gt;
coefficient of the scaling of time parameter), visibility in battles ([optional; set 0 by default]; 0: No; 1: Yes)|...|timer ID N, displayed time format N, scale parameter N.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER_WATCHER&lt;br /&gt;
|'''Remove Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the monitor field of a custom event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_TIMER_WATCHERS&lt;br /&gt;
|'''Clear All Monitor Fields of Custom Event Timer''' &lt;br /&gt;
&lt;br /&gt;
Function: clear all monitor fields of custom event timer.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_TIMER_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_RECRUIT_CARD_IN_PLACE&lt;br /&gt;
|'''Open City Recruitment Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the player’s recruitment panel in a city.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_RECRUIT_CARD_IN_PLACE*city ID#ID of the event executed after recruitment (optional)#ID of the event executed after player cancels the recruitment (optional).&lt;br /&gt;
|-&lt;br /&gt;
|STORY_CARD_START&lt;br /&gt;
STORY_CARD_LINE&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END&lt;br /&gt;
|'''Open Story Card (2D Image)''' '''Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the story card panel. There must be a STORY_CARD_START and a STORY_CARD_END to avoid errors. STORY_CARD_LINE stands for the story paragraphs that need to be put between the start and the end (no number limit).&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_START*file name of the card.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 1.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 2.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 3.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END*.&lt;br /&gt;
|-&lt;br /&gt;
|AUTOSAVE&lt;br /&gt;
|'''AutoSave'''&lt;br /&gt;
&lt;br /&gt;
Function: execute autosave immediately.&lt;br /&gt;
&lt;br /&gt;
Format: AUTOSAVE*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Saving Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game-saving dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SAVE_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Loading Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game loading dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_LOAD_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|EXCHANGE_CARD&lt;br /&gt;
|'''Open Card Exchange Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the card exchange panel.&lt;br /&gt;
&lt;br /&gt;
Format: EXCHANGE_CARD*object type (0: Location; 1: Squad)#object ID([optional; set to be the current location by default]; when the object is a location, the ID is the location ID, squad ID for squad object).&lt;br /&gt;
|-&lt;br /&gt;
|LEVEL_FINISH&lt;br /&gt;
|'''Complete Level'''&lt;br /&gt;
&lt;br /&gt;
Function: used in scenarios to indicate the accomplishment of a level.&lt;br /&gt;
&lt;br /&gt;
Format: LEVEL_FINISH*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA_FILTER&lt;br /&gt;
|'''Set Camera Filter'''&lt;br /&gt;
&lt;br /&gt;
Function: set a filter for the camera. &lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10).&lt;br /&gt;
&lt;br /&gt;
Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100.&lt;br /&gt;
|-&lt;br /&gt;
|TLACTION&lt;br /&gt;
|'''Timeline Action'''&lt;br /&gt;
&lt;br /&gt;
Function: specific units on the world map do TIMELINE actions.&lt;br /&gt;
&lt;br /&gt;
Format: TLACTION*map character ID#file name of Timeline action#lasting time of action.&lt;br /&gt;
|-&lt;br /&gt;
|SELECTION_VIEW&lt;br /&gt;
|'''Fullscreen Special Story Selection'''&lt;br /&gt;
&lt;br /&gt;
Function: open a fullscreen selection panel of a special story.&lt;br /&gt;
&lt;br /&gt;
Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*).&lt;br /&gt;
|-&lt;br /&gt;
|DIALOG_BUBBLE&lt;br /&gt;
|'''Map Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying.&lt;br /&gt;
|-&lt;br /&gt;
|TEXT_EXPLORE_START&lt;br /&gt;
TEXT_EXPLORE_OVER&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD&lt;br /&gt;
|'''Text Adventure Relevant'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific text adventure mode.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_OVER*. Ends the current instance.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_CG&lt;br /&gt;
|'''Show CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: create an interface for showing CG images (please note: after enabling this function, you need to use HIDE_CG* manually to hide the CG. Otherwise the CG will get to player).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_CG*image name (no suffix; if this field is empty, the background will become black. The relevant directory is: Assets\BuildSource\Backgrounds\. Only .png file accepted).&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_CG&lt;br /&gt;
|'''Hide CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: hide the CG interface.&lt;br /&gt;
&lt;br /&gt;
Format: HIDE_CG*.&lt;br /&gt;
|-&lt;br /&gt;
|GENERATE_RANDOM_CARD&lt;br /&gt;
|'''Select a Card Randomly'''&lt;br /&gt;
&lt;br /&gt;
Function: select a card randomly, which will be stored in the tag card of the current variable.&lt;br /&gt;
&lt;br /&gt;
Format: GENERATE_RANDOM_CARD#1.&lt;br /&gt;
|-&lt;br /&gt;
|VOICE_OVER&lt;br /&gt;
|'''Voice Over'''&lt;br /&gt;
&lt;br /&gt;
Function: show a voice-over interface.&lt;br /&gt;
&lt;br /&gt;
Format: VOICE_OVER*voice over the content.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_STORYARMY&lt;br /&gt;
|'''Create a Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad only for stories.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_STORYARMY*tagkey#map position#faction#character list (all selected characters will leave their current squads or locations compulsorily)#card unit list (card ID1,number1,level1|card ID2,number 2,level 2|.......)#movement info (e.g., WANDER,2500).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_STORYARMY&lt;br /&gt;
|'''Remove Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a story squad.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_STORYARMY*tagkey.&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_BUY_ITEM&lt;br /&gt;
|'''Bazaar Merchant Buy-in'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants buy items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_SELL_ITEM&lt;br /&gt;
|'''Bazaar Merchant Sell-out'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants sell items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SHOWROLE&lt;br /&gt;
|'''Show Character Painting'''&lt;br /&gt;
Function: show character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;painting position &lt;br /&gt;
|-&lt;br /&gt;
|HIDEROLE&lt;br /&gt;
|'''Hide Character Painting'''&lt;br /&gt;
Function: hide character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: HIDEROLE*position of character 1 painting (#position of character 2 painting) (optional).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; L stands hiding the painting on the left side, R for hiding the painting on the right side.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_QUEST_ASK&lt;br /&gt;
|'''Mission Query'''&lt;br /&gt;
&lt;br /&gt;
Function: add a mission query that meets conditions based on the standard SELECT directive.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_QUEST_ASK*.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TEAMROLE&lt;br /&gt;
|'''Select Squad Character'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character from a squad.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TEAMROLE*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PLAYER_ACTIVE&lt;br /&gt;
|'''Activate Character Indo Status'''&lt;br /&gt;
&lt;br /&gt;
Function: make a character visible on the “Report” interface and import the character ID (this is usually used in scenarios. E.g., the tavern ladies).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PLAYER_ACTIVE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_ORDER&lt;br /&gt;
|'''Built-in Character Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: give some built-in directives to a character and execute these directives immediately. &lt;br /&gt;
&lt;br /&gt;
Format: ROLE_ORDER*character ID [refer to the current target character when this field is empty]#directive code: refer to Directive Parameter Table.&lt;br /&gt;
&lt;br /&gt;
The current directive code supports:&lt;br /&gt;
&lt;br /&gt;
*RETURN_JOBCITY: the character goes back to the location they belong to. No parameter. If the character is the squad leader, the squad directive is changed directly; if the character is not a squad leader, they leave the current squad and go back to the original squad; if they are in another location, they create a squad and return.&lt;br /&gt;
&lt;br /&gt;
*GOTO_PLACE: the character goes to the target location. The parameter is the target location ID.&lt;br /&gt;
&lt;br /&gt;
*JOIN_PLAYER_TEAM: the character joins the player’s squad directly. No parameter.&lt;br /&gt;
&lt;br /&gt;
*FOLLOW_ME: the character comes to rally and follows the player’s squad. No parameter.&lt;br /&gt;
&lt;br /&gt;
*EXPEL_FROM_CAMP: expel the character from their faction. No parameter.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTERACTIVE_MSG&lt;br /&gt;
|'''Add Interactive Message'''&lt;br /&gt;
Function: add a custom interactive message and show it in the corresponding UI.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTERACTIVE_MSG*info type#title#info text #parameter text#duration(&amp;lt;=0: Permanent; &amp;gt;0: number of days)#message sender info #TAG parameter.&lt;br /&gt;
&lt;br /&gt;
Currently supported message types are:&lt;br /&gt;
&lt;br /&gt;
msg (message); request; finance.&lt;br /&gt;
&lt;br /&gt;
When the message type is not financed, the format of the parameter text is:&lt;br /&gt;
 Parameter Key1: parameter value 1;parameter Key2:parameter value 2;...;parameter Key N:parameter N&lt;br /&gt;
Currently, the built-in KEY types of system are:&lt;br /&gt;
&lt;br /&gt;
*ask: assign this message to be a request with at most 2 directive options according to the parameter. Format: ask: option 1 text=event ID of option 1 [: option 2 text=event ID of option 2].&lt;br /&gt;
&lt;br /&gt;
E.g., ask: “Yes”=Event1: “No”=Event2. &lt;br /&gt;
&lt;br /&gt;
*items: assign this message to be a message of obtaining the item table. The parameter is the corresponding item list info. E.g., items: money,10000|紫金之刃,1,mf=0-3|黄金之枪,1,mf=0-3|幻刃月光,1,mf=0-3.&lt;br /&gt;
*You can define other fields, and use [$tagmsg:arg=parameter KEY$] (in the triggered directive of interactive messages) to query the value of the corresponding parameter field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the message type is finance, the format of the parameter text is:&lt;br /&gt;
 Receipt field 1=receipt detail list (format: resource 1, number 1| resource 2, number 2|…|resource N, number N); receipt field 1= receipt detail list; […]; receipt field N=receipt detail list.&lt;br /&gt;
Message sender format: sender type: sender ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported sender types are:&lt;br /&gt;
&lt;br /&gt;
*0: system; empty ID.&lt;br /&gt;
&lt;br /&gt;
*1: character; ID= character ID.&lt;br /&gt;
&lt;br /&gt;
*2: location; ID= location ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TAG parameter is a random string field TAG used to mark.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive message that meets specific conditions. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTERACTIVE_MSG*message type#sender info#TAG parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message type and TAG parameter can be empty (no type or TAG limit).&lt;br /&gt;
&lt;br /&gt;
Format of sender info: ADD_INTERACTIVE_MSG.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_THIS_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Current Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the current interactive message of the existing environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_THIS_INTERACTIVE_MSG*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.1.3 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_HEADAVATA&lt;br /&gt;
|'''Change Player Painting Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the painting of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_HEADAVATA*character painting ID.&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_MODEL&lt;br /&gt;
|'''Change Player Model Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the model of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_MODEL*model ID.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.2.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_INTVAR_CONFIG&lt;br /&gt;
|'''Show Option Panel of Configurable Custom Int Field'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom field configuration panel in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_INTVAR_CONFIG*mode(0: Create game mode; 1: In-game mode).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_MARKER&lt;br /&gt;
|'''Add or Set Custom Mark on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: add or set a custom mark on the world map. When the mark ID already exists, the older mark info will be covered.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_MARKER*mark ID#title#annotation info #map position info#file name of mark image (this field can be empty; set to be &amp;quot;map_flag&amp;quot; by default; this mark image is a PNG image resource under directory“\BuildSource\map_res\MinimapMakers\”).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_MAP_MARKER&lt;br /&gt;
|'''Remove a Custom Map Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a custom mark on the map with a specific ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_MAP_MARKER*mark ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|RUN_SCRIPT_FUNC&lt;br /&gt;
|'''Execute Function of Specific Lua Script'''&lt;br /&gt;
&lt;br /&gt;
Function: execute the standard function of a specific Lua script.&lt;br /&gt;
&lt;br /&gt;
Format: RUN_SCRIPT_FUNC*file name of the relative directory of script (same as RUN_SCRIPT)#standard function name (the function name in the script; the parameter is the imported environment variable).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_GUI&lt;br /&gt;
|'''Open Custom GUI Form'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom GUI form.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_GUI*GUI pack name#form component name#script file path of the form (relative script root directory “Asset\BuildSource\LuaScripts\”. No file expansions)#form parameter(format: json format. E.g., {&amp;quot;arg1&amp;quot;:&amp;quot;val1&amp;quot;,&amp;quot;arg2&amp;quot;:&amp;quot;val2&amp;quot;})#block directive queue (default 0: Yes; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CONTAINER_GUI&lt;br /&gt;
|'''Open Container GUI'''&lt;br /&gt;
&lt;br /&gt;
Function: open a defined container GUI.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CONTAINER_GUI*container ID (instance ID used to identify)#template info ID (info ID defined in Container Definition Table).&lt;br /&gt;
&lt;br /&gt;
When the parameter list is empty or is “This”, the specific container in the current environment variable (if existed) will be opened. E.g., OPEN_CONTAINER_GUI*THIS.&lt;br /&gt;
|-&lt;br /&gt;
|CONTAINER_CMD&lt;br /&gt;
|'''Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a specific directive for a particular container in the current environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: CONTAINER_CMD*container directive type#parameter 1#parameter 2#...#parameter N&lt;br /&gt;
&lt;br /&gt;
Currently supported collective built-in directive types are:&lt;br /&gt;
&lt;br /&gt;
add_exp: add EXP to all cards in the container. The parameter is the EXP value.&lt;br /&gt;
&lt;br /&gt;
add_items: add a specific element into the container (E.g., the format of the item container is: CONTAINER_CMD*add_items#item 1,10|item 2,5 ；format of the card container is: ID list of cards, separated by “|”).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CONTAINER_CMD&lt;br /&gt;
|'''Location Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: see a location as a container object and execute the same container directives.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CONTAINER_CMD*location ID (when this field is empty or “THIS”, refer to the location assigned by the current environment parameter)#container directive list (same as CONTAINER_CMD parameters).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP&lt;br /&gt;
|'''Set Map Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the visibility of a specific map. &lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP*map ID#status value (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_LUAENV&lt;br /&gt;
|'''Reset Current LUA Environment'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the current environment of LUA script and clear cache; this directive can be used when you need to debug the LUA script but do not want to restart the game.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_LUAENV*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.4.1 or above version'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_ARG_INT&lt;br /&gt;
|'''Set Parameter Value in Current Environment Variable'''&lt;br /&gt;
&lt;br /&gt;
Function: set the int parameter value stored in the environment variable of the current script (correspond to [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ARG_INT*new value#target parameter index (optional;set to be 0 by default; 0~2 correspond to [%arg_int_val1%] ~ [%arg_int_val3%] respectively).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Global Save Directive===&lt;br /&gt;
Global save is a type of saving used to record some data shared by all saves. Data recorded in the global save can be accessed in all saves after being changed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_INTVAR&lt;br /&gt;
|'''Set Custom Int Variable of Global Save''' &lt;br /&gt;
&lt;br /&gt;
Function: set a custom int variable in the global save. The variable, recorded in the global save, can be accessed via the [%global_int:ID%] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_INTVAR*variable ID#current int value.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_GLOBAL_INTVAR&lt;br /&gt;
|'''Change Custom Int Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: change a custom int variable in the global.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_GLOBAL_INTVAR*variable ID#value change (can be a negative number)#minimum value (optional; no limit if this field is empty)#maximum value (optional; no limit if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_STRVAR&lt;br /&gt;
|'''Set Custom String Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom string variable. The variable, recorded in the global save, can be accessed via the [$global_str:ID$] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_STRVAR*variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|PUSH_GLOBAL_ROLES&lt;br /&gt;
|'''Globally Save Character Status'''&lt;br /&gt;
&lt;br /&gt;
Function: save specific character list to the global character status list.&lt;br /&gt;
&lt;br /&gt;
Format: PUSH_GLOBAL_ROLES*custom global save Key#character ID (this character can only be a non-template character).&lt;br /&gt;
|-&lt;br /&gt;
|PULL_GLOBAL_ROLES&lt;br /&gt;
|'''Load Character Status from Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: load the status of specific character list from the global character status list, and apply it to the current game mode.&lt;br /&gt;
&lt;br /&gt;
Format: PULL_GLOBAL_ROLES*custom global save KEY (the character of this KEY must be a character from the character template of the current game mode.&lt;br /&gt;
|-&lt;br /&gt;
|LOCK_CMD_QUEUE&lt;br /&gt;
|'''Lock Current Directive Queue'''&lt;br /&gt;
&lt;br /&gt;
Function: lock the current directive queue. The directive queue will not be cleared after switching from different game saves or resetting the game modes.&lt;br /&gt;
&lt;br /&gt;
Format: LOCK_CMD_QUEUE*lock queue (0: No;1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SWITCH_GAME_MODE&lt;br /&gt;
|'''Switch Game Modes'''&lt;br /&gt;
&lt;br /&gt;
Function: switch to the target game mode and load it.&lt;br /&gt;
&lt;br /&gt;
Format: SWITCH_GAME_MODE*target game mode ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Built-in Directive List===&lt;br /&gt;
Built-in directives are directives used to realize certain functions inside the program, usually for some specific scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|ENCOUNTER&lt;br /&gt;
|'''Creep Encountering UI'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info panel of the creep encountered.&lt;br /&gt;
&lt;br /&gt;
Format: ENCOUNTER*1.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_INFO_DLG&lt;br /&gt;
|'''Chest Guardian Info Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info dialogue of the chest guardian.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_INFO_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_COST_DLG&lt;br /&gt;
|'''Price of Chest Opening Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open a dialogue to show the price of opening a chest.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_COST_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_CALLBACK&lt;br /&gt;
|'''Logic Callback of Chest Opening'''&lt;br /&gt;
&lt;br /&gt;
Function: command a logic callback of chest opening.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_CALLBACK*callback value (1: Defeat the guardian; 2: Opening completed)#target chest ID.&lt;br /&gt;
|}&lt;br /&gt;
===Preset Fields of Scripts and Their Meanings===&lt;br /&gt;
Sometimes we use certain directives to refer to specific objects in script editing. For example, we can use CUR_ROLE to replace the ID of the current character player encountered. We can realize some common application scenarios via script editing. &lt;br /&gt;
&lt;br /&gt;
Currently, supported preset fields are: &lt;br /&gt;
&lt;br /&gt;
*CUR_ROLE: ID of current character template encounter, used primarily for dialogue and selection list box&lt;br /&gt;
*CUR_BATTLE: ID of the battle between player and refreshed unit encountered on the current map&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Script Directive of Results in Scenario Event===&lt;br /&gt;
The format of script directives of results in a scenario event is (separated by a line break): &lt;br /&gt;
 conditional expression group 1: executed command 1&lt;br /&gt;
 conditional expression group 2: executed command 2&lt;br /&gt;
 ...&lt;br /&gt;
 conditional expression group N: executed command N&lt;br /&gt;
Execute the command: judge conditional expression group 1 first, if the conditions are met, execute command 1. Otherwise, judge conditional expression group 2……judge all listed groups until one group of conditions is met, or all conditions are not met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Conditional Expression Group===&lt;br /&gt;
A conditional expression group consists of multiple conditional expression like “[%CONDITION%][=]1”, and the expressions are connected by “|” (Or) or “&amp;amp;” (And). '''The priority of “&amp;amp;” (And) is higher than “|” (Or)'''. When both sides of the expression are integer characters, return the comparison result of the two values. Otherwise, compare the strings, and only [=] and [&amp;lt;&amp;gt;] judgements are supported.&lt;br /&gt;
&lt;br /&gt;
For example:  &lt;br /&gt;
&lt;br /&gt;
 [%result_code%][=]1|[%player_money%][&amp;gt;=]100 means “execute when the result is 1 or when the player has 100 utars”.&lt;br /&gt;
 [%player:level%][&amp;gt;=]3&amp;amp;[%player_money%][&amp;gt;]100 means “execute when player’s level is 3 or above, and they have more than 100 utars”.&lt;br /&gt;
&lt;br /&gt;
'''The followings are the comparison symbols in conditional expressions:'''&lt;br /&gt;
&lt;br /&gt;
*[=]: equal&lt;br /&gt;
*[&amp;gt;]: larger than&lt;br /&gt;
*[&amp;gt;=]: greater than or equal to&lt;br /&gt;
*[&amp;lt;]: less than&lt;br /&gt;
*[&amp;lt;=]: less than or equal to&lt;br /&gt;
*[&amp;lt;&amp;gt;]: not equal to&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game Data Calculation Expression System===&lt;br /&gt;
We can embed some value expressions like “[&amp;amp;expression&amp;amp;]” in many places in the game (e.g., the status value of the BUFF list)&lt;br /&gt;
&lt;br /&gt;
In value expression, the basic mathematic calculation is supported. Currently, supported calculation symbols are: &lt;br /&gt;
&lt;br /&gt;
*+: addition&lt;br /&gt;
*-: subtraction&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;*: multiplication&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*/: division&lt;br /&gt;
*%: modulo (take the remainder)&lt;br /&gt;
*^: exponentiation&lt;br /&gt;
*( ) : change the priority of calculation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the expression takes the @func(expression1, expression2...) format, call the relevant built-in function to return the calculation result. Currently supported built-in functions are (note: these built-in functions are can only be used in the calculation of the most external layer): &lt;br /&gt;
&lt;br /&gt;
*@min(a,b): return the smaller value between a and b&lt;br /&gt;
*@max(a,b): return the greater value between a and b&lt;br /&gt;
&lt;br /&gt;
E.g., in a specific piece of data, [&amp;amp;1+2*3&amp;amp;] will be replaced by 7, [&amp;amp;@max(1+2*3, 8)&amp;amp;] will be replaced by 8, [&amp;amp;@min(1+2*3, 8)&amp;amp;] will be replaced by 7……&lt;br /&gt;
&lt;br /&gt;
'''Please note: for scripts and skill directives in battles, you can use the “[@expression@]” format to embed some expressions to return a decimal result.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Embedded Query Directive in Scenario Event===&lt;br /&gt;
There are many places in the game that support embedded query directives, through which we can insert values or query result of the string type in texts or conditional expressions. All embedded query directives follow the format of [%QUERY:arg1:arg2...%] or [$QUERY:arg1:arg2...$] (these two formats are the same) to insert to the target position.&lt;br /&gt;
&lt;br /&gt;
'''Note: currently you cannot re-embed a query directive in a query.'''&lt;br /&gt;
&lt;br /&gt;
Currently, supported query directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Return the last directive result that can cause “return” in the current event (E.g., an option that stands for “return” of the selection list box, input value and battle result, in the script of scenario events).&lt;br /&gt;
Following are the different meanings of result_code in various directive types. &lt;br /&gt;
&lt;br /&gt;
*It means the option ID when returning from the selection list box.&lt;br /&gt;
*When returning after battles:  0: Battle won; 1: Battle failed.&lt;br /&gt;
*It means the input number when returning for an integer input box.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_num%]&lt;br /&gt;
|Return an integer. (0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_range:A:B%]&lt;br /&gt;
|Return a random number that is greater than A but smaller than B.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the random number that was generated last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|The amount of the player’s money.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_wood%]&lt;br /&gt;
|The amount of the player’s wood.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_iron%]&lt;br /&gt;
|The amount of player’s ironstone.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_jade%]&lt;br /&gt;
|The amount of player’s jade.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_food%]&lt;br /&gt;
|Player’s current Hunger.&lt;br /&gt;
|-&lt;br /&gt;
|[%game_time%]&lt;br /&gt;
|Number of in-game days currently.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_night%]&lt;br /&gt;
|Judge whether it is nighttime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_daytime%]&lt;br /&gt;
|Judge whether it is daytime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%mod_day:MOD%]&lt;br /&gt;
|Number of the in-game day divided by MOD, take the remainder&lt;br /&gt;
|-&lt;br /&gt;
|[%generate_rob_money%]&lt;br /&gt;
|Generate the amount of money when the player is robbed under the current level.&lt;br /&gt;
|-&lt;br /&gt;
|[%rob_money%]&lt;br /&gt;
|Generate the amount of money when the player was robbed last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_ts:ID%]&lt;br /&gt;
|Return the current status of a trigger (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es:ID%]&lt;br /&gt;
|Return the current status of a scenario event (-1: Not executed; otherwise, return Result Code).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_first_time:ID%]&lt;br /&gt;
|Return the first completion time of a scenario event.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_time_score:ID:minTime:maxTime:maxScore%]&lt;br /&gt;
|Return the first completion time score of a scenario event. minTime is the shortest completion time (time before the shortest time brings a full score); maxTime is the longest completion time (time before the longest time brings a zero score); maxScore is the highest score.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val:ID%]&lt;br /&gt;
|Return the custom int value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val_for_calc:ID%]&lt;br /&gt;
|Return the custom int value, whose numbering is its ID, to calculate. There must a result. If the ID does not exist, the result is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%str_val:ID%]&lt;br /&gt;
|Return the custom string value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_num%]&lt;br /&gt;
|The current number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_max%]&lt;br /&gt;
|Maximum number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_name:兵种key%]&lt;br /&gt;
|Return the name of a certain minion.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a certain item in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag:tag%]&lt;br /&gt;
|Return the number of an item with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag_and_level:tag:level%]&lt;br /&gt;
|Return the number of an item, whose item level &amp;gt;= level, with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_qualify_as_present:present_desc%]&lt;br /&gt;
|Return the number of a certain item whose gift description string meets requirements in the player’s bag. For the format of gift description string, please see the “Like” format in the Tag column of “人物列表”(Character Table) (Excel).&lt;br /&gt;
|-&lt;br /&gt;
|[%item_name:物品ID%]&lt;br /&gt;
|Return the displayed name of an item.&lt;br /&gt;
|-&lt;br /&gt;
|[%admin_level%]&lt;br /&gt;
|Return the administration status of the player in the current location (0: None; 1: Appointed; 2: City ruler; 3: Faction leader).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; take a rounding integer number after (current time-ID time)).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse_by_day:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; (current day- the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current time-ID time) and take the rounding integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse_by_day%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current day-the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_custom_cd:ID%]&lt;br /&gt;
|Return the result of whether a custom cooldown (whose numbering is its ID) is ready (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%has_gametime_elapse_tag:ID%]&lt;br /&gt;
|Query whether the custom game time ID mentioned above exists (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%realtime_elapse:ID%]&lt;br /&gt;
|Return the realistic period since the setting of last custom time point ID (count by second).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID%]&lt;br /&gt;
|Return the status of specific mission ID (0: Unclaimed; 1: Ongoing; 2: Unfinished; 3: Ended).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID:index%]&lt;br /&gt;
|Return the subevent value of specific mission ID (index is the subevent’s sequence number starting from 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_flag:ID%]&lt;br /&gt;
|Return the current value of a completion mark; return -1 if there is no such a value.&lt;br /&gt;
|-&lt;br /&gt;
|[%camp_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_player_triggered_encounter%]&lt;br /&gt;
|Check if an encounter chat is started by player manually (0: No; 1: Yes) (if the player is caught up by other units, the value is 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%place_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target location.&lt;br /&gt;
|-&lt;br /&gt;
|[%arg_int_val1%]&lt;br /&gt;
[%arg_int_val2%]&lt;br /&gt;
&lt;br /&gt;
[%arg_int_val3%]&lt;br /&gt;
|Value parameter 1, 2, and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buffs%]&lt;br /&gt;
|Return the number of global BUFFs of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_battle_res%]&lt;br /&gt;
|Return the battle result of last battle (0: Victory; 1: Loss; 2: Retreatment).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_dungeon_res%]&lt;br /&gt;
|Last dungeon result (0: Exited; 1: Passed; 2: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff:ID%]&lt;br /&gt;
|Query whether the current squad has a global BUFF of the target ID. Return 1 if such a BUFF exists.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff_c:CLASS%]&lt;br /&gt;
|Query the number of global BUFFs whose type are CLASS of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_stat:STAT_FILED%]&lt;br /&gt;
|Return the current value (whose field is STAT_FILED) of the current squad status.&lt;br /&gt;
|-&lt;br /&gt;
|[%has_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return 1; otherwise, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return the relevant value; otherwise, return null.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_place_id:CAMP_ID%]:&lt;br /&gt;
|Return the ID of a random location that is controlled by a faction. IF there is no camp_id, return an ID of a location controlled by the player’s faction.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_id%]&lt;br /&gt;
|Return the ID of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_name%]&lt;br /&gt;
|Return the name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_map_name%]&lt;br /&gt;
|Return the map name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products%]&lt;br /&gt;
|Return the Production list of the current location (follow the format of GETITEMS).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products_name%]&lt;br /&gt;
|Return the Production description of the current location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_has_products%]&lt;br /&gt;
|Check if the current location has production (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_items%]&lt;br /&gt;
|Return the item list of the last item selection directive (ITEMS_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles%]&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Return the character list of the last character selection directive (ROLES_SELECTOR) (Note: this method cannot be used in conditional expression groups since the result returned contains “|” when multiple characters are selected; you can use [%last_seled_roles_count%] instead to judge).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles_count%]&lt;br /&gt;
|Return the number of selected characters of the last character selection directive (ROLES_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%weather:ID%]&lt;br /&gt;
|Query the current value of the specific weather effect (with specific ID) on the current map.&lt;br /&gt;
|-&lt;br /&gt;
|[%monster_news:X:Y%]&lt;br /&gt;
|Query the info of creeps near coordinate (X, Y) on the current map. X and Y will be the default position of the player if left empty.&lt;br /&gt;
|-&lt;br /&gt;
|[%attack_intend_code%]&lt;br /&gt;
|Query the attack intension of units encountered on the current map.&lt;br /&gt;
&lt;br /&gt;
Please see: MuUnitBase.IntendToAttack&lt;br /&gt;
|-&lt;br /&gt;
|[%place_randmom_pos%]&lt;br /&gt;
|Query a random position near a location. Output specific strings. E.g., Sandbox Redstone Keep: 123, 123.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_role_relation%]&lt;br /&gt;
|Relationship between the input parameter and tag character/location.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_city_relation%]&lt;br /&gt;
|Relationship between Tag character and input character&lt;br /&gt;
|-&lt;br /&gt;
|[%result_val%]&lt;br /&gt;
|Query the curResultVal value of the current environment variable.&lt;br /&gt;
|-&lt;br /&gt;
|[$player:INFO$]&lt;br /&gt;
[$tagrole:INFO:ID$]&lt;br /&gt;
|Query a specific info field of player/ specific character (tag character) When it is tag character, and ID field does not exist, return the query result of the interactive object. &lt;br /&gt;
INFO can be:  &lt;br /&gt;
&lt;br /&gt;
*id: character ID.&lt;br /&gt;
&lt;br /&gt;
*name: character name.&lt;br /&gt;
&lt;br /&gt;
*level: character level.&lt;br /&gt;
&lt;br /&gt;
*job_type: job types (0: Citizen; 1: Faction member; 2: city ruler; 3: Faction leader).&lt;br /&gt;
&lt;br /&gt;
*campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
*campname: faction name.&lt;br /&gt;
&lt;br /&gt;
*campleaderid: faction leader ID.&lt;br /&gt;
&lt;br /&gt;
*campleadername: faction leader name.&lt;br /&gt;
&lt;br /&gt;
*campleader: nickname of faction leader.&lt;br /&gt;
&lt;br /&gt;
*fame_val: personal prestige.&lt;br /&gt;
&lt;br /&gt;
*maxhp: max hp.&lt;br /&gt;
&lt;br /&gt;
*maxmp: max mana.&lt;br /&gt;
&lt;br /&gt;
*job_cityid: job assignment location ID.&lt;br /&gt;
&lt;br /&gt;
*job_cityname: job assignment location name.&lt;br /&gt;
&lt;br /&gt;
*state: current status (0: Normal; 1: Captured; -1: Dead).&lt;br /&gt;
&lt;br /&gt;
*is_recruitable: recruitable (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*is_leave_team_enable: able to leave squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*recruit_val: current recruitable mark (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*inteam: if the character is in the player’s squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep: player’s prestige in the target faction.&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep_desc: player’s prestige description in the target faction.&lt;br /&gt;
&lt;br /&gt;
*fv: friendliness with the player.&lt;br /&gt;
&lt;br /&gt;
*player_relation_score: assessment on overall favour on the player.&lt;br /&gt;
&lt;br /&gt;
*weapon_tag= (custom tag field): query the specific tag on equipment and weapons. If there is no such a tag or the weapon does not exist, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*skill_level= (skill ID): query the current level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_maxlevel= (skill ID): query the maximum level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_exp= (skill ID): query the current EXP of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_upexp= (skill ID): query the amount of EXP needed for a character’s target skill to level up.&lt;br /&gt;
&lt;br /&gt;
*statu= (custom ID): query the value of the corresponding ID in the Character Attribute Table. If there is no value, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*statu_int= (custom ID): 0 query the int value of the corresponding ID in the Character Attribute Table. If there is no value, return 0.&lt;br /&gt;
&lt;br /&gt;
*has_girl_friend: [player only] check if the player has a girlfriend (1: Yes; 2: No).&lt;br /&gt;
&lt;br /&gt;
*current_girl_friend_name: [player only] girlfriend’s name.&lt;br /&gt;
&lt;br /&gt;
*girl_friend=character ID: [player only] check if someone is a player’s girlfriend.&lt;br /&gt;
&lt;br /&gt;
*is_female: check if someone is a female character (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
*available_quest: available missions.&lt;br /&gt;
|-&lt;br /&gt;
|[$called:call1:call2$]&lt;br /&gt;
|How NPC addresses player (the player’s character is male: call1; female: call2).&lt;br /&gt;
|-&lt;br /&gt;
|[$null$]&lt;br /&gt;
|Replaced by an empty string.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagtype$]&lt;br /&gt;
|Trigger object type of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagid$]&lt;br /&gt;
|Trigger object ID of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$input_str$]&lt;br /&gt;
|The input result of the last input box.&lt;br /&gt;
|-&lt;br /&gt;
|[$argvs:INDEX$]&lt;br /&gt;
|Query currently additional parameter info, starting from 0 (used to fill in the parameter of a random event).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagplace:INFO:ID$]&lt;br /&gt;
|Query info of a location; query the current location if the ID field does not exist.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: location ID.&lt;br /&gt;
&lt;br /&gt;
· name: location name.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· mapid: map ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· prosperity: location prosperity. &lt;br /&gt;
&lt;br /&gt;
· defence: location defence &lt;br /&gt;
&lt;br /&gt;
· rep: location friendliness.&lt;br /&gt;
&lt;br /&gt;
· security: location security.&lt;br /&gt;
&lt;br /&gt;
· size: location size.&lt;br /&gt;
&lt;br /&gt;
· lord_id: city ruler ID.&lt;br /&gt;
&lt;br /&gt;
· lord_name: city ruler name.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom field.&lt;br /&gt;
&lt;br /&gt;
· is_stronghold: if this location is a base (a location for troops to the garrison).&lt;br /&gt;
&lt;br /&gt;
· is_weekhold: a resource point that does not allow the garrison.&lt;br /&gt;
&lt;br /&gt;
· is_couldoccupy: if this location can be occupied.&lt;br /&gt;
&lt;br /&gt;
· is_couldraid: if this location can be raided.&lt;br /&gt;
&lt;br /&gt;
· is_inwar: if this location is being attacked.&lt;br /&gt;
&lt;br /&gt;
· is_raided: if this location has been raided (recovering).&lt;br /&gt;
&lt;br /&gt;
· is_subplace: if this place has been occupied. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain a specific status value of the current location.&lt;br /&gt;
&lt;br /&gt;
· building= (specific facility ID): query the number of facilities of a building with specific ID in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· r_building= (specific facility ID): query the number of facilities of a building with a specific ID (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· r_building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· custom_int= (custom field ID): obtain the int value of the custom field of the current location.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally)&lt;br /&gt;
&lt;br /&gt;
· func_map= (specific field KEY): query a field of the corresponding directive event mapping table. E.g., func_map= hire list.&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in where they are currently staying. &lt;br /&gt;
&lt;br /&gt;
· hire_states: query the recruitment status of the current location.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the player’s current position and the target position. If the target is unreachable, return -1.&lt;br /&gt;
&lt;br /&gt;
· project_count: the number of projects under construction. &lt;br /&gt;
&lt;br /&gt;
· project_max: the maximum number of projects under construction currently.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmap:INFO:ID$]&lt;br /&gt;
|Query tile info on a map:&lt;br /&gt;
&lt;br /&gt;
· id: tile id.&lt;br /&gt;
&lt;br /&gt;
· name: tile name.&lt;br /&gt;
&lt;br /&gt;
· dominant_camp: if there is an overall dominating faction, return the name of the faction; otherwise, return null.&lt;br /&gt;
&lt;br /&gt;
· dominant_camps= (custom field ID): if there are only several factions with specific IDs existing, return 1; otherwise, return 0; format of custom field: faction 1#faction 2#faction 3.&lt;br /&gt;
&lt;br /&gt;
· camp_place_count= faction ID: return the number of bases owned by a specific faction on this tile.&lt;br /&gt;
&lt;br /&gt;
· ExploreInfo= Info ID: query the value of an exploration map info.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbuilding:INFO$]&lt;br /&gt;
|Query info of the current target building&lt;br /&gt;
&lt;br /&gt;
· id: building ID.&lt;br /&gt;
&lt;br /&gt;
· name: name.&lt;br /&gt;
&lt;br /&gt;
· inner_id: built-in location ID of the target building.&lt;br /&gt;
&lt;br /&gt;
· type: building type.&lt;br /&gt;
&lt;br /&gt;
· level: building level.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return value of a specific custom filed.&lt;br /&gt;
&lt;br /&gt;
· container_id: scenario ID of the container bound to this building.&lt;br /&gt;
&lt;br /&gt;
· container_info: info ID of the container bound to this building.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagwb:INFO$]&lt;br /&gt;
|Query the info of current skirmish.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: battle ID.&lt;br /&gt;
&lt;br /&gt;
· camp_a: faction ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· camp_b: faction ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· leader_a: leader ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· leader_b: leader ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· camp_a_rl: the relationship between squad A and the player’s faction &lt;br /&gt;
&lt;br /&gt;
· camp_b_rl: the relationship between squad B and the player’s faction.&lt;br /&gt;
&lt;br /&gt;
· teamname_a: faction name and hero names of squad A.&lt;br /&gt;
&lt;br /&gt;
· teamname_b: faction name and hero names of squad B.&lt;br /&gt;
&lt;br /&gt;
· seige_time: current siege preparation time (if it is a siege battle) (count by day).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagteam:INFO(:QUERY_INFO)$]&lt;br /&gt;
[$playerteam:INFO$]&lt;br /&gt;
|Query info of the current encountered team (tagteam)/player’s team (playerteam).&lt;br /&gt;
&lt;br /&gt;
When querying tag team, you can choose a specific query parameter. If this parameter is set, only info of the query target will be returned.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: squad ID.&lt;br /&gt;
&lt;br /&gt;
· is_active: check if the current squad status is normal; return 1 if it is normal.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· state_num: StateNum value of the current squad.&lt;br /&gt;
&lt;br /&gt;
· from_id: ID of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· from_name: name of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· lifetime: period since the squad is established (day).&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and character faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· max_attr_lv=attribute field ID: the highest value of a certain attribute of all characters in the squad.&lt;br /&gt;
&lt;br /&gt;
· exist_role= character ID: check if there is a specific character ID in the squad (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
· role_vacancy: available hero slots in squad.&lt;br /&gt;
&lt;br /&gt;
· soldier_vacancy: available minion slot in the squad.&lt;br /&gt;
&lt;br /&gt;
· map_info: current map info.&lt;br /&gt;
&lt;br /&gt;
· tag: return the TAG of the squad. &lt;br /&gt;
&lt;br /&gt;
· is_defeated: check if the squad is dismissed because they are defeated (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· defeated_by: ID of the faction which defeated the squad.&lt;br /&gt;
&lt;br /&gt;
QUERY_INFOformat: [query type]=[query target] E.g.,: leader=ROLE_ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported query types are:&lt;br /&gt;
&lt;br /&gt;
· bind_id: bound info ID. When the squad type is creep or dummy, the ID is the creep/dummy ID; otherwise, it is the leader ID.&lt;br /&gt;
&lt;br /&gt;
· leader: squad leader ID.&lt;br /&gt;
&lt;br /&gt;
· tag: TAG mark of the squad (used for squad created by the CREATE_TEAM directive).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcamp:INFO:ID$]&lt;br /&gt;
|Query info of the target faction. When the ID does not exist, query info of the current faction. INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· leaderid: ruler ID.&lt;br /&gt;
&lt;br /&gt;
· leadercalled: nickname of faction ruler. &lt;br /&gt;
&lt;br /&gt;
· lands_count: number of bases of the current faction.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· camp_rl_value: the actual number of favour between the target faction and player’s faction. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain the specific status value of the current faction.&lt;br /&gt;
&lt;br /&gt;
· buff= (Target BUFF ID): query if a specific BUFF of the current faction exists (1: Yes).&lt;br /&gt;
&lt;br /&gt;
· buff_c= (BUFF type): query the number of BUFFs of specific types of the current faction.&lt;br /&gt;
&lt;br /&gt;
· active_state: project status of target faction (0: Inactive; 1: Active).&lt;br /&gt;
&lt;br /&gt;
· is_story_camp: if this is a scenario faction (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in this faction. &lt;br /&gt;
&lt;br /&gt;
· attitude: faction’s attitude towards the player (0: Normal; -1: Wanted; -2: At war).&lt;br /&gt;
&lt;br /&gt;
· is_fall: if a faction is eliminated (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzar:INFO$]&lt;br /&gt;
|Query current bazaar info imported by the system.&lt;br /&gt;
&lt;br /&gt;
· start_day: number of days of the beginning of the bazaar.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzarItem:INFO:bazzarID:merchantID$]&lt;br /&gt;
|Query info of items bought/sold by a merchant in a bazaar.&lt;br /&gt;
&lt;br /&gt;
· item_desc: item description (detailed).&lt;br /&gt;
&lt;br /&gt;
· item_desc_short: item description (simple).&lt;br /&gt;
&lt;br /&gt;
· item_buy_price: buy-in price of the item. &lt;br /&gt;
&lt;br /&gt;
· item_sell_price: sell-out price of the item. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproduct:INFO:ID$]&lt;br /&gt;
|Query info of a speciality. Query info of the current speciality if the ID is left empty.&lt;br /&gt;
&lt;br /&gt;
· item_name: item name. &lt;br /&gt;
&lt;br /&gt;
· item_id: item id.&lt;br /&gt;
&lt;br /&gt;
· item_level: item level.&lt;br /&gt;
&lt;br /&gt;
· item_price: single fair value of the item.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the central position of the speciality and the current position of the player (-1: the central position is unreachable). &lt;br /&gt;
&lt;br /&gt;
· place_include=location ID: when the item is not sold in the specific location, return 0; if it is being sold, return 1. &lt;br /&gt;
&lt;br /&gt;
· place_include_tagQuestPlace: automatically use the currently imported info of mission location.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagquest:INFO:ID$]&lt;br /&gt;
|Query Mission Info&lt;br /&gt;
&lt;br /&gt;
status: 0: Unclaimed; 1: Ongoing; 2: Completed; 3:Time limit exceeded (receive punishment); 4: Time limit exceeded (wait to claim rewards automatically) 5: 已Ended.&lt;br /&gt;
|-&lt;br /&gt;
|[$arg_str_val1$]&lt;br /&gt;
[$arg_str_val2$]&lt;br /&gt;
&lt;br /&gt;
[$arg_str_val3$]&lt;br /&gt;
|String parameters 1, 2 and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$]&lt;br /&gt;
|Enumerate numbers randomly and return a RES value according to the probability distribution. E.g., [%rnd_enum:25,A:40,B:35,C%] means there is a 25% chance to return “A”, 40% to return “B” and 35% to return “C”.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagitem:INFO$]&lt;br /&gt;
|Query info of the current item. INFO can be: &lt;br /&gt;
&lt;br /&gt;
· id: item ID.&lt;br /&gt;
&lt;br /&gt;
· name: item name.&lt;br /&gt;
&lt;br /&gt;
· count: item number.&lt;br /&gt;
&lt;br /&gt;
· group_n: maximum number of stacks.&lt;br /&gt;
&lt;br /&gt;
· quality: item quality.&lt;br /&gt;
&lt;br /&gt;
· level: item level.&lt;br /&gt;
&lt;br /&gt;
· main_type:  main item type.&lt;br /&gt;
&lt;br /&gt;
· sub_type: item sub-type.&lt;br /&gt;
&lt;br /&gt;
· equip_type: equipment type.&lt;br /&gt;
&lt;br /&gt;
· gendays:  period (day) since the production date.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom filed. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproject:INFO:ID$]&lt;br /&gt;
|Query project info. Read from the specific ID of SET_TEMP_ID if the ID field is left empty.&lt;br /&gt;
&lt;br /&gt;
· id: project id.&lt;br /&gt;
&lt;br /&gt;
· state: project status (works only in group events) (0: Not started; 1: Ongoing; 2: Completed).&lt;br /&gt;
&lt;br /&gt;
· showPlaceName: project location description.&lt;br /&gt;
&lt;br /&gt;
· showProjectName: project name.&lt;br /&gt;
&lt;br /&gt;
· roles: all characters involved in the current project.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagunit:INFO$]&lt;br /&gt;
|Query info of the current target minion.&lt;br /&gt;
&lt;br /&gt;
· id: unit id.&lt;br /&gt;
&lt;br /&gt;
· name: unit name.&lt;br /&gt;
&lt;br /&gt;
· level: unit level.&lt;br /&gt;
&lt;br /&gt;
· statu= (custom ID): query the value of the corresponding ID in the Unit Attribute table.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcard:INFO$]&lt;br /&gt;
|Query info of a specific card.&lt;br /&gt;
&lt;br /&gt;
· id: bound id of the card.&lt;br /&gt;
&lt;br /&gt;
· name: displayed name of the card.&lt;br /&gt;
&lt;br /&gt;
· lv: card level.&lt;br /&gt;
&lt;br /&gt;
· recruit_name: displayed name with recruitment info of the card. &lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific Tag field of the card.&lt;br /&gt;
&lt;br /&gt;
· has_tag= (KEY of custom expansion field): query if there is a particular Tag field of card (1: Yes; 0: No).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$save_version$]&lt;br /&gt;
|Return the version number of when the current game save is created.&lt;br /&gt;
|-&lt;br /&gt;
|[$version_compare:TAG_VERSION$]&lt;br /&gt;
|Compare the version number of when the current game save is created with TAG_VERSION; if the former version is higher than TAG_VERSION, return 1; when equal, return 0; when lower, return -1.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmsg:INFO$]&lt;br /&gt;
|Query info of the current interactive messages.&lt;br /&gt;
&lt;br /&gt;
· title: title&lt;br /&gt;
&lt;br /&gt;
· content: message content&lt;br /&gt;
&lt;br /&gt;
· arg=(field KEY): query the parameter of the KEY in the custom parameter table&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下查询需要游戏版本高于0.7.4.1&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_str:KEY$]&lt;br /&gt;
|Return the string value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_int:KEY$]&lt;br /&gt;
|Return the int value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[%envoy_enable%]&lt;br /&gt;
|Return the status of whether the envoy of the player’s faction is available.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Directive Field of Global Save Query===&lt;br /&gt;
These are used to query some directives in the global save.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%global_int:ID%]&lt;br /&gt;
|Return the value of global int field ID　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|[$global_str:ID$]&lt;br /&gt;
|Return the value of global string field ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Built-in Global Variable Field===&lt;br /&gt;
&lt;br /&gt;
Following are key fields of a built-in global variable: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Filed KEY'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|save_max_hard_level&lt;br /&gt;
|The greatest difficulty has been unlocked. Set to be 0 by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Built-in Custom Variable Field===&lt;br /&gt;
&lt;br /&gt;
You can use directives like SETINTVAR and CHANGEINTVAR to change and save the built-in custom variable of the system. Different variables have a different function.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|system_探索地图点数&lt;br /&gt;
|Morale.　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|system_星星&lt;br /&gt;
|The number of stars.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色血量百分比&lt;br /&gt;
|When the player is fighting an enemy the extra hp multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色攻击百分比&lt;br /&gt;
|When the player is fighting an enemy, the extra physical/magic attack multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|config_ai_level&lt;br /&gt;
|The intensity level of AI (0: Easy; 1: Normal; 2: Difficult).&lt;br /&gt;
|-&lt;br /&gt;
|config_roll_limit&lt;br /&gt;
|Enable Roll Limit in battles 0: Disabled; 1: Enabled (By enabling the Roll Limit, there will be a CD and limit of rolling times).&lt;br /&gt;
|-&lt;br /&gt;
|config_hunger_penalty&lt;br /&gt;
|Enable Hunger Debuff 0: Disabled 1: Enabled (By enabling the Hunger Debuff, the movement of the player’s squad will be influenced when in hunger).&lt;br /&gt;
|-&lt;br /&gt;
|config_upgrade_cost_reduce&lt;br /&gt;
|EXP and materials needed to upgrade the current unit after discount (0~100 percentage; set to be 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|config_soldier_dead_scale&lt;br /&gt;
|A multiplier of death probability of the current minion (percentage; set to be 100 by default, final death probability = basic death probability *(config_soldier_dead_scale/100)).&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|config_project_concurrent&lt;br /&gt;
|Maximum cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
===Built-in Field in Initial Setting Table===&lt;br /&gt;
&lt;br /&gt;
In the initial setting table, we can configure some initial fields that have actual functions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|'''Default Value'''&lt;br /&gt;
|-&lt;br /&gt;
|init_pos&lt;br /&gt;
|Default info of respawning location.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_statu&lt;br /&gt;
|Default attribute status info when the player respawns.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_money&lt;br /&gt;
|Default initial property.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|home_place&lt;br /&gt;
|Default initial location ID.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skillpages&lt;br /&gt;
|Initially enabled skill page (format: see SET_SKILLPAGE directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skills&lt;br /&gt;
|Initial skill page of the player (format: see GETSKILL directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_equip&lt;br /&gt;
|Initial equipment list info of the player.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_camp_rl&lt;br /&gt;
|Initial faction relationship list. Format:&lt;br /&gt;
&lt;br /&gt;
Faction A, faction B, relationship, friendliness (-100~100)| faction A, faction C, relationship, friendliness(-100~100)|...|faction N, faction N, relationship, friendliness(-100~100).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unchanged_diplomatic_relationship&lt;br /&gt;
|Unable to change the relationships between factions dynamically? (0: Yes; 1: No).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|gametime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second).&lt;br /&gt;
|0.01&lt;br /&gt;
|-&lt;br /&gt;
|battletime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second), when this coefficient is 0, the time in skirmish or siege battles will stop.&lt;br /&gt;
|0.005&lt;br /&gt;
|-&lt;br /&gt;
|no_card_auto_supply&lt;br /&gt;
|Card durability cannot restore automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|drop_card_when_no_durability&lt;br /&gt;
|When card durability becomes 0 in this mode, the card will disappear.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|enable_card_upgrade&lt;br /&gt;
|Enable card upgrading.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|equipment_loss_durability&lt;br /&gt;
|The equipment has durability.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|levelup_exp_scale&lt;br /&gt;
|Level up EXP multiplier.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|seige_time&lt;br /&gt;
|Basic preparation time for siege battle (day). Preparation time = basic time + Weapons degree* coefficient of extra time per Weapons degree (the siege_time_per_armvalue feild).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|siege_time_per_armvalue&lt;br /&gt;
|The coefficient of extra time per weapon degree when preparing for a siege battle.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|project_time_scale&lt;br /&gt;
|The proportion of project time. &amp;lt;1: shorten time; &amp;gt;1: extend time.&lt;br /&gt;
|0.99&lt;br /&gt;
|-&lt;br /&gt;
|dailyIncomeScale&lt;br /&gt;
|The multiplier of daily city resource income.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|recruit_cost_scale&lt;br /&gt;
|The multiplier of the cost of recruitment/supply/upgrade/chest opening.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|building_cost_scale&lt;br /&gt;
|The multiplier of the cost of building construction/other projects.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|custom_intval_watcher&lt;br /&gt;
|Default custom variable field of the monitor (same as the ADD_INTVAL_WATCHER directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|show_star_info&lt;br /&gt;
|Show prestige (star).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_add_exp_per_period&lt;br /&gt;
|Cardinal number of daily AI soldier (units from other factions) EXP increase.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|team_role_count_base&lt;br /&gt;
|The basic number of character slot each squad.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
|team_role_max&lt;br /&gt;
|Maximum number of character slot each squad.&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|team_card_count_base&lt;br /&gt;
|The basic number of minion slot each squad.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|team_card_max&lt;br /&gt;
|Maximum number of minion slot each squad.&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_resource_scale&lt;br /&gt;
|Resource multiplier of AI recruitment.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_build_resource_scale&lt;br /&gt;
|Resource multiplier of AI construction.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_upgrade_resource_scale&lt;br /&gt;
|Resource multiplier of AI minion upgrading.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_highlevel_upgrade_average_days&lt;br /&gt;
|AI simulation of upgrading minions when the player’s level is high (expected number of days).&lt;br /&gt;
&lt;br /&gt;
The higher this value is, the slower AI upgrades a type of minion.&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ai_auto_balance_resource&lt;br /&gt;
|If AI will balance each kind of resources automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_invade_prob&lt;br /&gt;
|Coefficient of AI invasion probability (0~1) The closer to 1, the more likely AI will invade.&lt;br /&gt;
|0.8&lt;br /&gt;
|-&lt;br /&gt;
|invasion_destroy_factor&lt;br /&gt;
|Destruction rate after invasion or occupation. Format:&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 1: probability 1.&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 2: probability 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility N: probability N.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
1:50&lt;br /&gt;
&lt;br /&gt;
2:30&lt;br /&gt;
&lt;br /&gt;
3:10&lt;br /&gt;
&lt;br /&gt;
4:5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|monster_move_speed_random&lt;br /&gt;
|Correction range of random creep movement speed of creep emitter (0.75 at most).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|soldier_battle_killed_prob&lt;br /&gt;
|The basic casualty of the soldiers. The probability of soldiers being poorly wounded after losing a battle.&lt;br /&gt;
|0.2&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_battle_killed_prob&lt;br /&gt;
|Death probability of AI troops after losing a battle.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_hero_free&lt;br /&gt;
|AI recruits heroes for free&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed&lt;br /&gt;
|Basic movement speed of squads.&lt;br /&gt;
|240&lt;br /&gt;
|-&lt;br /&gt;
|monster_min_movespeed&lt;br /&gt;
|Minimum movement speed of creeps.&lt;br /&gt;
|150&lt;br /&gt;
|-&lt;br /&gt;
|caravan_move_speed_range&lt;br /&gt;
|Range of movement speed of Caravans. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|farmers_move_speed_range&lt;br /&gt;
|Range of movement speed of farmers. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed_range&lt;br /&gt;
|Range of movement speed of troops. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|global_move_speed_range&lt;br /&gt;
|Range of global movement speed. Format: min speed, max speed. &lt;br /&gt;
&lt;br /&gt;
This value influences all movable units on all maps.&lt;br /&gt;
|20,400&lt;br /&gt;
|-&lt;br /&gt;
|battle_gain_money_scale&lt;br /&gt;
|Scale coefficient of obtaining money in battles.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment&lt;br /&gt;
|If NPC will drop weapons (0: No; 1: Yes).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment_prob&lt;br /&gt;
|Probability of NPC dropping weapon.&lt;br /&gt;
|0.15&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_soldier&lt;br /&gt;
|Probability of each group of soldiers dropping food.&lt;br /&gt;
|0.1&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_hero&lt;br /&gt;
|Probability of each hero dropping food.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|hungry_fail_days&lt;br /&gt;
|Failed after being hungry for a certain number of days.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.2.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|ai_dailyfight_period&lt;br /&gt;
|The period between each AI compulsory invasion checks &amp;lt;=0: Disable the check (this logic is different from default AI invasion check；the default parameter (in-game day) is 5 before version 0.7.2.1) In addition, this check will be influenced by AI intensity from this version.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_active_level_default&lt;br /&gt;
|Default AI intensity level, which influences the default value of the custom filed of config_ai_level.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_roll_limit&lt;br /&gt;
|Whether to enable Roll Limit by default. This influences the default value of the custom field of config_roll_limit.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_hunger_penalty&lt;br /&gt;
|Whether to enable Hunger Debuff. This influences the default value of the custom field of config_hunger_penalty.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_seige_battlemap&lt;br /&gt;
|Default map ID of siege battle.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.3.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|init_inventory_capicity&lt;br /&gt;
|Default cardinal number of initial bag capacity.&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|def_project_concurrent&lt;br /&gt;
|Default cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.4.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_wanted_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “Wanted” of a faction (when player’s prestige is lower than “Wanted” but has not reached the “At War” status, the player will not be attacked by squads of this faction in the wild, but they will not be allowed to enter certain cities).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_war_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “At War” of a faction (when player’s prestige is lower than the point, the player will be attacked in the wild by squads of this faction).&lt;br /&gt;
| -10&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.8.0.1'''&lt;br /&gt;
|-&lt;br /&gt;
|dg_levelup_skill&lt;br /&gt;
|Skill ID of level-up special effect in battles.&lt;br /&gt;
|升级特效&lt;br /&gt;
|-&lt;br /&gt;
|init_items&lt;br /&gt;
|Initial item list.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_dropitem_model&lt;br /&gt;
|Model and special effect info of items dropped in battles (Format: world map unit model#special effect info).&lt;br /&gt;
|chest1#psChestFlash1,0,0&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}Besides specific initial fields above, there are some UI-resetting fields, starting with “gui”, in the initial set list, which are used to do a custom reset on certain built-in UI in the game. For more details, please see instruction on game interface reset. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Codes of Text Color in Common UI===&lt;br /&gt;
In dialogues, text boxes or other common UI, we can follow certain formats to change the colours of texts.&lt;br /&gt;
&lt;br /&gt;
E.g., This is a imp:red font text, red:red font text, &amp;amp;ff6699ff:custom color text font.&lt;br /&gt;
&lt;br /&gt;
Currently, we support preset colours for the following types (to use custom colours, replace “#” with “&amp;amp;” ).&lt;br /&gt;
&lt;br /&gt;
*place: unified colour for the location name.&lt;br /&gt;
*role: unified colour for the character name.&lt;br /&gt;
*camp: unified colour for faction name.&lt;br /&gt;
*item: unified colour for item name.&lt;br /&gt;
*imp: unified colour for an important message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Character Position Directive===&lt;br /&gt;
Format: position code:position parameter.&lt;br /&gt;
&lt;br /&gt;
Supported position codes are: 0: Unallocated; 1: In position; 2: In squad; 3: In a project.&lt;br /&gt;
&lt;br /&gt;
*when the code is 1: Format:  1: location ID, facility ID (if the facility ID is empty, it means the character is outside the facility).&lt;br /&gt;
*when the code is 2: Format:  2: squad ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of In-game Global Position Directive===&lt;br /&gt;
When assigning the position for a squad or object on the world map, we can follow a format of globally position assignment (e.g., the TELEPORT directive).&lt;br /&gt;
&lt;br /&gt;
Format of global position:   &lt;br /&gt;
 Map ID:coordinate X,coordinate Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Unit-Limitation Directive in Specific Battles===&lt;br /&gt;
In a specific battle table, you can fill in a directive of the following types in the “Limit” column, to execute unit or special restrictions. &lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Directive 1:parameter 1;directive 2:parameter 2;...directive N:parameter N;&lt;br /&gt;
Currently supported types of limitation directives are: &lt;br /&gt;
&lt;br /&gt;
*player: reset squad hero list. Format: character ID1,reset level (-1 or left empty: Do not reset)|. character ID2,reset level| character ID3, reset level|...| character ID N,reset level.&lt;br /&gt;
*units: reset squad minion list. Format: same as the common minion list.&lt;br /&gt;
*add_stat: additional character attribute status. Format: target character ID#status list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Directive List of Unit Control on the World Map===&lt;br /&gt;
World map unit (squad) control directives are methods used to manage the action order of world map units. When a unit has specific control directive list, it will execute every directive in sequence until the execution is finished. After the game is saved halfway of the execution of the directives and the player exits the game, the execution will continue when the save is loaded.&lt;br /&gt;
&lt;br /&gt;
Please note: after the execution of all directives of a squad, the squad will be dismissed. Dummies (creeps and dummies needed for stories included) are an exception.&lt;br /&gt;
&lt;br /&gt;
Control directive consists of int-number directives and directive content, separated by “;”. Directive of each line starts with a directive-type code and “+”, followed by a directive parameter. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 1,test map:100,100;1,test map:100,200;99,0&lt;br /&gt;
The code above means that the squad will move to coordinate 1 (100,100) first, and then to coordinate 2 (100,200). Finally, the squad will be dismissed.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive-type codes are: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Control Directive Code'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Move towards a coordinate on the world map. The parameter is the target coordinate (coordinate format: map ID: coordinate X, coordinate Y).&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Stay where you are. The parameter is the time of staying (count by in-game day).&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Enter a location. The parameter is the target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Attack the target location. The parameter is the target location ID. (invasion type: 0: Occupy; 1: Raid).&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Stay in the target location. The parameter is the target location ID, time of staying.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Execute an event. The parameter is the event ID.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Change the current StateNum value. The parameter is the new StateNum value.&lt;br /&gt;
&lt;br /&gt;
Note: StateNum can be used to mark the current status of some controlled squad. E.g., you can command a unit to a specific location on the map and execute an action. Before the unit reaches the destination, StateNum is 0; after its arrival, StateNum becomes 1. By doing so, we get to know the current status of a squad.&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|Execute custom movement directives permanently. (For directive format, see [[Common Scenario Directives#Format of Default Movement Directive of Unit Squad|Format of Default Movement Directive of Unit Squad]]).&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|Join a Warband. The parameter is the Warband ID (built-in method of the system. We do not suggest calling this).&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Execute an action. Parameter format: action ID, loop times (-1: Endless; &amp;gt;=1: Limited times; set 1 when the action itself is a looping animation), single-action time (count by second; execute the next directive when the action finishes looping, if it does not loop permanently), object(0: All units by default; 1: Leader only; 2: All followers), initial frame range (0~1; 1: the last frame of the animation; -1: a random number between 0 and 1), whether to execute the next directive after playing the animation (0: No by default; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
Supported default action list of models:&lt;br /&gt;
&lt;br /&gt;
· Loop action: standby, move, walk slowly, charge, recharging.&lt;br /&gt;
&lt;br /&gt;
· Single action: being hit, evade, block, attack, shoot, horizontal. slash, vertical slash, release, roar, knock up, jump, celebrate, die.&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|Open a chest. The parameter ID is the chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|Execute a TimeLine action. Format: TimeLineID, duration (set -1 by default, permanent; &amp;gt;0: Action ends after the time set).&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Change the attitude of the current squad towards the player (0: Neutral; 1: Hostile).&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|Change the current movement speed of the current squad. The parameter is the target movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Trade succeeded. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|Trade with a merchant. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|Follow a squad target. The parameter is the control ID of the target being followed.&lt;br /&gt;
|-&lt;br /&gt;
|99&lt;br /&gt;
|Dismiss the current squad.&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Default Movement Directive of Unit Squad===&lt;br /&gt;
Dummies, creeps and squads on the world map will change their movement modes based on the default way of moving or the changes of scripts. After choosing a movement mode, units will perform default actions according to the directive.&lt;br /&gt;
&lt;br /&gt;
Format of unit movement directive: &lt;br /&gt;
 Movement mode,parameter 1[,parameter 2,...,parameter N]&lt;br /&gt;
Currently supported movement modes and the formats of the parameter are: &lt;br /&gt;
&lt;br /&gt;
*Wander within range: WANDER, movement radius,[central coordinate X, central coordinate Y](the current position is the centre if the central coordinate is not assigned).&lt;br /&gt;
*Patrol: PATROL, coordinate 1X, coordinate 1Y, coordinate 2X, coordinate 2Y,..., coordinate NX, coordinate NY(when the first coordinate is the same as the final coordinate, the patrol movement loops in a circle; otherwise, the patrolling movement goes back and forth).&lt;br /&gt;
*Others: Stay still.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item List Info===&lt;br /&gt;
The item list info is one of the most common info formats. We use this format in the directives of obtaining various items (GETITEMS, etc.) and configuration tables.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Item code 1,number 1[,detailed info list]|item code 2,number 2[,detailed info list]|....|item code N,number N[,detailed info list].&lt;br /&gt;
The format of the detailed info list is the dictionary list of &amp;quot;key1=val1,key2=val2,...&amp;quot;. Following fields are supported: &lt;br /&gt;
&lt;br /&gt;
*[mf] auto-match the created affixes: mf=lowest quality; N-highest quality; N[-additional cardinal number of variable value]. E.g., Longsword,1,mf=0-3  Explanation: the “mf” field helps the current weapon to automatically match a quality (0~3) affix (0 means no affix).&lt;br /&gt;
&lt;br /&gt;
*[cw] create custom affix: cw= affix ID+ additional cardinal number of variable value (0-100). E.g., Longsword,1,cw=Lifesteal Sword+50 Explanation: the variable value of items with the affix of Lifesteal Sword, is between 50 and 100.&lt;br /&gt;
&lt;br /&gt;
*[w] assign the affix details of items: w=affix ID$ [variable code array]&lt;br /&gt;
*[qv] assign the variable array of item attribute: qv= variable code array&lt;br /&gt;
*[p] assign the buy-in price of items: p= buy-in price&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variable code array consists of two columns of 2-dimensional arrays. Column 1 is enumerated numbers, and column 2 is quality numbers (0~100). The two columns are connected by “/”. If a affix has 3 parts, then its variable array might be: 0/50/0/100/0/100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Weather Effect Info===&lt;br /&gt;
When using directives to control weathers, we mainly use directives to control a list weathers, which is separated by “|”. &lt;br /&gt;
&lt;br /&gt;
Format of weather effects description: &lt;br /&gt;
 Weather effect ID1, intensity|weather effect ID2,intensity|...weather effect IDN,intensity&lt;br /&gt;
Currently, supported weather effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*雨（Rain）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
&lt;br /&gt;
*雪（Snow）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
*风沙（Sandy）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雷电（Thunder）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雾（Fog）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*黑暗（Darkness）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*炎热（Hot）: Disabled when the intensity is 0 (1~100) (Heat Distortion Effect).&lt;br /&gt;
*云（Cloudy）: Disabled when the intensity is 0 (1~100) (shadows of cloud in clear days).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of weather effect field in map editor or config tables: &lt;br /&gt;
 Probability 1,duration 1:[weather effect description 1]; Probability 2,duration 2:[weather effect description 2]; Probability 3,duration 3:[weather effect description 3];[...]; Probability N,duration N:[weather effect description N]&lt;br /&gt;
E.g., 30,1:;50,3:雨,20|雾,10;20,5:风沙,30&lt;br /&gt;
&lt;br /&gt;
The above code means there is a 30% chance of not having any weather effect for a whole day, 50% chance of raining for 3 consecutive days, and 20% chance of having 5 consecutive sandy days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Camera Filter Effect Info===&lt;br /&gt;
We can use directives like SET_CAMERA_FILTER to set the camera filter of the current game.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Filter effect ID1,intensity|filter effect ID2,intensity|...filter effect IDN,intensity&lt;br /&gt;
Currently, supported filter effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*暗角 (Vignetting): Disabled when the intensity is 0 (0~100). The degree of darkness of camera’s corners.&lt;br /&gt;
*黑白 (Black&amp;amp;white): Disabled when the intensity is 0 (0~100). The black-and-white version of the camera.&lt;br /&gt;
*老旧 (Classic): Disabled when the intensity is 0 (0~100). The yellowing classic style of camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction List===&lt;br /&gt;
The following are the character TAGs used in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|LIKE&lt;br /&gt;
|Mark the type of items a specific character likes, which affects the increased speed of favour.&lt;br /&gt;
&lt;br /&gt;
Format: LIKE:type 1|type 2|...&lt;br /&gt;
|-&lt;br /&gt;
|DEF_WEAPON_SPEED&lt;br /&gt;
|Default weapon speed. Characters with this tag will take this speed as the default weapon speed even if they do not have a weapon.&lt;br /&gt;
|-&lt;br /&gt;
|FVChangeUnit&lt;br /&gt;
|Change the coefficient of character’s favour via sending gifts. Set to be the default value without this field.&lt;br /&gt;
|-&lt;br /&gt;
|dg_skill&lt;br /&gt;
|Replace the dungeon skill of this character.&lt;br /&gt;
|-&lt;br /&gt;
|attached_script&lt;br /&gt;
|ID of script event mounted on characters in battles.&lt;br /&gt;
|-&lt;br /&gt;
|loot_list&lt;br /&gt;
|The dropping list of this character in dungeon battles (can use the“EXP” item IDs as a specific source of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Location List===&lt;br /&gt;
The following is a TAG list of locations with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|Show minimap&lt;br /&gt;
|City maps are shown by default. If there are other places that need to be shown by default, this tag must be 1.&lt;br /&gt;
|-&lt;br /&gt;
|Do not show minimap&lt;br /&gt;
|It is what the field means.&lt;br /&gt;
|-&lt;br /&gt;
|Disable AI invasion&lt;br /&gt;
|Bases with this tag will not invade, patrol or occupy resources automatically.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction Table===&lt;br /&gt;
The following is a TAG list of factions with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|NO_CHANGE_DIP&lt;br /&gt;
|Will not be affected by dynamic diplomatic relations in the game, unless you use script directives to change directly.&lt;br /&gt;
|-&lt;br /&gt;
|UNFAILED&lt;br /&gt;
|This faction cannot be eliminated in a usual way.&lt;br /&gt;
|-&lt;br /&gt;
|EMBARGO&lt;br /&gt;
|Cities occupied by this faction will not send out caravans or trade with other cities.&lt;br /&gt;
|-&lt;br /&gt;
|NO_FARMER&lt;br /&gt;
|There will not be farmer migration in cities occupied by this faction.&lt;br /&gt;
|-&lt;br /&gt;
|CAMP_COLOR&lt;br /&gt;
|Set a specific colour for a faction. Sample format: CAMP_COLOR=FFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===TAGs with Special Meanings in Item Table===&lt;br /&gt;
The following is a TAG list of items with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|IgnoreBagSpace&lt;br /&gt;
|This item will not occupy a slot of player’s bag. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|NoSellOrDrop&lt;br /&gt;
|This item cannot be discarded or sold. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|BatchUse&lt;br /&gt;
|Weather player can use the item in the batch. Function enabled when the field is 1. When an item with this TAG is used, the [%arg_int_val1%] in its script will be the selected number of the item.&lt;br /&gt;
|-&lt;br /&gt;
|DoNotCostWhenUse&lt;br /&gt;
|This item will not be consumed when used. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Present&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The tag field of gift type, separated by “|”.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|AiNotLoot&lt;br /&gt;
|This item cannot be accessed by AI in a normal way. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Mendable&lt;br /&gt;
|If this item is mendable, unmendable item will self-destroy after the durability becomes 0. (1: Yes ).&lt;br /&gt;
|-&lt;br /&gt;
|DropModel&lt;br /&gt;
|The model info of the item when it is on the ground in battles. (format: world map unit model ID#special effect info (replaced by the def_dropitem_model field in the initial set list if the info is left empty)).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Ones of Map Exploration Info Fields in Map List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!字段&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|BattleLoseStay&lt;br /&gt;
|Stay still after losing a battle. Only available in adventure mode (0: No; 1: Yes)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following fields are suitable for version above or higher than 0.7.2.1'''&lt;br /&gt;
|-&lt;br /&gt;
|RolePlay&lt;br /&gt;
|When the player is on this map, their character model and name will be replaced by the info of character whose ID is filled into this field. The models of the following minions will be hidden too. The bag and squad panels become inaccessible.&lt;br /&gt;
|-&lt;br /&gt;
|FixedGameTime&lt;br /&gt;
|When this field is not empty, the in-game time will be frozen at a certain point of a day (0~1.0, 0.5 means 12 pm). When the time is frozen, the world will not run on. Only units on the current map can take actions.&lt;br /&gt;
|-&lt;br /&gt;
|CameraFilter&lt;br /&gt;
|When on this map, use this field compulsorily as a camera filter. The effect is the same as the SET_CAMERA_FILTER directives.&lt;br /&gt;
|-&lt;br /&gt;
|NoFoodConsume&lt;br /&gt;
|When this field is 1, the player will not consume food on this map and will not die because of hunger.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Fields of TAG in Instance Info List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PlayerInitType&lt;br /&gt;
|The initial mode of player’s character (0: Default (use the default character template and initial position in the instance to initialize the character) 1: Manual (initialize the character via the LUA port)).&lt;br /&gt;
|-&lt;br /&gt;
|ExpMode&lt;br /&gt;
|EXP allocation mode. Format: allocation mode[,radius parameter].&lt;br /&gt;
&lt;br /&gt;
The allocation modes are: &lt;br /&gt;
&lt;br /&gt;
*0: Killer mode (default; the enemy killer has all EXP).&lt;br /&gt;
*1: Average Mode (the parameter is the allocation radius; when the parameter &amp;lt;=0, all allies share EXP).&lt;br /&gt;
*2: Share Mode (if the radius parameter &amp;gt;0, share EXP with allies with the radius).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Item Entry Info===&lt;br /&gt;
Entries of items follow the format of “entry type:{enumerated info 1, value 1; enumerated info 2, value 2;… }”, and they are set in the item list. Entries can be sorted as:&lt;br /&gt;
&lt;br /&gt;
*a: increase the character’s attribute passively. Enumerated info is the KEY to the increased attribute.&lt;br /&gt;
*skill: add new available skills to a character. Enumerated info is the skill ID.&lt;br /&gt;
*dg_skill: replace the current dungeon skill of the character. Enumerated info is the dungeon skill ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item Dropping Info===&lt;br /&gt;
Format:&lt;br /&gt;
 Probability 1,item ID1,min number,max number [,additional parameter list(see [[Common Scenario Directives#.E7.89.A9.E5.93.81.E5.88.97.E8.A1.A8.E4.BF.A1.E6.81.AF.E6.A0.BC.E5.BC.8F|Format of Item List Info]])]|probability 2,item ID2,min number, max number [,parameter list]|...|probability N,item N,min number,max number[,parameter list]. &lt;br /&gt;
(E.g., “LOOT*100.0, 金钱,100,200|50.0, 经验,100,200” means that there is a 100% chance of obtaining 100~200 utars and a 50% chance to obtain 100~200 EXP).&lt;br /&gt;
&lt;br /&gt;
'''In Item ID, you can execute a special ID Query, which is to query and return a result of item dropping from the global dropping list (see the format in Q全局掉落表.xlsx).'''&lt;br /&gt;
&lt;br /&gt;
The format of the parameter list of QUERY is: “parameter 1=val1, parameter 2=val2,....” Following query parameters are supported: &lt;br /&gt;
&lt;br /&gt;
*[id] obtain the result of the target ID from the global dropping list (ignore all the other query conditions when this exists and is not empty).&lt;br /&gt;
*[lv] specific conational query level（-1：return all query results; 0: query based on the current level of player）.&lt;br /&gt;
*[t1] query TAG 1 (a condition).&lt;br /&gt;
*[t2] query TAG 2.&lt;br /&gt;
*[t3] query TAG 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Script Directive in Special Effect Object Event===&lt;br /&gt;
You can attach the eftEffectEventHelper script to a special effect object to add a new play-effect event. Format of every event: event time point (number of seconds after the start), parameter 1, parameter 2,…, parameter N.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive types are:&lt;br /&gt;
&lt;br /&gt;
shake_cam: screen shake. Parameter 1 is the duration of screen shake, and parameter 2 is the intensity. &lt;br /&gt;
&lt;br /&gt;
play_sound: play audio. Parameter 1 is the audio ID.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=701</id>
		<title>Common Scenario Directives</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=701"/>
		<updated>2020-09-22T01:58:00Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Scenario Event===&lt;br /&gt;
A scenario event is a basic element used to realize scenario scripts in the game. All scenario events in the game are called by emitters or executors and put into the directive queue. These scenario events will be run by the GameWorldManager one by one according to the in-game time. An integrate scenario event consists of the following parts:&lt;br /&gt;
&lt;br /&gt;
1. Scenario Event ID: a unique label of a scenario event;&lt;br /&gt;
&lt;br /&gt;
2. Directive Content: directives that will be executed after a scenario event is triggered;&lt;br /&gt;
&lt;br /&gt;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.&lt;br /&gt;
&lt;br /&gt;
===Scenario Event Trigger===&lt;br /&gt;
Currently, all stories and events are established according to the mechanics of the scenario event trigger. The mechanics of a trigger is: event ports are set at different positions in advanced, and when the program accesses a position, it will call the port and import the current environment variables. The program will then traverse all defined triggers in the port event and return the trigger with the highest priority or all triggers that meet the conditions (to return one or all triggers is decided by the type of a port). Finally, a scenario event is executed. Triggers’ calling events is not executed immediately. Relevant events are put into the execution queue and get carried out procedurally until all events in the queue are executed.&lt;br /&gt;
&lt;br /&gt;
Following is the list of scenario events defined in the game (port types in bold indicate that they execute all trigger events that meet the conditions instead of executing the one of the highest priority): &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Port Type&lt;br /&gt;
!Explanation&lt;br /&gt;
!Object Type&lt;br /&gt;
!Object ID&lt;br /&gt;
|-&lt;br /&gt;
|passive&lt;br /&gt;
|Triggered passively; &lt;br /&gt;
&lt;br /&gt;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|talk&lt;br /&gt;
|Triggered when interacting with NPC.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|first_in&lt;br /&gt;
|Triggered when the player enters the game for the first time.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter&lt;br /&gt;
|Triggered when interacting with units on the sandbox map.&lt;br /&gt;
|&lt;br /&gt;
|Control ID of the target Unit.&lt;br /&gt;
|-&lt;br /&gt;
|before_enter_map&lt;br /&gt;
|Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_map&lt;br /&gt;
|Triggered when entering a map.&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_map&lt;br /&gt;
|Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_map&lt;br /&gt;
|Triggered when leaving a map.&lt;br /&gt;
|&lt;br /&gt;
|Current map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_place&lt;br /&gt;
|Triggered when entering the target location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_place&lt;br /&gt;
|Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted)&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_place&lt;br /&gt;
|Triggered when leaving the current location.&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_place&lt;br /&gt;
|Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_building&lt;br /&gt;
|Triggered when entering the target building&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_building&lt;br /&gt;
|Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_building&lt;br /&gt;
|Triggered when leaving the target building.&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_building&lt;br /&gt;
|Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|battle_start&lt;br /&gt;
|Triggered at the start of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|battle_over&lt;br /&gt;
|Triggered at the end of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|set_lord&lt;br /&gt;
|Triggered when AI appoints player as the ruler of a city.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|job_cmd&lt;br /&gt;
|Triggered when the player is given a working order.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|see_warband&lt;br /&gt;
|Triggered when encountering another squad and battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|curplace_inwar&lt;br /&gt;
|Triggered when the location where the player is currently settling in is attacked.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quest_done&lt;br /&gt;
|Triggered when all conditions of a mission are met (mission incomplete).&lt;br /&gt;
|&lt;br /&gt;
|Mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''on_end_work'''&lt;br /&gt;
|Triggered when completing a mission of a location.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|'''occupy_place'''&lt;br /&gt;
|Triggered when the player occupied a location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''new_day'''&lt;br /&gt;
|Triggered when starting a new day.&lt;br /&gt;
|&lt;br /&gt;
|The target number of days.&lt;br /&gt;
|-&lt;br /&gt;
|reward_follower&lt;br /&gt;
|Triggered when the player rewards their followers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reward_player&lt;br /&gt;
|Triggered when the player is rewarded.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dip_event&lt;br /&gt;
|Triggered when the player’s faction meets diplomatic affairs.&lt;br /&gt;
|Affair types:&lt;br /&gt;
&lt;br /&gt;
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice.&lt;br /&gt;
|Target Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_success&lt;br /&gt;
|Triggered when the player’s diplomatic request is met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_fail&lt;br /&gt;
|The diplomatic request is not met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|player_failed&lt;br /&gt;
|Triggered when the player failed in a skirmish. &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reinforce_request&lt;br /&gt;
|Triggered when reinforcement related to player happens.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|is_fall&lt;br /&gt;
|Triggered when a faction collapsed.&lt;br /&gt;
|&lt;br /&gt;
|Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|is_to_fall&lt;br /&gt;
|Triggered when a faction loses all bases and is about to collapse.&lt;br /&gt;
|&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|before_cash_present&lt;br /&gt;
|Triggered before being rewarded (action of rewarding is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|before_present&lt;br /&gt;
|Triggered before sending a gift (action of sending the gift is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_present&lt;br /&gt;
|Triggered when sending a gift.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter_role&lt;br /&gt;
|Triggered before the common dialogue that happens when the player encounters a character.&lt;br /&gt;
|&lt;br /&gt;
|Target Character ID.&lt;br /&gt;
|-&lt;br /&gt;
|helped_camp&lt;br /&gt;
|Triggered when the player encounters a conflict between two sides and helped one side.&lt;br /&gt;
|&lt;br /&gt;
|The faction of the leadrole of target’s squad.&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_up&lt;br /&gt;
|Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_down&lt;br /&gt;
|Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_dismiss&lt;br /&gt;
|Triggered when a squad is dismissed.&lt;br /&gt;
|Squad Type: &lt;br /&gt;
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_into_place&lt;br /&gt;
|Triggered when a squad enters a location.&lt;br /&gt;
|Squad Type: same as above.&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Script Directive List===&lt;br /&gt;
&lt;br /&gt;
Script directives in the game usually follow the format of directive type*parameter 1#parameter2#...#parameter N, and uses line break to separate multiple lines of directives.&lt;br /&gt;
&lt;br /&gt;
Currently, supported script directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Directive&lt;br /&gt;
!Instruction&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
Function: show a dialogue with the typewriter effect and character painting. &lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N.&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
&lt;br /&gt;
 When certain paragraph needs to be bound with audios, add &amp;lt;voice:audio ID&amp;gt; in the front of the paragraph to show the according to the audio file for the words. The audio will be turned off when you skip the paragraph.&lt;br /&gt;
 You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly.&lt;br /&gt;
 When the paragraph begins with “inner:...”, a special piece of information is used;&lt;br /&gt;
 The built-in special information IDs and meanings are as follow:  &lt;br /&gt;
 inner:set_player_job: object’s words when they give orders to player&lt;br /&gt;
 inner:set_player_lord: text when the player is appointed as a ruler&lt;br /&gt;
 inner:self_introduce: self-introduction of a character &lt;br /&gt;
 inner:cur_doing: the content of what the current character has been doing&lt;br /&gt;
 inner:cur_team_intent: intension of the current squad&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side. &lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump-to Event'''&lt;br /&gt;
&lt;br /&gt;
Function: Jump to and execute another specific scenario event ID.&lt;br /&gt;
&lt;br /&gt;
Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0).&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT&lt;br /&gt;
|'''Jump-to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT*scenario event ID.&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT_RETURN&lt;br /&gt;
|'''Return to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump back to the last subevent from the current subevent.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT_RETURN*&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Selection List Box'''&lt;br /&gt;
&lt;br /&gt;
Function:  Based on the text box, after the dialogue content is printed, a selection list box pops up, lets the player choose an option, and returns the result (the according [%result_code%] of the result command in the event).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 when the KEY of an option begins with &amp;quot;+&amp;quot;, the text box will not disappear after the player selects an option. &lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TALK&lt;br /&gt;
|'''Plugin Dialogue Option'''&lt;br /&gt;
Function: a selection list box that can present new options via a trigger list.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by &amp;quot;|&amp;quot;; set to be &amp;quot;any&amp;quot; by default)&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be &amp;quot;any&amp;quot; by default if nothing is filled in), but certain options (whose trigger type is SELECT and meet conditions) will be selected from the trigger and be added as new options; the text shown is bound in the trigger, and the content of the triggered event is decided by the trigger event ID.&lt;br /&gt;
&lt;br /&gt;
 Please note: when using this directive, you need to add &amp;quot;[%result_code%][&amp;gt;]99:EVENTPOJO_EVENT* &amp;quot; to the result&lt;br /&gt;
 In the trigger list, you can add a prefix &amp;quot;SUB_EVENT.&amp;quot; to a trigger event ID to mark it as a subevent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|CMD_SELECT&lt;br /&gt;
|'''System Selection List Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_SELECT*select text info#option group (same as SELECT directive).&lt;br /&gt;
|-&lt;br /&gt;
|CONFIRM&lt;br /&gt;
|'''Text Confirmation Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CONFIRM*text to confirm&lt;br /&gt;
|-&lt;br /&gt;
|TOAST&lt;br /&gt;
|'''Message on Screen'''&lt;br /&gt;
Function: a message pops up on the screen, which disappears after a short while.&lt;br /&gt;
&lt;br /&gt;
Format: TOAST*message content&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text).&lt;br /&gt;
|-&lt;br /&gt;
|GAME_MSG&lt;br /&gt;
|'''In-game News'''&lt;br /&gt;
Function: show a text in the UI message box, which can be reviewed in the News Log.&lt;br /&gt;
&lt;br /&gt;
Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System).&lt;br /&gt;
|-&lt;br /&gt;
|INPUT&lt;br /&gt;
|'''Input Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]).&lt;br /&gt;
&lt;br /&gt;
Format: INPUT*notice text#Len number limit of digit#default text.&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay).&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second).）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable).&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|BLACK_SCREEN&lt;br /&gt;
|'''Screen Curtain'''&lt;br /&gt;
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain.&lt;br /&gt;
&lt;br /&gt;
Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
Function: Set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Annotation:&lt;br /&gt;
 Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity.&lt;br /&gt;
 E.g., 雪,60|雾,20&lt;br /&gt;
 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled&lt;br /&gt;
 For weather effect ID, please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]]&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE&lt;br /&gt;
|'''Start Battle'''&lt;br /&gt;
Function: start a skirmish or a battle defined in a specific battle table.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE*battle ID (if you do not fill in a specific battle ID or fill in “ENCOUNTER”, you start a skirmish)#BGM (optional; if there is a BGM in a particular battle).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH&lt;br /&gt;
|'''Fight with Specific Unit'''&lt;br /&gt;
Function: start a custom fight with a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH*target character info (optional)#minion info of the target (optional)#battle map info (optional)#battle location info (optional)#battlefield weather (optional)#BGM (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH_TAGROLE&lt;br /&gt;
|'''Fight with Target Character'''&lt;br /&gt;
&lt;br /&gt;
Function: start a specific fight with the target character immediately.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH_TAGROLE*battle ID (battle ID is used to trigger scenario event only)#specific BGM (optional; if there is a BGM for a specific battle).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_BGM&lt;br /&gt;
|'''Change Current BGM of the Game'''&lt;br /&gt;
Function: change the current BGM of the game based on the need of stories.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_BGM*parameter 1#paramter 2&lt;br /&gt;
&lt;br /&gt;
 Parameter 1: AudioID of the target BGM (switch back to the default BGM of the current map if this is empty; when the remaining field of this ID is “MUTE”, which means no BGM is played currently).&lt;br /&gt;
 Parameter 2: validation type (0: invalidated when switching scenes; 1: always validated even when you save the game and come back unless you recall the CHANGE_BGM directive and define an empty AudioID).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_SOUND&lt;br /&gt;
|'''Sound Effect'''&lt;br /&gt;
Function: play a sound effect in the game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_ROLE_VOICE&lt;br /&gt;
|'''Play Character Voice-over'''&lt;br /&gt;
Function: play an audio file that is defined in “Voice” of the character’s tags.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|NUMSEL&lt;br /&gt;
|'''Input Value Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]).&lt;br /&gt;
&lt;br /&gt;
Format: NUMSEL*text of input box#min value#max value#default value#item price#price message(when the item price is 0, system does not show the price message. Otherwise, the message needs to follow the format of “{0} Utar(s) for each unit, {1} Utar(s) in total”).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_MONEY&lt;br /&gt;
|'''Change Player’s Money in Hand '''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_MONEY*change value.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_CHANGE_MONEY&lt;br /&gt;
|'''Change a Specific Hero’s Money in Hand'''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_CHANGE_MONEY*Hero ID#change value.&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1).&lt;br /&gt;
|-&lt;br /&gt;
|AI_CAMP_GETITEMS&lt;br /&gt;
|'''All Factions Get Items or Resources'''&lt;br /&gt;
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive.&lt;br /&gt;
&lt;br /&gt;
Format: AI_CAMP_GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_ITEMS&lt;br /&gt;
|'''Convert Item'''&lt;br /&gt;
Function: convert a specific item in the current item list into a new item proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time.&lt;br /&gt;
&lt;br /&gt;
E.g., “TRANSFER_ITEMS*小麦#小麦粉#1#1#10” means converting wheat(小麦) into wheat powder(小麦粉) at a 1:1 proportion. If during the conversion, the original item becomes insufficient, the conversion stops.&lt;br /&gt;
|-&lt;br /&gt;
|GET_RND_ITEM&lt;br /&gt;
|'''Select a Type of Item Randomly'''&lt;br /&gt;
Function: select a type of item randomly among several items.&lt;br /&gt;
&lt;br /&gt;
Format: GET_RND_ITEM*object item list (e.g., GET_RND_ITEMS*茶叶(Tea), 3|面包(Bread), 1|牛奶(Milk), 2. This means that you will get one type of the three.)&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Specific Item or Resource'''&lt;br /&gt;
Function: remove a certain number of items from the item list of the player.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_SELECT_ITEMS&lt;br /&gt;
|'''Remove the Selected Item'''&lt;br /&gt;
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_SELECT_ITEMS*maximum number of selected groups (choose object groups in the front from the selected targets)#number of removal(optional; set -1 by default. When the number is lower than 0 or higher than the number of the object’s stacks, remove the whole group. Otherwise, draw a specific number of all selected targets).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_PRESENT&lt;br /&gt;
|'''Remove Specific Gift Item That Meet Requirement'''&lt;br /&gt;
Function: remove a gift item from the item list based on a specific gift tag.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of &amp;quot;Like&amp;quot; in the mission list.&lt;br /&gt;
|-&lt;br /&gt;
|ITEMS_SELECTOR&lt;br /&gt;
|'''Open Item Selection Text Box'''&lt;br /&gt;
Function: an item selection text box pops up. You can restore your choice in a queriable variable ([%last_seled_items%],[%last_seled_item_id%], etc).&lt;br /&gt;
&lt;br /&gt;
Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list &lt;br /&gt;
|-&lt;br /&gt;
|TEAM_GAINEXP&lt;br /&gt;
|'''Player’s Squad Gains EXP'''&lt;br /&gt;
Function: members in the player’s squad gain average EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|TEST_ADD_ROLE_EXP&lt;br /&gt;
|'''Specific Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEST_ADD_ROLE_EXP*hero ID#exp.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_ROLE_LV&lt;br /&gt;
|'''Change Character Level'''&lt;br /&gt;
Function: change the level of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_ROLE_LV*hero ID#expected level.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_GUARDS_LEVELUP&lt;br /&gt;
|'''All Defending Heroes Level Up'''&lt;br /&gt;
Function: all heroes in a specific location increase their level by 1.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_GUARDS_LEVELUP*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_TEAM_LEVELUP&lt;br /&gt;
|'''All Heroes in Player’s Squad Level UP'''&lt;br /&gt;
Function: all heroes in the player’s squad level up directly.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_TEAM_LEVELUP*.&lt;br /&gt;
|-&lt;br /&gt;
|SETTRIGG&lt;br /&gt;
|'''Set Trigger Switch'''&lt;br /&gt;
Function: turn on or turn off a trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: SETTRIGG*trigger ID#status value (0: On; 1: Off)&lt;br /&gt;
|-&lt;br /&gt;
|TRIGGER&lt;br /&gt;
|'''Execute Trigger'''&lt;br /&gt;
Function: execute a specific trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: TRIGGER*trigger ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_ES&lt;br /&gt;
|'''Manually Set Scenario Event Status'''&lt;br /&gt;
Function: set the execution status of a scenario event manually (after the logics have been executed, the result will be marked with ResultCode of the current event).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event).&lt;br /&gt;
|-&lt;br /&gt;
|SETINTVAR&lt;br /&gt;
|'''Set Custom Int Variable'''&lt;br /&gt;
Function: set a custom int variable (recorded by saves). Some variable fields will be connected the in-game logic parameter (for custom int variable that are defined inside the program, please see the“[[Common Scenario Directives#Built-in Custom Variable Field|Built-in Custom Variable Field]]”) and can be queried via built-in query parameter ([%int_val:ID%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETINTVAR*parameter ID#current int value&lt;br /&gt;
|-&lt;br /&gt;
|CHANGEINTVAR&lt;br /&gt;
|'''Change Custom Int Variable'''&lt;br /&gt;
Function: change the value of the current custom int variable.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TEMP_ID&lt;br /&gt;
|'''Set Temporary ID Variable'''&lt;br /&gt;
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TEMP_ID*ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETSTRVAR&lt;br /&gt;
|'''Set Custom String Variable'''&lt;br /&gt;
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETSTRVAR*Variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIMETAG&lt;br /&gt;
|'''Tag a Custom Crucial Time Point '''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can use [%tag_gametime_elapse%] to load the time span since the time point you record.&lt;br /&gt;
&lt;br /&gt;
Please note: this directive is only used to transfer temporary variables in a series of stories, and the tag will not be stored in saves. Do not use this for scenes that need permanent data.&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIMETAG*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIME&lt;br /&gt;
|'''Tag a Custom In-game Time Point'''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can query the relevant info of this time point via query parameter (see[%gametime_elapse%] and [%gametime_elapse_by_day%], etc.).&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIME*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CUSTOM_CD&lt;br /&gt;
|'''Set a Custom Cooldown Time'''&lt;br /&gt;
Function: set a custom cooldown timer and see whether the current cooldown is in use by checking if [%is_custom_cd:ID%] is 1 or not.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;＞0: set a specific time (count by day)).&lt;br /&gt;
|-&lt;br /&gt;
|GET_QUEST&lt;br /&gt;
|'''Claim a Mission'''&lt;br /&gt;
Function: claim a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: GET_QUEST*mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_QS&lt;br /&gt;
|'''Add Mission Subitem Counter'''&lt;br /&gt;
Function: add a subitem counter of missions manually.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter.&lt;br /&gt;
|-&lt;br /&gt;
|SETQUESTIEM&lt;br /&gt;
|'''Set Value of Mission Subitem'''&lt;br /&gt;
Function: set the value of the subitem of missions.&lt;br /&gt;
&lt;br /&gt;
Format: SETQUESTIEM*mission ID#subitem index#value&lt;br /&gt;
|-&lt;br /&gt;
|DONE_QUEST&lt;br /&gt;
|'''Complete a Mission'''&lt;br /&gt;
Function: mark and complete a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: DONE_QUEST*mission ID#reward or not(1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_IMG&lt;br /&gt;
|'''Show a Character Painting Frame'''&lt;br /&gt;
Function: [not suggested; recommend using the SHOW_CG direcitve].&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*name of image*preset special effect 0*duration (second).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_IMG&lt;br /&gt;
|'''Disable Character Painting Frame'''&lt;br /&gt;
Function: disable the current character painting frame.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_IMG*preset special effect 0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_ROLE&lt;br /&gt;
|'''Force Character to Join'''&lt;br /&gt;
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel.&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_ROLE&lt;br /&gt;
|'''Force Character to Leave'''&lt;br /&gt;
Function: force a character to leave your squad.&lt;br /&gt;
&lt;br /&gt;
Format: QUIT_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE&lt;br /&gt;
|'''Change Location Status'''&lt;br /&gt;
Function: set the current status of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLEPOS&lt;br /&gt;
|'''Set Character Position'''&lt;br /&gt;
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLEPOS*character ID#position info&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_PLACE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport Player to Specific Position'''&lt;br /&gt;
Function: teleport player’s squad to a specific position in the world.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*world position info.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_PLACE&lt;br /&gt;
|'''Teleport Player to Specific Location'''&lt;br /&gt;
Function: teleport player’s squad to a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_PLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_ROLE&lt;br /&gt;
|'''Teleport Player to Target Character'''&lt;br /&gt;
Function: teleport player’s squad to where the target character is currently staying (this only works when the target is in a squad or a location).&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CMD&lt;br /&gt;
|'''Exclusive Directive Group for Unit Control on Sandbox Map '''&lt;br /&gt;
Function: control various units to execute specific directives on a sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: MAP_CMD*directive content&lt;br /&gt;
&lt;br /&gt;
 Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes).&lt;br /&gt;
 Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate.&lt;br /&gt;
 Hide current battle mark: HIDE_BATTLE_MARK#1.&lt;br /&gt;
|-&lt;br /&gt;
|RESTORE&lt;br /&gt;
|'''Player’s Squad Get Recovered'''&lt;br /&gt;
Function: all units in the player’s squad are recovered.&lt;br /&gt;
&lt;br /&gt;
Format: RESTORE*parameter (&amp;lt;=0: squad fully recovered; &amp;gt;0: squad recovered by a specific point).&lt;br /&gt;
|-&lt;br /&gt;
|TIME_ELAPSE&lt;br /&gt;
|'''Time Acceleration'''&lt;br /&gt;
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up.&lt;br /&gt;
&lt;br /&gt;
Format: TIME_ELAPSE*in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#show time bar (0: No(default); 1: Yes)#operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|WAIT_EXEC&lt;br /&gt;
|'''Wait and Execute a Script Event'''&lt;br /&gt;
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: WAIT_EXEC* in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#script event ID #operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSEIGE&lt;br /&gt;
|'''Open Siege Management Panel'''&lt;br /&gt;
Function: show a siege management panel and operate reinforcement squads based on the preset (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
Format: OPENSEIGE*panel mode(0: attack city; 1: defend city)#target location ID (optional; set to be the target location of the current environment variable by default).&lt;br /&gt;
|-&lt;br /&gt;
|OCCUPY&lt;br /&gt;
|'''Execute City Occupation'''&lt;br /&gt;
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
&lt;br /&gt;
Format: OCCUPY*0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_WARBAND&lt;br /&gt;
|'''Join Warband'''&lt;br /&gt;
Function: joined an existed warband（a group of fighting squads from two different sides） (use [$tagwb:id$] to obtain the Warband info of the current skirmish).&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_WARBAND*warband ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_CAMP&lt;br /&gt;
|'''Change Character Faction'''&lt;br /&gt;
Function: change the faction of a target character directly.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_CAMP*faction ID#target character ID#recruiter ID(if this field is player then the character will join the player’s squad directly).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_OWN_CAMP&lt;br /&gt;
|'''Player Creates Their Faction'''&lt;br /&gt;
Function: player creates and activates their own faction. Player’s faction has a fixed default ID: Self-built Faction. This faction exists since the beginning of the game, but it is inactivated. Calling this directive will activate the player’s faction, making player and their followers join this faction.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_OWN_CAMP*name of self-built faction.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_ACTIVE&lt;br /&gt;
|'''Change Faction Project Status'''&lt;br /&gt;
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_RL&lt;br /&gt;
|'''Change Faction Relationship'''&lt;br /&gt;
Function: change diplomatic relationship or friendliness between factions.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_RL*faction A#faction B#relationship (-1: Remain the same; 0: Neutral; 1: Hostile; 2: Friendly)#friendliness value change#expected friendliness value (if this field exists).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_CAMP_REP&lt;br /&gt;
|'''Change Player’s Prestige (Tribute) towards Faction'''&lt;br /&gt;
Function: change player’s prestige (Tribute) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_CAMP_REP*target faction ID#value change#expected value (this works when the value is not empty). The faction refers to the player’s current faction if the faction ID is empty.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_REP&lt;br /&gt;
|'''Change Player’s Prestige (Friendliness) towards Faction'''&lt;br /&gt;
Faction: change the player’s prestige (Friendliness) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|FAME&lt;br /&gt;
|'''Change Player’s Global Prestige'''&lt;br /&gt;
Function: change the player’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: FAME*value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_FAME&lt;br /&gt;
|'''Change Character’s Global Prestige'''&lt;br /&gt;
Function: change a specific character’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_FAME*target character ID#value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PERSON_FV&lt;br /&gt;
|'''Change Favor between the Player and a Character'''&lt;br /&gt;
Function: change favor between the player and another character.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_ACTIVE&lt;br /&gt;
|'''Change Character Project Status'''&lt;br /&gt;
Function: change the project status of a character (not controlled by the player). When this character is inactive, they will not be refreshed in Taverns or execute AI actions like moving.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PROSP_BY_CAMP&lt;br /&gt;
|'''Change Prosperity of All Bases of Faction'''&lt;br /&gt;
Function: change the prosperity of all bases of a specific faction proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PROSP_BY_CAMP*faction ID#percentage(&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY&lt;br /&gt;
|'''Change Location Prosperity''' &lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY*location ID#value change#expected value (this works when the value is not empty; cannot exceed the maximum Prosperity of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY_BY_PCT&lt;br /&gt;
|'''Change Location Prosperity by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF&lt;br /&gt;
|'''Change Location Defense'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Defense of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF*location ID#value change#expected value(this works when the value is not empty; cannot exceed the maximum Defense of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF_BY_PCT&lt;br /&gt;
|'''Change Location Defense by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the defense of a location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_SECURITY&lt;br /&gt;
|'''Change Location Security'''&lt;br /&gt;
&lt;br /&gt;
Function: change the security of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CUSTOM_INT&lt;br /&gt;
|'''Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: a custom int field value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. &lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_CUSTOM_INT&lt;br /&gt;
|'''Change Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the custom int value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_ADD_BUILDING&lt;br /&gt;
|'''Add Custom Facility'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom facility to a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_REMOVE_BUILDING&lt;br /&gt;
|'''Remove Custom Facility from Location'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom facility from a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_REMOVE_BUILDING*location ID#facility ID.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_CARAVAN&lt;br /&gt;
|'''Create Caravan'''&lt;br /&gt;
&lt;br /&gt;
Function: create a caravan in a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_TEAM&lt;br /&gt;
|'''Create Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad, which takes actions according to specific directives.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_TEAM*position on the map#faction#character list (characters included will leave their current squads or locations compulsorily)#minion card list (card ID#level, number |card ID2#level 2, number 2|.......)#directive method (see below)#directive parameter#squad TAG(used to search for specific squads).&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive methods are:&lt;br /&gt;
&lt;br /&gt;
· 0: custom directive: the parameter of the custom directive is the directive for the squad (format: directive type 1, parameter 1; directive type 2, parameter 2;……; directive type N, parameter N) For detailed directive format, please see the Squad Preset Directive.&lt;br /&gt;
&lt;br /&gt;
· 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default).&lt;br /&gt;
&lt;br /&gt;
· 2: premade directive of invading faction: the parameter is the ID of the target faction, priority of target (0: Distance first; 1: Defense first), invasion method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|DISMISS_TEAM&lt;br /&gt;
|'''Dismiss Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss a specific squad.&lt;br /&gt;
&lt;br /&gt;
Format: DISMISS_TEAM*map unit identification ID&lt;br /&gt;
|-&lt;br /&gt;
|TEAM_ORDER&lt;br /&gt;
|'''Change Squad Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: change the current directive list of the squad.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_PLACE&lt;br /&gt;
|'''Attack Location'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside.&lt;br /&gt;
&lt;br /&gt;
Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_CAMP&lt;br /&gt;
|'''Attack Faction'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to attack another faction immediately. Please note: these two factions must be hostile towards each other or both stand neutral. If the attacker does not have sufficient military power, the attack might not happen.&lt;br /&gt;
&lt;br /&gt;
Format: IVASION_CAMP*attacker (faction) ID#target faction ID#priority of target(0: Distance first; 1: Defense first)#invasion type (0: Occupation; 1:Raid)#number of bases involved (0: All; &amp;gt;0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel with a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_LOCAL_PRODUCT&lt;br /&gt;
|'''Add Map Specialty'''&lt;br /&gt;
&lt;br /&gt;
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y.&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERMISSION&lt;br /&gt;
|'''Set Trade Permission'''&lt;br /&gt;
&lt;br /&gt;
Function: set trade permission for a location.&lt;br /&gt;
&lt;br /&gt;
Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|TROOPS_ALLOC&lt;br /&gt;
|'''Garrison Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the garrison panel of a location.&lt;br /&gt;
&lt;br /&gt;
Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|GETSKILL&lt;br /&gt;
|'''Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill to a character.&lt;br /&gt;
&lt;br /&gt;
Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills).&lt;br /&gt;
|-&lt;br /&gt;
|LEARN_SKILL&lt;br /&gt;
|'''Consume Skill Point to Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character in a squad and make them learn a new skill. If they do not have enough skill point, they cannot learn the skill.&lt;br /&gt;
&lt;br /&gt;
Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVESKILL&lt;br /&gt;
|'''Forget Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a skill from a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills)&lt;br /&gt;
|-&lt;br /&gt;
|RESET_SP&lt;br /&gt;
|'''Reset Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the skill points of a character.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_SP*character ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_UNUSEDSP&lt;br /&gt;
|'''Change Available Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill point to a player and allocate the skill point.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_UNUSEDSP*number of skill point.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SKILLPAGE&lt;br /&gt;
|'''Activate or Remove Player’s Skill Page'''&lt;br /&gt;
&lt;br /&gt;
Function: activate or remove a skill page of the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_TEAMINFO&lt;br /&gt;
|'''Show Info of Current Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: show the information on the current squad that you encounter.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_TEAMINFO*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_FLAG&lt;br /&gt;
|'''Set Complete Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story.&lt;br /&gt;
&lt;br /&gt;
Format: SET_FLAG*name of the mark#mark value.&lt;br /&gt;
|-&lt;br /&gt;
|UPDATE_MARKS&lt;br /&gt;
|'''Mark Update'''&lt;br /&gt;
&lt;br /&gt;
Function: update marks on the map.&lt;br /&gt;
&lt;br /&gt;
Format: UPDATE_MARKS*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUMMY&lt;br /&gt;
|'''Set Dummy or Creep Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode on Sandbox Map'''&lt;br /&gt;
&lt;br /&gt;
Function: control the camera mode on the sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter&lt;br /&gt;
&lt;br /&gt;
and meanings of the parameters:&lt;br /&gt;
&lt;br /&gt;
0: follows the player’s character. No parameter (default).&lt;br /&gt;
&lt;br /&gt;
1: follows a specific target. The parameter is the particular map unit identification ID.&lt;br /&gt;
&lt;br /&gt;
2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Map'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of all cities on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|TRY_RECRUIT_FREE_ROLE&lt;br /&gt;
|'''Try Neutral Hero Recruitment'''&lt;br /&gt;
&lt;br /&gt;
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full).&lt;br /&gt;
&lt;br /&gt;
Format: TRY_RECRUIT_FREE_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHK_RECRUIT_CAPTIVE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_CAP&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|SEND_ENVOY&lt;br /&gt;
|'''Send Diplomatic Envoy'''&lt;br /&gt;
&lt;br /&gt;
Function: send a diplomatic envoy for specific diplomatic missions.&lt;br /&gt;
&lt;br /&gt;
Format: SEND_ENVOY*faction ID (refer to player’s faction when empty)#diplomatic behaviour (1: Ransom; 2:Friendly; 3: War; 4: Alliance; 5: Alliance broke; 6: Armistice)#target ID (when you ransomed a character, it is the character ID; otherwise it is the target faction ID)#additional parameter(usually it is the required amount of money)#envoy arrival (1: No waiting time; 0: Need to wait).&lt;br /&gt;
|-&lt;br /&gt;
|DIP_DECIDE&lt;br /&gt;
|'''Execute Diplomatic Event Check'''&lt;br /&gt;
&lt;br /&gt;
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event).&lt;br /&gt;
&lt;br /&gt;
Format: DIP_DECIDE*result code (1: Agreement; 0: Decline).&lt;br /&gt;
|-&lt;br /&gt;
|EXPEL_ROLE&lt;br /&gt;
|'''Expel Character'''&lt;br /&gt;
&lt;br /&gt;
Function: expel a character out of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: EXPEL_ROLE*faction ID#character ID.&lt;br /&gt;
|-&lt;br /&gt;
|TRY_REWARD_ROLE&lt;br /&gt;
|'''Try to Reward a Follower'''&lt;br /&gt;
&lt;br /&gt;
Function: try to reward a follower.&lt;br /&gt;
&lt;br /&gt;
Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Add Global Buff to Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: add a global buff to the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_GLOBAL_BUFF*buffID#duration (in-game days)#number of stacks (set 1 by default)#upper limit of stacks (set -1 by default, no limit).&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF*buffID&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF_BYCLASS&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove All Global Buffs of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all global buffs of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_FAILED&lt;br /&gt;
|'''Game Failed'''&lt;br /&gt;
&lt;br /&gt;
Function: a common result of the player failing their game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_FAILED*1.&lt;br /&gt;
|-&lt;br /&gt;
|LOSE_INVENTORY&lt;br /&gt;
|'''Player Loses Common Items'''&lt;br /&gt;
&lt;br /&gt;
Function: the player loses their items once (only goods and money).&lt;br /&gt;
&lt;br /&gt;
Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGROLE&lt;br /&gt;
|'''Change Object Character of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object character of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGPLACE&lt;br /&gt;
|'''Change Object Location of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object location of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGPLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|SURRENDER&lt;br /&gt;
|'''Faction Surrenders'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender).&lt;br /&gt;
&lt;br /&gt;
Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter&lt;br /&gt;
|-&lt;br /&gt;
|GEN_RND_PLACE&lt;br /&gt;
|'''Select Random Location to Query'''&lt;br /&gt;
&lt;br /&gt;
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives.&lt;br /&gt;
&lt;br /&gt;
Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction)&lt;br /&gt;
|-&lt;br /&gt;
|HERO_UPGRADE&lt;br /&gt;
|'''Hero Enhancement'''&lt;br /&gt;
&lt;br /&gt;
Function: enhance an attribute permanently of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit).&lt;br /&gt;
|-&lt;br /&gt;
|HERO_SET_STATU&lt;br /&gt;
|'''Set Character Attribute Field'''&lt;br /&gt;
&lt;br /&gt;
Function: set a value of an attribute field for a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_BUFF&lt;br /&gt;
|'''BUFF Add Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: add a faction buff to a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_BUFF*faction ID#buff ID#duration (in-game days; when this value is lower than 0, the buff becomes permanent unless it is removed compulsorily).&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF&lt;br /&gt;
|'''Remove Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF*faction ID#buff ID.&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF_BYCLASS&lt;br /&gt;
|'''Remove Faction Buff by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''Remove All Faction Buffs'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all faction buffs from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Add Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: add a dynamic attribute field to a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Reset Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: reset all values in the dynamic attribute field in a faction.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_CAMP_EXTRA_STATU*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|WEAPON_DURABILITY_DOWN&lt;br /&gt;
|'''Weapon Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of the current weapon. When the durability is below 0, the weapon is destroyed. If the weapon’s durability is -1 (does not have durability), nothing happens with this directive.&lt;br /&gt;
&lt;br /&gt;
Format: WEAPON_DURABILITY_DOWN*value.&lt;br /&gt;
|-&lt;br /&gt;
|ITEM_DURABILITY_DOWN&lt;br /&gt;
|'''Specific Item Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of an item (with the right tag and meets the level condition(&amp;gt;= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed.&lt;br /&gt;
&lt;br /&gt;
Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SYNTH_STATE&lt;br /&gt;
|'''Set Status of Recipe'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific recipe.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned)&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SYNTH_DLG&lt;br /&gt;
|'''Open Item Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of item crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SYNTH_DLG*if locked (0: Do not lock the main category; 1: Lock display category)#catagory page shown by default (can be set empty by default; use “,” to separate pages; show the first page by default; this field can show hidden categories when the main category is locked)#story key to execute after closing the crafting dialogue (can be empty).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CARD_SYNTH_DLG&lt;br /&gt;
|'''Open Card Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of card crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CARD_SYNTH_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_EFT&lt;br /&gt;
|'''Play Special Effect'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect on the current map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#map coordinate#initial rotation degree (can be the rotation vector of the three directions or a spinning degree of the Y-axis)#scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_MU_EFT&lt;br /&gt;
|'''Unit Following Special Effect on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect that follows a unit on a specific map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_MU_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#map unit ID#object range (0: hero only; 1: all units)#initial rotation degree (can be the rotation vector of the three directions, or a spinning degree of the Y-axis))# scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_MAPAREA_SELECTOR&lt;br /&gt;
|'''Open Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a UI panel of area selector on the current sandbox map. You can select a location for the current object in the predefined area on this panel, and then a result is returned. If the result_code returns 1, the location setting succeeded; if 0, the setting failed. The location info is recorded in [$last_selpos$].&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_FREEAREA_SELECTOR&lt;br /&gt;
|'''Open Free Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_SELECTOR&lt;br /&gt;
|'''Open Location Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a suggested location selector panel. Selected result will be stored in [$tagplace$], its number stored in [%result_code%].If [%result_code%] is 9999, player cancels the selection. &lt;br /&gt;
&lt;br /&gt;
Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter).&lt;br /&gt;
|-&lt;br /&gt;
|SET_LORD&lt;br /&gt;
|'''Set City Ruler'''&lt;br /&gt;
&lt;br /&gt;
Function: set a city ruler for a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_LORD*character ID#location ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_CHEST&lt;br /&gt;
|'''Add a Custom Chest'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom chest on the world map according to the setting info (this “chest” can be any interactive object on the world map, such as materials, ruins, and soldier recruitment point).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (&amp;gt;0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CHEST&lt;br /&gt;
|'''Set Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a controllable chest on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CHEST*map ID#chest ID#status (&amp;gt;0: How many times you can open the chest; &amp;lt;=0: Chest Opened).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CURCHEST&lt;br /&gt;
|'''Set Current Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of the target chest in the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CURCHEST*statu (same as SET_CHEST).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_SYSTEM_UI&lt;br /&gt;
|'''Turn Off System UI'''&lt;br /&gt;
&lt;br /&gt;
Function: turn of the current system UI.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_SYSTEM_UI*.&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_ITEM_PANEL&lt;br /&gt;
|'''Close Bag UI'''&lt;br /&gt;
&lt;br /&gt;
Function: close the current UI panel of the player’s bag (if it exists).&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_ITEM_PANEL*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLES_SELECTOR&lt;br /&gt;
|'''Turn Off Character Selector UI'''&lt;br /&gt;
Function: turn off the current system UI of the character selector.&lt;br /&gt;
&lt;br /&gt;
Format: ROLES_SELECTOR*title of selection list box#number limit of options (&amp;lt;0: No limit)#option range (0: Global non-template character; 1: Player squad character; 2: Character in the Character Table)#conditional expression#parameter (the parameter is the character list when the selection range is the specific Character Table).&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
 ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&amp;amp;[$tagrole:campid$][&amp;lt;&amp;gt;][$null$]#&lt;br /&gt;
 ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4.&lt;br /&gt;
The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%].&lt;br /&gt;
|-&lt;br /&gt;
|ASK_ABOUT_SOMEBODY_SELECTOR&lt;br /&gt;
|'''Ask-about Character Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: the character who you ask whereabout of is currently not involved in the logic calculation. The character selection list box pops up, and the result is stored in [%arg_str_val1%]. When the result [%result_code%] is 9999, player cancels the selection.&lt;br /&gt;
&lt;br /&gt;
Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about.&lt;br /&gt;
|-&lt;br /&gt;
|CARD_SELECTOR&lt;br /&gt;
|'''Card Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: show the panel of current card list for the player to select.&lt;br /&gt;
&lt;br /&gt;
Format: CARD_SELECTOR*title of selection list box#number limit of selection (&amp;lt;0: No limit)#selection range (0: Card in the player squad; 2: Specific unit list) #parameter (optional; the parameter is the unit list when the selection range is the specific Unit Table).&lt;br /&gt;
|-&lt;br /&gt;
|ASSEMBLE_ARMY&lt;br /&gt;
|'''Gather Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: gather all troops and followers of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ASSEMBLE_ARMY#Gatherer ID#follower ID (can be empty; use “|” to separate; can use [%last_seled_roles%], the result of ROLES_SELECTOR). If the follower ID is empty, all characters under the faction are selected by default.&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_ALL_ASSEMBLE_ARMY&lt;br /&gt;
|'''Dismiss All Gathered Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss all troops that have been gathered or gathering.&lt;br /&gt;
&lt;br /&gt;
Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_IN_PROJECT&lt;br /&gt;
|'''Character Starts to Execute Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a character starts to execute a specific project.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_IN_PROJECT*character ID#project ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_FINISH_PROJECT&lt;br /&gt;
|'''Character Ends Current Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific character ends their current project compulsorily.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,...&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PROJECT_ADMIN&lt;br /&gt;
|'''Open Personal Project Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the personal project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default).&lt;br /&gt;
|-&lt;br /&gt;
|GROUP_PROJECT_ADMIN&lt;br /&gt;
|'''Open Group Project Panel'''&lt;br /&gt;
Function: open the group project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default).&lt;br /&gt;
 Currently, supported project binding types are:&lt;br /&gt;
 Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty&lt;br /&gt;
 world: custom building construction; object parameter format: custom area control ID; belong to which base (when this field is empty, the building does not belong to any city).&lt;br /&gt;
|-&lt;br /&gt;
|SET_REVIVE_POS&lt;br /&gt;
|'''Set Respawn Position'''&lt;br /&gt;
&lt;br /&gt;
Function: set a new respawn position.&lt;br /&gt;
&lt;br /&gt;
Format: SET_REVIVE_POS*world map position (map ID:x,y).&lt;br /&gt;
|-&lt;br /&gt;
|SET_SILENCE_MODE&lt;br /&gt;
|'''Set Silence Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable message silence mode. &lt;br /&gt;
&lt;br /&gt;
Format: SET_SILENCE_MODE*silence mode (0: Disabled; 1: Do not show TOAST box and deliver messages only; TOAST info of obtaining items is shown in the message; 2: Do not show TOAST and messages).&lt;br /&gt;
|-&lt;br /&gt;
|START_RAID_PLACE&lt;br /&gt;
|[Abolished]&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_PLACE&lt;br /&gt;
|'''Add Custom Location'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom location on a specific spot on the world map.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_PLACE*custom location ID (globally unique)#belong to the city (can be empty; the location does not belong to any city when this field is empty#location info template ID#location info#default faction of the location.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_NAME&lt;br /&gt;
|'''Change Location Name'''&lt;br /&gt;
&lt;br /&gt;
Function: change the name of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_NAME*location ID#custom name. &lt;br /&gt;
|-&lt;br /&gt;
|OPEN_PLACE_BUILD_UI&lt;br /&gt;
|'''Open Location Building Construction Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the location building construction panel.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD&lt;br /&gt;
|'''Add New Card'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD_PIECE&lt;br /&gt;
|'''Add Card with Specific Durability'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card, whose durability is a specific number (lower than the durability limit).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|SET_OBS_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of an obstacle area on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_AREA&lt;br /&gt;
|'''Explore Area'''&lt;br /&gt;
&lt;br /&gt;
Function: explore an area of the current map (dispel the war fog).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_MAP&lt;br /&gt;
|'''Explore the Whole Map'''&lt;br /&gt;
&lt;br /&gt;
Function: explore the whole map (dispel the war fog of the entire map).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_MAP*map ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTVAL_WATCHER&lt;br /&gt;
|'''Add Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. &lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTVAL_WATCHER*variable monitor info.&lt;br /&gt;
&lt;br /&gt;
(Format: field Key1,displayed name1,enumerated value 1a=enumerated name1a|enumerated value 1b=enumerated name1b|...|enumerated value 1N=enumerated name 1N, visibility status in battles([optional，set 0 by default] 0: No; 1: Yes);...; monitor field info N).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTVAL_WATCHER&lt;br /&gt;
|'''Remove Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom variable monitor filed.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTVAL_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_INTVAL_WATCHERS&lt;br /&gt;
|'''All Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: exact all variable monitor fields.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_INTVAL_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set an event timer, and a specific event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (&amp;lt;0: the timer is closed; when the timer type is Preset, this parameter is the number of days since the beginning of the game; when the timer type is Countdown, the parameter is the number of days)#timer type (0: Preset (triggered when time is reached); 1: Countdown)#Event ID when time reached#compulsory update (1: Compulsory update; 0: Non-compulsory update(will not change the current data of existing timer); set 1 if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER&lt;br /&gt;
|'''Remove Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER*timer ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TIMER_TIME&lt;br /&gt;
|'''Change Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: increase/decrease the time of a timer.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_TIMER_WATCHER&lt;br /&gt;
|'''Add Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] &lt;br /&gt;
&lt;br /&gt;
coefficient of the scaling of time parameter), visibility in battles ([optional; set 0 by default]; 0: No; 1: Yes)|...|timer ID N, displayed time format N, scale parameter N.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER_WATCHER&lt;br /&gt;
|'''Remove Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the monitor field of a custom event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_TIMER_WATCHERS&lt;br /&gt;
|'''Clear All Monitor Fields of Custom Event Timer''' &lt;br /&gt;
&lt;br /&gt;
Function: clear all monitor fields of custom event timer.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_TIMER_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_RECRUIT_CARD_IN_PLACE&lt;br /&gt;
|'''Open City Recruitment Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the player’s recruitment panel in a city.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_RECRUIT_CARD_IN_PLACE*city ID#ID of the event executed after recruitment (optional)#ID of the event executed after player cancels the recruitment (optional).&lt;br /&gt;
|-&lt;br /&gt;
|STORY_CARD_START&lt;br /&gt;
STORY_CARD_LINE&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END&lt;br /&gt;
|'''Open Story Card (2D Image)''' '''Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the story card panel. There must be a STORY_CARD_START and a STORY_CARD_END to avoid errors. STORY_CARD_LINE stands for the story paragraphs that need to be put between the start and the end (no number limit).&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_START*file name of the card.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 1.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 2.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 3.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END*.&lt;br /&gt;
|-&lt;br /&gt;
|AUTOSAVE&lt;br /&gt;
|'''AutoSave'''&lt;br /&gt;
&lt;br /&gt;
Function: execute autosave immediately.&lt;br /&gt;
&lt;br /&gt;
Format: AUTOSAVE*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Saving Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game-saving dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SAVE_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Loading Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game loading dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_LOAD_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|EXCHANGE_CARD&lt;br /&gt;
|'''Open Card Exchange Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the card exchange panel.&lt;br /&gt;
&lt;br /&gt;
Format: EXCHANGE_CARD*object type (0: Location; 1: Squad)#object ID([optional; set to be the current location by default]; when the object is a location, the ID is the location ID, squad ID for squad object).&lt;br /&gt;
|-&lt;br /&gt;
|LEVEL_FINISH&lt;br /&gt;
|'''Complete Level'''&lt;br /&gt;
&lt;br /&gt;
Function: used in scenarios to indicate the accomplishment of a level.&lt;br /&gt;
&lt;br /&gt;
Format: LEVEL_FINISH*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA_FILTER&lt;br /&gt;
|'''Set Camera Filter'''&lt;br /&gt;
&lt;br /&gt;
Function: set a filter for the camera. &lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10).&lt;br /&gt;
&lt;br /&gt;
Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100.&lt;br /&gt;
|-&lt;br /&gt;
|TLACTION&lt;br /&gt;
|'''Timeline Action'''&lt;br /&gt;
&lt;br /&gt;
Function: specific units on the world map do TIMELINE actions.&lt;br /&gt;
&lt;br /&gt;
Format: TLACTION*map character ID#file name of Timeline action#lasting time of action.&lt;br /&gt;
|-&lt;br /&gt;
|SELECTION_VIEW&lt;br /&gt;
|'''Fullscreen Special Story Selection'''&lt;br /&gt;
&lt;br /&gt;
Function: open a fullscreen selection panel of a special story.&lt;br /&gt;
&lt;br /&gt;
Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*).&lt;br /&gt;
|-&lt;br /&gt;
|DIALOG_BUBBLE&lt;br /&gt;
|'''Map Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying.&lt;br /&gt;
|-&lt;br /&gt;
|TEXT_EXPLORE_START&lt;br /&gt;
TEXT_EXPLORE_OVER&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD&lt;br /&gt;
|'''Text Adventure Relevant'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific text adventure mode.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_OVER*. Ends the current instance.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_CG&lt;br /&gt;
|'''Show CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: create an interface for showing CG images (please note: after enabling this function, you need to use HIDE_CG* manually to hide the CG. Otherwise the CG will get to player).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_CG*image name (no suffix; if this field is empty, the background will become black. The relevant directory is: Assets\BuildSource\Backgrounds\. Only .png file accepted).&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_CG&lt;br /&gt;
|'''Hide CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: hide the CG interface.&lt;br /&gt;
&lt;br /&gt;
Format: HIDE_CG*.&lt;br /&gt;
|-&lt;br /&gt;
|GENERATE_RANDOM_CARD&lt;br /&gt;
|'''Select a Card Randomly'''&lt;br /&gt;
&lt;br /&gt;
Function: select a card randomly, which will be stored in the tag card of the current variable.&lt;br /&gt;
&lt;br /&gt;
Format: GENERATE_RANDOM_CARD#1.&lt;br /&gt;
|-&lt;br /&gt;
|VOICE_OVER&lt;br /&gt;
|'''Voice Over'''&lt;br /&gt;
&lt;br /&gt;
Function: show a voice-over interface.&lt;br /&gt;
&lt;br /&gt;
Format: VOICE_OVER*voice over the content.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_STORYARMY&lt;br /&gt;
|'''Create a Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad only for stories.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_STORYARMY*tagkey#map position#faction#character list (all selected characters will leave their current squads or locations compulsorily)#card unit list (card ID1,number1,level1|card ID2,number 2,level 2|.......)#movement info (e.g., WANDER,2500).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_STORYARMY&lt;br /&gt;
|'''Remove Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a story squad.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_STORYARMY*tagkey.&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_BUY_ITEM&lt;br /&gt;
|'''Bazaar Merchant Buy-in'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants buy items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_SELL_ITEM&lt;br /&gt;
|'''Bazaar Merchant Sell-out'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants sell items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SHOWROLE&lt;br /&gt;
|'''Show Character Painting'''&lt;br /&gt;
Function: show character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;painting position &lt;br /&gt;
|-&lt;br /&gt;
|HIDEROLE&lt;br /&gt;
|'''Hide Character Painting'''&lt;br /&gt;
Function: hide character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: HIDEROLE*position of character 1 painting (#position of character 2 painting) (optional).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; L stands hiding the painting on the left side, R for hiding the painting on the right side.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_QUEST_ASK&lt;br /&gt;
|'''Mission Query'''&lt;br /&gt;
&lt;br /&gt;
Function: add a mission query that meets conditions based on the standard SELECT directive.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_QUEST_ASK*.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TEAMROLE&lt;br /&gt;
|'''Select Squad Character'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character from a squad.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TEAMROLE*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PLAYER_ACTIVE&lt;br /&gt;
|'''Activate Character Indo Status'''&lt;br /&gt;
&lt;br /&gt;
Function: make a character visible on the “Report” interface and import the character ID (this is usually used in scenarios. E.g., the tavern ladies).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PLAYER_ACTIVE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_ORDER&lt;br /&gt;
|'''Built-in Character Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: give some built-in directives to a character and execute these directives immediately. &lt;br /&gt;
&lt;br /&gt;
Format: ROLE_ORDER*character ID [refer to the current target character when this field is empty]#directive code: refer to Directive Parameter Table.&lt;br /&gt;
&lt;br /&gt;
The current directive code supports:&lt;br /&gt;
&lt;br /&gt;
*RETURN_JOBCITY: the character goes back to the location they belong to. No parameter. If the character is the squad leader, the squad directive is changed directly; if the character is not a squad leader, they leave the current squad and go back to the original squad; if they are in another location, they create a squad and return.&lt;br /&gt;
&lt;br /&gt;
*GOTO_PLACE: the character goes to the target location. The parameter is the target location ID.&lt;br /&gt;
&lt;br /&gt;
*JOIN_PLAYER_TEAM: the character joins the player’s squad directly. No parameter.&lt;br /&gt;
&lt;br /&gt;
*FOLLOW_ME: the character comes to rally and follows the player’s squad. No parameter.&lt;br /&gt;
&lt;br /&gt;
*EXPEL_FROM_CAMP: expel the character from their faction. No parameter.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTERACTIVE_MSG&lt;br /&gt;
|'''Add Interactive Message'''&lt;br /&gt;
Function: add a custom interactive message and show it in the corresponding UI.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTERACTIVE_MSG*info type#title#info text #parameter text#duration(&amp;lt;=0: Permanent; &amp;gt;0: number of days)#message sender info #TAG parameter.&lt;br /&gt;
&lt;br /&gt;
Currently supported message types are:&lt;br /&gt;
&lt;br /&gt;
msg (message); request; finance.&lt;br /&gt;
&lt;br /&gt;
When the message type is not financed, the format of the parameter text is:&lt;br /&gt;
 Parameter Key1: parameter value 1;parameter Key2:parameter value 2;...;parameter Key N:parameter N&lt;br /&gt;
Currently, the built-in KEY types of system are:&lt;br /&gt;
&lt;br /&gt;
*ask: assign this message to be a request with at most 2 directive options according to the parameter. Format: ask: option 1 text=event ID of option 1 [: option 2 text=event ID of option 2].&lt;br /&gt;
&lt;br /&gt;
E.g., ask: “Yes”=Event1: “No”=Event2. &lt;br /&gt;
&lt;br /&gt;
*items: assign this message to be a message of obtaining the item table. The parameter is the corresponding item list info. E.g., items: money,10000|紫金之刃,1,mf=0-3|黄金之枪,1,mf=0-3|幻刃月光,1,mf=0-3.&lt;br /&gt;
*You can define other fields, and use [$tagmsg:arg=parameter KEY$] (in the triggered directive of interactive messages) to query the value of the corresponding parameter field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the message type is finance, the format of the parameter text is:&lt;br /&gt;
 Receipt field 1=receipt detail list (format: resource 1, number 1| resource 2, number 2|…|resource N, number N); receipt field 1= receipt detail list; […]; receipt field N=receipt detail list.&lt;br /&gt;
Message sender format: sender type: sender ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported sender types are:&lt;br /&gt;
&lt;br /&gt;
*0: system; empty ID.&lt;br /&gt;
&lt;br /&gt;
*1: character; ID= character ID.&lt;br /&gt;
&lt;br /&gt;
*2: location; ID= location ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TAG parameter is a random string field TAG used to mark.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive message that meets specific conditions. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTERACTIVE_MSG*message type#sender info#TAG parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message type and TAG parameter can be empty (no type or TAG limit).&lt;br /&gt;
&lt;br /&gt;
Format of sender info: ADD_INTERACTIVE_MSG.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_THIS_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Current Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the current interactive message of the existing environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_THIS_INTERACTIVE_MSG*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.1.3 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_HEADAVATA&lt;br /&gt;
|'''Change Player Painting Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the painting of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_HEADAVATA*character painting ID.&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_MODEL&lt;br /&gt;
|'''Change Player Model Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the model of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_MODEL*model ID.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.2.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_INTVAR_CONFIG&lt;br /&gt;
|'''Show Option Panel of Configurable Custom Int Field'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom field configuration panel in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_INTVAR_CONFIG*mode(0: Create game mode; 1: In-game mode).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_MARKER&lt;br /&gt;
|'''Add or Set Custom Mark on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: add or set a custom mark on the world map. When the mark ID already exists, the older mark info will be covered.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_MARKER*mark ID#title#annotation info #map position info#file name of mark image (this field can be empty; set to be &amp;quot;map_flag&amp;quot; by default; this mark image is a PNG image resource under directory“\BuildSource\map_res\MinimapMakers\”).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_MAP_MARKER&lt;br /&gt;
|'''Remove a Custom Map Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a custom mark on the map with a specific ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_MAP_MARKER*mark ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|RUN_SCRIPT_FUNC&lt;br /&gt;
|'''Execute Function of Specific Lua Script'''&lt;br /&gt;
&lt;br /&gt;
Function: execute the standard function of a specific Lua script.&lt;br /&gt;
&lt;br /&gt;
Format: RUN_SCRIPT_FUNC*file name of the relative directory of script (same as RUN_SCRIPT)#standard function name (the function name in the script; the parameter is the imported environment variable).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_GUI&lt;br /&gt;
|'''Open Custom GUI Form'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom GUI form.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_GUI*GUI pack name#form component name#script file path of the form (relative script root directory “Asset\BuildSource\LuaScripts\”. No file expansions)#form parameter(format: json format. E.g., {&amp;quot;arg1&amp;quot;:&amp;quot;val1&amp;quot;,&amp;quot;arg2&amp;quot;:&amp;quot;val2&amp;quot;})#block directive queue (default 0: Yes; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CONTAINER_GUI&lt;br /&gt;
|'''Open Container GUI'''&lt;br /&gt;
&lt;br /&gt;
Function: open a defined container GUI.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CONTAINER_GUI*container ID (instance ID used to identify)#template info ID (info ID defined in Container Definition Table).&lt;br /&gt;
&lt;br /&gt;
When the parameter list is empty or is “This”, the specific container in the current environment variable (if existed) will be opened. E.g., OPEN_CONTAINER_GUI*THIS.&lt;br /&gt;
|-&lt;br /&gt;
|CONTAINER_CMD&lt;br /&gt;
|'''Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a specific directive for a particular container in the current environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: CONTAINER_CMD*container directive type#parameter 1#parameter 2#...#parameter N&lt;br /&gt;
&lt;br /&gt;
Currently supported collective built-in directive types are:&lt;br /&gt;
&lt;br /&gt;
add_exp: add EXP to all cards in the container. The parameter is the EXP value.&lt;br /&gt;
&lt;br /&gt;
add_items: add a specific element into the container (E.g., the format of the item container is: CONTAINER_CMD*add_items#item 1,10|item 2,5 ；format of the card container is: ID list of cards, separated by “|”).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CONTAINER_CMD&lt;br /&gt;
|'''Location Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: see a location as a container object and execute the same container directives.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CONTAINER_CMD*location ID (when this field is empty or “THIS”, refer to the location assigned by the current environment parameter)#container directive list (same as CONTAINER_CMD parameters).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP&lt;br /&gt;
|'''Set Map Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the visibility of a specific map. &lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP*map ID#status value (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_LUAENV&lt;br /&gt;
|'''Reset Current LUA Environment'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the current environment of LUA script and clear cache; this directive can be used when you need to debug the LUA script but do not want to restart the game.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_LUAENV*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.4.1 or above version'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_ARG_INT&lt;br /&gt;
|'''Set Parameter Value in Current Environment Variable'''&lt;br /&gt;
&lt;br /&gt;
Function: set the int parameter value stored in the environment variable of the current script (correspond to [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ARG_INT*new value#target parameter index (optional;set to be 0 by default; 0~2 correspond to [%arg_int_val1%] ~ [%arg_int_val3%] respectively).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Global Save Directive===&lt;br /&gt;
Global save is a type of saving used to record some data shared by all saves. Data recorded in the global save can be accessed in all saves after being changed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_INTVAR&lt;br /&gt;
|'''Set Custom Int Variable of Global Save''' &lt;br /&gt;
&lt;br /&gt;
Function: set a custom int variable in the global save. The variable, recorded in the global save, can be accessed via the [%global_int:ID%] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_INTVAR*variable ID#current int value.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_GLOBAL_INTVAR&lt;br /&gt;
|'''Change Custom Int Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: change a custom int variable in the global.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_GLOBAL_INTVAR*variable ID#value change (can be a negative number)#minimum value (optional; no limit if this field is empty)#maximum value (optional; no limit if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_STRVAR&lt;br /&gt;
|'''Set Custom String Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom string variable. The variable, recorded in the global save, can be accessed via the [$global_str:ID$] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_STRVAR*variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|PUSH_GLOBAL_ROLES&lt;br /&gt;
|'''Globally Save Character Status'''&lt;br /&gt;
&lt;br /&gt;
Function: save specific character list to the global character status list.&lt;br /&gt;
&lt;br /&gt;
Format: PUSH_GLOBAL_ROLES*custom global save Key#character ID (this character can only be a non-template character).&lt;br /&gt;
|-&lt;br /&gt;
|PULL_GLOBAL_ROLES&lt;br /&gt;
|'''Load Character Status from Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: load the status of specific character list from the global character status list, and apply it to the current game mode.&lt;br /&gt;
&lt;br /&gt;
Format: PULL_GLOBAL_ROLES*custom global save KEY (the character of this KEY must be a character from the character template of the current game mode.&lt;br /&gt;
|-&lt;br /&gt;
|LOCK_CMD_QUEUE&lt;br /&gt;
|'''Lock Current Directive Queue'''&lt;br /&gt;
&lt;br /&gt;
Function: lock the current directive queue. The directive queue will not be cleared after switching from different game saves or resetting the game modes.&lt;br /&gt;
&lt;br /&gt;
Format: LOCK_CMD_QUEUE*lock queue (0: No;1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SWITCH_GAME_MODE&lt;br /&gt;
|'''Switch Game Modes'''&lt;br /&gt;
&lt;br /&gt;
Function: switch to the target game mode and load it.&lt;br /&gt;
&lt;br /&gt;
Format: SWITCH_GAME_MODE*target game mode ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Built-in Directive List===&lt;br /&gt;
Built-in directives are directives used to realize certain functions inside the program, usually for some specific scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|ENCOUNTER&lt;br /&gt;
|'''Creep Encountering UI'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info panel of the creep encountered.&lt;br /&gt;
&lt;br /&gt;
Format: ENCOUNTER*1.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_INFO_DLG&lt;br /&gt;
|'''Chest Guardian Info Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info dialogue of the chest guardian.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_INFO_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_COST_DLG&lt;br /&gt;
|'''Price of Chest Opening Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open a dialogue to show the price of opening a chest.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_COST_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_CALLBACK&lt;br /&gt;
|'''Logic Callback of Chest Opening'''&lt;br /&gt;
&lt;br /&gt;
Function: command a logic callback of chest opening.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_CALLBACK*callback value (1: Defeat the guardian; 2: Opening completed)#target chest ID.&lt;br /&gt;
|}&lt;br /&gt;
===Preset Fields of Scripts and Their Meanings===&lt;br /&gt;
Sometimes we use certain directives to refer to specific objects in script editing. For example, we can use CUR_ROLE to replace the ID of the current character player encountered. We can realize some common application scenarios via script editing. &lt;br /&gt;
&lt;br /&gt;
Currently, supported preset fields are: &lt;br /&gt;
&lt;br /&gt;
*CUR_ROLE: ID of current character template encounter, used primarily for dialogue and selection list box&lt;br /&gt;
*CUR_BATTLE: ID of the battle between player and refreshed unit encountered on the current map&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Script Directive of Results in Scenario Event===&lt;br /&gt;
The format of script directives of results in a scenario event is (separated by a line break): &lt;br /&gt;
 conditional expression group 1: executed command 1&lt;br /&gt;
 conditional expression group 2: executed command 2&lt;br /&gt;
 ...&lt;br /&gt;
 conditional expression group N: executed command N&lt;br /&gt;
Execute the command: judge conditional expression group 1 first, if the conditions are met, execute command 1. Otherwise, judge conditional expression group 2……judge all listed groups until one group of conditions is met, or all conditions are not met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Conditional Expression Group===&lt;br /&gt;
A conditional expression group consists of multiple conditional expression like “[%CONDITION%][=]1”, and the expressions are connected by “|” (Or) or “&amp;amp;” (And). '''The priority of “&amp;amp;” (And) is higher than “|” (Or)'''. When both sides of the expression are integer characters, return the comparison result of the two values. Otherwise, compare the strings, and only [=] and [&amp;lt;&amp;gt;] judgements are supported.&lt;br /&gt;
&lt;br /&gt;
For example:  &lt;br /&gt;
&lt;br /&gt;
 [%result_code%][=]1|[%player_money%][&amp;gt;=]100 means “execute when the result is 1 or when the player has 100 utars”.&lt;br /&gt;
 [%player:level%][&amp;gt;=]3&amp;amp;[%player_money%][&amp;gt;]100 means “execute when player’s level is 3 or above, and they have more than 100 utars”.&lt;br /&gt;
&lt;br /&gt;
'''The followings are the comparison symbols in conditional expressions:'''&lt;br /&gt;
&lt;br /&gt;
*[=]: equal&lt;br /&gt;
*[&amp;gt;]: larger than&lt;br /&gt;
*[&amp;gt;=]: greater than or equal to&lt;br /&gt;
*[&amp;lt;]: less than&lt;br /&gt;
*[&amp;lt;=]: less than or equal to&lt;br /&gt;
*[&amp;lt;&amp;gt;]: not equal to&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game Data Calculation Expression System===&lt;br /&gt;
We can embed some value expressions like “[&amp;amp;expression&amp;amp;]” in many places in the game (e.g., the status value of the BUFF list)&lt;br /&gt;
&lt;br /&gt;
In value expression, the basic mathematic calculation is supported. Currently, supported calculation symbols are: &lt;br /&gt;
&lt;br /&gt;
*+: addition&lt;br /&gt;
*-: subtraction&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;*: multiplication&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*/: division&lt;br /&gt;
*%: modulo (take the remainder)&lt;br /&gt;
*^: exponentiation&lt;br /&gt;
*( ) : change the priority of calculation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the expression takes the @func(expression1, expression2...) format, call the relevant built-in function to return the calculation result. Currently supported built-in functions are (note: these built-in functions are can only be used in the calculation of the most external layer): &lt;br /&gt;
&lt;br /&gt;
*@min(a,b): return the smaller value between a and b&lt;br /&gt;
*@max(a,b): return the greater value between a and b&lt;br /&gt;
&lt;br /&gt;
E.g., in a specific piece of data, [&amp;amp;1+2*3&amp;amp;] will be replaced by 7, [&amp;amp;@max(1+2*3, 8)&amp;amp;] will be replaced by 8, [&amp;amp;@min(1+2*3, 8)&amp;amp;] will be replaced by 7……&lt;br /&gt;
&lt;br /&gt;
'''Please note: for scripts and skill directives in battles, you can use the “[@expression@]” format to embed some expressions to return a decimal result.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Embedded Query Directive in Scenario Event===&lt;br /&gt;
There are many places in the game that support embedded query directives, through which we can insert values or query result of the string type in texts or conditional expressions. All embedded query directives follow the format of [%QUERY:arg1:arg2...%] or [$QUERY:arg1:arg2...$] (these two formats are the same) to insert to the target position.&lt;br /&gt;
&lt;br /&gt;
'''Note: currently you cannot re-embed a query directive in a query.'''&lt;br /&gt;
&lt;br /&gt;
Currently, supported query directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Return the last directive result that can cause “return” in the current event (E.g., an option that stands for “return” of the selection list box, input value and battle result, in the script of scenario events).&lt;br /&gt;
Following are the different meanings of result_code in various directive types. &lt;br /&gt;
&lt;br /&gt;
*It means the option ID when returning from the selection list box.&lt;br /&gt;
*When returning after battles:  0: Battle won; 1: Battle failed.&lt;br /&gt;
*It means the input number when returning for an integer input box.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_num%]&lt;br /&gt;
|Return an integer. (0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_range:A:B%]&lt;br /&gt;
|Return a random number that is greater than A but smaller than B.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the random number that was generated last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|The amount of the player’s money.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_wood%]&lt;br /&gt;
|The amount of the player’s wood.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_iron%]&lt;br /&gt;
|The amount of player’s ironstone.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_jade%]&lt;br /&gt;
|The amount of player’s jade.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_food%]&lt;br /&gt;
|Player’s current Hunger.&lt;br /&gt;
|-&lt;br /&gt;
|[%game_time%]&lt;br /&gt;
|Number of in-game days currently.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_night%]&lt;br /&gt;
|Judge whether it is nighttime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_daytime%]&lt;br /&gt;
|Judge whether it is daytime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%mod_day:MOD%]&lt;br /&gt;
|Number of the in-game day divided by MOD, take the remainder&lt;br /&gt;
|-&lt;br /&gt;
|[%generate_rob_money%]&lt;br /&gt;
|Generate the amount of money when the player is robbed under the current level.&lt;br /&gt;
|-&lt;br /&gt;
|[%rob_money%]&lt;br /&gt;
|Generate the amount of money when the player was robbed last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_ts:ID%]&lt;br /&gt;
|Return the current status of a trigger (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es:ID%]&lt;br /&gt;
|Return the current status of a scenario event (-1: Not executed; otherwise, return Result Code).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_first_time:ID%]&lt;br /&gt;
|Return the first completion time of a scenario event.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_time_score:ID:minTime:maxTime:maxScore%]&lt;br /&gt;
|Return the first completion time score of a scenario event. minTime is the shortest completion time (time before the shortest time brings a full score); maxTime is the longest completion time (time before the longest time brings a zero score); maxScore is the highest score.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val:ID%]&lt;br /&gt;
|Return the custom int value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val_for_calc:ID%]&lt;br /&gt;
|Return the custom int value, whose numbering is its ID, to calculate. There must a result. If the ID does not exist, the result is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%str_val:ID%]&lt;br /&gt;
|Return the custom string value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_num%]&lt;br /&gt;
|The current number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_max%]&lt;br /&gt;
|Maximum number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_name:兵种key%]&lt;br /&gt;
|Return the name of a certain minion.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a certain item in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag:tag%]&lt;br /&gt;
|Return the number of an item with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag_and_level:tag:level%]&lt;br /&gt;
|Return the number of an item, whose item level &amp;gt;= level, with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_qualify_as_present:present_desc%]&lt;br /&gt;
|Return the number of a certain item whose gift description string meets requirements in the player’s bag. For the format of gift description string, please see the “Like” format in the Tag column of “人物列表”(Character Table) (Excel).&lt;br /&gt;
|-&lt;br /&gt;
|[%item_name:物品ID%]&lt;br /&gt;
|Return the displayed name of an item.&lt;br /&gt;
|-&lt;br /&gt;
|[%admin_level%]&lt;br /&gt;
|Return the administration status of the player in the current location (0: None; 1: Appointed; 2: City ruler; 3: Faction leader).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; take a rounding integer number after (current time-ID time)).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse_by_day:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; (current day- the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current time-ID time) and take the rounding integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse_by_day%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current day-the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_custom_cd:ID%]&lt;br /&gt;
|Return the result of whether a custom cooldown (whose numbering is its ID) is ready (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%has_gametime_elapse_tag:ID%]&lt;br /&gt;
|Query whether the custom game time ID mentioned above exists (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%realtime_elapse:ID%]&lt;br /&gt;
|Return the realistic period since the setting of last custom time point ID (count by second).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID%]&lt;br /&gt;
|Return the status of specific mission ID (0: Unclaimed; 1: Ongoing; 2: Unfinished; 3: Ended).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID:index%]&lt;br /&gt;
|Return the subevent value of specific mission ID (index is the subevent’s sequence number starting from 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_flag:ID%]&lt;br /&gt;
|Return the current value of a completion mark; return -1 if there is no such a value.&lt;br /&gt;
|-&lt;br /&gt;
|[%camp_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_player_triggered_encounter%]&lt;br /&gt;
|Check if an encounter chat is started by player manually (0: No; 1: Yes) (if the player is caught up by other units, the value is 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%place_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target location.&lt;br /&gt;
|-&lt;br /&gt;
|[%arg_int_val1%]&lt;br /&gt;
[%arg_int_val2%]&lt;br /&gt;
&lt;br /&gt;
[%arg_int_val3%]&lt;br /&gt;
|Value parameter 1, 2, and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buffs%]&lt;br /&gt;
|Return the number of global BUFFs of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_battle_res%]&lt;br /&gt;
|Return the battle result of last battle (0: Victory; 1: Loss; 2: Retreatment).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_dungeon_res%]&lt;br /&gt;
|Last dungeon result (0: Exited; 1: Passed; 2: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff:ID%]&lt;br /&gt;
|Query whether the current squad has a global BUFF of the target ID. Return 1 if such a BUFF exists.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff_c:CLASS%]&lt;br /&gt;
|Query the number of global BUFFs whose type are CLASS of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_stat:STAT_FILED%]&lt;br /&gt;
|Return the current value (whose field is STAT_FILED) of the current squad status.&lt;br /&gt;
|-&lt;br /&gt;
|[%has_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return 1; otherwise, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return the relevant value; otherwise, return null.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_place_id:CAMP_ID%]:&lt;br /&gt;
|Return the ID of a random location that is controlled by a faction. IF there is no camp_id, return an ID of a location controlled by the player’s faction.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_id%]&lt;br /&gt;
|Return the ID of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_name%]&lt;br /&gt;
|Return the name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_map_name%]&lt;br /&gt;
|Return the map name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products%]&lt;br /&gt;
|Return the Production list of the current location (follow the format of GETITEMS).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products_name%]&lt;br /&gt;
|Return the Production description of the current location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_has_products%]&lt;br /&gt;
|Check if the current location has production (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_items%]&lt;br /&gt;
|Return the item list of the last item selection directive (ITEMS_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles%]&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Return the character list of the last character selection directive (ROLES_SELECTOR) (Note: this method cannot be used in conditional expression groups since the result returned contains “|” when multiple characters are selected; you can use [%last_seled_roles_count%] instead to judge).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles_count%]&lt;br /&gt;
|Return the number of selected characters of the last character selection directive (ROLES_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%weather:ID%]&lt;br /&gt;
|Query the current value of the specific weather effect (with specific ID) on the current map.&lt;br /&gt;
|-&lt;br /&gt;
|[%monster_news:X:Y%]&lt;br /&gt;
|Query the info of creeps near coordinate (X, Y) on the current map. X and Y will be the default position of the player if left empty.&lt;br /&gt;
|-&lt;br /&gt;
|[%attack_intend_code%]&lt;br /&gt;
|Query the attack intension of units encountered on the current map.&lt;br /&gt;
&lt;br /&gt;
Please see: MuUnitBase.IntendToAttack&lt;br /&gt;
|-&lt;br /&gt;
|[%place_randmom_pos%]&lt;br /&gt;
|Query a random position near a location. Output specific strings. E.g., Sandbox Redstone Keep: 123, 123.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_role_relation%]&lt;br /&gt;
|Relationship between the input parameter and tag character/location.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_city_relation%]&lt;br /&gt;
|Relationship between Tag character and input character&lt;br /&gt;
|-&lt;br /&gt;
|[%result_val%]&lt;br /&gt;
|Query the curResultVal value of the current environment variable.&lt;br /&gt;
|-&lt;br /&gt;
|[$player:INFO$]&lt;br /&gt;
[$tagrole:INFO:ID$]&lt;br /&gt;
|Query a specific info field of player/ specific character (tag character) When it is tag character, and ID field does not exist, return the query result of the interactive object. &lt;br /&gt;
INFO can be:  &lt;br /&gt;
&lt;br /&gt;
*id: character ID.&lt;br /&gt;
&lt;br /&gt;
*name: character name.&lt;br /&gt;
&lt;br /&gt;
*level: character level.&lt;br /&gt;
&lt;br /&gt;
*job_type: job types (0: Citizen; 1: Faction member; 2: city ruler; 3: Faction leader).&lt;br /&gt;
&lt;br /&gt;
*campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
*campname: faction name.&lt;br /&gt;
&lt;br /&gt;
*campleaderid: faction leader ID.&lt;br /&gt;
&lt;br /&gt;
*campleadername: faction leader name.&lt;br /&gt;
&lt;br /&gt;
*campleader: nickname of faction leader.&lt;br /&gt;
&lt;br /&gt;
*fame_val: personal prestige.&lt;br /&gt;
&lt;br /&gt;
*maxhp: max hp.&lt;br /&gt;
&lt;br /&gt;
*maxmp: max mana.&lt;br /&gt;
&lt;br /&gt;
*job_cityid: job assignment location ID.&lt;br /&gt;
&lt;br /&gt;
*job_cityname: job assignment location name.&lt;br /&gt;
&lt;br /&gt;
*state: current status (0: Normal; 1: Captured; -1: Dead).&lt;br /&gt;
&lt;br /&gt;
*is_recruitable: recruitable (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*is_leave_team_enable: able to leave squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*recruit_val: current recruitable mark (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*inteam: if the character is in the player’s squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep: player’s prestige in the target faction.&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep_desc: player’s prestige description in the target faction.&lt;br /&gt;
&lt;br /&gt;
*fv: friendliness with the player.&lt;br /&gt;
&lt;br /&gt;
*player_relation_score: assessment on overall favour on the player.&lt;br /&gt;
&lt;br /&gt;
*weapon_tag= (custom tag field): query the specific tag on equipment and weapons. If there is no such a tag or the weapon does not exist, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*skill_level= (skill ID): query the current level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_maxlevel= (skill ID): query the maximum level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_exp= (skill ID): query the current EXP of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_upexp= (skill ID): query the amount of EXP needed for a character’s target skill to level up.&lt;br /&gt;
&lt;br /&gt;
*statu= (custom ID): query the value of the corresponding ID in the Character Attribute Table. If there is no value, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*statu_int= (custom ID): 0 query the int value of the corresponding ID in the Character Attribute Table. If there is no value, return 0.&lt;br /&gt;
&lt;br /&gt;
*has_girl_friend: [player only] check if the player has a girlfriend (1: Yes; 2: No).&lt;br /&gt;
&lt;br /&gt;
*current_girl_friend_name: [player only] girlfriend’s name.&lt;br /&gt;
&lt;br /&gt;
*girl_friend=character ID: [player only] check if someone is a player’s girlfriend.&lt;br /&gt;
&lt;br /&gt;
*is_female: check if someone is a female character (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
*available_quest: available missions.&lt;br /&gt;
|-&lt;br /&gt;
|[$called:call1:call2$]&lt;br /&gt;
|How NPC addresses player (the player’s character is male: call1; female: call2).&lt;br /&gt;
|-&lt;br /&gt;
|[$null$]&lt;br /&gt;
|Replaced by an empty string.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagtype$]&lt;br /&gt;
|Trigger object type of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagid$]&lt;br /&gt;
|Trigger object ID of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$input_str$]&lt;br /&gt;
|The input result of the last input box.&lt;br /&gt;
|-&lt;br /&gt;
|[$argvs:INDEX$]&lt;br /&gt;
|Query currently additional parameter info, starting from 0 (used to fill in the parameter of a random event).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagplace:INFO:ID$]&lt;br /&gt;
|Query info of a location; query the current location if the ID field does not exist.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: location ID.&lt;br /&gt;
&lt;br /&gt;
· name: location name.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· mapid: map ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· prosperity: location prosperity. &lt;br /&gt;
&lt;br /&gt;
· defence: location defence &lt;br /&gt;
&lt;br /&gt;
· rep: location friendliness.&lt;br /&gt;
&lt;br /&gt;
· security: location security.&lt;br /&gt;
&lt;br /&gt;
· size: location size.&lt;br /&gt;
&lt;br /&gt;
· lord_id: city ruler ID.&lt;br /&gt;
&lt;br /&gt;
· lord_name: city ruler name.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom field.&lt;br /&gt;
&lt;br /&gt;
· is_stronghold: if this location is a base (a location for troops to the garrison).&lt;br /&gt;
&lt;br /&gt;
· is_weekhold: a resource point that does not allow the garrison.&lt;br /&gt;
&lt;br /&gt;
· is_couldoccupy: if this location can be occupied.&lt;br /&gt;
&lt;br /&gt;
· is_couldraid: if this location can be raided.&lt;br /&gt;
&lt;br /&gt;
· is_inwar: if this location is being attacked.&lt;br /&gt;
&lt;br /&gt;
· is_raided: if this location has been raided (recovering).&lt;br /&gt;
&lt;br /&gt;
· is_subplace: if this place has been occupied. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain a specific status value of the current location.&lt;br /&gt;
&lt;br /&gt;
· building= (specific facility ID): query the number of facilities of a building with specific ID in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· r_building= (specific facility ID): query the number of facilities of a building with a specific ID (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· r_building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· custom_int= (custom field ID): obtain the int value of the custom field of the current location.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally)&lt;br /&gt;
&lt;br /&gt;
· func_map= (specific field KEY): query a field of the corresponding directive event mapping table. E.g., func_map= hire list.&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in where they are currently staying. &lt;br /&gt;
&lt;br /&gt;
· hire_states: query the recruitment status of the current location.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the player’s current position and the target position. If the target is unreachable, return -1.&lt;br /&gt;
&lt;br /&gt;
· project_count: the number of projects under construction. &lt;br /&gt;
&lt;br /&gt;
· project_max: the maximum number of projects under construction currently.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmap:INFO:ID$]&lt;br /&gt;
|Query tile info on a map:&lt;br /&gt;
&lt;br /&gt;
· id: tile id.&lt;br /&gt;
&lt;br /&gt;
· name: tile name.&lt;br /&gt;
&lt;br /&gt;
· dominant_camp: if there is an overall dominating faction, return the name of the faction; otherwise, return null.&lt;br /&gt;
&lt;br /&gt;
· dominant_camps= (custom field ID): if there are only several factions with specific IDs existing, return 1; otherwise, return 0; format of custom field: faction 1#faction 2#faction 3.&lt;br /&gt;
&lt;br /&gt;
· camp_place_count= faction ID: return the number of bases owned by a specific faction on this tile.&lt;br /&gt;
&lt;br /&gt;
· ExploreInfo= Info ID: query the value of an exploration map info.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbuilding:INFO$]&lt;br /&gt;
|Query info of the current target building&lt;br /&gt;
&lt;br /&gt;
· id: building ID.&lt;br /&gt;
&lt;br /&gt;
· name: name.&lt;br /&gt;
&lt;br /&gt;
· inner_id: built-in location ID of the target building.&lt;br /&gt;
&lt;br /&gt;
· type: building type.&lt;br /&gt;
&lt;br /&gt;
· level: building level.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return value of a specific custom filed.&lt;br /&gt;
&lt;br /&gt;
· container_id: scenario ID of the container bound to this building.&lt;br /&gt;
&lt;br /&gt;
· container_info: info ID of the container bound to this building.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagwb:INFO$]&lt;br /&gt;
|Query the info of current skirmish.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: battle ID.&lt;br /&gt;
&lt;br /&gt;
· camp_a: faction ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· camp_b: faction ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· leader_a: leader ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· leader_b: leader ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· camp_a_rl: the relationship between squad A and the player’s faction &lt;br /&gt;
&lt;br /&gt;
· camp_b_rl: the relationship between squad B and the player’s faction.&lt;br /&gt;
&lt;br /&gt;
· teamname_a: faction name and hero names of squad A.&lt;br /&gt;
&lt;br /&gt;
· teamname_b: faction name and hero names of squad B.&lt;br /&gt;
&lt;br /&gt;
· seige_time: current siege preparation time (if it is a siege battle) (count by day).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagteam:INFO(:QUERY_INFO)$]&lt;br /&gt;
[$playerteam:INFO$]&lt;br /&gt;
|Query info of the current encountered team (tagteam)/player’s team (playerteam).&lt;br /&gt;
&lt;br /&gt;
When querying tag team, you can choose a specific query parameter. If this parameter is set, only info of the query target will be returned.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: squad ID.&lt;br /&gt;
&lt;br /&gt;
· is_active: check if the current squad status is normal; return 1 if it is normal.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· state_num: StateNum value of the current squad.&lt;br /&gt;
&lt;br /&gt;
· from_id: ID of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· from_name: name of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· lifetime: period since the squad is established (day).&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and character faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· max_attr_lv=attribute field ID: the highest value of a certain attribute of all characters in the squad.&lt;br /&gt;
&lt;br /&gt;
· exist_role= character ID: check if there is a specific character ID in the squad (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
· role_vacancy: available hero slots in squad.&lt;br /&gt;
&lt;br /&gt;
· soldier_vacancy: available minion slot in the squad.&lt;br /&gt;
&lt;br /&gt;
· map_info: current map info.&lt;br /&gt;
&lt;br /&gt;
· tag: return the TAG of the squad. &lt;br /&gt;
&lt;br /&gt;
· is_defeated: check if the squad is dismissed because they are defeated (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· defeated_by: ID of the faction which defeated the squad.&lt;br /&gt;
&lt;br /&gt;
QUERY_INFOformat: [query type]=[query target] E.g.,: leader=ROLE_ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported query types are:&lt;br /&gt;
&lt;br /&gt;
· bind_id: bound info ID. When the squad type is creep or dummy, the ID is the creep/dummy ID; otherwise, it is the leader ID.&lt;br /&gt;
&lt;br /&gt;
· leader: squad leader ID.&lt;br /&gt;
&lt;br /&gt;
· tag: TAG mark of the squad (used for squad created by the CREATE_TEAM directive).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcamp:INFO:ID$]&lt;br /&gt;
|Query info of the target faction. When the ID does not exist, query info of the current faction. INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· leaderid: ruler ID.&lt;br /&gt;
&lt;br /&gt;
· leadercalled: nickname of faction ruler. &lt;br /&gt;
&lt;br /&gt;
· lands_count: number of bases of the current faction.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· camp_rl_value: the actual number of favour between the target faction and player’s faction. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain the specific status value of the current faction.&lt;br /&gt;
&lt;br /&gt;
· buff= (Target BUFF ID): query if a specific BUFF of the current faction exists (1: Yes).&lt;br /&gt;
&lt;br /&gt;
· buff_c= (BUFF type): query the number of BUFFs of specific types of the current faction.&lt;br /&gt;
&lt;br /&gt;
· active_state: project status of target faction (0: Inactive; 1: Active).&lt;br /&gt;
&lt;br /&gt;
· is_story_camp: if this is a scenario faction (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in this faction. &lt;br /&gt;
&lt;br /&gt;
· attitude: faction’s attitude towards the player (0: Normal; -1: Wanted; -2: At war).&lt;br /&gt;
&lt;br /&gt;
· is_fall: if a faction is eliminated (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzar:INFO$]&lt;br /&gt;
|Query current bazaar info imported by the system.&lt;br /&gt;
&lt;br /&gt;
· start_day: number of days of the beginning of the bazaar.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzarItem:INFO:bazzarID:merchantID$]&lt;br /&gt;
|Query info of items bought/sold by a merchant in a bazaar.&lt;br /&gt;
&lt;br /&gt;
· item_desc: item description (detailed).&lt;br /&gt;
&lt;br /&gt;
· item_desc_short: item description (simple).&lt;br /&gt;
&lt;br /&gt;
· item_buy_price: buy-in price of the item. &lt;br /&gt;
&lt;br /&gt;
· item_sell_price: sell-out price of the item. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproduct:INFO:ID$]&lt;br /&gt;
|Query info of a speciality. Query info of the current speciality if the ID is left empty.&lt;br /&gt;
&lt;br /&gt;
· item_name: item name. &lt;br /&gt;
&lt;br /&gt;
· item_id: item id.&lt;br /&gt;
&lt;br /&gt;
· item_level: item level.&lt;br /&gt;
&lt;br /&gt;
· item_price: single fair value of the item.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the central position of the speciality and the current position of the player (-1: the central position is unreachable). &lt;br /&gt;
&lt;br /&gt;
· place_include=location ID: when the item is not sold in the specific location, return 0; if it is being sold, return 1. &lt;br /&gt;
&lt;br /&gt;
· place_include_tagQuestPlace: automatically use the currently imported info of mission location.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagquest:INFO:ID$]&lt;br /&gt;
|Query Mission Info&lt;br /&gt;
&lt;br /&gt;
status: 0: Unclaimed; 1: Ongoing; 2: Completed; 3:Time limit exceeded (receive punishment); 4: Time limit exceeded (wait to claim rewards automatically) 5: 已Ended.&lt;br /&gt;
|-&lt;br /&gt;
|[$arg_str_val1$]&lt;br /&gt;
[$arg_str_val2$]&lt;br /&gt;
&lt;br /&gt;
[$arg_str_val3$]&lt;br /&gt;
|String parameters 1, 2 and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$]&lt;br /&gt;
|Enumerate numbers randomly and return a RES value according to the probability distribution. E.g., [%rnd_enum:25,A:40,B:35,C%] means there is a 25% chance to return “A”, 40% to return “B” and 35% to return “C”.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagitem:INFO$]&lt;br /&gt;
|Query info of the current item. INFO can be: &lt;br /&gt;
&lt;br /&gt;
· id: item ID.&lt;br /&gt;
&lt;br /&gt;
· name: item name.&lt;br /&gt;
&lt;br /&gt;
· count: item number.&lt;br /&gt;
&lt;br /&gt;
· group_n: maximum number of stacks.&lt;br /&gt;
&lt;br /&gt;
· quality: item quality.&lt;br /&gt;
&lt;br /&gt;
· level: item level.&lt;br /&gt;
&lt;br /&gt;
· main_type:  main item type.&lt;br /&gt;
&lt;br /&gt;
· sub_type: item sub-type.&lt;br /&gt;
&lt;br /&gt;
· equip_type: equipment type.&lt;br /&gt;
&lt;br /&gt;
· gendays:  period (day) since the production date.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom filed. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproject:INFO:ID$]&lt;br /&gt;
|Query project info. Read from the specific ID of SET_TEMP_ID if the ID field is left empty.&lt;br /&gt;
&lt;br /&gt;
· id: project id.&lt;br /&gt;
&lt;br /&gt;
· state: project status (works only in group events) (0: Not started; 1: Ongoing; 2: Completed).&lt;br /&gt;
&lt;br /&gt;
· showPlaceName: project location description.&lt;br /&gt;
&lt;br /&gt;
· showProjectName: project name.&lt;br /&gt;
&lt;br /&gt;
· roles: all characters involved in the current project.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagunit:INFO$]&lt;br /&gt;
|Query info of the current target minion.&lt;br /&gt;
&lt;br /&gt;
· id: unit id.&lt;br /&gt;
&lt;br /&gt;
· name: unit name.&lt;br /&gt;
&lt;br /&gt;
· level: unit level.&lt;br /&gt;
&lt;br /&gt;
· statu= (custom ID): query the value of the corresponding ID in the Unit Attribute table.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcard:INFO$]&lt;br /&gt;
|Query info of a specific card.&lt;br /&gt;
&lt;br /&gt;
· id: bound id of the card.&lt;br /&gt;
&lt;br /&gt;
· name: displayed name of the card.&lt;br /&gt;
&lt;br /&gt;
· lv: card level.&lt;br /&gt;
&lt;br /&gt;
· recruit_name: displayed name with recruitment info of the card. &lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific Tag field of the card.&lt;br /&gt;
&lt;br /&gt;
· has_tag= (KEY of custom expansion field): query if there is a particular Tag field of card (1: Yes; 0: No).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$save_version$]&lt;br /&gt;
|Return the version number of when the current game save is created.&lt;br /&gt;
|-&lt;br /&gt;
|[$version_compare:TAG_VERSION$]&lt;br /&gt;
|Compare the version number of when the current game save is created with TAG_VERSION; if the former version is higher than TAG_VERSION, return 1; when equal, return 0; when lower, return -1.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmsg:INFO$]&lt;br /&gt;
|Query info of the current interactive messages.&lt;br /&gt;
&lt;br /&gt;
· title: title&lt;br /&gt;
&lt;br /&gt;
· content: message content&lt;br /&gt;
&lt;br /&gt;
· arg=(field KEY): query the parameter of the KEY in the custom parameter table&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下查询需要游戏版本高于0.7.4.1&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_str:KEY$]&lt;br /&gt;
|Return the string value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_int:KEY$]&lt;br /&gt;
|Return the int value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[%envoy_enable%]&lt;br /&gt;
|Return the status of whether the envoy of the player’s faction is available.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Directive Field of Global Save Query===&lt;br /&gt;
These are used to query some directives in the global save.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%global_int:ID%]&lt;br /&gt;
|Return the value of global int field ID　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|[$global_str:ID$]&lt;br /&gt;
|Return the value of global string field ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Built-in Global Variable Field===&lt;br /&gt;
&lt;br /&gt;
Following are key fields of a built-in global variable: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Filed KEY'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|save_max_hard_level&lt;br /&gt;
|The greatest difficulty has been unlocked. Set to be 0 by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Built-in Custom Variable Field===&lt;br /&gt;
&lt;br /&gt;
You can use directives like SETINTVAR and CHANGEINTVAR to change and save the built-in custom variable of the system. Different variables have a different function.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|system_探索地图点数&lt;br /&gt;
|Morale.　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|system_星星&lt;br /&gt;
|The number of stars.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色血量百分比&lt;br /&gt;
|When the player is fighting an enemy the extra hp multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色攻击百分比&lt;br /&gt;
|When the player is fighting an enemy, the extra physical/magic attack multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|config_ai_level&lt;br /&gt;
|The intensity level of AI (0: Easy; 1: Normal; 2: Difficult).&lt;br /&gt;
|-&lt;br /&gt;
|config_roll_limit&lt;br /&gt;
|Enable Roll Limit in battles 0: Disabled; 1: Enabled (By enabling the Roll Limit, there will be a CD and limit of rolling times).&lt;br /&gt;
|-&lt;br /&gt;
|config_hunger_penalty&lt;br /&gt;
|Enable Hunger Debuff 0: Disabled 1: Enabled (By enabling the Hunger Debuff, the movement of the player’s squad will be influenced when in hunger).&lt;br /&gt;
|-&lt;br /&gt;
|config_upgrade_cost_reduce&lt;br /&gt;
|EXP and materials needed to upgrade the current unit after discount (0~100 percentage; set to be 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|config_soldier_dead_scale&lt;br /&gt;
|A multiplier of death probability of the current minion (percentage; set to be 100 by default, final death probability = basic death probability *(config_soldier_dead_scale/100)).&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|config_project_concurrent&lt;br /&gt;
|Maximum cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
===Built-in Field in Initial Setting Table===&lt;br /&gt;
&lt;br /&gt;
In the initial setting table, we can configure some initial fields that have actual functions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|'''Default Value'''&lt;br /&gt;
|-&lt;br /&gt;
|init_pos&lt;br /&gt;
|Default info of respawning location.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_statu&lt;br /&gt;
|Default attribute status info when the player respawns.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_money&lt;br /&gt;
|Default initial property.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|home_place&lt;br /&gt;
|Default initial location ID.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skillpages&lt;br /&gt;
|Initially enabled skill page (format: see SET_SKILLPAGE directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skills&lt;br /&gt;
|Initial skill page of the player (format: see GETSKILL directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_equip&lt;br /&gt;
|Initial equipment list info of the player.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_camp_rl&lt;br /&gt;
|Initial faction relationship list. Format:&lt;br /&gt;
&lt;br /&gt;
Faction A, faction B, relationship, friendliness (-100~100)| faction A, faction C, relationship, friendliness(-100~100)|...|faction N, faction N, relationship, friendliness(-100~100).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unchanged_diplomatic_relationship&lt;br /&gt;
|Unable to change the relationships between factions dynamically? (0: Yes; 1: No).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|gametime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second).&lt;br /&gt;
|0.01&lt;br /&gt;
|-&lt;br /&gt;
|battletime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second), when this coefficient is 0, the time in skirmish or siege battles will stop.&lt;br /&gt;
|0.005&lt;br /&gt;
|-&lt;br /&gt;
|no_card_auto_supply&lt;br /&gt;
|Card durability cannot restore automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|drop_card_when_no_durability&lt;br /&gt;
|When card durability becomes 0 in this mode, the card will disappear.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|enable_card_upgrade&lt;br /&gt;
|Enable card upgrading.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|equipment_loss_durability&lt;br /&gt;
|The equipment has durability.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|levelup_exp_scale&lt;br /&gt;
|Level up EXP multiplier.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|seige_time&lt;br /&gt;
|Basic preparation time for siege battle (day). Preparation time = basic time + Weapons degree* coefficient of extra time per Weapons degree (the siege_time_per_armvalue feild).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|siege_time_per_armvalue&lt;br /&gt;
|The coefficient of extra time per weapon degree when preparing for a siege battle.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|project_time_scale&lt;br /&gt;
|The proportion of project time. &amp;lt;1: shorten time; &amp;gt;1: extend time.&lt;br /&gt;
|0.99&lt;br /&gt;
|-&lt;br /&gt;
|dailyIncomeScale&lt;br /&gt;
|The multiplier of daily city resource income.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|recruit_cost_scale&lt;br /&gt;
|The multiplier of the cost of recruitment/supply/upgrade/chest opening.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|building_cost_scale&lt;br /&gt;
|The multiplier of the cost of building construction/other projects.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|custom_intval_watcher&lt;br /&gt;
|Default custom variable field of the monitor (same as the ADD_INTVAL_WATCHER directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|show_star_info&lt;br /&gt;
|Show prestige (star).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_add_exp_per_period&lt;br /&gt;
|Cardinal number of daily AI soldier (units from other factions) EXP increase.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|team_role_count_base&lt;br /&gt;
|The basic number of character slot each squad.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
|team_role_max&lt;br /&gt;
|Maximum number of character slot each squad.&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|team_card_count_base&lt;br /&gt;
|The basic number of minion slot each squad.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|team_card_max&lt;br /&gt;
|Maximum number of minion slot each squad.&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_resource_scale&lt;br /&gt;
|Resource multiplier of AI recruitment.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_build_resource_scale&lt;br /&gt;
|Resource multiplier of AI construction.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_upgrade_resource_scale&lt;br /&gt;
|Resource multiplier of AI minion upgrading.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_highlevel_upgrade_average_days&lt;br /&gt;
|AI simulation of upgrading minions when the player’s level is high (expected number of days).&lt;br /&gt;
&lt;br /&gt;
The higher this value is, the slower AI upgrades a type of minion.&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ai_auto_balance_resource&lt;br /&gt;
|If AI will balance each kind of resources automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_invade_prob&lt;br /&gt;
|Coefficient of AI invasion probability (0~1) The closer to 1, the more likely AI will invade.&lt;br /&gt;
|0.8&lt;br /&gt;
|-&lt;br /&gt;
|invasion_destroy_factor&lt;br /&gt;
|Destruction rate after invasion or occupation. Format:&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 1: probability 1.&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 2: probability 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility N: probability N.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
1:50&lt;br /&gt;
&lt;br /&gt;
2:30&lt;br /&gt;
&lt;br /&gt;
3:10&lt;br /&gt;
&lt;br /&gt;
4:5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|monster_move_speed_random&lt;br /&gt;
|Correction range of random creep movement speed of creep emitter (0.75 at most).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|soldier_battle_killed_prob&lt;br /&gt;
|The basic casualty of the soldiers. The probability of soldiers being poorly wounded after losing a battle.&lt;br /&gt;
|0.2&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_battle_killed_prob&lt;br /&gt;
|Death probability of AI troops after losing a battle.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_hero_free&lt;br /&gt;
|AI recruits heroes for free&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed&lt;br /&gt;
|Basic movement speed of squads.&lt;br /&gt;
|240&lt;br /&gt;
|-&lt;br /&gt;
|monster_min_movespeed&lt;br /&gt;
|Minimum movement speed of creeps.&lt;br /&gt;
|150&lt;br /&gt;
|-&lt;br /&gt;
|caravan_move_speed_range&lt;br /&gt;
|Range of movement speed of Caravans. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|farmers_move_speed_range&lt;br /&gt;
|Range of movement speed of farmers. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed_range&lt;br /&gt;
|Range of movement speed of troops. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|global_move_speed_range&lt;br /&gt;
|Range of global movement speed. Format: min speed, max speed. &lt;br /&gt;
&lt;br /&gt;
This value influences all movable units on all maps.&lt;br /&gt;
|20,400&lt;br /&gt;
|-&lt;br /&gt;
|battle_gain_money_scale&lt;br /&gt;
|Scale coefficient of obtaining money in battles.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment&lt;br /&gt;
|If NPC will drop weapons (0: No; 1: Yes).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment_prob&lt;br /&gt;
|Probability of NPC dropping weapon.&lt;br /&gt;
|0.15&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_soldier&lt;br /&gt;
|Probability of each group of soldiers dropping food.&lt;br /&gt;
|0.1&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_hero&lt;br /&gt;
|Probability of each hero dropping food.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|hungry_fail_days&lt;br /&gt;
|Failed after being hungry for a certain number of days.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.2.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|ai_dailyfight_period&lt;br /&gt;
|The period between each AI compulsory invasion checks &amp;lt;=0: Disable the check (this logic is different from default AI invasion check；the default parameter (in-game day) is 5 before version 0.7.2.1) In addition, this check will be influenced by AI intensity from this version.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_active_level_default&lt;br /&gt;
|Default AI intensity level, which influences the default value of the custom filed of config_ai_level.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_roll_limit&lt;br /&gt;
|Whether to enable Roll Limit by default. This influences the default value of the custom field of config_roll_limit.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_hunger_penalty&lt;br /&gt;
|Whether to enable Hunger Debuff. This influences the default value of the custom field of config_hunger_penalty.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_seige_battlemap&lt;br /&gt;
|Default map ID of siege battle.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.3.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|init_inventory_capicity&lt;br /&gt;
|Default cardinal number of initial bag capacity.&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|def_project_concurrent&lt;br /&gt;
|Default cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.4.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_wanted_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “Wanted” of a faction (when player’s prestige is lower than “Wanted” but has not reached the “At War” status, the player will not be attacked by squads of this faction in the wild, but they will not be allowed to enter certain cities).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_war_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “At War” of a faction (when player’s prestige is lower than the point, the player will be attacked in the wild by squads of this faction).&lt;br /&gt;
| -10&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.8.0.1'''&lt;br /&gt;
|-&lt;br /&gt;
|dg_levelup_skill&lt;br /&gt;
|Skill ID of level-up special effect in battles.&lt;br /&gt;
|升级特效&lt;br /&gt;
|-&lt;br /&gt;
|init_items&lt;br /&gt;
|Initial item list.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_dropitem_model&lt;br /&gt;
|Model and special effect info of items dropped in battles (Format: world map unit model#special effect info).&lt;br /&gt;
|chest1#psChestFlash1,0,0&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}Besides specific initial fields above, there are some UI-resetting fields, starting with “gui”, in the initial set list, which are used to do a custom reset on certain built-in UI in the game. For more details, please see instruction on game interface reset. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Codes of Text Color in Common UI===&lt;br /&gt;
In dialogues, text boxes or other common UI, we can follow certain formats to change the colours of texts.&lt;br /&gt;
&lt;br /&gt;
E.g., This is a imp:red font text, red:red font text, &amp;amp;ff6699ff:custom color text font.&lt;br /&gt;
&lt;br /&gt;
Currently, we support preset colours for the following types (to use custom colours, replace “#” with “&amp;amp;” ).&lt;br /&gt;
&lt;br /&gt;
*place: unified colour for the location name.&lt;br /&gt;
*role: unified colour for the character name.&lt;br /&gt;
*camp: unified colour for faction name.&lt;br /&gt;
*item: unified colour for item name.&lt;br /&gt;
*imp: unified colour for an important message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Character Position Directive===&lt;br /&gt;
Format: position code:position parameter.&lt;br /&gt;
&lt;br /&gt;
Supported position codes are: 0: Unallocated; 1: In position; 2: In squad; 3: In a project.&lt;br /&gt;
&lt;br /&gt;
*when the code is 1: Format:  1: location ID, facility ID (if the facility ID is empty, it means the character is outside the facility).&lt;br /&gt;
*when the code is 2: Format:  2: squad ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of In-game Global Position Directive===&lt;br /&gt;
When assigning the position for a squad or object on the world map, we can follow a format of globally position assignment (e.g., the TELEPORT directive).&lt;br /&gt;
&lt;br /&gt;
Format of global position:   &lt;br /&gt;
 Map ID:coordinate X,coordinate Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Unit-Limitation Directive in Specific Battles===&lt;br /&gt;
In a specific battle table, you can fill in a directive of the following types in the “Limit” column, to execute unit or special restrictions. &lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Directive 1:parameter 1;directive 2:parameter 2;...directive N:parameter N;&lt;br /&gt;
Currently supported types of limitation directives are: &lt;br /&gt;
&lt;br /&gt;
*player: reset squad hero list. Format: character ID1,reset level (-1 or left empty: Do not reset)|. character ID2,reset level| character ID3, reset level|...| character ID N,reset level.&lt;br /&gt;
*units: reset squad minion list. Format: same as the common minion list.&lt;br /&gt;
*add_stat: additional character attribute status. Format: target character ID#status list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Directive List of Unit Control on the World Map===&lt;br /&gt;
World map unit (squad) control directives are methods used to manage the action order of world map units. When a unit has specific control directive list, it will execute every directive in sequence until the execution is finished. After the game is saved halfway of the execution of the directives and the player exits the game, the execution will continue when the save is loaded.&lt;br /&gt;
&lt;br /&gt;
Please note: after the execution of all directives of a squad, the squad will be dismissed. Dummies (creeps and dummies needed for stories included) are an exception.&lt;br /&gt;
&lt;br /&gt;
Control directive consists of int-number directives and directive content, separated by “;”. Directive of each line starts with a directive-type code and “+”, followed by a directive parameter. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 1,test map:100,100;1,test map:100,200;99,0&lt;br /&gt;
The code above means that the squad will move to coordinate 1 (100,100) first, and then to coordinate 2 (100,200). Finally, the squad will be dismissed.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive-type codes are: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Control Directive Code'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Move towards a coordinate on the world map. The parameter is the target coordinate (coordinate format: map ID: coordinate X, coordinate Y).&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Stay where you are. The parameter is the time of staying (count by in-game day).&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Enter a location. The parameter is the target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Attack the target location. The parameter is the target location ID. (invasion type: 0: Occupy; 1: Raid).&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Stay in the target location. The parameter is the target location ID, time of staying.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Execute an event. The parameter is the event ID.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Change the current StateNum value. The parameter is the new StateNum value.&lt;br /&gt;
&lt;br /&gt;
Note: StateNum can be used to mark the current status of some controlled squad. E.g., you can command a unit to a specific location on the map and execute an action. Before the unit reaches the destination, StateNum is 0; after its arrival, StateNum becomes 1. By doing so, we get to know the current status of a squad.&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|Execute custom movement directives permanently. (For directive format, see [[Common Scenario Directives#.E5.8D.95.E4.BD.8D.E9.98.9F.E4.BC.8D.E9.BB.98.E8.AE.A4.E8.BF.90.E5.8A.A8.E6.8C.87.E4.BB.A4.E6.A0.BC.E5.BC.8F|Format of Default Movement Directive of Unit Squad]]).&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|Join a Warband. The parameter is the Warband ID (built-in method of the system. We do not suggest calling this).&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Execute an action. Parameter format: action ID, loop times (-1: Endless; &amp;gt;=1: Limited times; set 1 when the action itself is a looping animation), single-action time (count by second; execute the next directive when the action finishes looping, if it does not loop permanently), object(0: All units by default; 1: Leader only; 2: All followers), initial frame range (0~1; 1: the last frame of the animation; -1: a random number between 0 and 1), whether to execute the next directive after playing the animation (0: No by default; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
Supported default action list of models:&lt;br /&gt;
&lt;br /&gt;
· Loop action: standby, move, walk slowly, charge, recharging.&lt;br /&gt;
&lt;br /&gt;
· Single action: being hit, evade, block, attack, shoot, horizontal. slash, vertical slash, release, roar, knock up, jump, celebrate, die.&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|Open a chest. The parameter ID is the chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|Execute a TimeLine action. Format: TimeLineID, duration (set -1 by default, permanent; &amp;gt;0: Action ends after the time set).&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Change the attitude of the current squad towards the player (0: Neutral; 1: Hostile).&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|Change the current movement speed of the current squad. The parameter is the target movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Trade succeeded. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|Trade with a merchant. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|Follow a squad target. The parameter is the control ID of the target being followed.&lt;br /&gt;
|-&lt;br /&gt;
|99&lt;br /&gt;
|Dismiss the current squad.&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Default Movement Directive of Unit Squad===&lt;br /&gt;
Dummies, creeps and squads on the world map will change their movement modes based on the default way of moving or the changes of scripts. After choosing a movement mode, units will perform default actions according to the directive.&lt;br /&gt;
&lt;br /&gt;
Format of unit movement directive: &lt;br /&gt;
 Movement mode,parameter 1[,parameter 2,...,parameter N]&lt;br /&gt;
Currently supported movement modes and the formats of the parameter are: &lt;br /&gt;
&lt;br /&gt;
*Wander within range: WANDER, movement radius,[central coordinate X, central coordinate Y](the current position is the centre if the central coordinate is not assigned).&lt;br /&gt;
*Patrol: PATROL, coordinate 1X, coordinate 1Y, coordinate 2X, coordinate 2Y,..., coordinate NX, coordinate NY(when the first coordinate is the same as the final coordinate, the patrol movement loops in a circle; otherwise, the patrolling movement goes back and forth).&lt;br /&gt;
*Others: Stay still.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item List Info===&lt;br /&gt;
The item list info is one of the most common info formats. We use this format in the directives of obtaining various items (GETITEMS, etc.) and configuration tables.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Item code 1,number 1[,detailed info list]|item code 2,number 2[,detailed info list]|....|item code N,number N[,detailed info list].&lt;br /&gt;
The format of the detailed info list is the dictionary list of &amp;quot;key1=val1,key2=val2,...&amp;quot;. Following fields are supported: &lt;br /&gt;
&lt;br /&gt;
*[mf] auto-match the created affixes: mf=lowest quality; N-highest quality; N[-additional cardinal number of variable value]. E.g., Longsword,1,mf=0-3  Explanation: the “mf” field helps the current weapon to automatically match a quality (0~3) affix (0 means no affix).&lt;br /&gt;
&lt;br /&gt;
*[cw] create custom affix: cw= affix ID+ additional cardinal number of variable value (0-100). E.g., Longsword,1,cw=Lifesteal Sword+50 Explanation: the variable value of items with the affix of Lifesteal Sword, is between 50 and 100.&lt;br /&gt;
&lt;br /&gt;
*[w] assign the affix details of items: w=affix ID$ [variable code array]&lt;br /&gt;
*[qv] assign the variable array of item attribute: qv= variable code array&lt;br /&gt;
*[p] assign the buy-in price of items: p= buy-in price&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variable code array consists of two columns of 2-dimensional arrays. Column 1 is enumerated numbers, and column 2 is quality numbers (0~100). The two columns are connected by “/”. If a affix has 3 parts, then its variable array might be: 0/50/0/100/0/100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Weather Effect Info===&lt;br /&gt;
When using directives to control weathers, we mainly use directives to control a list weathers, which is separated by “|”. &lt;br /&gt;
&lt;br /&gt;
Format of weather effects description: &lt;br /&gt;
 Weather effect ID1, intensity|weather effect ID2,intensity|...weather effect IDN,intensity&lt;br /&gt;
Currently, supported weather effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*雨（Rain）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
&lt;br /&gt;
*雪（Snow）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
*风沙（Sandy）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雷电（Thunder）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雾（Fog）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*黑暗（Darkness）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*炎热（Hot）: Disabled when the intensity is 0 (1~100) (Heat Distortion Effect).&lt;br /&gt;
*云（Cloudy）: Disabled when the intensity is 0 (1~100) (shadows of cloud in clear days).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of weather effect field in map editor or config tables: &lt;br /&gt;
 Probability 1,duration 1:[weather effect description 1]; Probability 2,duration 2:[weather effect description 2]; Probability 3,duration 3:[weather effect description 3];[...]; Probability N,duration N:[weather effect description N]&lt;br /&gt;
E.g., 30,1:;50,3:雨,20|雾,10;20,5:风沙,30&lt;br /&gt;
&lt;br /&gt;
The above code means there is a 30% chance of not having any weather effect for a whole day, 50% chance of raining for 3 consecutive days, and 20% chance of having 5 consecutive sandy days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Camera Filter Effect Info===&lt;br /&gt;
We can use directives like SET_CAMERA_FILTER to set the camera filter of the current game.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Filter effect ID1,intensity|filter effect ID2,intensity|...filter effect IDN,intensity&lt;br /&gt;
Currently, supported filter effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*暗角 (Vignetting): Disabled when the intensity is 0 (0~100). The degree of darkness of camera’s corners.&lt;br /&gt;
*黑白 (Black&amp;amp;white): Disabled when the intensity is 0 (0~100). The black-and-white version of the camera.&lt;br /&gt;
*老旧 (Classic): Disabled when the intensity is 0 (0~100). The yellowing classic style of camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction List===&lt;br /&gt;
The following are the character TAGs used in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|LIKE&lt;br /&gt;
|Mark the type of items a specific character likes, which affects the increased speed of favour.&lt;br /&gt;
&lt;br /&gt;
Format: LIKE:type 1|type 2|...&lt;br /&gt;
|-&lt;br /&gt;
|DEF_WEAPON_SPEED&lt;br /&gt;
|Default weapon speed. Characters with this tag will take this speed as the default weapon speed even if they do not have a weapon.&lt;br /&gt;
|-&lt;br /&gt;
|FVChangeUnit&lt;br /&gt;
|Change the coefficient of character’s favour via sending gifts. Set to be the default value without this field.&lt;br /&gt;
|-&lt;br /&gt;
|dg_skill&lt;br /&gt;
|Replace the dungeon skill of this character.&lt;br /&gt;
|-&lt;br /&gt;
|attached_script&lt;br /&gt;
|ID of script event mounted on characters in battles.&lt;br /&gt;
|-&lt;br /&gt;
|loot_list&lt;br /&gt;
|The dropping list of this character in dungeon battles (can use the“EXP” item IDs as a specific source of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Location List===&lt;br /&gt;
The following is a TAG list of locations with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|Show minimap&lt;br /&gt;
|City maps are shown by default. If there are other places that need to be shown by default, this tag must be 1.&lt;br /&gt;
|-&lt;br /&gt;
|Do not show minimap&lt;br /&gt;
|It is what the field means.&lt;br /&gt;
|-&lt;br /&gt;
|Disable AI invasion&lt;br /&gt;
|Bases with this tag will not invade, patrol or occupy resources automatically.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction Table===&lt;br /&gt;
The following is a TAG list of factions with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|NO_CHANGE_DIP&lt;br /&gt;
|Will not be affected by dynamic diplomatic relations in the game, unless you use script directives to change directly.&lt;br /&gt;
|-&lt;br /&gt;
|UNFAILED&lt;br /&gt;
|This faction cannot be eliminated in a usual way.&lt;br /&gt;
|-&lt;br /&gt;
|EMBARGO&lt;br /&gt;
|Cities occupied by this faction will not send out caravans or trade with other cities.&lt;br /&gt;
|-&lt;br /&gt;
|NO_FARMER&lt;br /&gt;
|There will not be farmer migration in cities occupied by this faction.&lt;br /&gt;
|-&lt;br /&gt;
|CAMP_COLOR&lt;br /&gt;
|Set a specific colour for a faction. Sample format: CAMP_COLOR=FFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===TAGs with Special Meanings in Item Table===&lt;br /&gt;
The following is a TAG list of items with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|IgnoreBagSpace&lt;br /&gt;
|This item will not occupy a slot of player’s bag. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|NoSellOrDrop&lt;br /&gt;
|This item cannot be discarded or sold. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|BatchUse&lt;br /&gt;
|Weather player can use the item in the batch. Function enabled when the field is 1. When an item with this TAG is used, the [%arg_int_val1%] in its script will be the selected number of the item.&lt;br /&gt;
|-&lt;br /&gt;
|DoNotCostWhenUse&lt;br /&gt;
|This item will not be consumed when used. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Present&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The tag field of gift type, separated by “|”.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|AiNotLoot&lt;br /&gt;
|This item cannot be accessed by AI in a normal way. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Mendable&lt;br /&gt;
|If this item is mendable, unmendable item will self-destroy after the durability becomes 0. (1: Yes ).&lt;br /&gt;
|-&lt;br /&gt;
|DropModel&lt;br /&gt;
|The model info of the item when it is on the ground in battles. (format: world map unit model ID#special effect info (replaced by the def_dropitem_model field in the initial set list if the info is left empty)).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Ones of Map Exploration Info Fields in Map List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!字段&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|BattleLoseStay&lt;br /&gt;
|Stay still after losing a battle. Only available in adventure mode (0: No; 1: Yes)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following fields are suitable for version above or higher than 0.7.2.1'''&lt;br /&gt;
|-&lt;br /&gt;
|RolePlay&lt;br /&gt;
|When the player is on this map, their character model and name will be replaced by the info of character whose ID is filled into this field. The models of the following minions will be hidden too. The bag and squad panels become inaccessible.&lt;br /&gt;
|-&lt;br /&gt;
|FixedGameTime&lt;br /&gt;
|When this field is not empty, the in-game time will be frozen at a certain point of a day (0~1.0, 0.5 means 12 pm). When the time is frozen, the world will not run on. Only units on the current map can take actions.&lt;br /&gt;
|-&lt;br /&gt;
|CameraFilter&lt;br /&gt;
|When on this map, use this field compulsorily as a camera filter. The effect is the same as the SET_CAMERA_FILTER directives.&lt;br /&gt;
|-&lt;br /&gt;
|NoFoodConsume&lt;br /&gt;
|When this field is 1, the player will not consume food on this map and will not die because of hunger.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Fields of TAG in Instance Info List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PlayerInitType&lt;br /&gt;
|The initial mode of player’s character (0: Default (use the default character template and initial position in the instance to initialize the character) 1: Manual (initialize the character via the LUA port)).&lt;br /&gt;
|-&lt;br /&gt;
|ExpMode&lt;br /&gt;
|EXP allocation mode. Format: allocation mode[,radius parameter].&lt;br /&gt;
&lt;br /&gt;
The allocation modes are: &lt;br /&gt;
&lt;br /&gt;
*0: Killer mode (default; the enemy killer has all EXP).&lt;br /&gt;
*1: Average Mode (the parameter is the allocation radius; when the parameter &amp;lt;=0, all allies share EXP).&lt;br /&gt;
*2: Share Mode (if the radius parameter &amp;gt;0, share EXP with allies with the radius).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Item Entry Info===&lt;br /&gt;
Entries of items follow the format of “entry type:{enumerated info 1, value 1; enumerated info 2, value 2;… }”, and they are set in the item list. Entries can be sorted as:&lt;br /&gt;
&lt;br /&gt;
*a: increase the character’s attribute passively. Enumerated info is the KEY to the increased attribute.&lt;br /&gt;
*skill: add new available skills to a character. Enumerated info is the skill ID.&lt;br /&gt;
*dg_skill: replace the current dungeon skill of the character. Enumerated info is the dungeon skill ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item Dropping Info===&lt;br /&gt;
Format:&lt;br /&gt;
 Probability 1,item ID1,min number,max number [,additional parameter list(see [[Common Scenario Directives#.E7.89.A9.E5.93.81.E5.88.97.E8.A1.A8.E4.BF.A1.E6.81.AF.E6.A0.BC.E5.BC.8F|Format of Item List Info]])]|probability 2,item ID2,min number, max number [,parameter list]|...|probability N,item N,min number,max number[,parameter list]. &lt;br /&gt;
(E.g., “LOOT*100.0, 金钱,100,200|50.0, 经验,100,200” means that there is a 100% chance of obtaining 100~200 utars and a 50% chance to obtain 100~200 EXP).&lt;br /&gt;
&lt;br /&gt;
'''In Item ID, you can execute a special ID Query, which is to query and return a result of item dropping from the global dropping list (see the format in Q全局掉落表.xlsx).'''&lt;br /&gt;
&lt;br /&gt;
The format of the parameter list of QUERY is: “parameter 1=val1, parameter 2=val2,....” Following query parameters are supported: &lt;br /&gt;
&lt;br /&gt;
*[id] obtain the result of the target ID from the global dropping list (ignore all the other query conditions when this exists and is not empty).&lt;br /&gt;
*[lv] specific conational query level（-1：return all query results; 0: query based on the current level of player）.&lt;br /&gt;
*[t1] query TAG 1 (a condition).&lt;br /&gt;
*[t2] query TAG 2.&lt;br /&gt;
*[t3] query TAG 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Script Directive in Special Effect Object Event===&lt;br /&gt;
You can attach the eftEffectEventHelper script to a special effect object to add a new play-effect event. Format of every event: event time point (number of seconds after the start), parameter 1, parameter 2,…, parameter N.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive types are:&lt;br /&gt;
&lt;br /&gt;
shake_cam: screen shake. Parameter 1 is the duration of screen shake, and parameter 2 is the intensity. &lt;br /&gt;
&lt;br /&gt;
play_sound: play audio. Parameter 1 is the audio ID.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=700</id>
		<title>Common Scenario Directives</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=700"/>
		<updated>2020-09-22T01:57:27Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Scenario Event===&lt;br /&gt;
A scenario event is a basic element used to realize scenario scripts in the game. All scenario events in the game are called by emitters or executors and put into the directive queue. These scenario events will be run by the GameWorldManager one by one according to the in-game time. An integrate scenario event consists of the following parts:&lt;br /&gt;
&lt;br /&gt;
1. Scenario Event ID: a unique label of a scenario event;&lt;br /&gt;
&lt;br /&gt;
2. Directive Content: directives that will be executed after a scenario event is triggered;&lt;br /&gt;
&lt;br /&gt;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.&lt;br /&gt;
&lt;br /&gt;
===Scenario Event Trigger===&lt;br /&gt;
Currently, all stories and events are established according to the mechanics of the scenario event trigger. The mechanics of a trigger is: event ports are set at different positions in advanced, and when the program accesses a position, it will call the port and import the current environment variables. The program will then traverse all defined triggers in the port event and return the trigger with the highest priority or all triggers that meet the conditions (to return one or all triggers is decided by the type of a port). Finally, a scenario event is executed. Triggers’ calling events is not executed immediately. Relevant events are put into the execution queue and get carried out procedurally until all events in the queue are executed.&lt;br /&gt;
&lt;br /&gt;
Following is the list of scenario events defined in the game (port types in bold indicate that they execute all trigger events that meet the conditions instead of executing the one of the highest priority): &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Port Type&lt;br /&gt;
!Explanation&lt;br /&gt;
!Object Type&lt;br /&gt;
!Object ID&lt;br /&gt;
|-&lt;br /&gt;
|passive&lt;br /&gt;
|Triggered passively; &lt;br /&gt;
&lt;br /&gt;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|talk&lt;br /&gt;
|Triggered when interacting with NPC.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|first_in&lt;br /&gt;
|Triggered when the player enters the game for the first time.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter&lt;br /&gt;
|Triggered when interacting with units on the sandbox map.&lt;br /&gt;
|&lt;br /&gt;
|Control ID of the target Unit.&lt;br /&gt;
|-&lt;br /&gt;
|before_enter_map&lt;br /&gt;
|Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_map&lt;br /&gt;
|Triggered when entering a map.&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_map&lt;br /&gt;
|Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_map&lt;br /&gt;
|Triggered when leaving a map.&lt;br /&gt;
|&lt;br /&gt;
|Current map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_place&lt;br /&gt;
|Triggered when entering the target location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_place&lt;br /&gt;
|Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted)&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_place&lt;br /&gt;
|Triggered when leaving the current location.&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_place&lt;br /&gt;
|Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_building&lt;br /&gt;
|Triggered when entering the target building&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_building&lt;br /&gt;
|Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_building&lt;br /&gt;
|Triggered when leaving the target building.&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_building&lt;br /&gt;
|Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|battle_start&lt;br /&gt;
|Triggered at the start of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|battle_over&lt;br /&gt;
|Triggered at the end of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|set_lord&lt;br /&gt;
|Triggered when AI appoints player as the ruler of a city.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|job_cmd&lt;br /&gt;
|Triggered when the player is given a working order.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|see_warband&lt;br /&gt;
|Triggered when encountering another squad and battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|curplace_inwar&lt;br /&gt;
|Triggered when the location where the player is currently settling in is attacked.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quest_done&lt;br /&gt;
|Triggered when all conditions of a mission are met (mission incomplete).&lt;br /&gt;
|&lt;br /&gt;
|Mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''on_end_work'''&lt;br /&gt;
|Triggered when completing a mission of a location.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|'''occupy_place'''&lt;br /&gt;
|Triggered when the player occupied a location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''new_day'''&lt;br /&gt;
|Triggered when starting a new day.&lt;br /&gt;
|&lt;br /&gt;
|The target number of days.&lt;br /&gt;
|-&lt;br /&gt;
|reward_follower&lt;br /&gt;
|Triggered when the player rewards their followers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reward_player&lt;br /&gt;
|Triggered when the player is rewarded.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dip_event&lt;br /&gt;
|Triggered when the player’s faction meets diplomatic affairs.&lt;br /&gt;
|Affair types:&lt;br /&gt;
&lt;br /&gt;
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice.&lt;br /&gt;
|Target Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_success&lt;br /&gt;
|Triggered when the player’s diplomatic request is met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_fail&lt;br /&gt;
|The diplomatic request is not met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|player_failed&lt;br /&gt;
|Triggered when the player failed in a skirmish. &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reinforce_request&lt;br /&gt;
|Triggered when reinforcement related to player happens.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|is_fall&lt;br /&gt;
|Triggered when a faction collapsed.&lt;br /&gt;
|&lt;br /&gt;
|Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|is_to_fall&lt;br /&gt;
|Triggered when a faction loses all bases and is about to collapse.&lt;br /&gt;
|&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|before_cash_present&lt;br /&gt;
|Triggered before being rewarded (action of rewarding is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|before_present&lt;br /&gt;
|Triggered before sending a gift (action of sending the gift is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_present&lt;br /&gt;
|Triggered when sending a gift.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter_role&lt;br /&gt;
|Triggered before the common dialogue that happens when the player encounters a character.&lt;br /&gt;
|&lt;br /&gt;
|Target Character ID.&lt;br /&gt;
|-&lt;br /&gt;
|helped_camp&lt;br /&gt;
|Triggered when the player encounters a conflict between two sides and helped one side.&lt;br /&gt;
|&lt;br /&gt;
|The faction of the leadrole of target’s squad.&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_up&lt;br /&gt;
|Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_down&lt;br /&gt;
|Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_dismiss&lt;br /&gt;
|Triggered when a squad is dismissed.&lt;br /&gt;
|Squad Type: &lt;br /&gt;
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_into_place&lt;br /&gt;
|Triggered when a squad enters a location.&lt;br /&gt;
|Squad Type: same as above.&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Script Directive List===&lt;br /&gt;
&lt;br /&gt;
Script directives in the game usually follow the format of directive type*parameter 1#parameter2#...#parameter N, and uses line break to separate multiple lines of directives.&lt;br /&gt;
&lt;br /&gt;
Currently, supported script directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Directive&lt;br /&gt;
!Instruction&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
Function: show a dialogue with the typewriter effect and character painting. &lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N.&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
&lt;br /&gt;
 When certain paragraph needs to be bound with audios, add &amp;lt;voice:audio ID&amp;gt; in the front of the paragraph to show the according to the audio file for the words. The audio will be turned off when you skip the paragraph.&lt;br /&gt;
 You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly.&lt;br /&gt;
 When the paragraph begins with “inner:...”, a special piece of information is used;&lt;br /&gt;
 The built-in special information IDs and meanings are as follow:  &lt;br /&gt;
 inner:set_player_job: object’s words when they give orders to player&lt;br /&gt;
 inner:set_player_lord: text when the player is appointed as a ruler&lt;br /&gt;
 inner:self_introduce: self-introduction of a character &lt;br /&gt;
 inner:cur_doing: the content of what the current character has been doing&lt;br /&gt;
 inner:cur_team_intent: intension of the current squad&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side. &lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump-to Event'''&lt;br /&gt;
&lt;br /&gt;
Function: Jump to and execute another specific scenario event ID.&lt;br /&gt;
&lt;br /&gt;
Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0).&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT&lt;br /&gt;
|'''Jump-to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT*scenario event ID.&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT_RETURN&lt;br /&gt;
|'''Return to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump back to the last subevent from the current subevent.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT_RETURN*&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Selection List Box'''&lt;br /&gt;
&lt;br /&gt;
Function:  Based on the text box, after the dialogue content is printed, a selection list box pops up, lets the player choose an option, and returns the result (the according [%result_code%] of the result command in the event).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 when the KEY of an option begins with &amp;quot;+&amp;quot;, the text box will not disappear after the player selects an option. &lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TALK&lt;br /&gt;
|'''Plugin Dialogue Option'''&lt;br /&gt;
Function: a selection list box that can present new options via a trigger list.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by &amp;quot;|&amp;quot;; set to be &amp;quot;any&amp;quot; by default)&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be &amp;quot;any&amp;quot; by default if nothing is filled in), but certain options (whose trigger type is SELECT and meet conditions) will be selected from the trigger and be added as new options; the text shown is bound in the trigger, and the content of the triggered event is decided by the trigger event ID.&lt;br /&gt;
&lt;br /&gt;
 Please note: when using this directive, you need to add &amp;quot;[%result_code%][&amp;gt;]99:EVENTPOJO_EVENT* &amp;quot; to the result&lt;br /&gt;
 In the trigger list, you can add a prefix &amp;quot;SUB_EVENT.&amp;quot; to a trigger event ID to mark it as a subevent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|CMD_SELECT&lt;br /&gt;
|'''System Selection List Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_SELECT*select text info#option group (same as SELECT directive).&lt;br /&gt;
|-&lt;br /&gt;
|CONFIRM&lt;br /&gt;
|'''Text Confirmation Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CONFIRM*text to confirm&lt;br /&gt;
|-&lt;br /&gt;
|TOAST&lt;br /&gt;
|'''Message on Screen'''&lt;br /&gt;
Function: a message pops up on the screen, which disappears after a short while.&lt;br /&gt;
&lt;br /&gt;
Format: TOAST*message content&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text).&lt;br /&gt;
|-&lt;br /&gt;
|GAME_MSG&lt;br /&gt;
|'''In-game News'''&lt;br /&gt;
Function: show a text in the UI message box, which can be reviewed in the News Log.&lt;br /&gt;
&lt;br /&gt;
Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System).&lt;br /&gt;
|-&lt;br /&gt;
|INPUT&lt;br /&gt;
|'''Input Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]).&lt;br /&gt;
&lt;br /&gt;
Format: INPUT*notice text#Len number limit of digit#default text.&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay).&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second).）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable).&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|BLACK_SCREEN&lt;br /&gt;
|'''Screen Curtain'''&lt;br /&gt;
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain.&lt;br /&gt;
&lt;br /&gt;
Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
Function: Set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Annotation:&lt;br /&gt;
 Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity.&lt;br /&gt;
 E.g., 雪,60|雾,20&lt;br /&gt;
 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled&lt;br /&gt;
 For weather effect ID, please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]]&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE&lt;br /&gt;
|'''Start Battle'''&lt;br /&gt;
Function: start a skirmish or a battle defined in a specific battle table.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE*battle ID (if you do not fill in a specific battle ID or fill in “ENCOUNTER”, you start a skirmish)#BGM (optional; if there is a BGM in a particular battle).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH&lt;br /&gt;
|'''Fight with Specific Unit'''&lt;br /&gt;
Function: start a custom fight with a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH*target character info (optional)#minion info of the target (optional)#battle map info (optional)#battle location info (optional)#battlefield weather (optional)#BGM (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH_TAGROLE&lt;br /&gt;
|'''Fight with Target Character'''&lt;br /&gt;
&lt;br /&gt;
Function: start a specific fight with the target character immediately.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH_TAGROLE*battle ID (battle ID is used to trigger scenario event only)#specific BGM (optional; if there is a BGM for a specific battle).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_BGM&lt;br /&gt;
|'''Change Current BGM of the Game'''&lt;br /&gt;
Function: change the current BGM of the game based on the need of stories.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_BGM*parameter 1#paramter 2&lt;br /&gt;
&lt;br /&gt;
 Parameter 1: AudioID of the target BGM (switch back to the default BGM of the current map if this is empty; when the remaining field of this ID is “MUTE”, which means no BGM is played currently).&lt;br /&gt;
 Parameter 2: validation type (0: invalidated when switching scenes; 1: always validated even when you save the game and come back unless you recall the CHANGE_BGM directive and define an empty AudioID).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_SOUND&lt;br /&gt;
|'''Sound Effect'''&lt;br /&gt;
Function: play a sound effect in the game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_ROLE_VOICE&lt;br /&gt;
|'''Play Character Voice-over'''&lt;br /&gt;
Function: play an audio file that is defined in “Voice” of the character’s tags.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|NUMSEL&lt;br /&gt;
|'''Input Value Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]).&lt;br /&gt;
&lt;br /&gt;
Format: NUMSEL*text of input box#min value#max value#default value#item price#price message(when the item price is 0, system does not show the price message. Otherwise, the message needs to follow the format of “{0} Utar(s) for each unit, {1} Utar(s) in total”).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_MONEY&lt;br /&gt;
|'''Change Player’s Money in Hand '''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_MONEY*change value.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_CHANGE_MONEY&lt;br /&gt;
|'''Change a Specific Hero’s Money in Hand'''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_CHANGE_MONEY*Hero ID#change value.&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1).&lt;br /&gt;
|-&lt;br /&gt;
|AI_CAMP_GETITEMS&lt;br /&gt;
|'''All Factions Get Items or Resources'''&lt;br /&gt;
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive.&lt;br /&gt;
&lt;br /&gt;
Format: AI_CAMP_GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_ITEMS&lt;br /&gt;
|'''Convert Item'''&lt;br /&gt;
Function: convert a specific item in the current item list into a new item proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time.&lt;br /&gt;
&lt;br /&gt;
E.g., “TRANSFER_ITEMS*小麦#小麦粉#1#1#10” means converting wheat(小麦) into wheat powder(小麦粉) at a 1:1 proportion. If during the conversion, the original item becomes insufficient, the conversion stops.&lt;br /&gt;
|-&lt;br /&gt;
|GET_RND_ITEM&lt;br /&gt;
|'''Select a Type of Item Randomly'''&lt;br /&gt;
Function: select a type of item randomly among several items.&lt;br /&gt;
&lt;br /&gt;
Format: GET_RND_ITEM*object item list (e.g., GET_RND_ITEMS*茶叶(Tea), 3|面包(Bread), 1|牛奶(Milk), 2. This means that you will get one type of the three.)&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Specific Item or Resource'''&lt;br /&gt;
Function: remove a certain number of items from the item list of the player.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_SELECT_ITEMS&lt;br /&gt;
|'''Remove the Selected Item'''&lt;br /&gt;
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_SELECT_ITEMS*maximum number of selected groups (choose object groups in the front from the selected targets)#number of removal(optional; set -1 by default. When the number is lower than 0 or higher than the number of the object’s stacks, remove the whole group. Otherwise, draw a specific number of all selected targets).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_PRESENT&lt;br /&gt;
|'''Remove Specific Gift Item That Meet Requirement'''&lt;br /&gt;
Function: remove a gift item from the item list based on a specific gift tag.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of &amp;quot;Like&amp;quot; in the mission list.&lt;br /&gt;
|-&lt;br /&gt;
|ITEMS_SELECTOR&lt;br /&gt;
|'''Open Item Selection Text Box'''&lt;br /&gt;
Function: an item selection text box pops up. You can restore your choice in a queriable variable ([%last_seled_items%],[%last_seled_item_id%], etc).&lt;br /&gt;
&lt;br /&gt;
Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list &lt;br /&gt;
|-&lt;br /&gt;
|TEAM_GAINEXP&lt;br /&gt;
|'''Player’s Squad Gains EXP'''&lt;br /&gt;
Function: members in the player’s squad gain average EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|TEST_ADD_ROLE_EXP&lt;br /&gt;
|'''Specific Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEST_ADD_ROLE_EXP*hero ID#exp.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_ROLE_LV&lt;br /&gt;
|'''Change Character Level'''&lt;br /&gt;
Function: change the level of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_ROLE_LV*hero ID#expected level.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_GUARDS_LEVELUP&lt;br /&gt;
|'''All Defending Heroes Level Up'''&lt;br /&gt;
Function: all heroes in a specific location increase their level by 1.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_GUARDS_LEVELUP*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_TEAM_LEVELUP&lt;br /&gt;
|'''All Heroes in Player’s Squad Level UP'''&lt;br /&gt;
Function: all heroes in the player’s squad level up directly.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_TEAM_LEVELUP*.&lt;br /&gt;
|-&lt;br /&gt;
|SETTRIGG&lt;br /&gt;
|'''Set Trigger Switch'''&lt;br /&gt;
Function: turn on or turn off a trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: SETTRIGG*trigger ID#status value (0: On; 1: Off)&lt;br /&gt;
|-&lt;br /&gt;
|TRIGGER&lt;br /&gt;
|'''Execute Trigger'''&lt;br /&gt;
Function: execute a specific trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: TRIGGER*trigger ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_ES&lt;br /&gt;
|'''Manually Set Scenario Event Status'''&lt;br /&gt;
Function: set the execution status of a scenario event manually (after the logics have been executed, the result will be marked with ResultCode of the current event).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event).&lt;br /&gt;
|-&lt;br /&gt;
|SETINTVAR&lt;br /&gt;
|'''Set Custom Int Variable'''&lt;br /&gt;
Function: set a custom int variable (recorded by saves). Some variable fields will be connected the in-game logic parameter (for custom int variable that are defined inside the program, please see the“[[Built-in Custom Variable Field#Built-in Custom Variable Field|Built-in Custom Variable Field]]”) and can be queried via built-in query parameter ([%int_val:ID%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETINTVAR*parameter ID#current int value&lt;br /&gt;
|-&lt;br /&gt;
|CHANGEINTVAR&lt;br /&gt;
|'''Change Custom Int Variable'''&lt;br /&gt;
Function: change the value of the current custom int variable.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TEMP_ID&lt;br /&gt;
|'''Set Temporary ID Variable'''&lt;br /&gt;
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TEMP_ID*ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETSTRVAR&lt;br /&gt;
|'''Set Custom String Variable'''&lt;br /&gt;
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETSTRVAR*Variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIMETAG&lt;br /&gt;
|'''Tag a Custom Crucial Time Point '''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can use [%tag_gametime_elapse%] to load the time span since the time point you record.&lt;br /&gt;
&lt;br /&gt;
Please note: this directive is only used to transfer temporary variables in a series of stories, and the tag will not be stored in saves. Do not use this for scenes that need permanent data.&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIMETAG*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIME&lt;br /&gt;
|'''Tag a Custom In-game Time Point'''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can query the relevant info of this time point via query parameter (see[%gametime_elapse%] and [%gametime_elapse_by_day%], etc.).&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIME*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CUSTOM_CD&lt;br /&gt;
|'''Set a Custom Cooldown Time'''&lt;br /&gt;
Function: set a custom cooldown timer and see whether the current cooldown is in use by checking if [%is_custom_cd:ID%] is 1 or not.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;＞0: set a specific time (count by day)).&lt;br /&gt;
|-&lt;br /&gt;
|GET_QUEST&lt;br /&gt;
|'''Claim a Mission'''&lt;br /&gt;
Function: claim a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: GET_QUEST*mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_QS&lt;br /&gt;
|'''Add Mission Subitem Counter'''&lt;br /&gt;
Function: add a subitem counter of missions manually.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter.&lt;br /&gt;
|-&lt;br /&gt;
|SETQUESTIEM&lt;br /&gt;
|'''Set Value of Mission Subitem'''&lt;br /&gt;
Function: set the value of the subitem of missions.&lt;br /&gt;
&lt;br /&gt;
Format: SETQUESTIEM*mission ID#subitem index#value&lt;br /&gt;
|-&lt;br /&gt;
|DONE_QUEST&lt;br /&gt;
|'''Complete a Mission'''&lt;br /&gt;
Function: mark and complete a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: DONE_QUEST*mission ID#reward or not(1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_IMG&lt;br /&gt;
|'''Show a Character Painting Frame'''&lt;br /&gt;
Function: [not suggested; recommend using the SHOW_CG direcitve].&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*name of image*preset special effect 0*duration (second).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_IMG&lt;br /&gt;
|'''Disable Character Painting Frame'''&lt;br /&gt;
Function: disable the current character painting frame.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_IMG*preset special effect 0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_ROLE&lt;br /&gt;
|'''Force Character to Join'''&lt;br /&gt;
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel.&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_ROLE&lt;br /&gt;
|'''Force Character to Leave'''&lt;br /&gt;
Function: force a character to leave your squad.&lt;br /&gt;
&lt;br /&gt;
Format: QUIT_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE&lt;br /&gt;
|'''Change Location Status'''&lt;br /&gt;
Function: set the current status of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLEPOS&lt;br /&gt;
|'''Set Character Position'''&lt;br /&gt;
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLEPOS*character ID#position info&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_PLACE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport Player to Specific Position'''&lt;br /&gt;
Function: teleport player’s squad to a specific position in the world.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*world position info.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_PLACE&lt;br /&gt;
|'''Teleport Player to Specific Location'''&lt;br /&gt;
Function: teleport player’s squad to a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_PLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_ROLE&lt;br /&gt;
|'''Teleport Player to Target Character'''&lt;br /&gt;
Function: teleport player’s squad to where the target character is currently staying (this only works when the target is in a squad or a location).&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CMD&lt;br /&gt;
|'''Exclusive Directive Group for Unit Control on Sandbox Map '''&lt;br /&gt;
Function: control various units to execute specific directives on a sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: MAP_CMD*directive content&lt;br /&gt;
&lt;br /&gt;
 Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes).&lt;br /&gt;
 Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate.&lt;br /&gt;
 Hide current battle mark: HIDE_BATTLE_MARK#1.&lt;br /&gt;
|-&lt;br /&gt;
|RESTORE&lt;br /&gt;
|'''Player’s Squad Get Recovered'''&lt;br /&gt;
Function: all units in the player’s squad are recovered.&lt;br /&gt;
&lt;br /&gt;
Format: RESTORE*parameter (&amp;lt;=0: squad fully recovered; &amp;gt;0: squad recovered by a specific point).&lt;br /&gt;
|-&lt;br /&gt;
|TIME_ELAPSE&lt;br /&gt;
|'''Time Acceleration'''&lt;br /&gt;
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up.&lt;br /&gt;
&lt;br /&gt;
Format: TIME_ELAPSE*in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#show time bar (0: No(default); 1: Yes)#operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|WAIT_EXEC&lt;br /&gt;
|'''Wait and Execute a Script Event'''&lt;br /&gt;
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: WAIT_EXEC* in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#script event ID #operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSEIGE&lt;br /&gt;
|'''Open Siege Management Panel'''&lt;br /&gt;
Function: show a siege management panel and operate reinforcement squads based on the preset (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
Format: OPENSEIGE*panel mode(0: attack city; 1: defend city)#target location ID (optional; set to be the target location of the current environment variable by default).&lt;br /&gt;
|-&lt;br /&gt;
|OCCUPY&lt;br /&gt;
|'''Execute City Occupation'''&lt;br /&gt;
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
&lt;br /&gt;
Format: OCCUPY*0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_WARBAND&lt;br /&gt;
|'''Join Warband'''&lt;br /&gt;
Function: joined an existed warband（a group of fighting squads from two different sides） (use [$tagwb:id$] to obtain the Warband info of the current skirmish).&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_WARBAND*warband ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_CAMP&lt;br /&gt;
|'''Change Character Faction'''&lt;br /&gt;
Function: change the faction of a target character directly.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_CAMP*faction ID#target character ID#recruiter ID(if this field is player then the character will join the player’s squad directly).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_OWN_CAMP&lt;br /&gt;
|'''Player Creates Their Faction'''&lt;br /&gt;
Function: player creates and activates their own faction. Player’s faction has a fixed default ID: Self-built Faction. This faction exists since the beginning of the game, but it is inactivated. Calling this directive will activate the player’s faction, making player and their followers join this faction.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_OWN_CAMP*name of self-built faction.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_ACTIVE&lt;br /&gt;
|'''Change Faction Project Status'''&lt;br /&gt;
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_RL&lt;br /&gt;
|'''Change Faction Relationship'''&lt;br /&gt;
Function: change diplomatic relationship or friendliness between factions.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_RL*faction A#faction B#relationship (-1: Remain the same; 0: Neutral; 1: Hostile; 2: Friendly)#friendliness value change#expected friendliness value (if this field exists).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_CAMP_REP&lt;br /&gt;
|'''Change Player’s Prestige (Tribute) towards Faction'''&lt;br /&gt;
Function: change player’s prestige (Tribute) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_CAMP_REP*target faction ID#value change#expected value (this works when the value is not empty). The faction refers to the player’s current faction if the faction ID is empty.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_REP&lt;br /&gt;
|'''Change Player’s Prestige (Friendliness) towards Faction'''&lt;br /&gt;
Faction: change the player’s prestige (Friendliness) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|FAME&lt;br /&gt;
|'''Change Player’s Global Prestige'''&lt;br /&gt;
Function: change the player’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: FAME*value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_FAME&lt;br /&gt;
|'''Change Character’s Global Prestige'''&lt;br /&gt;
Function: change a specific character’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_FAME*target character ID#value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PERSON_FV&lt;br /&gt;
|'''Change Favor between the Player and a Character'''&lt;br /&gt;
Function: change favor between the player and another character.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_ACTIVE&lt;br /&gt;
|'''Change Character Project Status'''&lt;br /&gt;
Function: change the project status of a character (not controlled by the player). When this character is inactive, they will not be refreshed in Taverns or execute AI actions like moving.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PROSP_BY_CAMP&lt;br /&gt;
|'''Change Prosperity of All Bases of Faction'''&lt;br /&gt;
Function: change the prosperity of all bases of a specific faction proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PROSP_BY_CAMP*faction ID#percentage(&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY&lt;br /&gt;
|'''Change Location Prosperity''' &lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY*location ID#value change#expected value (this works when the value is not empty; cannot exceed the maximum Prosperity of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY_BY_PCT&lt;br /&gt;
|'''Change Location Prosperity by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF&lt;br /&gt;
|'''Change Location Defense'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Defense of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF*location ID#value change#expected value(this works when the value is not empty; cannot exceed the maximum Defense of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF_BY_PCT&lt;br /&gt;
|'''Change Location Defense by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the defense of a location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_SECURITY&lt;br /&gt;
|'''Change Location Security'''&lt;br /&gt;
&lt;br /&gt;
Function: change the security of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CUSTOM_INT&lt;br /&gt;
|'''Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: a custom int field value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. &lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_CUSTOM_INT&lt;br /&gt;
|'''Change Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the custom int value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_ADD_BUILDING&lt;br /&gt;
|'''Add Custom Facility'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom facility to a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_REMOVE_BUILDING&lt;br /&gt;
|'''Remove Custom Facility from Location'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom facility from a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_REMOVE_BUILDING*location ID#facility ID.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_CARAVAN&lt;br /&gt;
|'''Create Caravan'''&lt;br /&gt;
&lt;br /&gt;
Function: create a caravan in a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_TEAM&lt;br /&gt;
|'''Create Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad, which takes actions according to specific directives.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_TEAM*position on the map#faction#character list (characters included will leave their current squads or locations compulsorily)#minion card list (card ID#level, number |card ID2#level 2, number 2|.......)#directive method (see below)#directive parameter#squad TAG(used to search for specific squads).&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive methods are:&lt;br /&gt;
&lt;br /&gt;
· 0: custom directive: the parameter of the custom directive is the directive for the squad (format: directive type 1, parameter 1; directive type 2, parameter 2;……; directive type N, parameter N) For detailed directive format, please see the Squad Preset Directive.&lt;br /&gt;
&lt;br /&gt;
· 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default).&lt;br /&gt;
&lt;br /&gt;
· 2: premade directive of invading faction: the parameter is the ID of the target faction, priority of target (0: Distance first; 1: Defense first), invasion method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|DISMISS_TEAM&lt;br /&gt;
|'''Dismiss Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss a specific squad.&lt;br /&gt;
&lt;br /&gt;
Format: DISMISS_TEAM*map unit identification ID&lt;br /&gt;
|-&lt;br /&gt;
|TEAM_ORDER&lt;br /&gt;
|'''Change Squad Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: change the current directive list of the squad.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_PLACE&lt;br /&gt;
|'''Attack Location'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside.&lt;br /&gt;
&lt;br /&gt;
Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_CAMP&lt;br /&gt;
|'''Attack Faction'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to attack another faction immediately. Please note: these two factions must be hostile towards each other or both stand neutral. If the attacker does not have sufficient military power, the attack might not happen.&lt;br /&gt;
&lt;br /&gt;
Format: IVASION_CAMP*attacker (faction) ID#target faction ID#priority of target(0: Distance first; 1: Defense first)#invasion type (0: Occupation; 1:Raid)#number of bases involved (0: All; &amp;gt;0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel with a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_LOCAL_PRODUCT&lt;br /&gt;
|'''Add Map Specialty'''&lt;br /&gt;
&lt;br /&gt;
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y.&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERMISSION&lt;br /&gt;
|'''Set Trade Permission'''&lt;br /&gt;
&lt;br /&gt;
Function: set trade permission for a location.&lt;br /&gt;
&lt;br /&gt;
Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|TROOPS_ALLOC&lt;br /&gt;
|'''Garrison Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the garrison panel of a location.&lt;br /&gt;
&lt;br /&gt;
Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|GETSKILL&lt;br /&gt;
|'''Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill to a character.&lt;br /&gt;
&lt;br /&gt;
Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills).&lt;br /&gt;
|-&lt;br /&gt;
|LEARN_SKILL&lt;br /&gt;
|'''Consume Skill Point to Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character in a squad and make them learn a new skill. If they do not have enough skill point, they cannot learn the skill.&lt;br /&gt;
&lt;br /&gt;
Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVESKILL&lt;br /&gt;
|'''Forget Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a skill from a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills)&lt;br /&gt;
|-&lt;br /&gt;
|RESET_SP&lt;br /&gt;
|'''Reset Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the skill points of a character.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_SP*character ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_UNUSEDSP&lt;br /&gt;
|'''Change Available Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill point to a player and allocate the skill point.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_UNUSEDSP*number of skill point.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SKILLPAGE&lt;br /&gt;
|'''Activate or Remove Player’s Skill Page'''&lt;br /&gt;
&lt;br /&gt;
Function: activate or remove a skill page of the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_TEAMINFO&lt;br /&gt;
|'''Show Info of Current Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: show the information on the current squad that you encounter.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_TEAMINFO*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_FLAG&lt;br /&gt;
|'''Set Complete Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story.&lt;br /&gt;
&lt;br /&gt;
Format: SET_FLAG*name of the mark#mark value.&lt;br /&gt;
|-&lt;br /&gt;
|UPDATE_MARKS&lt;br /&gt;
|'''Mark Update'''&lt;br /&gt;
&lt;br /&gt;
Function: update marks on the map.&lt;br /&gt;
&lt;br /&gt;
Format: UPDATE_MARKS*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUMMY&lt;br /&gt;
|'''Set Dummy or Creep Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode on Sandbox Map'''&lt;br /&gt;
&lt;br /&gt;
Function: control the camera mode on the sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter&lt;br /&gt;
&lt;br /&gt;
and meanings of the parameters:&lt;br /&gt;
&lt;br /&gt;
0: follows the player’s character. No parameter (default).&lt;br /&gt;
&lt;br /&gt;
1: follows a specific target. The parameter is the particular map unit identification ID.&lt;br /&gt;
&lt;br /&gt;
2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Map'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of all cities on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|TRY_RECRUIT_FREE_ROLE&lt;br /&gt;
|'''Try Neutral Hero Recruitment'''&lt;br /&gt;
&lt;br /&gt;
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full).&lt;br /&gt;
&lt;br /&gt;
Format: TRY_RECRUIT_FREE_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHK_RECRUIT_CAPTIVE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_CAP&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|SEND_ENVOY&lt;br /&gt;
|'''Send Diplomatic Envoy'''&lt;br /&gt;
&lt;br /&gt;
Function: send a diplomatic envoy for specific diplomatic missions.&lt;br /&gt;
&lt;br /&gt;
Format: SEND_ENVOY*faction ID (refer to player’s faction when empty)#diplomatic behaviour (1: Ransom; 2:Friendly; 3: War; 4: Alliance; 5: Alliance broke; 6: Armistice)#target ID (when you ransomed a character, it is the character ID; otherwise it is the target faction ID)#additional parameter(usually it is the required amount of money)#envoy arrival (1: No waiting time; 0: Need to wait).&lt;br /&gt;
|-&lt;br /&gt;
|DIP_DECIDE&lt;br /&gt;
|'''Execute Diplomatic Event Check'''&lt;br /&gt;
&lt;br /&gt;
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event).&lt;br /&gt;
&lt;br /&gt;
Format: DIP_DECIDE*result code (1: Agreement; 0: Decline).&lt;br /&gt;
|-&lt;br /&gt;
|EXPEL_ROLE&lt;br /&gt;
|'''Expel Character'''&lt;br /&gt;
&lt;br /&gt;
Function: expel a character out of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: EXPEL_ROLE*faction ID#character ID.&lt;br /&gt;
|-&lt;br /&gt;
|TRY_REWARD_ROLE&lt;br /&gt;
|'''Try to Reward a Follower'''&lt;br /&gt;
&lt;br /&gt;
Function: try to reward a follower.&lt;br /&gt;
&lt;br /&gt;
Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Add Global Buff to Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: add a global buff to the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_GLOBAL_BUFF*buffID#duration (in-game days)#number of stacks (set 1 by default)#upper limit of stacks (set -1 by default, no limit).&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF*buffID&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF_BYCLASS&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove All Global Buffs of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all global buffs of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_FAILED&lt;br /&gt;
|'''Game Failed'''&lt;br /&gt;
&lt;br /&gt;
Function: a common result of the player failing their game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_FAILED*1.&lt;br /&gt;
|-&lt;br /&gt;
|LOSE_INVENTORY&lt;br /&gt;
|'''Player Loses Common Items'''&lt;br /&gt;
&lt;br /&gt;
Function: the player loses their items once (only goods and money).&lt;br /&gt;
&lt;br /&gt;
Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGROLE&lt;br /&gt;
|'''Change Object Character of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object character of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGPLACE&lt;br /&gt;
|'''Change Object Location of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object location of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGPLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|SURRENDER&lt;br /&gt;
|'''Faction Surrenders'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender).&lt;br /&gt;
&lt;br /&gt;
Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter&lt;br /&gt;
|-&lt;br /&gt;
|GEN_RND_PLACE&lt;br /&gt;
|'''Select Random Location to Query'''&lt;br /&gt;
&lt;br /&gt;
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives.&lt;br /&gt;
&lt;br /&gt;
Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction)&lt;br /&gt;
|-&lt;br /&gt;
|HERO_UPGRADE&lt;br /&gt;
|'''Hero Enhancement'''&lt;br /&gt;
&lt;br /&gt;
Function: enhance an attribute permanently of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit).&lt;br /&gt;
|-&lt;br /&gt;
|HERO_SET_STATU&lt;br /&gt;
|'''Set Character Attribute Field'''&lt;br /&gt;
&lt;br /&gt;
Function: set a value of an attribute field for a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_BUFF&lt;br /&gt;
|'''BUFF Add Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: add a faction buff to a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_BUFF*faction ID#buff ID#duration (in-game days; when this value is lower than 0, the buff becomes permanent unless it is removed compulsorily).&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF&lt;br /&gt;
|'''Remove Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF*faction ID#buff ID.&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF_BYCLASS&lt;br /&gt;
|'''Remove Faction Buff by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''Remove All Faction Buffs'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all faction buffs from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Add Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: add a dynamic attribute field to a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Reset Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: reset all values in the dynamic attribute field in a faction.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_CAMP_EXTRA_STATU*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|WEAPON_DURABILITY_DOWN&lt;br /&gt;
|'''Weapon Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of the current weapon. When the durability is below 0, the weapon is destroyed. If the weapon’s durability is -1 (does not have durability), nothing happens with this directive.&lt;br /&gt;
&lt;br /&gt;
Format: WEAPON_DURABILITY_DOWN*value.&lt;br /&gt;
|-&lt;br /&gt;
|ITEM_DURABILITY_DOWN&lt;br /&gt;
|'''Specific Item Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of an item (with the right tag and meets the level condition(&amp;gt;= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed.&lt;br /&gt;
&lt;br /&gt;
Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SYNTH_STATE&lt;br /&gt;
|'''Set Status of Recipe'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific recipe.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned)&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SYNTH_DLG&lt;br /&gt;
|'''Open Item Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of item crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SYNTH_DLG*if locked (0: Do not lock the main category; 1: Lock display category)#catagory page shown by default (can be set empty by default; use “,” to separate pages; show the first page by default; this field can show hidden categories when the main category is locked)#story key to execute after closing the crafting dialogue (can be empty).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CARD_SYNTH_DLG&lt;br /&gt;
|'''Open Card Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of card crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CARD_SYNTH_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_EFT&lt;br /&gt;
|'''Play Special Effect'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect on the current map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#map coordinate#initial rotation degree (can be the rotation vector of the three directions or a spinning degree of the Y-axis)#scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_MU_EFT&lt;br /&gt;
|'''Unit Following Special Effect on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect that follows a unit on a specific map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_MU_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#map unit ID#object range (0: hero only; 1: all units)#initial rotation degree (can be the rotation vector of the three directions, or a spinning degree of the Y-axis))# scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_MAPAREA_SELECTOR&lt;br /&gt;
|'''Open Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a UI panel of area selector on the current sandbox map. You can select a location for the current object in the predefined area on this panel, and then a result is returned. If the result_code returns 1, the location setting succeeded; if 0, the setting failed. The location info is recorded in [$last_selpos$].&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_FREEAREA_SELECTOR&lt;br /&gt;
|'''Open Free Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_SELECTOR&lt;br /&gt;
|'''Open Location Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a suggested location selector panel. Selected result will be stored in [$tagplace$], its number stored in [%result_code%].If [%result_code%] is 9999, player cancels the selection. &lt;br /&gt;
&lt;br /&gt;
Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter).&lt;br /&gt;
|-&lt;br /&gt;
|SET_LORD&lt;br /&gt;
|'''Set City Ruler'''&lt;br /&gt;
&lt;br /&gt;
Function: set a city ruler for a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_LORD*character ID#location ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_CHEST&lt;br /&gt;
|'''Add a Custom Chest'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom chest on the world map according to the setting info (this “chest” can be any interactive object on the world map, such as materials, ruins, and soldier recruitment point).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (&amp;gt;0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CHEST&lt;br /&gt;
|'''Set Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a controllable chest on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CHEST*map ID#chest ID#status (&amp;gt;0: How many times you can open the chest; &amp;lt;=0: Chest Opened).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CURCHEST&lt;br /&gt;
|'''Set Current Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of the target chest in the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CURCHEST*statu (same as SET_CHEST).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_SYSTEM_UI&lt;br /&gt;
|'''Turn Off System UI'''&lt;br /&gt;
&lt;br /&gt;
Function: turn of the current system UI.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_SYSTEM_UI*.&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_ITEM_PANEL&lt;br /&gt;
|'''Close Bag UI'''&lt;br /&gt;
&lt;br /&gt;
Function: close the current UI panel of the player’s bag (if it exists).&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_ITEM_PANEL*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLES_SELECTOR&lt;br /&gt;
|'''Turn Off Character Selector UI'''&lt;br /&gt;
Function: turn off the current system UI of the character selector.&lt;br /&gt;
&lt;br /&gt;
Format: ROLES_SELECTOR*title of selection list box#number limit of options (&amp;lt;0: No limit)#option range (0: Global non-template character; 1: Player squad character; 2: Character in the Character Table)#conditional expression#parameter (the parameter is the character list when the selection range is the specific Character Table).&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
 ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&amp;amp;[$tagrole:campid$][&amp;lt;&amp;gt;][$null$]#&lt;br /&gt;
 ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4.&lt;br /&gt;
The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%].&lt;br /&gt;
|-&lt;br /&gt;
|ASK_ABOUT_SOMEBODY_SELECTOR&lt;br /&gt;
|'''Ask-about Character Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: the character who you ask whereabout of is currently not involved in the logic calculation. The character selection list box pops up, and the result is stored in [%arg_str_val1%]. When the result [%result_code%] is 9999, player cancels the selection.&lt;br /&gt;
&lt;br /&gt;
Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about.&lt;br /&gt;
|-&lt;br /&gt;
|CARD_SELECTOR&lt;br /&gt;
|'''Card Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: show the panel of current card list for the player to select.&lt;br /&gt;
&lt;br /&gt;
Format: CARD_SELECTOR*title of selection list box#number limit of selection (&amp;lt;0: No limit)#selection range (0: Card in the player squad; 2: Specific unit list) #parameter (optional; the parameter is the unit list when the selection range is the specific Unit Table).&lt;br /&gt;
|-&lt;br /&gt;
|ASSEMBLE_ARMY&lt;br /&gt;
|'''Gather Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: gather all troops and followers of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ASSEMBLE_ARMY#Gatherer ID#follower ID (can be empty; use “|” to separate; can use [%last_seled_roles%], the result of ROLES_SELECTOR). If the follower ID is empty, all characters under the faction are selected by default.&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_ALL_ASSEMBLE_ARMY&lt;br /&gt;
|'''Dismiss All Gathered Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss all troops that have been gathered or gathering.&lt;br /&gt;
&lt;br /&gt;
Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_IN_PROJECT&lt;br /&gt;
|'''Character Starts to Execute Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a character starts to execute a specific project.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_IN_PROJECT*character ID#project ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_FINISH_PROJECT&lt;br /&gt;
|'''Character Ends Current Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific character ends their current project compulsorily.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,...&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PROJECT_ADMIN&lt;br /&gt;
|'''Open Personal Project Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the personal project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default).&lt;br /&gt;
|-&lt;br /&gt;
|GROUP_PROJECT_ADMIN&lt;br /&gt;
|'''Open Group Project Panel'''&lt;br /&gt;
Function: open the group project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default).&lt;br /&gt;
 Currently, supported project binding types are:&lt;br /&gt;
 Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty&lt;br /&gt;
 world: custom building construction; object parameter format: custom area control ID; belong to which base (when this field is empty, the building does not belong to any city).&lt;br /&gt;
|-&lt;br /&gt;
|SET_REVIVE_POS&lt;br /&gt;
|'''Set Respawn Position'''&lt;br /&gt;
&lt;br /&gt;
Function: set a new respawn position.&lt;br /&gt;
&lt;br /&gt;
Format: SET_REVIVE_POS*world map position (map ID:x,y).&lt;br /&gt;
|-&lt;br /&gt;
|SET_SILENCE_MODE&lt;br /&gt;
|'''Set Silence Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable message silence mode. &lt;br /&gt;
&lt;br /&gt;
Format: SET_SILENCE_MODE*silence mode (0: Disabled; 1: Do not show TOAST box and deliver messages only; TOAST info of obtaining items is shown in the message; 2: Do not show TOAST and messages).&lt;br /&gt;
|-&lt;br /&gt;
|START_RAID_PLACE&lt;br /&gt;
|[Abolished]&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_PLACE&lt;br /&gt;
|'''Add Custom Location'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom location on a specific spot on the world map.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_PLACE*custom location ID (globally unique)#belong to the city (can be empty; the location does not belong to any city when this field is empty#location info template ID#location info#default faction of the location.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_NAME&lt;br /&gt;
|'''Change Location Name'''&lt;br /&gt;
&lt;br /&gt;
Function: change the name of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_NAME*location ID#custom name. &lt;br /&gt;
|-&lt;br /&gt;
|OPEN_PLACE_BUILD_UI&lt;br /&gt;
|'''Open Location Building Construction Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the location building construction panel.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD&lt;br /&gt;
|'''Add New Card'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD_PIECE&lt;br /&gt;
|'''Add Card with Specific Durability'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card, whose durability is a specific number (lower than the durability limit).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|SET_OBS_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of an obstacle area on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_AREA&lt;br /&gt;
|'''Explore Area'''&lt;br /&gt;
&lt;br /&gt;
Function: explore an area of the current map (dispel the war fog).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_MAP&lt;br /&gt;
|'''Explore the Whole Map'''&lt;br /&gt;
&lt;br /&gt;
Function: explore the whole map (dispel the war fog of the entire map).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_MAP*map ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTVAL_WATCHER&lt;br /&gt;
|'''Add Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. &lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTVAL_WATCHER*variable monitor info.&lt;br /&gt;
&lt;br /&gt;
(Format: field Key1,displayed name1,enumerated value 1a=enumerated name1a|enumerated value 1b=enumerated name1b|...|enumerated value 1N=enumerated name 1N, visibility status in battles([optional，set 0 by default] 0: No; 1: Yes);...; monitor field info N).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTVAL_WATCHER&lt;br /&gt;
|'''Remove Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom variable monitor filed.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTVAL_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_INTVAL_WATCHERS&lt;br /&gt;
|'''All Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: exact all variable monitor fields.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_INTVAL_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set an event timer, and a specific event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (&amp;lt;0: the timer is closed; when the timer type is Preset, this parameter is the number of days since the beginning of the game; when the timer type is Countdown, the parameter is the number of days)#timer type (0: Preset (triggered when time is reached); 1: Countdown)#Event ID when time reached#compulsory update (1: Compulsory update; 0: Non-compulsory update(will not change the current data of existing timer); set 1 if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER&lt;br /&gt;
|'''Remove Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER*timer ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TIMER_TIME&lt;br /&gt;
|'''Change Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: increase/decrease the time of a timer.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_TIMER_WATCHER&lt;br /&gt;
|'''Add Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] &lt;br /&gt;
&lt;br /&gt;
coefficient of the scaling of time parameter), visibility in battles ([optional; set 0 by default]; 0: No; 1: Yes)|...|timer ID N, displayed time format N, scale parameter N.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER_WATCHER&lt;br /&gt;
|'''Remove Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the monitor field of a custom event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_TIMER_WATCHERS&lt;br /&gt;
|'''Clear All Monitor Fields of Custom Event Timer''' &lt;br /&gt;
&lt;br /&gt;
Function: clear all monitor fields of custom event timer.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_TIMER_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_RECRUIT_CARD_IN_PLACE&lt;br /&gt;
|'''Open City Recruitment Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the player’s recruitment panel in a city.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_RECRUIT_CARD_IN_PLACE*city ID#ID of the event executed after recruitment (optional)#ID of the event executed after player cancels the recruitment (optional).&lt;br /&gt;
|-&lt;br /&gt;
|STORY_CARD_START&lt;br /&gt;
STORY_CARD_LINE&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END&lt;br /&gt;
|'''Open Story Card (2D Image)''' '''Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the story card panel. There must be a STORY_CARD_START and a STORY_CARD_END to avoid errors. STORY_CARD_LINE stands for the story paragraphs that need to be put between the start and the end (no number limit).&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_START*file name of the card.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 1.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 2.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 3.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END*.&lt;br /&gt;
|-&lt;br /&gt;
|AUTOSAVE&lt;br /&gt;
|'''AutoSave'''&lt;br /&gt;
&lt;br /&gt;
Function: execute autosave immediately.&lt;br /&gt;
&lt;br /&gt;
Format: AUTOSAVE*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Saving Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game-saving dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SAVE_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Loading Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game loading dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_LOAD_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|EXCHANGE_CARD&lt;br /&gt;
|'''Open Card Exchange Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the card exchange panel.&lt;br /&gt;
&lt;br /&gt;
Format: EXCHANGE_CARD*object type (0: Location; 1: Squad)#object ID([optional; set to be the current location by default]; when the object is a location, the ID is the location ID, squad ID for squad object).&lt;br /&gt;
|-&lt;br /&gt;
|LEVEL_FINISH&lt;br /&gt;
|'''Complete Level'''&lt;br /&gt;
&lt;br /&gt;
Function: used in scenarios to indicate the accomplishment of a level.&lt;br /&gt;
&lt;br /&gt;
Format: LEVEL_FINISH*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA_FILTER&lt;br /&gt;
|'''Set Camera Filter'''&lt;br /&gt;
&lt;br /&gt;
Function: set a filter for the camera. &lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10).&lt;br /&gt;
&lt;br /&gt;
Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100.&lt;br /&gt;
|-&lt;br /&gt;
|TLACTION&lt;br /&gt;
|'''Timeline Action'''&lt;br /&gt;
&lt;br /&gt;
Function: specific units on the world map do TIMELINE actions.&lt;br /&gt;
&lt;br /&gt;
Format: TLACTION*map character ID#file name of Timeline action#lasting time of action.&lt;br /&gt;
|-&lt;br /&gt;
|SELECTION_VIEW&lt;br /&gt;
|'''Fullscreen Special Story Selection'''&lt;br /&gt;
&lt;br /&gt;
Function: open a fullscreen selection panel of a special story.&lt;br /&gt;
&lt;br /&gt;
Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*).&lt;br /&gt;
|-&lt;br /&gt;
|DIALOG_BUBBLE&lt;br /&gt;
|'''Map Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying.&lt;br /&gt;
|-&lt;br /&gt;
|TEXT_EXPLORE_START&lt;br /&gt;
TEXT_EXPLORE_OVER&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD&lt;br /&gt;
|'''Text Adventure Relevant'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific text adventure mode.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_OVER*. Ends the current instance.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_CG&lt;br /&gt;
|'''Show CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: create an interface for showing CG images (please note: after enabling this function, you need to use HIDE_CG* manually to hide the CG. Otherwise the CG will get to player).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_CG*image name (no suffix; if this field is empty, the background will become black. The relevant directory is: Assets\BuildSource\Backgrounds\. Only .png file accepted).&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_CG&lt;br /&gt;
|'''Hide CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: hide the CG interface.&lt;br /&gt;
&lt;br /&gt;
Format: HIDE_CG*.&lt;br /&gt;
|-&lt;br /&gt;
|GENERATE_RANDOM_CARD&lt;br /&gt;
|'''Select a Card Randomly'''&lt;br /&gt;
&lt;br /&gt;
Function: select a card randomly, which will be stored in the tag card of the current variable.&lt;br /&gt;
&lt;br /&gt;
Format: GENERATE_RANDOM_CARD#1.&lt;br /&gt;
|-&lt;br /&gt;
|VOICE_OVER&lt;br /&gt;
|'''Voice Over'''&lt;br /&gt;
&lt;br /&gt;
Function: show a voice-over interface.&lt;br /&gt;
&lt;br /&gt;
Format: VOICE_OVER*voice over the content.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_STORYARMY&lt;br /&gt;
|'''Create a Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad only for stories.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_STORYARMY*tagkey#map position#faction#character list (all selected characters will leave their current squads or locations compulsorily)#card unit list (card ID1,number1,level1|card ID2,number 2,level 2|.......)#movement info (e.g., WANDER,2500).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_STORYARMY&lt;br /&gt;
|'''Remove Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a story squad.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_STORYARMY*tagkey.&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_BUY_ITEM&lt;br /&gt;
|'''Bazaar Merchant Buy-in'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants buy items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_SELL_ITEM&lt;br /&gt;
|'''Bazaar Merchant Sell-out'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants sell items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SHOWROLE&lt;br /&gt;
|'''Show Character Painting'''&lt;br /&gt;
Function: show character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;painting position &lt;br /&gt;
|-&lt;br /&gt;
|HIDEROLE&lt;br /&gt;
|'''Hide Character Painting'''&lt;br /&gt;
Function: hide character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: HIDEROLE*position of character 1 painting (#position of character 2 painting) (optional).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; L stands hiding the painting on the left side, R for hiding the painting on the right side.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_QUEST_ASK&lt;br /&gt;
|'''Mission Query'''&lt;br /&gt;
&lt;br /&gt;
Function: add a mission query that meets conditions based on the standard SELECT directive.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_QUEST_ASK*.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TEAMROLE&lt;br /&gt;
|'''Select Squad Character'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character from a squad.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TEAMROLE*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PLAYER_ACTIVE&lt;br /&gt;
|'''Activate Character Indo Status'''&lt;br /&gt;
&lt;br /&gt;
Function: make a character visible on the “Report” interface and import the character ID (this is usually used in scenarios. E.g., the tavern ladies).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PLAYER_ACTIVE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_ORDER&lt;br /&gt;
|'''Built-in Character Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: give some built-in directives to a character and execute these directives immediately. &lt;br /&gt;
&lt;br /&gt;
Format: ROLE_ORDER*character ID [refer to the current target character when this field is empty]#directive code: refer to Directive Parameter Table.&lt;br /&gt;
&lt;br /&gt;
The current directive code supports:&lt;br /&gt;
&lt;br /&gt;
*RETURN_JOBCITY: the character goes back to the location they belong to. No parameter. If the character is the squad leader, the squad directive is changed directly; if the character is not a squad leader, they leave the current squad and go back to the original squad; if they are in another location, they create a squad and return.&lt;br /&gt;
&lt;br /&gt;
*GOTO_PLACE: the character goes to the target location. The parameter is the target location ID.&lt;br /&gt;
&lt;br /&gt;
*JOIN_PLAYER_TEAM: the character joins the player’s squad directly. No parameter.&lt;br /&gt;
&lt;br /&gt;
*FOLLOW_ME: the character comes to rally and follows the player’s squad. No parameter.&lt;br /&gt;
&lt;br /&gt;
*EXPEL_FROM_CAMP: expel the character from their faction. No parameter.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTERACTIVE_MSG&lt;br /&gt;
|'''Add Interactive Message'''&lt;br /&gt;
Function: add a custom interactive message and show it in the corresponding UI.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTERACTIVE_MSG*info type#title#info text #parameter text#duration(&amp;lt;=0: Permanent; &amp;gt;0: number of days)#message sender info #TAG parameter.&lt;br /&gt;
&lt;br /&gt;
Currently supported message types are:&lt;br /&gt;
&lt;br /&gt;
msg (message); request; finance.&lt;br /&gt;
&lt;br /&gt;
When the message type is not financed, the format of the parameter text is:&lt;br /&gt;
 Parameter Key1: parameter value 1;parameter Key2:parameter value 2;...;parameter Key N:parameter N&lt;br /&gt;
Currently, the built-in KEY types of system are:&lt;br /&gt;
&lt;br /&gt;
*ask: assign this message to be a request with at most 2 directive options according to the parameter. Format: ask: option 1 text=event ID of option 1 [: option 2 text=event ID of option 2].&lt;br /&gt;
&lt;br /&gt;
E.g., ask: “Yes”=Event1: “No”=Event2. &lt;br /&gt;
&lt;br /&gt;
*items: assign this message to be a message of obtaining the item table. The parameter is the corresponding item list info. E.g., items: money,10000|紫金之刃,1,mf=0-3|黄金之枪,1,mf=0-3|幻刃月光,1,mf=0-3.&lt;br /&gt;
*You can define other fields, and use [$tagmsg:arg=parameter KEY$] (in the triggered directive of interactive messages) to query the value of the corresponding parameter field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the message type is finance, the format of the parameter text is:&lt;br /&gt;
 Receipt field 1=receipt detail list (format: resource 1, number 1| resource 2, number 2|…|resource N, number N); receipt field 1= receipt detail list; […]; receipt field N=receipt detail list.&lt;br /&gt;
Message sender format: sender type: sender ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported sender types are:&lt;br /&gt;
&lt;br /&gt;
*0: system; empty ID.&lt;br /&gt;
&lt;br /&gt;
*1: character; ID= character ID.&lt;br /&gt;
&lt;br /&gt;
*2: location; ID= location ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TAG parameter is a random string field TAG used to mark.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive message that meets specific conditions. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTERACTIVE_MSG*message type#sender info#TAG parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message type and TAG parameter can be empty (no type or TAG limit).&lt;br /&gt;
&lt;br /&gt;
Format of sender info: ADD_INTERACTIVE_MSG.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_THIS_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Current Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the current interactive message of the existing environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_THIS_INTERACTIVE_MSG*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.1.3 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_HEADAVATA&lt;br /&gt;
|'''Change Player Painting Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the painting of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_HEADAVATA*character painting ID.&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_MODEL&lt;br /&gt;
|'''Change Player Model Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the model of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_MODEL*model ID.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.2.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_INTVAR_CONFIG&lt;br /&gt;
|'''Show Option Panel of Configurable Custom Int Field'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom field configuration panel in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_INTVAR_CONFIG*mode(0: Create game mode; 1: In-game mode).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_MARKER&lt;br /&gt;
|'''Add or Set Custom Mark on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: add or set a custom mark on the world map. When the mark ID already exists, the older mark info will be covered.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_MARKER*mark ID#title#annotation info #map position info#file name of mark image (this field can be empty; set to be &amp;quot;map_flag&amp;quot; by default; this mark image is a PNG image resource under directory“\BuildSource\map_res\MinimapMakers\”).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_MAP_MARKER&lt;br /&gt;
|'''Remove a Custom Map Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a custom mark on the map with a specific ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_MAP_MARKER*mark ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|RUN_SCRIPT_FUNC&lt;br /&gt;
|'''Execute Function of Specific Lua Script'''&lt;br /&gt;
&lt;br /&gt;
Function: execute the standard function of a specific Lua script.&lt;br /&gt;
&lt;br /&gt;
Format: RUN_SCRIPT_FUNC*file name of the relative directory of script (same as RUN_SCRIPT)#standard function name (the function name in the script; the parameter is the imported environment variable).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_GUI&lt;br /&gt;
|'''Open Custom GUI Form'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom GUI form.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_GUI*GUI pack name#form component name#script file path of the form (relative script root directory “Asset\BuildSource\LuaScripts\”. No file expansions)#form parameter(format: json format. E.g., {&amp;quot;arg1&amp;quot;:&amp;quot;val1&amp;quot;,&amp;quot;arg2&amp;quot;:&amp;quot;val2&amp;quot;})#block directive queue (default 0: Yes; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CONTAINER_GUI&lt;br /&gt;
|'''Open Container GUI'''&lt;br /&gt;
&lt;br /&gt;
Function: open a defined container GUI.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CONTAINER_GUI*container ID (instance ID used to identify)#template info ID (info ID defined in Container Definition Table).&lt;br /&gt;
&lt;br /&gt;
When the parameter list is empty or is “This”, the specific container in the current environment variable (if existed) will be opened. E.g., OPEN_CONTAINER_GUI*THIS.&lt;br /&gt;
|-&lt;br /&gt;
|CONTAINER_CMD&lt;br /&gt;
|'''Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a specific directive for a particular container in the current environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: CONTAINER_CMD*container directive type#parameter 1#parameter 2#...#parameter N&lt;br /&gt;
&lt;br /&gt;
Currently supported collective built-in directive types are:&lt;br /&gt;
&lt;br /&gt;
add_exp: add EXP to all cards in the container. The parameter is the EXP value.&lt;br /&gt;
&lt;br /&gt;
add_items: add a specific element into the container (E.g., the format of the item container is: CONTAINER_CMD*add_items#item 1,10|item 2,5 ；format of the card container is: ID list of cards, separated by “|”).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CONTAINER_CMD&lt;br /&gt;
|'''Location Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: see a location as a container object and execute the same container directives.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CONTAINER_CMD*location ID (when this field is empty or “THIS”, refer to the location assigned by the current environment parameter)#container directive list (same as CONTAINER_CMD parameters).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP&lt;br /&gt;
|'''Set Map Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the visibility of a specific map. &lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP*map ID#status value (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_LUAENV&lt;br /&gt;
|'''Reset Current LUA Environment'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the current environment of LUA script and clear cache; this directive can be used when you need to debug the LUA script but do not want to restart the game.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_LUAENV*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.4.1 or above version'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_ARG_INT&lt;br /&gt;
|'''Set Parameter Value in Current Environment Variable'''&lt;br /&gt;
&lt;br /&gt;
Function: set the int parameter value stored in the environment variable of the current script (correspond to [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ARG_INT*new value#target parameter index (optional;set to be 0 by default; 0~2 correspond to [%arg_int_val1%] ~ [%arg_int_val3%] respectively).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Global Save Directive===&lt;br /&gt;
Global save is a type of saving used to record some data shared by all saves. Data recorded in the global save can be accessed in all saves after being changed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_INTVAR&lt;br /&gt;
|'''Set Custom Int Variable of Global Save''' &lt;br /&gt;
&lt;br /&gt;
Function: set a custom int variable in the global save. The variable, recorded in the global save, can be accessed via the [%global_int:ID%] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_INTVAR*variable ID#current int value.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_GLOBAL_INTVAR&lt;br /&gt;
|'''Change Custom Int Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: change a custom int variable in the global.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_GLOBAL_INTVAR*variable ID#value change (can be a negative number)#minimum value (optional; no limit if this field is empty)#maximum value (optional; no limit if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_STRVAR&lt;br /&gt;
|'''Set Custom String Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom string variable. The variable, recorded in the global save, can be accessed via the [$global_str:ID$] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_STRVAR*variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|PUSH_GLOBAL_ROLES&lt;br /&gt;
|'''Globally Save Character Status'''&lt;br /&gt;
&lt;br /&gt;
Function: save specific character list to the global character status list.&lt;br /&gt;
&lt;br /&gt;
Format: PUSH_GLOBAL_ROLES*custom global save Key#character ID (this character can only be a non-template character).&lt;br /&gt;
|-&lt;br /&gt;
|PULL_GLOBAL_ROLES&lt;br /&gt;
|'''Load Character Status from Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: load the status of specific character list from the global character status list, and apply it to the current game mode.&lt;br /&gt;
&lt;br /&gt;
Format: PULL_GLOBAL_ROLES*custom global save KEY (the character of this KEY must be a character from the character template of the current game mode.&lt;br /&gt;
|-&lt;br /&gt;
|LOCK_CMD_QUEUE&lt;br /&gt;
|'''Lock Current Directive Queue'''&lt;br /&gt;
&lt;br /&gt;
Function: lock the current directive queue. The directive queue will not be cleared after switching from different game saves or resetting the game modes.&lt;br /&gt;
&lt;br /&gt;
Format: LOCK_CMD_QUEUE*lock queue (0: No;1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SWITCH_GAME_MODE&lt;br /&gt;
|'''Switch Game Modes'''&lt;br /&gt;
&lt;br /&gt;
Function: switch to the target game mode and load it.&lt;br /&gt;
&lt;br /&gt;
Format: SWITCH_GAME_MODE*target game mode ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Built-in Directive List===&lt;br /&gt;
Built-in directives are directives used to realize certain functions inside the program, usually for some specific scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|ENCOUNTER&lt;br /&gt;
|'''Creep Encountering UI'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info panel of the creep encountered.&lt;br /&gt;
&lt;br /&gt;
Format: ENCOUNTER*1.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_INFO_DLG&lt;br /&gt;
|'''Chest Guardian Info Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info dialogue of the chest guardian.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_INFO_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_COST_DLG&lt;br /&gt;
|'''Price of Chest Opening Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open a dialogue to show the price of opening a chest.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_COST_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_CALLBACK&lt;br /&gt;
|'''Logic Callback of Chest Opening'''&lt;br /&gt;
&lt;br /&gt;
Function: command a logic callback of chest opening.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_CALLBACK*callback value (1: Defeat the guardian; 2: Opening completed)#target chest ID.&lt;br /&gt;
|}&lt;br /&gt;
===Preset Fields of Scripts and Their Meanings===&lt;br /&gt;
Sometimes we use certain directives to refer to specific objects in script editing. For example, we can use CUR_ROLE to replace the ID of the current character player encountered. We can realize some common application scenarios via script editing. &lt;br /&gt;
&lt;br /&gt;
Currently, supported preset fields are: &lt;br /&gt;
&lt;br /&gt;
*CUR_ROLE: ID of current character template encounter, used primarily for dialogue and selection list box&lt;br /&gt;
*CUR_BATTLE: ID of the battle between player and refreshed unit encountered on the current map&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Script Directive of Results in Scenario Event===&lt;br /&gt;
The format of script directives of results in a scenario event is (separated by a line break): &lt;br /&gt;
 conditional expression group 1: executed command 1&lt;br /&gt;
 conditional expression group 2: executed command 2&lt;br /&gt;
 ...&lt;br /&gt;
 conditional expression group N: executed command N&lt;br /&gt;
Execute the command: judge conditional expression group 1 first, if the conditions are met, execute command 1. Otherwise, judge conditional expression group 2……judge all listed groups until one group of conditions is met, or all conditions are not met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Conditional Expression Group===&lt;br /&gt;
A conditional expression group consists of multiple conditional expression like “[%CONDITION%][=]1”, and the expressions are connected by “|” (Or) or “&amp;amp;” (And). '''The priority of “&amp;amp;” (And) is higher than “|” (Or)'''. When both sides of the expression are integer characters, return the comparison result of the two values. Otherwise, compare the strings, and only [=] and [&amp;lt;&amp;gt;] judgements are supported.&lt;br /&gt;
&lt;br /&gt;
For example:  &lt;br /&gt;
&lt;br /&gt;
 [%result_code%][=]1|[%player_money%][&amp;gt;=]100 means “execute when the result is 1 or when the player has 100 utars”.&lt;br /&gt;
 [%player:level%][&amp;gt;=]3&amp;amp;[%player_money%][&amp;gt;]100 means “execute when player’s level is 3 or above, and they have more than 100 utars”.&lt;br /&gt;
&lt;br /&gt;
'''The followings are the comparison symbols in conditional expressions:'''&lt;br /&gt;
&lt;br /&gt;
*[=]: equal&lt;br /&gt;
*[&amp;gt;]: larger than&lt;br /&gt;
*[&amp;gt;=]: greater than or equal to&lt;br /&gt;
*[&amp;lt;]: less than&lt;br /&gt;
*[&amp;lt;=]: less than or equal to&lt;br /&gt;
*[&amp;lt;&amp;gt;]: not equal to&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game Data Calculation Expression System===&lt;br /&gt;
We can embed some value expressions like “[&amp;amp;expression&amp;amp;]” in many places in the game (e.g., the status value of the BUFF list)&lt;br /&gt;
&lt;br /&gt;
In value expression, the basic mathematic calculation is supported. Currently, supported calculation symbols are: &lt;br /&gt;
&lt;br /&gt;
*+: addition&lt;br /&gt;
*-: subtraction&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;*: multiplication&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*/: division&lt;br /&gt;
*%: modulo (take the remainder)&lt;br /&gt;
*^: exponentiation&lt;br /&gt;
*( ) : change the priority of calculation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the expression takes the @func(expression1, expression2...) format, call the relevant built-in function to return the calculation result. Currently supported built-in functions are (note: these built-in functions are can only be used in the calculation of the most external layer): &lt;br /&gt;
&lt;br /&gt;
*@min(a,b): return the smaller value between a and b&lt;br /&gt;
*@max(a,b): return the greater value between a and b&lt;br /&gt;
&lt;br /&gt;
E.g., in a specific piece of data, [&amp;amp;1+2*3&amp;amp;] will be replaced by 7, [&amp;amp;@max(1+2*3, 8)&amp;amp;] will be replaced by 8, [&amp;amp;@min(1+2*3, 8)&amp;amp;] will be replaced by 7……&lt;br /&gt;
&lt;br /&gt;
'''Please note: for scripts and skill directives in battles, you can use the “[@expression@]” format to embed some expressions to return a decimal result.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Embedded Query Directive in Scenario Event===&lt;br /&gt;
There are many places in the game that support embedded query directives, through which we can insert values or query result of the string type in texts or conditional expressions. All embedded query directives follow the format of [%QUERY:arg1:arg2...%] or [$QUERY:arg1:arg2...$] (these two formats are the same) to insert to the target position.&lt;br /&gt;
&lt;br /&gt;
'''Note: currently you cannot re-embed a query directive in a query.'''&lt;br /&gt;
&lt;br /&gt;
Currently, supported query directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Return the last directive result that can cause “return” in the current event (E.g., an option that stands for “return” of the selection list box, input value and battle result, in the script of scenario events).&lt;br /&gt;
Following are the different meanings of result_code in various directive types. &lt;br /&gt;
&lt;br /&gt;
*It means the option ID when returning from the selection list box.&lt;br /&gt;
*When returning after battles:  0: Battle won; 1: Battle failed.&lt;br /&gt;
*It means the input number when returning for an integer input box.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_num%]&lt;br /&gt;
|Return an integer. (0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_range:A:B%]&lt;br /&gt;
|Return a random number that is greater than A but smaller than B.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the random number that was generated last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|The amount of the player’s money.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_wood%]&lt;br /&gt;
|The amount of the player’s wood.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_iron%]&lt;br /&gt;
|The amount of player’s ironstone.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_jade%]&lt;br /&gt;
|The amount of player’s jade.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_food%]&lt;br /&gt;
|Player’s current Hunger.&lt;br /&gt;
|-&lt;br /&gt;
|[%game_time%]&lt;br /&gt;
|Number of in-game days currently.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_night%]&lt;br /&gt;
|Judge whether it is nighttime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_daytime%]&lt;br /&gt;
|Judge whether it is daytime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%mod_day:MOD%]&lt;br /&gt;
|Number of the in-game day divided by MOD, take the remainder&lt;br /&gt;
|-&lt;br /&gt;
|[%generate_rob_money%]&lt;br /&gt;
|Generate the amount of money when the player is robbed under the current level.&lt;br /&gt;
|-&lt;br /&gt;
|[%rob_money%]&lt;br /&gt;
|Generate the amount of money when the player was robbed last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_ts:ID%]&lt;br /&gt;
|Return the current status of a trigger (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es:ID%]&lt;br /&gt;
|Return the current status of a scenario event (-1: Not executed; otherwise, return Result Code).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_first_time:ID%]&lt;br /&gt;
|Return the first completion time of a scenario event.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_time_score:ID:minTime:maxTime:maxScore%]&lt;br /&gt;
|Return the first completion time score of a scenario event. minTime is the shortest completion time (time before the shortest time brings a full score); maxTime is the longest completion time (time before the longest time brings a zero score); maxScore is the highest score.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val:ID%]&lt;br /&gt;
|Return the custom int value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val_for_calc:ID%]&lt;br /&gt;
|Return the custom int value, whose numbering is its ID, to calculate. There must a result. If the ID does not exist, the result is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%str_val:ID%]&lt;br /&gt;
|Return the custom string value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_num%]&lt;br /&gt;
|The current number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_max%]&lt;br /&gt;
|Maximum number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_name:兵种key%]&lt;br /&gt;
|Return the name of a certain minion.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a certain item in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag:tag%]&lt;br /&gt;
|Return the number of an item with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag_and_level:tag:level%]&lt;br /&gt;
|Return the number of an item, whose item level &amp;gt;= level, with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_qualify_as_present:present_desc%]&lt;br /&gt;
|Return the number of a certain item whose gift description string meets requirements in the player’s bag. For the format of gift description string, please see the “Like” format in the Tag column of “人物列表”(Character Table) (Excel).&lt;br /&gt;
|-&lt;br /&gt;
|[%item_name:物品ID%]&lt;br /&gt;
|Return the displayed name of an item.&lt;br /&gt;
|-&lt;br /&gt;
|[%admin_level%]&lt;br /&gt;
|Return the administration status of the player in the current location (0: None; 1: Appointed; 2: City ruler; 3: Faction leader).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; take a rounding integer number after (current time-ID time)).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse_by_day:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; (current day- the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current time-ID time) and take the rounding integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse_by_day%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current day-the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_custom_cd:ID%]&lt;br /&gt;
|Return the result of whether a custom cooldown (whose numbering is its ID) is ready (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%has_gametime_elapse_tag:ID%]&lt;br /&gt;
|Query whether the custom game time ID mentioned above exists (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%realtime_elapse:ID%]&lt;br /&gt;
|Return the realistic period since the setting of last custom time point ID (count by second).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID%]&lt;br /&gt;
|Return the status of specific mission ID (0: Unclaimed; 1: Ongoing; 2: Unfinished; 3: Ended).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID:index%]&lt;br /&gt;
|Return the subevent value of specific mission ID (index is the subevent’s sequence number starting from 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_flag:ID%]&lt;br /&gt;
|Return the current value of a completion mark; return -1 if there is no such a value.&lt;br /&gt;
|-&lt;br /&gt;
|[%camp_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_player_triggered_encounter%]&lt;br /&gt;
|Check if an encounter chat is started by player manually (0: No; 1: Yes) (if the player is caught up by other units, the value is 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%place_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target location.&lt;br /&gt;
|-&lt;br /&gt;
|[%arg_int_val1%]&lt;br /&gt;
[%arg_int_val2%]&lt;br /&gt;
&lt;br /&gt;
[%arg_int_val3%]&lt;br /&gt;
|Value parameter 1, 2, and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buffs%]&lt;br /&gt;
|Return the number of global BUFFs of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_battle_res%]&lt;br /&gt;
|Return the battle result of last battle (0: Victory; 1: Loss; 2: Retreatment).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_dungeon_res%]&lt;br /&gt;
|Last dungeon result (0: Exited; 1: Passed; 2: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff:ID%]&lt;br /&gt;
|Query whether the current squad has a global BUFF of the target ID. Return 1 if such a BUFF exists.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff_c:CLASS%]&lt;br /&gt;
|Query the number of global BUFFs whose type are CLASS of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_stat:STAT_FILED%]&lt;br /&gt;
|Return the current value (whose field is STAT_FILED) of the current squad status.&lt;br /&gt;
|-&lt;br /&gt;
|[%has_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return 1; otherwise, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return the relevant value; otherwise, return null.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_place_id:CAMP_ID%]:&lt;br /&gt;
|Return the ID of a random location that is controlled by a faction. IF there is no camp_id, return an ID of a location controlled by the player’s faction.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_id%]&lt;br /&gt;
|Return the ID of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_name%]&lt;br /&gt;
|Return the name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_map_name%]&lt;br /&gt;
|Return the map name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products%]&lt;br /&gt;
|Return the Production list of the current location (follow the format of GETITEMS).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products_name%]&lt;br /&gt;
|Return the Production description of the current location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_has_products%]&lt;br /&gt;
|Check if the current location has production (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_items%]&lt;br /&gt;
|Return the item list of the last item selection directive (ITEMS_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles%]&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Return the character list of the last character selection directive (ROLES_SELECTOR) (Note: this method cannot be used in conditional expression groups since the result returned contains “|” when multiple characters are selected; you can use [%last_seled_roles_count%] instead to judge).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles_count%]&lt;br /&gt;
|Return the number of selected characters of the last character selection directive (ROLES_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%weather:ID%]&lt;br /&gt;
|Query the current value of the specific weather effect (with specific ID) on the current map.&lt;br /&gt;
|-&lt;br /&gt;
|[%monster_news:X:Y%]&lt;br /&gt;
|Query the info of creeps near coordinate (X, Y) on the current map. X and Y will be the default position of the player if left empty.&lt;br /&gt;
|-&lt;br /&gt;
|[%attack_intend_code%]&lt;br /&gt;
|Query the attack intension of units encountered on the current map.&lt;br /&gt;
&lt;br /&gt;
Please see: MuUnitBase.IntendToAttack&lt;br /&gt;
|-&lt;br /&gt;
|[%place_randmom_pos%]&lt;br /&gt;
|Query a random position near a location. Output specific strings. E.g., Sandbox Redstone Keep: 123, 123.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_role_relation%]&lt;br /&gt;
|Relationship between the input parameter and tag character/location.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_city_relation%]&lt;br /&gt;
|Relationship between Tag character and input character&lt;br /&gt;
|-&lt;br /&gt;
|[%result_val%]&lt;br /&gt;
|Query the curResultVal value of the current environment variable.&lt;br /&gt;
|-&lt;br /&gt;
|[$player:INFO$]&lt;br /&gt;
[$tagrole:INFO:ID$]&lt;br /&gt;
|Query a specific info field of player/ specific character (tag character) When it is tag character, and ID field does not exist, return the query result of the interactive object. &lt;br /&gt;
INFO can be:  &lt;br /&gt;
&lt;br /&gt;
*id: character ID.&lt;br /&gt;
&lt;br /&gt;
*name: character name.&lt;br /&gt;
&lt;br /&gt;
*level: character level.&lt;br /&gt;
&lt;br /&gt;
*job_type: job types (0: Citizen; 1: Faction member; 2: city ruler; 3: Faction leader).&lt;br /&gt;
&lt;br /&gt;
*campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
*campname: faction name.&lt;br /&gt;
&lt;br /&gt;
*campleaderid: faction leader ID.&lt;br /&gt;
&lt;br /&gt;
*campleadername: faction leader name.&lt;br /&gt;
&lt;br /&gt;
*campleader: nickname of faction leader.&lt;br /&gt;
&lt;br /&gt;
*fame_val: personal prestige.&lt;br /&gt;
&lt;br /&gt;
*maxhp: max hp.&lt;br /&gt;
&lt;br /&gt;
*maxmp: max mana.&lt;br /&gt;
&lt;br /&gt;
*job_cityid: job assignment location ID.&lt;br /&gt;
&lt;br /&gt;
*job_cityname: job assignment location name.&lt;br /&gt;
&lt;br /&gt;
*state: current status (0: Normal; 1: Captured; -1: Dead).&lt;br /&gt;
&lt;br /&gt;
*is_recruitable: recruitable (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*is_leave_team_enable: able to leave squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*recruit_val: current recruitable mark (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*inteam: if the character is in the player’s squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep: player’s prestige in the target faction.&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep_desc: player’s prestige description in the target faction.&lt;br /&gt;
&lt;br /&gt;
*fv: friendliness with the player.&lt;br /&gt;
&lt;br /&gt;
*player_relation_score: assessment on overall favour on the player.&lt;br /&gt;
&lt;br /&gt;
*weapon_tag= (custom tag field): query the specific tag on equipment and weapons. If there is no such a tag or the weapon does not exist, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*skill_level= (skill ID): query the current level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_maxlevel= (skill ID): query the maximum level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_exp= (skill ID): query the current EXP of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_upexp= (skill ID): query the amount of EXP needed for a character’s target skill to level up.&lt;br /&gt;
&lt;br /&gt;
*statu= (custom ID): query the value of the corresponding ID in the Character Attribute Table. If there is no value, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*statu_int= (custom ID): 0 query the int value of the corresponding ID in the Character Attribute Table. If there is no value, return 0.&lt;br /&gt;
&lt;br /&gt;
*has_girl_friend: [player only] check if the player has a girlfriend (1: Yes; 2: No).&lt;br /&gt;
&lt;br /&gt;
*current_girl_friend_name: [player only] girlfriend’s name.&lt;br /&gt;
&lt;br /&gt;
*girl_friend=character ID: [player only] check if someone is a player’s girlfriend.&lt;br /&gt;
&lt;br /&gt;
*is_female: check if someone is a female character (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
*available_quest: available missions.&lt;br /&gt;
|-&lt;br /&gt;
|[$called:call1:call2$]&lt;br /&gt;
|How NPC addresses player (the player’s character is male: call1; female: call2).&lt;br /&gt;
|-&lt;br /&gt;
|[$null$]&lt;br /&gt;
|Replaced by an empty string.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagtype$]&lt;br /&gt;
|Trigger object type of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagid$]&lt;br /&gt;
|Trigger object ID of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$input_str$]&lt;br /&gt;
|The input result of the last input box.&lt;br /&gt;
|-&lt;br /&gt;
|[$argvs:INDEX$]&lt;br /&gt;
|Query currently additional parameter info, starting from 0 (used to fill in the parameter of a random event).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagplace:INFO:ID$]&lt;br /&gt;
|Query info of a location; query the current location if the ID field does not exist.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: location ID.&lt;br /&gt;
&lt;br /&gt;
· name: location name.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· mapid: map ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· prosperity: location prosperity. &lt;br /&gt;
&lt;br /&gt;
· defence: location defence &lt;br /&gt;
&lt;br /&gt;
· rep: location friendliness.&lt;br /&gt;
&lt;br /&gt;
· security: location security.&lt;br /&gt;
&lt;br /&gt;
· size: location size.&lt;br /&gt;
&lt;br /&gt;
· lord_id: city ruler ID.&lt;br /&gt;
&lt;br /&gt;
· lord_name: city ruler name.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom field.&lt;br /&gt;
&lt;br /&gt;
· is_stronghold: if this location is a base (a location for troops to the garrison).&lt;br /&gt;
&lt;br /&gt;
· is_weekhold: a resource point that does not allow the garrison.&lt;br /&gt;
&lt;br /&gt;
· is_couldoccupy: if this location can be occupied.&lt;br /&gt;
&lt;br /&gt;
· is_couldraid: if this location can be raided.&lt;br /&gt;
&lt;br /&gt;
· is_inwar: if this location is being attacked.&lt;br /&gt;
&lt;br /&gt;
· is_raided: if this location has been raided (recovering).&lt;br /&gt;
&lt;br /&gt;
· is_subplace: if this place has been occupied. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain a specific status value of the current location.&lt;br /&gt;
&lt;br /&gt;
· building= (specific facility ID): query the number of facilities of a building with specific ID in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· r_building= (specific facility ID): query the number of facilities of a building with a specific ID (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· r_building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· custom_int= (custom field ID): obtain the int value of the custom field of the current location.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally)&lt;br /&gt;
&lt;br /&gt;
· func_map= (specific field KEY): query a field of the corresponding directive event mapping table. E.g., func_map= hire list.&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in where they are currently staying. &lt;br /&gt;
&lt;br /&gt;
· hire_states: query the recruitment status of the current location.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the player’s current position and the target position. If the target is unreachable, return -1.&lt;br /&gt;
&lt;br /&gt;
· project_count: the number of projects under construction. &lt;br /&gt;
&lt;br /&gt;
· project_max: the maximum number of projects under construction currently.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmap:INFO:ID$]&lt;br /&gt;
|Query tile info on a map:&lt;br /&gt;
&lt;br /&gt;
· id: tile id.&lt;br /&gt;
&lt;br /&gt;
· name: tile name.&lt;br /&gt;
&lt;br /&gt;
· dominant_camp: if there is an overall dominating faction, return the name of the faction; otherwise, return null.&lt;br /&gt;
&lt;br /&gt;
· dominant_camps= (custom field ID): if there are only several factions with specific IDs existing, return 1; otherwise, return 0; format of custom field: faction 1#faction 2#faction 3.&lt;br /&gt;
&lt;br /&gt;
· camp_place_count= faction ID: return the number of bases owned by a specific faction on this tile.&lt;br /&gt;
&lt;br /&gt;
· ExploreInfo= Info ID: query the value of an exploration map info.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbuilding:INFO$]&lt;br /&gt;
|Query info of the current target building&lt;br /&gt;
&lt;br /&gt;
· id: building ID.&lt;br /&gt;
&lt;br /&gt;
· name: name.&lt;br /&gt;
&lt;br /&gt;
· inner_id: built-in location ID of the target building.&lt;br /&gt;
&lt;br /&gt;
· type: building type.&lt;br /&gt;
&lt;br /&gt;
· level: building level.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return value of a specific custom filed.&lt;br /&gt;
&lt;br /&gt;
· container_id: scenario ID of the container bound to this building.&lt;br /&gt;
&lt;br /&gt;
· container_info: info ID of the container bound to this building.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagwb:INFO$]&lt;br /&gt;
|Query the info of current skirmish.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: battle ID.&lt;br /&gt;
&lt;br /&gt;
· camp_a: faction ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· camp_b: faction ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· leader_a: leader ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· leader_b: leader ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· camp_a_rl: the relationship between squad A and the player’s faction &lt;br /&gt;
&lt;br /&gt;
· camp_b_rl: the relationship between squad B and the player’s faction.&lt;br /&gt;
&lt;br /&gt;
· teamname_a: faction name and hero names of squad A.&lt;br /&gt;
&lt;br /&gt;
· teamname_b: faction name and hero names of squad B.&lt;br /&gt;
&lt;br /&gt;
· seige_time: current siege preparation time (if it is a siege battle) (count by day).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagteam:INFO(:QUERY_INFO)$]&lt;br /&gt;
[$playerteam:INFO$]&lt;br /&gt;
|Query info of the current encountered team (tagteam)/player’s team (playerteam).&lt;br /&gt;
&lt;br /&gt;
When querying tag team, you can choose a specific query parameter. If this parameter is set, only info of the query target will be returned.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: squad ID.&lt;br /&gt;
&lt;br /&gt;
· is_active: check if the current squad status is normal; return 1 if it is normal.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· state_num: StateNum value of the current squad.&lt;br /&gt;
&lt;br /&gt;
· from_id: ID of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· from_name: name of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· lifetime: period since the squad is established (day).&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and character faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· max_attr_lv=attribute field ID: the highest value of a certain attribute of all characters in the squad.&lt;br /&gt;
&lt;br /&gt;
· exist_role= character ID: check if there is a specific character ID in the squad (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
· role_vacancy: available hero slots in squad.&lt;br /&gt;
&lt;br /&gt;
· soldier_vacancy: available minion slot in the squad.&lt;br /&gt;
&lt;br /&gt;
· map_info: current map info.&lt;br /&gt;
&lt;br /&gt;
· tag: return the TAG of the squad. &lt;br /&gt;
&lt;br /&gt;
· is_defeated: check if the squad is dismissed because they are defeated (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· defeated_by: ID of the faction which defeated the squad.&lt;br /&gt;
&lt;br /&gt;
QUERY_INFOformat: [query type]=[query target] E.g.,: leader=ROLE_ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported query types are:&lt;br /&gt;
&lt;br /&gt;
· bind_id: bound info ID. When the squad type is creep or dummy, the ID is the creep/dummy ID; otherwise, it is the leader ID.&lt;br /&gt;
&lt;br /&gt;
· leader: squad leader ID.&lt;br /&gt;
&lt;br /&gt;
· tag: TAG mark of the squad (used for squad created by the CREATE_TEAM directive).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcamp:INFO:ID$]&lt;br /&gt;
|Query info of the target faction. When the ID does not exist, query info of the current faction. INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· leaderid: ruler ID.&lt;br /&gt;
&lt;br /&gt;
· leadercalled: nickname of faction ruler. &lt;br /&gt;
&lt;br /&gt;
· lands_count: number of bases of the current faction.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· camp_rl_value: the actual number of favour between the target faction and player’s faction. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain the specific status value of the current faction.&lt;br /&gt;
&lt;br /&gt;
· buff= (Target BUFF ID): query if a specific BUFF of the current faction exists (1: Yes).&lt;br /&gt;
&lt;br /&gt;
· buff_c= (BUFF type): query the number of BUFFs of specific types of the current faction.&lt;br /&gt;
&lt;br /&gt;
· active_state: project status of target faction (0: Inactive; 1: Active).&lt;br /&gt;
&lt;br /&gt;
· is_story_camp: if this is a scenario faction (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in this faction. &lt;br /&gt;
&lt;br /&gt;
· attitude: faction’s attitude towards the player (0: Normal; -1: Wanted; -2: At war).&lt;br /&gt;
&lt;br /&gt;
· is_fall: if a faction is eliminated (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzar:INFO$]&lt;br /&gt;
|Query current bazaar info imported by the system.&lt;br /&gt;
&lt;br /&gt;
· start_day: number of days of the beginning of the bazaar.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzarItem:INFO:bazzarID:merchantID$]&lt;br /&gt;
|Query info of items bought/sold by a merchant in a bazaar.&lt;br /&gt;
&lt;br /&gt;
· item_desc: item description (detailed).&lt;br /&gt;
&lt;br /&gt;
· item_desc_short: item description (simple).&lt;br /&gt;
&lt;br /&gt;
· item_buy_price: buy-in price of the item. &lt;br /&gt;
&lt;br /&gt;
· item_sell_price: sell-out price of the item. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproduct:INFO:ID$]&lt;br /&gt;
|Query info of a speciality. Query info of the current speciality if the ID is left empty.&lt;br /&gt;
&lt;br /&gt;
· item_name: item name. &lt;br /&gt;
&lt;br /&gt;
· item_id: item id.&lt;br /&gt;
&lt;br /&gt;
· item_level: item level.&lt;br /&gt;
&lt;br /&gt;
· item_price: single fair value of the item.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the central position of the speciality and the current position of the player (-1: the central position is unreachable). &lt;br /&gt;
&lt;br /&gt;
· place_include=location ID: when the item is not sold in the specific location, return 0; if it is being sold, return 1. &lt;br /&gt;
&lt;br /&gt;
· place_include_tagQuestPlace: automatically use the currently imported info of mission location.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagquest:INFO:ID$]&lt;br /&gt;
|Query Mission Info&lt;br /&gt;
&lt;br /&gt;
status: 0: Unclaimed; 1: Ongoing; 2: Completed; 3:Time limit exceeded (receive punishment); 4: Time limit exceeded (wait to claim rewards automatically) 5: 已Ended.&lt;br /&gt;
|-&lt;br /&gt;
|[$arg_str_val1$]&lt;br /&gt;
[$arg_str_val2$]&lt;br /&gt;
&lt;br /&gt;
[$arg_str_val3$]&lt;br /&gt;
|String parameters 1, 2 and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$]&lt;br /&gt;
|Enumerate numbers randomly and return a RES value according to the probability distribution. E.g., [%rnd_enum:25,A:40,B:35,C%] means there is a 25% chance to return “A”, 40% to return “B” and 35% to return “C”.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagitem:INFO$]&lt;br /&gt;
|Query info of the current item. INFO can be: &lt;br /&gt;
&lt;br /&gt;
· id: item ID.&lt;br /&gt;
&lt;br /&gt;
· name: item name.&lt;br /&gt;
&lt;br /&gt;
· count: item number.&lt;br /&gt;
&lt;br /&gt;
· group_n: maximum number of stacks.&lt;br /&gt;
&lt;br /&gt;
· quality: item quality.&lt;br /&gt;
&lt;br /&gt;
· level: item level.&lt;br /&gt;
&lt;br /&gt;
· main_type:  main item type.&lt;br /&gt;
&lt;br /&gt;
· sub_type: item sub-type.&lt;br /&gt;
&lt;br /&gt;
· equip_type: equipment type.&lt;br /&gt;
&lt;br /&gt;
· gendays:  period (day) since the production date.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom filed. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproject:INFO:ID$]&lt;br /&gt;
|Query project info. Read from the specific ID of SET_TEMP_ID if the ID field is left empty.&lt;br /&gt;
&lt;br /&gt;
· id: project id.&lt;br /&gt;
&lt;br /&gt;
· state: project status (works only in group events) (0: Not started; 1: Ongoing; 2: Completed).&lt;br /&gt;
&lt;br /&gt;
· showPlaceName: project location description.&lt;br /&gt;
&lt;br /&gt;
· showProjectName: project name.&lt;br /&gt;
&lt;br /&gt;
· roles: all characters involved in the current project.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagunit:INFO$]&lt;br /&gt;
|Query info of the current target minion.&lt;br /&gt;
&lt;br /&gt;
· id: unit id.&lt;br /&gt;
&lt;br /&gt;
· name: unit name.&lt;br /&gt;
&lt;br /&gt;
· level: unit level.&lt;br /&gt;
&lt;br /&gt;
· statu= (custom ID): query the value of the corresponding ID in the Unit Attribute table.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcard:INFO$]&lt;br /&gt;
|Query info of a specific card.&lt;br /&gt;
&lt;br /&gt;
· id: bound id of the card.&lt;br /&gt;
&lt;br /&gt;
· name: displayed name of the card.&lt;br /&gt;
&lt;br /&gt;
· lv: card level.&lt;br /&gt;
&lt;br /&gt;
· recruit_name: displayed name with recruitment info of the card. &lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific Tag field of the card.&lt;br /&gt;
&lt;br /&gt;
· has_tag= (KEY of custom expansion field): query if there is a particular Tag field of card (1: Yes; 0: No).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$save_version$]&lt;br /&gt;
|Return the version number of when the current game save is created.&lt;br /&gt;
|-&lt;br /&gt;
|[$version_compare:TAG_VERSION$]&lt;br /&gt;
|Compare the version number of when the current game save is created with TAG_VERSION; if the former version is higher than TAG_VERSION, return 1; when equal, return 0; when lower, return -1.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmsg:INFO$]&lt;br /&gt;
|Query info of the current interactive messages.&lt;br /&gt;
&lt;br /&gt;
· title: title&lt;br /&gt;
&lt;br /&gt;
· content: message content&lt;br /&gt;
&lt;br /&gt;
· arg=(field KEY): query the parameter of the KEY in the custom parameter table&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下查询需要游戏版本高于0.7.4.1&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_str:KEY$]&lt;br /&gt;
|Return the string value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_int:KEY$]&lt;br /&gt;
|Return the int value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[%envoy_enable%]&lt;br /&gt;
|Return the status of whether the envoy of the player’s faction is available.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Directive Field of Global Save Query===&lt;br /&gt;
These are used to query some directives in the global save.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%global_int:ID%]&lt;br /&gt;
|Return the value of global int field ID　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|[$global_str:ID$]&lt;br /&gt;
|Return the value of global string field ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Built-in Global Variable Field===&lt;br /&gt;
&lt;br /&gt;
Following are key fields of a built-in global variable: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Filed KEY'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|save_max_hard_level&lt;br /&gt;
|The greatest difficulty has been unlocked. Set to be 0 by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Built-in Custom Variable Field===&lt;br /&gt;
&lt;br /&gt;
You can use directives like SETINTVAR and CHANGEINTVAR to change and save the built-in custom variable of the system. Different variables have a different function.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|system_探索地图点数&lt;br /&gt;
|Morale.　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|system_星星&lt;br /&gt;
|The number of stars.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色血量百分比&lt;br /&gt;
|When the player is fighting an enemy the extra hp multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色攻击百分比&lt;br /&gt;
|When the player is fighting an enemy, the extra physical/magic attack multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|config_ai_level&lt;br /&gt;
|The intensity level of AI (0: Easy; 1: Normal; 2: Difficult).&lt;br /&gt;
|-&lt;br /&gt;
|config_roll_limit&lt;br /&gt;
|Enable Roll Limit in battles 0: Disabled; 1: Enabled (By enabling the Roll Limit, there will be a CD and limit of rolling times).&lt;br /&gt;
|-&lt;br /&gt;
|config_hunger_penalty&lt;br /&gt;
|Enable Hunger Debuff 0: Disabled 1: Enabled (By enabling the Hunger Debuff, the movement of the player’s squad will be influenced when in hunger).&lt;br /&gt;
|-&lt;br /&gt;
|config_upgrade_cost_reduce&lt;br /&gt;
|EXP and materials needed to upgrade the current unit after discount (0~100 percentage; set to be 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|config_soldier_dead_scale&lt;br /&gt;
|A multiplier of death probability of the current minion (percentage; set to be 100 by default, final death probability = basic death probability *(config_soldier_dead_scale/100)).&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|config_project_concurrent&lt;br /&gt;
|Maximum cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
===Built-in Field in Initial Setting Table===&lt;br /&gt;
&lt;br /&gt;
In the initial setting table, we can configure some initial fields that have actual functions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|'''Default Value'''&lt;br /&gt;
|-&lt;br /&gt;
|init_pos&lt;br /&gt;
|Default info of respawning location.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_statu&lt;br /&gt;
|Default attribute status info when the player respawns.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_money&lt;br /&gt;
|Default initial property.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|home_place&lt;br /&gt;
|Default initial location ID.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skillpages&lt;br /&gt;
|Initially enabled skill page (format: see SET_SKILLPAGE directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skills&lt;br /&gt;
|Initial skill page of the player (format: see GETSKILL directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_equip&lt;br /&gt;
|Initial equipment list info of the player.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_camp_rl&lt;br /&gt;
|Initial faction relationship list. Format:&lt;br /&gt;
&lt;br /&gt;
Faction A, faction B, relationship, friendliness (-100~100)| faction A, faction C, relationship, friendliness(-100~100)|...|faction N, faction N, relationship, friendliness(-100~100).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unchanged_diplomatic_relationship&lt;br /&gt;
|Unable to change the relationships between factions dynamically? (0: Yes; 1: No).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|gametime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second).&lt;br /&gt;
|0.01&lt;br /&gt;
|-&lt;br /&gt;
|battletime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second), when this coefficient is 0, the time in skirmish or siege battles will stop.&lt;br /&gt;
|0.005&lt;br /&gt;
|-&lt;br /&gt;
|no_card_auto_supply&lt;br /&gt;
|Card durability cannot restore automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|drop_card_when_no_durability&lt;br /&gt;
|When card durability becomes 0 in this mode, the card will disappear.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|enable_card_upgrade&lt;br /&gt;
|Enable card upgrading.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|equipment_loss_durability&lt;br /&gt;
|The equipment has durability.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|levelup_exp_scale&lt;br /&gt;
|Level up EXP multiplier.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|seige_time&lt;br /&gt;
|Basic preparation time for siege battle (day). Preparation time = basic time + Weapons degree* coefficient of extra time per Weapons degree (the siege_time_per_armvalue feild).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|siege_time_per_armvalue&lt;br /&gt;
|The coefficient of extra time per weapon degree when preparing for a siege battle.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|project_time_scale&lt;br /&gt;
|The proportion of project time. &amp;lt;1: shorten time; &amp;gt;1: extend time.&lt;br /&gt;
|0.99&lt;br /&gt;
|-&lt;br /&gt;
|dailyIncomeScale&lt;br /&gt;
|The multiplier of daily city resource income.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|recruit_cost_scale&lt;br /&gt;
|The multiplier of the cost of recruitment/supply/upgrade/chest opening.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|building_cost_scale&lt;br /&gt;
|The multiplier of the cost of building construction/other projects.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|custom_intval_watcher&lt;br /&gt;
|Default custom variable field of the monitor (same as the ADD_INTVAL_WATCHER directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|show_star_info&lt;br /&gt;
|Show prestige (star).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_add_exp_per_period&lt;br /&gt;
|Cardinal number of daily AI soldier (units from other factions) EXP increase.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|team_role_count_base&lt;br /&gt;
|The basic number of character slot each squad.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
|team_role_max&lt;br /&gt;
|Maximum number of character slot each squad.&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|team_card_count_base&lt;br /&gt;
|The basic number of minion slot each squad.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|team_card_max&lt;br /&gt;
|Maximum number of minion slot each squad.&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_resource_scale&lt;br /&gt;
|Resource multiplier of AI recruitment.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_build_resource_scale&lt;br /&gt;
|Resource multiplier of AI construction.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_upgrade_resource_scale&lt;br /&gt;
|Resource multiplier of AI minion upgrading.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_highlevel_upgrade_average_days&lt;br /&gt;
|AI simulation of upgrading minions when the player’s level is high (expected number of days).&lt;br /&gt;
&lt;br /&gt;
The higher this value is, the slower AI upgrades a type of minion.&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ai_auto_balance_resource&lt;br /&gt;
|If AI will balance each kind of resources automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_invade_prob&lt;br /&gt;
|Coefficient of AI invasion probability (0~1) The closer to 1, the more likely AI will invade.&lt;br /&gt;
|0.8&lt;br /&gt;
|-&lt;br /&gt;
|invasion_destroy_factor&lt;br /&gt;
|Destruction rate after invasion or occupation. Format:&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 1: probability 1.&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 2: probability 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility N: probability N.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
1:50&lt;br /&gt;
&lt;br /&gt;
2:30&lt;br /&gt;
&lt;br /&gt;
3:10&lt;br /&gt;
&lt;br /&gt;
4:5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|monster_move_speed_random&lt;br /&gt;
|Correction range of random creep movement speed of creep emitter (0.75 at most).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|soldier_battle_killed_prob&lt;br /&gt;
|The basic casualty of the soldiers. The probability of soldiers being poorly wounded after losing a battle.&lt;br /&gt;
|0.2&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_battle_killed_prob&lt;br /&gt;
|Death probability of AI troops after losing a battle.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_hero_free&lt;br /&gt;
|AI recruits heroes for free&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed&lt;br /&gt;
|Basic movement speed of squads.&lt;br /&gt;
|240&lt;br /&gt;
|-&lt;br /&gt;
|monster_min_movespeed&lt;br /&gt;
|Minimum movement speed of creeps.&lt;br /&gt;
|150&lt;br /&gt;
|-&lt;br /&gt;
|caravan_move_speed_range&lt;br /&gt;
|Range of movement speed of Caravans. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|farmers_move_speed_range&lt;br /&gt;
|Range of movement speed of farmers. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed_range&lt;br /&gt;
|Range of movement speed of troops. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|global_move_speed_range&lt;br /&gt;
|Range of global movement speed. Format: min speed, max speed. &lt;br /&gt;
&lt;br /&gt;
This value influences all movable units on all maps.&lt;br /&gt;
|20,400&lt;br /&gt;
|-&lt;br /&gt;
|battle_gain_money_scale&lt;br /&gt;
|Scale coefficient of obtaining money in battles.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment&lt;br /&gt;
|If NPC will drop weapons (0: No; 1: Yes).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment_prob&lt;br /&gt;
|Probability of NPC dropping weapon.&lt;br /&gt;
|0.15&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_soldier&lt;br /&gt;
|Probability of each group of soldiers dropping food.&lt;br /&gt;
|0.1&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_hero&lt;br /&gt;
|Probability of each hero dropping food.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|hungry_fail_days&lt;br /&gt;
|Failed after being hungry for a certain number of days.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.2.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|ai_dailyfight_period&lt;br /&gt;
|The period between each AI compulsory invasion checks &amp;lt;=0: Disable the check (this logic is different from default AI invasion check；the default parameter (in-game day) is 5 before version 0.7.2.1) In addition, this check will be influenced by AI intensity from this version.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_active_level_default&lt;br /&gt;
|Default AI intensity level, which influences the default value of the custom filed of config_ai_level.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_roll_limit&lt;br /&gt;
|Whether to enable Roll Limit by default. This influences the default value of the custom field of config_roll_limit.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_hunger_penalty&lt;br /&gt;
|Whether to enable Hunger Debuff. This influences the default value of the custom field of config_hunger_penalty.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_seige_battlemap&lt;br /&gt;
|Default map ID of siege battle.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.3.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|init_inventory_capicity&lt;br /&gt;
|Default cardinal number of initial bag capacity.&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|def_project_concurrent&lt;br /&gt;
|Default cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.4.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_wanted_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “Wanted” of a faction (when player’s prestige is lower than “Wanted” but has not reached the “At War” status, the player will not be attacked by squads of this faction in the wild, but they will not be allowed to enter certain cities).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_war_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “At War” of a faction (when player’s prestige is lower than the point, the player will be attacked in the wild by squads of this faction).&lt;br /&gt;
| -10&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.8.0.1'''&lt;br /&gt;
|-&lt;br /&gt;
|dg_levelup_skill&lt;br /&gt;
|Skill ID of level-up special effect in battles.&lt;br /&gt;
|升级特效&lt;br /&gt;
|-&lt;br /&gt;
|init_items&lt;br /&gt;
|Initial item list.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_dropitem_model&lt;br /&gt;
|Model and special effect info of items dropped in battles (Format: world map unit model#special effect info).&lt;br /&gt;
|chest1#psChestFlash1,0,0&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}Besides specific initial fields above, there are some UI-resetting fields, starting with “gui”, in the initial set list, which are used to do a custom reset on certain built-in UI in the game. For more details, please see instruction on game interface reset. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Codes of Text Color in Common UI===&lt;br /&gt;
In dialogues, text boxes or other common UI, we can follow certain formats to change the colours of texts.&lt;br /&gt;
&lt;br /&gt;
E.g., This is a imp:red font text, red:red font text, &amp;amp;ff6699ff:custom color text font.&lt;br /&gt;
&lt;br /&gt;
Currently, we support preset colours for the following types (to use custom colours, replace “#” with “&amp;amp;” ).&lt;br /&gt;
&lt;br /&gt;
*place: unified colour for the location name.&lt;br /&gt;
*role: unified colour for the character name.&lt;br /&gt;
*camp: unified colour for faction name.&lt;br /&gt;
*item: unified colour for item name.&lt;br /&gt;
*imp: unified colour for an important message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Character Position Directive===&lt;br /&gt;
Format: position code:position parameter.&lt;br /&gt;
&lt;br /&gt;
Supported position codes are: 0: Unallocated; 1: In position; 2: In squad; 3: In a project.&lt;br /&gt;
&lt;br /&gt;
*when the code is 1: Format:  1: location ID, facility ID (if the facility ID is empty, it means the character is outside the facility).&lt;br /&gt;
*when the code is 2: Format:  2: squad ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of In-game Global Position Directive===&lt;br /&gt;
When assigning the position for a squad or object on the world map, we can follow a format of globally position assignment (e.g., the TELEPORT directive).&lt;br /&gt;
&lt;br /&gt;
Format of global position:   &lt;br /&gt;
 Map ID:coordinate X,coordinate Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Unit-Limitation Directive in Specific Battles===&lt;br /&gt;
In a specific battle table, you can fill in a directive of the following types in the “Limit” column, to execute unit or special restrictions. &lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Directive 1:parameter 1;directive 2:parameter 2;...directive N:parameter N;&lt;br /&gt;
Currently supported types of limitation directives are: &lt;br /&gt;
&lt;br /&gt;
*player: reset squad hero list. Format: character ID1,reset level (-1 or left empty: Do not reset)|. character ID2,reset level| character ID3, reset level|...| character ID N,reset level.&lt;br /&gt;
*units: reset squad minion list. Format: same as the common minion list.&lt;br /&gt;
*add_stat: additional character attribute status. Format: target character ID#status list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Directive List of Unit Control on the World Map===&lt;br /&gt;
World map unit (squad) control directives are methods used to manage the action order of world map units. When a unit has specific control directive list, it will execute every directive in sequence until the execution is finished. After the game is saved halfway of the execution of the directives and the player exits the game, the execution will continue when the save is loaded.&lt;br /&gt;
&lt;br /&gt;
Please note: after the execution of all directives of a squad, the squad will be dismissed. Dummies (creeps and dummies needed for stories included) are an exception.&lt;br /&gt;
&lt;br /&gt;
Control directive consists of int-number directives and directive content, separated by “;”. Directive of each line starts with a directive-type code and “+”, followed by a directive parameter. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 1,test map:100,100;1,test map:100,200;99,0&lt;br /&gt;
The code above means that the squad will move to coordinate 1 (100,100) first, and then to coordinate 2 (100,200). Finally, the squad will be dismissed.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive-type codes are: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Control Directive Code'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Move towards a coordinate on the world map. The parameter is the target coordinate (coordinate format: map ID: coordinate X, coordinate Y).&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Stay where you are. The parameter is the time of staying (count by in-game day).&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Enter a location. The parameter is the target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Attack the target location. The parameter is the target location ID. (invasion type: 0: Occupy; 1: Raid).&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Stay in the target location. The parameter is the target location ID, time of staying.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Execute an event. The parameter is the event ID.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Change the current StateNum value. The parameter is the new StateNum value.&lt;br /&gt;
&lt;br /&gt;
Note: StateNum can be used to mark the current status of some controlled squad. E.g., you can command a unit to a specific location on the map and execute an action. Before the unit reaches the destination, StateNum is 0; after its arrival, StateNum becomes 1. By doing so, we get to know the current status of a squad.&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|Execute custom movement directives permanently. (For directive format, see [[Common Scenario Directives#.E5.8D.95.E4.BD.8D.E9.98.9F.E4.BC.8D.E9.BB.98.E8.AE.A4.E8.BF.90.E5.8A.A8.E6.8C.87.E4.BB.A4.E6.A0.BC.E5.BC.8F|Format of Default Movement Directive of Unit Squad]]).&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|Join a Warband. The parameter is the Warband ID (built-in method of the system. We do not suggest calling this).&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Execute an action. Parameter format: action ID, loop times (-1: Endless; &amp;gt;=1: Limited times; set 1 when the action itself is a looping animation), single-action time (count by second; execute the next directive when the action finishes looping, if it does not loop permanently), object(0: All units by default; 1: Leader only; 2: All followers), initial frame range (0~1; 1: the last frame of the animation; -1: a random number between 0 and 1), whether to execute the next directive after playing the animation (0: No by default; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
Supported default action list of models:&lt;br /&gt;
&lt;br /&gt;
· Loop action: standby, move, walk slowly, charge, recharging.&lt;br /&gt;
&lt;br /&gt;
· Single action: being hit, evade, block, attack, shoot, horizontal. slash, vertical slash, release, roar, knock up, jump, celebrate, die.&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|Open a chest. The parameter ID is the chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|Execute a TimeLine action. Format: TimeLineID, duration (set -1 by default, permanent; &amp;gt;0: Action ends after the time set).&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Change the attitude of the current squad towards the player (0: Neutral; 1: Hostile).&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|Change the current movement speed of the current squad. The parameter is the target movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Trade succeeded. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|Trade with a merchant. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|Follow a squad target. The parameter is the control ID of the target being followed.&lt;br /&gt;
|-&lt;br /&gt;
|99&lt;br /&gt;
|Dismiss the current squad.&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Default Movement Directive of Unit Squad===&lt;br /&gt;
Dummies, creeps and squads on the world map will change their movement modes based on the default way of moving or the changes of scripts. After choosing a movement mode, units will perform default actions according to the directive.&lt;br /&gt;
&lt;br /&gt;
Format of unit movement directive: &lt;br /&gt;
 Movement mode,parameter 1[,parameter 2,...,parameter N]&lt;br /&gt;
Currently supported movement modes and the formats of the parameter are: &lt;br /&gt;
&lt;br /&gt;
*Wander within range: WANDER, movement radius,[central coordinate X, central coordinate Y](the current position is the centre if the central coordinate is not assigned).&lt;br /&gt;
*Patrol: PATROL, coordinate 1X, coordinate 1Y, coordinate 2X, coordinate 2Y,..., coordinate NX, coordinate NY(when the first coordinate is the same as the final coordinate, the patrol movement loops in a circle; otherwise, the patrolling movement goes back and forth).&lt;br /&gt;
*Others: Stay still.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item List Info===&lt;br /&gt;
The item list info is one of the most common info formats. We use this format in the directives of obtaining various items (GETITEMS, etc.) and configuration tables.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Item code 1,number 1[,detailed info list]|item code 2,number 2[,detailed info list]|....|item code N,number N[,detailed info list].&lt;br /&gt;
The format of the detailed info list is the dictionary list of &amp;quot;key1=val1,key2=val2,...&amp;quot;. Following fields are supported: &lt;br /&gt;
&lt;br /&gt;
*[mf] auto-match the created affixes: mf=lowest quality; N-highest quality; N[-additional cardinal number of variable value]. E.g., Longsword,1,mf=0-3  Explanation: the “mf” field helps the current weapon to automatically match a quality (0~3) affix (0 means no affix).&lt;br /&gt;
&lt;br /&gt;
*[cw] create custom affix: cw= affix ID+ additional cardinal number of variable value (0-100). E.g., Longsword,1,cw=Lifesteal Sword+50 Explanation: the variable value of items with the affix of Lifesteal Sword, is between 50 and 100.&lt;br /&gt;
&lt;br /&gt;
*[w] assign the affix details of items: w=affix ID$ [variable code array]&lt;br /&gt;
*[qv] assign the variable array of item attribute: qv= variable code array&lt;br /&gt;
*[p] assign the buy-in price of items: p= buy-in price&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variable code array consists of two columns of 2-dimensional arrays. Column 1 is enumerated numbers, and column 2 is quality numbers (0~100). The two columns are connected by “/”. If a affix has 3 parts, then its variable array might be: 0/50/0/100/0/100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Weather Effect Info===&lt;br /&gt;
When using directives to control weathers, we mainly use directives to control a list weathers, which is separated by “|”. &lt;br /&gt;
&lt;br /&gt;
Format of weather effects description: &lt;br /&gt;
 Weather effect ID1, intensity|weather effect ID2,intensity|...weather effect IDN,intensity&lt;br /&gt;
Currently, supported weather effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*雨（Rain）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
&lt;br /&gt;
*雪（Snow）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
*风沙（Sandy）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雷电（Thunder）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雾（Fog）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*黑暗（Darkness）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*炎热（Hot）: Disabled when the intensity is 0 (1~100) (Heat Distortion Effect).&lt;br /&gt;
*云（Cloudy）: Disabled when the intensity is 0 (1~100) (shadows of cloud in clear days).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of weather effect field in map editor or config tables: &lt;br /&gt;
 Probability 1,duration 1:[weather effect description 1]; Probability 2,duration 2:[weather effect description 2]; Probability 3,duration 3:[weather effect description 3];[...]; Probability N,duration N:[weather effect description N]&lt;br /&gt;
E.g., 30,1:;50,3:雨,20|雾,10;20,5:风沙,30&lt;br /&gt;
&lt;br /&gt;
The above code means there is a 30% chance of not having any weather effect for a whole day, 50% chance of raining for 3 consecutive days, and 20% chance of having 5 consecutive sandy days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Camera Filter Effect Info===&lt;br /&gt;
We can use directives like SET_CAMERA_FILTER to set the camera filter of the current game.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Filter effect ID1,intensity|filter effect ID2,intensity|...filter effect IDN,intensity&lt;br /&gt;
Currently, supported filter effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*暗角 (Vignetting): Disabled when the intensity is 0 (0~100). The degree of darkness of camera’s corners.&lt;br /&gt;
*黑白 (Black&amp;amp;white): Disabled when the intensity is 0 (0~100). The black-and-white version of the camera.&lt;br /&gt;
*老旧 (Classic): Disabled when the intensity is 0 (0~100). The yellowing classic style of camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction List===&lt;br /&gt;
The following are the character TAGs used in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|LIKE&lt;br /&gt;
|Mark the type of items a specific character likes, which affects the increased speed of favour.&lt;br /&gt;
&lt;br /&gt;
Format: LIKE:type 1|type 2|...&lt;br /&gt;
|-&lt;br /&gt;
|DEF_WEAPON_SPEED&lt;br /&gt;
|Default weapon speed. Characters with this tag will take this speed as the default weapon speed even if they do not have a weapon.&lt;br /&gt;
|-&lt;br /&gt;
|FVChangeUnit&lt;br /&gt;
|Change the coefficient of character’s favour via sending gifts. Set to be the default value without this field.&lt;br /&gt;
|-&lt;br /&gt;
|dg_skill&lt;br /&gt;
|Replace the dungeon skill of this character.&lt;br /&gt;
|-&lt;br /&gt;
|attached_script&lt;br /&gt;
|ID of script event mounted on characters in battles.&lt;br /&gt;
|-&lt;br /&gt;
|loot_list&lt;br /&gt;
|The dropping list of this character in dungeon battles (can use the“EXP” item IDs as a specific source of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Location List===&lt;br /&gt;
The following is a TAG list of locations with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|Show minimap&lt;br /&gt;
|City maps are shown by default. If there are other places that need to be shown by default, this tag must be 1.&lt;br /&gt;
|-&lt;br /&gt;
|Do not show minimap&lt;br /&gt;
|It is what the field means.&lt;br /&gt;
|-&lt;br /&gt;
|Disable AI invasion&lt;br /&gt;
|Bases with this tag will not invade, patrol or occupy resources automatically.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction Table===&lt;br /&gt;
The following is a TAG list of factions with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|NO_CHANGE_DIP&lt;br /&gt;
|Will not be affected by dynamic diplomatic relations in the game, unless you use script directives to change directly.&lt;br /&gt;
|-&lt;br /&gt;
|UNFAILED&lt;br /&gt;
|This faction cannot be eliminated in a usual way.&lt;br /&gt;
|-&lt;br /&gt;
|EMBARGO&lt;br /&gt;
|Cities occupied by this faction will not send out caravans or trade with other cities.&lt;br /&gt;
|-&lt;br /&gt;
|NO_FARMER&lt;br /&gt;
|There will not be farmer migration in cities occupied by this faction.&lt;br /&gt;
|-&lt;br /&gt;
|CAMP_COLOR&lt;br /&gt;
|Set a specific colour for a faction. Sample format: CAMP_COLOR=FFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===TAGs with Special Meanings in Item Table===&lt;br /&gt;
The following is a TAG list of items with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|IgnoreBagSpace&lt;br /&gt;
|This item will not occupy a slot of player’s bag. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|NoSellOrDrop&lt;br /&gt;
|This item cannot be discarded or sold. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|BatchUse&lt;br /&gt;
|Weather player can use the item in the batch. Function enabled when the field is 1. When an item with this TAG is used, the [%arg_int_val1%] in its script will be the selected number of the item.&lt;br /&gt;
|-&lt;br /&gt;
|DoNotCostWhenUse&lt;br /&gt;
|This item will not be consumed when used. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Present&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The tag field of gift type, separated by “|”.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|AiNotLoot&lt;br /&gt;
|This item cannot be accessed by AI in a normal way. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Mendable&lt;br /&gt;
|If this item is mendable, unmendable item will self-destroy after the durability becomes 0. (1: Yes ).&lt;br /&gt;
|-&lt;br /&gt;
|DropModel&lt;br /&gt;
|The model info of the item when it is on the ground in battles. (format: world map unit model ID#special effect info (replaced by the def_dropitem_model field in the initial set list if the info is left empty)).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Ones of Map Exploration Info Fields in Map List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!字段&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|BattleLoseStay&lt;br /&gt;
|Stay still after losing a battle. Only available in adventure mode (0: No; 1: Yes)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following fields are suitable for version above or higher than 0.7.2.1'''&lt;br /&gt;
|-&lt;br /&gt;
|RolePlay&lt;br /&gt;
|When the player is on this map, their character model and name will be replaced by the info of character whose ID is filled into this field. The models of the following minions will be hidden too. The bag and squad panels become inaccessible.&lt;br /&gt;
|-&lt;br /&gt;
|FixedGameTime&lt;br /&gt;
|When this field is not empty, the in-game time will be frozen at a certain point of a day (0~1.0, 0.5 means 12 pm). When the time is frozen, the world will not run on. Only units on the current map can take actions.&lt;br /&gt;
|-&lt;br /&gt;
|CameraFilter&lt;br /&gt;
|When on this map, use this field compulsorily as a camera filter. The effect is the same as the SET_CAMERA_FILTER directives.&lt;br /&gt;
|-&lt;br /&gt;
|NoFoodConsume&lt;br /&gt;
|When this field is 1, the player will not consume food on this map and will not die because of hunger.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Fields of TAG in Instance Info List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PlayerInitType&lt;br /&gt;
|The initial mode of player’s character (0: Default (use the default character template and initial position in the instance to initialize the character) 1: Manual (initialize the character via the LUA port)).&lt;br /&gt;
|-&lt;br /&gt;
|ExpMode&lt;br /&gt;
|EXP allocation mode. Format: allocation mode[,radius parameter].&lt;br /&gt;
&lt;br /&gt;
The allocation modes are: &lt;br /&gt;
&lt;br /&gt;
*0: Killer mode (default; the enemy killer has all EXP).&lt;br /&gt;
*1: Average Mode (the parameter is the allocation radius; when the parameter &amp;lt;=0, all allies share EXP).&lt;br /&gt;
*2: Share Mode (if the radius parameter &amp;gt;0, share EXP with allies with the radius).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Item Entry Info===&lt;br /&gt;
Entries of items follow the format of “entry type:{enumerated info 1, value 1; enumerated info 2, value 2;… }”, and they are set in the item list. Entries can be sorted as:&lt;br /&gt;
&lt;br /&gt;
*a: increase the character’s attribute passively. Enumerated info is the KEY to the increased attribute.&lt;br /&gt;
*skill: add new available skills to a character. Enumerated info is the skill ID.&lt;br /&gt;
*dg_skill: replace the current dungeon skill of the character. Enumerated info is the dungeon skill ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item Dropping Info===&lt;br /&gt;
Format:&lt;br /&gt;
 Probability 1,item ID1,min number,max number [,additional parameter list(see [[Common Scenario Directives#.E7.89.A9.E5.93.81.E5.88.97.E8.A1.A8.E4.BF.A1.E6.81.AF.E6.A0.BC.E5.BC.8F|Format of Item List Info]])]|probability 2,item ID2,min number, max number [,parameter list]|...|probability N,item N,min number,max number[,parameter list]. &lt;br /&gt;
(E.g., “LOOT*100.0, 金钱,100,200|50.0, 经验,100,200” means that there is a 100% chance of obtaining 100~200 utars and a 50% chance to obtain 100~200 EXP).&lt;br /&gt;
&lt;br /&gt;
'''In Item ID, you can execute a special ID Query, which is to query and return a result of item dropping from the global dropping list (see the format in Q全局掉落表.xlsx).'''&lt;br /&gt;
&lt;br /&gt;
The format of the parameter list of QUERY is: “parameter 1=val1, parameter 2=val2,....” Following query parameters are supported: &lt;br /&gt;
&lt;br /&gt;
*[id] obtain the result of the target ID from the global dropping list (ignore all the other query conditions when this exists and is not empty).&lt;br /&gt;
*[lv] specific conational query level（-1：return all query results; 0: query based on the current level of player）.&lt;br /&gt;
*[t1] query TAG 1 (a condition).&lt;br /&gt;
*[t2] query TAG 2.&lt;br /&gt;
*[t3] query TAG 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Script Directive in Special Effect Object Event===&lt;br /&gt;
You can attach the eftEffectEventHelper script to a special effect object to add a new play-effect event. Format of every event: event time point (number of seconds after the start), parameter 1, parameter 2,…, parameter N.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive types are:&lt;br /&gt;
&lt;br /&gt;
shake_cam: screen shake. Parameter 1 is the duration of screen shake, and parameter 2 is the intensity. &lt;br /&gt;
&lt;br /&gt;
play_sound: play audio. Parameter 1 is the audio ID.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=684</id>
		<title>Common Scenario Directives</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Common_Scenario_Directives&amp;diff=684"/>
		<updated>2020-09-22T01:51:38Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* Scenario Event Trigger */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Scenario Event===&lt;br /&gt;
A scenario event is a basic element used to realize scenario scripts in the game. All scenario events in the game are called by emitters or executors and put into the directive queue. These scenario events will be run by the GameWorldManager one by one according to the in-game time. An integrate scenario event consists of the following parts:&lt;br /&gt;
&lt;br /&gt;
1. Scenario Event ID: a unique label of a scenario event;&lt;br /&gt;
&lt;br /&gt;
2. Directive Content: directives that will be executed after a scenario event is triggered;&lt;br /&gt;
&lt;br /&gt;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.&lt;br /&gt;
&lt;br /&gt;
===Scenario Event Trigger===&lt;br /&gt;
Currently, all stories and events are established according to the mechanics of the scenario event trigger. The mechanics of a trigger is: event ports are set at different positions in advanced, and when the program accesses a position, it will call the port and import the current environment variables. The program will then traverse all defined triggers in the port event and return the trigger with the highest priority or all triggers that meet the conditions (to return one or all triggers is decided by the type of a port). Finally, a scenario event is executed. Triggers’ calling events is not executed immediately. Relevant events are put into the execution queue and get carried out procedurally until all events in the queue are executed.&lt;br /&gt;
&lt;br /&gt;
Following is the list of scenario events defined in the game (port types in bold indicate that they execute all trigger events that meet the conditions instead of executing the one of the highest priority): &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Port Type&lt;br /&gt;
!Explanation&lt;br /&gt;
!Object Type&lt;br /&gt;
!Object ID&lt;br /&gt;
|-&lt;br /&gt;
|passive&lt;br /&gt;
|Triggered passively; &lt;br /&gt;
&lt;br /&gt;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|talk&lt;br /&gt;
|Triggered when interacting with NPC.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|first_in&lt;br /&gt;
|Triggered when the player enters the game for the first time.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter&lt;br /&gt;
|Triggered when interacting with units on the sandbox map.&lt;br /&gt;
|&lt;br /&gt;
|Control ID of the target Unit.&lt;br /&gt;
|-&lt;br /&gt;
|before_enter_map&lt;br /&gt;
|Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_map&lt;br /&gt;
|Triggered when entering a map.&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_map&lt;br /&gt;
|Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target map ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_map&lt;br /&gt;
|Triggered when leaving a map.&lt;br /&gt;
|&lt;br /&gt;
|Current map ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_place&lt;br /&gt;
|Triggered when entering the target location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_place&lt;br /&gt;
|Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted)&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_place&lt;br /&gt;
|Triggered when leaving the current location.&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_place&lt;br /&gt;
|Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Current location ID.&lt;br /&gt;
|-&lt;br /&gt;
|enter_building&lt;br /&gt;
|Triggered when entering the target building&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|reach_building&lt;br /&gt;
|Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|leave_building&lt;br /&gt;
|Triggered when leaving the target building.&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|before_leave_building&lt;br /&gt;
|Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted).&lt;br /&gt;
|&lt;br /&gt;
|Target building ID.&lt;br /&gt;
|-&lt;br /&gt;
|battle_start&lt;br /&gt;
|Triggered at the start of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|battle_over&lt;br /&gt;
|Triggered at the end of a battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|set_lord&lt;br /&gt;
|Triggered when AI appoints player as the ruler of a city.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|job_cmd&lt;br /&gt;
|Triggered when the player is given a working order.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|see_warband&lt;br /&gt;
|Triggered when encountering another squad and battle.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|curplace_inwar&lt;br /&gt;
|Triggered when the location where the player is currently settling in is attacked.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|quest_done&lt;br /&gt;
|Triggered when all conditions of a mission are met (mission incomplete).&lt;br /&gt;
|&lt;br /&gt;
|Mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''on_end_work'''&lt;br /&gt;
|Triggered when completing a mission of a location.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|'''occupy_place'''&lt;br /&gt;
|Triggered when the player occupied a location.&lt;br /&gt;
|&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|'''new_day'''&lt;br /&gt;
|Triggered when starting a new day.&lt;br /&gt;
|&lt;br /&gt;
|The target number of days.&lt;br /&gt;
|-&lt;br /&gt;
|reward_follower&lt;br /&gt;
|Triggered when the player rewards their followers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reward_player&lt;br /&gt;
|Triggered when the player is rewarded.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dip_event&lt;br /&gt;
|Triggered when the player’s faction meets diplomatic affairs.&lt;br /&gt;
|Affair types:&lt;br /&gt;
&lt;br /&gt;
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice.&lt;br /&gt;
|Target Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_success&lt;br /&gt;
|Triggered when the player’s diplomatic request is met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|dip_ret_fail&lt;br /&gt;
|The diplomatic request is not met.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|player_failed&lt;br /&gt;
|Triggered when the player failed in a skirmish. &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reinforce_request&lt;br /&gt;
|Triggered when reinforcement related to player happens.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|is_fall&lt;br /&gt;
|Triggered when a faction collapsed.&lt;br /&gt;
|&lt;br /&gt;
|Faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|is_to_fall&lt;br /&gt;
|Triggered when a faction loses all bases and is about to collapse.&lt;br /&gt;
|&lt;br /&gt;
|Same as above.&lt;br /&gt;
|-&lt;br /&gt;
|before_cash_present&lt;br /&gt;
|Triggered before being rewarded (action of rewarding is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|before_present&lt;br /&gt;
|Triggered before sending a gift (action of sending the gift is interrupted).&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_present&lt;br /&gt;
|Triggered when sending a gift.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|encounter_role&lt;br /&gt;
|Triggered before the common dialogue that happens when the player encounters a character.&lt;br /&gt;
|&lt;br /&gt;
|Target Character ID.&lt;br /&gt;
|-&lt;br /&gt;
|helped_camp&lt;br /&gt;
|Triggered when the player encounters a conflict between two sides and helped one side.&lt;br /&gt;
|&lt;br /&gt;
|The faction of the leadrole of target’s squad.&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_up&lt;br /&gt;
|Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|on_place_rep_down&lt;br /&gt;
|Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_dismiss&lt;br /&gt;
|Triggered when a squad is dismissed.&lt;br /&gt;
|Squad Type: &lt;br /&gt;
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|team_into_place&lt;br /&gt;
|Triggered when a squad enters a location.&lt;br /&gt;
|Squad Type: same as above.&lt;br /&gt;
|Target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Script Directive List===&lt;br /&gt;
&lt;br /&gt;
Script directives in the game usually follow the format of directive type*parameter 1#parameter2#...#parameter N, and uses line break to separate multiple lines of directives.&lt;br /&gt;
&lt;br /&gt;
Currently, supported script directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Directive&lt;br /&gt;
!Instruction&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
Function: show a dialogue with the typewriter effect and character painting. &lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N.&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
&lt;br /&gt;
 When certain paragraph needs to be bound with audios, add &amp;lt;voice:audio ID&amp;gt; in the front of the paragraph to show the according to the audio file for the words. The audio will be turned off when you skip the paragraph.&lt;br /&gt;
 You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly.&lt;br /&gt;
 When the paragraph begins with “inner:...”, a special piece of information is used;&lt;br /&gt;
 The built-in special information IDs and meanings are as follow:  &lt;br /&gt;
 inner:set_player_job: object’s words when they give orders to player&lt;br /&gt;
 inner:set_player_lord: text when the player is appointed as a ruler&lt;br /&gt;
 inner:self_introduce: self-introduction of a character &lt;br /&gt;
 inner:cur_doing: the content of what the current character has been doing&lt;br /&gt;
 inner:cur_team_intent: intension of the current squad&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side. &lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump-to Event'''&lt;br /&gt;
&lt;br /&gt;
Function: Jump to and execute another specific scenario event ID.&lt;br /&gt;
&lt;br /&gt;
Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0).&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT&lt;br /&gt;
|'''Jump-to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT*scenario event ID.&lt;br /&gt;
|-&lt;br /&gt;
|SUB_EVENT_RETURN&lt;br /&gt;
|'''Return to Subevent'''&lt;br /&gt;
&lt;br /&gt;
Function: jump back to the last subevent from the current subevent.&lt;br /&gt;
&lt;br /&gt;
Format: SUB_EVENT_RETURN*&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Selection List Box'''&lt;br /&gt;
&lt;br /&gt;
Function:  Based on the text box, after the dialogue content is printed, a selection list box pops up, lets the player choose an option, and returns the result (the according [%result_code%] of the result command in the event).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 when the KEY of an option begins with &amp;quot;+&amp;quot;, the text box will not disappear after the player selects an option. &lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TALK&lt;br /&gt;
|'''Plugin Dialogue Option'''&lt;br /&gt;
Function: a selection list box that can present new options via a trigger list.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by &amp;quot;|&amp;quot;; set to be &amp;quot;any&amp;quot; by default)&lt;br /&gt;
&lt;br /&gt;
Annotation: &lt;br /&gt;
 the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be &amp;quot;any&amp;quot; by default if nothing is filled in), but certain options (whose trigger type is SELECT and meet conditions) will be selected from the trigger and be added as new options; the text shown is bound in the trigger, and the content of the triggered event is decided by the trigger event ID.&lt;br /&gt;
&lt;br /&gt;
 Please note: when using this directive, you need to add &amp;quot;[%result_code%][&amp;gt;]99:EVENTPOJO_EVENT* &amp;quot; to the result&lt;br /&gt;
 In the trigger list, you can add a prefix &amp;quot;SUB_EVENT.&amp;quot; to a trigger event ID to mark it as a subevent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|CMD_SELECT&lt;br /&gt;
|'''System Selection List Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_SELECT*select text info#option group (same as SELECT directive).&lt;br /&gt;
|-&lt;br /&gt;
|CONFIRM&lt;br /&gt;
|'''Text Confirmation Box'''&lt;br /&gt;
Function: a text box with a &amp;quot;confirm&amp;quot; button pops up.&lt;br /&gt;
&lt;br /&gt;
Format: CONFIRM*text to confirm&lt;br /&gt;
|-&lt;br /&gt;
|TOAST&lt;br /&gt;
|'''Message on Screen'''&lt;br /&gt;
Function: a message pops up on the screen, which disappears after a short while.&lt;br /&gt;
&lt;br /&gt;
Format: TOAST*message content&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text).&lt;br /&gt;
|-&lt;br /&gt;
|GAME_MSG&lt;br /&gt;
|'''In-game News'''&lt;br /&gt;
Function: show a text in the UI message box, which can be reviewed in the News Log.&lt;br /&gt;
&lt;br /&gt;
Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System).&lt;br /&gt;
|-&lt;br /&gt;
|INPUT&lt;br /&gt;
|'''Input Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]).&lt;br /&gt;
&lt;br /&gt;
Format: INPUT*notice text#Len number limit of digit#default text.&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay).&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second).）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable).&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|BLACK_SCREEN&lt;br /&gt;
|'''Screen Curtain'''&lt;br /&gt;
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain.&lt;br /&gt;
&lt;br /&gt;
Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
Function: Set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Annotation:&lt;br /&gt;
 Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity.&lt;br /&gt;
 E.g., 雪,60|雾,20&lt;br /&gt;
 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled&lt;br /&gt;
 For weather effect ID, please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]]&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE&lt;br /&gt;
|'''Start Battle'''&lt;br /&gt;
Function: start a skirmish or a battle defined in a specific battle table.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE*battle ID (if you do not fill in a specific battle ID or fill in “ENCOUNTER”, you start a skirmish)#BGM (optional; if there is a BGM in a particular battle).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH&lt;br /&gt;
|'''Fight with Specific Unit'''&lt;br /&gt;
Function: start a custom fight with a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH*target character info (optional)#minion info of the target (optional)#battle map info (optional)#battle location info (optional)#battlefield weather (optional)#BGM (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_WITH_TAGROLE&lt;br /&gt;
|'''Fight with Target Character'''&lt;br /&gt;
&lt;br /&gt;
Function: start a specific fight with the target character immediately.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_WITH_TAGROLE*battle ID (battle ID is used to trigger scenario event only)#specific BGM (optional; if there is a BGM for a specific battle).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_BGM&lt;br /&gt;
|'''Change Current BGM of the Game'''&lt;br /&gt;
Function: change the current BGM of the game based on the need of stories.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_BGM*parameter 1#paramter 2&lt;br /&gt;
&lt;br /&gt;
 Parameter 1: AudioID of the target BGM (switch back to the default BGM of the current map if this is empty; when the remaining field of this ID is “MUTE”, which means no BGM is played currently).&lt;br /&gt;
 Parameter 2: validation type (0: invalidated when switching scenes; 1: always validated even when you save the game and come back unless you recall the CHANGE_BGM directive and define an empty AudioID).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_SOUND&lt;br /&gt;
|'''Sound Effect'''&lt;br /&gt;
Function: play a sound effect in the game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_ROLE_VOICE&lt;br /&gt;
|'''Play Character Voice-over'''&lt;br /&gt;
Function: play an audio file that is defined in “Voice” of the character’s tags.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|NUMSEL&lt;br /&gt;
|'''Input Value Text Box'''&lt;br /&gt;
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]).&lt;br /&gt;
&lt;br /&gt;
Format: NUMSEL*text of input box#min value#max value#default value#item price#price message(when the item price is 0, system does not show the price message. Otherwise, the message needs to follow the format of “{0} Utar(s) for each unit, {1} Utar(s) in total”).&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_MONEY&lt;br /&gt;
|'''Change Player’s Money in Hand '''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_MONEY*change value.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_CHANGE_MONEY&lt;br /&gt;
|'''Change a Specific Hero’s Money in Hand'''&lt;br /&gt;
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_CHANGE_MONEY*Hero ID#change value.&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1).&lt;br /&gt;
|-&lt;br /&gt;
|AI_CAMP_GETITEMS&lt;br /&gt;
|'''All Factions Get Items or Resources'''&lt;br /&gt;
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive.&lt;br /&gt;
&lt;br /&gt;
Format: AI_CAMP_GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_ITEMS&lt;br /&gt;
|'''Convert Item'''&lt;br /&gt;
Function: convert a specific item in the current item list into a new item proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time.&lt;br /&gt;
&lt;br /&gt;
E.g., “TRANSFER_ITEMS*小麦#小麦粉#1#1#10” means converting wheat(小麦) into wheat powder(小麦粉) at a 1:1 proportion. If during the conversion, the original item becomes insufficient, the conversion stops.&lt;br /&gt;
|-&lt;br /&gt;
|GET_RND_ITEM&lt;br /&gt;
|'''Select a Type of Item Randomly'''&lt;br /&gt;
Function: select a type of item randomly among several items.&lt;br /&gt;
&lt;br /&gt;
Format: GET_RND_ITEM*object item list (e.g., GET_RND_ITEMS*茶叶(Tea), 3|面包(Bread), 1|牛奶(Milk), 2. This means that you will get one type of the three.)&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Specific Item or Resource'''&lt;br /&gt;
Function: remove a certain number of items from the item list of the player.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_SELECT_ITEMS&lt;br /&gt;
|'''Remove the Selected Item'''&lt;br /&gt;
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_SELECT_ITEMS*maximum number of selected groups (choose object groups in the front from the selected targets)#number of removal(optional; set -1 by default. When the number is lower than 0 or higher than the number of the object’s stacks, remove the whole group. Otherwise, draw a specific number of all selected targets).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_PRESENT&lt;br /&gt;
|'''Remove Specific Gift Item That Meet Requirement'''&lt;br /&gt;
Function: remove a gift item from the item list based on a specific gift tag.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of &amp;quot;Like&amp;quot; in the mission list.&lt;br /&gt;
|-&lt;br /&gt;
|ITEMS_SELECTOR&lt;br /&gt;
|'''Open Item Selection Text Box'''&lt;br /&gt;
Function: an item selection text box pops up. You can restore your choice in a queriable variable ([%last_seled_items%],[%last_seled_item_id%], etc).&lt;br /&gt;
&lt;br /&gt;
Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list &lt;br /&gt;
|-&lt;br /&gt;
|TEAM_GAINEXP&lt;br /&gt;
|'''Player’s Squad Gains EXP'''&lt;br /&gt;
Function: members in the player’s squad gain average EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|TEST_ADD_ROLE_EXP&lt;br /&gt;
|'''Specific Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: TEST_ADD_ROLE_EXP*hero ID#exp.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_ROLE_LV&lt;br /&gt;
|'''Change Character Level'''&lt;br /&gt;
Function: change the level of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_ROLE_LV*hero ID#expected level.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_GUARDS_LEVELUP&lt;br /&gt;
|'''All Defending Heroes Level Up'''&lt;br /&gt;
Function: all heroes in a specific location increase their level by 1.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_GUARDS_LEVELUP*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_TEAM_LEVELUP&lt;br /&gt;
|'''All Heroes in Player’s Squad Level UP'''&lt;br /&gt;
Function: all heroes in the player’s squad level up directly.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_TEAM_LEVELUP*.&lt;br /&gt;
|-&lt;br /&gt;
|SETTRIGG&lt;br /&gt;
|'''Set Trigger Switch'''&lt;br /&gt;
Function: turn on or turn off a trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: SETTRIGG*trigger ID#status value (0: On; 1: Off)&lt;br /&gt;
|-&lt;br /&gt;
|TRIGGER&lt;br /&gt;
|'''Execute Trigger'''&lt;br /&gt;
Function: execute a specific trigger directly.&lt;br /&gt;
&lt;br /&gt;
Format: TRIGGER*trigger ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_ES&lt;br /&gt;
|'''Manually Set Scenario Event Status'''&lt;br /&gt;
Function: set the execution status of a scenario event manually (after the logics have been executed, the result will be marked with ResultCode of the current event).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event).&lt;br /&gt;
|-&lt;br /&gt;
|SETINTVAR&lt;br /&gt;
|'''Set Custom Int Variable'''&lt;br /&gt;
Function: set a custom int variable (recorded by saves). Some variable fields will be connected the in-game logic parameter (for custom int variable that are defined inside the program, please see the“自定义变量参数表”) and can be queried via built-in query parameter ([%int_val:ID%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETINTVAR*parameter ID#current int value&lt;br /&gt;
|-&lt;br /&gt;
|CHANGEINTVAR&lt;br /&gt;
|'''Change Custom Int Variable'''&lt;br /&gt;
Function: change the value of the current custom int variable.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TEMP_ID&lt;br /&gt;
|'''Set Temporary ID Variable'''&lt;br /&gt;
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TEMP_ID*ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETSTRVAR&lt;br /&gt;
|'''Set Custom String Variable'''&lt;br /&gt;
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]).&lt;br /&gt;
&lt;br /&gt;
Format: SETSTRVAR*Variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIMETAG&lt;br /&gt;
|'''Tag a Custom Crucial Time Point '''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can use [%tag_gametime_elapse%] to load the time span since the time point you record.&lt;br /&gt;
&lt;br /&gt;
Please note: this directive is only used to transfer temporary variables in a series of stories, and the tag will not be stored in saves. Do not use this for scenes that need permanent data.&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIMETAG*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SETGAMETIME&lt;br /&gt;
|'''Tag a Custom In-game Time Point'''&lt;br /&gt;
Function: tag and record the current in-game time point with an ID. You can query the relevant info of this time point via query parameter (see[%gametime_elapse%] and [%gametime_elapse_by_day%], etc.).&lt;br /&gt;
&lt;br /&gt;
Format: SETGAMETIME*time point ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CUSTOM_CD&lt;br /&gt;
|'''Set a Custom Cooldown Time'''&lt;br /&gt;
Function: set a custom cooldown timer and see whether the current cooldown is in use by checking if [%is_custom_cd:ID%] is 1 or not.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;＞0: set a specific time (count by day)).&lt;br /&gt;
|-&lt;br /&gt;
|GET_QUEST&lt;br /&gt;
|'''Claim a Mission'''&lt;br /&gt;
Function: claim a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: GET_QUEST*mission ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_QS&lt;br /&gt;
|'''Add Mission Subitem Counter'''&lt;br /&gt;
Function: add a subitem counter of missions manually.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter.&lt;br /&gt;
|-&lt;br /&gt;
|SETQUESTIEM&lt;br /&gt;
|'''Set Value of Mission Subitem'''&lt;br /&gt;
Function: set the value of the subitem of missions.&lt;br /&gt;
&lt;br /&gt;
Format: SETQUESTIEM*mission ID#subitem index#value&lt;br /&gt;
|-&lt;br /&gt;
|DONE_QUEST&lt;br /&gt;
|'''Complete a Mission'''&lt;br /&gt;
Function: mark and complete a specific mission.&lt;br /&gt;
&lt;br /&gt;
Format: DONE_QUEST*mission ID#reward or not(1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_IMG&lt;br /&gt;
|'''Show a Character Painting Frame'''&lt;br /&gt;
Function: [not suggested; recommend using the SHOW_CG direcitve].&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*name of image*preset special effect 0*duration (second).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_IMG&lt;br /&gt;
|'''Disable Character Painting Frame'''&lt;br /&gt;
Function: disable the current character painting frame.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_IMG*preset special effect 0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_ROLE&lt;br /&gt;
|'''Force Character to Join'''&lt;br /&gt;
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel.&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_ROLE&lt;br /&gt;
|'''Force Character to Leave'''&lt;br /&gt;
Function: force a character to leave your squad.&lt;br /&gt;
&lt;br /&gt;
Format: QUIT_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE&lt;br /&gt;
|'''Change Location Status'''&lt;br /&gt;
Function: set the current status of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLEPOS&lt;br /&gt;
|'''Set Character Position'''&lt;br /&gt;
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLEPOS*character ID#position info&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_PLACE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport Player to Specific Position'''&lt;br /&gt;
Function: teleport player’s squad to a specific position in the world.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*world position info.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_PLACE&lt;br /&gt;
|'''Teleport Player to Specific Location'''&lt;br /&gt;
Function: teleport player’s squad to a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_PLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT_TO_ROLE&lt;br /&gt;
|'''Teleport Player to Target Character'''&lt;br /&gt;
Function: teleport player’s squad to where the target character is currently staying (this only works when the target is in a squad or a location).&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT_TO_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CMD&lt;br /&gt;
|'''Exclusive Directive Group for Unit Control on Sandbox Map '''&lt;br /&gt;
Function: control various units to execute specific directives on a sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: MAP_CMD*directive content&lt;br /&gt;
&lt;br /&gt;
 Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes).&lt;br /&gt;
 Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes).&lt;br /&gt;
 Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate.&lt;br /&gt;
 Hide current battle mark: HIDE_BATTLE_MARK#1.&lt;br /&gt;
|-&lt;br /&gt;
|RESTORE&lt;br /&gt;
|'''Player’s Squad Get Recovered'''&lt;br /&gt;
Function: all units in the player’s squad are recovered.&lt;br /&gt;
&lt;br /&gt;
Format: RESTORE*parameter (&amp;lt;=0: squad fully recovered; &amp;gt;0: squad recovered by a specific point).&lt;br /&gt;
|-&lt;br /&gt;
|TIME_ELAPSE&lt;br /&gt;
|'''Time Acceleration'''&lt;br /&gt;
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up.&lt;br /&gt;
&lt;br /&gt;
Format: TIME_ELAPSE*in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#show time bar (0: No(default); 1: Yes)#operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|WAIT_EXEC&lt;br /&gt;
|'''Wait and Execute a Script Event'''&lt;br /&gt;
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: WAIT_EXEC* in-game time#time multiplier#frame message#can be canceled (0: Yes(default); 1: No)#script event ID #operation icon(icon name under Assets\BuildSource\Icons)#UI follows player’s squad (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSEIGE&lt;br /&gt;
|'''Open Siege Management Panel'''&lt;br /&gt;
Function: show a siege management panel and operate reinforcement squads based on the preset (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
Format: OPENSEIGE*panel mode(0: attack city; 1: defend city)#target location ID (optional; set to be the target location of the current environment variable by default).&lt;br /&gt;
|-&lt;br /&gt;
|OCCUPY&lt;br /&gt;
|'''Execute City Occupation'''&lt;br /&gt;
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger).&lt;br /&gt;
&lt;br /&gt;
Format: OCCUPY*0.&lt;br /&gt;
|-&lt;br /&gt;
|JOIN_WARBAND&lt;br /&gt;
|'''Join Warband'''&lt;br /&gt;
Function: joined an existed warband（a group of fighting squads from two different sides） (use [$tagwb:id$] to obtain the Warband info of the current skirmish).&lt;br /&gt;
&lt;br /&gt;
Format: JOIN_WARBAND*warband ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_CAMP&lt;br /&gt;
|'''Change Character Faction'''&lt;br /&gt;
Function: change the faction of a target character directly.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_CAMP*faction ID#target character ID#recruiter ID(if this field is player then the character will join the player’s squad directly).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_OWN_CAMP&lt;br /&gt;
|'''Player Creates Their Faction'''&lt;br /&gt;
Function: player creates and activates their own faction. Player’s faction has a fixed default ID: Self-built Faction. This faction exists since the beginning of the game, but it is inactivated. Calling this directive will activate the player’s faction, making player and their followers join this faction.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_OWN_CAMP*name of self-built faction.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_ACTIVE&lt;br /&gt;
|'''Change Faction Project Status'''&lt;br /&gt;
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMP_RL&lt;br /&gt;
|'''Change Faction Relationship'''&lt;br /&gt;
Function: change diplomatic relationship or friendliness between factions.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMP_RL*faction A#faction B#relationship (-1: Remain the same; 0: Neutral; 1: Hostile; 2: Friendly)#friendliness value change#expected friendliness value (if this field exists).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_CAMP_REP&lt;br /&gt;
|'''Change Player’s Prestige (Tribute) towards Faction'''&lt;br /&gt;
Function: change player’s prestige (Tribute) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_CAMP_REP*target faction ID#value change#expected value (this works when the value is not empty). The faction refers to the player’s current faction if the faction ID is empty.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_REP&lt;br /&gt;
|'''Change Player’s Prestige (Friendliness) towards Faction'''&lt;br /&gt;
Faction: change the player’s prestige (Friendliness) towards a faction.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|FAME&lt;br /&gt;
|'''Change Player’s Global Prestige'''&lt;br /&gt;
Function: change the player’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: FAME*value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_FAME&lt;br /&gt;
|'''Change Character’s Global Prestige'''&lt;br /&gt;
Function: change a specific character’s current global prestige.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_FAME*target character ID#value change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PERSON_FV&lt;br /&gt;
|'''Change Favor between the Player and a Character'''&lt;br /&gt;
Function: change favor between the player and another character.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_ACTIVE&lt;br /&gt;
|'''Change Character Project Status'''&lt;br /&gt;
Function: change the project status of a character (not controlled by the player). When this character is inactive, they will not be refreshed in Taverns or execute AI actions like moving.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PROSP_BY_CAMP&lt;br /&gt;
|'''Change Prosperity of All Bases of Faction'''&lt;br /&gt;
Function: change the prosperity of all bases of a specific faction proportionally.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PROSP_BY_CAMP*faction ID#percentage(&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY&lt;br /&gt;
|'''Change Location Prosperity''' &lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY*location ID#value change#expected value (this works when the value is not empty; cannot exceed the maximum Prosperity of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_PROSPERITY_BY_PCT&lt;br /&gt;
|'''Change Location Prosperity by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Prosperity of a specific location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (&amp;gt;=100).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF&lt;br /&gt;
|'''Change Location Defense'''&lt;br /&gt;
&lt;br /&gt;
Function: change the Defense of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF*location ID#value change#expected value(this works when the value is not empty; cannot exceed the maximum Defense of the location).&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_DEF_BY_PCT&lt;br /&gt;
|'''Change Location Defense by Percentage'''&lt;br /&gt;
&lt;br /&gt;
Function: change the defense of a location by percentage.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change.&lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_SECURITY&lt;br /&gt;
|'''Change Location Security'''&lt;br /&gt;
&lt;br /&gt;
Function: change the security of a location by a fixed value.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CUSTOM_INT&lt;br /&gt;
|'''Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: a custom int field value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. &lt;br /&gt;
|-&lt;br /&gt;
|CHG_PLACE_CUSTOM_INT&lt;br /&gt;
|'''Change Custom Field Value of Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the custom int value of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_ADD_BUILDING&lt;br /&gt;
|'''Add Custom Facility'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom facility to a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_REMOVE_BUILDING&lt;br /&gt;
|'''Remove Custom Facility from Location'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom facility from a location.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_REMOVE_BUILDING*location ID#facility ID.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_CARAVAN&lt;br /&gt;
|'''Create Caravan'''&lt;br /&gt;
&lt;br /&gt;
Function: create a caravan in a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad).&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_TEAM&lt;br /&gt;
|'''Create Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad, which takes actions according to specific directives.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_TEAM*position on the map#faction#character list (characters included will leave their current squads or locations compulsorily)#minion card list (card ID#level, number |card ID2#level 2, number 2|.......)#directive method (see below)#directive parameter#squad TAG(used to search for specific squads).&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive methods are:&lt;br /&gt;
&lt;br /&gt;
· 0: custom directive: the parameter of the custom directive is the directive for the squad (format: directive type 1, parameter 1; directive type 2, parameter 2;……; directive type N, parameter N) For detailed directive format, please see the Squad Preset Directive.&lt;br /&gt;
&lt;br /&gt;
· 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default).&lt;br /&gt;
&lt;br /&gt;
· 2: premade directive of invading faction: the parameter is the ID of the target faction, priority of target (0: Distance first; 1: Defense first), invasion method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|DISMISS_TEAM&lt;br /&gt;
|'''Dismiss Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss a specific squad.&lt;br /&gt;
&lt;br /&gt;
Format: DISMISS_TEAM*map unit identification ID&lt;br /&gt;
|-&lt;br /&gt;
|TEAM_ORDER&lt;br /&gt;
|'''Change Squad Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: change the current directive list of the squad.&lt;br /&gt;
&lt;br /&gt;
Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_PLACE&lt;br /&gt;
|'''Attack Location'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside.&lt;br /&gt;
&lt;br /&gt;
Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|INVASION_CAMP&lt;br /&gt;
|'''Attack Faction'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to attack another faction immediately. Please note: these two factions must be hostile towards each other or both stand neutral. If the attacker does not have sufficient military power, the attack might not happen.&lt;br /&gt;
&lt;br /&gt;
Format: IVASION_CAMP*attacker (faction) ID#target faction ID#priority of target(0: Distance first; 1: Defense first)#invasion type (0: Occupation; 1:Raid)#number of bases involved (0: All; &amp;gt;0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel with a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_LOCAL_PRODUCT&lt;br /&gt;
|'''Add Map Specialty'''&lt;br /&gt;
&lt;br /&gt;
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y.&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERMISSION&lt;br /&gt;
|'''Set Trade Permission'''&lt;br /&gt;
&lt;br /&gt;
Function: set trade permission for a location.&lt;br /&gt;
&lt;br /&gt;
Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|TROOPS_ALLOC&lt;br /&gt;
|'''Garrison Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the garrison panel of a location.&lt;br /&gt;
&lt;br /&gt;
Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|GETSKILL&lt;br /&gt;
|'''Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill to a character.&lt;br /&gt;
&lt;br /&gt;
Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills).&lt;br /&gt;
|-&lt;br /&gt;
|LEARN_SKILL&lt;br /&gt;
|'''Consume Skill Point to Learn Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character in a squad and make them learn a new skill. If they do not have enough skill point, they cannot learn the skill.&lt;br /&gt;
&lt;br /&gt;
Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVESKILL&lt;br /&gt;
|'''Forget Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a skill from a specific target.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills)&lt;br /&gt;
|-&lt;br /&gt;
|RESET_SP&lt;br /&gt;
|'''Reset Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the skill points of a character.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_SP*character ID&lt;br /&gt;
|-&lt;br /&gt;
|ADD_UNUSEDSP&lt;br /&gt;
|'''Change Available Skill Point'''&lt;br /&gt;
&lt;br /&gt;
Function: add a new skill point to a player and allocate the skill point.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_UNUSEDSP*number of skill point.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SKILLPAGE&lt;br /&gt;
|'''Activate or Remove Player’s Skill Page'''&lt;br /&gt;
&lt;br /&gt;
Function: activate or remove a skill page of the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_TEAMINFO&lt;br /&gt;
|'''Show Info of Current Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: show the information on the current squad that you encounter.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_TEAMINFO*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_FLAG&lt;br /&gt;
|'''Set Complete Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story.&lt;br /&gt;
&lt;br /&gt;
Format: SET_FLAG*name of the mark#mark value.&lt;br /&gt;
|-&lt;br /&gt;
|UPDATE_MARKS&lt;br /&gt;
|'''Mark Update'''&lt;br /&gt;
&lt;br /&gt;
Function: update marks on the map.&lt;br /&gt;
&lt;br /&gt;
Format: UPDATE_MARKS*1.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUMMY&lt;br /&gt;
|'''Set Dummy or Creep Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode on Sandbox Map'''&lt;br /&gt;
&lt;br /&gt;
Function: control the camera mode on the sandbox map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter&lt;br /&gt;
&lt;br /&gt;
and meanings of the parameters:&lt;br /&gt;
&lt;br /&gt;
0: follows the player’s character. No parameter (default).&lt;br /&gt;
&lt;br /&gt;
1: follows a specific target. The parameter is the particular map unit identification ID.&lt;br /&gt;
&lt;br /&gt;
2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Location'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of a location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_CAMP&lt;br /&gt;
|'''Set Faction-exclusive Map'''&lt;br /&gt;
&lt;br /&gt;
Function: change the faction of all cities on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|TRY_RECRUIT_FREE_ROLE&lt;br /&gt;
|'''Try Neutral Hero Recruitment'''&lt;br /&gt;
&lt;br /&gt;
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full).&lt;br /&gt;
&lt;br /&gt;
Format: TRY_RECRUIT_FREE_ROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHK_RECRUIT_CAPTIVE&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_CAP&lt;br /&gt;
|[Unavailable]&lt;br /&gt;
|-&lt;br /&gt;
|SEND_ENVOY&lt;br /&gt;
|'''Send Diplomatic Envoy'''&lt;br /&gt;
&lt;br /&gt;
Function: send a diplomatic envoy for specific diplomatic missions.&lt;br /&gt;
&lt;br /&gt;
Format: SEND_ENVOY*faction ID (refer to player’s faction when empty)#diplomatic behaviour (1: Ransom; 2:Friendly; 3: War; 4: Alliance; 5: Alliance broke; 6: Armistice)#target ID (when you ransomed a character, it is the character ID; otherwise it is the target faction ID)#additional parameter(usually it is the required amount of money)#envoy arrival (1: No waiting time; 0: Need to wait).&lt;br /&gt;
|-&lt;br /&gt;
|DIP_DECIDE&lt;br /&gt;
|'''Execute Diplomatic Event Check'''&lt;br /&gt;
&lt;br /&gt;
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event).&lt;br /&gt;
&lt;br /&gt;
Format: DIP_DECIDE*result code (1: Agreement; 0: Decline).&lt;br /&gt;
|-&lt;br /&gt;
|EXPEL_ROLE&lt;br /&gt;
|'''Expel Character'''&lt;br /&gt;
&lt;br /&gt;
Function: expel a character out of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: EXPEL_ROLE*faction ID#character ID.&lt;br /&gt;
|-&lt;br /&gt;
|TRY_REWARD_ROLE&lt;br /&gt;
|'''Try to Reward a Follower'''&lt;br /&gt;
&lt;br /&gt;
Function: try to reward a follower.&lt;br /&gt;
&lt;br /&gt;
Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Add Global Buff to Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: add a global buff to the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_GLOBAL_BUFF*buffID#duration (in-game days)#number of stacks (set 1 by default)#upper limit of stacks (set -1 by default, no limit).&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF*buffID&lt;br /&gt;
|-&lt;br /&gt;
|RM_GLOBAL_BUFF_BYCLASS&lt;br /&gt;
|'''BUFF Remove Global Buff of Squad by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a global buff of the current squad by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''BUFF Remove All Global Buffs of Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all global buffs of the current squad.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_FAILED&lt;br /&gt;
|'''Game Failed'''&lt;br /&gt;
&lt;br /&gt;
Function: a common result of the player failing their game.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_FAILED*1.&lt;br /&gt;
|-&lt;br /&gt;
|LOSE_INVENTORY&lt;br /&gt;
|'''Player Loses Common Items'''&lt;br /&gt;
&lt;br /&gt;
Function: the player loses their items once (only goods and money).&lt;br /&gt;
&lt;br /&gt;
Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGROLE&lt;br /&gt;
|'''Change Object Character of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object character of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGROLE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TAGPLACE&lt;br /&gt;
|'''Change Object Location of Current Script'''&lt;br /&gt;
&lt;br /&gt;
Function: set a default object location of the environment variable of the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TAGPLACE*location ID.&lt;br /&gt;
|-&lt;br /&gt;
|SURRENDER&lt;br /&gt;
|'''Faction Surrenders'''&lt;br /&gt;
&lt;br /&gt;
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender).&lt;br /&gt;
&lt;br /&gt;
Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter&lt;br /&gt;
|-&lt;br /&gt;
|GEN_RND_PLACE&lt;br /&gt;
|'''Select Random Location to Query'''&lt;br /&gt;
&lt;br /&gt;
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives.&lt;br /&gt;
&lt;br /&gt;
Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction)&lt;br /&gt;
|-&lt;br /&gt;
|HERO_UPGRADE&lt;br /&gt;
|'''Hero Enhancement'''&lt;br /&gt;
&lt;br /&gt;
Function: enhance an attribute permanently of a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit).&lt;br /&gt;
|-&lt;br /&gt;
|HERO_SET_STATU&lt;br /&gt;
|'''Set Character Attribute Field'''&lt;br /&gt;
&lt;br /&gt;
Function: set a value of an attribute field for a specific character.&lt;br /&gt;
&lt;br /&gt;
Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_BUFF&lt;br /&gt;
|'''BUFF Add Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: add a faction buff to a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_BUFF*faction ID#buff ID#duration (in-game days; when this value is lower than 0, the buff becomes permanent unless it is removed compulsorily).&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF&lt;br /&gt;
|'''Remove Faction Buff'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF*faction ID#buff ID.&lt;br /&gt;
|-&lt;br /&gt;
|RM_CAMP_BUFF_BYCLASS&lt;br /&gt;
|'''Remove Faction Buff by Buff Type'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a faction buff from a specific faction by buff type.&lt;br /&gt;
&lt;br /&gt;
Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type.&lt;br /&gt;
|-&lt;br /&gt;
|RM_ALL_GLOBAL_BUFF&lt;br /&gt;
|'''Remove All Faction Buffs'''&lt;br /&gt;
&lt;br /&gt;
Function: remove all faction buffs from a specific faction.&lt;br /&gt;
&lt;br /&gt;
Format: RM_ALL_GLOBAL_BUFF*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Add Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: add a dynamic attribute field to a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_CAMP_EXTRA_STATU&lt;br /&gt;
|'''Reset Faction Attribute Field Value'''&lt;br /&gt;
&lt;br /&gt;
Function: reset all values in the dynamic attribute field in a faction.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_CAMP_EXTRA_STATU*faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|WEAPON_DURABILITY_DOWN&lt;br /&gt;
|'''Weapon Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of the current weapon. When the durability is below 0, the weapon is destroyed. If the weapon’s durability is -1 (does not have durability), nothing happens with this directive.&lt;br /&gt;
&lt;br /&gt;
Format: WEAPON_DURABILITY_DOWN*value.&lt;br /&gt;
|-&lt;br /&gt;
|ITEM_DURABILITY_DOWN&lt;br /&gt;
|'''Specific Item Durability Decrease'''&lt;br /&gt;
&lt;br /&gt;
Function: reduce the durability of an item (with the right tag and meets the level condition(&amp;gt;= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed.&lt;br /&gt;
&lt;br /&gt;
Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value.&lt;br /&gt;
|-&lt;br /&gt;
|SET_SYNTH_STATE&lt;br /&gt;
|'''Set Status of Recipe'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific recipe.&lt;br /&gt;
&lt;br /&gt;
Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned)&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SYNTH_DLG&lt;br /&gt;
|'''Open Item Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of item crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SYNTH_DLG*if locked (0: Do not lock the main category; 1: Lock display category)#catagory page shown by default (can be set empty by default; use “,” to separate pages; show the first page by default; this field can show hidden categories when the main category is locked)#story key to execute after closing the crafting dialogue (can be empty).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CARD_SYNTH_DLG&lt;br /&gt;
|'''Open Card Crafting Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the dialogue UI of card crafting.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CARD_SYNTH_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_EFT&lt;br /&gt;
|'''Play Special Effect'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect on the current map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#map coordinate#initial rotation degree (can be the rotation vector of the three directions or a spinning degree of the Y-axis)#scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|PLAY_MU_EFT&lt;br /&gt;
|'''Unit Following Special Effect on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: play a special effect that follows a unit on a specific map.&lt;br /&gt;
&lt;br /&gt;
Format: PLAY_MU_EFT*special effect path (relative to Asset directory. E.g., Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#map unit ID#object range (0: hero only; 1: all units)#initial rotation degree (can be the rotation vector of the three directions, or a spinning degree of the Y-axis))# scale proportion (can use the percentage vector of the X, Y, and Z-axis, or the overall scale proportion)#duration (count by second; the effect will be removed after exceeding this duration)#delay (set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_MAPAREA_SELECTOR&lt;br /&gt;
|'''Open Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a UI panel of area selector on the current sandbox map. You can select a location for the current object in the predefined area on this panel, and then a result is returned. If the result_code returns 1, the location setting succeeded; if 0, the setting failed. The location info is recorded in [$last_selpos$].&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_FREEAREA_SELECTOR&lt;br /&gt;
|'''Open Free Map Area Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info.&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_SELECTOR&lt;br /&gt;
|'''Open Location Selector Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open a suggested location selector panel. Selected result will be stored in [$tagplace$], its number stored in [%result_code%].If [%result_code%] is 9999, player cancels the selection. &lt;br /&gt;
&lt;br /&gt;
Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter).&lt;br /&gt;
|-&lt;br /&gt;
|SET_LORD&lt;br /&gt;
|'''Set City Ruler'''&lt;br /&gt;
&lt;br /&gt;
Function: set a city ruler for a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_LORD*character ID#location ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_CHEST&lt;br /&gt;
|'''Add a Custom Chest'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom chest on the world map according to the setting info (this “chest” can be any interactive object on the world map, such as materials, ruins, and soldier recruitment point).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (&amp;gt;0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CHEST&lt;br /&gt;
|'''Set Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a controllable chest on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CHEST*map ID#chest ID#status (&amp;gt;0: How many times you can open the chest; &amp;lt;=0: Chest Opened).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CURCHEST&lt;br /&gt;
|'''Set Current Chest Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of the target chest in the current script.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CURCHEST*statu (same as SET_CHEST).&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_SYSTEM_UI&lt;br /&gt;
|'''Turn Off System UI'''&lt;br /&gt;
&lt;br /&gt;
Function: turn of the current system UI.&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_SYSTEM_UI*.&lt;br /&gt;
|-&lt;br /&gt;
|CLOSE_ITEM_PANEL&lt;br /&gt;
|'''Close Bag UI'''&lt;br /&gt;
&lt;br /&gt;
Function: close the current UI panel of the player’s bag (if it exists).&lt;br /&gt;
&lt;br /&gt;
Format: CLOSE_ITEM_PANEL*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLES_SELECTOR&lt;br /&gt;
|'''Turn Off Character Selector UI'''&lt;br /&gt;
Function: turn off the current system UI of the character selector.&lt;br /&gt;
&lt;br /&gt;
Format: ROLES_SELECTOR*title of selection list box#number limit of options (&amp;lt;0: No limit)#option range (0: Global non-template character; 1: Player squad character; 2: Character in the Character Table)#conditional expression#parameter (the parameter is the character list when the selection range is the specific Character Table).&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
 ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&amp;amp;[$tagrole:campid$][&amp;lt;&amp;gt;][$null$]#&lt;br /&gt;
 ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4.&lt;br /&gt;
The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%].&lt;br /&gt;
|-&lt;br /&gt;
|ASK_ABOUT_SOMEBODY_SELECTOR&lt;br /&gt;
|'''Ask-about Character Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: the character who you ask whereabout of is currently not involved in the logic calculation. The character selection list box pops up, and the result is stored in [%arg_str_val1%]. When the result [%result_code%] is 9999, player cancels the selection.&lt;br /&gt;
&lt;br /&gt;
Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about.&lt;br /&gt;
|-&lt;br /&gt;
|CARD_SELECTOR&lt;br /&gt;
|'''Card Selector'''&lt;br /&gt;
&lt;br /&gt;
Function: show the panel of current card list for the player to select.&lt;br /&gt;
&lt;br /&gt;
Format: CARD_SELECTOR*title of selection list box#number limit of selection (&amp;lt;0: No limit)#selection range (0: Card in the player squad; 2: Specific unit list) #parameter (optional; the parameter is the unit list when the selection range is the specific Unit Table).&lt;br /&gt;
|-&lt;br /&gt;
|ASSEMBLE_ARMY&lt;br /&gt;
|'''Gather Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: gather all troops and followers of a faction.&lt;br /&gt;
&lt;br /&gt;
Format: ASSEMBLE_ARMY#Gatherer ID#follower ID (can be empty; use “|” to separate; can use [%last_seled_roles%], the result of ROLES_SELECTOR). If the follower ID is empty, all characters under the faction are selected by default.&lt;br /&gt;
|-&lt;br /&gt;
|RELEASE_ALL_ASSEMBLE_ARMY&lt;br /&gt;
|'''Dismiss All Gathered Troops'''&lt;br /&gt;
&lt;br /&gt;
Function: dismiss all troops that have been gathered or gathering.&lt;br /&gt;
&lt;br /&gt;
Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_IN_PROJECT&lt;br /&gt;
|'''Character Starts to Execute Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a character starts to execute a specific project.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_IN_PROJECT*character ID#project ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_ROLE_FINISH_PROJECT&lt;br /&gt;
|'''Character Ends Current Project'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific character ends their current project compulsorily.&lt;br /&gt;
&lt;br /&gt;
Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,...&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PROJECT_ADMIN&lt;br /&gt;
|'''Open Personal Project Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the personal project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default).&lt;br /&gt;
|-&lt;br /&gt;
|GROUP_PROJECT_ADMIN&lt;br /&gt;
|'''Open Group Project Panel'''&lt;br /&gt;
Function: open the group project execution panel.&lt;br /&gt;
&lt;br /&gt;
Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default).&lt;br /&gt;
 Currently, supported project binding types are:&lt;br /&gt;
 Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty&lt;br /&gt;
 world: custom building construction; object parameter format: custom area control ID; belong to which base (when this field is empty, the building does not belong to any city).&lt;br /&gt;
|-&lt;br /&gt;
|SET_REVIVE_POS&lt;br /&gt;
|'''Set Respawn Position'''&lt;br /&gt;
&lt;br /&gt;
Function: set a new respawn position.&lt;br /&gt;
&lt;br /&gt;
Format: SET_REVIVE_POS*world map position (map ID:x,y).&lt;br /&gt;
|-&lt;br /&gt;
|SET_SILENCE_MODE&lt;br /&gt;
|'''Set Silence Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable message silence mode. &lt;br /&gt;
&lt;br /&gt;
Format: SET_SILENCE_MODE*silence mode (0: Disabled; 1: Do not show TOAST box and deliver messages only; TOAST info of obtaining items is shown in the message; 2: Do not show TOAST and messages).&lt;br /&gt;
|-&lt;br /&gt;
|START_RAID_PLACE&lt;br /&gt;
|[Abolished]&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CUSTOM_PLACE&lt;br /&gt;
|'''Add Custom Location'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom location on a specific spot on the world map.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CUSTOM_PLACE*custom location ID (globally unique)#belong to the city (can be empty; the location does not belong to any city when this field is empty#location info template ID#location info#default faction of the location.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLACE_NAME&lt;br /&gt;
|'''Change Location Name'''&lt;br /&gt;
&lt;br /&gt;
Function: change the name of a specific location.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLACE_NAME*location ID#custom name. &lt;br /&gt;
|-&lt;br /&gt;
|OPEN_PLACE_BUILD_UI&lt;br /&gt;
|'''Open Location Building Construction Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the location building construction panel.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD&lt;br /&gt;
|'''Add New Card'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|ADD_CARD_PIECE&lt;br /&gt;
|'''Add Card with Specific Durability'''&lt;br /&gt;
&lt;br /&gt;
Function: add a premade card, whose durability is a specific number (lower than the durability limit).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|SET_OBS_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of an obstacle area on a map.&lt;br /&gt;
&lt;br /&gt;
Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_AREA&lt;br /&gt;
|'''Explore Area'''&lt;br /&gt;
&lt;br /&gt;
Function: explore an area of the current map (dispel the war fog).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius&lt;br /&gt;
|-&lt;br /&gt;
|EXPLORE_MAP&lt;br /&gt;
|'''Explore the Whole Map'''&lt;br /&gt;
&lt;br /&gt;
Function: explore the whole map (dispel the war fog of the entire map).&lt;br /&gt;
&lt;br /&gt;
Format: EXPLORE_MAP*map ID.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTVAL_WATCHER&lt;br /&gt;
|'''Add Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. &lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTVAL_WATCHER*variable monitor info.&lt;br /&gt;
&lt;br /&gt;
(Format: field Key1,displayed name1,enumerated value 1a=enumerated name1a|enumerated value 1b=enumerated name1b|...|enumerated value 1N=enumerated name 1N, visibility status in battles([optional，set 0 by default] 0: No; 1: Yes);...; monitor field info N).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTVAL_WATCHER&lt;br /&gt;
|'''Remove Custom Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a specific custom variable monitor filed.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTVAL_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_INTVAL_WATCHERS&lt;br /&gt;
|'''All Variable Monitor Field'''&lt;br /&gt;
&lt;br /&gt;
Function: exact all variable monitor fields.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_INTVAL_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set an event timer, and a specific event will be executed when the timer ends.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (&amp;lt;0: the timer is closed; when the timer type is Preset, this parameter is the number of days since the beginning of the game; when the timer type is Countdown, the parameter is the number of days)#timer type (0: Preset (triggered when time is reached); 1: Countdown)#Event ID when time reached#compulsory update (1: Compulsory update; 0: Non-compulsory update(will not change the current data of existing timer); set 1 if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER&lt;br /&gt;
|'''Remove Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER*timer ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TIMER_TIME&lt;br /&gt;
|'''Change Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: increase/decrease the time of a timer.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_TIMER_WATCHER&lt;br /&gt;
|'''Add Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI).&lt;br /&gt;
&lt;br /&gt;
Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] &lt;br /&gt;
&lt;br /&gt;
coefficient of the scaling of time parameter), visibility in battles ([optional; set 0 by default]; 0: No; 1: Yes)|...|timer ID N, displayed time format N, scale parameter N.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_TIMER_WATCHER&lt;br /&gt;
|'''Remove Monitor Field of Custom Event Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the monitor field of a custom event timer. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_TIMER_WATCHER*field KEY.&lt;br /&gt;
|-&lt;br /&gt;
|CLEAR_ALL_TIMER_WATCHERS&lt;br /&gt;
|'''Clear All Monitor Fields of Custom Event Timer''' &lt;br /&gt;
&lt;br /&gt;
Function: clear all monitor fields of custom event timer.&lt;br /&gt;
&lt;br /&gt;
Format: CLEAR_ALL_TIMER_WATCHERS*.&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_RECRUIT_CARD_IN_PLACE&lt;br /&gt;
|'''Open City Recruitment Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the player’s recruitment panel in a city.&lt;br /&gt;
&lt;br /&gt;
Format: PLAYER_RECRUIT_CARD_IN_PLACE*city ID#ID of the event executed after recruitment (optional)#ID of the event executed after player cancels the recruitment (optional).&lt;br /&gt;
|-&lt;br /&gt;
|STORY_CARD_START&lt;br /&gt;
STORY_CARD_LINE&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END&lt;br /&gt;
|'''Open Story Card (2D Image)''' '''Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the story card panel. There must be a STORY_CARD_START and a STORY_CARD_END to avoid errors. STORY_CARD_LINE stands for the story paragraphs that need to be put between the start and the end (no number limit).&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_START*file name of the card.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 1.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 2.&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_LINE*story paragraph 3.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
STORY_CARD_END*.&lt;br /&gt;
|-&lt;br /&gt;
|AUTOSAVE&lt;br /&gt;
|'''AutoSave'''&lt;br /&gt;
&lt;br /&gt;
Function: execute autosave immediately.&lt;br /&gt;
&lt;br /&gt;
Format: AUTOSAVE*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Saving Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game-saving dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_SAVE_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_SAVE_DLG&lt;br /&gt;
|'''Open Game Loading Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the game loading dialogue.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_LOAD_DLG*1.&lt;br /&gt;
|-&lt;br /&gt;
|EXCHANGE_CARD&lt;br /&gt;
|'''Open Card Exchange Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the card exchange panel.&lt;br /&gt;
&lt;br /&gt;
Format: EXCHANGE_CARD*object type (0: Location; 1: Squad)#object ID([optional; set to be the current location by default]; when the object is a location, the ID is the location ID, squad ID for squad object).&lt;br /&gt;
|-&lt;br /&gt;
|LEVEL_FINISH&lt;br /&gt;
|'''Complete Level'''&lt;br /&gt;
&lt;br /&gt;
Function: used in scenarios to indicate the accomplishment of a level.&lt;br /&gt;
&lt;br /&gt;
Format: LEVEL_FINISH*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA_FILTER&lt;br /&gt;
|'''Set Camera Filter'''&lt;br /&gt;
&lt;br /&gt;
Function: set a filter for the camera. &lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10).&lt;br /&gt;
&lt;br /&gt;
Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100.&lt;br /&gt;
|-&lt;br /&gt;
|TLACTION&lt;br /&gt;
|'''Timeline Action'''&lt;br /&gt;
&lt;br /&gt;
Function: specific units on the world map do TIMELINE actions.&lt;br /&gt;
&lt;br /&gt;
Format: TLACTION*map character ID#file name of Timeline action#lasting time of action.&lt;br /&gt;
|-&lt;br /&gt;
|SELECTION_VIEW&lt;br /&gt;
|'''Fullscreen Special Story Selection'''&lt;br /&gt;
&lt;br /&gt;
Function: open a fullscreen selection panel of a special story.&lt;br /&gt;
&lt;br /&gt;
Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*).&lt;br /&gt;
|-&lt;br /&gt;
|DIALOG_BUBBLE&lt;br /&gt;
|'''Map Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying.&lt;br /&gt;
|-&lt;br /&gt;
|TEXT_EXPLORE_START&lt;br /&gt;
TEXT_EXPLORE_OVER&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD&lt;br /&gt;
|'''Text Adventure Relevant'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific text adventure mode.&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_OVER*. Ends the current instance.&lt;br /&gt;
&lt;br /&gt;
TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_CG&lt;br /&gt;
|'''Show CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: create an interface for showing CG images (please note: after enabling this function, you need to use HIDE_CG* manually to hide the CG. Otherwise the CG will get to player).&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_CG*image name (no suffix; if this field is empty, the background will become black. The relevant directory is: Assets\BuildSource\Backgrounds\. Only .png file accepted).&lt;br /&gt;
|-&lt;br /&gt;
|HIDE_CG&lt;br /&gt;
|'''Hide CG Image'''&lt;br /&gt;
&lt;br /&gt;
Function: hide the CG interface.&lt;br /&gt;
&lt;br /&gt;
Format: HIDE_CG*.&lt;br /&gt;
|-&lt;br /&gt;
|GENERATE_RANDOM_CARD&lt;br /&gt;
|'''Select a Card Randomly'''&lt;br /&gt;
&lt;br /&gt;
Function: select a card randomly, which will be stored in the tag card of the current variable.&lt;br /&gt;
&lt;br /&gt;
Format: GENERATE_RANDOM_CARD#1.&lt;br /&gt;
|-&lt;br /&gt;
|VOICE_OVER&lt;br /&gt;
|'''Voice Over'''&lt;br /&gt;
&lt;br /&gt;
Function: show a voice-over interface.&lt;br /&gt;
&lt;br /&gt;
Format: VOICE_OVER*voice over the content.&lt;br /&gt;
|-&lt;br /&gt;
|CREATE_STORYARMY&lt;br /&gt;
|'''Create a Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: create a squad only for stories.&lt;br /&gt;
&lt;br /&gt;
Format: CREATE_STORYARMY*tagkey#map position#faction#character list (all selected characters will leave their current squads or locations compulsorily)#card unit list (card ID1,number1,level1|card ID2,number 2,level 2|.......)#movement info (e.g., WANDER,2500).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_STORYARMY&lt;br /&gt;
|'''Remove Story Squad'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a story squad.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_STORYARMY*tagkey.&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_BUY_ITEM&lt;br /&gt;
|'''Bazaar Merchant Buy-in'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants buy items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional).&lt;br /&gt;
|-&lt;br /&gt;
|BAZZAR_SELL_ITEM&lt;br /&gt;
|'''Bazaar Merchant Sell-out'''&lt;br /&gt;
&lt;br /&gt;
Function: bazaar merchants sell items.&lt;br /&gt;
&lt;br /&gt;
Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SHOWROLE&lt;br /&gt;
|'''Show Character Painting'''&lt;br /&gt;
Function: show character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; set to be L by default—L stands for the left side of the text box, R for the right side.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;painting position &lt;br /&gt;
|-&lt;br /&gt;
|HIDEROLE&lt;br /&gt;
|'''Hide Character Painting'''&lt;br /&gt;
Function: hide character paintings in dialogues.&lt;br /&gt;
&lt;br /&gt;
Format: HIDEROLE*position of character 1 painting (#position of character 2 painting) (optional).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;position of character painting: can be both L or R; L stands hiding the painting on the left side, R for hiding the painting on the right side.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_QUEST_ASK&lt;br /&gt;
|'''Mission Query'''&lt;br /&gt;
&lt;br /&gt;
Function: add a mission query that meets conditions based on the standard SELECT directive.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_QUEST_ASK*.&lt;br /&gt;
|-&lt;br /&gt;
|SELECT_TEAMROLE&lt;br /&gt;
|'''Select Squad Character'''&lt;br /&gt;
&lt;br /&gt;
Function: select a character from a squad.&lt;br /&gt;
&lt;br /&gt;
Format: SELECT_TEAMROLE*.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_PLAYER_ACTIVE&lt;br /&gt;
|'''Activate Character Indo Status'''&lt;br /&gt;
&lt;br /&gt;
Function: make a character visible on the “Report” interface and import the character ID (this is usually used in scenarios. E.g., the tavern ladies).&lt;br /&gt;
&lt;br /&gt;
Format: ROLE_PLAYER_ACTIVE*character ID.&lt;br /&gt;
|-&lt;br /&gt;
|ROLE_ORDER&lt;br /&gt;
|'''Built-in Character Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: give some built-in directives to a character and execute these directives immediately. &lt;br /&gt;
&lt;br /&gt;
Format: ROLE_ORDER*character ID [refer to the current target character when this field is empty]#directive code: refer to Directive Parameter Table.&lt;br /&gt;
&lt;br /&gt;
The current directive code supports:&lt;br /&gt;
&lt;br /&gt;
*RETURN_JOBCITY: the character goes back to the location they belong to. No parameter. If the character is the squad leader, the squad directive is changed directly; if the character is not a squad leader, they leave the current squad and go back to the original squad; if they are in another location, they create a squad and return.&lt;br /&gt;
&lt;br /&gt;
*GOTO_PLACE: the character goes to the target location. The parameter is the target location ID.&lt;br /&gt;
&lt;br /&gt;
*JOIN_PLAYER_TEAM: the character joins the player’s squad directly. No parameter.&lt;br /&gt;
&lt;br /&gt;
*FOLLOW_ME: the character comes to rally and follows the player’s squad. No parameter.&lt;br /&gt;
&lt;br /&gt;
*EXPEL_FROM_CAMP: expel the character from their faction. No parameter.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTERACTIVE_MSG&lt;br /&gt;
|'''Add Interactive Message'''&lt;br /&gt;
Function: add a custom interactive message and show it in the corresponding UI.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_INTERACTIVE_MSG*info type#title#info text #parameter text#duration(&amp;lt;=0: Permanent; &amp;gt;0: number of days)#message sender info #TAG parameter.&lt;br /&gt;
&lt;br /&gt;
Currently supported message types are:&lt;br /&gt;
&lt;br /&gt;
msg (message); request; finance.&lt;br /&gt;
&lt;br /&gt;
When the message type is not financed, the format of the parameter text is:&lt;br /&gt;
 Parameter Key1: parameter value 1;parameter Key2:parameter value 2;...;parameter Key N:parameter N&lt;br /&gt;
Currently, the built-in KEY types of system are:&lt;br /&gt;
&lt;br /&gt;
*ask: assign this message to be a request with at most 2 directive options according to the parameter. Format: ask: option 1 text=event ID of option 1 [: option 2 text=event ID of option 2].&lt;br /&gt;
&lt;br /&gt;
E.g., ask: “Yes”=Event1: “No”=Event2. &lt;br /&gt;
&lt;br /&gt;
*items: assign this message to be a message of obtaining the item table. The parameter is the corresponding item list info. E.g., items: money,10000|紫金之刃,1,mf=0-3|黄金之枪,1,mf=0-3|幻刃月光,1,mf=0-3.&lt;br /&gt;
*You can define other fields, and use [$tagmsg:arg=parameter KEY$] (in the triggered directive of interactive messages) to query the value of the corresponding parameter field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the message type is finance, the format of the parameter text is:&lt;br /&gt;
 Receipt field 1=receipt detail list (format: resource 1, number 1| resource 2, number 2|…|resource N, number N); receipt field 1= receipt detail list; […]; receipt field N=receipt detail list.&lt;br /&gt;
Message sender format: sender type: sender ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported sender types are:&lt;br /&gt;
&lt;br /&gt;
*0: system; empty ID.&lt;br /&gt;
&lt;br /&gt;
*1: character; ID= character ID.&lt;br /&gt;
&lt;br /&gt;
*2: location; ID= location ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TAG parameter is a random string field TAG used to mark.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive message that meets specific conditions. &lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTERACTIVE_MSG*message type#sender info#TAG parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Message type and TAG parameter can be empty (no type or TAG limit).&lt;br /&gt;
&lt;br /&gt;
Format of sender info: ADD_INTERACTIVE_MSG.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_THIS_INTERACTIVE_MSG&lt;br /&gt;
|'''Remove Current Interactive Message'''&lt;br /&gt;
&lt;br /&gt;
Function: remove the current interactive message of the existing environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_THIS_INTERACTIVE_MSG*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.1.3 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_HEADAVATA&lt;br /&gt;
|'''Change Player Painting Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the painting of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_HEADAVATA*character painting ID.&lt;br /&gt;
|-&lt;br /&gt;
|FORCE_CHANGE_MODEL&lt;br /&gt;
|'''Change Player Model Compulsorily'''&lt;br /&gt;
&lt;br /&gt;
Function: change the model of the player.&lt;br /&gt;
&lt;br /&gt;
Format: FORCE_CHANGE_MODEL*model ID.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.2.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_INTVAR_CONFIG&lt;br /&gt;
|'''Show Option Panel of Configurable Custom Int Field'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom field configuration panel in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_INTVAR_CONFIG*mode(0: Create game mode; 1: In-game mode).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP_MARKER&lt;br /&gt;
|'''Add or Set Custom Mark on Map'''&lt;br /&gt;
&lt;br /&gt;
Function: add or set a custom mark on the world map. When the mark ID already exists, the older mark info will be covered.&lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP_MARKER*mark ID#title#annotation info #map position info#file name of mark image (this field can be empty; set to be &amp;quot;map_flag&amp;quot; by default; this mark image is a PNG image resource under directory“\BuildSource\map_res\MinimapMakers\”).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_MAP_MARKER&lt;br /&gt;
|'''Remove a Custom Map Mark'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a custom mark on the map with a specific ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_MAP_MARKER*mark ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|RUN_SCRIPT_FUNC&lt;br /&gt;
|'''Execute Function of Specific Lua Script'''&lt;br /&gt;
&lt;br /&gt;
Function: execute the standard function of a specific Lua script.&lt;br /&gt;
&lt;br /&gt;
Format: RUN_SCRIPT_FUNC*file name of the relative directory of script (same as RUN_SCRIPT)#standard function name (the function name in the script; the parameter is the imported environment variable).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_GUI&lt;br /&gt;
|'''Open Custom GUI Form'''&lt;br /&gt;
&lt;br /&gt;
Function: open a custom GUI form.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_GUI*GUI pack name#form component name#script file path of the form (relative script root directory “Asset\BuildSource\LuaScripts\”. No file expansions)#form parameter(format: json format. E.g., {&amp;quot;arg1&amp;quot;:&amp;quot;val1&amp;quot;,&amp;quot;arg2&amp;quot;:&amp;quot;val2&amp;quot;})#block directive queue (default 0: Yes; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|OPEN_CONTAINER_GUI&lt;br /&gt;
|'''Open Container GUI'''&lt;br /&gt;
&lt;br /&gt;
Function: open a defined container GUI.&lt;br /&gt;
&lt;br /&gt;
Format: OPEN_CONTAINER_GUI*container ID (instance ID used to identify)#template info ID (info ID defined in Container Definition Table).&lt;br /&gt;
&lt;br /&gt;
When the parameter list is empty or is “This”, the specific container in the current environment variable (if existed) will be opened. E.g., OPEN_CONTAINER_GUI*THIS.&lt;br /&gt;
|-&lt;br /&gt;
|CONTAINER_CMD&lt;br /&gt;
|'''Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a specific directive for a particular container in the current environment variable.&lt;br /&gt;
&lt;br /&gt;
Format: CONTAINER_CMD*container directive type#parameter 1#parameter 2#...#parameter N&lt;br /&gt;
&lt;br /&gt;
Currently supported collective built-in directive types are:&lt;br /&gt;
&lt;br /&gt;
add_exp: add EXP to all cards in the container. The parameter is the EXP value.&lt;br /&gt;
&lt;br /&gt;
add_items: add a specific element into the container (E.g., the format of the item container is: CONTAINER_CMD*add_items#item 1,10|item 2,5 ；format of the card container is: ID list of cards, separated by “|”).&lt;br /&gt;
|-&lt;br /&gt;
|PLACE_CONTAINER_CMD&lt;br /&gt;
|'''Location Container Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: see a location as a container object and execute the same container directives.&lt;br /&gt;
&lt;br /&gt;
Format: PLACE_CONTAINER_CMD*location ID (when this field is empty or “THIS”, refer to the location assigned by the current environment parameter)#container directive list (same as CONTAINER_CMD parameters).&lt;br /&gt;
|-&lt;br /&gt;
|SET_MAP&lt;br /&gt;
|'''Set Map Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the visibility of a specific map. &lt;br /&gt;
&lt;br /&gt;
Format: SET_MAP*map ID#status value (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|RESET_LUAENV&lt;br /&gt;
|'''Reset Current LUA Environment'''&lt;br /&gt;
&lt;br /&gt;
Function: reset the current environment of LUA script and clear cache; this directive can be used when you need to debug the LUA script but do not want to restart the game.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_LUAENV*1.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.4.1 or above version'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_ARG_INT&lt;br /&gt;
|'''Set Parameter Value in Current Environment Variable'''&lt;br /&gt;
&lt;br /&gt;
Function: set the int parameter value stored in the environment variable of the current script (correspond to [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]).&lt;br /&gt;
&lt;br /&gt;
Format: SET_ARG_INT*new value#target parameter index (optional;set to be 0 by default; 0~2 correspond to [%arg_int_val1%] ~ [%arg_int_val3%] respectively).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Global Save Directive===&lt;br /&gt;
Global save is a type of saving used to record some data shared by all saves. Data recorded in the global save can be accessed in all saves after being changed.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_INTVAR&lt;br /&gt;
|'''Set Custom Int Variable of Global Save''' &lt;br /&gt;
&lt;br /&gt;
Function: set a custom int variable in the global save. The variable, recorded in the global save, can be accessed via the [%global_int:ID%] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_INTVAR*variable ID#current int value.&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_GLOBAL_INTVAR&lt;br /&gt;
|'''Change Custom Int Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: change a custom int variable in the global.&lt;br /&gt;
&lt;br /&gt;
Format: CHANGE_GLOBAL_INTVAR*variable ID#value change (can be a negative number)#minimum value (optional; no limit if this field is empty)#maximum value (optional; no limit if this field is empty).&lt;br /&gt;
|-&lt;br /&gt;
|SET_GLOBAL_STRVAR&lt;br /&gt;
|'''Set Custom String Variable of Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom string variable. The variable, recorded in the global save, can be accessed via the [$global_str:ID$] directive.&lt;br /&gt;
&lt;br /&gt;
Format: SET_GLOBAL_STRVAR*variable ID#string value.&lt;br /&gt;
|-&lt;br /&gt;
|PUSH_GLOBAL_ROLES&lt;br /&gt;
|'''Globally Save Character Status'''&lt;br /&gt;
&lt;br /&gt;
Function: save specific character list to the global character status list.&lt;br /&gt;
&lt;br /&gt;
Format: PUSH_GLOBAL_ROLES*custom global save Key#character ID (this character can only be a non-template character).&lt;br /&gt;
|-&lt;br /&gt;
|PULL_GLOBAL_ROLES&lt;br /&gt;
|'''Load Character Status from Global Save'''&lt;br /&gt;
&lt;br /&gt;
Function: load the status of specific character list from the global character status list, and apply it to the current game mode.&lt;br /&gt;
&lt;br /&gt;
Format: PULL_GLOBAL_ROLES*custom global save KEY (the character of this KEY must be a character from the character template of the current game mode.&lt;br /&gt;
|-&lt;br /&gt;
|LOCK_CMD_QUEUE&lt;br /&gt;
|'''Lock Current Directive Queue'''&lt;br /&gt;
&lt;br /&gt;
Function: lock the current directive queue. The directive queue will not be cleared after switching from different game saves or resetting the game modes.&lt;br /&gt;
&lt;br /&gt;
Format: LOCK_CMD_QUEUE*lock queue (0: No;1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|SWITCH_GAME_MODE&lt;br /&gt;
|'''Switch Game Modes'''&lt;br /&gt;
&lt;br /&gt;
Function: switch to the target game mode and load it.&lt;br /&gt;
&lt;br /&gt;
Format: SWITCH_GAME_MODE*target game mode ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Built-in Directive List===&lt;br /&gt;
Built-in directives are directives used to realize certain functions inside the program, usually for some specific scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|ENCOUNTER&lt;br /&gt;
|'''Creep Encountering UI'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info panel of the creep encountered.&lt;br /&gt;
&lt;br /&gt;
Format: ENCOUNTER*1.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_INFO_DLG&lt;br /&gt;
|'''Chest Guardian Info Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open the info dialogue of the chest guardian.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_INFO_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_COST_DLG&lt;br /&gt;
|'''Price of Chest Opening Dialog'''&lt;br /&gt;
&lt;br /&gt;
Function: open a dialogue to show the price of opening a chest.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_COST_DLG*chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|CHEST_CALLBACK&lt;br /&gt;
|'''Logic Callback of Chest Opening'''&lt;br /&gt;
&lt;br /&gt;
Function: command a logic callback of chest opening.&lt;br /&gt;
&lt;br /&gt;
Format: CHEST_CALLBACK*callback value (1: Defeat the guardian; 2: Opening completed)#target chest ID.&lt;br /&gt;
|}&lt;br /&gt;
===Preset Fields of Scripts and Their Meanings===&lt;br /&gt;
Sometimes we use certain directives to refer to specific objects in script editing. For example, we can use CUR_ROLE to replace the ID of the current character player encountered. We can realize some common application scenarios via script editing. &lt;br /&gt;
&lt;br /&gt;
Currently, supported preset fields are: &lt;br /&gt;
&lt;br /&gt;
*CUR_ROLE: ID of current character template encounter, used primarily for dialogue and selection list box&lt;br /&gt;
*CUR_BATTLE: ID of the battle between player and refreshed unit encountered on the current map&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Script Directive of Results in Scenario Event===&lt;br /&gt;
The format of script directives of results in a scenario event is (separated by a line break): &lt;br /&gt;
 conditional expression group 1: executed command 1&lt;br /&gt;
 conditional expression group 2: executed command 2&lt;br /&gt;
 ...&lt;br /&gt;
 conditional expression group N: executed command N&lt;br /&gt;
Execute the command: judge conditional expression group 1 first, if the conditions are met, execute command 1. Otherwise, judge conditional expression group 2……judge all listed groups until one group of conditions is met, or all conditions are not met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Conditional Expression Group===&lt;br /&gt;
A conditional expression group consists of multiple conditional expression like “[%CONDITION%][=]1”, and the expressions are connected by “|” (Or) or “&amp;amp;” (And). '''The priority of “&amp;amp;” (And) is higher than “|” (Or)'''. When both sides of the expression are integer characters, return the comparison result of the two values. Otherwise, compare the strings, and only [=] and [&amp;lt;&amp;gt;] judgements are supported.&lt;br /&gt;
&lt;br /&gt;
For example:  &lt;br /&gt;
&lt;br /&gt;
 [%result_code%][=]1|[%player_money%][&amp;gt;=]100 means “execute when the result is 1 or when the player has 100 utars”.&lt;br /&gt;
 [%player:level%][&amp;gt;=]3&amp;amp;[%player_money%][&amp;gt;]100 means “execute when player’s level is 3 or above, and they have more than 100 utars”.&lt;br /&gt;
&lt;br /&gt;
'''The followings are the comparison symbols in conditional expressions:'''&lt;br /&gt;
&lt;br /&gt;
*[=]: equal&lt;br /&gt;
*[&amp;gt;]: larger than&lt;br /&gt;
*[&amp;gt;=]: greater than or equal to&lt;br /&gt;
*[&amp;lt;]: less than&lt;br /&gt;
*[&amp;lt;=]: less than or equal to&lt;br /&gt;
*[&amp;lt;&amp;gt;]: not equal to&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game Data Calculation Expression System===&lt;br /&gt;
We can embed some value expressions like “[&amp;amp;expression&amp;amp;]” in many places in the game (e.g., the status value of the BUFF list)&lt;br /&gt;
&lt;br /&gt;
In value expression, the basic mathematic calculation is supported. Currently, supported calculation symbols are: &lt;br /&gt;
&lt;br /&gt;
*+: addition&lt;br /&gt;
*-: subtraction&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;*: multiplication&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*/: division&lt;br /&gt;
*%: modulo (take the remainder)&lt;br /&gt;
*^: exponentiation&lt;br /&gt;
*( ) : change the priority of calculation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the expression takes the @func(expression1, expression2...) format, call the relevant built-in function to return the calculation result. Currently supported built-in functions are (note: these built-in functions are can only be used in the calculation of the most external layer): &lt;br /&gt;
&lt;br /&gt;
*@min(a,b): return the smaller value between a and b&lt;br /&gt;
*@max(a,b): return the greater value between a and b&lt;br /&gt;
&lt;br /&gt;
E.g., in a specific piece of data, [&amp;amp;1+2*3&amp;amp;] will be replaced by 7, [&amp;amp;@max(1+2*3, 8)&amp;amp;] will be replaced by 8, [&amp;amp;@min(1+2*3, 8)&amp;amp;] will be replaced by 7……&lt;br /&gt;
&lt;br /&gt;
'''Please note: for scripts and skill directives in battles, you can use the “[@expression@]” format to embed some expressions to return a decimal result.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Embedded Query Directive in Scenario Event===&lt;br /&gt;
There are many places in the game that support embedded query directives, through which we can insert values or query result of the string type in texts or conditional expressions. All embedded query directives follow the format of [%QUERY:arg1:arg2...%] or [$QUERY:arg1:arg2...$] (these two formats are the same) to insert to the target position.&lt;br /&gt;
&lt;br /&gt;
'''Note: currently you cannot re-embed a query directive in a query.'''&lt;br /&gt;
&lt;br /&gt;
Currently, supported query directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Return the last directive result that can cause “return” in the current event (E.g., an option that stands for “return” of the selection list box, input value and battle result, in the script of scenario events).&lt;br /&gt;
Following are the different meanings of result_code in various directive types. &lt;br /&gt;
&lt;br /&gt;
*It means the option ID when returning from the selection list box.&lt;br /&gt;
*When returning after battles:  0: Battle won; 1: Battle failed.&lt;br /&gt;
*It means the input number when returning for an integer input box.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_num%]&lt;br /&gt;
|Return an integer. (0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_range:A:B%]&lt;br /&gt;
|Return a random number that is greater than A but smaller than B.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the random number that was generated last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|The amount of the player’s money.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_wood%]&lt;br /&gt;
|The amount of the player’s wood.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_iron%]&lt;br /&gt;
|The amount of player’s ironstone.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_jade%]&lt;br /&gt;
|The amount of player’s jade.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_food%]&lt;br /&gt;
|Player’s current Hunger.&lt;br /&gt;
|-&lt;br /&gt;
|[%game_time%]&lt;br /&gt;
|Number of in-game days currently.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_night%]&lt;br /&gt;
|Judge whether it is nighttime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_gametime_daytime%]&lt;br /&gt;
|Judge whether it is daytime now (in-game). If yes, return 1; if no, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%mod_day:MOD%]&lt;br /&gt;
|Number of the in-game day divided by MOD, take the remainder&lt;br /&gt;
|-&lt;br /&gt;
|[%generate_rob_money%]&lt;br /&gt;
|Generate the amount of money when the player is robbed under the current level.&lt;br /&gt;
|-&lt;br /&gt;
|[%rob_money%]&lt;br /&gt;
|Generate the amount of money when the player was robbed last time.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_ts:ID%]&lt;br /&gt;
|Return the current status of a trigger (0: Normal; 1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es:ID%]&lt;br /&gt;
|Return the current status of a scenario event (-1: Not executed; otherwise, return Result Code).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_first_time:ID%]&lt;br /&gt;
|Return the first completion time of a scenario event.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_es_time_score:ID:minTime:maxTime:maxScore%]&lt;br /&gt;
|Return the first completion time score of a scenario event. minTime is the shortest completion time (time before the shortest time brings a full score); maxTime is the longest completion time (time before the longest time brings a zero score); maxScore is the highest score.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val:ID%]&lt;br /&gt;
|Return the custom int value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%int_val_for_calc:ID%]&lt;br /&gt;
|Return the custom int value, whose numbering is its ID, to calculate. There must a result. If the ID does not exist, the result is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%str_val:ID%]&lt;br /&gt;
|Return the custom string value whose numbering is its ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_num%]&lt;br /&gt;
|The current number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%team_max%]&lt;br /&gt;
|Maximum number of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_name:兵种key%]&lt;br /&gt;
|Return the name of a certain minion.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a certain item in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag:tag%]&lt;br /&gt;
|Return the number of an item with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_with_tag_and_level:tag:level%]&lt;br /&gt;
|Return the number of an item, whose item level &amp;gt;= level, with a specific tag in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_qualify_as_present:present_desc%]&lt;br /&gt;
|Return the number of a certain item whose gift description string meets requirements in the player’s bag. For the format of gift description string, please see the “Like” format in the Tag column of “人物列表”(Character Table) (Excel).&lt;br /&gt;
|-&lt;br /&gt;
|[%item_name:物品ID%]&lt;br /&gt;
|Return the displayed name of an item.&lt;br /&gt;
|-&lt;br /&gt;
|[%admin_level%]&lt;br /&gt;
|Return the administration status of the player in the current location (0: None; 1: Appointed; 2: City ruler; 3: Faction leader).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; take a rounding integer number after (current time-ID time)).&lt;br /&gt;
|-&lt;br /&gt;
|[%gametime_elapse_by_day:ID%]&lt;br /&gt;
|Return the amount of period since the setting of last custom time point ID (integer number of the day; (current day- the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current time-ID time) and take the rounding integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_gametime_elapse_by_day%]&lt;br /&gt;
|Return the gametime_elapse of the preset dynamic tag; if there is no such a tag or such an ID, return -1; to gain this result: (current day-the day when the ID is located); this directive is usually used for the event that can only happen once a day.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_custom_cd:ID%]&lt;br /&gt;
|Return the result of whether a custom cooldown (whose numbering is its ID) is ready (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%has_gametime_elapse_tag:ID%]&lt;br /&gt;
|Query whether the custom game time ID mentioned above exists (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%realtime_elapse:ID%]&lt;br /&gt;
|Return the realistic period since the setting of last custom time point ID (count by second).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID%]&lt;br /&gt;
|Return the status of specific mission ID (0: Unclaimed; 1: Ongoing; 2: Unfinished; 3: Ended).&lt;br /&gt;
|-&lt;br /&gt;
|[%qs:ID:index%]&lt;br /&gt;
|Return the subevent value of specific mission ID (index is the subevent’s sequence number starting from 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%get_flag:ID%]&lt;br /&gt;
|Return the current value of a completion mark; return -1 if there is no such a value.&lt;br /&gt;
|-&lt;br /&gt;
|[%camp_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target faction ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%is_player_triggered_encounter%]&lt;br /&gt;
|Check if an encounter chat is started by player manually (0: No; 1: Yes) (if the player is caught up by other units, the value is 0).&lt;br /&gt;
|-&lt;br /&gt;
|[%place_rep:ID%]&lt;br /&gt;
|Return player’s Prestige value of the target location.&lt;br /&gt;
|-&lt;br /&gt;
|[%arg_int_val1%]&lt;br /&gt;
[%arg_int_val2%]&lt;br /&gt;
&lt;br /&gt;
[%arg_int_val3%]&lt;br /&gt;
|Value parameter 1, 2, and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buffs%]&lt;br /&gt;
|Return the number of global BUFFs of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_battle_res%]&lt;br /&gt;
|Return the battle result of last battle (0: Victory; 1: Loss; 2: Retreatment).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_dungeon_res%]&lt;br /&gt;
|Last dungeon result (0: Exited; 1: Passed; 2: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff:ID%]&lt;br /&gt;
|Query whether the current squad has a global BUFF of the target ID. Return 1 if such a BUFF exists.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_buff_c:CLASS%]&lt;br /&gt;
|Query the number of global BUFFs whose type are CLASS of the current squad.&lt;br /&gt;
|-&lt;br /&gt;
|[%g_stat:STAT_FILED%]&lt;br /&gt;
|Return the current value (whose field is STAT_FILED) of the current squad status.&lt;br /&gt;
|-&lt;br /&gt;
|[%has_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return 1; otherwise, return 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%get_KeyValues:ID%]&lt;br /&gt;
|Query KV stored directly. If there is a corresponding KV, return the relevant value; otherwise, return null.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_place_id:CAMP_ID%]:&lt;br /&gt;
|Return the ID of a random location that is controlled by a faction. IF there is no camp_id, return an ID of a location controlled by the player’s faction.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_id%]&lt;br /&gt;
|Return the ID of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_name%]&lt;br /&gt;
|Return the name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_map_name%]&lt;br /&gt;
|Return the map name of the last randomly generated location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products%]&lt;br /&gt;
|Return the Production list of the current location (follow the format of GETITEMS).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_products_name%]&lt;br /&gt;
|Return the Production description of the current location.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_place_has_products%]&lt;br /&gt;
|Check if the current location has production (1: Yes; 0: No).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_items%]&lt;br /&gt;
|Return the item list of the last item selection directive (ITEMS_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles%]&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Return the character list of the last character selection directive (ROLES_SELECTOR) (Note: this method cannot be used in conditional expression groups since the result returned contains “|” when multiple characters are selected; you can use [%last_seled_roles_count%] instead to judge).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[%last_seled_roles_count%]&lt;br /&gt;
|Return the number of selected characters of the last character selection directive (ROLES_SELECTOR).&lt;br /&gt;
|-&lt;br /&gt;
|[%weather:ID%]&lt;br /&gt;
|Query the current value of the specific weather effect (with specific ID) on the current map.&lt;br /&gt;
|-&lt;br /&gt;
|[%monster_news:X:Y%]&lt;br /&gt;
|Query the info of creeps near coordinate (X, Y) on the current map. X and Y will be the default position of the player if left empty.&lt;br /&gt;
|-&lt;br /&gt;
|[%attack_intend_code%]&lt;br /&gt;
|Query the attack intension of units encountered on the current map.&lt;br /&gt;
&lt;br /&gt;
Please see: MuUnitBase.IntendToAttack&lt;br /&gt;
|-&lt;br /&gt;
|[%place_randmom_pos%]&lt;br /&gt;
|Query a random position near a location. Output specific strings. E.g., Sandbox Redstone Keep: 123, 123.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_role_relation%]&lt;br /&gt;
|Relationship between the input parameter and tag character/location.&lt;br /&gt;
|-&lt;br /&gt;
|[%tag_role_with_city_relation%]&lt;br /&gt;
|Relationship between Tag character and input character&lt;br /&gt;
|-&lt;br /&gt;
|[%result_val%]&lt;br /&gt;
|Query the curResultVal value of the current environment variable.&lt;br /&gt;
|-&lt;br /&gt;
|[$player:INFO$]&lt;br /&gt;
[$tagrole:INFO:ID$]&lt;br /&gt;
|Query a specific info field of player/ specific character (tag character) When it is tag character, and ID field does not exist, return the query result of the interactive object. &lt;br /&gt;
INFO can be:  &lt;br /&gt;
&lt;br /&gt;
*id: character ID.&lt;br /&gt;
&lt;br /&gt;
*name: character name.&lt;br /&gt;
&lt;br /&gt;
*level: character level.&lt;br /&gt;
&lt;br /&gt;
*job_type: job types (0: Citizen; 1: Faction member; 2: city ruler; 3: Faction leader).&lt;br /&gt;
&lt;br /&gt;
*campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
*campname: faction name.&lt;br /&gt;
&lt;br /&gt;
*campleaderid: faction leader ID.&lt;br /&gt;
&lt;br /&gt;
*campleadername: faction leader name.&lt;br /&gt;
&lt;br /&gt;
*campleader: nickname of faction leader.&lt;br /&gt;
&lt;br /&gt;
*fame_val: personal prestige.&lt;br /&gt;
&lt;br /&gt;
*maxhp: max hp.&lt;br /&gt;
&lt;br /&gt;
*maxmp: max mana.&lt;br /&gt;
&lt;br /&gt;
*job_cityid: job assignment location ID.&lt;br /&gt;
&lt;br /&gt;
*job_cityname: job assignment location name.&lt;br /&gt;
&lt;br /&gt;
*state: current status (0: Normal; 1: Captured; -1: Dead).&lt;br /&gt;
&lt;br /&gt;
*is_recruitable: recruitable (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*is_leave_team_enable: able to leave squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*recruit_val: current recruitable mark (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*inteam: if the character is in the player’s squad (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
*camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep: player’s prestige in the target faction.&lt;br /&gt;
&lt;br /&gt;
*player_camp_rep_desc: player’s prestige description in the target faction.&lt;br /&gt;
&lt;br /&gt;
*fv: friendliness with the player.&lt;br /&gt;
&lt;br /&gt;
*player_relation_score: assessment on overall favour on the player.&lt;br /&gt;
&lt;br /&gt;
*weapon_tag= (custom tag field): query the specific tag on equipment and weapons. If there is no such a tag or the weapon does not exist, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*skill_level= (skill ID): query the current level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_maxlevel= (skill ID): query the maximum level of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_exp= (skill ID): query the current EXP of the target skill of a character.&lt;br /&gt;
&lt;br /&gt;
*skill_upexp= (skill ID): query the amount of EXP needed for a character’s target skill to level up.&lt;br /&gt;
&lt;br /&gt;
*statu= (custom ID): query the value of the corresponding ID in the Character Attribute Table. If there is no value, return [$null$].&lt;br /&gt;
&lt;br /&gt;
*statu_int= (custom ID): 0 query the int value of the corresponding ID in the Character Attribute Table. If there is no value, return 0.&lt;br /&gt;
&lt;br /&gt;
*has_girl_friend: [player only] check if the player has a girlfriend (1: Yes; 2: No).&lt;br /&gt;
&lt;br /&gt;
*current_girl_friend_name: [player only] girlfriend’s name.&lt;br /&gt;
&lt;br /&gt;
*girl_friend=character ID: [player only] check if someone is a player’s girlfriend.&lt;br /&gt;
&lt;br /&gt;
*is_female: check if someone is a female character (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
*available_quest: available missions.&lt;br /&gt;
|-&lt;br /&gt;
|[$called:call1:call2$]&lt;br /&gt;
|How NPC addresses player (the player’s character is male: call1; female: call2).&lt;br /&gt;
|-&lt;br /&gt;
|[$null$]&lt;br /&gt;
|Replaced by an empty string.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagtype$]&lt;br /&gt;
|Trigger object type of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$trig_tagid$]&lt;br /&gt;
|Trigger object ID of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$input_str$]&lt;br /&gt;
|The input result of the last input box.&lt;br /&gt;
|-&lt;br /&gt;
|[$argvs:INDEX$]&lt;br /&gt;
|Query currently additional parameter info, starting from 0 (used to fill in the parameter of a random event).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagplace:INFO:ID$]&lt;br /&gt;
|Query info of a location; query the current location if the ID field does not exist.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: location ID.&lt;br /&gt;
&lt;br /&gt;
· name: location name.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· mapid: map ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· prosperity: location prosperity. &lt;br /&gt;
&lt;br /&gt;
· defence: location defence &lt;br /&gt;
&lt;br /&gt;
· rep: location friendliness.&lt;br /&gt;
&lt;br /&gt;
· security: location security.&lt;br /&gt;
&lt;br /&gt;
· size: location size.&lt;br /&gt;
&lt;br /&gt;
· lord_id: city ruler ID.&lt;br /&gt;
&lt;br /&gt;
· lord_name: city ruler name.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom field.&lt;br /&gt;
&lt;br /&gt;
· is_stronghold: if this location is a base (a location for troops to the garrison).&lt;br /&gt;
&lt;br /&gt;
· is_weekhold: a resource point that does not allow the garrison.&lt;br /&gt;
&lt;br /&gt;
· is_couldoccupy: if this location can be occupied.&lt;br /&gt;
&lt;br /&gt;
· is_couldraid: if this location can be raided.&lt;br /&gt;
&lt;br /&gt;
· is_inwar: if this location is being attacked.&lt;br /&gt;
&lt;br /&gt;
· is_raided: if this location has been raided (recovering).&lt;br /&gt;
&lt;br /&gt;
· is_subplace: if this place has been occupied. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain a specific status value of the current location.&lt;br /&gt;
&lt;br /&gt;
· building= (specific facility ID): query the number of facilities of a building with specific ID in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction included).&lt;br /&gt;
&lt;br /&gt;
· r_building= (specific facility ID): query the number of facilities of a building with a specific ID (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· r_building_t= (specific facility type): query the number of facilities of a specific type in a location (facilities under construction not included).&lt;br /&gt;
&lt;br /&gt;
· custom_int= (custom field ID): obtain the int value of the custom field of the current location.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally)&lt;br /&gt;
&lt;br /&gt;
· func_map= (specific field KEY): query a field of the corresponding directive event mapping table. E.g., func_map= hire list.&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in where they are currently staying. &lt;br /&gt;
&lt;br /&gt;
· hire_states: query the recruitment status of the current location.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the player’s current position and the target position. If the target is unreachable, return -1.&lt;br /&gt;
&lt;br /&gt;
· project_count: the number of projects under construction. &lt;br /&gt;
&lt;br /&gt;
· project_max: the maximum number of projects under construction currently.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmap:INFO:ID$]&lt;br /&gt;
|Query tile info on a map:&lt;br /&gt;
&lt;br /&gt;
· id: tile id.&lt;br /&gt;
&lt;br /&gt;
· name: tile name.&lt;br /&gt;
&lt;br /&gt;
· dominant_camp: if there is an overall dominating faction, return the name of the faction; otherwise, return null.&lt;br /&gt;
&lt;br /&gt;
· dominant_camps= (custom field ID): if there are only several factions with specific IDs existing, return 1; otherwise, return 0; format of custom field: faction 1#faction 2#faction 3.&lt;br /&gt;
&lt;br /&gt;
· camp_place_count= faction ID: return the number of bases owned by a specific faction on this tile.&lt;br /&gt;
&lt;br /&gt;
· ExploreInfo= Info ID: query the value of an exploration map info.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbuilding:INFO$]&lt;br /&gt;
|Query info of the current target building&lt;br /&gt;
&lt;br /&gt;
· id: building ID.&lt;br /&gt;
&lt;br /&gt;
· name: name.&lt;br /&gt;
&lt;br /&gt;
· inner_id: built-in location ID of the target building.&lt;br /&gt;
&lt;br /&gt;
· type: building type.&lt;br /&gt;
&lt;br /&gt;
· level: building level.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return value of a specific custom filed.&lt;br /&gt;
&lt;br /&gt;
· container_id: scenario ID of the container bound to this building.&lt;br /&gt;
&lt;br /&gt;
· container_info: info ID of the container bound to this building.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagwb:INFO$]&lt;br /&gt;
|Query the info of current skirmish.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: battle ID.&lt;br /&gt;
&lt;br /&gt;
· camp_a: faction ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· camp_b: faction ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· leader_a: leader ID of squad A.&lt;br /&gt;
&lt;br /&gt;
· leader_b: leader ID of squad B.&lt;br /&gt;
&lt;br /&gt;
· camp_a_rl: the relationship between squad A and the player’s faction &lt;br /&gt;
&lt;br /&gt;
· camp_b_rl: the relationship between squad B and the player’s faction.&lt;br /&gt;
&lt;br /&gt;
· teamname_a: faction name and hero names of squad A.&lt;br /&gt;
&lt;br /&gt;
· teamname_b: faction name and hero names of squad B.&lt;br /&gt;
&lt;br /&gt;
· seige_time: current siege preparation time (if it is a siege battle) (count by day).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagteam:INFO(:QUERY_INFO)$]&lt;br /&gt;
[$playerteam:INFO$]&lt;br /&gt;
|Query info of the current encountered team (tagteam)/player’s team (playerteam).&lt;br /&gt;
&lt;br /&gt;
When querying tag team, you can choose a specific query parameter. If this parameter is set, only info of the query target will be returned.&lt;br /&gt;
&lt;br /&gt;
INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: squad ID.&lt;br /&gt;
&lt;br /&gt;
· is_active: check if the current squad status is normal; return 1 if it is normal.&lt;br /&gt;
&lt;br /&gt;
· campid: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· state_num: StateNum value of the current squad.&lt;br /&gt;
&lt;br /&gt;
· from_id: ID of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· from_name: name of the location where the squad is from.&lt;br /&gt;
&lt;br /&gt;
· lifetime: period since the squad is established (day).&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between the target faction and character faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· max_attr_lv=attribute field ID: the highest value of a certain attribute of all characters in the squad.&lt;br /&gt;
&lt;br /&gt;
· exist_role= character ID: check if there is a specific character ID in the squad (1: Yes; 0: No).&lt;br /&gt;
&lt;br /&gt;
· role_vacancy: available hero slots in squad.&lt;br /&gt;
&lt;br /&gt;
· soldier_vacancy: available minion slot in the squad.&lt;br /&gt;
&lt;br /&gt;
· map_info: current map info.&lt;br /&gt;
&lt;br /&gt;
· tag: return the TAG of the squad. &lt;br /&gt;
&lt;br /&gt;
· is_defeated: check if the squad is dismissed because they are defeated (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· defeated_by: ID of the faction which defeated the squad.&lt;br /&gt;
&lt;br /&gt;
QUERY_INFOformat: [query type]=[query target] E.g.,: leader=ROLE_ID.&lt;br /&gt;
&lt;br /&gt;
Currently, supported query types are:&lt;br /&gt;
&lt;br /&gt;
· bind_id: bound info ID. When the squad type is creep or dummy, the ID is the creep/dummy ID; otherwise, it is the leader ID.&lt;br /&gt;
&lt;br /&gt;
· leader: squad leader ID.&lt;br /&gt;
&lt;br /&gt;
· tag: TAG mark of the squad (used for squad created by the CREATE_TEAM directive).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcamp:INFO:ID$]&lt;br /&gt;
|Query info of the target faction. When the ID does not exist, query info of the current faction. INFO can be:&lt;br /&gt;
&lt;br /&gt;
· id: faction ID.&lt;br /&gt;
&lt;br /&gt;
· campname: faction name.&lt;br /&gt;
&lt;br /&gt;
· leaderid: ruler ID.&lt;br /&gt;
&lt;br /&gt;
· leadercalled: nickname of faction ruler. &lt;br /&gt;
&lt;br /&gt;
· lands_count: number of bases of the current faction.&lt;br /&gt;
&lt;br /&gt;
· camp_rl: the relationship between target faction and player’s faction (0: Neutral; 1: At war; 2: Alliance; 3: Ally).&lt;br /&gt;
&lt;br /&gt;
· camp_rl_value: the actual number of favour between the target faction and player’s faction. &lt;br /&gt;
&lt;br /&gt;
· stat= (status field ID): obtain the specific status value of the current faction.&lt;br /&gt;
&lt;br /&gt;
· buff= (Target BUFF ID): query if a specific BUFF of the current faction exists (1: Yes).&lt;br /&gt;
&lt;br /&gt;
· buff_c= (BUFF type): query the number of BUFFs of specific types of the current faction.&lt;br /&gt;
&lt;br /&gt;
· active_state: project status of target faction (0: Inactive; 1: Active).&lt;br /&gt;
&lt;br /&gt;
· is_story_camp: if this is a scenario faction (0: No; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
· player_rep: player’s prestige in this faction. &lt;br /&gt;
&lt;br /&gt;
· attitude: faction’s attitude towards the player (0: Normal; -1: Wanted; -2: At war).&lt;br /&gt;
&lt;br /&gt;
· is_fall: if a faction is eliminated (0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzar:INFO$]&lt;br /&gt;
|Query current bazaar info imported by the system.&lt;br /&gt;
&lt;br /&gt;
· start_day: number of days of the beginning of the bazaar.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagbazzarItem:INFO:bazzarID:merchantID$]&lt;br /&gt;
|Query info of items bought/sold by a merchant in a bazaar.&lt;br /&gt;
&lt;br /&gt;
· item_desc: item description (detailed).&lt;br /&gt;
&lt;br /&gt;
· item_desc_short: item description (simple).&lt;br /&gt;
&lt;br /&gt;
· item_buy_price: buy-in price of the item. &lt;br /&gt;
&lt;br /&gt;
· item_sell_price: sell-out price of the item. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproduct:INFO:ID$]&lt;br /&gt;
|Query info of a speciality. Query info of the current speciality if the ID is left empty.&lt;br /&gt;
&lt;br /&gt;
· item_name: item name. &lt;br /&gt;
&lt;br /&gt;
· item_id: item id.&lt;br /&gt;
&lt;br /&gt;
· item_level: item level.&lt;br /&gt;
&lt;br /&gt;
· item_price: single fair value of the item.&lt;br /&gt;
&lt;br /&gt;
· player_dist: the distance between the central position of the speciality and the current position of the player (-1: the central position is unreachable). &lt;br /&gt;
&lt;br /&gt;
· place_include=location ID: when the item is not sold in the specific location, return 0; if it is being sold, return 1. &lt;br /&gt;
&lt;br /&gt;
· place_include_tagQuestPlace: automatically use the currently imported info of mission location.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagquest:INFO:ID$]&lt;br /&gt;
|Query Mission Info&lt;br /&gt;
&lt;br /&gt;
status: 0: Unclaimed; 1: Ongoing; 2: Completed; 3:Time limit exceeded (receive punishment); 4: Time limit exceeded (wait to claim rewards automatically) 5: 已Ended.&lt;br /&gt;
|-&lt;br /&gt;
|[$arg_str_val1$]&lt;br /&gt;
[$arg_str_val2$]&lt;br /&gt;
&lt;br /&gt;
[$arg_str_val3$]&lt;br /&gt;
|String parameters 1, 2 and 3 of the current event.&lt;br /&gt;
|-&lt;br /&gt;
|[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$]&lt;br /&gt;
|Enumerate numbers randomly and return a RES value according to the probability distribution. E.g., [%rnd_enum:25,A:40,B:35,C%] means there is a 25% chance to return “A”, 40% to return “B” and 35% to return “C”.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagitem:INFO$]&lt;br /&gt;
|Query info of the current item. INFO can be: &lt;br /&gt;
&lt;br /&gt;
· id: item ID.&lt;br /&gt;
&lt;br /&gt;
· name: item name.&lt;br /&gt;
&lt;br /&gt;
· count: item number.&lt;br /&gt;
&lt;br /&gt;
· group_n: maximum number of stacks.&lt;br /&gt;
&lt;br /&gt;
· quality: item quality.&lt;br /&gt;
&lt;br /&gt;
· level: item level.&lt;br /&gt;
&lt;br /&gt;
· main_type:  main item type.&lt;br /&gt;
&lt;br /&gt;
· sub_type: item sub-type.&lt;br /&gt;
&lt;br /&gt;
· equip_type: equipment type.&lt;br /&gt;
&lt;br /&gt;
· gendays:  period (day) since the production date.&lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific custom filed. &lt;br /&gt;
|-&lt;br /&gt;
|[$tagproject:INFO:ID$]&lt;br /&gt;
|Query project info. Read from the specific ID of SET_TEMP_ID if the ID field is left empty.&lt;br /&gt;
&lt;br /&gt;
· id: project id.&lt;br /&gt;
&lt;br /&gt;
· state: project status (works only in group events) (0: Not started; 1: Ongoing; 2: Completed).&lt;br /&gt;
&lt;br /&gt;
· showPlaceName: project location description.&lt;br /&gt;
&lt;br /&gt;
· showProjectName: project name.&lt;br /&gt;
&lt;br /&gt;
· roles: all characters involved in the current project.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagunit:INFO$]&lt;br /&gt;
|Query info of the current target minion.&lt;br /&gt;
&lt;br /&gt;
· id: unit id.&lt;br /&gt;
&lt;br /&gt;
· name: unit name.&lt;br /&gt;
&lt;br /&gt;
· level: unit level.&lt;br /&gt;
&lt;br /&gt;
· statu= (custom ID): query the value of the corresponding ID in the Unit Attribute table.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagcard:INFO$]&lt;br /&gt;
|Query info of a specific card.&lt;br /&gt;
&lt;br /&gt;
· id: bound id of the card.&lt;br /&gt;
&lt;br /&gt;
· name: displayed name of the card.&lt;br /&gt;
&lt;br /&gt;
· lv: card level.&lt;br /&gt;
&lt;br /&gt;
· recruit_name: displayed name with recruitment info of the card. &lt;br /&gt;
&lt;br /&gt;
· tag= (KEY of custom expansion field): return the value of a specific Tag field of the card.&lt;br /&gt;
&lt;br /&gt;
· has_tag= (KEY of custom expansion field): query if there is a particular Tag field of card (1: Yes; 0: No).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[$save_version$]&lt;br /&gt;
|Return the version number of when the current game save is created.&lt;br /&gt;
|-&lt;br /&gt;
|[$version_compare:TAG_VERSION$]&lt;br /&gt;
|Compare the version number of when the current game save is created with TAG_VERSION; if the former version is higher than TAG_VERSION, return 1; when equal, return 0; when lower, return -1.&lt;br /&gt;
|-&lt;br /&gt;
|[$tagmsg:INFO$]&lt;br /&gt;
|Query info of the current interactive messages.&lt;br /&gt;
&lt;br /&gt;
· title: title&lt;br /&gt;
&lt;br /&gt;
· content: message content&lt;br /&gt;
&lt;br /&gt;
· arg=(field KEY): query the parameter of the KEY in the custom parameter table&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下查询需要游戏版本高于0.7.4.1&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_str:KEY$]&lt;br /&gt;
|Return the string value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[$lua_int:KEY$]&lt;br /&gt;
|Return the int value defined in the GetLuaStringVal port in the core logic script (KEY is the query parameter).&lt;br /&gt;
|-&lt;br /&gt;
|[%envoy_enable%]&lt;br /&gt;
|Return the status of whether the envoy of the player’s faction is available.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Directive Field of Global Save Query===&lt;br /&gt;
These are used to query some directives in the global save.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%global_int:ID%]&lt;br /&gt;
|Return the value of global int field ID　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|[$global_str:ID$]&lt;br /&gt;
|Return the value of global string field ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Built-in Global Variable Field===&lt;br /&gt;
&lt;br /&gt;
Following are key fields of a built-in global variable: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Filed KEY'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|save_max_hard_level&lt;br /&gt;
|The greatest difficulty has been unlocked. Set to be 0 by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Built-in Custom Variable Field===&lt;br /&gt;
&lt;br /&gt;
You can use directives like SETINTVAR and CHANGEINTVAR to change and save the built-in custom variable of the system. Different variables have a different function.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|system_探索地图点数&lt;br /&gt;
|Morale.　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　&lt;br /&gt;
|-&lt;br /&gt;
|system_星星&lt;br /&gt;
|The number of stars.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色血量百分比&lt;br /&gt;
|When the player is fighting an enemy the extra hp multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|system_敌方角色攻击百分比&lt;br /&gt;
|When the player is fighting an enemy, the extra physical/magic attack multiplier of the enemy.&lt;br /&gt;
|-&lt;br /&gt;
|config_ai_level&lt;br /&gt;
|The intensity level of AI (0: Easy; 1: Normal; 2: Difficult).&lt;br /&gt;
|-&lt;br /&gt;
|config_roll_limit&lt;br /&gt;
|Enable Roll Limit in battles 0: Disabled; 1: Enabled (By enabling the Roll Limit, there will be a CD and limit of rolling times).&lt;br /&gt;
|-&lt;br /&gt;
|config_hunger_penalty&lt;br /&gt;
|Enable Hunger Debuff 0: Disabled 1: Enabled (By enabling the Hunger Debuff, the movement of the player’s squad will be influenced when in hunger).&lt;br /&gt;
|-&lt;br /&gt;
|config_upgrade_cost_reduce&lt;br /&gt;
|EXP and materials needed to upgrade the current unit after discount (0~100 percentage; set to be 0 by default).&lt;br /&gt;
|-&lt;br /&gt;
|config_soldier_dead_scale&lt;br /&gt;
|A multiplier of death probability of the current minion (percentage; set to be 100 by default, final death probability = basic death probability *(config_soldier_dead_scale/100)).&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following directives are suitable for 0.7.3.1 or above version.'''&lt;br /&gt;
|-&lt;br /&gt;
|config_project_concurrent&lt;br /&gt;
|Maximum cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
===Built-in Field in Initial Setting Table===&lt;br /&gt;
&lt;br /&gt;
In the initial setting table, we can configure some initial fields that have actual functions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''KEY Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|'''Default Value'''&lt;br /&gt;
|-&lt;br /&gt;
|init_pos&lt;br /&gt;
|Default info of respawning location.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_statu&lt;br /&gt;
|Default attribute status info when the player respawns.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_money&lt;br /&gt;
|Default initial property.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|home_place&lt;br /&gt;
|Default initial location ID.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skillpages&lt;br /&gt;
|Initially enabled skill page (format: see SET_SKILLPAGE directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_skills&lt;br /&gt;
|Initial skill page of the player (format: see GETSKILL directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_equip&lt;br /&gt;
|Initial equipment list info of the player.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|init_camp_rl&lt;br /&gt;
|Initial faction relationship list. Format:&lt;br /&gt;
&lt;br /&gt;
Faction A, faction B, relationship, friendliness (-100~100)| faction A, faction C, relationship, friendliness(-100~100)|...|faction N, faction N, relationship, friendliness(-100~100).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unchanged_diplomatic_relationship&lt;br /&gt;
|Unable to change the relationships between factions dynamically? (0: Yes; 1: No).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|gametime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second).&lt;br /&gt;
|0.01&lt;br /&gt;
|-&lt;br /&gt;
|battletime_scale&lt;br /&gt;
|When the player is on the world map, the scale coefficient of in-game time (in-game day/second), when this coefficient is 0, the time in skirmish or siege battles will stop.&lt;br /&gt;
|0.005&lt;br /&gt;
|-&lt;br /&gt;
|no_card_auto_supply&lt;br /&gt;
|Card durability cannot restore automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|drop_card_when_no_durability&lt;br /&gt;
|When card durability becomes 0 in this mode, the card will disappear.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|enable_card_upgrade&lt;br /&gt;
|Enable card upgrading.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|equipment_loss_durability&lt;br /&gt;
|The equipment has durability.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|levelup_exp_scale&lt;br /&gt;
|Level up EXP multiplier.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|seige_time&lt;br /&gt;
|Basic preparation time for siege battle (day). Preparation time = basic time + Weapons degree* coefficient of extra time per Weapons degree (the siege_time_per_armvalue feild).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|siege_time_per_armvalue&lt;br /&gt;
|The coefficient of extra time per weapon degree when preparing for a siege battle.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|project_time_scale&lt;br /&gt;
|The proportion of project time. &amp;lt;1: shorten time; &amp;gt;1: extend time.&lt;br /&gt;
|0.99&lt;br /&gt;
|-&lt;br /&gt;
|dailyIncomeScale&lt;br /&gt;
|The multiplier of daily city resource income.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|recruit_cost_scale&lt;br /&gt;
|The multiplier of the cost of recruitment/supply/upgrade/chest opening.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|building_cost_scale&lt;br /&gt;
|The multiplier of the cost of building construction/other projects.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|custom_intval_watcher&lt;br /&gt;
|Default custom variable field of the monitor (same as the ADD_INTVAL_WATCHER directive).&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|show_star_info&lt;br /&gt;
|Show prestige (star).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_add_exp_per_period&lt;br /&gt;
|Cardinal number of daily AI soldier (units from other factions) EXP increase.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|team_role_count_base&lt;br /&gt;
|The basic number of character slot each squad.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
|team_role_max&lt;br /&gt;
|Maximum number of character slot each squad.&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|team_card_count_base&lt;br /&gt;
|The basic number of minion slot each squad.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|team_card_max&lt;br /&gt;
|Maximum number of minion slot each squad.&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_resource_scale&lt;br /&gt;
|Resource multiplier of AI recruitment.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_build_resource_scale&lt;br /&gt;
|Resource multiplier of AI construction.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_upgrade_resource_scale&lt;br /&gt;
|Resource multiplier of AI minion upgrading.&lt;br /&gt;
|1.0&lt;br /&gt;
|-&lt;br /&gt;
|ai_highlevel_upgrade_average_days&lt;br /&gt;
|AI simulation of upgrading minions when the player’s level is high (expected number of days).&lt;br /&gt;
&lt;br /&gt;
The higher this value is, the slower AI upgrades a type of minion.&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ai_auto_balance_resource&lt;br /&gt;
|If AI will balance each kind of resources automatically.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_invade_prob&lt;br /&gt;
|Coefficient of AI invasion probability (0~1) The closer to 1, the more likely AI will invade.&lt;br /&gt;
|0.8&lt;br /&gt;
|-&lt;br /&gt;
|invasion_destroy_factor&lt;br /&gt;
|Destruction rate after invasion or occupation. Format:&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 1: probability 1.&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility 2: probability 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Number of destroyed facility N: probability N.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
1:50&lt;br /&gt;
&lt;br /&gt;
2:30&lt;br /&gt;
&lt;br /&gt;
3:10&lt;br /&gt;
&lt;br /&gt;
4:5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|monster_move_speed_random&lt;br /&gt;
|Correction range of random creep movement speed of creep emitter (0.75 at most).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|soldier_battle_killed_prob&lt;br /&gt;
|The basic casualty of the soldiers. The probability of soldiers being poorly wounded after losing a battle.&lt;br /&gt;
|0.2&lt;br /&gt;
|-&lt;br /&gt;
|ai_soldier_battle_killed_prob&lt;br /&gt;
|Death probability of AI troops after losing a battle.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|ai_recruit_hero_free&lt;br /&gt;
|AI recruits heroes for free&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed&lt;br /&gt;
|Basic movement speed of squads.&lt;br /&gt;
|240&lt;br /&gt;
|-&lt;br /&gt;
|monster_min_movespeed&lt;br /&gt;
|Minimum movement speed of creeps.&lt;br /&gt;
|150&lt;br /&gt;
|-&lt;br /&gt;
|caravan_move_speed_range&lt;br /&gt;
|Range of movement speed of Caravans. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|farmers_move_speed_range&lt;br /&gt;
|Range of movement speed of farmers. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|army_base_move_speed_range&lt;br /&gt;
|Range of movement speed of troops. Format: min speed, max speed.&lt;br /&gt;
|100,100&lt;br /&gt;
|-&lt;br /&gt;
|global_move_speed_range&lt;br /&gt;
|Range of global movement speed. Format: min speed, max speed. &lt;br /&gt;
&lt;br /&gt;
This value influences all movable units on all maps.&lt;br /&gt;
|20,400&lt;br /&gt;
|-&lt;br /&gt;
|battle_gain_money_scale&lt;br /&gt;
|Scale coefficient of obtaining money in battles.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment&lt;br /&gt;
|If NPC will drop weapons (0: No; 1: Yes).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|npc_drop_equipment_prob&lt;br /&gt;
|Probability of NPC dropping weapon.&lt;br /&gt;
|0.15&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_soldier&lt;br /&gt;
|Probability of each group of soldiers dropping food.&lt;br /&gt;
|0.1&lt;br /&gt;
|-&lt;br /&gt;
|loot_food_each_hero&lt;br /&gt;
|Probability of each hero dropping food.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|hungry_fail_days&lt;br /&gt;
|Failed after being hungry for a certain number of days.&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.2.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|ai_dailyfight_period&lt;br /&gt;
|The period between each AI compulsory invasion checks &amp;lt;=0: Disable the check (this logic is different from default AI invasion check；the default parameter (in-game day) is 5 before version 0.7.2.1) In addition, this check will be influenced by AI intensity from this version.&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ai_active_level_default&lt;br /&gt;
|Default AI intensity level, which influences the default value of the custom filed of config_ai_level.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_roll_limit&lt;br /&gt;
|Whether to enable Roll Limit by default. This influences the default value of the custom field of config_roll_limit.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_config_hunger_penalty&lt;br /&gt;
|Whether to enable Hunger Debuff. This influences the default value of the custom field of config_hunger_penalty.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_seige_battlemap&lt;br /&gt;
|Default map ID of siege battle.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.3.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|init_inventory_capicity&lt;br /&gt;
|Default cardinal number of initial bag capacity.&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|def_project_concurrent&lt;br /&gt;
|Default cardinal number of concurrent construction of projects in the current location.&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.7.4.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_wanted_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “Wanted” of a faction (when player’s prestige is lower than “Wanted” but has not reached the “At War” status, the player will not be attacked by squads of this faction in the wild, but they will not be allowed to enter certain cities).&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|camp_rep_war_val&lt;br /&gt;
|Player’s prestige reaches the threshold of “At War” of a faction (when player’s prestige is lower than the point, the player will be attacked in the wild by squads of this faction).&lt;br /&gt;
| -10&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |'''The following directives are suitable for version higher than 0.8.0.1'''&lt;br /&gt;
|-&lt;br /&gt;
|dg_levelup_skill&lt;br /&gt;
|Skill ID of level-up special effect in battles.&lt;br /&gt;
|升级特效&lt;br /&gt;
|-&lt;br /&gt;
|init_items&lt;br /&gt;
|Initial item list.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|def_dropitem_model&lt;br /&gt;
|Model and special effect info of items dropped in battles (Format: world map unit model#special effect info).&lt;br /&gt;
|chest1#psChestFlash1,0,0&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}Besides specific initial fields above, there are some UI-resetting fields, starting with “gui”, in the initial set list, which are used to do a custom reset on certain built-in UI in the game. For more details, please see instruction on game interface reset. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Codes of Text Color in Common UI===&lt;br /&gt;
In dialogues, text boxes or other common UI, we can follow certain formats to change the colours of texts.&lt;br /&gt;
&lt;br /&gt;
E.g., This is a imp:red font text, red:red font text, &amp;amp;ff6699ff:custom color text font.&lt;br /&gt;
&lt;br /&gt;
Currently, we support preset colours for the following types (to use custom colours, replace “#” with “&amp;amp;” ).&lt;br /&gt;
&lt;br /&gt;
*place: unified colour for the location name.&lt;br /&gt;
*role: unified colour for the character name.&lt;br /&gt;
*camp: unified colour for faction name.&lt;br /&gt;
*item: unified colour for item name.&lt;br /&gt;
*imp: unified colour for an important message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Format of Character Position Directive===&lt;br /&gt;
Format: position code:position parameter.&lt;br /&gt;
&lt;br /&gt;
Supported position codes are: 0: Unallocated; 1: In position; 2: In squad; 3: In a project.&lt;br /&gt;
&lt;br /&gt;
*when the code is 1: Format:  1: location ID, facility ID (if the facility ID is empty, it means the character is outside the facility).&lt;br /&gt;
*when the code is 2: Format:  2: squad ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of In-game Global Position Directive===&lt;br /&gt;
When assigning the position for a squad or object on the world map, we can follow a format of globally position assignment (e.g., the TELEPORT directive).&lt;br /&gt;
&lt;br /&gt;
Format of global position:   &lt;br /&gt;
 Map ID:coordinate X,coordinate Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Unit-Limitation Directive in Specific Battles===&lt;br /&gt;
In a specific battle table, you can fill in a directive of the following types in the “Limit” column, to execute unit or special restrictions. &lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Directive 1:parameter 1;directive 2:parameter 2;...directive N:parameter N;&lt;br /&gt;
Currently supported types of limitation directives are: &lt;br /&gt;
&lt;br /&gt;
*player: reset squad hero list. Format: character ID1,reset level (-1 or left empty: Do not reset)|. character ID2,reset level| character ID3, reset level|...| character ID N,reset level.&lt;br /&gt;
*units: reset squad minion list. Format: same as the common minion list.&lt;br /&gt;
*add_stat: additional character attribute status. Format: target character ID#status list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Directive List of Unit Control on the World Map===&lt;br /&gt;
World map unit (squad) control directives are methods used to manage the action order of world map units. When a unit has specific control directive list, it will execute every directive in sequence until the execution is finished. After the game is saved halfway of the execution of the directives and the player exits the game, the execution will continue when the save is loaded.&lt;br /&gt;
&lt;br /&gt;
Please note: after the execution of all directives of a squad, the squad will be dismissed. Dummies (creeps and dummies needed for stories included) are an exception.&lt;br /&gt;
&lt;br /&gt;
Control directive consists of int-number directives and directive content, separated by “;”. Directive of each line starts with a directive-type code and “+”, followed by a directive parameter. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 1,test map:100,100;1,test map:100,200;99,0&lt;br /&gt;
The code above means that the squad will move to coordinate 1 (100,100) first, and then to coordinate 2 (100,200). Finally, the squad will be dismissed.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive-type codes are: &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Control Directive Code'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Move towards a coordinate on the world map. The parameter is the target coordinate (coordinate format: map ID: coordinate X, coordinate Y).&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Stay where you are. The parameter is the time of staying (count by in-game day).&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Enter a location. The parameter is the target location ID.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Attack the target location. The parameter is the target location ID. (invasion type: 0: Occupy; 1: Raid).&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Stay in the target location. The parameter is the target location ID, time of staying.&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Execute an event. The parameter is the event ID.&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Change the current StateNum value. The parameter is the new StateNum value.&lt;br /&gt;
&lt;br /&gt;
Note: StateNum can be used to mark the current status of some controlled squad. E.g., you can command a unit to a specific location on the map and execute an action. Before the unit reaches the destination, StateNum is 0; after its arrival, StateNum becomes 1. By doing so, we get to know the current status of a squad.&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|Execute custom movement directives permanently. (For directive format, see [[Common Scenario Directives#.E5.8D.95.E4.BD.8D.E9.98.9F.E4.BC.8D.E9.BB.98.E8.AE.A4.E8.BF.90.E5.8A.A8.E6.8C.87.E4.BB.A4.E6.A0.BC.E5.BC.8F|Format of Default Movement Directive of Unit Squad]]).&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|Join a Warband. The parameter is the Warband ID (built-in method of the system. We do not suggest calling this).&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|Execute an action. Parameter format: action ID, loop times (-1: Endless; &amp;gt;=1: Limited times; set 1 when the action itself is a looping animation), single-action time (count by second; execute the next directive when the action finishes looping, if it does not loop permanently), object(0: All units by default; 1: Leader only; 2: All followers), initial frame range (0~1; 1: the last frame of the animation; -1: a random number between 0 and 1), whether to execute the next directive after playing the animation (0: No by default; 1: Yes).&lt;br /&gt;
&lt;br /&gt;
Supported default action list of models:&lt;br /&gt;
&lt;br /&gt;
· Loop action: standby, move, walk slowly, charge, recharging.&lt;br /&gt;
&lt;br /&gt;
· Single action: being hit, evade, block, attack, shoot, horizontal. slash, vertical slash, release, roar, knock up, jump, celebrate, die.&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|Open a chest. The parameter ID is the chest ID.&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|Execute a TimeLine action. Format: TimeLineID, duration (set -1 by default, permanent; &amp;gt;0: Action ends after the time set).&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Change the attitude of the current squad towards the player (0: Neutral; 1: Hostile).&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|Change the current movement speed of the current squad. The parameter is the target movement speed.&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|Trade succeeded. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|Trade with a merchant. The parameter is the location ID of the trade.&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|Follow a squad target. The parameter is the control ID of the target being followed.&lt;br /&gt;
|-&lt;br /&gt;
|99&lt;br /&gt;
|Dismiss the current squad.&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Default Movement Directive of Unit Squad===&lt;br /&gt;
Dummies, creeps and squads on the world map will change their movement modes based on the default way of moving or the changes of scripts. After choosing a movement mode, units will perform default actions according to the directive.&lt;br /&gt;
&lt;br /&gt;
Format of unit movement directive: &lt;br /&gt;
 Movement mode,parameter 1[,parameter 2,...,parameter N]&lt;br /&gt;
Currently supported movement modes and the formats of the parameter are: &lt;br /&gt;
&lt;br /&gt;
*Wander within range: WANDER, movement radius,[central coordinate X, central coordinate Y](the current position is the centre if the central coordinate is not assigned).&lt;br /&gt;
*Patrol: PATROL, coordinate 1X, coordinate 1Y, coordinate 2X, coordinate 2Y,..., coordinate NX, coordinate NY(when the first coordinate is the same as the final coordinate, the patrol movement loops in a circle; otherwise, the patrolling movement goes back and forth).&lt;br /&gt;
*Others: Stay still.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item List Info===&lt;br /&gt;
The item list info is one of the most common info formats. We use this format in the directives of obtaining various items (GETITEMS, etc.) and configuration tables.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Item code 1,number 1[,detailed info list]|item code 2,number 2[,detailed info list]|....|item code N,number N[,detailed info list].&lt;br /&gt;
The format of the detailed info list is the dictionary list of &amp;quot;key1=val1,key2=val2,...&amp;quot;. Following fields are supported: &lt;br /&gt;
&lt;br /&gt;
*[mf] auto-match the created affixes: mf=lowest quality; N-highest quality; N[-additional cardinal number of variable value]. E.g., Longsword,1,mf=0-3  Explanation: the “mf” field helps the current weapon to automatically match a quality (0~3) affix (0 means no affix).&lt;br /&gt;
&lt;br /&gt;
*[cw] create custom affix: cw= affix ID+ additional cardinal number of variable value (0-100). E.g., Longsword,1,cw=Lifesteal Sword+50 Explanation: the variable value of items with the affix of Lifesteal Sword, is between 50 and 100.&lt;br /&gt;
&lt;br /&gt;
*[w] assign the affix details of items: w=affix ID$ [variable code array]&lt;br /&gt;
*[qv] assign the variable array of item attribute: qv= variable code array&lt;br /&gt;
*[p] assign the buy-in price of items: p= buy-in price&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variable code array consists of two columns of 2-dimensional arrays. Column 1 is enumerated numbers, and column 2 is quality numbers (0~100). The two columns are connected by “/”. If a affix has 3 parts, then its variable array might be: 0/50/0/100/0/100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Weather Effect Info===&lt;br /&gt;
When using directives to control weathers, we mainly use directives to control a list weathers, which is separated by “|”. &lt;br /&gt;
&lt;br /&gt;
Format of weather effects description: &lt;br /&gt;
 Weather effect ID1, intensity|weather effect ID2,intensity|...weather effect IDN,intensity&lt;br /&gt;
Currently, supported weather effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*雨（Rain）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
&lt;br /&gt;
*雪（Snow）: Disabled when the intensity is 0; 1~50: Normal; 50~100: Heavy.&lt;br /&gt;
*风沙（Sandy）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雷电（Thunder）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*雾（Fog）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*黑暗（Darkness）: Disabled when the intensity is 0 (1~100).&lt;br /&gt;
*炎热（Hot）: Disabled when the intensity is 0 (1~100) (Heat Distortion Effect).&lt;br /&gt;
*云（Cloudy）: Disabled when the intensity is 0 (1~100) (shadows of cloud in clear days).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of weather effect field in map editor or config tables: &lt;br /&gt;
 Probability 1,duration 1:[weather effect description 1]; Probability 2,duration 2:[weather effect description 2]; Probability 3,duration 3:[weather effect description 3];[...]; Probability N,duration N:[weather effect description N]&lt;br /&gt;
E.g., 30,1:;50,3:雨,20|雾,10;20,5:风沙,30&lt;br /&gt;
&lt;br /&gt;
The above code means there is a 30% chance of not having any weather effect for a whole day, 50% chance of raining for 3 consecutive days, and 20% chance of having 5 consecutive sandy days.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format of Camera Filter Effect Info===&lt;br /&gt;
We can use directives like SET_CAMERA_FILTER to set the camera filter of the current game.&lt;br /&gt;
&lt;br /&gt;
Format: &lt;br /&gt;
 Filter effect ID1,intensity|filter effect ID2,intensity|...filter effect IDN,intensity&lt;br /&gt;
Currently, supported filter effect IDs are: &lt;br /&gt;
&lt;br /&gt;
*暗角 (Vignetting): Disabled when the intensity is 0 (0~100). The degree of darkness of camera’s corners.&lt;br /&gt;
*黑白 (Black&amp;amp;white): Disabled when the intensity is 0 (0~100). The black-and-white version of the camera.&lt;br /&gt;
*老旧 (Classic): Disabled when the intensity is 0 (0~100). The yellowing classic style of camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction List===&lt;br /&gt;
The following are the character TAGs used in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|LIKE&lt;br /&gt;
|Mark the type of items a specific character likes, which affects the increased speed of favour.&lt;br /&gt;
&lt;br /&gt;
Format: LIKE:type 1|type 2|...&lt;br /&gt;
|-&lt;br /&gt;
|DEF_WEAPON_SPEED&lt;br /&gt;
|Default weapon speed. Characters with this tag will take this speed as the default weapon speed even if they do not have a weapon.&lt;br /&gt;
|-&lt;br /&gt;
|FVChangeUnit&lt;br /&gt;
|Change the coefficient of character’s favour via sending gifts. Set to be the default value without this field.&lt;br /&gt;
|-&lt;br /&gt;
|dg_skill&lt;br /&gt;
|Replace the dungeon skill of this character.&lt;br /&gt;
|-&lt;br /&gt;
|attached_script&lt;br /&gt;
|ID of script event mounted on characters in battles.&lt;br /&gt;
|-&lt;br /&gt;
|loot_list&lt;br /&gt;
|The dropping list of this character in dungeon battles (can use the“EXP” item IDs as a specific source of EXP).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Location List===&lt;br /&gt;
The following is a TAG list of locations with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|Show minimap&lt;br /&gt;
|City maps are shown by default. If there are other places that need to be shown by default, this tag must be 1.&lt;br /&gt;
|-&lt;br /&gt;
|Do not show minimap&lt;br /&gt;
|It is what the field means.&lt;br /&gt;
|-&lt;br /&gt;
|Disable AI invasion&lt;br /&gt;
|Bases with this tag will not invade, patrol or occupy resources automatically.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TAGs with Special Meanings in Faction Table===&lt;br /&gt;
The following is a TAG list of factions with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|NO_CHANGE_DIP&lt;br /&gt;
|Will not be affected by dynamic diplomatic relations in the game, unless you use script directives to change directly.&lt;br /&gt;
|-&lt;br /&gt;
|UNFAILED&lt;br /&gt;
|This faction cannot be eliminated in a usual way.&lt;br /&gt;
|-&lt;br /&gt;
|EMBARGO&lt;br /&gt;
|Cities occupied by this faction will not send out caravans or trade with other cities.&lt;br /&gt;
|-&lt;br /&gt;
|NO_FARMER&lt;br /&gt;
|There will not be farmer migration in cities occupied by this faction.&lt;br /&gt;
|-&lt;br /&gt;
|CAMP_COLOR&lt;br /&gt;
|Set a specific colour for a faction. Sample format: CAMP_COLOR=FFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===TAGs with Special Meanings in Item Table===&lt;br /&gt;
The following is a TAG list of items with actual functions in the program.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|IgnoreBagSpace&lt;br /&gt;
|This item will not occupy a slot of player’s bag. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|NoSellOrDrop&lt;br /&gt;
|This item cannot be discarded or sold. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|BatchUse&lt;br /&gt;
|Weather player can use the item in the batch. Function enabled when the field is 1. When an item with this TAG is used, the [%arg_int_val1%] in its script will be the selected number of the item.&lt;br /&gt;
|-&lt;br /&gt;
|DoNotCostWhenUse&lt;br /&gt;
|This item will not be consumed when used. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Present&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;The tag field of gift type, separated by “|”.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|AiNotLoot&lt;br /&gt;
|This item cannot be accessed by AI in a normal way. Function enabled when the field is 1.&lt;br /&gt;
|-&lt;br /&gt;
|Mendable&lt;br /&gt;
|If this item is mendable, unmendable item will self-destroy after the durability becomes 0. (1: Yes ).&lt;br /&gt;
|-&lt;br /&gt;
|DropModel&lt;br /&gt;
|The model info of the item when it is on the ground in battles. (format: world map unit model ID#special effect info (replaced by the def_dropitem_model field in the initial set list if the info is left empty)).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Ones of Map Exploration Info Fields in Map List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!字段&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|BattleLoseStay&lt;br /&gt;
|Stay still after losing a battle. Only available in adventure mode (0: No; 1: Yes)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |'''The following fields are suitable for version above or higher than 0.7.2.1'''&lt;br /&gt;
|-&lt;br /&gt;
|RolePlay&lt;br /&gt;
|When the player is on this map, their character model and name will be replaced by the info of character whose ID is filled into this field. The models of the following minions will be hidden too. The bag and squad panels become inaccessible.&lt;br /&gt;
|-&lt;br /&gt;
|FixedGameTime&lt;br /&gt;
|When this field is not empty, the in-game time will be frozen at a certain point of a day (0~1.0, 0.5 means 12 pm). When the time is frozen, the world will not run on. Only units on the current map can take actions.&lt;br /&gt;
|-&lt;br /&gt;
|CameraFilter&lt;br /&gt;
|When on this map, use this field compulsorily as a camera filter. The effect is the same as the SET_CAMERA_FILTER directives.&lt;br /&gt;
|-&lt;br /&gt;
|NoFoodConsume&lt;br /&gt;
|When this field is 1, the player will not consume food on this map and will not die because of hunger.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Special Fields of TAG in Instance Info List===&lt;br /&gt;
The following is a list of info fields with actual functions in the program:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Field'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PlayerInitType&lt;br /&gt;
|The initial mode of player’s character (0: Default (use the default character template and initial position in the instance to initialize the character) 1: Manual (initialize the character via the LUA port)).&lt;br /&gt;
|-&lt;br /&gt;
|ExpMode&lt;br /&gt;
|EXP allocation mode. Format: allocation mode[,radius parameter].&lt;br /&gt;
&lt;br /&gt;
The allocation modes are: &lt;br /&gt;
&lt;br /&gt;
*0: Killer mode (default; the enemy killer has all EXP).&lt;br /&gt;
*1: Average Mode (the parameter is the allocation radius; when the parameter &amp;lt;=0, all allies share EXP).&lt;br /&gt;
*2: Share Mode (if the radius parameter &amp;gt;0, share EXP with allies with the radius).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Item Entry Info===&lt;br /&gt;
Entries of items follow the format of “entry type:{enumerated info 1, value 1; enumerated info 2, value 2;… }”, and they are set in the item list. Entries can be sorted as:&lt;br /&gt;
&lt;br /&gt;
*a: increase the character’s attribute passively. Enumerated info is the KEY to the increased attribute.&lt;br /&gt;
*skill: add new available skills to a character. Enumerated info is the skill ID.&lt;br /&gt;
*dg_skill: replace the current dungeon skill of the character. Enumerated info is the dungeon skill ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Item Dropping Info===&lt;br /&gt;
Format:&lt;br /&gt;
 Probability 1,item ID1,min number,max number [,additional parameter list(see [[Common Scenario Directives#.E7.89.A9.E5.93.81.E5.88.97.E8.A1.A8.E4.BF.A1.E6.81.AF.E6.A0.BC.E5.BC.8F|Format of Item List Info]])]|probability 2,item ID2,min number, max number [,parameter list]|...|probability N,item N,min number,max number[,parameter list]. &lt;br /&gt;
(E.g., “LOOT*100.0, 金钱,100,200|50.0, 经验,100,200” means that there is a 100% chance of obtaining 100~200 utars and a 50% chance to obtain 100~200 EXP).&lt;br /&gt;
&lt;br /&gt;
'''In Item ID, you can execute a special ID Query, which is to query and return a result of item dropping from the global dropping list (see the format in Q全局掉落表.xlsx).'''&lt;br /&gt;
&lt;br /&gt;
The format of the parameter list of QUERY is: “parameter 1=val1, parameter 2=val2,....” Following query parameters are supported: &lt;br /&gt;
&lt;br /&gt;
*[id] obtain the result of the target ID from the global dropping list (ignore all the other query conditions when this exists and is not empty).&lt;br /&gt;
*[lv] specific conational query level（-1：return all query results; 0: query based on the current level of player）.&lt;br /&gt;
*[t1] query TAG 1 (a condition).&lt;br /&gt;
*[t2] query TAG 2.&lt;br /&gt;
*[t3] query TAG 3.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Format of Script Directive in Special Effect Object Event===&lt;br /&gt;
You can attach the eftEffectEventHelper script to a special effect object to add a new play-effect event. Format of every event: event time point (number of seconds after the start), parameter 1, parameter 2,…, parameter N.&lt;br /&gt;
&lt;br /&gt;
Currently, supported directive types are:&lt;br /&gt;
&lt;br /&gt;
shake_cam: screen shake. Parameter 1 is the duration of screen shake, and parameter 2 is the intensity. &lt;br /&gt;
&lt;br /&gt;
play_sound: play audio. Parameter 1 is the audio ID.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Environment_Building&amp;diff=671</id>
		<title>Development Environment Building</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Environment_Building&amp;diff=671"/>
		<updated>2020-09-22T01:43:34Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 1. Recommended Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Recommended Tools'''===&lt;br /&gt;
'''Text Editing Tool:'''&lt;br /&gt;
&lt;br /&gt;
Recommended: Sublime Text or Visual Studio Code&lt;br /&gt;
Note: Please use UTF-8 (8-bit Unicode Transformation Format) at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Excel Editing Tool:'''&lt;br /&gt;
&lt;br /&gt;
Recommended: the latest version of Microsoft Office&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Unity Engine (Optional):'''&lt;br /&gt;
&lt;br /&gt;
Version: Unity 2018.3.14f1&lt;br /&gt;
&lt;br /&gt;
Link: https://unity3d.com/unity/whats-new/2018.3.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Version Management :'''&lt;br /&gt;
&lt;br /&gt;
Recommended: Github&lt;br /&gt;
Link: https://github.com/&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. MOD Project'''===&lt;br /&gt;
&lt;br /&gt;
===='''2.1 Overview and Project Type'''====&lt;br /&gt;
There are two types of MOD projects, Simple MOD Project and Professional MOD Project. The major difference between these two types is whether you need to download Unity to develop and pack resources.&lt;br /&gt;
You can choose your project type according to your own needs in the MOD development.&lt;br /&gt;
&lt;br /&gt;
The differences are as follow:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Project&lt;br /&gt;
|Simple MOD Project&lt;br /&gt;
|Professional MOD Project&lt;br /&gt;
|-&lt;br /&gt;
|Download Unity&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|One-click Packing&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Upload to Steam Workshop&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Configuration of Basic Information&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Change Login Screen&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Game Configuration Tables&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Use Face Editor to Customize NPC Appearance&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Skill Editor&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Map Editor（Currently only scenarios are supported; relevant functions for plugins are still in development）&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Rewrite Directory&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Common Texts&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Binary Files&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Pictures&lt;br /&gt;
|Yes（PNG &amp;amp; JPG Only）&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Pictures Merging&lt;br /&gt;
（Optimize Picture Batch）&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Audio&lt;br /&gt;
|Yes（PNG &amp;amp; JPG Only）&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Advanced Audio Management（e.g. Audio Mixer）&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management -Particle Effects&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—3D Model and Animation&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Edit Multiple MODs&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''2.2 Simple MOD Project'''====&lt;br /&gt;
Download the a sample Simpld MOD project for Sands of Salzaar (Blywd.SimpleModSample). The content in the directory is:&lt;br /&gt;
&lt;br /&gt;
- Blywd.SimpleModSample&lt;br /&gt;
&lt;br /&gt;
- Directory of ABS Unity resource packing (Professional MOD project only)&lt;br /&gt;
&lt;br /&gt;
- Directory of Config MOD Files&lt;br /&gt;
&lt;br /&gt;
- default.json—main config. files of MOD&lt;br /&gt;
&lt;br /&gt;
- gamemodes.xml—scenario-dependent definition file (only for Scenario MODs)&lt;br /&gt;
&lt;br /&gt;
- publishfileid.txt—item ID for uploading to Steam Workshop, it will be automatically filled by Steam Workshop if it is your first upload. If the file is left empty, then a new Steam Workshop entry will be created.&lt;br /&gt;
&lt;br /&gt;
- workshopitem.json—the configuration uploaded to Steam Workshop, which will be saved automatically according to the player’s choices&lt;br /&gt;
&lt;br /&gt;
- Excel—directory of configuration tables&lt;br /&gt;
&lt;br /&gt;
- Interface—collection of interfaces&lt;br /&gt;
&lt;br /&gt;
- overrides.txt—rule definition for resource override&lt;br /&gt;
&lt;br /&gt;
- RES—resource directory where images and audio files are stored&lt;br /&gt;
&lt;br /&gt;
- preview.jpg/png—preview image for a MOD&lt;br /&gt;
&lt;br /&gt;
- valuebundle—directory of the definition of packing&lt;br /&gt;
&lt;br /&gt;
- default.xml—list of Excel files&lt;br /&gt;
&lt;br /&gt;
- INDEX.xml—list of mapping rules of Excel/reg&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''2.3 Professional MOD Project'''====&lt;br /&gt;
The current version of the game does not support this. Please wait for our update.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. MOD Editor'''===&lt;br /&gt;
To enter the MOD Editor: Main Menu – Mods - Develop Mods&lt;br /&gt;
[[文件:The main panel of the MOD Editor.png|无|缩略图|1000x1000px像素|The main panel of the MOD Editor]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main panel of the MOD Editor might change following the update of versions. All functions are shown above. You can:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.1 Create a new project, or open an existing project.&lt;br /&gt;
&lt;br /&gt;
3.2 Edit, build or upload content with project operation tools.&lt;br /&gt;
&lt;br /&gt;
3.3 Use the debug tool to test your current project in a new game or a save.&lt;br /&gt;
&lt;br /&gt;
3.4 Check out the log information of your current edit.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''Configuration Log Tool'''====&lt;br /&gt;
&lt;br /&gt;
You can use the Debug Log Tool in the MOD Editor to check out the log information during your debugging. This function needs to be configurated in advance. Please find Tools/HSDebugTool/0_setup.bat in the game directory and right-click to run as administrator. &lt;br /&gt;
&lt;br /&gt;
You only need to run this file once before you can use the Debug Log Tool directly.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Debugging_and_Release&amp;diff=669</id>
		<title>Debugging and Release</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Debugging_and_Release&amp;diff=669"/>
		<updated>2020-09-21T17:52:29Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 2. Upload and release MOD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Debugging MOD in the game'''===&lt;br /&gt;
After finishing editing your MOD, you can start to debug directly.&lt;br /&gt;
&lt;br /&gt;
[[文件:Start debugging.png|无|缩略图|900x900px|Start debugging]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select a local MOD (if it is a scenario MOD, please go to the Scenario page)&lt;br /&gt;
&lt;br /&gt;
[[文件:Select local MOD.png|无|缩略图|1200x1200px|Select local MOD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start debugging&lt;br /&gt;
&lt;br /&gt;
==='''2. Upload and release MOD'''===&lt;br /&gt;
Click to upload your MOD to Steam Workshop&lt;br /&gt;
&lt;br /&gt;
[[文件:Click to upload your MOD to Steam Workshop.png|无|缩略图|500x500px|Click to upload your MOD to Steam Workshop]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Decide the project’s visibility, select a cover image for the player to preview, enter an update note, and click Submit to finish uploading.&lt;br /&gt;
&lt;br /&gt;
Please wait for a while after the uploading succeeded as there might be a latency.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Click_to_upload_your_MOD_to_Steam_Workshop.png&amp;diff=668</id>
		<title>文件:Click to upload your MOD to Steam Workshop.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Click_to_upload_your_MOD_to_Steam_Workshop.png&amp;diff=668"/>
		<updated>2020-09-21T17:52:06Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Debugging_and_Release&amp;diff=667</id>
		<title>Debugging and Release</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Debugging_and_Release&amp;diff=667"/>
		<updated>2020-09-21T17:51:38Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 1. Debugging MOD in the game */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Debugging MOD in the game'''===&lt;br /&gt;
After finishing editing your MOD, you can start to debug directly.&lt;br /&gt;
&lt;br /&gt;
[[文件:Start debugging.png|无|缩略图|900x900px|Start debugging]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select a local MOD (if it is a scenario MOD, please go to the Scenario page)&lt;br /&gt;
&lt;br /&gt;
[[文件:Select local MOD.png|无|缩略图|1200x1200px|Select local MOD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start debugging&lt;br /&gt;
&lt;br /&gt;
==='''2. Upload and release MOD'''===&lt;br /&gt;
Click to upload your MOD to Steam Workshop&lt;br /&gt;
&lt;br /&gt;
[[文件:点击上传到Steam创意工坊.png|无|缩略图|Click to upload your MOD to Steam Workshop]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Decide the project’s visibility, select a cover image for the player to preview, enter an update note, and click Submit to finish uploading.&lt;br /&gt;
&lt;br /&gt;
Please wait for a while after the uploading succeeded as there might be a latency.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Select_local_MOD.png&amp;diff=666</id>
		<title>文件:Select local MOD.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Select_local_MOD.png&amp;diff=666"/>
		<updated>2020-09-21T17:51:19Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Start_debugging.png&amp;diff=665</id>
		<title>文件:Start debugging.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Start_debugging.png&amp;diff=665"/>
		<updated>2020-09-21T17:50:19Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=664</id>
		<title>Development Tutorial</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=664"/>
		<updated>2020-09-21T17:49:07Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 6. Face Editor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Concept of Loops'''===&lt;br /&gt;
[[文件:The flow chart of the major looping logics in Sands of Salzaar.png|无|缩略图|800x800px|The flow chart of the major looping logics in Sands of Salzaar]]&lt;br /&gt;
&lt;br /&gt;
As  shown above, the core loop of the game is “Trigger + Event”.&lt;br /&gt;
&lt;br /&gt;
Trigger is a collection of specific conditions, and event is a collection of directives to be executed.&lt;br /&gt;
&lt;br /&gt;
As players continuously participate in different events, the in-game time elapses. Some events happen at certain moments, and then a set of directives will be carried out—this is the major looping logic of the game.&lt;br /&gt;
&lt;br /&gt;
In an event, all relevant directives will be executed entirely by order-one after another. You can define a conditional jump-to statement at the end of the loop, which allows the event to jump to different results.&lt;br /&gt;
&lt;br /&gt;
[[文件:The flow chart of executing an event.png|无|缩略图|600x600px|The flow chart of executing an event]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''2. Project Configuration'''===&lt;br /&gt;
'''Standard Project Configuration File: Config/default.json'''&lt;br /&gt;
&lt;br /&gt;
After configuration, files in .json format will be created, and the key parameters are shown below.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, if the “Valid Range” is Story (type=Story), then the parameter can only be used in scenario MODs.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Valid Range&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Type, Plugin, Scenario&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Name&lt;br /&gt;
|-&lt;br /&gt;
|desc&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Description&lt;br /&gt;
|-&lt;br /&gt;
|tags&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|The label that describes the game genre shown to players on Steam. If there are multiple labels, please use a half-size semicolon—”;:” and type English characters only.&lt;br /&gt;
&lt;br /&gt;
Scenarios&lt;br /&gt;
&lt;br /&gt;
Maps&lt;br /&gt;
&lt;br /&gt;
Items&lt;br /&gt;
&lt;br /&gt;
Characters&lt;br /&gt;
&lt;br /&gt;
Skills&lt;br /&gt;
&lt;br /&gt;
Appearance&lt;br /&gt;
&lt;br /&gt;
BattleUnits&lt;br /&gt;
&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
Audios&lt;br /&gt;
&lt;br /&gt;
Cheating&lt;br /&gt;
|-&lt;br /&gt;
|start_scene&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|The beginning scene (face editing by default); optional:&lt;br /&gt;
&lt;br /&gt;
0: CG of Sands of Salzaar&lt;br /&gt;
&lt;br /&gt;
1: Character Creation（default option if there is no parameter）&lt;br /&gt;
&lt;br /&gt;
2: Sandbox Scene. You need to customize the main character &lt;br /&gt;
&lt;br /&gt;
(only available when the parameter type is “Story”)&lt;br /&gt;
|-&lt;br /&gt;
|include_main_game&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Decide whether you want to use the resources in the main project of the game (only available when the parameter type is “Story”)&lt;br /&gt;
&lt;br /&gt;
0: do not use any data&lt;br /&gt;
&lt;br /&gt;
1: use all data of Sands of Salzaar（default）&lt;br /&gt;
&lt;br /&gt;
2: only use basic data（recommended for independent story） &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|homepage_background&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Change the background image on the main menu. The full file path of the image is required. This is only available in a scenario MODs.&lt;br /&gt;
|-&lt;br /&gt;
|audioControllerAdditional&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|This is only available in the Professional MOD project. &lt;br /&gt;
&lt;br /&gt;
Full path of the audio middleware is required. (please refer to the example; the parameter can be left empty).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Reference File of Configuration Table: valuebundle/default.xml'''&lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can include multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|file&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping-Rule File of Configuration Table: valuebundle/INDEX.xml''' &lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can convert multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|reg&lt;br /&gt;
|No&lt;br /&gt;
|Corresponds to the file of mapping rules, located under directory data/regV2&lt;br /&gt;
|-&lt;br /&gt;
|from&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. Filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping File of Resource Path: Interface/overrides.txt''' &lt;br /&gt;
&lt;br /&gt;
The file is a common text file, one mapping rule per line.&lt;br /&gt;
&lt;br /&gt;
Please refer to 5.4 Resource Management for more details.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. Configuration Table'''===&lt;br /&gt;
&lt;br /&gt;
===='''3.1 Basic Principles of Config Tables'''====&lt;br /&gt;
&lt;br /&gt;
In Sands of Salzaar, we use the configuration tables to fill in contents. In these tables, you can set different values, configure formulas, write a story, design a logic jump, or configure the paths of resources that are referred to.&lt;br /&gt;
&lt;br /&gt;
Configuration tables are independent excel files, which can be packed up as xml files or executable binary files (values files) with the help of the tools in the HSFramework. &lt;br /&gt;
[[文件:The flow chart of packing configuration files.png|无|缩略图|1000x1000px|The flow chart of packing configuration files]]&lt;br /&gt;
&lt;br /&gt;
'''As the flow chart has shown above, the process of development is:'''&lt;br /&gt;
&lt;br /&gt;
· MOD developer edits their configuration tables (excel)&lt;br /&gt;
&lt;br /&gt;
 Note: the reg file is our default syntax restriction files of Excel. MOD developer does not need to edit it.&lt;br /&gt;
&lt;br /&gt;
· Run the packing tools to generate executable files (values).&lt;br /&gt;
&lt;br /&gt;
· Run the game client to debug the MOD package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please pay special attention:'''&lt;br /&gt;
&lt;br /&gt;
· Microsoft Excel is recommended for editing configuration tables;&lt;br /&gt;
&lt;br /&gt;
· Each data has its own restriction for syntax and format. If the input is wrong, you will probably encounter errors in the second (pack) or the third (run) stage. Please pay attention to the error information;&lt;br /&gt;
&lt;br /&gt;
· Do not leave empty rows amid the Excel tables for no reason. Otherwise, it might cause unknown errors;&lt;br /&gt;
&lt;br /&gt;
· We do not suggest you make a high number of changes and then debug them all at once, which makes it hard to locate the roots of errors. Therefore, we recommend you to start debugging after making a few changes. It is easier to identify and fix issues this way.&lt;br /&gt;
&lt;br /&gt;
· As players’ saves depend on the definitions in the configuration tables, please DO NOT delete specific IDs in the tables. If the IDs are deleted, players who are using the relevant MODs might have their saves corrupted (since the deleted IDs cannot be found). The correct way is to mark the old data as “obsolete” and start a new line to define a new ID.&lt;br /&gt;
&lt;br /&gt;
===='''3.2 Data Type'''====&lt;br /&gt;
&lt;br /&gt;
Data type refers to the format of the data we write in a specific line in an Excel file.&lt;br /&gt;
&lt;br /&gt;
This format is defined in the reg file (please see the sample project, and refer to the definitions of types of different files under the path data/regV2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common formats are as follow:&lt;br /&gt;
&lt;br /&gt;
int—integer&lt;br /&gt;
&lt;br /&gt;
float—floating point（decimal point）&lt;br /&gt;
&lt;br /&gt;
string—character string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there are format errors in the Excel file, you will encounter an error report when packing.&lt;br /&gt;
&lt;br /&gt;
===='''3.3 Variables and Conditional Expressions'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use halfwidth (aka common English) punctuations!!!'''&lt;br /&gt;
&lt;br /&gt;
A conditional expression group consists of multiple conditional expressions like &amp;quot; [%condition%] [=]1&amp;quot;, connected by symbols such as “|” (or) and “&amp;amp;” (and). “&amp;amp;” (and) has a higher priority than “|” (or). When both sides of a conditional expression are integers, a comparison between them will be returned as a result by default. Otherwise, we have to use character strings to make the comparison, and this method only supports the use of [=] and [&amp;lt;&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
E.g. “[%result_code%][=]1| [%player_money%][&amp;gt;=]100” means that directives will be executed when the result is “1” or the player has 100 coins, while “[%player:level%][&amp;gt;=]3&amp;amp;  [%player_money%][&amp;gt;]100” means that directives will be executed when the player is at least Lv.3 and has more than 100 coins. &lt;br /&gt;
&lt;br /&gt;
Note: Due to a historical reason, both [%xxxx%] and [$xxxx$] can be used in the configuration in Excel. &lt;br /&gt;
&lt;br /&gt;
Regarding conditional expressions, you can refer to the configurations in different kinds of trigger.xls.&lt;br /&gt;
&lt;br /&gt;
===='''3.4 Event Directive Syntax'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use half-size punctuation!!!'''&lt;br /&gt;
&lt;br /&gt;
We use “*” to separate directives and parameters and “#” for separations between parameters. Since a high amount of chat directives are being used, we are allowed to disregard chat directives when coding.&lt;br /&gt;
&lt;br /&gt;
When transferring an event by default, certain environment variables will be imported. Developers can adopt different coding methods such as CUR_ROLE and [%tagrole%] to use the variables. &lt;br /&gt;
&lt;br /&gt;
For detailed directives, please refer to the appendix—Directive Instruction&lt;br /&gt;
&lt;br /&gt;
===='''3.5 Other Hidden Syntax of Config Tables'''====&lt;br /&gt;
Some configuration tables have their hidden syntax. If you fill in the wrong syntax content, there might not be an error report when packing, but errors will occur when you run the game. Please refer to our different sample Excel files when filling in the tables. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''3.6 Principles of MOD Config Tables'''====&lt;br /&gt;
Every Excel file has its ID. If there are repeated IDs, the newly loaded MOD will override the previous one. Thus, it is possible to use MODs to change the game. For example, we can look at a definition in C Initial Setting Table.xls of the standard game.&lt;br /&gt;
&lt;br /&gt;
“init_pos” is the respawning point in the wild rift outside Redstone Keep: 980, -1246&lt;br /&gt;
&lt;br /&gt;
You can create an initial setting table in your MOD to rewrite the key string “init_pos”, which changes the game’s initial respawning point .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''4. Resource Management'''===&lt;br /&gt;
&lt;br /&gt;
===='''4.1 Overview on MOD Resource Management'''====&lt;br /&gt;
Resources refer to the images, audios, models, animations, special effects, and other content we might be using in the game.&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar uses a global namespace for resources. Each resource corresponds to a unique fall path. You can define the “rewriting rules” of resources in your MOD to change the old resource or add a new one.&lt;br /&gt;
&lt;br /&gt;
You can define the rewriting rules in Interface/overrides.txt.&lt;br /&gt;
&lt;br /&gt;
For example, “ABS\Audio\*&amp;gt;:\Buildsource\Audios\* ” represents all content that was originally in the directory ABS\Audios and was later added to BuildSource\Audio (or has overwritten the original content in BuildSource\Audio).&lt;br /&gt;
&lt;br /&gt;
You can define or rewrite the specific rules under ABS or RES in this text file. Specific file reference, as well as Wildcard characters, is supported (for example, “*” represents “all”).&lt;br /&gt;
&lt;br /&gt;
For the current collection of resources in Sands of Salzaar, please refer to the Comparison Table of All Resources.&lt;br /&gt;
&lt;br /&gt;
===='''4.2 Import RES Resource via Standard File System'''====&lt;br /&gt;
All files under RES will be copied to the default game-release directory of Steam when the MOD is created. It works in both Simple MOD projects and Professional MOD projects.&lt;br /&gt;
&lt;br /&gt;
===='''4.3 Import ABS Resource in Unity'''====&lt;br /&gt;
Every directory under ABS will be packed into a single assetbundle by default. This is only possible with a Professional MOD project, and you need to use Unity to build the MOD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''5. Audio Management''' ===&lt;br /&gt;
Please wait for more updates.&lt;br /&gt;
&lt;br /&gt;
==='''6. Face Editor'''===&lt;br /&gt;
You can use the face editing materials in the game to change the appearance of NPCs. In Sands of Salzaar Mod Editor-Face Editor, you can do face editing with the current materials.&lt;br /&gt;
[[文件:The location of the Face Editor.png|无|缩略图|1200x1200px|The location of the Face Editor]]&lt;br /&gt;
&lt;br /&gt;
The location of the Face Editor&lt;br /&gt;
&lt;br /&gt;
Internal data of face editing is here:&lt;br /&gt;
[[文件:Export of face editing data.png|无|缩略图|1200x1200px|Export of face editing data]]&lt;br /&gt;
&lt;br /&gt;
In the highlighted textbox, click “import” to view other appearances.&lt;br /&gt;
After you finish face editing, you can copy and paste this data (as character appearance information) to the corresponding configuration table.&lt;br /&gt;
&lt;br /&gt;
==='''7. Skill Editing'''===&lt;br /&gt;
You can edit the Skill Configuration table and rewrite Assets/BuildSource/SkillData/*.txt to realize skill editing. For detailed rules, please refer to Directive Instruction—Skill Directive Editing.&lt;br /&gt;
&lt;br /&gt;
You can do real-time editing and debugging in the Skill Editor.&lt;br /&gt;
&lt;br /&gt;
==='''8. 3D Model and Animation'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''9. Particle Effect'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''10. Map Editor'''===&lt;br /&gt;
Please wait for more updates.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Export_of_face_editing_data.png&amp;diff=663</id>
		<title>文件:Export of face editing data.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Export_of_face_editing_data.png&amp;diff=663"/>
		<updated>2020-09-21T17:48:33Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=662</id>
		<title>Development Tutorial</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=662"/>
		<updated>2020-09-21T17:48:07Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 6. Face Editor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Concept of Loops'''===&lt;br /&gt;
[[文件:The flow chart of the major looping logics in Sands of Salzaar.png|无|缩略图|800x800px|The flow chart of the major looping logics in Sands of Salzaar]]&lt;br /&gt;
&lt;br /&gt;
As  shown above, the core loop of the game is “Trigger + Event”.&lt;br /&gt;
&lt;br /&gt;
Trigger is a collection of specific conditions, and event is a collection of directives to be executed.&lt;br /&gt;
&lt;br /&gt;
As players continuously participate in different events, the in-game time elapses. Some events happen at certain moments, and then a set of directives will be carried out—this is the major looping logic of the game.&lt;br /&gt;
&lt;br /&gt;
In an event, all relevant directives will be executed entirely by order-one after another. You can define a conditional jump-to statement at the end of the loop, which allows the event to jump to different results.&lt;br /&gt;
&lt;br /&gt;
[[文件:The flow chart of executing an event.png|无|缩略图|600x600px|The flow chart of executing an event]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''2. Project Configuration'''===&lt;br /&gt;
'''Standard Project Configuration File: Config/default.json'''&lt;br /&gt;
&lt;br /&gt;
After configuration, files in .json format will be created, and the key parameters are shown below.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, if the “Valid Range” is Story (type=Story), then the parameter can only be used in scenario MODs.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Valid Range&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Type, Plugin, Scenario&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Name&lt;br /&gt;
|-&lt;br /&gt;
|desc&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Description&lt;br /&gt;
|-&lt;br /&gt;
|tags&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|The label that describes the game genre shown to players on Steam. If there are multiple labels, please use a half-size semicolon—”;:” and type English characters only.&lt;br /&gt;
&lt;br /&gt;
Scenarios&lt;br /&gt;
&lt;br /&gt;
Maps&lt;br /&gt;
&lt;br /&gt;
Items&lt;br /&gt;
&lt;br /&gt;
Characters&lt;br /&gt;
&lt;br /&gt;
Skills&lt;br /&gt;
&lt;br /&gt;
Appearance&lt;br /&gt;
&lt;br /&gt;
BattleUnits&lt;br /&gt;
&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
Audios&lt;br /&gt;
&lt;br /&gt;
Cheating&lt;br /&gt;
|-&lt;br /&gt;
|start_scene&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|The beginning scene (face editing by default); optional:&lt;br /&gt;
&lt;br /&gt;
0: CG of Sands of Salzaar&lt;br /&gt;
&lt;br /&gt;
1: Character Creation（default option if there is no parameter）&lt;br /&gt;
&lt;br /&gt;
2: Sandbox Scene. You need to customize the main character &lt;br /&gt;
&lt;br /&gt;
(only available when the parameter type is “Story”)&lt;br /&gt;
|-&lt;br /&gt;
|include_main_game&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Decide whether you want to use the resources in the main project of the game (only available when the parameter type is “Story”)&lt;br /&gt;
&lt;br /&gt;
0: do not use any data&lt;br /&gt;
&lt;br /&gt;
1: use all data of Sands of Salzaar（default）&lt;br /&gt;
&lt;br /&gt;
2: only use basic data（recommended for independent story） &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|homepage_background&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Change the background image on the main menu. The full file path of the image is required. This is only available in a scenario MODs.&lt;br /&gt;
|-&lt;br /&gt;
|audioControllerAdditional&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|This is only available in the Professional MOD project. &lt;br /&gt;
&lt;br /&gt;
Full path of the audio middleware is required. (please refer to the example; the parameter can be left empty).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Reference File of Configuration Table: valuebundle/default.xml'''&lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can include multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|file&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping-Rule File of Configuration Table: valuebundle/INDEX.xml''' &lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can convert multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|reg&lt;br /&gt;
|No&lt;br /&gt;
|Corresponds to the file of mapping rules, located under directory data/regV2&lt;br /&gt;
|-&lt;br /&gt;
|from&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. Filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping File of Resource Path: Interface/overrides.txt''' &lt;br /&gt;
&lt;br /&gt;
The file is a common text file, one mapping rule per line.&lt;br /&gt;
&lt;br /&gt;
Please refer to 5.4 Resource Management for more details.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. Configuration Table'''===&lt;br /&gt;
&lt;br /&gt;
===='''3.1 Basic Principles of Config Tables'''====&lt;br /&gt;
&lt;br /&gt;
In Sands of Salzaar, we use the configuration tables to fill in contents. In these tables, you can set different values, configure formulas, write a story, design a logic jump, or configure the paths of resources that are referred to.&lt;br /&gt;
&lt;br /&gt;
Configuration tables are independent excel files, which can be packed up as xml files or executable binary files (values files) with the help of the tools in the HSFramework. &lt;br /&gt;
[[文件:The flow chart of packing configuration files.png|无|缩略图|1000x1000px|The flow chart of packing configuration files]]&lt;br /&gt;
&lt;br /&gt;
'''As the flow chart has shown above, the process of development is:'''&lt;br /&gt;
&lt;br /&gt;
· MOD developer edits their configuration tables (excel)&lt;br /&gt;
&lt;br /&gt;
 Note: the reg file is our default syntax restriction files of Excel. MOD developer does not need to edit it.&lt;br /&gt;
&lt;br /&gt;
· Run the packing tools to generate executable files (values).&lt;br /&gt;
&lt;br /&gt;
· Run the game client to debug the MOD package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please pay special attention:'''&lt;br /&gt;
&lt;br /&gt;
· Microsoft Excel is recommended for editing configuration tables;&lt;br /&gt;
&lt;br /&gt;
· Each data has its own restriction for syntax and format. If the input is wrong, you will probably encounter errors in the second (pack) or the third (run) stage. Please pay attention to the error information;&lt;br /&gt;
&lt;br /&gt;
· Do not leave empty rows amid the Excel tables for no reason. Otherwise, it might cause unknown errors;&lt;br /&gt;
&lt;br /&gt;
· We do not suggest you make a high number of changes and then debug them all at once, which makes it hard to locate the roots of errors. Therefore, we recommend you to start debugging after making a few changes. It is easier to identify and fix issues this way.&lt;br /&gt;
&lt;br /&gt;
· As players’ saves depend on the definitions in the configuration tables, please DO NOT delete specific IDs in the tables. If the IDs are deleted, players who are using the relevant MODs might have their saves corrupted (since the deleted IDs cannot be found). The correct way is to mark the old data as “obsolete” and start a new line to define a new ID.&lt;br /&gt;
&lt;br /&gt;
===='''3.2 Data Type'''====&lt;br /&gt;
&lt;br /&gt;
Data type refers to the format of the data we write in a specific line in an Excel file.&lt;br /&gt;
&lt;br /&gt;
This format is defined in the reg file (please see the sample project, and refer to the definitions of types of different files under the path data/regV2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common formats are as follow:&lt;br /&gt;
&lt;br /&gt;
int—integer&lt;br /&gt;
&lt;br /&gt;
float—floating point（decimal point）&lt;br /&gt;
&lt;br /&gt;
string—character string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there are format errors in the Excel file, you will encounter an error report when packing.&lt;br /&gt;
&lt;br /&gt;
===='''3.3 Variables and Conditional Expressions'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use halfwidth (aka common English) punctuations!!!'''&lt;br /&gt;
&lt;br /&gt;
A conditional expression group consists of multiple conditional expressions like &amp;quot; [%condition%] [=]1&amp;quot;, connected by symbols such as “|” (or) and “&amp;amp;” (and). “&amp;amp;” (and) has a higher priority than “|” (or). When both sides of a conditional expression are integers, a comparison between them will be returned as a result by default. Otherwise, we have to use character strings to make the comparison, and this method only supports the use of [=] and [&amp;lt;&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
E.g. “[%result_code%][=]1| [%player_money%][&amp;gt;=]100” means that directives will be executed when the result is “1” or the player has 100 coins, while “[%player:level%][&amp;gt;=]3&amp;amp;  [%player_money%][&amp;gt;]100” means that directives will be executed when the player is at least Lv.3 and has more than 100 coins. &lt;br /&gt;
&lt;br /&gt;
Note: Due to a historical reason, both [%xxxx%] and [$xxxx$] can be used in the configuration in Excel. &lt;br /&gt;
&lt;br /&gt;
Regarding conditional expressions, you can refer to the configurations in different kinds of trigger.xls.&lt;br /&gt;
&lt;br /&gt;
===='''3.4 Event Directive Syntax'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use half-size punctuation!!!'''&lt;br /&gt;
&lt;br /&gt;
We use “*” to separate directives and parameters and “#” for separations between parameters. Since a high amount of chat directives are being used, we are allowed to disregard chat directives when coding.&lt;br /&gt;
&lt;br /&gt;
When transferring an event by default, certain environment variables will be imported. Developers can adopt different coding methods such as CUR_ROLE and [%tagrole%] to use the variables. &lt;br /&gt;
&lt;br /&gt;
For detailed directives, please refer to the appendix—Directive Instruction&lt;br /&gt;
&lt;br /&gt;
===='''3.5 Other Hidden Syntax of Config Tables'''====&lt;br /&gt;
Some configuration tables have their hidden syntax. If you fill in the wrong syntax content, there might not be an error report when packing, but errors will occur when you run the game. Please refer to our different sample Excel files when filling in the tables. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''3.6 Principles of MOD Config Tables'''====&lt;br /&gt;
Every Excel file has its ID. If there are repeated IDs, the newly loaded MOD will override the previous one. Thus, it is possible to use MODs to change the game. For example, we can look at a definition in C Initial Setting Table.xls of the standard game.&lt;br /&gt;
&lt;br /&gt;
“init_pos” is the respawning point in the wild rift outside Redstone Keep: 980, -1246&lt;br /&gt;
&lt;br /&gt;
You can create an initial setting table in your MOD to rewrite the key string “init_pos”, which changes the game’s initial respawning point .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''4. Resource Management'''===&lt;br /&gt;
&lt;br /&gt;
===='''4.1 Overview on MOD Resource Management'''====&lt;br /&gt;
Resources refer to the images, audios, models, animations, special effects, and other content we might be using in the game.&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar uses a global namespace for resources. Each resource corresponds to a unique fall path. You can define the “rewriting rules” of resources in your MOD to change the old resource or add a new one.&lt;br /&gt;
&lt;br /&gt;
You can define the rewriting rules in Interface/overrides.txt.&lt;br /&gt;
&lt;br /&gt;
For example, “ABS\Audio\*&amp;gt;:\Buildsource\Audios\* ” represents all content that was originally in the directory ABS\Audios and was later added to BuildSource\Audio (or has overwritten the original content in BuildSource\Audio).&lt;br /&gt;
&lt;br /&gt;
You can define or rewrite the specific rules under ABS or RES in this text file. Specific file reference, as well as Wildcard characters, is supported (for example, “*” represents “all”).&lt;br /&gt;
&lt;br /&gt;
For the current collection of resources in Sands of Salzaar, please refer to the Comparison Table of All Resources.&lt;br /&gt;
&lt;br /&gt;
===='''4.2 Import RES Resource via Standard File System'''====&lt;br /&gt;
All files under RES will be copied to the default game-release directory of Steam when the MOD is created. It works in both Simple MOD projects and Professional MOD projects.&lt;br /&gt;
&lt;br /&gt;
===='''4.3 Import ABS Resource in Unity'''====&lt;br /&gt;
Every directory under ABS will be packed into a single assetbundle by default. This is only possible with a Professional MOD project, and you need to use Unity to build the MOD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''5. Audio Management''' ===&lt;br /&gt;
Please wait for more updates.&lt;br /&gt;
&lt;br /&gt;
==='''6. Face Editor'''===&lt;br /&gt;
You can use the face editing materials in the game to change the appearance of NPCs. In Sands of Salzaar Mod Editor-Face Editor, you can do face editing with the current materials.&lt;br /&gt;
[[文件:The location of the Face Editor.png|无|缩略图|1200x1200px|The location of the Face Editor]]&lt;br /&gt;
&lt;br /&gt;
The location of the Face Editor&lt;br /&gt;
&lt;br /&gt;
Internal data of face editing is here:&lt;br /&gt;
[[文件:捏脸工具导出示意.png|无|缩略图|641x641像素|捏脸工具导出示意]]&lt;br /&gt;
&lt;br /&gt;
In the highlighted textbox, click “import” to view other appearances.&lt;br /&gt;
After you finish face editing, you can copy and paste this data (as character appearance information) to the corresponding configuration table.&lt;br /&gt;
&lt;br /&gt;
==='''7. Skill Editing'''===&lt;br /&gt;
You can edit the Skill Configuration table and rewrite Assets/BuildSource/SkillData/*.txt to realize skill editing. For detailed rules, please refer to Directive Instruction—Skill Directive Editing.&lt;br /&gt;
&lt;br /&gt;
You can do real-time editing and debugging in the Skill Editor.&lt;br /&gt;
&lt;br /&gt;
==='''8. 3D Model and Animation'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''9. Particle Effect'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''10. Map Editor'''===&lt;br /&gt;
Please wait for more updates.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_location_of_the_Face_Editor.png&amp;diff=661</id>
		<title>文件:The location of the Face Editor.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_location_of_the_Face_Editor.png&amp;diff=661"/>
		<updated>2020-09-21T17:47:20Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=660</id>
		<title>Development Tutorial</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=660"/>
		<updated>2020-09-21T17:46:46Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3.1 Basic Principles of Config Tables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Concept of Loops'''===&lt;br /&gt;
[[文件:The flow chart of the major looping logics in Sands of Salzaar.png|无|缩略图|800x800px|The flow chart of the major looping logics in Sands of Salzaar]]&lt;br /&gt;
&lt;br /&gt;
As  shown above, the core loop of the game is “Trigger + Event”.&lt;br /&gt;
&lt;br /&gt;
Trigger is a collection of specific conditions, and event is a collection of directives to be executed.&lt;br /&gt;
&lt;br /&gt;
As players continuously participate in different events, the in-game time elapses. Some events happen at certain moments, and then a set of directives will be carried out—this is the major looping logic of the game.&lt;br /&gt;
&lt;br /&gt;
In an event, all relevant directives will be executed entirely by order-one after another. You can define a conditional jump-to statement at the end of the loop, which allows the event to jump to different results.&lt;br /&gt;
&lt;br /&gt;
[[文件:The flow chart of executing an event.png|无|缩略图|600x600px|The flow chart of executing an event]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''2. Project Configuration'''===&lt;br /&gt;
'''Standard Project Configuration File: Config/default.json'''&lt;br /&gt;
&lt;br /&gt;
After configuration, files in .json format will be created, and the key parameters are shown below.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, if the “Valid Range” is Story (type=Story), then the parameter can only be used in scenario MODs.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Valid Range&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Type, Plugin, Scenario&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Name&lt;br /&gt;
|-&lt;br /&gt;
|desc&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Description&lt;br /&gt;
|-&lt;br /&gt;
|tags&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|The label that describes the game genre shown to players on Steam. If there are multiple labels, please use a half-size semicolon—”;:” and type English characters only.&lt;br /&gt;
&lt;br /&gt;
Scenarios&lt;br /&gt;
&lt;br /&gt;
Maps&lt;br /&gt;
&lt;br /&gt;
Items&lt;br /&gt;
&lt;br /&gt;
Characters&lt;br /&gt;
&lt;br /&gt;
Skills&lt;br /&gt;
&lt;br /&gt;
Appearance&lt;br /&gt;
&lt;br /&gt;
BattleUnits&lt;br /&gt;
&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
Audios&lt;br /&gt;
&lt;br /&gt;
Cheating&lt;br /&gt;
|-&lt;br /&gt;
|start_scene&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|The beginning scene (face editing by default); optional:&lt;br /&gt;
&lt;br /&gt;
0: CG of Sands of Salzaar&lt;br /&gt;
&lt;br /&gt;
1: Character Creation（default option if there is no parameter）&lt;br /&gt;
&lt;br /&gt;
2: Sandbox Scene. You need to customize the main character &lt;br /&gt;
&lt;br /&gt;
(only available when the parameter type is “Story”)&lt;br /&gt;
|-&lt;br /&gt;
|include_main_game&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Decide whether you want to use the resources in the main project of the game (only available when the parameter type is “Story”)&lt;br /&gt;
&lt;br /&gt;
0: do not use any data&lt;br /&gt;
&lt;br /&gt;
1: use all data of Sands of Salzaar（default）&lt;br /&gt;
&lt;br /&gt;
2: only use basic data（recommended for independent story） &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|homepage_background&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Change the background image on the main menu. The full file path of the image is required. This is only available in a scenario MODs.&lt;br /&gt;
|-&lt;br /&gt;
|audioControllerAdditional&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|This is only available in the Professional MOD project. &lt;br /&gt;
&lt;br /&gt;
Full path of the audio middleware is required. (please refer to the example; the parameter can be left empty).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Reference File of Configuration Table: valuebundle/default.xml'''&lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can include multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|file&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping-Rule File of Configuration Table: valuebundle/INDEX.xml''' &lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can convert multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|reg&lt;br /&gt;
|No&lt;br /&gt;
|Corresponds to the file of mapping rules, located under directory data/regV2&lt;br /&gt;
|-&lt;br /&gt;
|from&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. Filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping File of Resource Path: Interface/overrides.txt''' &lt;br /&gt;
&lt;br /&gt;
The file is a common text file, one mapping rule per line.&lt;br /&gt;
&lt;br /&gt;
Please refer to 5.4 Resource Management for more details.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. Configuration Table'''===&lt;br /&gt;
&lt;br /&gt;
===='''3.1 Basic Principles of Config Tables'''====&lt;br /&gt;
&lt;br /&gt;
In Sands of Salzaar, we use the configuration tables to fill in contents. In these tables, you can set different values, configure formulas, write a story, design a logic jump, or configure the paths of resources that are referred to.&lt;br /&gt;
&lt;br /&gt;
Configuration tables are independent excel files, which can be packed up as xml files or executable binary files (values files) with the help of the tools in the HSFramework. &lt;br /&gt;
[[文件:The flow chart of packing configuration files.png|无|缩略图|1000x1000px|The flow chart of packing configuration files]]&lt;br /&gt;
&lt;br /&gt;
'''As the flow chart has shown above, the process of development is:'''&lt;br /&gt;
&lt;br /&gt;
· MOD developer edits their configuration tables (excel)&lt;br /&gt;
&lt;br /&gt;
 Note: the reg file is our default syntax restriction files of Excel. MOD developer does not need to edit it.&lt;br /&gt;
&lt;br /&gt;
· Run the packing tools to generate executable files (values).&lt;br /&gt;
&lt;br /&gt;
· Run the game client to debug the MOD package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please pay special attention:'''&lt;br /&gt;
&lt;br /&gt;
· Microsoft Excel is recommended for editing configuration tables;&lt;br /&gt;
&lt;br /&gt;
· Each data has its own restriction for syntax and format. If the input is wrong, you will probably encounter errors in the second (pack) or the third (run) stage. Please pay attention to the error information;&lt;br /&gt;
&lt;br /&gt;
· Do not leave empty rows amid the Excel tables for no reason. Otherwise, it might cause unknown errors;&lt;br /&gt;
&lt;br /&gt;
· We do not suggest you make a high number of changes and then debug them all at once, which makes it hard to locate the roots of errors. Therefore, we recommend you to start debugging after making a few changes. It is easier to identify and fix issues this way.&lt;br /&gt;
&lt;br /&gt;
· As players’ saves depend on the definitions in the configuration tables, please DO NOT delete specific IDs in the tables. If the IDs are deleted, players who are using the relevant MODs might have their saves corrupted (since the deleted IDs cannot be found). The correct way is to mark the old data as “obsolete” and start a new line to define a new ID.&lt;br /&gt;
&lt;br /&gt;
===='''3.2 Data Type'''====&lt;br /&gt;
&lt;br /&gt;
Data type refers to the format of the data we write in a specific line in an Excel file.&lt;br /&gt;
&lt;br /&gt;
This format is defined in the reg file (please see the sample project, and refer to the definitions of types of different files under the path data/regV2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common formats are as follow:&lt;br /&gt;
&lt;br /&gt;
int—integer&lt;br /&gt;
&lt;br /&gt;
float—floating point（decimal point）&lt;br /&gt;
&lt;br /&gt;
string—character string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there are format errors in the Excel file, you will encounter an error report when packing.&lt;br /&gt;
&lt;br /&gt;
===='''3.3 Variables and Conditional Expressions'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use halfwidth (aka common English) punctuations!!!'''&lt;br /&gt;
&lt;br /&gt;
A conditional expression group consists of multiple conditional expressions like &amp;quot; [%condition%] [=]1&amp;quot;, connected by symbols such as “|” (or) and “&amp;amp;” (and). “&amp;amp;” (and) has a higher priority than “|” (or). When both sides of a conditional expression are integers, a comparison between them will be returned as a result by default. Otherwise, we have to use character strings to make the comparison, and this method only supports the use of [=] and [&amp;lt;&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
E.g. “[%result_code%][=]1| [%player_money%][&amp;gt;=]100” means that directives will be executed when the result is “1” or the player has 100 coins, while “[%player:level%][&amp;gt;=]3&amp;amp;  [%player_money%][&amp;gt;]100” means that directives will be executed when the player is at least Lv.3 and has more than 100 coins. &lt;br /&gt;
&lt;br /&gt;
Note: Due to a historical reason, both [%xxxx%] and [$xxxx$] can be used in the configuration in Excel. &lt;br /&gt;
&lt;br /&gt;
Regarding conditional expressions, you can refer to the configurations in different kinds of trigger.xls.&lt;br /&gt;
&lt;br /&gt;
===='''3.4 Event Directive Syntax'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use half-size punctuation!!!'''&lt;br /&gt;
&lt;br /&gt;
We use “*” to separate directives and parameters and “#” for separations between parameters. Since a high amount of chat directives are being used, we are allowed to disregard chat directives when coding.&lt;br /&gt;
&lt;br /&gt;
When transferring an event by default, certain environment variables will be imported. Developers can adopt different coding methods such as CUR_ROLE and [%tagrole%] to use the variables. &lt;br /&gt;
&lt;br /&gt;
For detailed directives, please refer to the appendix—Directive Instruction&lt;br /&gt;
&lt;br /&gt;
===='''3.5 Other Hidden Syntax of Config Tables'''====&lt;br /&gt;
Some configuration tables have their hidden syntax. If you fill in the wrong syntax content, there might not be an error report when packing, but errors will occur when you run the game. Please refer to our different sample Excel files when filling in the tables. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''3.6 Principles of MOD Config Tables'''====&lt;br /&gt;
Every Excel file has its ID. If there are repeated IDs, the newly loaded MOD will override the previous one. Thus, it is possible to use MODs to change the game. For example, we can look at a definition in C Initial Setting Table.xls of the standard game.&lt;br /&gt;
&lt;br /&gt;
“init_pos” is the respawning point in the wild rift outside Redstone Keep: 980, -1246&lt;br /&gt;
&lt;br /&gt;
You can create an initial setting table in your MOD to rewrite the key string “init_pos”, which changes the game’s initial respawning point .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''4. Resource Management'''===&lt;br /&gt;
&lt;br /&gt;
===='''4.1 Overview on MOD Resource Management'''====&lt;br /&gt;
Resources refer to the images, audios, models, animations, special effects, and other content we might be using in the game.&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar uses a global namespace for resources. Each resource corresponds to a unique fall path. You can define the “rewriting rules” of resources in your MOD to change the old resource or add a new one.&lt;br /&gt;
&lt;br /&gt;
You can define the rewriting rules in Interface/overrides.txt.&lt;br /&gt;
&lt;br /&gt;
For example, “ABS\Audio\*&amp;gt;:\Buildsource\Audios\* ” represents all content that was originally in the directory ABS\Audios and was later added to BuildSource\Audio (or has overwritten the original content in BuildSource\Audio).&lt;br /&gt;
&lt;br /&gt;
You can define or rewrite the specific rules under ABS or RES in this text file. Specific file reference, as well as Wildcard characters, is supported (for example, “*” represents “all”).&lt;br /&gt;
&lt;br /&gt;
For the current collection of resources in Sands of Salzaar, please refer to the Comparison Table of All Resources.&lt;br /&gt;
&lt;br /&gt;
===='''4.2 Import RES Resource via Standard File System'''====&lt;br /&gt;
All files under RES will be copied to the default game-release directory of Steam when the MOD is created. It works in both Simple MOD projects and Professional MOD projects.&lt;br /&gt;
&lt;br /&gt;
===='''4.3 Import ABS Resource in Unity'''====&lt;br /&gt;
Every directory under ABS will be packed into a single assetbundle by default. This is only possible with a Professional MOD project, and you need to use Unity to build the MOD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''5. Audio Management''' ===&lt;br /&gt;
Please wait for more updates.&lt;br /&gt;
&lt;br /&gt;
==='''6. Face Editor'''===&lt;br /&gt;
You can use the face editing materials in the game to change the appearance of NPCs. In Sands of Salzaar Mod Editor-Face Editor, you can do face editing with the current materials.&lt;br /&gt;
[[文件:捏脸工具启动位置示意.png|无|缩略图|641x641px|捏脸工具启动位置示意]]&lt;br /&gt;
&lt;br /&gt;
The location of the Face Editor&lt;br /&gt;
&lt;br /&gt;
Internal data of face editing is here:&lt;br /&gt;
[[文件:捏脸工具导出示意.png|无|缩略图|641x641像素|捏脸工具导出示意]]&lt;br /&gt;
&lt;br /&gt;
In the highlighted textbox, click “import” to view other appearances.&lt;br /&gt;
After you finish face editing, you can copy and paste this data (as character appearance information) to the corresponding configuration table.&lt;br /&gt;
&lt;br /&gt;
==='''7. Skill Editing'''===&lt;br /&gt;
You can edit the Skill Configuration table and rewrite Assets/BuildSource/SkillData/*.txt to realize skill editing. For detailed rules, please refer to Directive Instruction—Skill Directive Editing.&lt;br /&gt;
&lt;br /&gt;
You can do real-time editing and debugging in the Skill Editor.&lt;br /&gt;
&lt;br /&gt;
==='''8. 3D Model and Animation'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''9. Particle Effect'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''10. Map Editor'''===&lt;br /&gt;
Please wait for more updates.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_flow_chart_of_packing_configuration_files.png&amp;diff=659</id>
		<title>文件:The flow chart of packing configuration files.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_flow_chart_of_packing_configuration_files.png&amp;diff=659"/>
		<updated>2020-09-21T17:46:12Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=658</id>
		<title>Development Tutorial</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=658"/>
		<updated>2020-09-21T17:44:57Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 1. Concept of Loops */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Concept of Loops'''===&lt;br /&gt;
[[文件:The flow chart of the major looping logics in Sands of Salzaar.png|无|缩略图|800x800px|The flow chart of the major looping logics in Sands of Salzaar]]&lt;br /&gt;
&lt;br /&gt;
As  shown above, the core loop of the game is “Trigger + Event”.&lt;br /&gt;
&lt;br /&gt;
Trigger is a collection of specific conditions, and event is a collection of directives to be executed.&lt;br /&gt;
&lt;br /&gt;
As players continuously participate in different events, the in-game time elapses. Some events happen at certain moments, and then a set of directives will be carried out—this is the major looping logic of the game.&lt;br /&gt;
&lt;br /&gt;
In an event, all relevant directives will be executed entirely by order-one after another. You can define a conditional jump-to statement at the end of the loop, which allows the event to jump to different results.&lt;br /&gt;
&lt;br /&gt;
[[文件:The flow chart of executing an event.png|无|缩略图|600x600px|The flow chart of executing an event]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''2. Project Configuration'''===&lt;br /&gt;
'''Standard Project Configuration File: Config/default.json'''&lt;br /&gt;
&lt;br /&gt;
After configuration, files in .json format will be created, and the key parameters are shown below.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, if the “Valid Range” is Story (type=Story), then the parameter can only be used in scenario MODs.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Valid Range&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Type, Plugin, Scenario&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Name&lt;br /&gt;
|-&lt;br /&gt;
|desc&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Description&lt;br /&gt;
|-&lt;br /&gt;
|tags&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|The label that describes the game genre shown to players on Steam. If there are multiple labels, please use a half-size semicolon—”;:” and type English characters only.&lt;br /&gt;
&lt;br /&gt;
Scenarios&lt;br /&gt;
&lt;br /&gt;
Maps&lt;br /&gt;
&lt;br /&gt;
Items&lt;br /&gt;
&lt;br /&gt;
Characters&lt;br /&gt;
&lt;br /&gt;
Skills&lt;br /&gt;
&lt;br /&gt;
Appearance&lt;br /&gt;
&lt;br /&gt;
BattleUnits&lt;br /&gt;
&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
Audios&lt;br /&gt;
&lt;br /&gt;
Cheating&lt;br /&gt;
|-&lt;br /&gt;
|start_scene&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|The beginning scene (face editing by default); optional:&lt;br /&gt;
&lt;br /&gt;
0: CG of Sands of Salzaar&lt;br /&gt;
&lt;br /&gt;
1: Character Creation（default option if there is no parameter）&lt;br /&gt;
&lt;br /&gt;
2: Sandbox Scene. You need to customize the main character &lt;br /&gt;
&lt;br /&gt;
(only available when the parameter type is “Story”)&lt;br /&gt;
|-&lt;br /&gt;
|include_main_game&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Decide whether you want to use the resources in the main project of the game (only available when the parameter type is “Story”)&lt;br /&gt;
&lt;br /&gt;
0: do not use any data&lt;br /&gt;
&lt;br /&gt;
1: use all data of Sands of Salzaar（default）&lt;br /&gt;
&lt;br /&gt;
2: only use basic data（recommended for independent story） &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|homepage_background&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Change the background image on the main menu. The full file path of the image is required. This is only available in a scenario MODs.&lt;br /&gt;
|-&lt;br /&gt;
|audioControllerAdditional&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|This is only available in the Professional MOD project. &lt;br /&gt;
&lt;br /&gt;
Full path of the audio middleware is required. (please refer to the example; the parameter can be left empty).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Reference File of Configuration Table: valuebundle/default.xml'''&lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can include multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|file&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping-Rule File of Configuration Table: valuebundle/INDEX.xml''' &lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can convert multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|reg&lt;br /&gt;
|No&lt;br /&gt;
|Corresponds to the file of mapping rules, located under directory data/regV2&lt;br /&gt;
|-&lt;br /&gt;
|from&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. Filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping File of Resource Path: Interface/overrides.txt''' &lt;br /&gt;
&lt;br /&gt;
The file is a common text file, one mapping rule per line.&lt;br /&gt;
&lt;br /&gt;
Please refer to 5.4 Resource Management for more details.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. Configuration Table'''===&lt;br /&gt;
&lt;br /&gt;
===='''3.1 Basic Principles of Config Tables'''====&lt;br /&gt;
&lt;br /&gt;
In Sands of Salzaar, we use the configuration tables to fill in contents. In these tables, you can set different values, configure formulas, write a story, design a logic jump, or configure the paths of resources that are referred to.&lt;br /&gt;
&lt;br /&gt;
Configuration tables are independent excel files, which can be packed up as xml files or executable binary files (values files) with the help of the tools in the HSFramework. &lt;br /&gt;
[[文件:配置表打包流程.jpg|替代=|无|缩略图|554x554像素|配置表打包流程]]&lt;br /&gt;
&lt;br /&gt;
'''As the flow chart has shown above, the process of development is:'''&lt;br /&gt;
&lt;br /&gt;
· MOD developer edits their configuration tables (excel)&lt;br /&gt;
&lt;br /&gt;
 Note: the reg file is our default syntax restriction files of Excel. MOD developer does not need to edit it.&lt;br /&gt;
&lt;br /&gt;
· Run the packing tools to generate executable files (values).&lt;br /&gt;
&lt;br /&gt;
· Run the game client to debug the MOD package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please pay special attention:'''&lt;br /&gt;
&lt;br /&gt;
· Microsoft Excel is recommended for editing configuration tables;&lt;br /&gt;
&lt;br /&gt;
· Each data has its own restriction for syntax and format. If the input is wrong, you will probably encounter errors in the second (pack) or the third (run) stage. Please pay attention to the error information;&lt;br /&gt;
&lt;br /&gt;
· Do not leave empty rows amid the Excel tables for no reason. Otherwise, it might cause unknown errors;&lt;br /&gt;
&lt;br /&gt;
· We do not suggest you make a high number of changes and then debug them all at once, which makes it hard to locate the roots of errors. Therefore, we recommend you to start debugging after making a few changes. It is easier to identify and fix issues this way.&lt;br /&gt;
&lt;br /&gt;
· As players’ saves depend on the definitions in the configuration tables, please DO NOT delete specific IDs in the tables. If the IDs are deleted, players who are using the relevant MODs might have their saves corrupted (since the deleted IDs cannot be found). The correct way is to mark the old data as “obsolete” and start a new line to define a new ID.&lt;br /&gt;
&lt;br /&gt;
===='''3.2 Data Type'''====&lt;br /&gt;
&lt;br /&gt;
Data type refers to the format of the data we write in a specific line in an Excel file.&lt;br /&gt;
&lt;br /&gt;
This format is defined in the reg file (please see the sample project, and refer to the definitions of types of different files under the path data/regV2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common formats are as follow:&lt;br /&gt;
&lt;br /&gt;
int—integer&lt;br /&gt;
&lt;br /&gt;
float—floating point（decimal point）&lt;br /&gt;
&lt;br /&gt;
string—character string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there are format errors in the Excel file, you will encounter an error report when packing.&lt;br /&gt;
&lt;br /&gt;
===='''3.3 Variables and Conditional Expressions'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use halfwidth (aka common English) punctuations!!!'''&lt;br /&gt;
&lt;br /&gt;
A conditional expression group consists of multiple conditional expressions like &amp;quot; [%condition%] [=]1&amp;quot;, connected by symbols such as “|” (or) and “&amp;amp;” (and). “&amp;amp;” (and) has a higher priority than “|” (or). When both sides of a conditional expression are integers, a comparison between them will be returned as a result by default. Otherwise, we have to use character strings to make the comparison, and this method only supports the use of [=] and [&amp;lt;&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
E.g. “[%result_code%][=]1| [%player_money%][&amp;gt;=]100” means that directives will be executed when the result is “1” or the player has 100 coins, while “[%player:level%][&amp;gt;=]3&amp;amp;  [%player_money%][&amp;gt;]100” means that directives will be executed when the player is at least Lv.3 and has more than 100 coins. &lt;br /&gt;
&lt;br /&gt;
Note: Due to a historical reason, both [%xxxx%] and [$xxxx$] can be used in the configuration in Excel. &lt;br /&gt;
&lt;br /&gt;
Regarding conditional expressions, you can refer to the configurations in different kinds of trigger.xls.&lt;br /&gt;
&lt;br /&gt;
===='''3.4 Event Directive Syntax'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use half-size punctuation!!!'''&lt;br /&gt;
&lt;br /&gt;
We use “*” to separate directives and parameters and “#” for separations between parameters. Since a high amount of chat directives are being used, we are allowed to disregard chat directives when coding.&lt;br /&gt;
&lt;br /&gt;
When transferring an event by default, certain environment variables will be imported. Developers can adopt different coding methods such as CUR_ROLE and [%tagrole%] to use the variables. &lt;br /&gt;
&lt;br /&gt;
For detailed directives, please refer to the appendix—Directive Instruction&lt;br /&gt;
&lt;br /&gt;
===='''3.5 Other Hidden Syntax of Config Tables'''====&lt;br /&gt;
Some configuration tables have their hidden syntax. If you fill in the wrong syntax content, there might not be an error report when packing, but errors will occur when you run the game. Please refer to our different sample Excel files when filling in the tables. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''3.6 Principles of MOD Config Tables'''====&lt;br /&gt;
Every Excel file has its ID. If there are repeated IDs, the newly loaded MOD will override the previous one. Thus, it is possible to use MODs to change the game. For example, we can look at a definition in C Initial Setting Table.xls of the standard game.&lt;br /&gt;
&lt;br /&gt;
“init_pos” is the respawning point in the wild rift outside Redstone Keep: 980, -1246&lt;br /&gt;
&lt;br /&gt;
You can create an initial setting table in your MOD to rewrite the key string “init_pos”, which changes the game’s initial respawning point .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''4. Resource Management'''===&lt;br /&gt;
&lt;br /&gt;
===='''4.1 Overview on MOD Resource Management'''====&lt;br /&gt;
Resources refer to the images, audios, models, animations, special effects, and other content we might be using in the game.&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar uses a global namespace for resources. Each resource corresponds to a unique fall path. You can define the “rewriting rules” of resources in your MOD to change the old resource or add a new one.&lt;br /&gt;
&lt;br /&gt;
You can define the rewriting rules in Interface/overrides.txt.&lt;br /&gt;
&lt;br /&gt;
For example, “ABS\Audio\*&amp;gt;:\Buildsource\Audios\* ” represents all content that was originally in the directory ABS\Audios and was later added to BuildSource\Audio (or has overwritten the original content in BuildSource\Audio).&lt;br /&gt;
&lt;br /&gt;
You can define or rewrite the specific rules under ABS or RES in this text file. Specific file reference, as well as Wildcard characters, is supported (for example, “*” represents “all”).&lt;br /&gt;
&lt;br /&gt;
For the current collection of resources in Sands of Salzaar, please refer to the Comparison Table of All Resources.&lt;br /&gt;
&lt;br /&gt;
===='''4.2 Import RES Resource via Standard File System'''====&lt;br /&gt;
All files under RES will be copied to the default game-release directory of Steam when the MOD is created. It works in both Simple MOD projects and Professional MOD projects.&lt;br /&gt;
&lt;br /&gt;
===='''4.3 Import ABS Resource in Unity'''====&lt;br /&gt;
Every directory under ABS will be packed into a single assetbundle by default. This is only possible with a Professional MOD project, and you need to use Unity to build the MOD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''5. Audio Management''' ===&lt;br /&gt;
Please wait for more updates.&lt;br /&gt;
&lt;br /&gt;
==='''6. Face Editor'''===&lt;br /&gt;
You can use the face editing materials in the game to change the appearance of NPCs. In Sands of Salzaar Mod Editor-Face Editor, you can do face editing with the current materials.&lt;br /&gt;
[[文件:捏脸工具启动位置示意.png|无|缩略图|641x641px|捏脸工具启动位置示意]]&lt;br /&gt;
&lt;br /&gt;
The location of the Face Editor&lt;br /&gt;
&lt;br /&gt;
Internal data of face editing is here:&lt;br /&gt;
[[文件:捏脸工具导出示意.png|无|缩略图|641x641像素|捏脸工具导出示意]]&lt;br /&gt;
&lt;br /&gt;
In the highlighted textbox, click “import” to view other appearances.&lt;br /&gt;
After you finish face editing, you can copy and paste this data (as character appearance information) to the corresponding configuration table.&lt;br /&gt;
&lt;br /&gt;
==='''7. Skill Editing'''===&lt;br /&gt;
You can edit the Skill Configuration table and rewrite Assets/BuildSource/SkillData/*.txt to realize skill editing. For detailed rules, please refer to Directive Instruction—Skill Directive Editing.&lt;br /&gt;
&lt;br /&gt;
You can do real-time editing and debugging in the Skill Editor.&lt;br /&gt;
&lt;br /&gt;
==='''8. 3D Model and Animation'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''9. Particle Effect'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''10. Map Editor'''===&lt;br /&gt;
Please wait for more updates.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_flow_chart_of_executing_an_event.png&amp;diff=657</id>
		<title>文件:The flow chart of executing an event.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_flow_chart_of_executing_an_event.png&amp;diff=657"/>
		<updated>2020-09-21T17:44:13Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=656</id>
		<title>Development Tutorial</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Tutorial&amp;diff=656"/>
		<updated>2020-09-21T17:42:28Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 1. Concept of Loops */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Concept of Loops'''===&lt;br /&gt;
[[文件:The flow chart of the major looping logics in Sands of Salzaar.png|无|缩略图|800x800px|The flow chart of the major looping logics in Sands of Salzaar]]&lt;br /&gt;
&lt;br /&gt;
As  shown above, the core loop of the game is “Trigger + Event”.&lt;br /&gt;
&lt;br /&gt;
Trigger is a collection of specific conditions, and event is a collection of directives to be executed.&lt;br /&gt;
&lt;br /&gt;
As players continuously participate in different events, the in-game time elapses. Some events happen at certain moments, and then a set of directives will be carried out—this is the major looping logic of the game.&lt;br /&gt;
&lt;br /&gt;
In an event, all relevant directives will be executed entirely by order-one after another. You can define a conditional jump-to statement at the end of the loop, which allows the event to jump to different results.&lt;br /&gt;
&lt;br /&gt;
[[文件:处理事件流程.jpg|替代=|无|缩略图|处理事件流程]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''2. Project Configuration'''===&lt;br /&gt;
'''Standard Project Configuration File: Config/default.json'''&lt;br /&gt;
&lt;br /&gt;
After configuration, files in .json format will be created, and the key parameters are shown below.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, if the “Valid Range” is Story (type=Story), then the parameter can only be used in scenario MODs.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Valid Range&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Type, Plugin, Scenario&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|No&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Name&lt;br /&gt;
|-&lt;br /&gt;
|desc&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|MOD Description&lt;br /&gt;
|-&lt;br /&gt;
|tags&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|The label that describes the game genre shown to players on Steam. If there are multiple labels, please use a half-size semicolon—”;:” and type English characters only.&lt;br /&gt;
&lt;br /&gt;
Scenarios&lt;br /&gt;
&lt;br /&gt;
Maps&lt;br /&gt;
&lt;br /&gt;
Items&lt;br /&gt;
&lt;br /&gt;
Characters&lt;br /&gt;
&lt;br /&gt;
Skills&lt;br /&gt;
&lt;br /&gt;
Appearance&lt;br /&gt;
&lt;br /&gt;
BattleUnits&lt;br /&gt;
&lt;br /&gt;
Rules&lt;br /&gt;
&lt;br /&gt;
Audios&lt;br /&gt;
&lt;br /&gt;
Cheating&lt;br /&gt;
|-&lt;br /&gt;
|start_scene&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|The beginning scene (face editing by default); optional:&lt;br /&gt;
&lt;br /&gt;
0: CG of Sands of Salzaar&lt;br /&gt;
&lt;br /&gt;
1: Character Creation（default option if there is no parameter）&lt;br /&gt;
&lt;br /&gt;
2: Sandbox Scene. You need to customize the main character &lt;br /&gt;
&lt;br /&gt;
(only available when the parameter type is “Story”)&lt;br /&gt;
|-&lt;br /&gt;
|include_main_game&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Decide whether you want to use the resources in the main project of the game (only available when the parameter type is “Story”)&lt;br /&gt;
&lt;br /&gt;
0: do not use any data&lt;br /&gt;
&lt;br /&gt;
1: use all data of Sands of Salzaar（default）&lt;br /&gt;
&lt;br /&gt;
2: only use basic data（recommended for independent story） &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|homepage_background&lt;br /&gt;
|Yes&lt;br /&gt;
|Story&lt;br /&gt;
|Change the background image on the main menu. The full file path of the image is required. This is only available in a scenario MODs.&lt;br /&gt;
|-&lt;br /&gt;
|audioControllerAdditional&lt;br /&gt;
|Yes&lt;br /&gt;
|Plugin/Story&lt;br /&gt;
|This is only available in the Professional MOD project. &lt;br /&gt;
&lt;br /&gt;
Full path of the audio middleware is required. (please refer to the example; the parameter can be left empty).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Reference File of Configuration Table: valuebundle/default.xml'''&lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can include multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|file&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping-Rule File of Configuration Table: valuebundle/INDEX.xml''' &lt;br /&gt;
&lt;br /&gt;
The file format is .xml, and the file can convert multiple referenced Excel files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Parameter&lt;br /&gt;
|Allow Empty Parameter&lt;br /&gt;
|Description&lt;br /&gt;
|-&lt;br /&gt;
|reg&lt;br /&gt;
|No&lt;br /&gt;
|Corresponds to the file of mapping rules, located under directory data/regV2&lt;br /&gt;
|-&lt;br /&gt;
|from&lt;br /&gt;
|No&lt;br /&gt;
|The names of the configuration tables of your MOD. This file is located in the Excel directory of this MOD project. Filename extension is required.&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mapping File of Resource Path: Interface/overrides.txt''' &lt;br /&gt;
&lt;br /&gt;
The file is a common text file, one mapping rule per line.&lt;br /&gt;
&lt;br /&gt;
Please refer to 5.4 Resource Management for more details.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. Configuration Table'''===&lt;br /&gt;
&lt;br /&gt;
===='''3.1 Basic Principles of Config Tables'''====&lt;br /&gt;
&lt;br /&gt;
In Sands of Salzaar, we use the configuration tables to fill in contents. In these tables, you can set different values, configure formulas, write a story, design a logic jump, or configure the paths of resources that are referred to.&lt;br /&gt;
&lt;br /&gt;
Configuration tables are independent excel files, which can be packed up as xml files or executable binary files (values files) with the help of the tools in the HSFramework. &lt;br /&gt;
[[文件:配置表打包流程.jpg|替代=|无|缩略图|554x554像素|配置表打包流程]]&lt;br /&gt;
&lt;br /&gt;
'''As the flow chart has shown above, the process of development is:'''&lt;br /&gt;
&lt;br /&gt;
· MOD developer edits their configuration tables (excel)&lt;br /&gt;
&lt;br /&gt;
 Note: the reg file is our default syntax restriction files of Excel. MOD developer does not need to edit it.&lt;br /&gt;
&lt;br /&gt;
· Run the packing tools to generate executable files (values).&lt;br /&gt;
&lt;br /&gt;
· Run the game client to debug the MOD package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please pay special attention:'''&lt;br /&gt;
&lt;br /&gt;
· Microsoft Excel is recommended for editing configuration tables;&lt;br /&gt;
&lt;br /&gt;
· Each data has its own restriction for syntax and format. If the input is wrong, you will probably encounter errors in the second (pack) or the third (run) stage. Please pay attention to the error information;&lt;br /&gt;
&lt;br /&gt;
· Do not leave empty rows amid the Excel tables for no reason. Otherwise, it might cause unknown errors;&lt;br /&gt;
&lt;br /&gt;
· We do not suggest you make a high number of changes and then debug them all at once, which makes it hard to locate the roots of errors. Therefore, we recommend you to start debugging after making a few changes. It is easier to identify and fix issues this way.&lt;br /&gt;
&lt;br /&gt;
· As players’ saves depend on the definitions in the configuration tables, please DO NOT delete specific IDs in the tables. If the IDs are deleted, players who are using the relevant MODs might have their saves corrupted (since the deleted IDs cannot be found). The correct way is to mark the old data as “obsolete” and start a new line to define a new ID.&lt;br /&gt;
&lt;br /&gt;
===='''3.2 Data Type'''====&lt;br /&gt;
&lt;br /&gt;
Data type refers to the format of the data we write in a specific line in an Excel file.&lt;br /&gt;
&lt;br /&gt;
This format is defined in the reg file (please see the sample project, and refer to the definitions of types of different files under the path data/regV2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common formats are as follow:&lt;br /&gt;
&lt;br /&gt;
int—integer&lt;br /&gt;
&lt;br /&gt;
float—floating point（decimal point）&lt;br /&gt;
&lt;br /&gt;
string—character string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there are format errors in the Excel file, you will encounter an error report when packing.&lt;br /&gt;
&lt;br /&gt;
===='''3.3 Variables and Conditional Expressions'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use halfwidth (aka common English) punctuations!!!'''&lt;br /&gt;
&lt;br /&gt;
A conditional expression group consists of multiple conditional expressions like &amp;quot; [%condition%] [=]1&amp;quot;, connected by symbols such as “|” (or) and “&amp;amp;” (and). “&amp;amp;” (and) has a higher priority than “|” (or). When both sides of a conditional expression are integers, a comparison between them will be returned as a result by default. Otherwise, we have to use character strings to make the comparison, and this method only supports the use of [=] and [&amp;lt;&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
E.g. “[%result_code%][=]1| [%player_money%][&amp;gt;=]100” means that directives will be executed when the result is “1” or the player has 100 coins, while “[%player:level%][&amp;gt;=]3&amp;amp;  [%player_money%][&amp;gt;]100” means that directives will be executed when the player is at least Lv.3 and has more than 100 coins. &lt;br /&gt;
&lt;br /&gt;
Note: Due to a historical reason, both [%xxxx%] and [$xxxx$] can be used in the configuration in Excel. &lt;br /&gt;
&lt;br /&gt;
Regarding conditional expressions, you can refer to the configurations in different kinds of trigger.xls.&lt;br /&gt;
&lt;br /&gt;
===='''3.4 Event Directive Syntax'''====&lt;br /&gt;
'''Please pay special attention: when editing scripts, you must use half-size punctuation!!!'''&lt;br /&gt;
&lt;br /&gt;
We use “*” to separate directives and parameters and “#” for separations between parameters. Since a high amount of chat directives are being used, we are allowed to disregard chat directives when coding.&lt;br /&gt;
&lt;br /&gt;
When transferring an event by default, certain environment variables will be imported. Developers can adopt different coding methods such as CUR_ROLE and [%tagrole%] to use the variables. &lt;br /&gt;
&lt;br /&gt;
For detailed directives, please refer to the appendix—Directive Instruction&lt;br /&gt;
&lt;br /&gt;
===='''3.5 Other Hidden Syntax of Config Tables'''====&lt;br /&gt;
Some configuration tables have their hidden syntax. If you fill in the wrong syntax content, there might not be an error report when packing, but errors will occur when you run the game. Please refer to our different sample Excel files when filling in the tables. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''3.6 Principles of MOD Config Tables'''====&lt;br /&gt;
Every Excel file has its ID. If there are repeated IDs, the newly loaded MOD will override the previous one. Thus, it is possible to use MODs to change the game. For example, we can look at a definition in C Initial Setting Table.xls of the standard game.&lt;br /&gt;
&lt;br /&gt;
“init_pos” is the respawning point in the wild rift outside Redstone Keep: 980, -1246&lt;br /&gt;
&lt;br /&gt;
You can create an initial setting table in your MOD to rewrite the key string “init_pos”, which changes the game’s initial respawning point .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''4. Resource Management'''===&lt;br /&gt;
&lt;br /&gt;
===='''4.1 Overview on MOD Resource Management'''====&lt;br /&gt;
Resources refer to the images, audios, models, animations, special effects, and other content we might be using in the game.&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar uses a global namespace for resources. Each resource corresponds to a unique fall path. You can define the “rewriting rules” of resources in your MOD to change the old resource or add a new one.&lt;br /&gt;
&lt;br /&gt;
You can define the rewriting rules in Interface/overrides.txt.&lt;br /&gt;
&lt;br /&gt;
For example, “ABS\Audio\*&amp;gt;:\Buildsource\Audios\* ” represents all content that was originally in the directory ABS\Audios and was later added to BuildSource\Audio (or has overwritten the original content in BuildSource\Audio).&lt;br /&gt;
&lt;br /&gt;
You can define or rewrite the specific rules under ABS or RES in this text file. Specific file reference, as well as Wildcard characters, is supported (for example, “*” represents “all”).&lt;br /&gt;
&lt;br /&gt;
For the current collection of resources in Sands of Salzaar, please refer to the Comparison Table of All Resources.&lt;br /&gt;
&lt;br /&gt;
===='''4.2 Import RES Resource via Standard File System'''====&lt;br /&gt;
All files under RES will be copied to the default game-release directory of Steam when the MOD is created. It works in both Simple MOD projects and Professional MOD projects.&lt;br /&gt;
&lt;br /&gt;
===='''4.3 Import ABS Resource in Unity'''====&lt;br /&gt;
Every directory under ABS will be packed into a single assetbundle by default. This is only possible with a Professional MOD project, and you need to use Unity to build the MOD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''5. Audio Management''' ===&lt;br /&gt;
Please wait for more updates.&lt;br /&gt;
&lt;br /&gt;
==='''6. Face Editor'''===&lt;br /&gt;
You can use the face editing materials in the game to change the appearance of NPCs. In Sands of Salzaar Mod Editor-Face Editor, you can do face editing with the current materials.&lt;br /&gt;
[[文件:捏脸工具启动位置示意.png|无|缩略图|641x641px|捏脸工具启动位置示意]]&lt;br /&gt;
&lt;br /&gt;
The location of the Face Editor&lt;br /&gt;
&lt;br /&gt;
Internal data of face editing is here:&lt;br /&gt;
[[文件:捏脸工具导出示意.png|无|缩略图|641x641像素|捏脸工具导出示意]]&lt;br /&gt;
&lt;br /&gt;
In the highlighted textbox, click “import” to view other appearances.&lt;br /&gt;
After you finish face editing, you can copy and paste this data (as character appearance information) to the corresponding configuration table.&lt;br /&gt;
&lt;br /&gt;
==='''7. Skill Editing'''===&lt;br /&gt;
You can edit the Skill Configuration table and rewrite Assets/BuildSource/SkillData/*.txt to realize skill editing. For detailed rules, please refer to Directive Instruction—Skill Directive Editing.&lt;br /&gt;
&lt;br /&gt;
You can do real-time editing and debugging in the Skill Editor.&lt;br /&gt;
&lt;br /&gt;
==='''8. 3D Model and Animation'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''9. Particle Effect'''===&lt;br /&gt;
Function not supported now. Professional MOD project needed.&lt;br /&gt;
&lt;br /&gt;
==='''10. Map Editor'''===&lt;br /&gt;
Please wait for more updates.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_flow_chart_of_the_major_looping_logics_in_Sands_of_Salzaar.png&amp;diff=655</id>
		<title>文件:The flow chart of the major looping logics in Sands of Salzaar.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_flow_chart_of_the_major_looping_logics_in_Sands_of_Salzaar.png&amp;diff=655"/>
		<updated>2020-09-21T17:41:35Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Environment_Building&amp;diff=654</id>
		<title>Development Environment Building</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Environment_Building&amp;diff=654"/>
		<updated>2020-09-21T17:38:56Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. MOD Editor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Recommended Tools'''===&lt;br /&gt;
'''Text Editing Tool:'''&lt;br /&gt;
&lt;br /&gt;
Recommended: Sublime Text or Visual Studio Code&lt;br /&gt;
Note: Please use UTF-8 (8-bit Unicode Transformation Format) at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Excel Editing Tool:'''&lt;br /&gt;
&lt;br /&gt;
Recommended: the latest version of Microsoft Office&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Unity Engine (Optional):'''&lt;br /&gt;
&lt;br /&gt;
Version: Unity 2018.3.14f1&lt;br /&gt;
Link: https://unity3d.com/unity/whats-new/2018.3.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Version Management :'''&lt;br /&gt;
&lt;br /&gt;
Recommended: Github&lt;br /&gt;
Link: https://github.com/&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. MOD Project'''===&lt;br /&gt;
&lt;br /&gt;
===='''2.1 Overview and Project Type'''====&lt;br /&gt;
There are two types of MOD projects, Simple MOD Project and Professional MOD Project. The major difference between these two types is whether you need to download Unity to develop and pack resources.&lt;br /&gt;
You can choose your project type according to your own needs in the MOD development.&lt;br /&gt;
&lt;br /&gt;
The differences are as follow:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Project&lt;br /&gt;
|Simple MOD Project&lt;br /&gt;
|Professional MOD Project&lt;br /&gt;
|-&lt;br /&gt;
|Download Unity&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|One-click Packing&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Upload to Steam Workshop&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Configuration of Basic Information&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Change Login Screen&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Game Configuration Tables&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Use Face Editor to Customize NPC Appearance&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Skill Editor&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Map Editor（Currently only scenarios are supported; relevant functions for plugins are still in development）&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Rewrite Directory&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Common Texts&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Binary Files&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Pictures&lt;br /&gt;
|Yes（PNG &amp;amp; JPG Only）&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Pictures Merging&lt;br /&gt;
（Optimize Picture Batch）&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Audio&lt;br /&gt;
|Yes（PNG &amp;amp; JPG Only）&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Advanced Audio Management（e.g. Audio Mixer）&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management -Particle Effects&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—3D Model and Animation&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Edit Multiple MODs&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''2.2 Simple MOD Project'''====&lt;br /&gt;
Download the a sample Simpld MOD project for Sands of Salzaar (Blywd.SimpleModSample). The content in the directory is:&lt;br /&gt;
&lt;br /&gt;
- Blywd.SimpleModSample&lt;br /&gt;
&lt;br /&gt;
- Directory of ABS Unity resource packing (Professional MOD project only)&lt;br /&gt;
&lt;br /&gt;
- Directory of Config MOD Files&lt;br /&gt;
&lt;br /&gt;
- default.json—main config. files of MOD&lt;br /&gt;
&lt;br /&gt;
- gamemodes.xml—scenario-dependent definition file (only for Scenario MODs)&lt;br /&gt;
&lt;br /&gt;
- publishfileid.txt—item ID for uploading to Steam Workshop, it will be automatically filled by Steam Workshop if it is your first upload. If the file is left empty, then a new Steam Workshop entry will be created.&lt;br /&gt;
&lt;br /&gt;
- workshopitem.json—the configuration uploaded to Steam Workshop, which will be saved automatically according to the player’s choices&lt;br /&gt;
&lt;br /&gt;
- Excel—directory of configuration tables&lt;br /&gt;
&lt;br /&gt;
- Interface—collection of interfaces&lt;br /&gt;
&lt;br /&gt;
- overrides.txt—rule definition for resource override&lt;br /&gt;
&lt;br /&gt;
- RES—resource directory where images and audio files are stored&lt;br /&gt;
&lt;br /&gt;
- preview.jpg/png—preview image for a MOD&lt;br /&gt;
&lt;br /&gt;
- valuebundle—directory of the definition of packing&lt;br /&gt;
&lt;br /&gt;
- default.xml—list of Excel files&lt;br /&gt;
&lt;br /&gt;
- INDEX.xml—list of mapping rules of Excel/reg&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''2.3 Professional MOD Project'''====&lt;br /&gt;
The current version of the game does not support this. Please wait for our update.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. MOD Editor'''===&lt;br /&gt;
To enter the MOD Editor: Main Menu – Mods - Develop Mods&lt;br /&gt;
[[文件:The main panel of the MOD Editor.png|无|缩略图|1000x1000px像素|The main panel of the MOD Editor]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main panel of the MOD Editor might change following the update of versions. All functions are shown above. You can:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.1 Create a new project, or open an existing project.&lt;br /&gt;
&lt;br /&gt;
3.2 Edit, build or upload content with project operation tools.&lt;br /&gt;
&lt;br /&gt;
3.3 Use the debug tool to test your current project in a new game or a save.&lt;br /&gt;
&lt;br /&gt;
3.4 Check out the log information of your current edit.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''Configuration Log Tool'''====&lt;br /&gt;
&lt;br /&gt;
You can use the Debug Log Tool in the MOD Editor to check out the log information during your debugging. This function needs to be configurated in advance. Please find Tools/HSDebugTool/0_setup.bat in the game directory and right-click to run as administrator. &lt;br /&gt;
&lt;br /&gt;
You only need to run this file once before you can use the Debug Log Tool directly.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Development_Environment_Building&amp;diff=653</id>
		<title>Development Environment Building</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Development_Environment_Building&amp;diff=653"/>
		<updated>2020-09-21T17:38:22Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. MOD Editor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Recommended Tools'''===&lt;br /&gt;
'''Text Editing Tool:'''&lt;br /&gt;
&lt;br /&gt;
Recommended: Sublime Text or Visual Studio Code&lt;br /&gt;
Note: Please use UTF-8 (8-bit Unicode Transformation Format) at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Excel Editing Tool:'''&lt;br /&gt;
&lt;br /&gt;
Recommended: the latest version of Microsoft Office&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Unity Engine (Optional):'''&lt;br /&gt;
&lt;br /&gt;
Version: Unity 2018.3.14f1&lt;br /&gt;
Link: https://unity3d.com/unity/whats-new/2018.3.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Version Management :'''&lt;br /&gt;
&lt;br /&gt;
Recommended: Github&lt;br /&gt;
Link: https://github.com/&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. MOD Project'''===&lt;br /&gt;
&lt;br /&gt;
===='''2.1 Overview and Project Type'''====&lt;br /&gt;
There are two types of MOD projects, Simple MOD Project and Professional MOD Project. The major difference between these two types is whether you need to download Unity to develop and pack resources.&lt;br /&gt;
You can choose your project type according to your own needs in the MOD development.&lt;br /&gt;
&lt;br /&gt;
The differences are as follow:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Project&lt;br /&gt;
|Simple MOD Project&lt;br /&gt;
|Professional MOD Project&lt;br /&gt;
|-&lt;br /&gt;
|Download Unity&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|One-click Packing&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Upload to Steam Workshop&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Configuration of Basic Information&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Change Login Screen&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Game Configuration Tables&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Use Face Editor to Customize NPC Appearance&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Skill Editor&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Map Editor（Currently only scenarios are supported; relevant functions for plugins are still in development）&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Rewrite Directory&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Common Texts&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Binary Files&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Pictures&lt;br /&gt;
|Yes（PNG &amp;amp; JPG Only）&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Pictures Merging&lt;br /&gt;
（Optimize Picture Batch）&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—Audio&lt;br /&gt;
|Yes（PNG &amp;amp; JPG Only）&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Advanced Audio Management（e.g. Audio Mixer）&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management -Particle Effects&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Resource Management—3D Model and Animation&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|Edit Multiple MODs&lt;br /&gt;
|No&lt;br /&gt;
|Yes&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''2.2 Simple MOD Project'''====&lt;br /&gt;
Download the a sample Simpld MOD project for Sands of Salzaar (Blywd.SimpleModSample). The content in the directory is:&lt;br /&gt;
&lt;br /&gt;
- Blywd.SimpleModSample&lt;br /&gt;
&lt;br /&gt;
- Directory of ABS Unity resource packing (Professional MOD project only)&lt;br /&gt;
&lt;br /&gt;
- Directory of Config MOD Files&lt;br /&gt;
&lt;br /&gt;
- default.json—main config. files of MOD&lt;br /&gt;
&lt;br /&gt;
- gamemodes.xml—scenario-dependent definition file (only for Scenario MODs)&lt;br /&gt;
&lt;br /&gt;
- publishfileid.txt—item ID for uploading to Steam Workshop, it will be automatically filled by Steam Workshop if it is your first upload. If the file is left empty, then a new Steam Workshop entry will be created.&lt;br /&gt;
&lt;br /&gt;
- workshopitem.json—the configuration uploaded to Steam Workshop, which will be saved automatically according to the player’s choices&lt;br /&gt;
&lt;br /&gt;
- Excel—directory of configuration tables&lt;br /&gt;
&lt;br /&gt;
- Interface—collection of interfaces&lt;br /&gt;
&lt;br /&gt;
- overrides.txt—rule definition for resource override&lt;br /&gt;
&lt;br /&gt;
- RES—resource directory where images and audio files are stored&lt;br /&gt;
&lt;br /&gt;
- preview.jpg/png—preview image for a MOD&lt;br /&gt;
&lt;br /&gt;
- valuebundle—directory of the definition of packing&lt;br /&gt;
&lt;br /&gt;
- default.xml—list of Excel files&lt;br /&gt;
&lt;br /&gt;
- INDEX.xml—list of mapping rules of Excel/reg&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''2.3 Professional MOD Project'''====&lt;br /&gt;
The current version of the game does not support this. Please wait for our update.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''3. MOD Editor'''===&lt;br /&gt;
To enter the MOD Editor: Main Menu – Mods - Develop Mods&lt;br /&gt;
[[文件:The main panel of the MOD Editor.png|无|缩略图|800x800px像素|The main panel of the MOD Editor]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main panel of the MOD Editor might change following the update of versions. All functions are shown above. You can:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.1 Create a new project, or open an existing project.&lt;br /&gt;
&lt;br /&gt;
3.2 Edit, build or upload content with project operation tools.&lt;br /&gt;
&lt;br /&gt;
3.3 Use the debug tool to test your current project in a new game or a save.&lt;br /&gt;
&lt;br /&gt;
3.4 Check out the log information of your current edit.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''Configuration Log Tool'''====&lt;br /&gt;
&lt;br /&gt;
You can use the Debug Log Tool in the MOD Editor to check out the log information during your debugging. This function needs to be configurated in advance. Please find Tools/HSDebugTool/0_setup.bat in the game directory and right-click to run as administrator. &lt;br /&gt;
&lt;br /&gt;
You only need to run this file once before you can use the Debug Log Tool directly.&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_main_panel_of_the_MOD_Editor.png&amp;diff=652</id>
		<title>文件:The main panel of the MOD Editor.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:The_main_panel_of_the_MOD_Editor.png&amp;diff=652"/>
		<updated>2020-09-21T17:36:58Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=651</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=651"/>
		<updated>2020-09-21T17:35:07Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|无|缩略图|600x600px|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:A diagram of the sequence of loading MODs.png||无|缩略图|600x600px|A diagram of the sequence of loading MODs]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:A_diagram_of_the_sequence_of_loading_MODs.png&amp;diff=650</id>
		<title>文件:A diagram of the sequence of loading MODs.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:A_diagram_of_the_sequence_of_loading_MODs.png&amp;diff=650"/>
		<updated>2020-09-21T17:34:22Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=649</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=649"/>
		<updated>2020-09-21T17:33:31Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|无|缩略图|600x600px|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Relationship_between_a_Scenario_and_Plugins.png&amp;diff=648</id>
		<title>文件:Relationship between a Scenario and Plugins.png</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=%E6%96%87%E4%BB%B6:Relationship_between_a_Scenario_and_Plugins.png&amp;diff=648"/>
		<updated>2020-09-21T17:33:06Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=647</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=647"/>
		<updated>2020-09-21T17:29:36Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|无|缩略图|789x789px|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=646</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=646"/>
		<updated>2020-09-21T17:29:18Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|缩略图|789x789px|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=645</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=645"/>
		<updated>2020-09-21T17:29:00Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|替代=|无|缩略图|789x789px|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=644</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=644"/>
		<updated>2020-09-21T17:27:42Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|替代=|无|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=643</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=643"/>
		<updated>2020-09-21T17:27:28Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|替代=|无|缩略图|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=642</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=642"/>
		<updated>2020-09-21T17:27:14Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png||'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=641</id>
		<title>Introduction to MOD</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Introduction_to_MOD&amp;diff=641"/>
		<updated>2020-09-21T17:26:35Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 3. Structure and Basic Concepts of MODs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''1. Functions of MOD'''===&lt;br /&gt;
&lt;br /&gt;
Sands of Salzaar is open to MODs. The structure of the game allows expansion functions to be added. You can realize the following functions with our tool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1 Add new elements to the original game, which includes new stories, factions, heroes, soundtracks, units, map elements, and artwork.&lt;br /&gt;
&lt;br /&gt;
1.2 Adjust values of different aspects—battles, economy, rules of the world, starting composition etc.&lt;br /&gt;
&lt;br /&gt;
1.3 Change default materials. You can use more attractive images of characters or import new minion units, heroes, and models of Bosses.&lt;br /&gt;
&lt;br /&gt;
1.4 Use the framework of Sands of Salzaar to create a new scenario, a story of the “three kingdoms”, for example.&lt;br /&gt;
&lt;br /&gt;
1.5 Attach plugins to one scenario, which can be an expansion pack of heroes, stories or items, extra missions, or new rules and functions of the in-game world.&lt;br /&gt;
&lt;br /&gt;
1.6 More to come……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After developing your MOD, you can upload it to the Steam Workshop to share it with your friends or players around the world; you can also copy the files and send the MOD to others. As long as the recipients have downloaded Sands of Salzaar, they can experience the content you created.&lt;br /&gt;
&lt;br /&gt;
All in all, just let your mind go wild, create tons of entertaining content within the structure, and share them with others.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''2. Differences Between Scenario and Plugin'''=== &lt;br /&gt;
&lt;br /&gt;
This game includes two kinds of MODs: Scenario and Plugin.&lt;br /&gt;
A Scenario refers to a piece of playable content, a game that can be run independently—like how the original Sands of Salzaar is a scenario; a Plugin is an expansion that can be added to a specific scenario or the original scenario; it can modify characters, units, and abilities, add mission enhancement and item expansion elements, as well as specific character classes.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''3. Structure and Basic Concepts of MODs'''=== &lt;br /&gt;
&lt;br /&gt;
'''3.1 One Scenario and Multiple Plugins'''&lt;br /&gt;
&lt;br /&gt;
The game depends on a scenario to run. Although only one Scenario can be selected at a time, multiple Plugins can be added to supplement it, which means that plugins cannot run on their own.&lt;br /&gt;
[[文件:Relationship between a Scenario and Plugins.png|'''Relationship between a Scenario and Plugins''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.2 Loading Sequence of MODs'''&lt;br /&gt;
&lt;br /&gt;
There is a loading sequence of MODs. The game will first load a Scenario, and then the following Plugins according to their configurations’ sequence. If two similar elements are defined, the plugin loaded last will override elements modified by the previous one.&lt;br /&gt;
&lt;br /&gt;
When designing your MOD, you can define their &lt;br /&gt;
dependencies (which MOD must be loaded before itself). By doing so, even if a player configures a wrong loading sequence on the configuration interface, the correct sequence will come into effect when the game starts.&lt;br /&gt;
[[文件:MOD调用顺序示意图.jpg|替代=|无|缩略图|495x495px|MOD调用顺序示意图]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''4. Cross-Platform Possibility and Programmable Expansion'''===&lt;br /&gt;
Our game is released in the il2cpp format, which means its code cannot be viewed with C# decompiling tools, like dnSpy. You cannot insert customized code in a hook to create an advanced MOD.&lt;br /&gt;
&lt;br /&gt;
As we are considering to bring this game to both mobile devices and consoles, we hope that all MODs can be loaded on different platforms (without additional programming). In this case, we offer a unified development environment and syntax. Please code your MOD following our format.&lt;br /&gt;
&lt;br /&gt;
Currently, in our configuration tables, we have a set of logic and syntax, which resembles programming but is much easier to understand.&lt;br /&gt;
&lt;br /&gt;
We are also considering about publicizing our programming interface of Lua, opening up more potential for MOD development. Let’s wait and see!&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''5. Problem Report'''===&lt;br /&gt;
If you meet any problem, you can discuss it with other players in the MOD developer community on Steam—Sands of Salzaar—Discussions.&lt;br /&gt;
&lt;br /&gt;
You can add a [MOD DEV] tag in the title of your post so we can take a look and reply in time.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Map_Editor&amp;diff=639</id>
		<title>Map Editor</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Map_Editor&amp;diff=639"/>
		<updated>2020-09-21T17:19:02Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 地图图块绑定方法 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==='''Tile Binding'''===&lt;br /&gt;
Enter content that follows the format below in the Binding Info field of a tile’s attribute.&lt;br /&gt;
&lt;br /&gt;
Binding type:bound object ID:parameter.&lt;br /&gt;
&lt;br /&gt;
E.g. place_wgt:ID1.&lt;br /&gt;
&lt;br /&gt;
In the world map, the following binding types are supported:&lt;br /&gt;
&lt;br /&gt;
*place_wgt: Location-bound tile. The object ID is the location ID. No parameter.&lt;br /&gt;
*place_firepos: Position of a burning place. The object ID is the location ID. No parameter.&lt;br /&gt;
*trigger_wgt: Trigger-bound tile. The object ID is the trigger ID. No Parameter.&lt;br /&gt;
*obs_wgt: Obstacle-bound tile. The object ID is the Obstacle ID. No parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the battle maps and dungeon maps, the following bindings are supported:&lt;br /&gt;
&lt;br /&gt;
*bind_area: Collision-area-bound Tile. The object ID is the control ID of the collision area.&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Map Object Control Info'''===&lt;br /&gt;
Please note: this field only works on battle maps and dungeon maps.&lt;br /&gt;
&lt;br /&gt;
Enter content that follows the format below in the Binding Info field of a tile’s attribute.&lt;br /&gt;
&lt;br /&gt;
Control ID: initial status (0: Normal; -1: Hidden).&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Map_Editor&amp;diff=638</id>
		<title>Map Editor</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Map_Editor&amp;diff=638"/>
		<updated>2020-09-21T17:17:57Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：创建页面，内容为“===地图图块绑定方法=== 在图块属性中的绑定信息字段中输入如下信息格式：  绑定类型:绑定对象ID:绑定参数信息  如： place_wg…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===地图图块绑定方法===&lt;br /&gt;
在图块属性中的绑定信息字段中输入如下信息格式：&lt;br /&gt;
&lt;br /&gt;
绑定类型:绑定对象ID:绑定参数信息&lt;br /&gt;
&lt;br /&gt;
如： place_wgt:ID1&lt;br /&gt;
&lt;br /&gt;
在大地图中，绑定类型支持如下几个类型：&lt;br /&gt;
&lt;br /&gt;
*place_wgt：地点绑定贴图，对象ID为地点ID，无参数&lt;br /&gt;
*place_firepos：地点着火点位置，对象ID为地点ID，无参数&lt;br /&gt;
*trigger_wgt：触发器绑定贴图，对象ID为触发器ID，无参数&lt;br /&gt;
*obs_wgt：绑定到障碍物，对象ID为障碍物，无参数&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
在战斗地图及地城地图中，格式绑定类型支持如下几个类型：&lt;br /&gt;
&lt;br /&gt;
*bind_area：碰撞区域绑定，对象ID为碰撞区域的控制ID&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 地图对象控制信息 ===&lt;br /&gt;
注意：该字段目前仅在战斗地图及地城地图中生效&lt;br /&gt;
&lt;br /&gt;
在图块属性中的控制信息字段输入如下信息格式：&lt;br /&gt;
&lt;br /&gt;
控制ID:初始状态（0：正常  -1：隐藏）&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=637</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=637"/>
		<updated>2020-09-21T17:15:48Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* Editing of Trigger Scripts Attached to Unit Object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Script Directives in Battles===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
===List of Script Directives in Battles===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
&lt;br /&gt;
Function: show a paragraph with a character painting and typewriter effect.&lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''Empty Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: an empty directive. Nothing happens.&lt;br /&gt;
&lt;br /&gt;
Format: NOTHING*1.&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump To'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another scenario event ID.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Option'''&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
&lt;br /&gt;
Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second)&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''Pause Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: pause the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: PAUSE*.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''Continue Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: continue the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: RESUME*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
&lt;br /&gt;
Function: set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]].&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: units on the battlefield can have chat bubbles over their heads, which show their words.&lt;br /&gt;
&lt;br /&gt;
Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''Enemy Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all enemies send reinforcement according to a specific unit list.&lt;br /&gt;
&lt;br /&gt;
Format: ENEMY_REINF*minion list.&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''Ally Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all allies send reinforcement according to a specific unit configuration list.&lt;br /&gt;
&lt;br /&gt;
Format: FRIEND _REINF*minion list&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''Retreat Order'''&lt;br /&gt;
&lt;br /&gt;
Function: order all allies to retreat.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''End Battle by Force'''&lt;br /&gt;
&lt;br /&gt;
Function: end the current battle instantly.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_OVER*code (0: Victory; 1: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''Eliminate All Targets'''&lt;br /&gt;
&lt;br /&gt;
Function: deals massive damage to all units of one side to kill them within a second.&lt;br /&gt;
&lt;br /&gt;
Format: KILL_ALL*0 (0: Ally; 1: Enemy).&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''Player Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff the character controlled by the player so that it will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_PLAYER*1.&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''All Units Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff all units on the battlefield so that they will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_ALL*0 (0: Ally; 1: All units).&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''Unit Uses Ability'''&lt;br /&gt;
&lt;br /&gt;
Function: command-specific units on the battlefield to use skills.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Caster ID is the identification ID of the target and can have the following unique values:&lt;br /&gt;
&lt;br /&gt;
'''· PLAYER:''' player '''GM_A:''' the pre-set object of the attacking side '''GM_B:''' the pre-set object of the defending side.&lt;br /&gt;
&lt;br /&gt;
'''· THIS:''' directive giver (usually goes back to the emitter itself). &lt;br /&gt;
&lt;br /&gt;
'''· EMITTER=ID:''' a dungeon emitter of a specific ID, which can be “THIS” to represent the current dungeon emitter. &lt;br /&gt;
&lt;br /&gt;
'''· RND_FRIEND_UNIT:''' random ally units '''RND_ENEMY_UNIT:''' random enemy units. &lt;br /&gt;
&lt;br /&gt;
When a caster is a pre-set object, coordinate parameter 1 represents its initial coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''Refresh Dungeon Unit'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh units that have been defined on the battlefield.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_SPAWN*control ID#value of ignoring status (unit will be refreshed even they are defeated; 0: Yes by default; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''Set Dungeon Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter in a dungeon.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUNGEON_TS*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''End Dungeon Fight'''&lt;br /&gt;
&lt;br /&gt;
Function: end this dungeon fight and execute relative actions.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_OVER*result value (0: exit; 1: victory; 2: loss).&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific obstacle area.&lt;br /&gt;
&lt;br /&gt;
Format: SET_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''Set Decoration Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific map decoration.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WIDGET*control ID#status (0: Normal; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''Set Dungeon Teleporter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a dungeon teleporter and its relevant model.&lt;br /&gt;
&lt;br /&gt;
Format:  SET_TP*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''Set Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter.&lt;br /&gt;
&lt;br /&gt;
Format: SET_EMITTER*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''Set Player Model'''&lt;br /&gt;
&lt;br /&gt;
Function: set the model of the character controlled by the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_MODE*unit model description info.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''Set Player’s Current Skills'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current skills of the player’s character.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_SKILL*skill ID 1, level| skill ID 1, level| …| skill ID N, level (4 skills at most).&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''Execute Skill Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute skill directives.&lt;br /&gt;
&lt;br /&gt;
Format: SKILL_CMD*content of the skill directive.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''Set Custom Int Field in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom int field in battles&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: set the camera mode in battles.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available camera modes and meanings of the parameters are:&lt;br /&gt;
&lt;br /&gt;
· 0: follows the player’s character. No parameter (default)..&lt;br /&gt;
&lt;br /&gt;
· 1: follows a specific target. The parameter is the object ID of the target unit.&lt;br /&gt;
&lt;br /&gt;
· 2: coordinate on the battlefield. The parameter is X and Y.&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''Compulsory Attack'''&lt;br /&gt;
&lt;br /&gt;
Function: command a unit to attack another unit.&lt;br /&gt;
&lt;br /&gt;
Format: ATTACK*attacker object ID#target object ID.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''Unit Control Directive Sequence'''&lt;br /&gt;
&lt;br /&gt;
Function: give an array of directives to one unit. The unit will execute the directives according to their sequence.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_QUEUE*target object ID#event IDs in the commanding script (fill the content of command sequence into this event to execute).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The command sequence (the time parameter stands for the time before the next directive is executed) can be:&lt;br /&gt;
&lt;br /&gt;
Directive type 1 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
Directive type 2 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Currently, available sequence directive types are:&lt;br /&gt;
&lt;br /&gt;
· skill_cmd: execute skill directives: the parameter is a line of skill directives.&lt;br /&gt;
&lt;br /&gt;
· use_skill: use abilities: ability ID, ability level#target unit object parameter#target position parameter.&lt;br /&gt;
&lt;br /&gt;
· event: execute battle events: event ID in battles#execution condition (optional).&lt;br /&gt;
&lt;br /&gt;
· 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).&lt;br /&gt;
&lt;br /&gt;
· set_dir: set unit’s direction: direction is the parameter.&lt;br /&gt;
&lt;br /&gt;
· keep_act: keep performing one action: action ID (default action when empty)#loop times (loop endlessly when &amp;lt;=0; 1 by default)#time per action (default action when &amp;lt;=0; 0 by default).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''Set Unit Battle Tactic'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current battle tactic for a unit.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available main tactic types are:&lt;br /&gt;
&lt;br /&gt;
· 0: Attack (the parameter is the radius of awakening, which becomes endless long when the parameter is lower than 0).&lt;br /&gt;
&lt;br /&gt;
· 1: Defend (the parameter is the radius of defending).&lt;br /&gt;
&lt;br /&gt;
· 2: Follow (the parameter is the radius of following).&lt;br /&gt;
&lt;br /&gt;
· 3: Occupy.&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''Set Unit Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer on a unit, which will trigger and complete a specific event.&lt;br /&gt;
&lt;br /&gt;
Format: SET_UNIT_TIMER*target object ID#timer ID#time parameter (disabled when &amp;lt;=0; a timer only works when the unit has an “on timer” trigger event).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''Use Channeling Skill Instantly'''&lt;br /&gt;
&lt;br /&gt;
Function: stop channeling and use the skill instantly (works only when the target is channeling their skill.)&lt;br /&gt;
&lt;br /&gt;
Field 1, value 1|Field 2, value 2|…&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''Replace Unit Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current skill of a unit.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''Replace Unit Dungeon Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current dungeon skill of a unit.&lt;br /&gt;
&lt;br /&gt;
Format: REPLACE_DGSKILL*target object ID#dungeon skill ID, level (empty skill ID or null means the dungeon skill is disabled).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''Battlefield Message'''&lt;br /&gt;
&lt;br /&gt;
Function: broadcast a battlefield message.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_MSG*message type (0: Normal; 1: Warning).&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''Set Battle Checker Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of Battle Checker.&lt;br /&gt;
&lt;br /&gt;
Format: SET_BATTLE_CHECKER*status (0: Disabled; 1: Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''Show End-Battle Button'''&lt;br /&gt;
&lt;br /&gt;
Function: show the button for the player to end battles manually.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_BATTLEOVER_BTN*1.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''Show Debug Info'''&lt;br /&gt;
&lt;br /&gt;
Function: show debug info.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_DEBUG_INFO*status value (0: Disabled; 1: Show buff info of player’s character).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel between the player’s character and a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Global Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer to delay the execution of some scripts.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timer ID#time parameter (second; function is disabled when the parameter &amp;lt;= 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).&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''Generate Unit in Area'''&lt;br /&gt;
&lt;br /&gt;
Function: generate units in batch in a specific area.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a certain number of items from the player’s inventory.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_EXP*EXP#target hero ID（optional; player’s character by default).&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''Manage Hero Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: manage the skills of a hero. You can add, replace, or remove the skills of the hero.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''Execute LUA Function'''&lt;br /&gt;
&lt;br /&gt;
Function: execute specific functions in the currently loaded LUA script.&lt;br /&gt;
&lt;br /&gt;
Format: CALL_LUAFUNC*function name in the script.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''Add Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: add an interactive object on the current battlefield.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt;= 0)# event ID after refreshment (the ID of the event-triggered after refreshment).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''Remove Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTER_OBJECT#control ID (“THIS” can be used to refer to the object itself in an interactive script event).&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''Change Status of Interactive Object'''&lt;br /&gt;
&lt;br /&gt;
Function: change the status of an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport to Other Instance Maps'''&lt;br /&gt;
&lt;br /&gt;
Function: teleport all allies to the target instance map.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*map ID (needs to be defined in “F副本地图信息表”); X coordinate, Y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''Remote Execution Request'''&lt;br /&gt;
&lt;br /&gt;
Function: Send a request to all clients to execute an event.&lt;br /&gt;
&lt;br /&gt;
Format: REMOTE_EVENT*event ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Value Query in Battles===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Results of different event scripts in battles (e.g., the result of an option box).&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|How long the current battle has been going on (integer).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|Return a different random number each time (A&amp;lt;= this number &amp;lt;= B.)&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the result of the last [%rnd:A,B%] query.&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|Return a random number （0~100）that stays the same during the execution period.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|Return the X value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|Return the Y value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|Return the coordinate of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|The ID of the last skill used by the current queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|Type of the executor of the current directive (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|Type of the current queried target object (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|Level of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|Level of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|HP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|HP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|MP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|MP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|The number of ally units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|The number of enemy units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|Check if the current hit target is an enemy of the caster (1: Enemy; 0: Not Enemy.)&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|Current battle result.&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|Level of a specific skill ID of the current source object; returns 0 if the level is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|A basic physical attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|A basic magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|An overall magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|Number of stacks of source object’s current BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|The current number of stacks of target object’s specific BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|Weapon type of the queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|Weapon type of the queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|Value of charging of this damage（0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|The parameter of the current command line.&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|Return the parameter of the current command line, and the parameter increases by 1 instantly.&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|INDEX value of the loop where the current command line is located.&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|Add the target unit to the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|Remove the target unit from the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|Reset the current search list. It always returns 1.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|Randomly enumerate values, and return the RES value of one of the enumerated ones according to their probability distribution.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
[%rnd_enum:25,1:40,2:35,3%] means that is a 25% chance to return “1”, 40% for “2”, and 35% for “3”.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|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).&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|Return the number of refreshed units that have not been defeated and have the “TAG” tag on the current battlefield.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|Value of the defeated ally counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|Value of the defeated enemy counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated-ally counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated enemy -counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|Return the value in a custom dungeon int field of a specific KEY.&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|Return the remaining time of the timer (whose ID is “TIMER_ID”) on a unit with a specific UNIT_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current directive executor (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current queried target object (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|Number of special effect units with a specific TAG&lt;br /&gt;
&lt;br /&gt;
Please note: this only counts the special effect units created by the caster.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|The unit ID of the current queried object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|The unit ID of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|Actual damage or healing amount to a target unit in the current casting.&lt;br /&gt;
&lt;br /&gt;
Please: this only works in the hit directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|Check if the current skill or damage comes into effect when the caster is invisible （0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|Times of the current skill is actually hitting units.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.7.4.2 to be executed.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|Return the skill list of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|Return the skill list of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.8.0.1 to be executed&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|Return the client ID of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|Return the client ID of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|Player’s money in the game.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a specific item or resource in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Damage Expression===&lt;br /&gt;
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:&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
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 [&amp;amp;expression&amp;amp;] format);&lt;br /&gt;
&lt;br /&gt;
Currently supported damage expression key-value is：&lt;br /&gt;
&lt;br /&gt;
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen&lt;br /&gt;
*dmg: physical damage value. The value is the damage expression.&lt;br /&gt;
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.&lt;br /&gt;
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000.&lt;br /&gt;
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.&lt;br /&gt;
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.&lt;br /&gt;
*act: play unit action when they are hit. 0: No; 1: Yes&lt;br /&gt;
*eft ID: special effect ID (when the unit is hit).&lt;br /&gt;
*trig: trigger damage effect (e.g., damage reflection).&lt;br /&gt;
*attack_type: decide the type of weapon attacks that caused the damage.&lt;br /&gt;
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]: a random integer (min_val&amp;lt;= this integer&amp;lt;= max_val).&lt;br /&gt;
*[%field%]: field stands for a random value defined in a character attribute field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Skill Directive Editing'''===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
 0*conditional expression 1#skill directive 1&lt;br /&gt;
 0.2#skill directive 2&lt;br /&gt;
 ……&lt;br /&gt;
When the conditional expression is not empty, the execution of results will be judged accordingly.&lt;br /&gt;
&lt;br /&gt;
In conditional statements, you can use built-in directives to realize some special effects, such as repetition.&lt;br /&gt;
 *REPEAT_START:9&lt;br /&gt;
 Statement 1&lt;br /&gt;
 Statement 1&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#skill directive&lt;br /&gt;
 ...&lt;br /&gt;
 Statement N&lt;br /&gt;
 *REPEAT_END&lt;br /&gt;
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. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
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”.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Currently, supported skill directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Skill Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''Stop all current skill casting actions instantly and act according to previous directives.'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''Add a pre-defined special effect unit onto the battlefield.'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.)&lt;br /&gt;
Initial position format: position type, offset X, offset Y, offset Z (the offset value is the offset from the initial direction.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Supported position types:&lt;br /&gt;
&lt;br /&gt;
*cast_pos: the preset position of skill casting.&lt;br /&gt;
*tag_pos: the target position or target coordinate of skills.&lt;br /&gt;
*hit_pos: the position of units hit by skills.&lt;br /&gt;
*unit_pos: the position of the skilled caster.&lt;br /&gt;
*start_pos: the beginning position of the caster when they cast skills.  &lt;br /&gt;
*rnd_pos: any position around the skilled caster.&lt;br /&gt;
*dim_pos: the preset position defined by the set_dimpos directive.&lt;br /&gt;
*reinf_pos: the position of reinforcement of the skill caster’s side.&lt;br /&gt;
*emitter_pos=EMITTER_ID: the position of emitter whose ID is EMITTER_ID.&lt;br /&gt;
*unit_round=DIR:LEN: the position that is LEN away from the skilled caster, with an offset degree of DIR from the positive direction.&lt;br /&gt;
*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).&lt;br /&gt;
*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.&lt;br /&gt;
*……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Supported movement types are:&lt;br /&gt;
&lt;br /&gt;
*0: No movement and no parameter.&lt;br /&gt;
*1: move to the target position of a skill. Offset X, offset Y, and offset Z.&lt;br /&gt;
*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).&lt;br /&gt;
*3: move in a specific direction. Offset degree, distance (no longer than the width of the battlefield).&lt;br /&gt;
*4: move back and forth in a specific direction. Offset degree, distance (no longer than the width of the battlefield).&lt;br /&gt;
*5: follow a target. Following type (0: Fixed Relative Position; 1: Emitter’s Position), offset X, offset Y, offset Z, duration (-1: Eternal).&lt;br /&gt;
*6: move to dim_pos. Offset X, offset Y, offset Z.&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''Damage check'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#check type#damage expression#target object parameter#check parameter list (use “,” to separate)# filter repetitive check object(optional; set disabled by default.)&lt;br /&gt;
Supported check types are:&lt;br /&gt;
&lt;br /&gt;
*0: single check (see next section when the target unit is the target object parameter; emptiness means the target of skills).&lt;br /&gt;
*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.&lt;br /&gt;
*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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''Grant a BUFF on a target'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, supported built-in target parameters are:&lt;br /&gt;
&lt;br /&gt;
*caster: skill caster.&lt;br /&gt;
*target: target unit (unit of target-oriented skills or unit hit by skills.)&lt;br /&gt;
*roleid,ROLEID: search for a target object whose unit-bound ID is ROLEID.&lt;br /&gt;
*buffgiver,BUFFID: search for a buff giver who gave the buff (whose ID is BUFFID field) to the current caster.&lt;br /&gt;
*find_tag_res: search for a result of a specific target (must execute [%find_tag:TAGINFO%] before calling.)&lt;br /&gt;
*tag_next_fu,distance D：the next ally unit whose distance from the current hit target is shorter than distance D.&lt;br /&gt;
*caster_next_fu,distance D: the next ally unit whose distance from the current caster is shorter than distance D.&lt;br /&gt;
*caster_next_eu,distance D: the next enemy unit whose distance from the current caster is shorter than distance D.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''Remove a BUFF from a target'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#remove target (same as above)#removal type#parameter 1, parameter 2,parameter 3...&lt;br /&gt;
Currently, supported removal methods are:&lt;br /&gt;
&lt;br /&gt;
*0· : remove all.&lt;br /&gt;
*1: remove a specific buff. Parameter 1 is the BUFF ID; parameter 2 is the number of removed stacks (-1: remove all by default).&lt;br /&gt;
*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).&lt;br /&gt;
*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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''Dash'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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 &amp;gt;= 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).&lt;br /&gt;
Movement types are:&lt;br /&gt;
&lt;br /&gt;
*0: uniform motion.&lt;br /&gt;
*1: jump.&lt;br /&gt;
*2: knockback.&lt;br /&gt;
*3: knock up (when the movement type is knock-up, the speed parameter stands for the air time of the hit unit).&lt;br /&gt;
&lt;br /&gt;
The speed parameter is the horizontal speed of the characters’ movement (when the speed is lower than0, the character flash to the target position).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
“Bound Special Effect” is the special effect ID attached to the unit when they are moving.&lt;br /&gt;
&lt;br /&gt;
“Skill to cast after movement” is the ID of the skill that will be cast right after the movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''Stop dashing'''&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''Physical explosion at the target position'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#initial position (see the instruction on Skill Position Parameter Format)#explosion radius#intensity parameter&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''Physical explosion at the target position'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''Knock back the target once'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#sound effect ID#sound effect position (see explanation in Section 1)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''Play a sound effect from the SFX Dictionary according to the model configuration.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#SFX Dictionary KEY#unit target parameter&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''Play a specific sound effect at a caster’s position'''&lt;br /&gt;
 cast_sound#sound effect ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''Play a chain-like special effect'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#caster unit#target unit#pre-made special effect unit#spreading speed(-1: instantly)#duration# damage expression when targets get hit.&lt;br /&gt;
For the parameter of caster unit, please refer to the instruction on the Skill Directive Target Parameter.&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''Taunt and make target attack the caster instantly'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#caster#targe&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''ast any single-target skill that does not need channeling''' &amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#skill ID,skill level (set default by 1)#caster#target#target position parameter&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''Operate the parameter of the current command line&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#operation method#operation value D&lt;br /&gt;
Methods: 0: set to be valued D; 1: increase value D; 2: decrease value D&lt;br /&gt;
&lt;br /&gt;
'''''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.'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''Preset position parameter'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#operation method#operation parameter[#offset parameter(only works when inquiring on the unit’s position)].&lt;br /&gt;
Methods：&lt;br /&gt;
&lt;br /&gt;
*0: Ally reinforcement position. Parameters are the offset of X, Y, and Z.&lt;br /&gt;
*1: Query target unit position query. Parameters are query directives (see Section 4).&lt;br /&gt;
*2: Query skill parameter position query Parameters are query directives (see Section 2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''Play a defined skill action'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#target unit#skill action ID#play speed coefficient (set 1 by default)#stop moving or not(set No by default).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''Summon a unit'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.&lt;br /&gt;
Method: 0: a mirror image of the object; 1: summon by character ID; 2：summon by minion ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the initial position parameter, please see Section 2 of this chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attached status is the attached attribute list of the unit. E.g. “s_HP,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_Attack,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]” means that the summoned unit has half of the original unit’s HP and Attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attached special effect parameter: 0: Default; 1: Show half-transparent shadow effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unit Faction Reference Target Parameter: the current faction of the target is the faction of the summoned units (caster’s faction by default).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''Change the current position of a target by force'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#operation object (same as Section 4)#position info (same as Section 2.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''Set activation status of a target'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''Target is knocked down instantly (ignore invincibility)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit# operation object parameter (same as Section 4).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''Target falls automatically'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit# operation object parameter (same as Section 4).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''Chat bubble above the target’s head'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#operation object#dialogue content#duration (count by second; neglectable).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''Target shouts out words (mostly skills)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#operation object#words.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''Set around battlefield warning area'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#target position info#radius#duration (second).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''TimeLine skill object'''&lt;br /&gt;
&amp;lt;br /&amp;gt;Play Timeline action and execute the according to skill directive file (.txt)&lt;br /&gt;
 timeline#specific TimeLine ID.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''TimeLine skill action'''&lt;br /&gt;
&amp;lt;br /&amp;gt;Play Timeline action but does not execute the according to skill directive file (.txt).&lt;br /&gt;
 timeline_anim# specific TimeLine ID.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''Lock actions of the current caster'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
Available action-locking status:&lt;br /&gt;
&lt;br /&gt;
*0: do not lock action.&lt;br /&gt;
*1: lock character’s attack and movement.&lt;br /&gt;
*2: lock character’s attack only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''Camera Shake'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#duration (second)#intensity.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''Control and rotate a character'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''Query and use specific special effect unit to replace the target special effect unit at the current position'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#specific special effect unit TAG#match number (match all when ≤0; match the earliest generated ones when &amp;gt;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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''Character frame pause'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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)&lt;br /&gt;
(Character’s action speed becomes normal after the pause of the frame).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''Global frame pause'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop# decline speed of the beginning point of the curve (multiplier)# decline speed of the ending point of the curve (multiplier)#time (second)&lt;br /&gt;
(Running speed of the world becomes normal after the pause of the frame).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''Change the cooldown of a specific skill of a caster'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''Gain items or resources in battles instantly (items obtained can be used by the main character only)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''Set a custom int variable for the unit'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''Execute a specific battle event'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#event ID#target parameter of the executor (optional; the default value of THIS object in the event script).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''Replace the current skill list of the caster'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#skill list info.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''Revert the current skill list of the caster to the original one'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''Replace the dungeon skill of the caster'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#skill ID, level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''Revert the dungeon skill of the caster to the original one'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''Replace a specific skill of a unit to another skill temporarily'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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 &amp;gt;0)#target parameter of the object unit.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''Change the current MP value of a unit'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Object IDs in Battles===&lt;br /&gt;
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:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Special Built-in ID'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|Player.&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|Fixed built-in units of A (used to realize some skill directives when there is no specific caster).&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|Fixed built-in units of B (used to realize some skill directives when there is no specific caster).&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|The current executor of the directive (usually in the unit-mounting script).&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|Random enemy minions (not on the current player’s side).&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|Random ally minions (not on the current player’s side).&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|Emitter unit whose ID is EMITER_ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Editing of Trigger Scripts Attached to Unit Object===&lt;br /&gt;
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.&lt;br /&gt;
 [CMD_BEGIN]#trigger type 1#trigger condition (optional)#trigger parameter (optional)&lt;br /&gt;
 CommanCommand-line 1&lt;br /&gt;
 Command-line 2&lt;br /&gt;
 ...&lt;br /&gt;
 Command line N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]# trigger type 1#trigger condition (optional)#trigger parameter (optional)&lt;br /&gt;
 Command line 1&lt;br /&gt;
 Command line 2&lt;br /&gt;
 ...&lt;br /&gt;
 Command line N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Multiple dungeon object triggers can mount every object. Currently, supported trigger types are:&lt;br /&gt;
&lt;br /&gt;
*on_spawn: when it respawns.&lt;br /&gt;
*enter_combat: enter battles.&lt;br /&gt;
*get_hurt: unit receives damage.&lt;br /&gt;
*dead: unit dies.&lt;br /&gt;
*on_timer: triggered when the timer (set by battle directive SET_UNIT_TIMER) on the unit ends.&lt;br /&gt;
*on_skill: triggered when this unit starts to cast skills. The trigger parameter is the skill ID.&lt;br /&gt;
*hp_pct: triggered when the HP of the unit goes lower than a certain percentage for the first time. The trigger parameter is the target HP percentage.&lt;br /&gt;
*Interactive: triggered when units with interactive objects in battles are executing interactive actions.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following is an additional sample script:&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#Close the door and let out the hounds!&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#Stop beating me! I beg you! I surrender! I’d give your everything I have!&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=636</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=636"/>
		<updated>2020-09-21T17:13:49Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* Skill Directive Editing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Script Directives in Battles===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
===List of Script Directives in Battles===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
&lt;br /&gt;
Function: show a paragraph with a character painting and typewriter effect.&lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''Empty Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: an empty directive. Nothing happens.&lt;br /&gt;
&lt;br /&gt;
Format: NOTHING*1.&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump To'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another scenario event ID.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Option'''&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
&lt;br /&gt;
Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second)&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''Pause Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: pause the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: PAUSE*.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''Continue Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: continue the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: RESUME*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
&lt;br /&gt;
Function: set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]].&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: units on the battlefield can have chat bubbles over their heads, which show their words.&lt;br /&gt;
&lt;br /&gt;
Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''Enemy Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all enemies send reinforcement according to a specific unit list.&lt;br /&gt;
&lt;br /&gt;
Format: ENEMY_REINF*minion list.&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''Ally Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all allies send reinforcement according to a specific unit configuration list.&lt;br /&gt;
&lt;br /&gt;
Format: FRIEND _REINF*minion list&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''Retreat Order'''&lt;br /&gt;
&lt;br /&gt;
Function: order all allies to retreat.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''End Battle by Force'''&lt;br /&gt;
&lt;br /&gt;
Function: end the current battle instantly.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_OVER*code (0: Victory; 1: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''Eliminate All Targets'''&lt;br /&gt;
&lt;br /&gt;
Function: deals massive damage to all units of one side to kill them within a second.&lt;br /&gt;
&lt;br /&gt;
Format: KILL_ALL*0 (0: Ally; 1: Enemy).&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''Player Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff the character controlled by the player so that it will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_PLAYER*1.&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''All Units Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff all units on the battlefield so that they will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_ALL*0 (0: Ally; 1: All units).&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''Unit Uses Ability'''&lt;br /&gt;
&lt;br /&gt;
Function: command-specific units on the battlefield to use skills.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Caster ID is the identification ID of the target and can have the following unique values:&lt;br /&gt;
&lt;br /&gt;
'''· PLAYER:''' player '''GM_A:''' the pre-set object of the attacking side '''GM_B:''' the pre-set object of the defending side.&lt;br /&gt;
&lt;br /&gt;
'''· THIS:''' directive giver (usually goes back to the emitter itself). &lt;br /&gt;
&lt;br /&gt;
'''· EMITTER=ID:''' a dungeon emitter of a specific ID, which can be “THIS” to represent the current dungeon emitter. &lt;br /&gt;
&lt;br /&gt;
'''· RND_FRIEND_UNIT:''' random ally units '''RND_ENEMY_UNIT:''' random enemy units. &lt;br /&gt;
&lt;br /&gt;
When a caster is a pre-set object, coordinate parameter 1 represents its initial coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''Refresh Dungeon Unit'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh units that have been defined on the battlefield.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_SPAWN*control ID#value of ignoring status (unit will be refreshed even they are defeated; 0: Yes by default; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''Set Dungeon Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter in a dungeon.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUNGEON_TS*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''End Dungeon Fight'''&lt;br /&gt;
&lt;br /&gt;
Function: end this dungeon fight and execute relative actions.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_OVER*result value (0: exit; 1: victory; 2: loss).&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific obstacle area.&lt;br /&gt;
&lt;br /&gt;
Format: SET_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''Set Decoration Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific map decoration.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WIDGET*control ID#status (0: Normal; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''Set Dungeon Teleporter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a dungeon teleporter and its relevant model.&lt;br /&gt;
&lt;br /&gt;
Format:  SET_TP*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''Set Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter.&lt;br /&gt;
&lt;br /&gt;
Format: SET_EMITTER*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''Set Player Model'''&lt;br /&gt;
&lt;br /&gt;
Function: set the model of the character controlled by the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_MODE*unit model description info.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''Set Player’s Current Skills'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current skills of the player’s character.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_SKILL*skill ID 1, level| skill ID 1, level| …| skill ID N, level (4 skills at most).&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''Execute Skill Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute skill directives.&lt;br /&gt;
&lt;br /&gt;
Format: SKILL_CMD*content of the skill directive.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''Set Custom Int Field in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom int field in battles&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: set the camera mode in battles.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available camera modes and meanings of the parameters are:&lt;br /&gt;
&lt;br /&gt;
· 0: follows the player’s character. No parameter (default)..&lt;br /&gt;
&lt;br /&gt;
· 1: follows a specific target. The parameter is the object ID of the target unit.&lt;br /&gt;
&lt;br /&gt;
· 2: coordinate on the battlefield. The parameter is X and Y.&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''Compulsory Attack'''&lt;br /&gt;
&lt;br /&gt;
Function: command a unit to attack another unit.&lt;br /&gt;
&lt;br /&gt;
Format: ATTACK*attacker object ID#target object ID.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''Unit Control Directive Sequence'''&lt;br /&gt;
&lt;br /&gt;
Function: give an array of directives to one unit. The unit will execute the directives according to their sequence.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_QUEUE*target object ID#event IDs in the commanding script (fill the content of command sequence into this event to execute).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The command sequence (the time parameter stands for the time before the next directive is executed) can be:&lt;br /&gt;
&lt;br /&gt;
Directive type 1 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
Directive type 2 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Currently, available sequence directive types are:&lt;br /&gt;
&lt;br /&gt;
· skill_cmd: execute skill directives: the parameter is a line of skill directives.&lt;br /&gt;
&lt;br /&gt;
· use_skill: use abilities: ability ID, ability level#target unit object parameter#target position parameter.&lt;br /&gt;
&lt;br /&gt;
· event: execute battle events: event ID in battles#execution condition (optional).&lt;br /&gt;
&lt;br /&gt;
· 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).&lt;br /&gt;
&lt;br /&gt;
· set_dir: set unit’s direction: direction is the parameter.&lt;br /&gt;
&lt;br /&gt;
· keep_act: keep performing one action: action ID (default action when empty)#loop times (loop endlessly when &amp;lt;=0; 1 by default)#time per action (default action when &amp;lt;=0; 0 by default).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''Set Unit Battle Tactic'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current battle tactic for a unit.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available main tactic types are:&lt;br /&gt;
&lt;br /&gt;
· 0: Attack (the parameter is the radius of awakening, which becomes endless long when the parameter is lower than 0).&lt;br /&gt;
&lt;br /&gt;
· 1: Defend (the parameter is the radius of defending).&lt;br /&gt;
&lt;br /&gt;
· 2: Follow (the parameter is the radius of following).&lt;br /&gt;
&lt;br /&gt;
· 3: Occupy.&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''Set Unit Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer on a unit, which will trigger and complete a specific event.&lt;br /&gt;
&lt;br /&gt;
Format: SET_UNIT_TIMER*target object ID#timer ID#time parameter (disabled when &amp;lt;=0; a timer only works when the unit has an “on timer” trigger event).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''Use Channeling Skill Instantly'''&lt;br /&gt;
&lt;br /&gt;
Function: stop channeling and use the skill instantly (works only when the target is channeling their skill.)&lt;br /&gt;
&lt;br /&gt;
Field 1, value 1|Field 2, value 2|…&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''Replace Unit Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current skill of a unit.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''Replace Unit Dungeon Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current dungeon skill of a unit.&lt;br /&gt;
&lt;br /&gt;
Format: REPLACE_DGSKILL*target object ID#dungeon skill ID, level (empty skill ID or null means the dungeon skill is disabled).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''Battlefield Message'''&lt;br /&gt;
&lt;br /&gt;
Function: broadcast a battlefield message.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_MSG*message type (0: Normal; 1: Warning).&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''Set Battle Checker Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of Battle Checker.&lt;br /&gt;
&lt;br /&gt;
Format: SET_BATTLE_CHECKER*status (0: Disabled; 1: Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''Show End-Battle Button'''&lt;br /&gt;
&lt;br /&gt;
Function: show the button for the player to end battles manually.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_BATTLEOVER_BTN*1.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''Show Debug Info'''&lt;br /&gt;
&lt;br /&gt;
Function: show debug info.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_DEBUG_INFO*status value (0: Disabled; 1: Show buff info of player’s character).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel between the player’s character and a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Global Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer to delay the execution of some scripts.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timer ID#time parameter (second; function is disabled when the parameter &amp;lt;= 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).&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''Generate Unit in Area'''&lt;br /&gt;
&lt;br /&gt;
Function: generate units in batch in a specific area.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a certain number of items from the player’s inventory.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_EXP*EXP#target hero ID（optional; player’s character by default).&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''Manage Hero Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: manage the skills of a hero. You can add, replace, or remove the skills of the hero.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''Execute LUA Function'''&lt;br /&gt;
&lt;br /&gt;
Function: execute specific functions in the currently loaded LUA script.&lt;br /&gt;
&lt;br /&gt;
Format: CALL_LUAFUNC*function name in the script.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''Add Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: add an interactive object on the current battlefield.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt;= 0)# event ID after refreshment (the ID of the event-triggered after refreshment).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''Remove Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTER_OBJECT#control ID (“THIS” can be used to refer to the object itself in an interactive script event).&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''Change Status of Interactive Object'''&lt;br /&gt;
&lt;br /&gt;
Function: change the status of an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport to Other Instance Maps'''&lt;br /&gt;
&lt;br /&gt;
Function: teleport all allies to the target instance map.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*map ID (needs to be defined in “F副本地图信息表”); X coordinate, Y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''Remote Execution Request'''&lt;br /&gt;
&lt;br /&gt;
Function: Send a request to all clients to execute an event.&lt;br /&gt;
&lt;br /&gt;
Format: REMOTE_EVENT*event ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Value Query in Battles===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Results of different event scripts in battles (e.g., the result of an option box).&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|How long the current battle has been going on (integer).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|Return a different random number each time (A&amp;lt;= this number &amp;lt;= B.)&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the result of the last [%rnd:A,B%] query.&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|Return a random number （0~100）that stays the same during the execution period.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|Return the X value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|Return the Y value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|Return the coordinate of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|The ID of the last skill used by the current queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|Type of the executor of the current directive (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|Type of the current queried target object (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|Level of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|Level of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|HP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|HP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|MP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|MP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|The number of ally units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|The number of enemy units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|Check if the current hit target is an enemy of the caster (1: Enemy; 0: Not Enemy.)&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|Current battle result.&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|Level of a specific skill ID of the current source object; returns 0 if the level is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|A basic physical attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|A basic magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|An overall magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|Number of stacks of source object’s current BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|The current number of stacks of target object’s specific BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|Weapon type of the queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|Weapon type of the queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|Value of charging of this damage（0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|The parameter of the current command line.&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|Return the parameter of the current command line, and the parameter increases by 1 instantly.&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|INDEX value of the loop where the current command line is located.&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|Add the target unit to the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|Remove the target unit from the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|Reset the current search list. It always returns 1.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|Randomly enumerate values, and return the RES value of one of the enumerated ones according to their probability distribution.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
[%rnd_enum:25,1:40,2:35,3%] means that is a 25% chance to return “1”, 40% for “2”, and 35% for “3”.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|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).&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|Return the number of refreshed units that have not been defeated and have the “TAG” tag on the current battlefield.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|Value of the defeated ally counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|Value of the defeated enemy counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated-ally counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated enemy -counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|Return the value in a custom dungeon int field of a specific KEY.&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|Return the remaining time of the timer (whose ID is “TIMER_ID”) on a unit with a specific UNIT_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current directive executor (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current queried target object (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|Number of special effect units with a specific TAG&lt;br /&gt;
&lt;br /&gt;
Please note: this only counts the special effect units created by the caster.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|The unit ID of the current queried object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|The unit ID of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|Actual damage or healing amount to a target unit in the current casting.&lt;br /&gt;
&lt;br /&gt;
Please: this only works in the hit directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|Check if the current skill or damage comes into effect when the caster is invisible （0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|Times of the current skill is actually hitting units.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.7.4.2 to be executed.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|Return the skill list of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|Return the skill list of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.8.0.1 to be executed&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|Return the client ID of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|Return the client ID of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|Player’s money in the game.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a specific item or resource in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Damage Expression===&lt;br /&gt;
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:&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
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 [&amp;amp;expression&amp;amp;] format);&lt;br /&gt;
&lt;br /&gt;
Currently supported damage expression key-value is：&lt;br /&gt;
&lt;br /&gt;
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen&lt;br /&gt;
*dmg: physical damage value. The value is the damage expression.&lt;br /&gt;
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.&lt;br /&gt;
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000.&lt;br /&gt;
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.&lt;br /&gt;
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.&lt;br /&gt;
*act: play unit action when they are hit. 0: No; 1: Yes&lt;br /&gt;
*eft ID: special effect ID (when the unit is hit).&lt;br /&gt;
*trig: trigger damage effect (e.g., damage reflection).&lt;br /&gt;
*attack_type: decide the type of weapon attacks that caused the damage.&lt;br /&gt;
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]: a random integer (min_val&amp;lt;= this integer&amp;lt;= max_val).&lt;br /&gt;
*[%field%]: field stands for a random value defined in a character attribute field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Skill Directive Editing'''===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
 0*conditional expression 1#skill directive 1&lt;br /&gt;
 0.2#skill directive 2&lt;br /&gt;
 ……&lt;br /&gt;
When the conditional expression is not empty, the execution of results will be judged accordingly.&lt;br /&gt;
&lt;br /&gt;
In conditional statements, you can use built-in directives to realize some special effects, such as repetition.&lt;br /&gt;
 *REPEAT_START:9&lt;br /&gt;
 Statement 1&lt;br /&gt;
 Statement 1&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#skill directive&lt;br /&gt;
 ...&lt;br /&gt;
 Statement N&lt;br /&gt;
 *REPEAT_END&lt;br /&gt;
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. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
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”.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Currently, supported skill directives are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Skill Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''Stop all current skill casting actions instantly and act according to previous directives.'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''Add a pre-defined special effect unit onto the battlefield.'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.)&lt;br /&gt;
Initial position format: position type, offset X, offset Y, offset Z (the offset value is the offset from the initial direction.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Supported position types:&lt;br /&gt;
&lt;br /&gt;
* cast_pos: the preset position of skill casting.&lt;br /&gt;
* tag_pos: the target position or target coordinate of skills.&lt;br /&gt;
* hit_pos: the position of units hit by skills.&lt;br /&gt;
* unit_pos: the position of the skilled caster.&lt;br /&gt;
* start_pos: the beginning position of the caster when they cast skills.  &lt;br /&gt;
* rnd_pos: any position around the skilled caster.&lt;br /&gt;
* dim_pos: the preset position defined by the set_dimpos directive.&lt;br /&gt;
* reinf_pos: the position of reinforcement of the skill caster’s side.&lt;br /&gt;
* emitter_pos=EMITTER_ID: the position of emitter whose ID is EMITTER_ID.&lt;br /&gt;
* unit_round=DIR:LEN: the position that is LEN away from the skilled caster, with an offset degree of DIR from the positive direction.&lt;br /&gt;
* 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).&lt;br /&gt;
* 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.&lt;br /&gt;
* ……&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Supported movement types are:&lt;br /&gt;
&lt;br /&gt;
* 0: No movement and no parameter.&lt;br /&gt;
* 1: move to the target position of a skill. Offset X, offset Y, and offset Z.&lt;br /&gt;
* 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).&lt;br /&gt;
* 3: move in a specific direction. Offset degree, distance (no longer than the width of the battlefield).&lt;br /&gt;
* 4: move back and forth in a specific direction. Offset degree, distance (no longer than the width of the battlefield).&lt;br /&gt;
* 5: follow a target. Following type (0: Fixed Relative Position; 1: Emitter’s Position), offset X, offset Y, offset Z, duration (-1: Eternal).&lt;br /&gt;
* 6: move to dim_pos. Offset X, offset Y, offset Z.&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''Damage check'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#check type#damage expression#target object parameter#check parameter list (use “,” to separate)# filter repetitive check object(optional; set disabled by default.)&lt;br /&gt;
Supported check types are:&lt;br /&gt;
&lt;br /&gt;
*0: single check (see next section when the target unit is the target object parameter; emptiness means the target of skills).&lt;br /&gt;
*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.&lt;br /&gt;
*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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''Grant a BUFF on a target'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, supported built-in target parameters are:&lt;br /&gt;
&lt;br /&gt;
* caster: skill caster.&lt;br /&gt;
* target: target unit (unit of target-oriented skills or unit hit by skills.)&lt;br /&gt;
* roleid,ROLEID: search for a target object whose unit-bound ID is ROLEID. &lt;br /&gt;
* buffgiver,BUFFID: search for a buff giver who gave the buff (whose ID is BUFFID field) to the current caster.&lt;br /&gt;
* find_tag_res: search for a result of a specific target (must execute [%find_tag:TAGINFO%] before calling.)&lt;br /&gt;
* tag_next_fu,distance D：the next ally unit whose distance from the current hit target is shorter than distance D.&lt;br /&gt;
* caster_next_fu,distance D: the next ally unit whose distance from the current caster is shorter than distance D.&lt;br /&gt;
* caster_next_eu,distance D: the next enemy unit whose distance from the current caster is shorter than distance D.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''Remove a BUFF from a target'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#remove target (same as above)#removal type#parameter 1, parameter 2,parameter 3...&lt;br /&gt;
Currently, supported removal methods are:&lt;br /&gt;
&lt;br /&gt;
*0· : remove all.&lt;br /&gt;
*1: remove a specific buff. Parameter 1 is the BUFF ID; parameter 2 is the number of removed stacks (-1: remove all by default).&lt;br /&gt;
*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). &lt;br /&gt;
*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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''Dash'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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 &amp;gt;= 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).&lt;br /&gt;
Movement types are:&lt;br /&gt;
&lt;br /&gt;
*0: uniform motion.&lt;br /&gt;
*1: jump.&lt;br /&gt;
*2: knockback.&lt;br /&gt;
*3: knock up (when the movement type is knock-up, the speed parameter stands for the air time of the hit unit).&lt;br /&gt;
&lt;br /&gt;
The speed parameter is the horizontal speed of the characters’ movement (when the speed is lower than0, the character flash to the target position).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
“Bound Special Effect” is the special effect ID attached to the unit when they are moving.&lt;br /&gt;
&lt;br /&gt;
“Skill to cast after movement” is the ID of the skill that will be cast right after the movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''Stop dashing'''&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''Physical explosion at the target position'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#initial position (see the instruction on Skill Position Parameter Format)#explosion radius#intensity parameter&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''Physical explosion at the target position'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''Knock back the target once'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#sound effect ID#sound effect position (see explanation in Section 1)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''Play a sound effect from the SFX Dictionary according to the model configuration.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#SFX Dictionary KEY#unit target parameter&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''Play a specific sound effect at a caster’s position'''&lt;br /&gt;
 cast_sound#sound effect ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''Play a chain-like special effect'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#caster unit#target unit#pre-made special effect unit#spreading speed(-1: instantly)#duration# damage expression when targets get hit.&lt;br /&gt;
For the parameter of caster unit, please refer to the instruction on the Skill Directive Target Parameter.&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''Taunt and make target attack the caster instantly'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#caster#targe&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''ast any single-target skill that does not need channeling''' &amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#skill ID,skill level (set default by 1)#caster#target#target position parameter&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''Operate the parameter of the current command line&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#operation method#operation value D&lt;br /&gt;
Methods: 0: set to be valued D; 1: increase value D; 2: decrease value D&lt;br /&gt;
&lt;br /&gt;
'''''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.'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''Preset position parameter'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#operation method#operation parameter[#offset parameter(only works when inquiring on the unit’s position)].&lt;br /&gt;
Methods：&lt;br /&gt;
&lt;br /&gt;
*0: Ally reinforcement position. Parameters are the offset of X, Y, and Z.&lt;br /&gt;
*1: Query target unit position query. Parameters are query directives (see Section 4).&lt;br /&gt;
*2: Query skill parameter position query Parameters are query directives (see Section 2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''Play a defined skill action'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#target unit#skill action ID#play speed coefficient (set 1 by default)#stop moving or not(set No by default).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''Summon a unit'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.&lt;br /&gt;
Method: 0: a mirror image of the object; 1: summon by character ID; 2：summon by minion ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the initial position parameter, please see Section 2 of this chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attached status is the attached attribute list of the unit. E.g. “s_HP,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_Attack,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]” means that the summoned unit has half of the original unit’s HP and Attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attached special effect parameter: 0: Default; 1: Show half-transparent shadow effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unit Faction Reference Target Parameter: the current faction of the target is the faction of the summoned units (caster’s faction by default).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''Change the current position of a target by force'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#operation object (same as Section 4)#position info (same as Section 2.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''Set activation status of a target'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''Target is knocked down instantly (ignore invincibility)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit# operation object parameter (same as Section 4).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''Target falls automatically'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit# operation object parameter (same as Section 4).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''Chat bubble above the target’s head'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#operation object#dialogue content#duration (count by second; neglectable).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''Target shouts out words (mostly skills)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#operation object#words.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''Set around battlefield warning area'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#target position info#radius#duration (second).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''TimeLine skill object'''&lt;br /&gt;
&amp;lt;br /&amp;gt;Play Timeline action and execute the according to skill directive file (.txt)&lt;br /&gt;
 timeline#specific TimeLine ID.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''TimeLine skill action'''&lt;br /&gt;
&amp;lt;br /&amp;gt;Play Timeline action but does not execute the according to skill directive file (.txt).&lt;br /&gt;
 timeline_anim# specific TimeLine ID.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''Lock actions of the current caster'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
Available action-locking status:&lt;br /&gt;
&lt;br /&gt;
*0: do not lock action.&lt;br /&gt;
*1: lock character’s attack and movement.&lt;br /&gt;
*2: lock character’s attack only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''Camera Shake'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#duration (second)#intensity.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''Control and rotate a character'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''Query and use specific special effect unit to replace the target special effect unit at the current position'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#specific special effect unit TAG#match number (match all when ≤0; match the earliest generated ones when &amp;gt;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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''Character frame pause'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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)&lt;br /&gt;
(Character’s action speed becomes normal after the pause of the frame).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''Global frame pause'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop# decline speed of the beginning point of the curve (multiplier)# decline speed of the ending point of the curve (multiplier)#time (second)&lt;br /&gt;
(Running speed of the world becomes normal after the pause of the frame).&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''Change the cooldown of a specific skill of a caster'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''Gain items or resources in battles instantly (items obtained can be used by the main character only)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''Set a custom int variable for the unit'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''Execute a specific battle event'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#event ID#target parameter of the executor (optional; the default value of THIS object in the event script).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''Replace the current skill list of the caster'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#skill list info.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''Revert the current skill list of the caster to the original one'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''Replace the dungeon skill of the caster'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#skill ID, level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''Revert the dungeon skill of the caster to the original one'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''Replace a specific skill of a unit to another skill temporarily'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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 &amp;gt;0)#target parameter of the object unit.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''Change the current MP value of a unit'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Special Object IDs in Battles===&lt;br /&gt;
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:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Special Built-in ID'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|Player.&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|Fixed built-in units of A (used to realize some skill directives when there is no specific caster).&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|Fixed built-in units of B (used to realize some skill directives when there is no specific caster).&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|The current executor of the directive (usually in the unit-mounting script).&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|Random enemy minions (not on the current player’s side).&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|Random ally minions (not on the current player’s side).&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|Emitter unit whose ID is EMITER_ID. &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===Editing of Trigger Scripts Attached to Unit Object===&lt;br /&gt;
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.&lt;br /&gt;
 [CMD_BEGIN]#trigger type 1#trigger condition (optional)#trigger parameter (optional)&lt;br /&gt;
 CommanCommand-line 1&lt;br /&gt;
 Command-line 2&lt;br /&gt;
 ...&lt;br /&gt;
 Command line N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]# trigger type 1#trigger condition (optional)#trigger parameter (optional)&lt;br /&gt;
 Command line 1&lt;br /&gt;
 Command line 2&lt;br /&gt;
 ...&lt;br /&gt;
 Command line N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
每个对象可挂载多个地城对象触发器，当前已支持的触发类型有：&lt;br /&gt;
&lt;br /&gt;
*on_spawn：当刷新出时&lt;br /&gt;
*enter_combat：进入战斗&lt;br /&gt;
*get_hurt：单位受到伤害&lt;br /&gt;
*dead：单位死亡时&lt;br /&gt;
*on_timer：当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发&lt;br /&gt;
*on_skill：该单位开始释放技能时触发 触发参数位技能ID&lt;br /&gt;
*hp_pct：单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比&lt;br /&gt;
*interactive：具有战斗内可交互对象的单位在进行交互行为时触发&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下为一段示例附加脚本：&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#关门，放狗！&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了！别打了！我认输，什么都给你！&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=635</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=635"/>
		<updated>2020-09-21T16:48:19Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* Skill Directive Editing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Script Directives in Battles===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
===List of Script Directives in Battles===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
&lt;br /&gt;
Function: show a paragraph with a character painting and typewriter effect.&lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''Empty Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: an empty directive. Nothing happens.&lt;br /&gt;
&lt;br /&gt;
Format: NOTHING*1.&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump To'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another scenario event ID.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Option'''&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
&lt;br /&gt;
Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second)&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''Pause Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: pause the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: PAUSE*.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''Continue Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: continue the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: RESUME*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
&lt;br /&gt;
Function: set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]].&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: units on the battlefield can have chat bubbles over their heads, which show their words.&lt;br /&gt;
&lt;br /&gt;
Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''Enemy Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all enemies send reinforcement according to a specific unit list.&lt;br /&gt;
&lt;br /&gt;
Format: ENEMY_REINF*minion list.&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''Ally Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all allies send reinforcement according to a specific unit configuration list.&lt;br /&gt;
&lt;br /&gt;
Format: FRIEND _REINF*minion list&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''Retreat Order'''&lt;br /&gt;
&lt;br /&gt;
Function: order all allies to retreat.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''End Battle by Force'''&lt;br /&gt;
&lt;br /&gt;
Function: end the current battle instantly.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_OVER*code (0: Victory; 1: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''Eliminate All Targets'''&lt;br /&gt;
&lt;br /&gt;
Function: deals massive damage to all units of one side to kill them within a second.&lt;br /&gt;
&lt;br /&gt;
Format: KILL_ALL*0 (0: Ally; 1: Enemy).&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''Player Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff the character controlled by the player so that it will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_PLAYER*1.&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''All Units Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff all units on the battlefield so that they will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_ALL*0 (0: Ally; 1: All units).&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''Unit Uses Ability'''&lt;br /&gt;
&lt;br /&gt;
Function: command-specific units on the battlefield to use skills.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Caster ID is the identification ID of the target and can have the following unique values:&lt;br /&gt;
&lt;br /&gt;
'''· PLAYER:''' player '''GM_A:''' the pre-set object of the attacking side '''GM_B:''' the pre-set object of the defending side.&lt;br /&gt;
&lt;br /&gt;
'''· THIS:''' directive giver (usually goes back to the emitter itself). &lt;br /&gt;
&lt;br /&gt;
'''· EMITTER=ID:''' a dungeon emitter of a specific ID, which can be “THIS” to represent the current dungeon emitter. &lt;br /&gt;
&lt;br /&gt;
'''· RND_FRIEND_UNIT:''' random ally units '''RND_ENEMY_UNIT:''' random enemy units. &lt;br /&gt;
&lt;br /&gt;
When a caster is a pre-set object, coordinate parameter 1 represents its initial coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''Refresh Dungeon Unit'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh units that have been defined on the battlefield.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_SPAWN*control ID#value of ignoring status (unit will be refreshed even they are defeated; 0: Yes by default; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''Set Dungeon Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter in a dungeon.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUNGEON_TS*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''End Dungeon Fight'''&lt;br /&gt;
&lt;br /&gt;
Function: end this dungeon fight and execute relative actions.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_OVER*result value (0: exit; 1: victory; 2: loss).&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific obstacle area.&lt;br /&gt;
&lt;br /&gt;
Format: SET_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''Set Decoration Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific map decoration.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WIDGET*control ID#status (0: Normal; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''Set Dungeon Teleporter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a dungeon teleporter and its relevant model.&lt;br /&gt;
&lt;br /&gt;
Format:  SET_TP*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''Set Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter.&lt;br /&gt;
&lt;br /&gt;
Format: SET_EMITTER*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''Set Player Model'''&lt;br /&gt;
&lt;br /&gt;
Function: set the model of the character controlled by the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_MODE*unit model description info.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''Set Player’s Current Skills'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current skills of the player’s character.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_SKILL*skill ID 1, level| skill ID 1, level| …| skill ID N, level (4 skills at most).&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''Execute Skill Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute skill directives.&lt;br /&gt;
&lt;br /&gt;
Format: SKILL_CMD*content of the skill directive.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''Set Custom Int Field in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom int field in battles&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: set the camera mode in battles.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available camera modes and meanings of the parameters are:&lt;br /&gt;
&lt;br /&gt;
· 0: follows the player’s character. No parameter (default)..&lt;br /&gt;
&lt;br /&gt;
· 1: follows a specific target. The parameter is the object ID of the target unit.&lt;br /&gt;
&lt;br /&gt;
· 2: coordinate on the battlefield. The parameter is X and Y.&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''Compulsory Attack'''&lt;br /&gt;
&lt;br /&gt;
Function: command a unit to attack another unit.&lt;br /&gt;
&lt;br /&gt;
Format: ATTACK*attacker object ID#target object ID.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''Unit Control Directive Sequence'''&lt;br /&gt;
&lt;br /&gt;
Function: give an array of directives to one unit. The unit will execute the directives according to their sequence.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_QUEUE*target object ID#event IDs in the commanding script (fill the content of command sequence into this event to execute).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The command sequence (the time parameter stands for the time before the next directive is executed) can be:&lt;br /&gt;
&lt;br /&gt;
Directive type 1 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
Directive type 2 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Currently, available sequence directive types are:&lt;br /&gt;
&lt;br /&gt;
· skill_cmd: execute skill directives: the parameter is a line of skill directives.&lt;br /&gt;
&lt;br /&gt;
· use_skill: use abilities: ability ID, ability level#target unit object parameter#target position parameter.&lt;br /&gt;
&lt;br /&gt;
· event: execute battle events: event ID in battles#execution condition (optional).&lt;br /&gt;
&lt;br /&gt;
· 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).&lt;br /&gt;
&lt;br /&gt;
· set_dir: set unit’s direction: direction is the parameter.&lt;br /&gt;
&lt;br /&gt;
· keep_act: keep performing one action: action ID (default action when empty)#loop times (loop endlessly when &amp;lt;=0; 1 by default)#time per action (default action when &amp;lt;=0; 0 by default).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''Set Unit Battle Tactic'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current battle tactic for a unit.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available main tactic types are:&lt;br /&gt;
&lt;br /&gt;
· 0: Attack (the parameter is the radius of awakening, which becomes endless long when the parameter is lower than 0).&lt;br /&gt;
&lt;br /&gt;
· 1: Defend (the parameter is the radius of defending).&lt;br /&gt;
&lt;br /&gt;
· 2: Follow (the parameter is the radius of following).&lt;br /&gt;
&lt;br /&gt;
· 3: Occupy.&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''Set Unit Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer on a unit, which will trigger and complete a specific event.&lt;br /&gt;
&lt;br /&gt;
Format: SET_UNIT_TIMER*target object ID#timer ID#time parameter (disabled when &amp;lt;=0; a timer only works when the unit has an “on timer” trigger event).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''Use Channeling Skill Instantly'''&lt;br /&gt;
&lt;br /&gt;
Function: stop channeling and use the skill instantly (works only when the target is channeling their skill.)&lt;br /&gt;
&lt;br /&gt;
Field 1, value 1|Field 2, value 2|…&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''Replace Unit Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current skill of a unit.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''Replace Unit Dungeon Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current dungeon skill of a unit.&lt;br /&gt;
&lt;br /&gt;
Format: REPLACE_DGSKILL*target object ID#dungeon skill ID, level (empty skill ID or null means the dungeon skill is disabled).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''Battlefield Message'''&lt;br /&gt;
&lt;br /&gt;
Function: broadcast a battlefield message.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_MSG*message type (0: Normal; 1: Warning).&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''Set Battle Checker Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of Battle Checker.&lt;br /&gt;
&lt;br /&gt;
Format: SET_BATTLE_CHECKER*status (0: Disabled; 1: Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''Show End-Battle Button'''&lt;br /&gt;
&lt;br /&gt;
Function: show the button for the player to end battles manually.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_BATTLEOVER_BTN*1.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''Show Debug Info'''&lt;br /&gt;
&lt;br /&gt;
Function: show debug info.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_DEBUG_INFO*status value (0: Disabled; 1: Show buff info of player’s character).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel between the player’s character and a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Global Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer to delay the execution of some scripts.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timer ID#time parameter (second; function is disabled when the parameter &amp;lt;= 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).&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''Generate Unit in Area'''&lt;br /&gt;
&lt;br /&gt;
Function: generate units in batch in a specific area.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a certain number of items from the player’s inventory.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_EXP*EXP#target hero ID（optional; player’s character by default).&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''Manage Hero Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: manage the skills of a hero. You can add, replace, or remove the skills of the hero.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''Execute LUA Function'''&lt;br /&gt;
&lt;br /&gt;
Function: execute specific functions in the currently loaded LUA script.&lt;br /&gt;
&lt;br /&gt;
Format: CALL_LUAFUNC*function name in the script.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''Add Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: add an interactive object on the current battlefield.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt;= 0)# event ID after refreshment (the ID of the event-triggered after refreshment).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''Remove Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTER_OBJECT#control ID (“THIS” can be used to refer to the object itself in an interactive script event).&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''Change Status of Interactive Object'''&lt;br /&gt;
&lt;br /&gt;
Function: change the status of an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport to Other Instance Maps'''&lt;br /&gt;
&lt;br /&gt;
Function: teleport all allies to the target instance map.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*map ID (needs to be defined in “F副本地图信息表”); X coordinate, Y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''Remote Execution Request'''&lt;br /&gt;
&lt;br /&gt;
Function: Send a request to all clients to execute an event.&lt;br /&gt;
&lt;br /&gt;
Format: REMOTE_EVENT*event ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Value Query in Battles===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Results of different event scripts in battles (e.g., the result of an option box).&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|How long the current battle has been going on (integer).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|Return a different random number each time (A&amp;lt;= this number &amp;lt;= B.)&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the result of the last [%rnd:A,B%] query.&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|Return a random number （0~100）that stays the same during the execution period.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|Return the X value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|Return the Y value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|Return the coordinate of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|The ID of the last skill used by the current queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|Type of the executor of the current directive (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|Type of the current queried target object (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|Level of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|Level of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|HP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|HP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|MP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|MP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|The number of ally units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|The number of enemy units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|Check if the current hit target is an enemy of the caster (1: Enemy; 0: Not Enemy.)&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|Current battle result.&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|Level of a specific skill ID of the current source object; returns 0 if the level is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|A basic physical attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|A basic magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|An overall magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|Number of stacks of source object’s current BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|The current number of stacks of target object’s specific BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|Weapon type of the queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|Weapon type of the queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|Value of charging of this damage（0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|The parameter of the current command line.&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|Return the parameter of the current command line, and the parameter increases by 1 instantly.&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|INDEX value of the loop where the current command line is located.&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|Add the target unit to the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|Remove the target unit from the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|Reset the current search list. It always returns 1.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|Randomly enumerate values, and return the RES value of one of the enumerated ones according to their probability distribution.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
[%rnd_enum:25,1:40,2:35,3%] means that is a 25% chance to return “1”, 40% for “2”, and 35% for “3”.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|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).&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|Return the number of refreshed units that have not been defeated and have the “TAG” tag on the current battlefield.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|Value of the defeated ally counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|Value of the defeated enemy counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated-ally counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated enemy -counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|Return the value in a custom dungeon int field of a specific KEY.&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|Return the remaining time of the timer (whose ID is “TIMER_ID”) on a unit with a specific UNIT_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current directive executor (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current queried target object (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|Number of special effect units with a specific TAG&lt;br /&gt;
&lt;br /&gt;
Please note: this only counts the special effect units created by the caster.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|The unit ID of the current queried object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|The unit ID of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|Actual damage or healing amount to a target unit in the current casting.&lt;br /&gt;
&lt;br /&gt;
Please: this only works in the hit directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|Check if the current skill or damage comes into effect when the caster is invisible （0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|Times of the current skill is actually hitting units.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.7.4.2 to be executed.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|Return the skill list of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|Return the skill list of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.8.0.1 to be executed&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|Return the client ID of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|Return the client ID of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|Player’s money in the game.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a specific item or resource in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Damage Expression===&lt;br /&gt;
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:&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
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 [&amp;amp;expression&amp;amp;] format);&lt;br /&gt;
&lt;br /&gt;
Currently supported damage expression key-value is：&lt;br /&gt;
&lt;br /&gt;
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen&lt;br /&gt;
*dmg: physical damage value. The value is the damage expression. &lt;br /&gt;
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.&lt;br /&gt;
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000. &lt;br /&gt;
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.&lt;br /&gt;
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.&lt;br /&gt;
*act: play unit action when they are hit. 0: No; 1: Yes&lt;br /&gt;
*eft ID: special effect ID (when the unit is hit).&lt;br /&gt;
*trig: trigger damage effect (e.g., damage reflection).&lt;br /&gt;
*attack_type: decide the type of weapon attacks that caused the damage. &lt;br /&gt;
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]: a random integer (min_val&amp;lt;= this integer&amp;lt;= max_val). &lt;br /&gt;
*[%field%]: field stands for a random value defined in a character attribute field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Skill Directive Editing'''===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
 0*conditional expression 1#skill directive 1&lt;br /&gt;
 0.2#skill directive 2&lt;br /&gt;
 ……&lt;br /&gt;
当条件表达式不为空时，根据条件表达式判定结果执行。&lt;br /&gt;
&lt;br /&gt;
条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果，例如&lt;br /&gt;
 *REPEAT_START:9&lt;br /&gt;
 Statement 1&lt;br /&gt;
 Statement 1&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#skill directive&lt;br /&gt;
 ...&lt;br /&gt;
 Statement N&lt;br /&gt;
 *REPEAT_END&lt;br /&gt;
表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍，期间可以通过[%rpt_index%]来查询当前语句处于第几次循环&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
表示对SELECT_UNITS行与SELECT_END之间所有的命令行，对SELECT_UNITS:后所有满足指定条件表达式的对象使用，并以该对象作为caster对象&lt;br /&gt;
&lt;br /&gt;
其中，嵌入到[@...@]中的语句为保留两位小数的结果运算取值，此类查询仅在技能命令中有效。&lt;br /&gt;
&lt;br /&gt;
目前支持的技能命令有：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!技能指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''立即停止当前所有技能动作并按照之前指令行动'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''向战场中添加一个预定义的特效体'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，为空时按照特效表中定义的伤害表达式计算，格式见6.4节）#目标参数(见7.4节说明)#特效体TAG（用于replace_eft指令查询）&lt;br /&gt;
初始位置格式为：位置类型,偏移x,偏移y,偏移z（偏移量为相对于初始方向的偏移）&lt;br /&gt;
&lt;br /&gt;
支持的位置类型有：&lt;br /&gt;
&lt;br /&gt;
*cast_pos：技能施放动作的预设位置&lt;br /&gt;
*tag_pos：技能施放目标单位或者目标坐标的位置&lt;br /&gt;
*hit_pos：技能命中目标单位当前的位置&lt;br /&gt;
*unit_pos：技能施放单位当前的位置&lt;br /&gt;
*start_pos：技能释放时的开始位置&lt;br /&gt;
*rnd_pos：技能释放单位周围一个任意的位置&lt;br /&gt;
*dim_pos：通过set_dimpos命令定义的预设位置&lt;br /&gt;
*reinf_pos：施法者阵营方的增援位置&lt;br /&gt;
*emitter_pos=EMITTER_ID：ID为EMITTER_ID的发射器发射点位置&lt;br /&gt;
*unit_round=DIR:LEN：距离施法者正方向偏移DIR角度，距离为LEN的位置&lt;br /&gt;
*rnd_round=RAD[-MIN_RAD]：施法者半径RAD范围内的随机位置，可选参数MIN_RAD表示随机范围距中心的最小距离，默认为0&lt;br /&gt;
*eft_pos=TAG：返回查询到的第一个指定特效体TAG的特效体位置，如不存在则返回caster的当前位置 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
*……&lt;br /&gt;
&lt;br /&gt;
运动参数格式为：运动类型:运动参数（形如：参数1,参数2,参数3.....）&lt;br /&gt;
&lt;br /&gt;
支持的运动类型有：&lt;br /&gt;
&lt;br /&gt;
*0：不运动 无参数&lt;br /&gt;
*1：运动至技能目标点 偏移x,偏移y,偏移z&lt;br /&gt;
*2：运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标，否则按照技能释放目标)&lt;br /&gt;
*3：向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*4：向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*5：跟随目标运动 跟随类型(0固定相对位置，1发射点位置),偏移x,偏移y,偏移z,持续时间（-1为永久）&lt;br /&gt;
*6：运动至dim_pos 偏移x,偏移y,偏移z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''进行伤害判定'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选，默认关闭)&lt;br /&gt;
支持的判断类型有：&lt;br /&gt;
&lt;br /&gt;
*0：单体判断（目标对象参数为目标单位见下一小节，为空表示技能目标）&lt;br /&gt;
*1：半径范围判断 目标对象参数为目标类型(0:敌方 1：我方 2：双方) 参数表中参数1为参考位置类型（见add_eft命令的位置类型） 参数2,3,4,5分别为偏移坐标的x,y,z及半径&lt;br /&gt;
*2：多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数，参数4以后为以参考点坐标为(0,0)的多边形坐标信息&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''对目标施加BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_buff#buff ID#BUFF目标参数#持续时间（如不指定则采用BUFF默认持续时间）#叠加层数（默认为1）#上限层数(默认为配置表中的数值，只有大于0时生效)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
可支持的内置目标参数有：&lt;br /&gt;
&lt;br /&gt;
*caster：技能释放者&lt;br /&gt;
*target：目标单位（指向性技能的目标或技能命中的目标）&lt;br /&gt;
*roleid,ROLEID：查询单位绑定人物ID为ROLEID的一个目标对象&lt;br /&gt;
*buffgiver,BUFFID：查询当前caster身上一个ID为BUFFID的BUFF给与者&lt;br /&gt;
*find_tag_res：查询指定目标的结果单位（必须先执行一次[%find_tag:TAGINFO%]查询才可调用）&lt;br /&gt;
*tag_next_fu,距离D：当前命中目标的下一个小于距离D的友方单位&lt;br /&gt;
*caster_next_fu,距离D：施法者的下一个小于距离D的友方目标&lt;br /&gt;
*caster_next_eu,距离D：施法者的下一个小于距离D的敌方目标&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''移除目标的BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#移除目标（同上）#移除方式#参数1,参数2,参数3...&lt;br /&gt;
目前支持的移除方式如下&lt;br /&gt;
&lt;br /&gt;
*0：全部移除&lt;br /&gt;
*1：移除指定BUFF 参数1为BUFF ID，参数2为移除层数（默认-1为全部移除）&lt;br /&gt;
*2：移除有害BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
*3：移除有益BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''突进类移动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒，在运动结束前开始执行承接技能向前的时间偏移量&amp;gt;=0)[可为空]#操作对象(可选，默认为caster)#修正目标位置(可选，参数格式见节2)#是否强制(默认0  为1时强制移动)&lt;br /&gt;
移动类型分为：&lt;br /&gt;
&lt;br /&gt;
*0：匀速运动&lt;br /&gt;
*1：跳跃&lt;br /&gt;
*2：击退运动&lt;br /&gt;
*3：击飞运动 （当为击飞运动时，速度参数为击飞的滞空时间）&lt;br /&gt;
&lt;br /&gt;
速度参数为角色移动时的水平速度（当速度小于等于0时为闪现至目标）&lt;br /&gt;
&lt;br /&gt;
冲撞质量在匀速运动时表示刚体质量，0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了，目前暂时无用了，参数还必须要填写。&lt;br /&gt;
&lt;br /&gt;
绑定特效为运动时附加在单位上的特效ID&lt;br /&gt;
&lt;br /&gt;
运动结束承接技能为执行运动结束后立即执行的技能ID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''停止当前突进运动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''在目标位置进行一次爆破物理效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''对目标单位进行一次击退效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''播放一个指定音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#音效ID#音效位置（同第一节解释）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''单位根据模型配置播放指定音效字典中的字段对应音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#音效字典KEY值#单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''播放一个指定音效（在施法者处）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 cast_sound#音效ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''播放一个链式特效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式&lt;br /&gt;
释放目标的参数见 技能 指令目标参数说明&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''嘲讽效果，让目标立即攻击释放者'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#释放者#目标单位&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''操作当前命令行参数&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#操作方式#操作值D&lt;br /&gt;
操作方式：0：设置为值D  1：增加值D 2：减少值D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''注意：与其他缓冲后依次执行的指令不同，该指令不会进入执行队列，将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''设置预设位置参数'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]&lt;br /&gt;
操作方式：&lt;br /&gt;
&lt;br /&gt;
*0：我方增援出兵位置 操作参数分别为 x,y,z的偏移&lt;br /&gt;
*1：查询目标单位位置 操作参数为查询指令(见第4小节)&lt;br /&gt;
*2：查询技能参数位置 操作参数为查询指令(见第2小节位置信息)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''播放一个已定义的技能动作'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''召唤一个单位'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 summon_unit#召唤方式#对象参数[,血量百分比(可选参数，默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数（可选参数，默认为caster）#替换角色技能(可选参数，为空为不替换)#默认策略参数&lt;br /&gt;
召唤方式：0：对象的镜像  1：通过人物ID召唤  2：通过小兵ID召唤&lt;br /&gt;
&lt;br /&gt;
对象参数： 当召唤方式为0时表示对象单位（参考本章4节）；当召唤方式为1时表示人物模版ID,等级；当召唤方式为2时表示兵种单位ID&lt;br /&gt;
&lt;br /&gt;
初始位置参数见本章2节&lt;br /&gt;
&lt;br /&gt;
持续时间小于等于0时表示本次战斗永久持续，大于0时表示持续秒数&lt;br /&gt;
&lt;br /&gt;
附加状态为该单位的附加属性表，如： s_生命,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_攻击,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]   表示召唤出的单位生命与攻击力均为原单位的一半&lt;br /&gt;
&lt;br /&gt;
附加特效参数：默认为0 当为1时显示半透明影子效果&lt;br /&gt;
&lt;br /&gt;
单位阵营参考目标参数：以指定的目标当前的阵营作为召唤单位当前的阵营，默认为施法者所在的阵营&lt;br /&gt;
&lt;br /&gt;
替换角色技能参数：格式为普通角色技能表信息，如：  技能1,1|技能2,1|...    如果需要复制角色技能，可使用[%this_skills%]或[%aim_skills%]来复制施法者或者目标的技能&lt;br /&gt;
&lt;br /&gt;
默认策略参数：格式为：策略类型,策略参数（默认为“0,0“，支持的策略类型参考SET_POLICY指令，但是不支持攻略地点类型3。例如：参数“2,500”，表示在半径500范围内进行跟随）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''强制改变目标单位的当前位置'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#操作对象(同4节)#位置信息(同2节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''设置目标单位的激活状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否，仅在非激活时有效)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''目标立即被击倒（无视无敌属性）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit#操作对象参数(同4节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''目标主动倒下'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit#操作对象参数（同4节）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''在目标头上弹出一个对话气泡'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#操作对象#对话内容#持续时间(秒数，可省略)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''目标呼喊出几个字（多为技能）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#操作对象#喊话内容&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''播放一个圆形战场警告区域'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#目标位置信息#半径#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''播放一个TimeLine技能对象'''&amp;lt;br /&amp;gt;播放Timeline动作并执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''播放一个TimeLine技能的动作部分'''&amp;lt;br /&amp;gt;只播放Timeline动作，不执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline_anim#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''设置当前施法者的动作锁定状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位：秒 Timeline里编辑时可不指定该时间，以再度调用 block_act#0#0#0的时间差为准)&lt;br /&gt;
可用的锁定状态&lt;br /&gt;
&lt;br /&gt;
*0：不锁定&lt;br /&gt;
*1：锁定攻击及移动&lt;br /&gt;
*2：仅锁定攻击&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''镜头抖动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#时长（秒）#幅度&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''控制角色进行旋转'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''查找并用指定的特效体在当前位置替换目标特效体'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#指定的特效体TAG#匹配数量（≤0时为匹配全部，&amp;gt;0为匹配生成时间最早的有限几个）#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式（同add_eft）#运动参数（可选，同add_eft）#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，同add_eft）#目标参数(同add_eft)#特效体TAG（用于replace_eft指令查询）#原特效体创建者的对象参数(可选，用于查询时筛选，默认为所有人)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''角色顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 hitstop#操作对象#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后角色动作速度恢复为1倍）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''全局顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后全局速度恢复为1倍）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''更改施法者的指定技能CD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能，多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''为此单位设置一个自定义的整形变量值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选，默认为施法者)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''执行一个指定的战斗事件'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''替换施法者单位的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#技能列表信息&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''还原施法者的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''替换施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#技能ID,等级&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''还原施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''将一个单位的指定技能暂时替换为其他技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久，&amp;gt;0为持续指定秒数)#对象单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''改变一个单位当前的MP值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0：否 1：是)#播放受击特效ID(可选，为空不播放)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===战斗中的特殊对象ID===&lt;br /&gt;
战斗指令中经常需要进行一些目标单位的查询，通常是通过角色ID来查找，但是可以通过以下内置ID返回特定的查询对象：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!特殊内置ID&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|玩家单位&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|A方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|B方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|当前执行指令单位自身（一般用于单位挂载脚本中）&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|随机的敌方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|随机的友方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|指定ID为EMITER_ID的发射器单位&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===单位对象附加触发脚本编辑说明===&lt;br /&gt;
通过在地城单位对象中的触发命令中定义，可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为：&lt;br /&gt;
 [CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
每个对象可挂载多个地城对象触发器，当前已支持的触发类型有：&lt;br /&gt;
&lt;br /&gt;
*on_spawn：当刷新出时&lt;br /&gt;
*enter_combat：进入战斗&lt;br /&gt;
*get_hurt：单位受到伤害&lt;br /&gt;
*dead：单位死亡时&lt;br /&gt;
*on_timer：当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发&lt;br /&gt;
*on_skill：该单位开始释放技能时触发 触发参数位技能ID&lt;br /&gt;
*hp_pct：单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比&lt;br /&gt;
*interactive：具有战斗内可交互对象的单位在进行交互行为时触发&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下为一段示例附加脚本：&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#关门，放狗！&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了！别打了！我认输，什么都给你！&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=634</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=634"/>
		<updated>2020-09-21T16:47:04Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Script Directives in Battles===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
===List of Script Directives in Battles===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
&lt;br /&gt;
Function: show a paragraph with a character painting and typewriter effect.&lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''Empty Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: an empty directive. Nothing happens.&lt;br /&gt;
&lt;br /&gt;
Format: NOTHING*1.&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump To'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another scenario event ID.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Option'''&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
&lt;br /&gt;
Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second)&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''Pause Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: pause the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: PAUSE*.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''Continue Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: continue the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: RESUME*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
&lt;br /&gt;
Function: set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]].&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: units on the battlefield can have chat bubbles over their heads, which show their words.&lt;br /&gt;
&lt;br /&gt;
Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''Enemy Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all enemies send reinforcement according to a specific unit list.&lt;br /&gt;
&lt;br /&gt;
Format: ENEMY_REINF*minion list.&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''Ally Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all allies send reinforcement according to a specific unit configuration list.&lt;br /&gt;
&lt;br /&gt;
Format: FRIEND _REINF*minion list&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''Retreat Order'''&lt;br /&gt;
&lt;br /&gt;
Function: order all allies to retreat.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''End Battle by Force'''&lt;br /&gt;
&lt;br /&gt;
Function: end the current battle instantly.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_OVER*code (0: Victory; 1: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''Eliminate All Targets'''&lt;br /&gt;
&lt;br /&gt;
Function: deals massive damage to all units of one side to kill them within a second.&lt;br /&gt;
&lt;br /&gt;
Format: KILL_ALL*0 (0: Ally; 1: Enemy).&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''Player Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff the character controlled by the player so that it will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_PLAYER*1.&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''All Units Will Not Die'''&lt;br /&gt;
&lt;br /&gt;
Function: buff all units on the battlefield so that they will not die.&lt;br /&gt;
&lt;br /&gt;
Format: UNDEAD_ALL*0 (0: Ally; 1: All units).&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''Unit Uses Ability'''&lt;br /&gt;
&lt;br /&gt;
Function: command-specific units on the battlefield to use skills.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Caster ID is the identification ID of the target and can have the following unique values:&lt;br /&gt;
&lt;br /&gt;
'''· PLAYER:''' player '''GM_A:''' the pre-set object of the attacking side '''GM_B:''' the pre-set object of the defending side.&lt;br /&gt;
&lt;br /&gt;
'''· THIS:''' directive giver (usually goes back to the emitter itself). &lt;br /&gt;
&lt;br /&gt;
'''· EMITTER=ID:''' a dungeon emitter of a specific ID, which can be “THIS” to represent the current dungeon emitter. &lt;br /&gt;
&lt;br /&gt;
'''· RND_FRIEND_UNIT:''' random ally units '''RND_ENEMY_UNIT:''' random enemy units. &lt;br /&gt;
&lt;br /&gt;
When a caster is a pre-set object, coordinate parameter 1 represents its initial coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''Refresh Dungeon Unit'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh units that have been defined on the battlefield.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_SPAWN*control ID#value of ignoring status (unit will be refreshed even they are defeated; 0: Yes by default; 1: No).&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''Set Dungeon Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter in a dungeon.&lt;br /&gt;
&lt;br /&gt;
Format: SET_DUNGEON_TS*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''End Dungeon Fight'''&lt;br /&gt;
&lt;br /&gt;
Function: end this dungeon fight and execute relative actions.&lt;br /&gt;
&lt;br /&gt;
Format: DUNGEON_OVER*result value (0: exit; 1: victory; 2: loss).&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''Set Obstacle Area Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific obstacle area.&lt;br /&gt;
&lt;br /&gt;
Format: SET_AREA*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''Set Decoration Status'''&lt;br /&gt;
&lt;br /&gt;
Function: enable or disable a specific map decoration.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WIDGET*control ID#status (0: Normal; -1: Hidden).&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''Set Dungeon Teleporter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a dungeon teleporter and its relevant model.&lt;br /&gt;
&lt;br /&gt;
Format:  SET_TP*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''Set Emitter Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of a specific emitter.&lt;br /&gt;
&lt;br /&gt;
Format: SET_EMITTER*control ID#status (0: Enabled; -1: Disabled).&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''Set Player Model'''&lt;br /&gt;
&lt;br /&gt;
Function: set the model of the character controlled by the player.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_MODE*unit model description info.&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''Set Player’s Current Skills'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current skills of the player’s character.&lt;br /&gt;
&lt;br /&gt;
Format: SET_PLAYER_SKILL*skill ID 1, level| skill ID 1, level| …| skill ID N, level (4 skills at most).&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''Execute Skill Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: execute skill directives.&lt;br /&gt;
&lt;br /&gt;
Format: SKILL_CMD*content of the skill directive.&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''Set Custom Int Field in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: set a custom int field in battles&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''Set Camera Mode'''&lt;br /&gt;
&lt;br /&gt;
Function: set the camera mode in battles.&lt;br /&gt;
&lt;br /&gt;
Format: SET_CAMERA*camera mode#parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available camera modes and meanings of the parameters are:&lt;br /&gt;
&lt;br /&gt;
· 0: follows the player’s character. No parameter (default)..&lt;br /&gt;
&lt;br /&gt;
· 1: follows a specific target. The parameter is the object ID of the target unit.&lt;br /&gt;
&lt;br /&gt;
· 2: coordinate on the battlefield. The parameter is X and Y.&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''Compulsory Attack'''&lt;br /&gt;
&lt;br /&gt;
Function: command a unit to attack another unit.&lt;br /&gt;
&lt;br /&gt;
Format: ATTACK*attacker object ID#target object ID.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''Unit Control Directive Sequence'''&lt;br /&gt;
&lt;br /&gt;
Function: give an array of directives to one unit. The unit will execute the directives according to their sequence.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_QUEUE*target object ID#event IDs in the commanding script (fill the content of command sequence into this event to execute).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The command sequence (the time parameter stands for the time before the next directive is executed) can be:&lt;br /&gt;
&lt;br /&gt;
Directive type 1 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
Directive type 2 [,time parameter]:directive parameter.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Currently, available sequence directive types are:&lt;br /&gt;
&lt;br /&gt;
· skill_cmd: execute skill directives: the parameter is a line of skill directives.&lt;br /&gt;
&lt;br /&gt;
· use_skill: use abilities: ability ID, ability level#target unit object parameter#target position parameter.&lt;br /&gt;
&lt;br /&gt;
· event: execute battle events: event ID in battles#execution condition (optional).&lt;br /&gt;
&lt;br /&gt;
· 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).&lt;br /&gt;
&lt;br /&gt;
· set_dir: set unit’s direction: direction is the parameter.&lt;br /&gt;
&lt;br /&gt;
· keep_act: keep performing one action: action ID (default action when empty)#loop times (loop endlessly when &amp;lt;=0; 1 by default)#time per action (default action when &amp;lt;=0; 0 by default).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''Set Unit Battle Tactic'''&lt;br /&gt;
&lt;br /&gt;
Function: set the current battle tactic for a unit.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, available main tactic types are:&lt;br /&gt;
&lt;br /&gt;
· 0: Attack (the parameter is the radius of awakening, which becomes endless long when the parameter is lower than 0).&lt;br /&gt;
&lt;br /&gt;
· 1: Defend (the parameter is the radius of defending).&lt;br /&gt;
&lt;br /&gt;
· 2: Follow (the parameter is the radius of following).&lt;br /&gt;
&lt;br /&gt;
· 3: Occupy.&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''Set Unit Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer on a unit, which will trigger and complete a specific event.&lt;br /&gt;
&lt;br /&gt;
Format: SET_UNIT_TIMER*target object ID#timer ID#time parameter (disabled when &amp;lt;=0; a timer only works when the unit has an “on timer” trigger event).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''Use Channeling Skill Instantly'''&lt;br /&gt;
&lt;br /&gt;
Function: stop channeling and use the skill instantly (works only when the target is channeling their skill.)&lt;br /&gt;
&lt;br /&gt;
Field 1, value 1|Field 2, value 2|…&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''Replace Unit Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current skill of a unit.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''Replace Unit Dungeon Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: replace the current dungeon skill of a unit.&lt;br /&gt;
&lt;br /&gt;
Format: REPLACE_DGSKILL*target object ID#dungeon skill ID, level (empty skill ID or null means the dungeon skill is disabled).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''Battlefield Message'''&lt;br /&gt;
&lt;br /&gt;
Function: broadcast a battlefield message.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_MSG*message type (0: Normal; 1: Warning).&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''Set Battle Checker Status'''&lt;br /&gt;
&lt;br /&gt;
Function: set the status of Battle Checker.&lt;br /&gt;
&lt;br /&gt;
Format: SET_BATTLE_CHECKER*status (0: Disabled; 1: Enabled).&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''Show End-Battle Button'''&lt;br /&gt;
&lt;br /&gt;
Function: show the button for the player to end battles manually.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_BATTLEOVER_BTN*1.&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''Show Debug Info'''&lt;br /&gt;
&lt;br /&gt;
Function: show debug info.&lt;br /&gt;
&lt;br /&gt;
Format: SHOW_DEBUG_INFO*status value (0: Disabled; 1: Show buff info of player’s character).&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''Open Trade Panel'''&lt;br /&gt;
&lt;br /&gt;
Function: open the trade panel between the player’s character and a specific merchant.&lt;br /&gt;
&lt;br /&gt;
Format: OPENSTORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''Refresh Merchant’s Items'''&lt;br /&gt;
&lt;br /&gt;
Function: refresh a merchant’s item based on the configuration.&lt;br /&gt;
&lt;br /&gt;
Format: RESET_STORE*merchant ID.&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''Set Global Timer'''&lt;br /&gt;
&lt;br /&gt;
Function: set a timer to delay the execution of some scripts.&lt;br /&gt;
&lt;br /&gt;
Format: SET_TIMER*timer ID#time parameter (second; function is disabled when the parameter &amp;lt;= 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).&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''Generate Unit in Area'''&lt;br /&gt;
&lt;br /&gt;
Function: generate units in batch in a specific area.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''Player Gets Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
Format: GETITEMS*item list info.&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''Remove Items or Resources'''&lt;br /&gt;
&lt;br /&gt;
Function: remove a certain number of items from the player’s inventory.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_ITEMS*item list.&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''Execute Drop Check'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a check according to the loot list (please refer to the format of Item Dropping Info).&lt;br /&gt;
&lt;br /&gt;
Format: LOOT*Loot list.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''Hero Gains EXP'''&lt;br /&gt;
&lt;br /&gt;
Function: a specific hero gains EXP.&lt;br /&gt;
&lt;br /&gt;
Format: ADD_EXP*EXP#target hero ID（optional; player’s character by default).&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''Manage Hero Skill'''&lt;br /&gt;
&lt;br /&gt;
Function: manage the skills of a hero. You can add, replace, or remove the skills of the hero.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''Execute LUA Function'''&lt;br /&gt;
&lt;br /&gt;
Function: execute specific functions in the currently loaded LUA script.&lt;br /&gt;
&lt;br /&gt;
Format: CALL_LUAFUNC*function name in the script.&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''Add Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: add an interactive object on the current battlefield.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt;= 0)# event ID after refreshment (the ID of the event-triggered after refreshment).&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''Remove Interactive Object in Battles'''&lt;br /&gt;
&lt;br /&gt;
Function: remove an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
Format: REMOVE_INTER_OBJECT#control ID (“THIS” can be used to refer to the object itself in an interactive script event).&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''Change Status of Interactive Object'''&lt;br /&gt;
&lt;br /&gt;
Function: change the status of an interactive object based on its ID.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''Teleport to Other Instance Maps'''&lt;br /&gt;
&lt;br /&gt;
Function: teleport all allies to the target instance map.&lt;br /&gt;
&lt;br /&gt;
Format: TELEPORT*map ID (needs to be defined in “F副本地图信息表”); X coordinate, Y coordinate.&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''Remote Execution Request'''&lt;br /&gt;
&lt;br /&gt;
Function: Send a request to all clients to execute an event.&lt;br /&gt;
&lt;br /&gt;
Format: REMOTE_EVENT*event ID.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Value Query in Battles===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Query Directive'''&lt;br /&gt;
|'''Explanation'''&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|Results of different event scripts in battles (e.g., the result of an option box).&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|How long the current battle has been going on (integer).&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|Return a different random number each time (A&amp;lt;= this number &amp;lt;= B.)&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|Return the result of the last [%rnd:A,B%] query.&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|Return a random number （0~100）that stays the same during the execution period.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|Return the X value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|Return the Y value of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|Return the coordinate of the last random position.&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|The ID of the last skill used by the current queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|Type of the executor of the current directive (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|Type of the current queried target object (0: Hero; 1: Minion).&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|Level of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|Level of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|HP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|HP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|MP percentage of the executor of the current directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|MP percentage of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|The number of ally units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|The number of enemy units left.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|Check if the current hit target is an enemy of the caster (1: Enemy; 0: Not Enemy.)&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|Current battle result.&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|Level of a specific skill ID of the current source object; returns 0 if the level is 0.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|A basic physical attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|A basic magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|An overall magic attack based on the current skill level.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|Number of stacks of source object’s current BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|The current number of stacks of target object’s specific BUFF_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|The current value of a specific field attribute of a target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|Weapon type of the queried source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|Weapon type of the queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|Value of charging of this damage（0~100).&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|The parameter of the current command line.&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|Return the parameter of the current command line, and the parameter increases by 1 instantly.&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|INDEX value of the loop where the current command line is located.&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|Add the target unit to the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|Remove the target unit from the unit list that has been searched. Always returns 1. TAGINFO is the same as the explanation above.&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|Reset the current search list. It always returns 1.&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|Randomly enumerate values, and return the RES value of one of the enumerated ones according to their probability distribution.&lt;br /&gt;
&lt;br /&gt;
E.g.,&lt;br /&gt;
&lt;br /&gt;
[%rnd_enum:25,1:40,2:35,3%] means that is a 25% chance to return “1”, 40% for “2”, and 35% for “3”.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|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).&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|Return the number of refreshed units that have not been defeated and have the “TAG” tag on the current battlefield.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|Value of the defeated ally counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|Value of the defeated enemy counter of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated-ally counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|Value of defeated enemy -counter of source object divided by MOD_VAL, and take the remainder.&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|Return the value in a custom dungeon int field of a specific KEY.&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|Return the remaining time of the timer (whose ID is “TIMER_ID”) on a unit with a specific UNIT_ID.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current directive executor (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|Return the custom int value of the current queried target object (skill directive set_unit_intvar setting).&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|Number of special effect units with a specific TAG&lt;br /&gt;
&lt;br /&gt;
Please note: this only counts the special effect units created by the caster.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|The unit ID of the current queried object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|The unit ID of the current queried target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|Actual damage or healing amount to a target unit in the current casting.&lt;br /&gt;
&lt;br /&gt;
Please: this only works in the hit directive.&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|Check if the current skill or damage comes into effect when the caster is invisible （0: No; 1: Yes).&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|Times of the current skill is actually hitting units.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.7.4.2 to be executed.&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|Return the skill list of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|Return the skill list of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |Following directives need client higher than 0.8.0.1 to be executed&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|Return the client ID of the current source object.&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|Return the client ID of the current target object.&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|Player’s money in the game.&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|Return the number of a specific item or resource in the player’s bag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Format of Damage Expression===&lt;br /&gt;
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:&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
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 [&amp;amp;expression&amp;amp;] format);&lt;br /&gt;
&lt;br /&gt;
Currently supported damage expression key-value is：&lt;br /&gt;
&lt;br /&gt;
*type: damage type: 0: melee attack 1: ranged attack 2: skill damage 3: healing 4: MP regen&lt;br /&gt;
*dmg: physical damage value. The value is the damage expression. &lt;br /&gt;
*t_dmg: true damage value (all healing effects are counted as this type of value). The value is the damage expression.&lt;br /&gt;
*hit: hit parameter (-1000~1000). When an attack cannot be evaded, the value is -1000. &lt;br /&gt;
*blk: block parameter (-1000~1000). When an attack cannot be blocked, the value is -1000.&lt;br /&gt;
*cri: critical rate parameter (-1000~1000). When an attack cannot deal critical damage, the value is -1000.&lt;br /&gt;
*act: play unit action when they are hit. 0: No; 1: Yes&lt;br /&gt;
*eft ID: special effect ID (when the unit is hit).&lt;br /&gt;
*trig: trigger damage effect (e.g., damage reflection).&lt;br /&gt;
*attack_type: decide the type of weapon attacks that caused the damage. &lt;br /&gt;
*buff: Gain buffs when receiving damage, Format: BuffID,[time],[overlay]. The two parameters are optional, meaning time and the number of stacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]: a random integer (min_val&amp;lt;= this integer&amp;lt;= max_val). &lt;br /&gt;
*[%field%]: field stands for a random value defined in a character attribute field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Skill Directive Editing'''===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
 0*条件表达式1#技能命令1&lt;br /&gt;
 0.2#技能命令2&lt;br /&gt;
 ……&lt;br /&gt;
当条件表达式不为空时，根据条件表达式判定结果执行。&lt;br /&gt;
&lt;br /&gt;
条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果，例如&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_START:9&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#技能命令&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_END&lt;br /&gt;
表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍，期间可以通过[%rpt_index%]来查询当前语句处于第几次循环&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
表示对SELECT_UNITS行与SELECT_END之间所有的命令行，对SELECT_UNITS:后所有满足指定条件表达式的对象使用，并以该对象作为caster对象&lt;br /&gt;
&lt;br /&gt;
其中，嵌入到[@...@]中的语句为保留两位小数的结果运算取值，此类查询仅在技能命令中有效。&lt;br /&gt;
&lt;br /&gt;
目前支持的技能命令有：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!技能指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''立即停止当前所有技能动作并按照之前指令行动'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''向战场中添加一个预定义的特效体'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，为空时按照特效表中定义的伤害表达式计算，格式见6.4节）#目标参数(见7.4节说明)#特效体TAG（用于replace_eft指令查询）&lt;br /&gt;
初始位置格式为：位置类型,偏移x,偏移y,偏移z（偏移量为相对于初始方向的偏移）&lt;br /&gt;
&lt;br /&gt;
支持的位置类型有：&lt;br /&gt;
&lt;br /&gt;
*cast_pos：技能施放动作的预设位置&lt;br /&gt;
*tag_pos：技能施放目标单位或者目标坐标的位置&lt;br /&gt;
*hit_pos：技能命中目标单位当前的位置&lt;br /&gt;
*unit_pos：技能施放单位当前的位置&lt;br /&gt;
*start_pos：技能释放时的开始位置&lt;br /&gt;
*rnd_pos：技能释放单位周围一个任意的位置&lt;br /&gt;
*dim_pos：通过set_dimpos命令定义的预设位置&lt;br /&gt;
*reinf_pos：施法者阵营方的增援位置&lt;br /&gt;
*emitter_pos=EMITTER_ID：ID为EMITTER_ID的发射器发射点位置&lt;br /&gt;
*unit_round=DIR:LEN：距离施法者正方向偏移DIR角度，距离为LEN的位置&lt;br /&gt;
*rnd_round=RAD[-MIN_RAD]：施法者半径RAD范围内的随机位置，可选参数MIN_RAD表示随机范围距中心的最小距离，默认为0&lt;br /&gt;
*eft_pos=TAG：返回查询到的第一个指定特效体TAG的特效体位置，如不存在则返回caster的当前位置 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
*……&lt;br /&gt;
&lt;br /&gt;
运动参数格式为：运动类型:运动参数（形如：参数1,参数2,参数3.....）&lt;br /&gt;
&lt;br /&gt;
支持的运动类型有：&lt;br /&gt;
&lt;br /&gt;
*0：不运动 无参数&lt;br /&gt;
*1：运动至技能目标点 偏移x,偏移y,偏移z&lt;br /&gt;
*2：运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标，否则按照技能释放目标)&lt;br /&gt;
*3：向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*4：向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*5：跟随目标运动 跟随类型(0固定相对位置，1发射点位置),偏移x,偏移y,偏移z,持续时间（-1为永久）&lt;br /&gt;
*6：运动至dim_pos 偏移x,偏移y,偏移z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''进行伤害判定'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选，默认关闭)&lt;br /&gt;
支持的判断类型有：&lt;br /&gt;
&lt;br /&gt;
*0：单体判断（目标对象参数为目标单位见下一小节，为空表示技能目标）&lt;br /&gt;
*1：半径范围判断 目标对象参数为目标类型(0:敌方 1：我方 2：双方) 参数表中参数1为参考位置类型（见add_eft命令的位置类型） 参数2,3,4,5分别为偏移坐标的x,y,z及半径&lt;br /&gt;
*2：多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数，参数4以后为以参考点坐标为(0,0)的多边形坐标信息&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''对目标施加BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_buff#buff ID#BUFF目标参数#持续时间（如不指定则采用BUFF默认持续时间）#叠加层数（默认为1）#上限层数(默认为配置表中的数值，只有大于0时生效)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
可支持的内置目标参数有：&lt;br /&gt;
&lt;br /&gt;
*caster：技能释放者&lt;br /&gt;
*target：目标单位（指向性技能的目标或技能命中的目标）&lt;br /&gt;
*roleid,ROLEID：查询单位绑定人物ID为ROLEID的一个目标对象&lt;br /&gt;
*buffgiver,BUFFID：查询当前caster身上一个ID为BUFFID的BUFF给与者&lt;br /&gt;
*find_tag_res：查询指定目标的结果单位（必须先执行一次[%find_tag:TAGINFO%]查询才可调用）&lt;br /&gt;
*tag_next_fu,距离D：当前命中目标的下一个小于距离D的友方单位&lt;br /&gt;
*caster_next_fu,距离D：施法者的下一个小于距离D的友方目标&lt;br /&gt;
*caster_next_eu,距离D：施法者的下一个小于距离D的敌方目标&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''移除目标的BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#移除目标（同上）#移除方式#参数1,参数2,参数3...&lt;br /&gt;
目前支持的移除方式如下&lt;br /&gt;
&lt;br /&gt;
*0：全部移除&lt;br /&gt;
*1：移除指定BUFF 参数1为BUFF ID，参数2为移除层数（默认-1为全部移除）&lt;br /&gt;
*2：移除有害BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
*3：移除有益BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''突进类移动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒，在运动结束前开始执行承接技能向前的时间偏移量&amp;gt;=0)[可为空]#操作对象(可选，默认为caster)#修正目标位置(可选，参数格式见节2)#是否强制(默认0  为1时强制移动)&lt;br /&gt;
移动类型分为：&lt;br /&gt;
&lt;br /&gt;
*0：匀速运动&lt;br /&gt;
*1：跳跃&lt;br /&gt;
*2：击退运动&lt;br /&gt;
*3：击飞运动 （当为击飞运动时，速度参数为击飞的滞空时间）&lt;br /&gt;
&lt;br /&gt;
速度参数为角色移动时的水平速度（当速度小于等于0时为闪现至目标）&lt;br /&gt;
&lt;br /&gt;
冲撞质量在匀速运动时表示刚体质量，0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了，目前暂时无用了，参数还必须要填写。&lt;br /&gt;
&lt;br /&gt;
绑定特效为运动时附加在单位上的特效ID&lt;br /&gt;
&lt;br /&gt;
运动结束承接技能为执行运动结束后立即执行的技能ID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''停止当前突进运动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''在目标位置进行一次爆破物理效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''对目标单位进行一次击退效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''播放一个指定音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#音效ID#音效位置（同第一节解释）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''单位根据模型配置播放指定音效字典中的字段对应音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#音效字典KEY值#单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''播放一个指定音效（在施法者处）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 cast_sound#音效ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''播放一个链式特效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式&lt;br /&gt;
释放目标的参数见 技能 指令目标参数说明&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''嘲讽效果，让目标立即攻击释放者'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#释放者#目标单位&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''操作当前命令行参数&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#操作方式#操作值D&lt;br /&gt;
操作方式：0：设置为值D  1：增加值D 2：减少值D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''注意：与其他缓冲后依次执行的指令不同，该指令不会进入执行队列，将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''设置预设位置参数'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]&lt;br /&gt;
操作方式：&lt;br /&gt;
&lt;br /&gt;
*0：我方增援出兵位置 操作参数分别为 x,y,z的偏移&lt;br /&gt;
*1：查询目标单位位置 操作参数为查询指令(见第4小节)&lt;br /&gt;
*2：查询技能参数位置 操作参数为查询指令(见第2小节位置信息)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''播放一个已定义的技能动作'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''召唤一个单位'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 summon_unit#召唤方式#对象参数[,血量百分比(可选参数，默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数（可选参数，默认为caster）#替换角色技能(可选参数，为空为不替换)#默认策略参数&lt;br /&gt;
召唤方式：0：对象的镜像  1：通过人物ID召唤  2：通过小兵ID召唤&lt;br /&gt;
&lt;br /&gt;
对象参数： 当召唤方式为0时表示对象单位（参考本章4节）；当召唤方式为1时表示人物模版ID,等级；当召唤方式为2时表示兵种单位ID&lt;br /&gt;
&lt;br /&gt;
初始位置参数见本章2节&lt;br /&gt;
&lt;br /&gt;
持续时间小于等于0时表示本次战斗永久持续，大于0时表示持续秒数&lt;br /&gt;
&lt;br /&gt;
附加状态为该单位的附加属性表，如： s_生命,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_攻击,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]   表示召唤出的单位生命与攻击力均为原单位的一半&lt;br /&gt;
&lt;br /&gt;
附加特效参数：默认为0 当为1时显示半透明影子效果&lt;br /&gt;
&lt;br /&gt;
单位阵营参考目标参数：以指定的目标当前的阵营作为召唤单位当前的阵营，默认为施法者所在的阵营&lt;br /&gt;
&lt;br /&gt;
替换角色技能参数：格式为普通角色技能表信息，如：  技能1,1|技能2,1|...    如果需要复制角色技能，可使用[%this_skills%]或[%aim_skills%]来复制施法者或者目标的技能&lt;br /&gt;
&lt;br /&gt;
默认策略参数：格式为：策略类型,策略参数（默认为“0,0“，支持的策略类型参考SET_POLICY指令，但是不支持攻略地点类型3。例如：参数“2,500”，表示在半径500范围内进行跟随）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''强制改变目标单位的当前位置'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#操作对象(同4节)#位置信息(同2节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''设置目标单位的激活状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否，仅在非激活时有效)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''目标立即被击倒（无视无敌属性）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit#操作对象参数(同4节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''目标主动倒下'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit#操作对象参数（同4节）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''在目标头上弹出一个对话气泡'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#操作对象#对话内容#持续时间(秒数，可省略)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''目标呼喊出几个字（多为技能）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#操作对象#喊话内容&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''播放一个圆形战场警告区域'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#目标位置信息#半径#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''播放一个TimeLine技能对象'''&amp;lt;br /&amp;gt;播放Timeline动作并执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''播放一个TimeLine技能的动作部分'''&amp;lt;br /&amp;gt;只播放Timeline动作，不执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline_anim#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''设置当前施法者的动作锁定状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位：秒 Timeline里编辑时可不指定该时间，以再度调用 block_act#0#0#0的时间差为准)&lt;br /&gt;
可用的锁定状态&lt;br /&gt;
&lt;br /&gt;
*0：不锁定&lt;br /&gt;
*1：锁定攻击及移动&lt;br /&gt;
*2：仅锁定攻击&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''镜头抖动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#时长（秒）#幅度&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''控制角色进行旋转'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''查找并用指定的特效体在当前位置替换目标特效体'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#指定的特效体TAG#匹配数量（≤0时为匹配全部，&amp;gt;0为匹配生成时间最早的有限几个）#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式（同add_eft）#运动参数（可选，同add_eft）#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，同add_eft）#目标参数(同add_eft)#特效体TAG（用于replace_eft指令查询）#原特效体创建者的对象参数(可选，用于查询时筛选，默认为所有人)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''角色顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 hitstop#操作对象#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后角色动作速度恢复为1倍）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''全局顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后全局速度恢复为1倍）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''更改施法者的指定技能CD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能，多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''为此单位设置一个自定义的整形变量值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选，默认为施法者)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''执行一个指定的战斗事件'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''替换施法者单位的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#技能列表信息&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''还原施法者的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''替换施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#技能ID,等级&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''还原施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''将一个单位的指定技能暂时替换为其他技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久，&amp;gt;0为持续指定秒数)#对象单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''改变一个单位当前的MP值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0：否 1：是)#播放受击特效ID(可选，为空不播放)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===战斗中的特殊对象ID===&lt;br /&gt;
战斗指令中经常需要进行一些目标单位的查询，通常是通过角色ID来查找，但是可以通过以下内置ID返回特定的查询对象：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!特殊内置ID&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|玩家单位&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|A方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|B方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|当前执行指令单位自身（一般用于单位挂载脚本中）&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|随机的敌方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|随机的友方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|指定ID为EMITER_ID的发射器单位&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===单位对象附加触发脚本编辑说明===&lt;br /&gt;
通过在地城单位对象中的触发命令中定义，可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为：&lt;br /&gt;
 [CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
每个对象可挂载多个地城对象触发器，当前已支持的触发类型有：&lt;br /&gt;
&lt;br /&gt;
*on_spawn：当刷新出时&lt;br /&gt;
*enter_combat：进入战斗&lt;br /&gt;
*get_hurt：单位受到伤害&lt;br /&gt;
*dead：单位死亡时&lt;br /&gt;
*on_timer：当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发&lt;br /&gt;
*on_skill：该单位开始释放技能时触发 触发参数位技能ID&lt;br /&gt;
*hp_pct：单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比&lt;br /&gt;
*interactive：具有战斗内可交互对象的单位在进行交互行为时触发&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下为一段示例附加脚本：&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#关门，放狗！&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了！别打了！我认输，什么都给你！&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=633</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=633"/>
		<updated>2020-09-21T16:41:37Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* List of Script Directives in Battles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Script Directives in Battles===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
===List of Script Directives in Battles===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
&lt;br /&gt;
Function: show a paragraph with a character painting and typewriter effect.&lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''Empty Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: an empty directive. Nothing happens.&lt;br /&gt;
&lt;br /&gt;
Format: NOTHING*1.&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump To'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another scenario event ID.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Option'''&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
&lt;br /&gt;
Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second)&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''Pause Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: pause the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: PAUSE*.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''Continue Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: continue the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: RESUME*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
&lt;br /&gt;
Function: set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Common Scenario Directives#Format of Weather Effect Info|Format of Weather Effect Info]].&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: units on the battlefield can have chat bubbles over their heads, which show their words.&lt;br /&gt;
&lt;br /&gt;
Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''Enemy Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all enemies send reinforcement according to a specific unit list.&lt;br /&gt;
&lt;br /&gt;
Format: ENEMY_REINF*minion list.&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''Ally Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all allies send reinforcement according to a specific unit configuration list.&lt;br /&gt;
&lt;br /&gt;
Format: FRIEND _REINF*minion list&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''Retreat Order'''&lt;br /&gt;
&lt;br /&gt;
Function: order all allies to retreat.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''End Battle by Force'''&lt;br /&gt;
&lt;br /&gt;
Function: end the current battle instantly.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_OVER*code (0: Victory; 1: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''全灭目标'''&lt;br /&gt;
用途：立即对一方所有单位造成足以秒杀此单位的巨量伤害&lt;br /&gt;
&lt;br /&gt;
格式：KILL_ALL*0为我方 1：为敌方&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''主角不死'''&lt;br /&gt;
用途：给玩家控制的角色增加一个不死的BUFF&lt;br /&gt;
&lt;br /&gt;
格式：UNDEAD_PLAYER*1&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''所有单位不死'''&lt;br /&gt;
&lt;br /&gt;
用途：给场上所有的单位增加一个不死的BUFF&lt;br /&gt;
&lt;br /&gt;
格式：UNDEAD_ALL*0：仅我方 1：敌我双方&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;s&amp;gt;STOP_ALL&amp;lt;/s&amp;gt;&lt;br /&gt;
|'''&amp;lt;s&amp;gt;所有单位停止行动&amp;lt;/s&amp;gt;'''&lt;br /&gt;
&amp;lt;s&amp;gt;用途：命令场上所有的单位停止当前行动&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;格式：STOP_ALL*0：恢复 1：停&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''单位使用技能'''&lt;br /&gt;
用途：命令场上指定单位使用技能&lt;br /&gt;
&lt;br /&gt;
格式：EXEC_SKILL*释放者ID#技能ID,技能等级(默认1级)#目标坐标的x,y#坐标参数1的x,y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
释放者ID为目标的识别ID，可以有以下特殊值&lt;br /&gt;
&lt;br /&gt;
*PLAYER：玩家  GM_A：进攻方的预设对象 GM_B：防守方的预设对象&lt;br /&gt;
*THIS：指令发起者（一般返回发射器自身）&lt;br /&gt;
*EMITTER=ID：指定ID的地城发射器，可为this表示当前地城发射器&lt;br /&gt;
*RND_FRIEND_UNIT：随机友方单位	 RND_ENEMY_UNIT：随机敌方单位&lt;br /&gt;
&lt;br /&gt;
当释放者为预设对象时，坐标参数1代表技能释放的其起始坐标&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''刷新地城单位'''&lt;br /&gt;
用途：刷新战场地图上已经定义过的地城单位&lt;br /&gt;
&lt;br /&gt;
格式：DUNGEON_SPAWN*控制ID#是否无视状态(当该单位已被击败时仍可刷新 0：否[默认] 1是)&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''设置地城触发器状态'''&lt;br /&gt;
用途：设置地城中指定触发器的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_DUNGEON_TS*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''结束本次地城战斗'''&lt;br /&gt;
用途：结束本次地城战斗并执行相应操作&lt;br /&gt;
&lt;br /&gt;
格式：DUNGEON_OVER*结果代码(0：退出 1：胜利 2：失败)&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''设置障碍区域状态'''&lt;br /&gt;
用途：启用或禁用指定的障碍区域&lt;br /&gt;
&lt;br /&gt;
格式：SET_AREA*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''设置装饰物件状态'''&lt;br /&gt;
用途：启用或禁用指定的地图装饰物件&lt;br /&gt;
&lt;br /&gt;
格式：SET_WIDGET*控制ID#状态(0正常 -1隐藏)&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''设置地城传送器状态'''&lt;br /&gt;
用途：设置地城中的传送器及其关联模型的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_TP*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''设置发射器状态'''&lt;br /&gt;
用途：设置指定发射器的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_EMITTER*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''设置玩家角色模型'''&lt;br /&gt;
用途：设置玩家角色的模型&lt;br /&gt;
&lt;br /&gt;
格式：SET_PLAYER_MODEL*单位模型描述信息&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''设置玩家当前技能'''&lt;br /&gt;
用途：设置玩家角色当前的技能&lt;br /&gt;
&lt;br /&gt;
格式：SET_PLAYER_SKILL*技能ID1,等级|技能ID2,等级|...|技能ID n,等级 （最多4个技能）&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''执行技能指令'''&lt;br /&gt;
用途：直接执行技能指令&lt;br /&gt;
&lt;br /&gt;
格式：SKILL_CMD*技能指令内容&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''设置战斗中的自定义整形字段'''&lt;br /&gt;
用途：设置战斗中的自定义整形字段&lt;br /&gt;
&lt;br /&gt;
格式：SET_DG_INTVAR*字段ID#设置值#设置模式(可选 1为增加模式（原值加上设置值） 其他为直接赋值模式)#监视信息（可选，当存在时在变量监视界面上显示变量监视信息）&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''设置镜头模式'''&lt;br /&gt;
用途：设置战斗中的镜头跟随模式&lt;br /&gt;
&lt;br /&gt;
格式：SET_CAMERA*跟随模式#参数&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
目前支持的镜头跟随模式及参数含义&lt;br /&gt;
&lt;br /&gt;
*0：跟随主角，无参数（默认）&lt;br /&gt;
*1：跟随指定目标，参数为目标单位的对象ID&lt;br /&gt;
*2：战场坐标位置，参数为坐标X,Y&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''命令攻击'''&lt;br /&gt;
用途：强制命令一个单位开始攻击另外一个单位&lt;br /&gt;
&lt;br /&gt;
格式：ATTACK*攻击发起者对象ID#攻击目标对象ID&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''单位控制命令序列'''&lt;br /&gt;
用途：为一个单位指定控制命令队列，该单位会强制优先按照此命令队列进行执行&lt;br /&gt;
&lt;br /&gt;
格式：CMD_QUEUE*目标对象ID#命令脚本的事件ID(将命令队列的内容填写至该战斗中事件当中来执行)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
命令队列的格式为（时间参数表示该秒数后执行下一条）：&lt;br /&gt;
&lt;br /&gt;
指令类型1[,时间参数]:指令参数&lt;br /&gt;
&lt;br /&gt;
指令类型2[,时间参数]:指令参数&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
当前支持的队列指令类型有：&lt;br /&gt;
&lt;br /&gt;
*skill_cmd：执行技能指令：参数为一行技能指令&lt;br /&gt;
*use_skill：使用技能：技能ID,技能等级#目标单位对象参数#目标位置参数&lt;br /&gt;
*event：执行战斗事件：战斗中事件ID#执行条件(可选)&lt;br /&gt;
*move_to：移动至指定点：目标坐标参数#速度参数(该指令中时间参数无效，只有当单位正确到达目标后执行下一条)&lt;br /&gt;
*set_dir：设置单位方向：参数为方向&lt;br /&gt;
*keep_act：保持一个动作：动作ID(为空时表示待机动作)#循环次数(小于等于0为无限循环 默认1)#单次动作时间(&amp;lt;=0为始终保持 默认0)  注：此命令中时间参数无效，需等待动作循环执行结束为止，当无限循环时只有对该单位下达新指令方可结束动作保持&lt;br /&gt;
&lt;br /&gt;
'''注意，以上命令中所有的坐标参数当为2参数时表示目标位置的x,y地图坐标，当3参数时第三个参数表示位置类型(0:地图坐标 1：战场坐标)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''设置单位的战斗策略'''&lt;br /&gt;
用途：为一个单位设置当前战斗策略&lt;br /&gt;
&lt;br /&gt;
格式：SET_POLICY*目标对象ID#主策略类型#参数1#位置参数#单位TAG筛选标记（仅当目标对象ID为空时生效）#目标单位ID（主要用于跟随等策略指定目标）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
当前支持的主策略类型有：&lt;br /&gt;
&lt;br /&gt;
*0：强攻(参数为唤醒半径，小于等于0为无限距离)&lt;br /&gt;
*1：固守(参数为守卫半径)  &lt;br /&gt;
*2：跟随(参数为跟随半径)&lt;br /&gt;
*3：攻略目标点&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''设置单位挂载计时器'''&lt;br /&gt;
用途：为一个单位设置一个具有触发功能的计时器并完成特定的触发事件&lt;br /&gt;
&lt;br /&gt;
格式：SET_UNIT_TIMER*目标对象ID#计时器ID#时间参数(&amp;lt;=0时为关闭 只有当单位身上挂有”on_timer”触发器事件时有效)&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''立即释放吟唱中的技能'''&lt;br /&gt;
用途：立即释放出单位当前正在吟唱中的技能(只有当目标正在吟唱该技能时生效)&lt;br /&gt;
&lt;br /&gt;
段1,值1|字段2.,值2|...)&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''替换单位技能'''&lt;br /&gt;
用途：替换单位当前的技能&lt;br /&gt;
&lt;br /&gt;
格式：REPLACE_SKILLS*目标对象ID#技能ID1,等级|技能ID2,等级|...|技能ID n,等级 （一次最多4个技能，当等级为0时表示移除该技能）&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''替换单位地城技能'''&lt;br /&gt;
用途：替换单位当前的地城技能&lt;br /&gt;
&lt;br /&gt;
格式：REPLACE_DGSKILL*目标对象ID#地城技能ID,等级(技能ID为空或者null表示关闭该角色地城技能)&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''播放战场消息'''&lt;br /&gt;
&lt;br /&gt;
用途：播放一条战场消息&lt;br /&gt;
&lt;br /&gt;
格式：BATTLE_MSG*消息内容#消息类型(0：普通 1：警告)&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''设置战斗结束检查器工作状态'''&lt;br /&gt;
用途： 设置战斗结束检查器工作状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_BATTLE_CHECKER*工作状态(0：关闭 1：开启）&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''显示手动结束战斗按钮'''&lt;br /&gt;
用途： 显示手动结束战斗按钮&lt;br /&gt;
&lt;br /&gt;
格式：SHOW_BATTLEOVER_BTN*1&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''显示调试信息'''&lt;br /&gt;
用途： 显示调试信息&lt;br /&gt;
&lt;br /&gt;
格式：SHOW_DEBUG_INFO*状态代码（0：关闭 1：开启主角身上BUFF状态显示）&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''打开交易界面'''&lt;br /&gt;
用途：打开与指定商人的交易界面&lt;br /&gt;
&lt;br /&gt;
格式：OPENSTORE*商人ID&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''刷新商人所持商品表'''&lt;br /&gt;
用途：根据配置刷新商人所持的商品表&lt;br /&gt;
&lt;br /&gt;
格式：RESET_STORE*商人ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''设置全局定时器'''&lt;br /&gt;
用途：设置一个定时器来延时执行一些脚本&lt;br /&gt;
&lt;br /&gt;
格式：SET_TIMER*计时器ID#时间参数(秒 &amp;lt;=0为关闭)#定时器结束时执行的事件ID#监视字段信息（可选，如果存在则在变量监视UI中显示剩余时间）&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''区域刷新出单位'''&lt;br /&gt;
用途：在指定的刷新区域批量刷新出指定的单位&lt;br /&gt;
&lt;br /&gt;
格式：AREA_SPAWN*目标区域控制ID#英雄列表#单位表(格式同ENEMY_REINF指令)#所属阵营索引#默认策略(格式为：策略代码:策略参数 同SET_POLICY指令)#刷新出单位的Tag标记（可选）#单位附加属性表（可选）&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''主角获得道具或资源'''&lt;br /&gt;
用途：主角直接获得指定的道具列表（注意：游戏中的金钱、经验等资源都可以通过此方法来获得，只要传入正确的映射ID即可）&lt;br /&gt;
&lt;br /&gt;
格式：GETITEMS*道具列表信息&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''移除指定道具或资源'''&lt;br /&gt;
用途：根据指定的道具数量从主角道具表中移除指定数量的道具&lt;br /&gt;
&lt;br /&gt;
格式：REMOVE_ITEMS*道具列表&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''执行掉落判定'''&lt;br /&gt;
用途：按照列表执行一次掉落检定（LOOT格式见 物品掉落信息格式）&lt;br /&gt;
&lt;br /&gt;
格式：LOOT*Loot列表 &lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''指定英雄获取经验'''&lt;br /&gt;
用途：对一个指定的英雄角色增加经验值&lt;br /&gt;
&lt;br /&gt;
格式：ADD_EXP*经验#目标英雄ID（可选，默认为主角）&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''对指定英雄设置技能'''&lt;br /&gt;
用途：对一个指定的英雄角色设置技能，根据操作对象可实现增加、替换、移除操作&lt;br /&gt;
&lt;br /&gt;
格式：SETSKILL*角色ID（可选，默认为主角）#需要添加的技能信息表(格式为&amp;quot;技能ID1,等级|技能ID2,等级|...&amp;quot;)#需要移除的技能表(可选 多个技能以&amp;quot;|&amp;quot;分隔)&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''执行LUA函数'''&lt;br /&gt;
用途：执行当前加载的LUA脚本中的指定函数名&lt;br /&gt;
&lt;br /&gt;
格式：CALL_LUAFUNC*脚本中的函数名&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''添加一个战斗内可交互对象'''&lt;br /&gt;
用途：向当前的战斗中添加一个可交互对象&lt;br /&gt;
&lt;br /&gt;
格式：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， 当&amp;lt;=0时为手动刷新)#自动刷新事件ID（当自动刷新时触发的事件ID）&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''移除战斗内可交互对象'''&lt;br /&gt;
用途：按照控制ID移除指定的可交互对象&lt;br /&gt;
&lt;br /&gt;
格式：REMOVE_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''修改可交互对象的状态'''&lt;br /&gt;
用途：按照控制ID修改指定可交互对象的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)#新的状态值(0：普通 1：可见不可交互 2：隐藏)&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''传送至其他副本地图'''&lt;br /&gt;
用途：将当前的所有玩家角色都传送到指定的副本地图位置&lt;br /&gt;
&lt;br /&gt;
格式：TELEPORT*副本地图ID(需定义在“F副本地图信息表”中):地图坐标X,地图坐标Y&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''远程请求执行事件'''&lt;br /&gt;
用途：本地请求所有客户端执行一个事件&lt;br /&gt;
&lt;br /&gt;
格式：REMOTE_EVENT*事件ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===专门用于战斗场景中条件查询方法===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!查询指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|战斗中各种事件脚本的查询结果(如：选择框的结果)&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|当前战斗进行的时间(整秒数)&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|返回一个每次都不相同的大于等于A小于等于B的随机值&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|返回上一次[%rnd:A,B%]查询到的结果&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|返回一个执行周期内相同的0-100的随机值&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|返回上一个随机位置结果的X&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|返回上一个随机位置结果的Y&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|返回上一个随机位置坐标&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|当前查询源对象上一个使用技能的ID&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|当前查询源对象的类型 0英雄 1小兵&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|当前查询目标对象的类型 0英雄 1小兵&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|当前查询源对象的等级&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|当前查询目标对象的等级&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|当前查询源对象的HP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|当前查询目标对象的HP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|当前查询源对象的MP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|当前查询目标对象的MP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|我方剩余人数&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|敌方剩余人数&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|判断当前命中的目标是否caster的敌人。敌方1 非敌方0&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|当前当前战斗结果&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|查询当前source对象指定技能ID的等级，无则返回0&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|当前技能等级所对应的基础物理攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|当前技能等级所对应的基础魔法攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|当前技能等级所对应的魔法最终攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|查询当前source对象指定BUFF_ID的当前层数&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|查询当前target对象指定BUFF_ID的当前层数&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|查询当前source指定属性字段的当前数值&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|查询当前target对象指定属性字段的当前数值&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|当前查询source对象的武器类型&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|当前查询target对象的武器类型&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|本次伤害的蓄力值（0~100）&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|当前命令行的参数值&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|返回当前命令行参数值后立即加1&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|当前命令行所在循环的INDEX值&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|执行一次目标单位查找，TAGINFO为目标单位信息，参数格式见 技能对象格式说明，当查询到合适目标时返回1否则返回0&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|从已查找单位列表中增加目标单位，始终返回1，TAGINFO同上&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|从已查找单位列表中排除目标单位，始终返回1，TAGINFO同上&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|重置当前查找列表，始终返回1&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|随机枚举值，根据所有项的概率分布返回其中一个项的RES值。&lt;br /&gt;
比如：[%rnd_enum:25,1:40,2:35,3%]表示有25%的概率返回”1”，40%的概率返回”2”，35%的概率返回”3”&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|返回当前战斗地图中ControlID为ID的刷新单位的当前状态 0：未刷新 1：已刷新 -1：已击败&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|返回当前战斗地图中剩余未击败并且Tag为TAG的刷新单位的个数&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|当前查询source对象的友军倒下计数器值&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|当前查询source对象的敌军倒下计数器值&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|当前查询source对象的友军倒下计数器值与MOD_VAL取余后的值&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|当前查询source对象的敌军倒下计数器值与MOD_VAL取余后的值&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|返回指定KEY的自定义地城整形字段的值&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|返回指定指定ID的发射器中心位置，距其中心MIN至MAX的一个随机位置，并记录入last_rnd_pos&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|返回指定UNIT_ID单位身上所附加的ID为TIMER_ID的计时器剩余时间&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|返回当前查询source对象身上的自定义整形数值(技能指令set_unit_intvar设置)&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|返回当前查询target对象身上的自定义整形数值(技能指令set_unit_intvar设置)&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|查询当前命令是否是在击杀单位指令中执行的并且目标单位已被击杀(0：否 1：是) 注意：只能在技能中的命中命令指令中生效&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|查询当前场上指定TAG的特效体数量 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|当前查询对象的单位ID&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|当前查询目标对象的单位ID&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|查询当前施法中对目标造成的实际伤害或治疗的实际数值 注意：只能在命中指令中生效&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|查询当前技能或伤害是否是在隐身状态下进行的 0否1是&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|查询当前技能命中判定生效的次数&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下指令需要客户端版本高于0.7.4.2&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|返回当前查询source对象当前的技能列表&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|返回当前查询target对象当前的技能列表&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下指令需要客户端版本高于0.8.0.1&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|返回当前查询source对象当前的客户端ID&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|返回当前查询target对象当前的客户端ID&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|玩家身上的金钱数&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|返回背包中某种物品（或者资源）的数目&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===伤害表达式格式===&lt;br /&gt;
游戏战斗中，所有形式的攻击、技能、特效、指令等对单位造成的伤害，结算时都是通过一个统一的接口来实现的。该接口的主要传入参数是一个数据结构，此数据结构可在各种脚本里通过伤害值表达式的形式来指定。一般伤害值表达式的格式如下：&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
伤害值表达式可以嵌入到一些数值表里（如BUFF列表的状态值等），或者直接嵌入到数值计算公式（[&amp;amp;expression&amp;amp;]格式中）；&lt;br /&gt;
&lt;br /&gt;
目前可支持的伤害表达式键值有：&lt;br /&gt;
&lt;br /&gt;
*type 伤害类型：0:普通近战攻击 1:普通远程攻击 2:技能伤害 3:治疗 4：回蓝&lt;br /&gt;
*dmg 物理伤害数值，值为伤害值公式&lt;br /&gt;
*t_dmg 真实伤害数值(所有治疗效果都为此值)，值为伤害值公式&lt;br /&gt;
*hit 命中参数（-1000~1000） 当不能闪避时为-1000&lt;br /&gt;
*blk 被招架参数（-1000~1000） 当不能被招架时为-1000&lt;br /&gt;
*cri 暴击参数（-1000~1000） 当不能暴击时为-1000&lt;br /&gt;
*act 是否播放受击动作 1是 0否&lt;br /&gt;
*eft 受击特效ID&lt;br /&gt;
*trig 是否触发伤害效果（如反伤等）&lt;br /&gt;
*attack_type 指定伤害的武器攻击类型&lt;br /&gt;
*buff 受到该伤害时附带的BUFF效果, 格式为 BuffID,[time],[overlay]，两个参数为可选参数，分别表示时间及层数&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
伤害值公式仅支持标准数学公式，包含以下运算符号：+-*/^%()，可嵌入一些预定义字段，所有预定义字段写在形如[%cmd%]的格式内，目前支持的预定义字段有：&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]：随机一个大于等于min_val，小于等于max_val的整数&lt;br /&gt;
*[%field%]：field表示任意一个定义在角色属性字段中的数值&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===技能指令编辑说明===&lt;br /&gt;
技能指令是用来在战斗中实现各种技能效果的基础元素。在战斗中，所有单位执行技能时都会将该技能中的技能指令放入战斗技能指令执行队列中，根据各自的运行环境依次执行。&lt;br /&gt;
&lt;br /&gt;
在技能配置表中技能命令条目以”\n”换行符分隔，每条由延迟时间*[条件表达式(可选)]#命令内容组成，参考格式如下：&lt;br /&gt;
 0*条件表达式1#技能命令1&lt;br /&gt;
 0.2#技能命令2&lt;br /&gt;
 ……&lt;br /&gt;
当条件表达式不为空时，根据条件表达式判定结果执行。&lt;br /&gt;
&lt;br /&gt;
条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果，例如&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_START:9&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#技能命令&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_END&lt;br /&gt;
表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍，期间可以通过[%rpt_index%]来查询当前语句处于第几次循环&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
表示对SELECT_UNITS行与SELECT_END之间所有的命令行，对SELECT_UNITS:后所有满足指定条件表达式的对象使用，并以该对象作为caster对象&lt;br /&gt;
&lt;br /&gt;
其中，嵌入到[@...@]中的语句为保留两位小数的结果运算取值，此类查询仅在技能命令中有效。&lt;br /&gt;
&lt;br /&gt;
目前支持的技能命令有：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!技能指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''立即停止当前所有技能动作并按照之前指令行动'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''向战场中添加一个预定义的特效体'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，为空时按照特效表中定义的伤害表达式计算，格式见6.4节）#目标参数(见7.4节说明)#特效体TAG（用于replace_eft指令查询）&lt;br /&gt;
初始位置格式为：位置类型,偏移x,偏移y,偏移z（偏移量为相对于初始方向的偏移）&lt;br /&gt;
&lt;br /&gt;
支持的位置类型有：&lt;br /&gt;
&lt;br /&gt;
*cast_pos：技能施放动作的预设位置&lt;br /&gt;
*tag_pos：技能施放目标单位或者目标坐标的位置&lt;br /&gt;
*hit_pos：技能命中目标单位当前的位置&lt;br /&gt;
*unit_pos：技能施放单位当前的位置&lt;br /&gt;
*start_pos：技能释放时的开始位置&lt;br /&gt;
*rnd_pos：技能释放单位周围一个任意的位置&lt;br /&gt;
*dim_pos：通过set_dimpos命令定义的预设位置&lt;br /&gt;
*reinf_pos：施法者阵营方的增援位置&lt;br /&gt;
*emitter_pos=EMITTER_ID：ID为EMITTER_ID的发射器发射点位置&lt;br /&gt;
*unit_round=DIR:LEN：距离施法者正方向偏移DIR角度，距离为LEN的位置&lt;br /&gt;
*rnd_round=RAD[-MIN_RAD]：施法者半径RAD范围内的随机位置，可选参数MIN_RAD表示随机范围距中心的最小距离，默认为0&lt;br /&gt;
*eft_pos=TAG：返回查询到的第一个指定特效体TAG的特效体位置，如不存在则返回caster的当前位置 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
*……&lt;br /&gt;
&lt;br /&gt;
运动参数格式为：运动类型:运动参数（形如：参数1,参数2,参数3.....）&lt;br /&gt;
&lt;br /&gt;
支持的运动类型有：&lt;br /&gt;
&lt;br /&gt;
*0：不运动 无参数&lt;br /&gt;
*1：运动至技能目标点 偏移x,偏移y,偏移z&lt;br /&gt;
*2：运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标，否则按照技能释放目标)&lt;br /&gt;
*3：向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*4：向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*5：跟随目标运动 跟随类型(0固定相对位置，1发射点位置),偏移x,偏移y,偏移z,持续时间（-1为永久）&lt;br /&gt;
*6：运动至dim_pos 偏移x,偏移y,偏移z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''进行伤害判定'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选，默认关闭)&lt;br /&gt;
支持的判断类型有：&lt;br /&gt;
&lt;br /&gt;
*0：单体判断（目标对象参数为目标单位见下一小节，为空表示技能目标）&lt;br /&gt;
*1：半径范围判断 目标对象参数为目标类型(0:敌方 1：我方 2：双方) 参数表中参数1为参考位置类型（见add_eft命令的位置类型） 参数2,3,4,5分别为偏移坐标的x,y,z及半径&lt;br /&gt;
*2：多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数，参数4以后为以参考点坐标为(0,0)的多边形坐标信息&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''对目标施加BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_buff#buff ID#BUFF目标参数#持续时间（如不指定则采用BUFF默认持续时间）#叠加层数（默认为1）#上限层数(默认为配置表中的数值，只有大于0时生效)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
可支持的内置目标参数有：&lt;br /&gt;
&lt;br /&gt;
*caster：技能释放者&lt;br /&gt;
*target：目标单位（指向性技能的目标或技能命中的目标）&lt;br /&gt;
*roleid,ROLEID：查询单位绑定人物ID为ROLEID的一个目标对象&lt;br /&gt;
*buffgiver,BUFFID：查询当前caster身上一个ID为BUFFID的BUFF给与者&lt;br /&gt;
*find_tag_res：查询指定目标的结果单位（必须先执行一次[%find_tag:TAGINFO%]查询才可调用）&lt;br /&gt;
*tag_next_fu,距离D：当前命中目标的下一个小于距离D的友方单位&lt;br /&gt;
*caster_next_fu,距离D：施法者的下一个小于距离D的友方目标&lt;br /&gt;
*caster_next_eu,距离D：施法者的下一个小于距离D的敌方目标&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''移除目标的BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#移除目标（同上）#移除方式#参数1,参数2,参数3...&lt;br /&gt;
目前支持的移除方式如下&lt;br /&gt;
&lt;br /&gt;
*0：全部移除&lt;br /&gt;
*1：移除指定BUFF 参数1为BUFF ID，参数2为移除层数（默认-1为全部移除）&lt;br /&gt;
*2：移除有害BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
*3：移除有益BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''突进类移动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒，在运动结束前开始执行承接技能向前的时间偏移量&amp;gt;=0)[可为空]#操作对象(可选，默认为caster)#修正目标位置(可选，参数格式见节2)#是否强制(默认0  为1时强制移动)&lt;br /&gt;
移动类型分为：&lt;br /&gt;
&lt;br /&gt;
*0：匀速运动&lt;br /&gt;
*1：跳跃&lt;br /&gt;
*2：击退运动&lt;br /&gt;
*3：击飞运动 （当为击飞运动时，速度参数为击飞的滞空时间）&lt;br /&gt;
&lt;br /&gt;
速度参数为角色移动时的水平速度（当速度小于等于0时为闪现至目标）&lt;br /&gt;
&lt;br /&gt;
冲撞质量在匀速运动时表示刚体质量，0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了，目前暂时无用了，参数还必须要填写。&lt;br /&gt;
&lt;br /&gt;
绑定特效为运动时附加在单位上的特效ID&lt;br /&gt;
&lt;br /&gt;
运动结束承接技能为执行运动结束后立即执行的技能ID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''停止当前突进运动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''在目标位置进行一次爆破物理效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''对目标单位进行一次击退效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''播放一个指定音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#音效ID#音效位置（同第一节解释）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''单位根据模型配置播放指定音效字典中的字段对应音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#音效字典KEY值#单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''播放一个指定音效（在施法者处）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 cast_sound#音效ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''播放一个链式特效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式&lt;br /&gt;
释放目标的参数见 技能 指令目标参数说明&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''嘲讽效果，让目标立即攻击释放者'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#释放者#目标单位&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''操作当前命令行参数&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#操作方式#操作值D&lt;br /&gt;
操作方式：0：设置为值D  1：增加值D 2：减少值D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''注意：与其他缓冲后依次执行的指令不同，该指令不会进入执行队列，将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''设置预设位置参数'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]&lt;br /&gt;
操作方式：&lt;br /&gt;
&lt;br /&gt;
*0：我方增援出兵位置 操作参数分别为 x,y,z的偏移&lt;br /&gt;
*1：查询目标单位位置 操作参数为查询指令(见第4小节)&lt;br /&gt;
*2：查询技能参数位置 操作参数为查询指令(见第2小节位置信息)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''播放一个已定义的技能动作'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''召唤一个单位'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 summon_unit#召唤方式#对象参数[,血量百分比(可选参数，默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数（可选参数，默认为caster）#替换角色技能(可选参数，为空为不替换)#默认策略参数&lt;br /&gt;
召唤方式：0：对象的镜像  1：通过人物ID召唤  2：通过小兵ID召唤&lt;br /&gt;
&lt;br /&gt;
对象参数： 当召唤方式为0时表示对象单位（参考本章4节）；当召唤方式为1时表示人物模版ID,等级；当召唤方式为2时表示兵种单位ID&lt;br /&gt;
&lt;br /&gt;
初始位置参数见本章2节&lt;br /&gt;
&lt;br /&gt;
持续时间小于等于0时表示本次战斗永久持续，大于0时表示持续秒数&lt;br /&gt;
&lt;br /&gt;
附加状态为该单位的附加属性表，如： s_生命,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_攻击,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]   表示召唤出的单位生命与攻击力均为原单位的一半&lt;br /&gt;
&lt;br /&gt;
附加特效参数：默认为0 当为1时显示半透明影子效果&lt;br /&gt;
&lt;br /&gt;
单位阵营参考目标参数：以指定的目标当前的阵营作为召唤单位当前的阵营，默认为施法者所在的阵营&lt;br /&gt;
&lt;br /&gt;
替换角色技能参数：格式为普通角色技能表信息，如：  技能1,1|技能2,1|...    如果需要复制角色技能，可使用[%this_skills%]或[%aim_skills%]来复制施法者或者目标的技能&lt;br /&gt;
&lt;br /&gt;
默认策略参数：格式为：策略类型,策略参数（默认为“0,0“，支持的策略类型参考SET_POLICY指令，但是不支持攻略地点类型3。例如：参数“2,500”，表示在半径500范围内进行跟随）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''强制改变目标单位的当前位置'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#操作对象(同4节)#位置信息(同2节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''设置目标单位的激活状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否，仅在非激活时有效)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''目标立即被击倒（无视无敌属性）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit#操作对象参数(同4节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''目标主动倒下'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit#操作对象参数（同4节）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''在目标头上弹出一个对话气泡'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#操作对象#对话内容#持续时间(秒数，可省略)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''目标呼喊出几个字（多为技能）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#操作对象#喊话内容&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''播放一个圆形战场警告区域'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#目标位置信息#半径#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''播放一个TimeLine技能对象'''&amp;lt;br /&amp;gt;播放Timeline动作并执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''播放一个TimeLine技能的动作部分'''&amp;lt;br /&amp;gt;只播放Timeline动作，不执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline_anim#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''设置当前施法者的动作锁定状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位：秒 Timeline里编辑时可不指定该时间，以再度调用 block_act#0#0#0的时间差为准)&lt;br /&gt;
可用的锁定状态&lt;br /&gt;
&lt;br /&gt;
*0：不锁定&lt;br /&gt;
*1：锁定攻击及移动&lt;br /&gt;
*2：仅锁定攻击&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''镜头抖动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#时长（秒）#幅度&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''控制角色进行旋转'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''查找并用指定的特效体在当前位置替换目标特效体'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#指定的特效体TAG#匹配数量（≤0时为匹配全部，&amp;gt;0为匹配生成时间最早的有限几个）#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式（同add_eft）#运动参数（可选，同add_eft）#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，同add_eft）#目标参数(同add_eft)#特效体TAG（用于replace_eft指令查询）#原特效体创建者的对象参数(可选，用于查询时筛选，默认为所有人)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''角色顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 hitstop#操作对象#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后角色动作速度恢复为1倍）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''全局顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后全局速度恢复为1倍）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''更改施法者的指定技能CD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能，多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''为此单位设置一个自定义的整形变量值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选，默认为施法者)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''执行一个指定的战斗事件'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''替换施法者单位的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#技能列表信息&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''还原施法者的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''替换施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#技能ID,等级&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''还原施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''将一个单位的指定技能暂时替换为其他技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久，&amp;gt;0为持续指定秒数)#对象单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''改变一个单位当前的MP值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0：否 1：是)#播放受击特效ID(可选，为空不播放)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===战斗中的特殊对象ID===&lt;br /&gt;
战斗指令中经常需要进行一些目标单位的查询，通常是通过角色ID来查找，但是可以通过以下内置ID返回特定的查询对象：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!特殊内置ID&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|玩家单位&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|A方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|B方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|当前执行指令单位自身（一般用于单位挂载脚本中）&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|随机的敌方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|随机的友方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|指定ID为EMITER_ID的发射器单位&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===单位对象附加触发脚本编辑说明===&lt;br /&gt;
通过在地城单位对象中的触发命令中定义，可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为：&lt;br /&gt;
 [CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
每个对象可挂载多个地城对象触发器，当前已支持的触发类型有：&lt;br /&gt;
&lt;br /&gt;
*on_spawn：当刷新出时&lt;br /&gt;
*enter_combat：进入战斗&lt;br /&gt;
*get_hurt：单位受到伤害&lt;br /&gt;
*dead：单位死亡时&lt;br /&gt;
*on_timer：当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发&lt;br /&gt;
*on_skill：该单位开始释放技能时触发 触发参数位技能ID&lt;br /&gt;
*hp_pct：单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比&lt;br /&gt;
*interactive：具有战斗内可交互对象的单位在进行交互行为时触发&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下为一段示例附加脚本：&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#关门，放狗！&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了！别打了！我认输，什么都给你！&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=632</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=632"/>
		<updated>2020-09-21T16:37:52Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 战斗中的指令脚本说明 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''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.'''&lt;br /&gt;
&lt;br /&gt;
===Script Directives in Battles===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br /&amp;gt;&lt;br /&gt;
===List of Script Directives in Battles===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|'''Directive'''&lt;br /&gt;
|'''Instruction'''&lt;br /&gt;
|-&lt;br /&gt;
|（null）&lt;br /&gt;
|'''Character Text Box'''&lt;br /&gt;
&lt;br /&gt;
Function: show a paragraph with a character painting and typewriter effect.&lt;br /&gt;
&lt;br /&gt;
Format: *Character ID(@position of character painting)# paragraph 1# paragraph 2# paragraph 3#...#paragraph N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''Empty Directive'''&lt;br /&gt;
&lt;br /&gt;
Function: an empty directive. Nothing happens.&lt;br /&gt;
&lt;br /&gt;
Format: NOTHING*1.&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''Jump To'''&lt;br /&gt;
&lt;br /&gt;
Function: jump to and execute another scenario event ID.&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''Dialogue Option'''&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
&lt;br /&gt;
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.)&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''Fullscreen Subtitle'''&lt;br /&gt;
&lt;br /&gt;
Function: show a subtitle in full screen (default background colour is black; transparency is adjustable.)&lt;br /&gt;
&lt;br /&gt;
Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1).&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''Screen Shake'''&lt;br /&gt;
&lt;br /&gt;
Function: execute a screen shake effect.&lt;br /&gt;
&lt;br /&gt;
Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''Delay'''&lt;br /&gt;
&lt;br /&gt;
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay.)&lt;br /&gt;
&lt;br /&gt;
Format: DELAY*waiting time (second)&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''Pause Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: pause the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: PAUSE*.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''Continue Current Game'''&lt;br /&gt;
&lt;br /&gt;
Function: continue the current battle scene.&lt;br /&gt;
&lt;br /&gt;
Format: RESUME*.&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''Set Weather'''&lt;br /&gt;
&lt;br /&gt;
Function: set and replace the current weather in the game.&lt;br /&gt;
&lt;br /&gt;
Format: SET_WEATHER*weather effect directive.&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Skill and Battle Directives in Combat#.E5.A4.A9.E6.B0.94.E6.95.88.E6.9E.9C.E4.BF.A1.E6.81.AF.E6.A0.BC.E5.BC.8F|Weather Effect Directive]].&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''Character Icon Pop-up'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''Unit Chat Bubble'''&lt;br /&gt;
&lt;br /&gt;
Function: units on the battlefield can have chat bubbles over their heads, which show their words.&lt;br /&gt;
&lt;br /&gt;
Format: B_TALK*object ID#random paragraph 1#random paragraph 2#random paragraph 3#...#random paragraph N.&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''Enemy Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all enemies send reinforcement according to a specific unit list.&lt;br /&gt;
&lt;br /&gt;
Format: ENEMY_REINF*minion list.&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''Ally Reinforcement'''&lt;br /&gt;
&lt;br /&gt;
Function: all allies send reinforcement according to a specific unit configuration list.&lt;br /&gt;
&lt;br /&gt;
Format: FRIEND _REINF*minion list&lt;br /&gt;
&lt;br /&gt;
Please refer to the format of Minion List.&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''Retreat Order'''&lt;br /&gt;
&lt;br /&gt;
Function: order all allies to retreat.&lt;br /&gt;
&lt;br /&gt;
Format: CMD_RETREAT*0 (0: All allies; 1: All enemies).&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''End Battle by Force'''&lt;br /&gt;
&lt;br /&gt;
Function: end the current battle instantly.&lt;br /&gt;
&lt;br /&gt;
Format: BATTLE_OVER*code (0: Victory; 1: Loss).&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''全灭目标'''&lt;br /&gt;
用途：立即对一方所有单位造成足以秒杀此单位的巨量伤害&lt;br /&gt;
&lt;br /&gt;
格式：KILL_ALL*0为我方 1：为敌方&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''主角不死'''&lt;br /&gt;
用途：给玩家控制的角色增加一个不死的BUFF&lt;br /&gt;
&lt;br /&gt;
格式：UNDEAD_PLAYER*1&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''所有单位不死'''&lt;br /&gt;
&lt;br /&gt;
用途：给场上所有的单位增加一个不死的BUFF&lt;br /&gt;
&lt;br /&gt;
格式：UNDEAD_ALL*0：仅我方 1：敌我双方&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;s&amp;gt;STOP_ALL&amp;lt;/s&amp;gt;&lt;br /&gt;
|'''&amp;lt;s&amp;gt;所有单位停止行动&amp;lt;/s&amp;gt;'''&lt;br /&gt;
&amp;lt;s&amp;gt;用途：命令场上所有的单位停止当前行动&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;格式：STOP_ALL*0：恢复 1：停&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''单位使用技能'''&lt;br /&gt;
用途：命令场上指定单位使用技能&lt;br /&gt;
&lt;br /&gt;
格式：EXEC_SKILL*释放者ID#技能ID,技能等级(默认1级)#目标坐标的x,y#坐标参数1的x,y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
释放者ID为目标的识别ID，可以有以下特殊值&lt;br /&gt;
&lt;br /&gt;
*PLAYER：玩家  GM_A：进攻方的预设对象 GM_B：防守方的预设对象&lt;br /&gt;
*THIS：指令发起者（一般返回发射器自身）&lt;br /&gt;
*EMITTER=ID：指定ID的地城发射器，可为this表示当前地城发射器&lt;br /&gt;
*RND_FRIEND_UNIT：随机友方单位	 RND_ENEMY_UNIT：随机敌方单位&lt;br /&gt;
&lt;br /&gt;
当释放者为预设对象时，坐标参数1代表技能释放的其起始坐标&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''刷新地城单位'''&lt;br /&gt;
用途：刷新战场地图上已经定义过的地城单位&lt;br /&gt;
&lt;br /&gt;
格式：DUNGEON_SPAWN*控制ID#是否无视状态(当该单位已被击败时仍可刷新 0：否[默认] 1是)&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''设置地城触发器状态'''&lt;br /&gt;
用途：设置地城中指定触发器的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_DUNGEON_TS*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''结束本次地城战斗'''&lt;br /&gt;
用途：结束本次地城战斗并执行相应操作&lt;br /&gt;
&lt;br /&gt;
格式：DUNGEON_OVER*结果代码(0：退出 1：胜利 2：失败)&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''设置障碍区域状态'''&lt;br /&gt;
用途：启用或禁用指定的障碍区域&lt;br /&gt;
&lt;br /&gt;
格式：SET_AREA*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''设置装饰物件状态'''&lt;br /&gt;
用途：启用或禁用指定的地图装饰物件&lt;br /&gt;
&lt;br /&gt;
格式：SET_WIDGET*控制ID#状态(0正常 -1隐藏)&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''设置地城传送器状态'''&lt;br /&gt;
用途：设置地城中的传送器及其关联模型的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_TP*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''设置发射器状态'''&lt;br /&gt;
用途：设置指定发射器的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_EMITTER*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''设置玩家角色模型'''&lt;br /&gt;
用途：设置玩家角色的模型&lt;br /&gt;
&lt;br /&gt;
格式：SET_PLAYER_MODEL*单位模型描述信息&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''设置玩家当前技能'''&lt;br /&gt;
用途：设置玩家角色当前的技能&lt;br /&gt;
&lt;br /&gt;
格式：SET_PLAYER_SKILL*技能ID1,等级|技能ID2,等级|...|技能ID n,等级 （最多4个技能）&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''执行技能指令'''&lt;br /&gt;
用途：直接执行技能指令&lt;br /&gt;
&lt;br /&gt;
格式：SKILL_CMD*技能指令内容&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''设置战斗中的自定义整形字段'''&lt;br /&gt;
用途：设置战斗中的自定义整形字段&lt;br /&gt;
&lt;br /&gt;
格式：SET_DG_INTVAR*字段ID#设置值#设置模式(可选 1为增加模式（原值加上设置值） 其他为直接赋值模式)#监视信息（可选，当存在时在变量监视界面上显示变量监视信息）&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''设置镜头模式'''&lt;br /&gt;
用途：设置战斗中的镜头跟随模式&lt;br /&gt;
&lt;br /&gt;
格式：SET_CAMERA*跟随模式#参数&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
目前支持的镜头跟随模式及参数含义&lt;br /&gt;
&lt;br /&gt;
*0：跟随主角，无参数（默认）&lt;br /&gt;
*1：跟随指定目标，参数为目标单位的对象ID&lt;br /&gt;
*2：战场坐标位置，参数为坐标X,Y&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''命令攻击'''&lt;br /&gt;
用途：强制命令一个单位开始攻击另外一个单位&lt;br /&gt;
&lt;br /&gt;
格式：ATTACK*攻击发起者对象ID#攻击目标对象ID&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''单位控制命令序列'''&lt;br /&gt;
用途：为一个单位指定控制命令队列，该单位会强制优先按照此命令队列进行执行&lt;br /&gt;
&lt;br /&gt;
格式：CMD_QUEUE*目标对象ID#命令脚本的事件ID(将命令队列的内容填写至该战斗中事件当中来执行)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
命令队列的格式为（时间参数表示该秒数后执行下一条）：&lt;br /&gt;
&lt;br /&gt;
指令类型1[,时间参数]:指令参数&lt;br /&gt;
&lt;br /&gt;
指令类型2[,时间参数]:指令参数&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
当前支持的队列指令类型有：&lt;br /&gt;
&lt;br /&gt;
*skill_cmd：执行技能指令：参数为一行技能指令&lt;br /&gt;
*use_skill：使用技能：技能ID,技能等级#目标单位对象参数#目标位置参数&lt;br /&gt;
*event：执行战斗事件：战斗中事件ID#执行条件(可选)&lt;br /&gt;
*move_to：移动至指定点：目标坐标参数#速度参数(该指令中时间参数无效，只有当单位正确到达目标后执行下一条)&lt;br /&gt;
*set_dir：设置单位方向：参数为方向&lt;br /&gt;
*keep_act：保持一个动作：动作ID(为空时表示待机动作)#循环次数(小于等于0为无限循环 默认1)#单次动作时间(&amp;lt;=0为始终保持 默认0)  注：此命令中时间参数无效，需等待动作循环执行结束为止，当无限循环时只有对该单位下达新指令方可结束动作保持&lt;br /&gt;
&lt;br /&gt;
'''注意，以上命令中所有的坐标参数当为2参数时表示目标位置的x,y地图坐标，当3参数时第三个参数表示位置类型(0:地图坐标 1：战场坐标)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''设置单位的战斗策略'''&lt;br /&gt;
用途：为一个单位设置当前战斗策略&lt;br /&gt;
&lt;br /&gt;
格式：SET_POLICY*目标对象ID#主策略类型#参数1#位置参数#单位TAG筛选标记（仅当目标对象ID为空时生效）#目标单位ID（主要用于跟随等策略指定目标）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
当前支持的主策略类型有：&lt;br /&gt;
&lt;br /&gt;
*0：强攻(参数为唤醒半径，小于等于0为无限距离)&lt;br /&gt;
*1：固守(参数为守卫半径)  &lt;br /&gt;
*2：跟随(参数为跟随半径)&lt;br /&gt;
*3：攻略目标点&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''设置单位挂载计时器'''&lt;br /&gt;
用途：为一个单位设置一个具有触发功能的计时器并完成特定的触发事件&lt;br /&gt;
&lt;br /&gt;
格式：SET_UNIT_TIMER*目标对象ID#计时器ID#时间参数(&amp;lt;=0时为关闭 只有当单位身上挂有”on_timer”触发器事件时有效)&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''立即释放吟唱中的技能'''&lt;br /&gt;
用途：立即释放出单位当前正在吟唱中的技能(只有当目标正在吟唱该技能时生效)&lt;br /&gt;
&lt;br /&gt;
段1,值1|字段2.,值2|...)&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''替换单位技能'''&lt;br /&gt;
用途：替换单位当前的技能&lt;br /&gt;
&lt;br /&gt;
格式：REPLACE_SKILLS*目标对象ID#技能ID1,等级|技能ID2,等级|...|技能ID n,等级 （一次最多4个技能，当等级为0时表示移除该技能）&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''替换单位地城技能'''&lt;br /&gt;
用途：替换单位当前的地城技能&lt;br /&gt;
&lt;br /&gt;
格式：REPLACE_DGSKILL*目标对象ID#地城技能ID,等级(技能ID为空或者null表示关闭该角色地城技能)&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''播放战场消息'''&lt;br /&gt;
&lt;br /&gt;
用途：播放一条战场消息&lt;br /&gt;
&lt;br /&gt;
格式：BATTLE_MSG*消息内容#消息类型(0：普通 1：警告)&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''设置战斗结束检查器工作状态'''&lt;br /&gt;
用途： 设置战斗结束检查器工作状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_BATTLE_CHECKER*工作状态(0：关闭 1：开启）&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''显示手动结束战斗按钮'''&lt;br /&gt;
用途： 显示手动结束战斗按钮&lt;br /&gt;
&lt;br /&gt;
格式：SHOW_BATTLEOVER_BTN*1&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''显示调试信息'''&lt;br /&gt;
用途： 显示调试信息&lt;br /&gt;
&lt;br /&gt;
格式：SHOW_DEBUG_INFO*状态代码（0：关闭 1：开启主角身上BUFF状态显示）&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''打开交易界面'''&lt;br /&gt;
用途：打开与指定商人的交易界面&lt;br /&gt;
&lt;br /&gt;
格式：OPENSTORE*商人ID&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''刷新商人所持商品表'''&lt;br /&gt;
用途：根据配置刷新商人所持的商品表&lt;br /&gt;
&lt;br /&gt;
格式：RESET_STORE*商人ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''设置全局定时器'''&lt;br /&gt;
用途：设置一个定时器来延时执行一些脚本&lt;br /&gt;
&lt;br /&gt;
格式：SET_TIMER*计时器ID#时间参数(秒 &amp;lt;=0为关闭)#定时器结束时执行的事件ID#监视字段信息（可选，如果存在则在变量监视UI中显示剩余时间）&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''区域刷新出单位'''&lt;br /&gt;
用途：在指定的刷新区域批量刷新出指定的单位&lt;br /&gt;
&lt;br /&gt;
格式：AREA_SPAWN*目标区域控制ID#英雄列表#单位表(格式同ENEMY_REINF指令)#所属阵营索引#默认策略(格式为：策略代码:策略参数 同SET_POLICY指令)#刷新出单位的Tag标记（可选）#单位附加属性表（可选）&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''主角获得道具或资源'''&lt;br /&gt;
用途：主角直接获得指定的道具列表（注意：游戏中的金钱、经验等资源都可以通过此方法来获得，只要传入正确的映射ID即可）&lt;br /&gt;
&lt;br /&gt;
格式：GETITEMS*道具列表信息&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''移除指定道具或资源'''&lt;br /&gt;
用途：根据指定的道具数量从主角道具表中移除指定数量的道具&lt;br /&gt;
&lt;br /&gt;
格式：REMOVE_ITEMS*道具列表&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''执行掉落判定'''&lt;br /&gt;
用途：按照列表执行一次掉落检定（LOOT格式见 物品掉落信息格式）&lt;br /&gt;
&lt;br /&gt;
格式：LOOT*Loot列表 &lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''指定英雄获取经验'''&lt;br /&gt;
用途：对一个指定的英雄角色增加经验值&lt;br /&gt;
&lt;br /&gt;
格式：ADD_EXP*经验#目标英雄ID（可选，默认为主角）&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''对指定英雄设置技能'''&lt;br /&gt;
用途：对一个指定的英雄角色设置技能，根据操作对象可实现增加、替换、移除操作&lt;br /&gt;
&lt;br /&gt;
格式：SETSKILL*角色ID（可选，默认为主角）#需要添加的技能信息表(格式为&amp;quot;技能ID1,等级|技能ID2,等级|...&amp;quot;)#需要移除的技能表(可选 多个技能以&amp;quot;|&amp;quot;分隔)&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''执行LUA函数'''&lt;br /&gt;
用途：执行当前加载的LUA脚本中的指定函数名&lt;br /&gt;
&lt;br /&gt;
格式：CALL_LUAFUNC*脚本中的函数名&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''添加一个战斗内可交互对象'''&lt;br /&gt;
用途：向当前的战斗中添加一个可交互对象&lt;br /&gt;
&lt;br /&gt;
格式：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， 当&amp;lt;=0时为手动刷新)#自动刷新事件ID（当自动刷新时触发的事件ID）&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''移除战斗内可交互对象'''&lt;br /&gt;
用途：按照控制ID移除指定的可交互对象&lt;br /&gt;
&lt;br /&gt;
格式：REMOVE_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''修改可交互对象的状态'''&lt;br /&gt;
用途：按照控制ID修改指定可交互对象的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)#新的状态值(0：普通 1：可见不可交互 2：隐藏)&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''传送至其他副本地图'''&lt;br /&gt;
用途：将当前的所有玩家角色都传送到指定的副本地图位置&lt;br /&gt;
&lt;br /&gt;
格式：TELEPORT*副本地图ID(需定义在“F副本地图信息表”中):地图坐标X,地图坐标Y&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''远程请求执行事件'''&lt;br /&gt;
用途：本地请求所有客户端执行一个事件&lt;br /&gt;
&lt;br /&gt;
格式：REMOTE_EVENT*事件ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===专门用于战斗场景中条件查询方法===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!查询指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|战斗中各种事件脚本的查询结果(如：选择框的结果)&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|当前战斗进行的时间(整秒数)&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|返回一个每次都不相同的大于等于A小于等于B的随机值&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|返回上一次[%rnd:A,B%]查询到的结果&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|返回一个执行周期内相同的0-100的随机值&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|返回上一个随机位置结果的X&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|返回上一个随机位置结果的Y&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|返回上一个随机位置坐标&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|当前查询源对象上一个使用技能的ID&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|当前查询源对象的类型 0英雄 1小兵&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|当前查询目标对象的类型 0英雄 1小兵&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|当前查询源对象的等级&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|当前查询目标对象的等级&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|当前查询源对象的HP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|当前查询目标对象的HP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|当前查询源对象的MP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|当前查询目标对象的MP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|我方剩余人数&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|敌方剩余人数&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|判断当前命中的目标是否caster的敌人。敌方1 非敌方0&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|当前当前战斗结果&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|查询当前source对象指定技能ID的等级，无则返回0&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|当前技能等级所对应的基础物理攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|当前技能等级所对应的基础魔法攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|当前技能等级所对应的魔法最终攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|查询当前source对象指定BUFF_ID的当前层数&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|查询当前target对象指定BUFF_ID的当前层数&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|查询当前source指定属性字段的当前数值&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|查询当前target对象指定属性字段的当前数值&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|当前查询source对象的武器类型&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|当前查询target对象的武器类型&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|本次伤害的蓄力值（0~100）&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|当前命令行的参数值&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|返回当前命令行参数值后立即加1&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|当前命令行所在循环的INDEX值&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|执行一次目标单位查找，TAGINFO为目标单位信息，参数格式见 技能对象格式说明，当查询到合适目标时返回1否则返回0&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|从已查找单位列表中增加目标单位，始终返回1，TAGINFO同上&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|从已查找单位列表中排除目标单位，始终返回1，TAGINFO同上&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|重置当前查找列表，始终返回1&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|随机枚举值，根据所有项的概率分布返回其中一个项的RES值。&lt;br /&gt;
比如：[%rnd_enum:25,1:40,2:35,3%]表示有25%的概率返回”1”，40%的概率返回”2”，35%的概率返回”3”&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|返回当前战斗地图中ControlID为ID的刷新单位的当前状态 0：未刷新 1：已刷新 -1：已击败&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|返回当前战斗地图中剩余未击败并且Tag为TAG的刷新单位的个数&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|当前查询source对象的友军倒下计数器值&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|当前查询source对象的敌军倒下计数器值&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|当前查询source对象的友军倒下计数器值与MOD_VAL取余后的值&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|当前查询source对象的敌军倒下计数器值与MOD_VAL取余后的值&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|返回指定KEY的自定义地城整形字段的值&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|返回指定指定ID的发射器中心位置，距其中心MIN至MAX的一个随机位置，并记录入last_rnd_pos&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|返回指定UNIT_ID单位身上所附加的ID为TIMER_ID的计时器剩余时间&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|返回当前查询source对象身上的自定义整形数值(技能指令set_unit_intvar设置)&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|返回当前查询target对象身上的自定义整形数值(技能指令set_unit_intvar设置)&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|查询当前命令是否是在击杀单位指令中执行的并且目标单位已被击杀(0：否 1：是) 注意：只能在技能中的命中命令指令中生效&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|查询当前场上指定TAG的特效体数量 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|当前查询对象的单位ID&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|当前查询目标对象的单位ID&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|查询当前施法中对目标造成的实际伤害或治疗的实际数值 注意：只能在命中指令中生效&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|查询当前技能或伤害是否是在隐身状态下进行的 0否1是&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|查询当前技能命中判定生效的次数&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下指令需要客户端版本高于0.7.4.2&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|返回当前查询source对象当前的技能列表&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|返回当前查询target对象当前的技能列表&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下指令需要客户端版本高于0.8.0.1&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|返回当前查询source对象当前的客户端ID&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|返回当前查询target对象当前的客户端ID&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|玩家身上的金钱数&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|返回背包中某种物品（或者资源）的数目&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===伤害表达式格式===&lt;br /&gt;
游戏战斗中，所有形式的攻击、技能、特效、指令等对单位造成的伤害，结算时都是通过一个统一的接口来实现的。该接口的主要传入参数是一个数据结构，此数据结构可在各种脚本里通过伤害值表达式的形式来指定。一般伤害值表达式的格式如下：&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
伤害值表达式可以嵌入到一些数值表里（如BUFF列表的状态值等），或者直接嵌入到数值计算公式（[&amp;amp;expression&amp;amp;]格式中）；&lt;br /&gt;
&lt;br /&gt;
目前可支持的伤害表达式键值有：&lt;br /&gt;
&lt;br /&gt;
*type 伤害类型：0:普通近战攻击 1:普通远程攻击 2:技能伤害 3:治疗 4：回蓝&lt;br /&gt;
*dmg 物理伤害数值，值为伤害值公式&lt;br /&gt;
*t_dmg 真实伤害数值(所有治疗效果都为此值)，值为伤害值公式&lt;br /&gt;
*hit 命中参数（-1000~1000） 当不能闪避时为-1000&lt;br /&gt;
*blk 被招架参数（-1000~1000） 当不能被招架时为-1000&lt;br /&gt;
*cri 暴击参数（-1000~1000） 当不能暴击时为-1000&lt;br /&gt;
*act 是否播放受击动作 1是 0否&lt;br /&gt;
*eft 受击特效ID&lt;br /&gt;
*trig 是否触发伤害效果（如反伤等）&lt;br /&gt;
*attack_type 指定伤害的武器攻击类型&lt;br /&gt;
*buff 受到该伤害时附带的BUFF效果, 格式为 BuffID,[time],[overlay]，两个参数为可选参数，分别表示时间及层数&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
伤害值公式仅支持标准数学公式，包含以下运算符号：+-*/^%()，可嵌入一些预定义字段，所有预定义字段写在形如[%cmd%]的格式内，目前支持的预定义字段有：&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]：随机一个大于等于min_val，小于等于max_val的整数&lt;br /&gt;
*[%field%]：field表示任意一个定义在角色属性字段中的数值&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===技能指令编辑说明===&lt;br /&gt;
技能指令是用来在战斗中实现各种技能效果的基础元素。在战斗中，所有单位执行技能时都会将该技能中的技能指令放入战斗技能指令执行队列中，根据各自的运行环境依次执行。&lt;br /&gt;
&lt;br /&gt;
在技能配置表中技能命令条目以”\n”换行符分隔，每条由延迟时间*[条件表达式(可选)]#命令内容组成，参考格式如下：&lt;br /&gt;
 0*条件表达式1#技能命令1&lt;br /&gt;
 0.2#技能命令2&lt;br /&gt;
 ……&lt;br /&gt;
当条件表达式不为空时，根据条件表达式判定结果执行。&lt;br /&gt;
&lt;br /&gt;
条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果，例如&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_START:9&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#技能命令&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_END&lt;br /&gt;
表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍，期间可以通过[%rpt_index%]来查询当前语句处于第几次循环&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
表示对SELECT_UNITS行与SELECT_END之间所有的命令行，对SELECT_UNITS:后所有满足指定条件表达式的对象使用，并以该对象作为caster对象&lt;br /&gt;
&lt;br /&gt;
其中，嵌入到[@...@]中的语句为保留两位小数的结果运算取值，此类查询仅在技能命令中有效。&lt;br /&gt;
&lt;br /&gt;
目前支持的技能命令有：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!技能指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''立即停止当前所有技能动作并按照之前指令行动'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''向战场中添加一个预定义的特效体'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，为空时按照特效表中定义的伤害表达式计算，格式见6.4节）#目标参数(见7.4节说明)#特效体TAG（用于replace_eft指令查询）&lt;br /&gt;
初始位置格式为：位置类型,偏移x,偏移y,偏移z（偏移量为相对于初始方向的偏移）&lt;br /&gt;
&lt;br /&gt;
支持的位置类型有：&lt;br /&gt;
&lt;br /&gt;
*cast_pos：技能施放动作的预设位置&lt;br /&gt;
*tag_pos：技能施放目标单位或者目标坐标的位置&lt;br /&gt;
*hit_pos：技能命中目标单位当前的位置&lt;br /&gt;
*unit_pos：技能施放单位当前的位置&lt;br /&gt;
*start_pos：技能释放时的开始位置&lt;br /&gt;
*rnd_pos：技能释放单位周围一个任意的位置&lt;br /&gt;
*dim_pos：通过set_dimpos命令定义的预设位置&lt;br /&gt;
*reinf_pos：施法者阵营方的增援位置&lt;br /&gt;
*emitter_pos=EMITTER_ID：ID为EMITTER_ID的发射器发射点位置&lt;br /&gt;
*unit_round=DIR:LEN：距离施法者正方向偏移DIR角度，距离为LEN的位置&lt;br /&gt;
*rnd_round=RAD[-MIN_RAD]：施法者半径RAD范围内的随机位置，可选参数MIN_RAD表示随机范围距中心的最小距离，默认为0&lt;br /&gt;
*eft_pos=TAG：返回查询到的第一个指定特效体TAG的特效体位置，如不存在则返回caster的当前位置 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
*……&lt;br /&gt;
&lt;br /&gt;
运动参数格式为：运动类型:运动参数（形如：参数1,参数2,参数3.....）&lt;br /&gt;
&lt;br /&gt;
支持的运动类型有：&lt;br /&gt;
&lt;br /&gt;
*0：不运动 无参数&lt;br /&gt;
*1：运动至技能目标点 偏移x,偏移y,偏移z&lt;br /&gt;
*2：运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标，否则按照技能释放目标)&lt;br /&gt;
*3：向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*4：向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*5：跟随目标运动 跟随类型(0固定相对位置，1发射点位置),偏移x,偏移y,偏移z,持续时间（-1为永久）&lt;br /&gt;
*6：运动至dim_pos 偏移x,偏移y,偏移z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''进行伤害判定'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选，默认关闭)&lt;br /&gt;
支持的判断类型有：&lt;br /&gt;
&lt;br /&gt;
*0：单体判断（目标对象参数为目标单位见下一小节，为空表示技能目标）&lt;br /&gt;
*1：半径范围判断 目标对象参数为目标类型(0:敌方 1：我方 2：双方) 参数表中参数1为参考位置类型（见add_eft命令的位置类型） 参数2,3,4,5分别为偏移坐标的x,y,z及半径&lt;br /&gt;
*2：多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数，参数4以后为以参考点坐标为(0,0)的多边形坐标信息&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''对目标施加BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_buff#buff ID#BUFF目标参数#持续时间（如不指定则采用BUFF默认持续时间）#叠加层数（默认为1）#上限层数(默认为配置表中的数值，只有大于0时生效)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
可支持的内置目标参数有：&lt;br /&gt;
&lt;br /&gt;
*caster：技能释放者&lt;br /&gt;
*target：目标单位（指向性技能的目标或技能命中的目标）&lt;br /&gt;
*roleid,ROLEID：查询单位绑定人物ID为ROLEID的一个目标对象&lt;br /&gt;
*buffgiver,BUFFID：查询当前caster身上一个ID为BUFFID的BUFF给与者&lt;br /&gt;
*find_tag_res：查询指定目标的结果单位（必须先执行一次[%find_tag:TAGINFO%]查询才可调用）&lt;br /&gt;
*tag_next_fu,距离D：当前命中目标的下一个小于距离D的友方单位&lt;br /&gt;
*caster_next_fu,距离D：施法者的下一个小于距离D的友方目标&lt;br /&gt;
*caster_next_eu,距离D：施法者的下一个小于距离D的敌方目标&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''移除目标的BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#移除目标（同上）#移除方式#参数1,参数2,参数3...&lt;br /&gt;
目前支持的移除方式如下&lt;br /&gt;
&lt;br /&gt;
*0：全部移除&lt;br /&gt;
*1：移除指定BUFF 参数1为BUFF ID，参数2为移除层数（默认-1为全部移除）&lt;br /&gt;
*2：移除有害BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
*3：移除有益BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''突进类移动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒，在运动结束前开始执行承接技能向前的时间偏移量&amp;gt;=0)[可为空]#操作对象(可选，默认为caster)#修正目标位置(可选，参数格式见节2)#是否强制(默认0  为1时强制移动)&lt;br /&gt;
移动类型分为：&lt;br /&gt;
&lt;br /&gt;
*0：匀速运动&lt;br /&gt;
*1：跳跃&lt;br /&gt;
*2：击退运动&lt;br /&gt;
*3：击飞运动 （当为击飞运动时，速度参数为击飞的滞空时间）&lt;br /&gt;
&lt;br /&gt;
速度参数为角色移动时的水平速度（当速度小于等于0时为闪现至目标）&lt;br /&gt;
&lt;br /&gt;
冲撞质量在匀速运动时表示刚体质量，0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了，目前暂时无用了，参数还必须要填写。&lt;br /&gt;
&lt;br /&gt;
绑定特效为运动时附加在单位上的特效ID&lt;br /&gt;
&lt;br /&gt;
运动结束承接技能为执行运动结束后立即执行的技能ID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''停止当前突进运动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''在目标位置进行一次爆破物理效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''对目标单位进行一次击退效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''播放一个指定音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#音效ID#音效位置（同第一节解释）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''单位根据模型配置播放指定音效字典中的字段对应音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#音效字典KEY值#单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''播放一个指定音效（在施法者处）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 cast_sound#音效ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''播放一个链式特效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式&lt;br /&gt;
释放目标的参数见 技能 指令目标参数说明&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''嘲讽效果，让目标立即攻击释放者'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#释放者#目标单位&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''操作当前命令行参数&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#操作方式#操作值D&lt;br /&gt;
操作方式：0：设置为值D  1：增加值D 2：减少值D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''注意：与其他缓冲后依次执行的指令不同，该指令不会进入执行队列，将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''设置预设位置参数'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]&lt;br /&gt;
操作方式：&lt;br /&gt;
&lt;br /&gt;
*0：我方增援出兵位置 操作参数分别为 x,y,z的偏移&lt;br /&gt;
*1：查询目标单位位置 操作参数为查询指令(见第4小节)&lt;br /&gt;
*2：查询技能参数位置 操作参数为查询指令(见第2小节位置信息)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''播放一个已定义的技能动作'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''召唤一个单位'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 summon_unit#召唤方式#对象参数[,血量百分比(可选参数，默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数（可选参数，默认为caster）#替换角色技能(可选参数，为空为不替换)#默认策略参数&lt;br /&gt;
召唤方式：0：对象的镜像  1：通过人物ID召唤  2：通过小兵ID召唤&lt;br /&gt;
&lt;br /&gt;
对象参数： 当召唤方式为0时表示对象单位（参考本章4节）；当召唤方式为1时表示人物模版ID,等级；当召唤方式为2时表示兵种单位ID&lt;br /&gt;
&lt;br /&gt;
初始位置参数见本章2节&lt;br /&gt;
&lt;br /&gt;
持续时间小于等于0时表示本次战斗永久持续，大于0时表示持续秒数&lt;br /&gt;
&lt;br /&gt;
附加状态为该单位的附加属性表，如： s_生命,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_攻击,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]   表示召唤出的单位生命与攻击力均为原单位的一半&lt;br /&gt;
&lt;br /&gt;
附加特效参数：默认为0 当为1时显示半透明影子效果&lt;br /&gt;
&lt;br /&gt;
单位阵营参考目标参数：以指定的目标当前的阵营作为召唤单位当前的阵营，默认为施法者所在的阵营&lt;br /&gt;
&lt;br /&gt;
替换角色技能参数：格式为普通角色技能表信息，如：  技能1,1|技能2,1|...    如果需要复制角色技能，可使用[%this_skills%]或[%aim_skills%]来复制施法者或者目标的技能&lt;br /&gt;
&lt;br /&gt;
默认策略参数：格式为：策略类型,策略参数（默认为“0,0“，支持的策略类型参考SET_POLICY指令，但是不支持攻略地点类型3。例如：参数“2,500”，表示在半径500范围内进行跟随）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''强制改变目标单位的当前位置'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#操作对象(同4节)#位置信息(同2节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''设置目标单位的激活状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否，仅在非激活时有效)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''目标立即被击倒（无视无敌属性）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit#操作对象参数(同4节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''目标主动倒下'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit#操作对象参数（同4节）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''在目标头上弹出一个对话气泡'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#操作对象#对话内容#持续时间(秒数，可省略)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''目标呼喊出几个字（多为技能）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#操作对象#喊话内容&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''播放一个圆形战场警告区域'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#目标位置信息#半径#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''播放一个TimeLine技能对象'''&amp;lt;br /&amp;gt;播放Timeline动作并执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''播放一个TimeLine技能的动作部分'''&amp;lt;br /&amp;gt;只播放Timeline动作，不执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline_anim#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''设置当前施法者的动作锁定状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位：秒 Timeline里编辑时可不指定该时间，以再度调用 block_act#0#0#0的时间差为准)&lt;br /&gt;
可用的锁定状态&lt;br /&gt;
&lt;br /&gt;
*0：不锁定&lt;br /&gt;
*1：锁定攻击及移动&lt;br /&gt;
*2：仅锁定攻击&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''镜头抖动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#时长（秒）#幅度&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''控制角色进行旋转'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''查找并用指定的特效体在当前位置替换目标特效体'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#指定的特效体TAG#匹配数量（≤0时为匹配全部，&amp;gt;0为匹配生成时间最早的有限几个）#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式（同add_eft）#运动参数（可选，同add_eft）#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，同add_eft）#目标参数(同add_eft)#特效体TAG（用于replace_eft指令查询）#原特效体创建者的对象参数(可选，用于查询时筛选，默认为所有人)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''角色顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 hitstop#操作对象#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后角色动作速度恢复为1倍）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''全局顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后全局速度恢复为1倍）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''更改施法者的指定技能CD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能，多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''为此单位设置一个自定义的整形变量值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选，默认为施法者)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''执行一个指定的战斗事件'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''替换施法者单位的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#技能列表信息&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''还原施法者的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''替换施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#技能ID,等级&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''还原施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''将一个单位的指定技能暂时替换为其他技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久，&amp;gt;0为持续指定秒数)#对象单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''改变一个单位当前的MP值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0：否 1：是)#播放受击特效ID(可选，为空不播放)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===战斗中的特殊对象ID===&lt;br /&gt;
战斗指令中经常需要进行一些目标单位的查询，通常是通过角色ID来查找，但是可以通过以下内置ID返回特定的查询对象：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!特殊内置ID&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|玩家单位&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|A方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|B方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|当前执行指令单位自身（一般用于单位挂载脚本中）&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|随机的敌方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|随机的友方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|指定ID为EMITER_ID的发射器单位&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===单位对象附加触发脚本编辑说明===&lt;br /&gt;
通过在地城单位对象中的触发命令中定义，可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为：&lt;br /&gt;
 [CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
每个对象可挂载多个地城对象触发器，当前已支持的触发类型有：&lt;br /&gt;
&lt;br /&gt;
*on_spawn：当刷新出时&lt;br /&gt;
*enter_combat：进入战斗&lt;br /&gt;
*get_hurt：单位受到伤害&lt;br /&gt;
*dead：单位死亡时&lt;br /&gt;
*on_timer：当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发&lt;br /&gt;
*on_skill：该单位开始释放技能时触发 触发参数位技能ID&lt;br /&gt;
*hp_pct：单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比&lt;br /&gt;
*interactive：具有战斗内可交互对象的单位在进行交互行为时触发&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下为一段示例附加脚本：&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#关门，放狗！&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了！别打了！我认输，什么都给你！&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=631</id>
		<title>Skill and Battle Directives in Combat</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=Skill_and_Battle_Directives_in_Combat&amp;diff=631"/>
		<updated>2020-09-21T16:36:06Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：创建页面，内容为“ '''特别注意：脚本编辑时注意所有特殊符号必须为半角！！！同时在剧情和所有配置表里也要避免使用带有特殊符号的字符…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''特别注意：脚本编辑时注意所有特殊符号必须为半角！！！同时在剧情和所有配置表里也要避免使用带有特殊符号的字符串，以防止和脚本配合使用时发生脚本注入错误！'''&lt;br /&gt;
&lt;br /&gt;
===战斗中的指令脚本说明===&lt;br /&gt;
为了在战斗中实现一些特定的剧情事件或是一些复杂的战斗机制，战斗中也使用了独立的剧情事件执行系统。其工作方式和大地图上的剧情事件执行器相似，只是执行事件时不会强制暂停游戏，除非手动调用PAUSE/RESUME指令。&lt;br /&gt;
&lt;br /&gt;
战斗中打开控制台，可以以&amp;quot;bs@&amp;quot;加指令内容的格式来输入脚本指令来进行调试。例如：输入 “bs@KILL_ALL*1” 可实现敌方全灭效果&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===战斗中的脚本指令列表===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!'''指令'''&lt;br /&gt;
!'''说明'''&lt;br /&gt;
|-&lt;br /&gt;
|（空）&lt;br /&gt;
|'''角色对话框'''&lt;br /&gt;
&lt;br /&gt;
用途：以角色立绘+文字打印的方式显示一段对话文本&lt;br /&gt;
&lt;br /&gt;
格式：*角色ID(@立绘显示位置)#对话段落1#对话段落2#对话段落3#...#对话段落N&lt;br /&gt;
|-&lt;br /&gt;
|NOTHING&lt;br /&gt;
|'''空指令'''&lt;br /&gt;
用途：空指令，什么都不做&lt;br /&gt;
&lt;br /&gt;
格式：NOTHING*1&lt;br /&gt;
|-&lt;br /&gt;
|EVENT&lt;br /&gt;
|'''跳转事件'''&lt;br /&gt;
&lt;br /&gt;
用途：跳转并执行指定的剧情事件ID&lt;br /&gt;
&lt;br /&gt;
格式：EVENT*剧情事件ID#执行客户端的用户ID(如果为0则默认都执行)#跳转至目标事件的子命令行index值（从0开始）&lt;br /&gt;
|-&lt;br /&gt;
|SELECT&lt;br /&gt;
|'''角色对话选择框'''&lt;br /&gt;
&lt;br /&gt;
用途：在角色对话框的基础上，当打印完对话内容后，弹出一个选项框让用户选择并返回结果（对应剧情事件中的结果命令中的[%result_code%]）&lt;br /&gt;
&lt;br /&gt;
格式：SELECT*角色ID#对话内容#1:选项一*条件组一;2:选项二*条件组二;...;N:选项N*条件组N   （只有当条件组满足或者为空时才会显示，否则隐藏该选项）&lt;br /&gt;
|-&lt;br /&gt;
|SCREEN&lt;br /&gt;
|'''全屏字幕'''&lt;br /&gt;
用途：全屏显示一个屏幕字幕（默认背景为黑色，可设置背景透明度）&lt;br /&gt;
&lt;br /&gt;
格式：SCREEN*字幕显示文字#字幕配全屏图资源名称(空为不配图)#背景透明度(可选，默认为1)&lt;br /&gt;
|-&lt;br /&gt;
|SHAKE_SCREEN&lt;br /&gt;
|'''屏幕晃动'''&lt;br /&gt;
用途：执行一个屏幕晃动效果&lt;br /&gt;
&lt;br /&gt;
格式：SHAKE_SCREEN*时间(秒)#烈度 (如：SHAKE_SCREEN*0.3#3)&lt;br /&gt;
|-&lt;br /&gt;
|DELAY&lt;br /&gt;
|'''延时等待'''&lt;br /&gt;
用途：延时等待一小段时间（以真实时间秒数为单位，期间不能进行任何操作）&lt;br /&gt;
&lt;br /&gt;
格式：DELAY*等待时间（秒）&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE&lt;br /&gt;
|'''暂停当前游戏场景'''&lt;br /&gt;
用途：暂停当前战斗场景&lt;br /&gt;
&lt;br /&gt;
格式：PAUSE*&lt;br /&gt;
|-&lt;br /&gt;
|RESUME&lt;br /&gt;
|'''继续当前游戏场景'''&lt;br /&gt;
用途：继续当前战斗场景&lt;br /&gt;
&lt;br /&gt;
格式：RESUME*&lt;br /&gt;
|-&lt;br /&gt;
|SET_WEATHER&lt;br /&gt;
|'''设置当前游戏天气'''&lt;br /&gt;
用途：设置并覆盖当前的游戏天气效果&lt;br /&gt;
&lt;br /&gt;
格式：SET_WEATHER*天气效果命令&lt;br /&gt;
&lt;br /&gt;
信息格式见 [[通用剧情事件指令说明#天气效果信息格式|天气效果信息格式]]&lt;br /&gt;
|-&lt;br /&gt;
|BB&lt;br /&gt;
|'''角色头像提示对话框'''&lt;br /&gt;
用途：在屏幕指定UI区域弹出一个有角色头像的对话框，不会打扰当前的操作且不需要进行操作，对话结束后自动消失&lt;br /&gt;
&lt;br /&gt;
格式：BB*角色ID#对话内容#等待额外延时(以秒为单位，按照文字长度自动停留时间再加上此项)&lt;br /&gt;
|-&lt;br /&gt;
|B_TALK&lt;br /&gt;
|'''战斗人物对话泡泡'''&lt;br /&gt;
用途：在战场中的单位头上弹出气泡对话框并显示对话内容&lt;br /&gt;
&lt;br /&gt;
格式：B_TALK*对象ID#随机文字段落1|随机文字段落2|随机文字段落3|...|随机文字段落N&lt;br /&gt;
|-&lt;br /&gt;
|ENEMY_REINF&lt;br /&gt;
|'''敌方单位增援'''&lt;br /&gt;
用途：控制敌方按照指定的单位表增加援军&lt;br /&gt;
&lt;br /&gt;
格式：ENEMY_REINF*小兵列表命令(见 小兵列表格式 )&lt;br /&gt;
|-&lt;br /&gt;
|FRIEND_REINF&lt;br /&gt;
|'''我方单位增援'''&lt;br /&gt;
用途：控制我方按照指定的单位表增加援军&lt;br /&gt;
&lt;br /&gt;
格式：FRIEND_REINF*小兵列表命令(见小兵列表格式)&lt;br /&gt;
|-&lt;br /&gt;
|CMD_RETREAT&lt;br /&gt;
|'''下达撤退指令'''&lt;br /&gt;
用途：命令我方所有单位开始撤退&lt;br /&gt;
&lt;br /&gt;
格式：CMD_RETREAT*0为我方全体1为敌方全体&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_OVER&lt;br /&gt;
|'''强制结束战斗'''&lt;br /&gt;
用途：立即强制结束当前的战斗&lt;br /&gt;
&lt;br /&gt;
格式：BATTLE_OVER*代码（0为胜利 1为失败）&lt;br /&gt;
|-&lt;br /&gt;
|KILL_ALL&lt;br /&gt;
|'''全灭目标'''&lt;br /&gt;
用途：立即对一方所有单位造成足以秒杀此单位的巨量伤害&lt;br /&gt;
&lt;br /&gt;
格式：KILL_ALL*0为我方 1：为敌方&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_PLAYER&lt;br /&gt;
|'''主角不死'''&lt;br /&gt;
用途：给玩家控制的角色增加一个不死的BUFF&lt;br /&gt;
&lt;br /&gt;
格式：UNDEAD_PLAYER*1&lt;br /&gt;
|-&lt;br /&gt;
|UNDEAD_ALL&lt;br /&gt;
|'''所有单位不死'''&lt;br /&gt;
&lt;br /&gt;
用途：给场上所有的单位增加一个不死的BUFF&lt;br /&gt;
&lt;br /&gt;
格式：UNDEAD_ALL*0：仅我方 1：敌我双方&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;s&amp;gt;STOP_ALL&amp;lt;/s&amp;gt;&lt;br /&gt;
|'''&amp;lt;s&amp;gt;所有单位停止行动&amp;lt;/s&amp;gt;'''&lt;br /&gt;
&amp;lt;s&amp;gt;用途：命令场上所有的单位停止当前行动&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;格式：STOP_ALL*0：恢复 1：停&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|EXEC_SKILL&lt;br /&gt;
|'''单位使用技能'''&lt;br /&gt;
用途：命令场上指定单位使用技能&lt;br /&gt;
&lt;br /&gt;
格式：EXEC_SKILL*释放者ID#技能ID,技能等级(默认1级)#目标坐标的x,y#坐标参数1的x,y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
释放者ID为目标的识别ID，可以有以下特殊值&lt;br /&gt;
&lt;br /&gt;
*PLAYER：玩家  GM_A：进攻方的预设对象 GM_B：防守方的预设对象&lt;br /&gt;
*THIS：指令发起者（一般返回发射器自身）&lt;br /&gt;
*EMITTER=ID：指定ID的地城发射器，可为this表示当前地城发射器&lt;br /&gt;
*RND_FRIEND_UNIT：随机友方单位	 RND_ENEMY_UNIT：随机敌方单位&lt;br /&gt;
&lt;br /&gt;
当释放者为预设对象时，坐标参数1代表技能释放的其起始坐标&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_SPAWN&lt;br /&gt;
|'''刷新地城单位'''&lt;br /&gt;
用途：刷新战场地图上已经定义过的地城单位&lt;br /&gt;
&lt;br /&gt;
格式：DUNGEON_SPAWN*控制ID#是否无视状态(当该单位已被击败时仍可刷新 0：否[默认] 1是)&lt;br /&gt;
|-&lt;br /&gt;
|SET_DUNGEON_TS&lt;br /&gt;
|'''设置地城触发器状态'''&lt;br /&gt;
用途：设置地城中指定触发器的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_DUNGEON_TS*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|DUNGEON_OVER&lt;br /&gt;
|'''结束本次地城战斗'''&lt;br /&gt;
用途：结束本次地城战斗并执行相应操作&lt;br /&gt;
&lt;br /&gt;
格式：DUNGEON_OVER*结果代码(0：退出 1：胜利 2：失败)&lt;br /&gt;
|-&lt;br /&gt;
|SET_AREA&lt;br /&gt;
|'''设置障碍区域状态'''&lt;br /&gt;
用途：启用或禁用指定的障碍区域&lt;br /&gt;
&lt;br /&gt;
格式：SET_AREA*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_WIDGET&lt;br /&gt;
|'''设置装饰物件状态'''&lt;br /&gt;
用途：启用或禁用指定的地图装饰物件&lt;br /&gt;
&lt;br /&gt;
格式：SET_WIDGET*控制ID#状态(0正常 -1隐藏)&lt;br /&gt;
|-&lt;br /&gt;
|SET_TP&lt;br /&gt;
|'''设置地城传送器状态'''&lt;br /&gt;
用途：设置地城中的传送器及其关联模型的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_TP*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_EMITTER&lt;br /&gt;
|'''设置发射器状态'''&lt;br /&gt;
用途：设置指定发射器的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_EMITTER*控制ID#状态(0正常 -1禁用)&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_MODEL&lt;br /&gt;
|'''设置玩家角色模型'''&lt;br /&gt;
用途：设置玩家角色的模型&lt;br /&gt;
&lt;br /&gt;
格式：SET_PLAYER_MODEL*单位模型描述信息&lt;br /&gt;
|-&lt;br /&gt;
|SET_PLAYER_SKILL&lt;br /&gt;
|'''设置玩家当前技能'''&lt;br /&gt;
用途：设置玩家角色当前的技能&lt;br /&gt;
&lt;br /&gt;
格式：SET_PLAYER_SKILL*技能ID1,等级|技能ID2,等级|...|技能ID n,等级 （最多4个技能）&lt;br /&gt;
|-&lt;br /&gt;
|SKILL_CMD&lt;br /&gt;
|'''执行技能指令'''&lt;br /&gt;
用途：直接执行技能指令&lt;br /&gt;
&lt;br /&gt;
格式：SKILL_CMD*技能指令内容&lt;br /&gt;
|-&lt;br /&gt;
|SET_DG_INTVAR&lt;br /&gt;
|'''设置战斗中的自定义整形字段'''&lt;br /&gt;
用途：设置战斗中的自定义整形字段&lt;br /&gt;
&lt;br /&gt;
格式：SET_DG_INTVAR*字段ID#设置值#设置模式(可选 1为增加模式（原值加上设置值） 其他为直接赋值模式)#监视信息（可选，当存在时在变量监视界面上显示变量监视信息）&lt;br /&gt;
|-&lt;br /&gt;
|SET_CAMERA&lt;br /&gt;
|'''设置镜头模式'''&lt;br /&gt;
用途：设置战斗中的镜头跟随模式&lt;br /&gt;
&lt;br /&gt;
格式：SET_CAMERA*跟随模式#参数&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
目前支持的镜头跟随模式及参数含义&lt;br /&gt;
&lt;br /&gt;
*0：跟随主角，无参数（默认）&lt;br /&gt;
*1：跟随指定目标，参数为目标单位的对象ID&lt;br /&gt;
*2：战场坐标位置，参数为坐标X,Y&lt;br /&gt;
|-&lt;br /&gt;
|ATTACK&lt;br /&gt;
|'''命令攻击'''&lt;br /&gt;
用途：强制命令一个单位开始攻击另外一个单位&lt;br /&gt;
&lt;br /&gt;
格式：ATTACK*攻击发起者对象ID#攻击目标对象ID&lt;br /&gt;
|-&lt;br /&gt;
|CMD_QUEUE&lt;br /&gt;
|'''单位控制命令序列'''&lt;br /&gt;
用途：为一个单位指定控制命令队列，该单位会强制优先按照此命令队列进行执行&lt;br /&gt;
&lt;br /&gt;
格式：CMD_QUEUE*目标对象ID#命令脚本的事件ID(将命令队列的内容填写至该战斗中事件当中来执行)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
命令队列的格式为（时间参数表示该秒数后执行下一条）：&lt;br /&gt;
&lt;br /&gt;
指令类型1[,时间参数]:指令参数&lt;br /&gt;
&lt;br /&gt;
指令类型2[,时间参数]:指令参数&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
当前支持的队列指令类型有：&lt;br /&gt;
&lt;br /&gt;
*skill_cmd：执行技能指令：参数为一行技能指令&lt;br /&gt;
*use_skill：使用技能：技能ID,技能等级#目标单位对象参数#目标位置参数&lt;br /&gt;
*event：执行战斗事件：战斗中事件ID#执行条件(可选)&lt;br /&gt;
*move_to：移动至指定点：目标坐标参数#速度参数(该指令中时间参数无效，只有当单位正确到达目标后执行下一条)&lt;br /&gt;
*set_dir：设置单位方向：参数为方向&lt;br /&gt;
*keep_act：保持一个动作：动作ID(为空时表示待机动作)#循环次数(小于等于0为无限循环 默认1)#单次动作时间(&amp;lt;=0为始终保持 默认0)  注：此命令中时间参数无效，需等待动作循环执行结束为止，当无限循环时只有对该单位下达新指令方可结束动作保持&lt;br /&gt;
&lt;br /&gt;
'''注意，以上命令中所有的坐标参数当为2参数时表示目标位置的x,y地图坐标，当3参数时第三个参数表示位置类型(0:地图坐标 1：战场坐标)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|SET_POLICY&lt;br /&gt;
|'''设置单位的战斗策略'''&lt;br /&gt;
用途：为一个单位设置当前战斗策略&lt;br /&gt;
&lt;br /&gt;
格式：SET_POLICY*目标对象ID#主策略类型#参数1#位置参数#单位TAG筛选标记（仅当目标对象ID为空时生效）#目标单位ID（主要用于跟随等策略指定目标）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
当前支持的主策略类型有：&lt;br /&gt;
&lt;br /&gt;
*0：强攻(参数为唤醒半径，小于等于0为无限距离)&lt;br /&gt;
*1：固守(参数为守卫半径)  &lt;br /&gt;
*2：跟随(参数为跟随半径)&lt;br /&gt;
*3：攻略目标点&lt;br /&gt;
|-&lt;br /&gt;
|SET_UNIT_TIMER&lt;br /&gt;
|'''设置单位挂载计时器'''&lt;br /&gt;
用途：为一个单位设置一个具有触发功能的计时器并完成特定的触发事件&lt;br /&gt;
&lt;br /&gt;
格式：SET_UNIT_TIMER*目标对象ID#计时器ID#时间参数(&amp;lt;=0时为关闭 只有当单位身上挂有”on_timer”触发器事件时有效)&lt;br /&gt;
|-&lt;br /&gt;
|FINISH_CAST&lt;br /&gt;
|'''立即释放吟唱中的技能'''&lt;br /&gt;
用途：立即释放出单位当前正在吟唱中的技能(只有当目标正在吟唱该技能时生效)&lt;br /&gt;
&lt;br /&gt;
段1,值1|字段2.,值2|...)&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_SKILLS&lt;br /&gt;
|'''替换单位技能'''&lt;br /&gt;
用途：替换单位当前的技能&lt;br /&gt;
&lt;br /&gt;
格式：REPLACE_SKILLS*目标对象ID#技能ID1,等级|技能ID2,等级|...|技能ID n,等级 （一次最多4个技能，当等级为0时表示移除该技能）&lt;br /&gt;
|-&lt;br /&gt;
|REPLACE_DGSKILL&lt;br /&gt;
|'''替换单位地城技能'''&lt;br /&gt;
用途：替换单位当前的地城技能&lt;br /&gt;
&lt;br /&gt;
格式：REPLACE_DGSKILL*目标对象ID#地城技能ID,等级(技能ID为空或者null表示关闭该角色地城技能)&lt;br /&gt;
|-&lt;br /&gt;
|BATTLE_MSG&lt;br /&gt;
|'''播放战场消息'''&lt;br /&gt;
&lt;br /&gt;
用途：播放一条战场消息&lt;br /&gt;
&lt;br /&gt;
格式：BATTLE_MSG*消息内容#消息类型(0：普通 1：警告)&lt;br /&gt;
|-&lt;br /&gt;
|SET_BATTLE_CHECKER&lt;br /&gt;
|'''设置战斗结束检查器工作状态'''&lt;br /&gt;
用途： 设置战斗结束检查器工作状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_BATTLE_CHECKER*工作状态(0：关闭 1：开启）&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_BATTLEOVER_BTN&lt;br /&gt;
|'''显示手动结束战斗按钮'''&lt;br /&gt;
用途： 显示手动结束战斗按钮&lt;br /&gt;
&lt;br /&gt;
格式：SHOW_BATTLEOVER_BTN*1&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_DEBUG_INFO&lt;br /&gt;
|'''显示调试信息'''&lt;br /&gt;
用途： 显示调试信息&lt;br /&gt;
&lt;br /&gt;
格式：SHOW_DEBUG_INFO*状态代码（0：关闭 1：开启主角身上BUFF状态显示）&lt;br /&gt;
|-&lt;br /&gt;
|OPENSTORE&lt;br /&gt;
|'''打开交易界面'''&lt;br /&gt;
用途：打开与指定商人的交易界面&lt;br /&gt;
&lt;br /&gt;
格式：OPENSTORE*商人ID&lt;br /&gt;
|-&lt;br /&gt;
|RESET_STORE&lt;br /&gt;
|'''刷新商人所持商品表'''&lt;br /&gt;
用途：根据配置刷新商人所持的商品表&lt;br /&gt;
&lt;br /&gt;
格式：RESET_STORE*商人ID&lt;br /&gt;
|-&lt;br /&gt;
|SET_TIMER&lt;br /&gt;
|'''设置全局定时器'''&lt;br /&gt;
用途：设置一个定时器来延时执行一些脚本&lt;br /&gt;
&lt;br /&gt;
格式：SET_TIMER*计时器ID#时间参数(秒 &amp;lt;=0为关闭)#定时器结束时执行的事件ID#监视字段信息（可选，如果存在则在变量监视UI中显示剩余时间）&lt;br /&gt;
|-&lt;br /&gt;
|AREA_SPAWN&lt;br /&gt;
|'''区域刷新出单位'''&lt;br /&gt;
用途：在指定的刷新区域批量刷新出指定的单位&lt;br /&gt;
&lt;br /&gt;
格式：AREA_SPAWN*目标区域控制ID#英雄列表#单位表(格式同ENEMY_REINF指令)#所属阵营索引#默认策略(格式为：策略代码:策略参数 同SET_POLICY指令)#刷新出单位的Tag标记（可选）#单位附加属性表（可选）&lt;br /&gt;
|-&lt;br /&gt;
|GETITEMS&lt;br /&gt;
|'''主角获得道具或资源'''&lt;br /&gt;
用途：主角直接获得指定的道具列表（注意：游戏中的金钱、经验等资源都可以通过此方法来获得，只要传入正确的映射ID即可）&lt;br /&gt;
&lt;br /&gt;
格式：GETITEMS*道具列表信息&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_ITEMS&lt;br /&gt;
|'''移除指定道具或资源'''&lt;br /&gt;
用途：根据指定的道具数量从主角道具表中移除指定数量的道具&lt;br /&gt;
&lt;br /&gt;
格式：REMOVE_ITEMS*道具列表&lt;br /&gt;
|-&lt;br /&gt;
|LOOT&lt;br /&gt;
|'''执行掉落判定'''&lt;br /&gt;
用途：按照列表执行一次掉落检定（LOOT格式见 物品掉落信息格式）&lt;br /&gt;
&lt;br /&gt;
格式：LOOT*Loot列表 &lt;br /&gt;
|-&lt;br /&gt;
|ADD_EXP&lt;br /&gt;
|'''指定英雄获取经验'''&lt;br /&gt;
用途：对一个指定的英雄角色增加经验值&lt;br /&gt;
&lt;br /&gt;
格式：ADD_EXP*经验#目标英雄ID（可选，默认为主角）&lt;br /&gt;
|-&lt;br /&gt;
|SETSKILL&lt;br /&gt;
|'''对指定英雄设置技能'''&lt;br /&gt;
用途：对一个指定的英雄角色设置技能，根据操作对象可实现增加、替换、移除操作&lt;br /&gt;
&lt;br /&gt;
格式：SETSKILL*角色ID（可选，默认为主角）#需要添加的技能信息表(格式为&amp;quot;技能ID1,等级|技能ID2,等级|...&amp;quot;)#需要移除的技能表(可选 多个技能以&amp;quot;|&amp;quot;分隔)&lt;br /&gt;
|-&lt;br /&gt;
|CALL_LUAFUNC&lt;br /&gt;
|'''执行LUA函数'''&lt;br /&gt;
用途：执行当前加载的LUA脚本中的指定函数名&lt;br /&gt;
&lt;br /&gt;
格式：CALL_LUAFUNC*脚本中的函数名&lt;br /&gt;
|-&lt;br /&gt;
|ADD_INTER_OBJECT&lt;br /&gt;
|'''添加一个战斗内可交互对象'''&lt;br /&gt;
用途：向当前的战斗中添加一个可交互对象&lt;br /&gt;
&lt;br /&gt;
格式：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， 当&amp;lt;=0时为手动刷新)#自动刷新事件ID（当自动刷新时触发的事件ID）&lt;br /&gt;
|-&lt;br /&gt;
|REMOVE_INTER_OBJECT&lt;br /&gt;
|'''移除战斗内可交互对象'''&lt;br /&gt;
用途：按照控制ID移除指定的可交互对象&lt;br /&gt;
&lt;br /&gt;
格式：REMOVE_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)&lt;br /&gt;
|-&lt;br /&gt;
|SET_INTER_OBJECT&lt;br /&gt;
|'''修改可交互对象的状态'''&lt;br /&gt;
用途：按照控制ID修改指定可交互对象的状态&lt;br /&gt;
&lt;br /&gt;
格式：SET_INTER_OBJECT#控制ID(当交互脚本事件中可用“THIS”内置ID表示自身对象)#新的状态值(0：普通 1：可见不可交互 2：隐藏)&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|'''传送至其他副本地图'''&lt;br /&gt;
用途：将当前的所有玩家角色都传送到指定的副本地图位置&lt;br /&gt;
&lt;br /&gt;
格式：TELEPORT*副本地图ID(需定义在“F副本地图信息表”中):地图坐标X,地图坐标Y&lt;br /&gt;
|-&lt;br /&gt;
|REMOTE_EVENT&lt;br /&gt;
|'''远程请求执行事件'''&lt;br /&gt;
用途：本地请求所有客户端执行一个事件&lt;br /&gt;
&lt;br /&gt;
格式：REMOTE_EVENT*事件ID&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===专门用于战斗场景中条件查询方法===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!查询指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|[%result_code%]&lt;br /&gt;
|战斗中各种事件脚本的查询结果(如：选择框的结果)&lt;br /&gt;
|-&lt;br /&gt;
|[%bs_time%]&lt;br /&gt;
|当前战斗进行的时间(整秒数)&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd:A,B%]&lt;br /&gt;
|返回一个每次都不相同的大于等于A小于等于B的随机值&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd%]&lt;br /&gt;
|返回上一次[%rnd:A,B%]查询到的结果&lt;br /&gt;
|-&lt;br /&gt;
|[%const_rnd%]&lt;br /&gt;
|返回一个执行周期内相同的0-100的随机值&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_x%]&lt;br /&gt;
|返回上一个随机位置结果的X&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos_y%]&lt;br /&gt;
|返回上一个随机位置结果的Y&lt;br /&gt;
|-&lt;br /&gt;
|[%last_rnd_pos%]&lt;br /&gt;
|返回上一个随机位置坐标&lt;br /&gt;
|-&lt;br /&gt;
|[%last_skill%]&lt;br /&gt;
|当前查询源对象上一个使用技能的ID&lt;br /&gt;
|-&lt;br /&gt;
|[%this_type%]&lt;br /&gt;
|当前查询源对象的类型 0英雄 1小兵&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_type%]&lt;br /&gt;
|当前查询目标对象的类型 0英雄 1小兵&lt;br /&gt;
|-&lt;br /&gt;
|[%this_level%]&lt;br /&gt;
|当前查询源对象的等级&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_level%]&lt;br /&gt;
|当前查询目标对象的等级&lt;br /&gt;
|-&lt;br /&gt;
|[%this_hp_pct%]&lt;br /&gt;
|当前查询源对象的HP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_hp_pct%]&lt;br /&gt;
|当前查询目标对象的HP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%this_mp_pct%]&lt;br /&gt;
|当前查询源对象的MP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_mp_pct%]&lt;br /&gt;
|当前查询目标对象的MP百分比&lt;br /&gt;
|-&lt;br /&gt;
|[%friends_num%]&lt;br /&gt;
|我方剩余人数&lt;br /&gt;
|-&lt;br /&gt;
|[%enemy_num%]&lt;br /&gt;
|敌方剩余人数&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_enemy%]&lt;br /&gt;
|判断当前命中的目标是否caster的敌人。敌方1 非敌方0&lt;br /&gt;
|-&lt;br /&gt;
|[%battle_res%]&lt;br /&gt;
|当前当前战斗结果&lt;br /&gt;
|-&lt;br /&gt;
|[%skill_lv:SKILL_ID%]&lt;br /&gt;
|查询当前source对象指定技能ID的等级，无则返回0&lt;br /&gt;
|-&lt;br /&gt;
|[%base_atk%]&lt;br /&gt;
|当前技能等级所对应的基础物理攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%base_magic_atk%]&lt;br /&gt;
|当前技能等级所对应的基础魔法攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%standard_magic_atk%]&lt;br /&gt;
|当前技能等级所对应的魔法最终攻击力&lt;br /&gt;
|-&lt;br /&gt;
|[%this_buff:BUFF_ID%]&lt;br /&gt;
|查询当前source对象指定BUFF_ID的当前层数&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_buff:BUFF_ID%]&lt;br /&gt;
|查询当前target对象指定BUFF_ID的当前层数&lt;br /&gt;
|-&lt;br /&gt;
|[%stat:STAT_FIELD%]&lt;br /&gt;
|查询当前source指定属性字段的当前数值&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_stat:STAT_FIELD%]&lt;br /&gt;
|查询当前target对象指定属性字段的当前数值&lt;br /&gt;
|-&lt;br /&gt;
|[%this_weapon%]&lt;br /&gt;
|当前查询source对象的武器类型&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_weapon%]&lt;br /&gt;
|当前查询target对象的武器类型&lt;br /&gt;
|-&lt;br /&gt;
|[%charge_val%]&lt;br /&gt;
|本次伤害的蓄力值（0~100）&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval%]&lt;br /&gt;
|当前命令行的参数值&lt;br /&gt;
|-&lt;br /&gt;
|[%cmd_argval_next%]&lt;br /&gt;
|返回当前命令行参数值后立即加1&lt;br /&gt;
|-&lt;br /&gt;
|[%rpt_index%]&lt;br /&gt;
|当前命令行所在循环的INDEX值&lt;br /&gt;
|-&lt;br /&gt;
|[%find_tag:TAGINFO%]&lt;br /&gt;
|执行一次目标单位查找，TAGINFO为目标单位信息，参数格式见 技能对象格式说明，当查询到合适目标时返回1否则返回0&lt;br /&gt;
|-&lt;br /&gt;
|[%add_find_tag:TAGINFO%]&lt;br /&gt;
|从已查找单位列表中增加目标单位，始终返回1，TAGINFO同上&lt;br /&gt;
|-&lt;br /&gt;
|[%rm_find_tag:TAGINFO%]&lt;br /&gt;
|从已查找单位列表中排除目标单位，始终返回1，TAGINFO同上&lt;br /&gt;
|-&lt;br /&gt;
|[%reset_find_list%]&lt;br /&gt;
|重置当前查找列表，始终返回1&lt;br /&gt;
|-&lt;br /&gt;
|[%rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]%]&lt;br /&gt;
|随机枚举值，根据所有项的概率分布返回其中一个项的RES值。&lt;br /&gt;
比如：[%rnd_enum:25,1:40,2:35,3%]表示有25%的概率返回”1”，40%的概率返回”2”，35%的概率返回”3”&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_sp_state:ID%]&lt;br /&gt;
|返回当前战斗地图中ControlID为ID的刷新单位的当前状态 0：未刷新 1：已刷新 -1：已击败&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_unitnum:TAG%]&lt;br /&gt;
|返回当前战斗地图中剩余未击败并且Tag为TAG的刷新单位的个数&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_sum%]&lt;br /&gt;
|当前查询source对象的友军倒下计数器值&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_sum%]&lt;br /&gt;
|当前查询source对象的敌军倒下计数器值&lt;br /&gt;
|-&lt;br /&gt;
|[%fd_mod:MOD_VAL%]&lt;br /&gt;
|当前查询source对象的友军倒下计数器值与MOD_VAL取余后的值&lt;br /&gt;
|-&lt;br /&gt;
|[%ed_mod:MOD_VAL%]&lt;br /&gt;
|当前查询source对象的敌军倒下计数器值与MOD_VAL取余后的值&lt;br /&gt;
|-&lt;br /&gt;
|[%dg_int_val:KEY%]&lt;br /&gt;
|返回指定KEY的自定义地城整形字段的值&lt;br /&gt;
|-&lt;br /&gt;
|[%emitter_pos:ID,MIN-MAX%]&lt;br /&gt;
|返回指定指定ID的发射器中心位置，距其中心MIN至MAX的一个随机位置，并记录入last_rnd_pos&lt;br /&gt;
|-&lt;br /&gt;
|[%unit_timer:UNIT_ID,TIMER_ID%]&lt;br /&gt;
|返回指定UNIT_ID单位身上所附加的ID为TIMER_ID的计时器剩余时间&lt;br /&gt;
|-&lt;br /&gt;
|[%this_intvar:ID%]&lt;br /&gt;
|返回当前查询source对象身上的自定义整形数值(技能指令set_unit_intvar设置)&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_intvar:ID%]&lt;br /&gt;
|返回当前查询target对象身上的自定义整形数值(技能指令set_unit_intvar设置)&lt;br /&gt;
|-&lt;br /&gt;
|[%defeat_hit%]&lt;br /&gt;
|查询当前命令是否是在击杀单位指令中执行的并且目标单位已被击杀(0：否 1：是) 注意：只能在技能中的命中命令指令中生效&lt;br /&gt;
|-&lt;br /&gt;
|[%eft_count:TAG%]&lt;br /&gt;
|查询当前场上指定TAG的特效体数量 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
|-&lt;br /&gt;
|[%this_id%]&lt;br /&gt;
|当前查询对象的单位ID&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_id%]&lt;br /&gt;
|当前查询目标对象的单位ID&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_dmg_val%]&lt;br /&gt;
|查询当前施法中对目标造成的实际伤害或治疗的实际数值 注意：只能在命中指令中生效&lt;br /&gt;
|-&lt;br /&gt;
|[%stealth_hit%]&lt;br /&gt;
|查询当前技能或伤害是否是在隐身状态下进行的 0否1是&lt;br /&gt;
|-&lt;br /&gt;
|[%hit_count%]&lt;br /&gt;
|查询当前技能命中判定生效的次数&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下指令需要客户端版本高于0.7.4.2&lt;br /&gt;
|-&lt;br /&gt;
|[%this_skills%]&lt;br /&gt;
|返回当前查询source对象当前的技能列表&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_skills%]&lt;br /&gt;
|返回当前查询target对象当前的技能列表&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |以下指令需要客户端版本高于0.8.0.1&lt;br /&gt;
|-&lt;br /&gt;
|[%this_userid%]&lt;br /&gt;
|返回当前查询source对象当前的客户端ID&lt;br /&gt;
|-&lt;br /&gt;
|[%aim_userid%]&lt;br /&gt;
|返回当前查询target对象当前的客户端ID&lt;br /&gt;
|-&lt;br /&gt;
|[%player_money%]&lt;br /&gt;
|玩家身上的金钱数&lt;br /&gt;
|-&lt;br /&gt;
|[%item_number:物品key%]&lt;br /&gt;
|返回背包中某种物品（或者资源）的数目&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===伤害表达式格式===&lt;br /&gt;
游戏战斗中，所有形式的攻击、技能、特效、指令等对单位造成的伤害，结算时都是通过一个统一的接口来实现的。该接口的主要传入参数是一个数据结构，此数据结构可在各种脚本里通过伤害值表达式的形式来指定。一般伤害值表达式的格式如下：&lt;br /&gt;
 key1:value1;key2:value2;...;keyN:valueN&lt;br /&gt;
伤害值表达式可以嵌入到一些数值表里（如BUFF列表的状态值等），或者直接嵌入到数值计算公式（[&amp;amp;expression&amp;amp;]格式中）；&lt;br /&gt;
&lt;br /&gt;
目前可支持的伤害表达式键值有：&lt;br /&gt;
&lt;br /&gt;
*type 伤害类型：0:普通近战攻击 1:普通远程攻击 2:技能伤害 3:治疗 4：回蓝&lt;br /&gt;
*dmg 物理伤害数值，值为伤害值公式&lt;br /&gt;
*t_dmg 真实伤害数值(所有治疗效果都为此值)，值为伤害值公式&lt;br /&gt;
*hit 命中参数（-1000~1000） 当不能闪避时为-1000&lt;br /&gt;
*blk 被招架参数（-1000~1000） 当不能被招架时为-1000&lt;br /&gt;
*cri 暴击参数（-1000~1000） 当不能暴击时为-1000&lt;br /&gt;
*act 是否播放受击动作 1是 0否&lt;br /&gt;
*eft 受击特效ID&lt;br /&gt;
*trig 是否触发伤害效果（如反伤等）&lt;br /&gt;
*attack_type 指定伤害的武器攻击类型&lt;br /&gt;
*buff 受到该伤害时附带的BUFF效果, 格式为 BuffID,[time],[overlay]，两个参数为可选参数，分别表示时间及层数&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
伤害值公式仅支持标准数学公式，包含以下运算符号：+-*/^%()，可嵌入一些预定义字段，所有预定义字段写在形如[%cmd%]的格式内，目前支持的预定义字段有：&lt;br /&gt;
&lt;br /&gt;
*[%rnd:min_val,max_val%]：随机一个大于等于min_val，小于等于max_val的整数&lt;br /&gt;
*[%field%]：field表示任意一个定义在角色属性字段中的数值&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===技能指令编辑说明===&lt;br /&gt;
技能指令是用来在战斗中实现各种技能效果的基础元素。在战斗中，所有单位执行技能时都会将该技能中的技能指令放入战斗技能指令执行队列中，根据各自的运行环境依次执行。&lt;br /&gt;
&lt;br /&gt;
在技能配置表中技能命令条目以”\n”换行符分隔，每条由延迟时间*[条件表达式(可选)]#命令内容组成，参考格式如下：&lt;br /&gt;
 0*条件表达式1#技能命令1&lt;br /&gt;
 0.2#技能命令2&lt;br /&gt;
 ……&lt;br /&gt;
当条件表达式不为空时，根据条件表达式判定结果执行。&lt;br /&gt;
&lt;br /&gt;
条件语句中可以使用一些内置命令来实现一些例如重复之类的特殊效果，例如&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_START:9&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 [@0.01*[%rpt_index%]@]#技能命令&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;REPEAT_END&lt;br /&gt;
表示将REPEAT_START行与REPEAT_END之间的所有行重复9遍，期间可以通过[%rpt_index%]来查询当前语句处于第几次循环&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_UNITS:[目标筛选条件表达式](注意，次数查询cast_info中的target为当前单位)&lt;br /&gt;
 语句1&lt;br /&gt;
 语句2&lt;br /&gt;
 ...&lt;br /&gt;
 语句N&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;SELECT_END&lt;br /&gt;
表示对SELECT_UNITS行与SELECT_END之间所有的命令行，对SELECT_UNITS:后所有满足指定条件表达式的对象使用，并以该对象作为caster对象&lt;br /&gt;
&lt;br /&gt;
其中，嵌入到[@...@]中的语句为保留两位小数的结果运算取值，此类查询仅在技能命令中有效。&lt;br /&gt;
&lt;br /&gt;
目前支持的技能命令有：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!技能指令&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|stop_act&lt;br /&gt;
|'''立即停止当前所有技能动作并按照之前指令行动'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_act#1&lt;br /&gt;
|-&lt;br /&gt;
|add_eft&lt;br /&gt;
|'''向战场中添加一个预定义的特效体'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_eft#特效体ID#初始位置#运动参数#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，为空时按照特效表中定义的伤害表达式计算，格式见6.4节）#目标参数(见7.4节说明)#特效体TAG（用于replace_eft指令查询）&lt;br /&gt;
初始位置格式为：位置类型,偏移x,偏移y,偏移z（偏移量为相对于初始方向的偏移）&lt;br /&gt;
&lt;br /&gt;
支持的位置类型有：&lt;br /&gt;
&lt;br /&gt;
*cast_pos：技能施放动作的预设位置&lt;br /&gt;
*tag_pos：技能施放目标单位或者目标坐标的位置&lt;br /&gt;
*hit_pos：技能命中目标单位当前的位置&lt;br /&gt;
*unit_pos：技能施放单位当前的位置&lt;br /&gt;
*start_pos：技能释放时的开始位置&lt;br /&gt;
*rnd_pos：技能释放单位周围一个任意的位置&lt;br /&gt;
*dim_pos：通过set_dimpos命令定义的预设位置&lt;br /&gt;
*reinf_pos：施法者阵营方的增援位置&lt;br /&gt;
*emitter_pos=EMITTER_ID：ID为EMITTER_ID的发射器发射点位置&lt;br /&gt;
*unit_round=DIR:LEN：距离施法者正方向偏移DIR角度，距离为LEN的位置&lt;br /&gt;
*rnd_round=RAD[-MIN_RAD]：施法者半径RAD范围内的随机位置，可选参数MIN_RAD表示随机范围距中心的最小距离，默认为0&lt;br /&gt;
*eft_pos=TAG：返回查询到的第一个指定特效体TAG的特效体位置，如不存在则返回caster的当前位置 '''注意：仅支持查询由caster本单位创建的特效体'''&lt;br /&gt;
*……&lt;br /&gt;
&lt;br /&gt;
运动参数格式为：运动类型:运动参数（形如：参数1,参数2,参数3.....）&lt;br /&gt;
&lt;br /&gt;
支持的运动类型有：&lt;br /&gt;
&lt;br /&gt;
*0：不运动 无参数&lt;br /&gt;
*1：运动至技能目标点 偏移x,偏移y,偏移z&lt;br /&gt;
*2：运动至技能目标单位 无参数(当目标参数不为空时使用目标参数指定的目标，否则按照技能释放目标)&lt;br /&gt;
*3：向指定方向运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*4：向指定方向往返运动 偏移角度,移动距离(最大不超过战场宽度)&lt;br /&gt;
*5：跟随目标运动 跟随类型(0固定相对位置，1发射点位置),偏移x,偏移y,偏移z,持续时间（-1为永久）&lt;br /&gt;
*6：运动至dim_pos 偏移x,偏移y,偏移z&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dmg_check&lt;br /&gt;
|'''进行伤害判定'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
 dmg_check#判断类型#伤害值表达式#目标对象参数#判断参数表(“,”分隔)#是否过滤掉重复检定对象(可选，默认关闭)&lt;br /&gt;
支持的判断类型有：&lt;br /&gt;
&lt;br /&gt;
*0：单体判断（目标对象参数为目标单位见下一小节，为空表示技能目标）&lt;br /&gt;
*1：半径范围判断 目标对象参数为目标类型(0:敌方 1：我方 2：双方) 参数表中参数1为参考位置类型（见add_eft命令的位置类型） 参数2,3,4,5分别为偏移坐标的x,y,z及半径&lt;br /&gt;
*2：多边形范围判断 目标对象参数同上 参数表中参数1同上 参数2为旋转角度 参数3为多边形顶点数，参数4以后为以参考点坐标为(0,0)的多边形坐标信息&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_buff&lt;br /&gt;
|'''对目标施加BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_buff#buff ID#BUFF目标参数#持续时间（如不指定则采用BUFF默认持续时间）#叠加层数（默认为1）#上限层数(默认为配置表中的数值，只有大于0时生效)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
可支持的内置目标参数有：&lt;br /&gt;
&lt;br /&gt;
*caster：技能释放者&lt;br /&gt;
*target：目标单位（指向性技能的目标或技能命中的目标）&lt;br /&gt;
*roleid,ROLEID：查询单位绑定人物ID为ROLEID的一个目标对象&lt;br /&gt;
*buffgiver,BUFFID：查询当前caster身上一个ID为BUFFID的BUFF给与者&lt;br /&gt;
*find_tag_res：查询指定目标的结果单位（必须先执行一次[%find_tag:TAGINFO%]查询才可调用）&lt;br /&gt;
*tag_next_fu,距离D：当前命中目标的下一个小于距离D的友方单位&lt;br /&gt;
*caster_next_fu,距离D：施法者的下一个小于距离D的友方目标&lt;br /&gt;
*caster_next_eu,距离D：施法者的下一个小于距离D的敌方目标&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|remove_buff&lt;br /&gt;
|'''移除目标的BUFF'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 remove_buff#移除目标（同上）#移除方式#参数1,参数2,参数3...&lt;br /&gt;
目前支持的移除方式如下&lt;br /&gt;
&lt;br /&gt;
*0：全部移除&lt;br /&gt;
*1：移除指定BUFF 参数1为BUFF ID，参数2为移除层数（默认-1为全部移除）&lt;br /&gt;
*2：移除有害BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
*3：移除有益BUFF 参数1为移除数量（默认-1全部移除），参数2为BUFF子类型（默认-1不限）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|dart_move&lt;br /&gt;
|'''突进类移动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 dart_move#动作ID#移动类型#速度参数#冲撞质量#绑定特效#运动结束承接技能,技能等级(默认1级)[可为空],时间偏移(秒，在运动结束前开始执行承接技能向前的时间偏移量&amp;gt;=0)[可为空]#操作对象(可选，默认为caster)#修正目标位置(可选，参数格式见节2)#是否强制(默认0  为1时强制移动)&lt;br /&gt;
移动类型分为：&lt;br /&gt;
&lt;br /&gt;
*0：匀速运动&lt;br /&gt;
*1：跳跃&lt;br /&gt;
*2：击退运动&lt;br /&gt;
*3：击飞运动 （当为击飞运动时，速度参数为击飞的滞空时间）&lt;br /&gt;
&lt;br /&gt;
速度参数为角色移动时的水平速度（当速度小于等于0时为闪现至目标）&lt;br /&gt;
&lt;br /&gt;
冲撞质量在匀速运动时表示刚体质量，0为无视碰撞 (当为跳跃运动时该参数代表跳跃高度)——由于不使用物理引擎了，目前暂时无用了，参数还必须要填写。&lt;br /&gt;
&lt;br /&gt;
绑定特效为运动时附加在单位上的特效ID&lt;br /&gt;
&lt;br /&gt;
运动结束承接技能为执行运动结束后立即执行的技能ID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|stop_dartmove&lt;br /&gt;
|'''停止当前突进运动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 stop_dartmove#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|explode&lt;br /&gt;
|'''在目标位置进行一次爆破物理效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 explode#初始位置(见 技能位置查询参数格式说明)#爆破半径#力度参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|add_force&lt;br /&gt;
|'''对目标单位进行一次击退效果'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 add_force#力度参数#目标单位（可省略，默认target）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sound&lt;br /&gt;
|'''播放一个指定音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sound#音效ID#音效位置（同第一节解释）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|unit_sound_dic&lt;br /&gt;
|'''单位根据模型配置播放指定音效字典中的字段对应音效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 unit_sound_dic#音效字典KEY值#单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|cast_sound&lt;br /&gt;
|'''播放一个指定音效（在施法者处）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 cast_sound#音效ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|chain_eft_to&lt;br /&gt;
|'''播放一个链式特效'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 chain_eft_to#释放单位#目标单位#特效预制体#传播速度(-1为瞬间)#维持时间#命中目标的伤害值表达式&lt;br /&gt;
释放目标的参数见 技能 指令目标参数说明&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|taunt&lt;br /&gt;
|'''嘲讽效果，让目标立即攻击释放者'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 taunt#释放者#目标单位&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|use_skill&lt;br /&gt;
|'''立即触发一个不需要吟唱时间的单体目标技能(可以是当前施法者没有的技能)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 use_skill#技能ID,技能等级(默认1级)#释放者#目标单位#目标位置参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_cmd_val&lt;br /&gt;
|'''操作当前命令行参数&amp;lt;br /&amp;gt;'''&lt;br /&gt;
 set_cmd_val#操作方式#操作值D&lt;br /&gt;
操作方式：0：设置为值D  1：增加值D 2：减少值D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''注意：与其他缓冲后依次执行的指令不同，该指令不会进入执行队列，将立即执行生效。这是为了在一些需要在执行语句上下文中使用临时变量进行信息中继所设计的结构。'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_dimpos&lt;br /&gt;
|'''设置预设位置参数'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_dimpos#操作方式#操作参数[#偏移参数(仅在查询单位位置时生效)]&lt;br /&gt;
操作方式：&lt;br /&gt;
&lt;br /&gt;
*0：我方增援出兵位置 操作参数分别为 x,y,z的偏移&lt;br /&gt;
*1：查询目标单位位置 操作参数为查询指令(见第4小节)&lt;br /&gt;
*2：查询技能参数位置 操作参数为查询指令(见第2小节位置信息)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|play_sk_act&lt;br /&gt;
|'''播放一个已定义的技能动作'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 play_sk_act#目标单位#技能动作ID名称#播放速度系数(默认1)#是否停止移动(默认否)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|summon_unit&lt;br /&gt;
|'''召唤一个单位'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 summon_unit#召唤方式#对象参数[,血量百分比(可选参数，默认为100)]#初始位置参数#持续时间#附加状态表#附加特效参数#单位阵营参考目标参数（可选参数，默认为caster）#替换角色技能(可选参数，为空为不替换)#默认策略参数&lt;br /&gt;
召唤方式：0：对象的镜像  1：通过人物ID召唤  2：通过小兵ID召唤&lt;br /&gt;
&lt;br /&gt;
对象参数： 当召唤方式为0时表示对象单位（参考本章4节）；当召唤方式为1时表示人物模版ID,等级；当召唤方式为2时表示兵种单位ID&lt;br /&gt;
&lt;br /&gt;
初始位置参数见本章2节&lt;br /&gt;
&lt;br /&gt;
持续时间小于等于0时表示本次战斗永久持续，大于0时表示持续秒数&lt;br /&gt;
&lt;br /&gt;
附加状态为该单位的附加属性表，如： s_生命,-[&amp;amp;[%s_生命%]*0.5&amp;amp;]|s_攻击,-[&amp;amp;[%s_攻击%]*0.5&amp;amp;]   表示召唤出的单位生命与攻击力均为原单位的一半&lt;br /&gt;
&lt;br /&gt;
附加特效参数：默认为0 当为1时显示半透明影子效果&lt;br /&gt;
&lt;br /&gt;
单位阵营参考目标参数：以指定的目标当前的阵营作为召唤单位当前的阵营，默认为施法者所在的阵营&lt;br /&gt;
&lt;br /&gt;
替换角色技能参数：格式为普通角色技能表信息，如：  技能1,1|技能2,1|...    如果需要复制角色技能，可使用[%this_skills%]或[%aim_skills%]来复制施法者或者目标的技能&lt;br /&gt;
&lt;br /&gt;
默认策略参数：格式为：策略类型,策略参数（默认为“0,0“，支持的策略类型参考SET_POLICY指令，但是不支持攻略地点类型3。例如：参数“2,500”，表示在半径500范围内进行跟随）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unitpos&lt;br /&gt;
|'''强制改变目标单位的当前位置'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unitpos#操作对象(同4节)#位置信息(同2节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_active&lt;br /&gt;
|'''设置目标单位的激活状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_active#操作对象参数(同4节)#是否激活(1是0否),是否隐藏(1是0否，仅在非激活时有效)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|kill_unit&lt;br /&gt;
|'''目标立即被击倒（无视无敌属性）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 kill_unit#操作对象参数(同4节)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|down_unit&lt;br /&gt;
|'''目标主动倒下'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 down_unit#操作对象参数（同4节）&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|b_talk&lt;br /&gt;
|'''在目标头上弹出一个对话气泡'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 b_talk#操作对象#对话内容#持续时间(秒数，可省略)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|yell&lt;br /&gt;
|'''目标呼喊出几个字（多为技能）'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 yell#操作对象#喊话内容&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|warning_area&lt;br /&gt;
|'''播放一个圆形战场警告区域'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 warning_area#目标位置信息#半径#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline&lt;br /&gt;
|'''播放一个TimeLine技能对象'''&amp;lt;br /&amp;gt;播放Timeline动作并执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|timeline_anim&lt;br /&gt;
|'''播放一个TimeLine技能的动作部分'''&amp;lt;br /&amp;gt;只播放Timeline动作，不执行对应的技能指令文件(.txt)&lt;br /&gt;
 timeline_anim#指定的TimeLine ID&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|block_act&lt;br /&gt;
|'''设置当前施法者的动作锁定状态'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 block_act#状态类型(见下表)#是否可打断该状态(0否1是)#锁定时间(单位：秒 Timeline里编辑时可不指定该时间，以再度调用 block_act#0#0#0的时间差为准)&lt;br /&gt;
可用的锁定状态&lt;br /&gt;
&lt;br /&gt;
*0：不锁定&lt;br /&gt;
*1：锁定攻击及移动&lt;br /&gt;
*2：仅锁定攻击&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|camera_shake&lt;br /&gt;
|'''镜头抖动'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 camera_shake#时长（秒）#幅度&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rotate&lt;br /&gt;
|'''控制角色进行旋转'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 rotate#目标单位参数#起始偏转角度(相对于当前方向)#共计旋转角度数(负数为反转)#持续时间(秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_eft&lt;br /&gt;
|'''查找并用指定的特效体在当前位置替换目标特效体'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_eft#指定的特效体TAG#匹配数量（≤0时为匹配全部，&amp;gt;0为匹配生成时间最早的有限几个）#用于替换的特效体ID(可为空表示直接停止目标特效)#初始位置(默认空或hit_pos表达式（同add_eft）#运动参数（可选，同add_eft）#修改伤检对象(可选，为空时为默认)#附带伤害表达式（可选，同add_eft）#目标参数(同add_eft)#特效体TAG（用于replace_eft指令查询）#原特效体创建者的对象参数(可选，用于查询时筛选，默认为所有人)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hitstop&lt;br /&gt;
|'''角色顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 hitstop#操作对象#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后角色动作速度恢复为1倍）&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|global_hitstop&lt;br /&gt;
|'''全局顿帧'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 global_hitstop#曲线起点降速幅度（倍率）#曲线终点降速幅度（倍率）#时长（秒）&lt;br /&gt;
（结束后全局速度恢复为1倍）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_skill_cd&lt;br /&gt;
|'''更改施法者的指定技能CD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_skill_cd#技能ID表(为空或者为ALL表示单位的所有技能，多个技能ID以”|”分隔)#操作方式(0:减少 1:直接赋新值)#操作值(单位:秒)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|get_items&lt;br /&gt;
|'''战斗中立即获得道具或资源(增加的道具只对主角自己使用时有效)'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 get_items#道具列表(道具表格式同剧情指令中的GETITEMS指令)#获得道具的对象目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|set_unit_intvar&lt;br /&gt;
|'''为此单位设置一个自定义的整形变量值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 set_unit_intvar#变量ID#操作方式(0:±改变 1:直接赋值)#操作值#操作对象目标参数(可选，默认为施法者)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|call_battle_event&lt;br /&gt;
|'''执行一个指定的战斗事件'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 call_battle_event#事件ID#执行者的目标参数(可选,事件脚本中THIS对象的默认值)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_skill&lt;br /&gt;
|'''替换施法者单位的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_skill#技能列表信息&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_skill&lt;br /&gt;
|'''还原施法者的当前技能列表'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_dungeon_skill&lt;br /&gt;
|'''替换施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_dungeon_skill#技能ID,等级&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|revert_dungeon_skill&lt;br /&gt;
|'''还原施法者的地城技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 revert_dungeon_skill#1&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|replace_tag_skill&lt;br /&gt;
|'''将一个单位的指定技能暂时替换为其他技能'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 replace_tag_skill#原技能ID#替换为新的技能ID,等级(如需还原该技能则为空)#替换时长(≤0时为永久，&amp;gt;0为持续指定秒数)#对象单位目标参数&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|change_mp&lt;br /&gt;
|'''改变一个单位当前的MP值'''&amp;lt;br /&amp;gt;&lt;br /&gt;
 change_mp#对象单位目标参数#改变值(可以是公式)#是否播放数字特效(0：否 1：是)#播放受击特效ID(可选，为空不播放)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===战斗中的特殊对象ID===&lt;br /&gt;
战斗指令中经常需要进行一些目标单位的查询，通常是通过角色ID来查找，但是可以通过以下内置ID返回特定的查询对象：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!特殊内置ID&lt;br /&gt;
!说明&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER&lt;br /&gt;
|玩家单位&lt;br /&gt;
|-&lt;br /&gt;
|GM_A&lt;br /&gt;
|A方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|GM_B&lt;br /&gt;
|B方的固定内置单位（用于实现一些无特定施法者的技能指令）&lt;br /&gt;
|-&lt;br /&gt;
|THIS&lt;br /&gt;
|当前执行指令单位自身（一般用于单位挂载脚本中）&lt;br /&gt;
|-&lt;br /&gt;
|RND_ENEMY_UNIT&lt;br /&gt;
|随机的敌方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|RND_FRIEND_UNIT&lt;br /&gt;
|随机的友方小兵单位（非当前PLAYER一方）&lt;br /&gt;
|-&lt;br /&gt;
|EMITTER={EMITER_ID}&lt;br /&gt;
|指定ID为EMITER_ID的发射器单位&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===单位对象附加触发脚本编辑说明===&lt;br /&gt;
通过在地城单位对象中的触发命令中定义，可对该单位附加若干触发器脚本。角色表中角色也可以通过在TAG中指定attached_script字段为一个脚本事件ID来给该角色附加触发脚本。定义格式为：&lt;br /&gt;
 [CMD_BEGIN]#触发类型1#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#触发类型2#触发条件(可选)#触发参数(可选)&lt;br /&gt;
 命令行1&lt;br /&gt;
 命令行2&lt;br /&gt;
 ...&lt;br /&gt;
 命令行N&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
每个对象可挂载多个地城对象触发器，当前已支持的触发类型有：&lt;br /&gt;
&lt;br /&gt;
*on_spawn：当刷新出时&lt;br /&gt;
*enter_combat：进入战斗&lt;br /&gt;
*get_hurt：单位受到伤害&lt;br /&gt;
*dead：单位死亡时&lt;br /&gt;
*on_timer：当单位身上的计时器(战斗指令SET_UNIT_TIMER设置)到时时触发&lt;br /&gt;
*on_skill：该单位开始释放技能时触发 触发参数位技能ID&lt;br /&gt;
*hp_pct：单位血线第一次少于目标百分比时触发 触发参数位目标血线的百分比&lt;br /&gt;
*interactive：具有战斗内可交互对象的单位在进行交互行为时触发&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下为一段示例附加脚本：&lt;br /&gt;
 [CMD_BEGIN]#enter_combat#&lt;br /&gt;
 B_TALK*THIS#关门，放狗！&lt;br /&gt;
 [CMD_END]&lt;br /&gt;
 [CMD_BEGIN]#get_hurt#[%this_hp_pct%][&amp;lt;=]5&amp;amp;[%dg_int_val:测试计数器1%][&amp;lt;=]0&lt;br /&gt;
 SET_DG_INTVAR*测试计数器1#1#1&lt;br /&gt;
 SKILL_CMD*THIS#THIS#0#add_buff#中立#caster B_TALK*THIS#别打了！别打了！我认输，什么都给你！&lt;br /&gt;
 CMD_RETREAT*1&lt;br /&gt;
 [CMD_END]&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=MODDeveloperManual&amp;diff=630</id>
		<title>MODDeveloperManual</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=MODDeveloperManual&amp;diff=630"/>
		<updated>2020-09-21T16:35:29Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 地图编辑器使用说明 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[文件:Banner.jpg|替代=|无框|1037x1037像素|class=noviewer]]&lt;br /&gt;
&lt;br /&gt;
==[[Terminology|Terminology]]==&lt;br /&gt;
&lt;br /&gt;
==[[Introduction to MOD|Introduction to MOD]]==&lt;br /&gt;
&lt;br /&gt;
==[[Development Environment Building|Development Environment Building]]==&lt;br /&gt;
&lt;br /&gt;
==[[Development Tutorial|Development Tutorial]]==&lt;br /&gt;
&lt;br /&gt;
==[[Debugging and Release|Debugging and Release]]==&lt;br /&gt;
&lt;br /&gt;
==[[Common Scenario Directives|Common Scenario Directives]]==&lt;br /&gt;
&lt;br /&gt;
==[[Skill and Battle Directives in Combat|Skill and Battle Directives in Combat]]==&lt;br /&gt;
&lt;br /&gt;
==[[Map Editor|Map Editor]]==&lt;br /&gt;
&lt;br /&gt;
==[[Teaching video|Teaching video]]==&lt;br /&gt;
&lt;br /&gt;
==[[FAQ for English|FAQ for English]]==&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=MODDeveloperManual&amp;diff=629</id>
		<title>MODDeveloperManual</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=MODDeveloperManual&amp;diff=629"/>
		<updated>2020-09-21T16:34:52Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：/* 战斗中的技能与事件指令说明 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[文件:Banner.jpg|替代=|无框|1037x1037像素|class=noviewer]]&lt;br /&gt;
&lt;br /&gt;
==[[Terminology|Terminology]]==&lt;br /&gt;
&lt;br /&gt;
==[[Introduction to MOD|Introduction to MOD]]==&lt;br /&gt;
&lt;br /&gt;
==[[Development Environment Building|Development Environment Building]]==&lt;br /&gt;
&lt;br /&gt;
==[[Development Tutorial|Development Tutorial]]==&lt;br /&gt;
&lt;br /&gt;
==[[Debugging and Release|Debugging and Release]]==&lt;br /&gt;
&lt;br /&gt;
==[[Common Scenario Directives|Common Scenario Directives]]==&lt;br /&gt;
&lt;br /&gt;
==[[Skill and Battle Directives in Combat|Skill and Battle Directives in Combat]]==&lt;br /&gt;
&lt;br /&gt;
==[[地图编辑器使用说明|地图编辑器使用说明]]==&lt;br /&gt;
&lt;br /&gt;
==[[Teaching video|Teaching video]]==&lt;br /&gt;
&lt;br /&gt;
==[[FAQ for English|FAQ for English]]==&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=FAQ_for_English&amp;diff=628</id>
		<title>FAQ for English</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=FAQ_for_English&amp;diff=628"/>
		<updated>2020-09-21T16:32:46Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We will update information regarding what concerns MOD developers on this page from time to time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;container-fluid&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;col-md-3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[https://store.steampowered.com/app/1094520/ Download Game (Steam)]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Game Introduction]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Game Trailer]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;col-md-3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;[[MOD DEV Manual]]&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Terminology|Terminology]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Introduction to MOD|Introduction to MOD]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Development Environment Building|Development Environment Building]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Development Tutorial|Development Tutorial]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Debugging and Release|Debugging and Release]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Common Scenario Directives|Common Scenario Directives]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Skill and Event Directives in Combat|Skill and Event Directives in Combat]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Map Editor|Map Editor]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Tutorial Videos|Tutorial Videos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
	<entry>
		<id>https://blywd.hanjiasongshu.com/index.php?title=FAQ_for_English&amp;diff=627</id>
		<title>FAQ for English</title>
		<link rel="alternate" type="text/html" href="https://blywd.hanjiasongshu.com/index.php?title=FAQ_for_English&amp;diff=627"/>
		<updated>2020-09-21T16:31:55Z</updated>

		<summary type="html">&lt;p&gt;Rehtaf：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We will update information regarding what concerns MOD developers on this page from time to time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;container-fluid&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;col-md-3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[https://store.steampowered.com/app/1094520/ Download Game (Steam)]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Game Introduction]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Game Trailer]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;col-md-3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;[[MOD DEV Manual]]&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Terminology|Terminology]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Introduction to MOD|Introduction to MOD]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Development Environment Building|Development Environment Building]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Development Tutorial|Development Tutorial]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Debugging and Release|Debugging and Release]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Common Scenario Directives|Common Scenario Directives]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[Skill and Event Directives in Combat|Skill and Event Directives in Combat]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Map Editor|Map Editor]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Tutorial Videos|Tutorial Videos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rehtaf</name></author>
		
	</entry>
</feed>