Common Scenario Directives
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.
目录
- 1 Scenario Event
- 2 Scenario Event Trigger
- 3 Script Directive List
- 4 全局存档相关的操作指令
- 5 内置指令列表
- 6 脚本预设字段及含义
- 7 剧情事件中的结果脚本指令格式
- 8 条件表达式组格式
- 9 游戏数据中运算值表达式系统说明
- 10 剧情事件中可用的嵌入式查询指令
- 11 全局存档查询指令字段
- 12 内置全局变量字段
- 13 内置自定义变量字段
- 14 初始设定表内置字段说明
- 15 对话框及一些通用UI中支持的字体颜色指定代码
- 16 人物角色位置指令格式
- 17 游戏内全局位置指令格式
- 18 特定战斗中的单位限制指令格式
- 19 大地图单位控制指令表
- 20 单位队伍默认运动指令格式
- 21 物品列表信息格式
- 22 天气效果信息格式
- 23 镜头滤镜效果信息格式
- 24 人物表中具有特殊含义的TAG
- 25 地点表中具有特殊含义的TAG
- 26 阵营表中具有特殊含义的TAG
- 27 物品表中具有特殊含义的TAG
- 28 地图表中探索地图信息字段中特殊字段说明
- 29 副本信息表中TAG特殊字段说明
- 30 物品道具词条信息格式
- 31 物品掉落信息格式
- 32 特效对象事件脚本指令格式
Scenario Event
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:
1. Scenario Event ID: a unique label of a scenario event;
2. Directive Content: directives that will be executed after a scenario event is triggered;
3. Result: return a result according to the last directive, check conditions and jump to another possible line.
Scenario Event Trigger
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.
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):
Port Type | Explanation | Object Type | Object ID |
---|---|---|---|
passive | Triggered passively;
usually used on triggers in the map editor or triggers that use the TRIGGER directive to execute directly. |
||
talk | Triggered when interacting with NPC. | ||
first_in | Triggered when the player enters the game for the first time. | ||
encounter | Triggered when interacting with units on the sandbox map. | Control ID of the target Unit. | |
before_enter_map | Triggered when entering the target map (if any mission trigger responds, the action of entering the map will be interrupted). | Target map ID. | |
enter_map | Triggered when entering a map. | Target map ID. | |
before_leave_map | Triggered when leaving the target map (if any mission trigger responds, the action of entering will be interrupted). | Target map ID. | |
leave_map | Triggered when leaving a map. | Current map ID. | |
enter_place | Triggered when entering the target location. | Target location ID. | |
reach_place | Triggered before entering a location on the world map (if any trigger responds, the action of entering the locaction will be interrupted) | Target location ID. | |
leave_place | Triggered when leaving the current location. | Current location ID. | |
before_leave_place | Triggered before leaving the current location (if any trigger responds, the action of leaving the location will be interrupted). | Current location ID. | |
enter_building | Triggered when entering the target building | Target building ID. | |
reach_building | Triggered before entering the target building (if any trigger responds, the action of entering the building will be interrupted). | Target building ID. | |
leave_building | Triggered when leaving the target building. | Target building ID. | |
before_leave_building | Triggered when leaving the target building (if any trigger responds, the action of leaving the building will be interrupted). | Target building ID. | |
battle_start | Triggered at the start of a battle. | ||
battle_over | Triggered at the end of a battle. | ||
set_lord | Triggered when AI appoints player as the ruler of a city. | ||
job_cmd | Triggered when the player is given a working order. | ||
see_warband | Triggered when encountering another squad and battle. | ||
curplace_inwar | Triggered when the location where the player is currently settling in is attacked. | ||
quest_done | Triggered when all conditions of a mission are met (mission incomplete). | 任务ID | |
on_end_work | Triggered when completing a mission of a location. | ||
occupy_place | Triggered when the player occupied a location. | Target location ID. | |
new_day | Triggered when starting a new day. | The target number of days. | |
reward_follower | Triggered when the player rewards their followers. | ||
reward_player | Triggered when the player is rewarded. | ||
dip_event | Triggered when the player’s faction meets diplomatic affairs. | Affair types:
1: Ransom Hostage 2: Friendly 3: Declare War 4: Alliance 5: Alliance Dismissed 6: Armistice. |
Target Faction ID. |
dip_ret_success | Triggered when the player’s diplomatic request is met. | Same as above. | Same as above. |
dip_ret_fail | The diplomatic request is not met. | Same as above. | Same as above. |
player_failed | Triggered when the player failed in a skirmish. | ||
reinforce_request | Triggered when reinforcement related to player happens. | ||
is_fall | Triggered when a faction collapsed. | Faction ID. | |
is_to_fall | Triggered when a faction loses all bases and is about to collapse. | Same as above. | |
before_cash_present | Triggered before being rewarded (action of rewarding is interrupted). | ||
before_present | Triggered before sending a gift (action of sending the gift is interrupted). | ||
on_present | Triggered when sending a gift. | ||
encounter_role | Triggered before the common dialogue that happens when the player encounters a character. | Target Character ID. | |
helped_camp | Triggered when the player encounters a conflict between two sides and helped one side. | The faction of the leadrole of target’s squad. | |
on_place_rep_up | Triggered when area tribute increased; the latest tribute value is stored in arg_int_val1. | ||
on_place_rep_down | Triggered when area tribute decreased; the latest tribute value is stored in arg_int_val1. | ||
team_dismiss | Triggered when a squad is dismissed. | Squad Type:
0: character squad 1: squad created by scripts 2: caravan 3: dummy 4: peasant. |
|
team_into_place | Triggered when a squad enters a location. | Squad Type: same as above. | Target location ID. |
Script Directive List
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.
Currently, supported script directives are:
Directive | Instruction |
---|---|
(null) | Character Text Box
Function: show a dialogue with the typewriter effect and character painting. Format: *Character ID(@position of character painting)#paragraph 1#paragraph 2#paragraph 3#...#paragraph N. Annotation: When certain paragraph needs to be bound with audios, add <voice:audio ID> 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. You can separate multiple paragraphs by “|” so that one of these paragraphs will be returned randomly. When the paragraph begins with “inner:...”, a special piece of information is used; The built-in special information IDs and meanings are as follow: inner:set_player_job: object’s words when they give orders to player inner:set_player_lord: text when the player is appointed as a ruler inner:self_introduce: self-introduction of a character inner:cur_doing: the content of what the current character has been doing inner:cur_team_intent: intension of the current squad *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. |
EVENT | Jump-to Event
Function: Jump to and execute another specific scenario event ID. Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0). |
SUB_EVENT | Jump-to Subevent
Function: jump to and execute another specific subevent and is able to jump back via the SUB_EVENT_RETURN directive. Format: SUB_EVENT*scenario event ID. |
SUB_EVENT_RETURN | Return to Subevent
Function: jump back to the last subevent from the current subevent. Format: SUB_EVENT_RETURN* |
SELECT | Dialogue Selection List Box
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). 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). Annotation: when the KEY of an option begins with "+", the text box will not disappear after the player selects an option. |
SELECT_TALK | Plugin Dialogue Option
Function: a selection list box that can present new options via a trigger list. Format: SELECT_TALK*character ID#dialogue content#[ADDON_SELECT];[fixed option(e.g., 0: cancel)]#filter tag (separated by "|"; set to be "any" by default) Annotation: the first two parameters are the same as SELECT; the fourth parameter is the trigger type (set to be "any" 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. Please note: when using this directive, you need to add "[%result_code%][>]99:EVENTPOJO_EVENT* " to the result In the trigger list, you can add a prefix "SUB_EVENT." to a trigger event ID to mark it as a subevent. |
CMD_SELECT | System Selection List Box
Function: a text box with a "confirm" button pops up. Format: CMD_SELECT*select text info#option group (same as SELECT directive). |
CONFIRM | Text Confirmation Box
Function: a text box with a "confirm" button pops up. Format: CONFIRM*text to confirm |
TOAST | Message on Screen
Function: a message pops up on the screen, which disappears after a short while. Format: TOAST*message content |
BB | Character Icon Pop-up
Function: a character text box pops up at the specific position, without disturbing the current game. The player does not need to perform actions. The text box will disappear in a while. Format: BB*character ID#dialogue content#extra existing time (counts by second; based on the original existing time of the dialogue, which is measured by the length of text). |
GAME_MSG | In-game News
Function: show a text in the UI message box, which can be reviewed in the News Log. Format: GAME_MSG*news content#new type (0: Normal; 1: Warning; 2: System). |
INPUT | Input Text Box
Function: a text box pops up, and you can restore what you input in the queriable variable ([%input_str%]). Format: INPUT*notice text#Len number limit of digit#default text. |
DELAY | Delay
Function: delay the current situation for a while (counts by seconds in the real world; the player cannot perform any action during the delay). Format: DELAY*waiting time (second).) |
SCREEN | Fullscreen Subtitle
Function: show a subtitle in fullscreen (default background colour is black; transparency is adjustable). Format: SCREEN*subtitle#resource name of background image#transparency (optional; default: 1). |
BLACK_SCREEN | Screen Curtain
Function: cover the UI layer of the screen with a black curtain. Only UI objects like fullscreen subtitles can be shown on the curtain. Format: BLACK_SCREEN*turn on or not(0: Disabled; 1:Enabled). |
SHAKE_SCREEN | Screen Shake
Function: execute a screen shake effect. Format: SHAKE_SCREEN*Time(second)#intensity (e.g., SHAKE_SCREEN*0.3#3). |
SET_WEATHER | Set Weather
Function: Set and replace the current weather in the game. Format: SET_WEATHER*weather effect directive. Annotation: Format of weather effect directives: weather effect ID1, intensity|weather effect ID2, intensity|…weather effect IDN, intensity. E.g., 雪,60|雾,20 Intensity Range:0~100; when the intensity is 0, the weather effect is disabled For weather effect ID, please refer to 天气效果信息格式 |
BATTLE | Start Battle
Function: start a skirmish or a battle defined in a specific battle table. 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). |
BATTLE_WITH | Fight with Specific Unit
Function: start a custom fight with a specific target. 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). |
BATTLE_WITH_TAGROLE | Fight with Target Character
Function: start a specific fight with the target character immediately. 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). |
CHANGE_BGM | Change Current BGM of the Game
Function: change the current BGM of the game based on the need of stories. Format: CHANGE_BGM*parameter 1#paramter 2 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). 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). |
PLAY_SOUND | Sound Effect
Function: play a sound effect in the game. Format: PLAY_SOUND*sound effect ID#delay time(set 0 by default). |
PLAY_ROLE_VOICE | Play Character Voice-over
Function: play an audio file that is defined in “Voice” of the character’s tags. Format: PLAY_ROLE_VOICE*character ID, the setting of “Voice” of the relevant character’s tags. |
DUNGEON | [Unavailable] |
NUMSEL | Input Value Text Box
Function: a text box pops up, and you can restore what you input in the queriable variable ([%result_code%]). 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”). |
CHANGE_MONEY | Change Player’s Money in Hand
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0). Format: CHANGE_MONEY*change value. |
ROLE_CHANGE_MONEY | Change a Specific Hero’s Money in Hand
Function: change the amount of money the player is holding according to the change value (the value can go lower than 0). Format: ROLE_CHANGE_MONEY*Hero ID#change value. |
GETITEMS | Player Gets Items or Resources
Function: player’s character gains a list of items (please note: money, exp, and resources in the game can all be gained this way, as long as you have the correct mapping IDs). Format: GETITEMS*item list info (e.g., GETITEMS*Tea of Merchant’s Guild, 3| Bread,1). |
AI_CAMP_GETITEMS | All Factions Get Items or Resources
Function: Same as the GETITEMS Directive. All factions get items or resources after calling the current directive. Format: AI_CAMP_GETITEMS*item list info. |
TRANSFER_ITEMS | Convert Item
Function: convert a specific item in the current item list into a new item proportionally. Format: TRANSFER_ITEMS*original item ID#new item ID#number of original item# number of new item#conversion time. 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. |
GET_RND_ITEM | Select a Type of Item Randomly
Function: select a type of item randomly among several items. 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.) |
REMOVE_ITEMS | Remove Specific Item or Resource
Function: remove a certain number of items from the item list of the player. Format: REMOVE_ITEMS*item list. |
REMOVE_SELECT_ITEMS | Remove the Selected Item
Function: remove a certain number of items after creating the UI Selection Item List according to the ITEMS_SELECTOR directive. 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). |
REMOVE_PRESENT | Remove Specific Gift Item That Meet Requirement
Function: remove a gift item from the item list based on a specific gift tag. Format: REMOVE_PRESENT*gift description. For the format of gift description, please refer to the format of the tag of "Like" in the mission list. |
ITEMS_SELECTOR | Open Item Selection Text Box
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). Format: ITEMS_SELECTOR*title of text box#number limit (no limit when below 0)#conditional expression filter. |
LOOT | Execute Drop Check
Function: execute a check according to the loot list (please refer to the: Format of Item Dropping Info). Format: LOOT*Loot list |
TEAM_GAINEXP | Player’s Squad Gains EXP
Function: members in the player’s squad gain average EXP. Format: TEAM_GAINEXP*exp gained (every unit gains the same amount of EXP). |
TEST_ADD_ROLE_EXP | Specific Hero Gains EXP
Function: a specific hero gains EXP. Format: TEST_ADD_ROLE_EXP*hero ID#exp. |
CHANGE_ROLE_LV | Change Character Level
Function: change the level of a specific character. Format: CHANGE_ROLE_LV*hero ID#expected level. |
PLAYER_GUARDS_LEVELUP | All Defending Heroes Level Up
Function: all heroes in a specific location increase their level by 1. Format: PLAYER_GUARDS_LEVELUP*location ID. |
PLAYER_TEAM_LEVELUP | All Heroes in Player’s Squad Level UP
Function: all heroes in the player’s squad level up directly. Format: PLAYER_TEAM_LEVELUP*. |
SETTRIGG | Set Trigger Switch
Function: turn on or turn off a trigger directly. Format: SETTRIGG*trigger ID#status value (0: On; 1: Off) |
TRIGGER | Execute Trigger
Function: execute a specific trigger directly. Format: TRIGGER*trigger ID |
SET_ES | Manually Set Scenario Event Status
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). Format: SET_ES*scenario event ID*status value (-1: Unexecuted; other values are the ResultCode of this event). |
SETINTVAR | Set Custom Int Variable
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%]). Format: SETINTVAR*parameter ID#current int value |
CHANGEINTVAR | Change Custom Int Variable
Function: change the value of the current custom int variable. Format: CHANGEINTVAR*parameter ID#value change (can be a negative number)#[optional: forceZero] After filling in forceZero, the value will not go below zero. |
SET_TEMP_ID | Set Temporary ID Variable
Function: set a temporary ID, which will not be recorded in saves and needs to be accessed in a unique way. Format: SET_TEMP_ID*ID. |
SETSTRVAR | Set Custom String Variable
Function: set a string variable that can be recorded in saves. You can query this via built-in query parameter ([%str_val%]). Format: SETSTRVAR*Variable ID#string value. |
SETGAMETIMETAG | Tag a Custom Crucial Time Point
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. 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. Format: SETGAMETIMETAG*time point ID. |
SETGAMETIME | Tag a Custom In-game Time Point
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.). Format: SETGAMETIME*time point ID. |
SET_CUSTOM_CD | Set a Custom Cooldown Time
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. Format: SET_CUSTOM_CD*custom ID#Cooldown time(≤0: the cooldown is disabled;>0: set a specific time (count by day)). |
GET_QUEST | Claim a Mission
Function: claim a specific mission. Format: GET_QUEST*mission ID. |
ADD_QS | Add Mission Subitem Counter
Function: add a subitem counter of missions manually. Format: ADD_QS*mission ID#subitem index (starts from 0)#number of counter. |
SETQUESTIEM | Set Value of Mission Subitem
Function: set the value of the subitem of missions. Format: SETQUESTIEM*mission ID#subitem index#value |
DONE_QUEST | Complete a Mission
Function: mark and complete a specific mission. Format: DONE_QUEST*mission ID#reward or not(1: Yes). |
SHOW_IMG | Show a Character Painting Frame
Function: [not suggested; recommend using the SHOW_CG direcitve]. Format: SHOW_IMG*name of image*preset special effect 0*duration (second). Format: SHOW_IMG*image resource name*preset special effect 0 *existing time (second). |
CLOSE_IMG | Disable Character Painting Frame
Function: disable the current character painting frame. Format: CLOSE_IMG*preset special effect 0. |
JOIN_ROLE | Force Character to Join
Function: force a character to join your squad. If your team is full, this character will be placed in the Manage panel. Format: JOIN_ROLE*character ID. |
QUIT_ROLE | Force Character to Leave
Function: force a character to leave your squad. Format: QUIT_ROLE*character ID. |
SET_PLACE | Change Location Status
Function: set the current status of a location. Format: SET_PLACE*location ID#status value (0: Normal; 1: Destroyed; -1: Hidden). |
SET_ROLEPOS | Set Character Position
Function: set a character’s position compulsorily (for character position info format, see the Character Position Directive). Format: SET_ROLEPOS*character ID#position info |
LEAVE_PLACE | [Unavailable] |
TELEPORT | Teleport Player to Specific Position
Function: teleport player’s squad to a specific position in the world. Format: TELEPORT*world position info. |
TELEPORT_TO_PLACE | Teleport Player to Specific Location
Function: teleport player’s squad to a specific location. Format: TELEPORT_TO_PLACE*location ID. |
TELEPORT_TO_ROLE | Teleport Player to Target Character
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). Format: TELEPORT_TO_ROLE*character ID. |
MAP_CMD | Exclusive Directive Group for Unit Control on Sandbox Map
Function: control various units to execute specific directives on a sandbox map. Format: MAP_CMD*directive content Move to the target coordinate: MOVETO#target ID# X, Y of target coordinate X, Y#waiting for callback (1: No; 0: Yes). Chase a specific target: CHASE#object ID#target ID#waiting for callback (1: No; 0: Yes). Player enters a specific location: ENTER_PLACE#target location ID#method (0: Normal; 1: Stealth)#block enter_place events (0: No; 1: Yes). Show a battle mark: SHOW_BATTLE_MARK#X, Y of the target coordinate. Hide current battle mark: HIDE_BATTLE_MARK#1. |
RESTORE | Player’s Squad Get Recovered
Function: all units in the player’s squad are recovered. Format: RESTORE*parameter (<=0: squad fully recovered; >0: squad recovered by a specific point). |
TIME_ELAPSE | Time Acceleration
Function: use this directive to accelerate in-game time. During the acceleration, a time bar will show up. 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). |
WAIT_EXEC | Wait and Execute a Script Event
Function: show a timer and wait for some time (in-game). A scripted event will be executed when the timer ends. 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). |
OPENSEIGE | Open Siege Management Panel
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). 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). |
OCCUPY | Execute City Occupation
Function: execute city occupation check based on the current environment (this should work with a proper directive triggering environment. E.g., city-entering trigger). Format: OCCUPY*0. |
JOIN_WARBAND | Join Warband
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). Format: JOIN_WARBAND*warband ID. |
CHANGE_CAMP | Change Character Faction
Function: change the faction of a target character directly. 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). |
CREATE_OWN_CAMP | Player Creates Their Faction
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. Format: CREATE_OWN_CAMP*name of self-built faction. |
SET_CAMP_ACTIVE | Change Faction Project Status
Function: change the project status of a faction. When a faction is inactive, it will not execute any strategy or faction behaviour. Format: SET_CAMP_ACTIVE*faction ID#status value (0: Inactive; 1: Active). |
SET_CAMP_RL | Change Faction Relationship
Function: change diplomatic relationship or friendliness between factions. 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). |
CHG_CAMP_REP | Change Player’s Prestige (Tribute) towards Faction
Function: change player’s prestige (Tribute) towards a faction. 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. |
CHG_PLACE_REP | Change Player’s Prestige (Friendliness) towards Faction
Faction: change the player’s prestige (Friendliness) towards a faction. Format: CHG_PLACE_REP*locationID#value change# expected value (this works when the value is not empty). |
FAME | Change Player’s Global Prestige
Function: change the player’s current global prestige. Format: FAME*value change. |
CHANGE_FAME | Change Character’s Global Prestige
Function: change a specific character’s current global prestige. Format: CHANGE_FAME*target character ID#value change. |
CHG_PERSON_FV | Change Favor between the Player and a Character
Function: change favor between the player and another character. Format: CHG_PERSON_FV*target character ID#value change#expected value (this works when the value is not empty). |
SET_ROLE_ACTIVE | Change Character Project Status
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. Format: SET_ROLE_ACTIVE*character ID#status value (-1: Inactive; 0: Active). |
CHG_PROSP_BY_CAMP | Change Prosperity of All Bases of Faction
Function: change the prosperity of all bases of a specific faction proportionally. Format: CHG_PROSP_BY_CAMP*faction ID#percentage(>=100). |
CHG_PLACE_PROSPERITY | Change Location Prosperity
Function: change the Prosperity of a specific location by a fixed value. 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). |
CHG_PLACE_PROSPERITY_BY_PCT | Change Location Prosperity by Percentage
Function: change the Prosperity of a specific location by percentage. Format: CHG_PLACE_PROSPERITY_BY_PCT*location ID#percentage change (>=100). |
CHG_PLACE_DEF | Change Location Defense
Function: change the Defense of a location by a fixed value. 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). |
CHG_PLACE_DEF_BY_PCT | Change Location Defense by Percentage
Function: change the defense of a location by percentage. Format: CHG_PLACE_DEF_BY_PCT*location ID#percentage change. |
CHG_PLACE_SECURITY | Change Location Security
Function: change the security of a location by a fixed value. Format: CHG_PLACE_SECURITY*location ID#value change#expected value (0-100). |
PLACE_CUSTOM_INT | Custom Field Value of Location
Function: a custom int field value of a specific location. Format: PLACE_CUSTOM_INT*location ID#mark ID#int mark value. |
CHG_PLACE_CUSTOM_INT | Change Custom Field Value of Location
Function: change the custom int value of a specific location. Format: CHG_PLACE_CUSTOM_INT*location ID#field KEY#value change#target value. |
PLACE_ADD_BUILDING | Add Custom Facility
Function: add a custom facility to a location. Format: PLACE_ADD_BUILDING*location ID#facility ID (invalidated when the target location already has this facility).
|
PLACE_REMOVE_BUILDING | Remove Custom Facility from Location
Function: remove a specific custom facility from a location. Format: PLACE_REMOVE_BUILDING*location ID#facility ID. |
CREATE_CARAVAN | Create Caravan
Function: create a caravan in a specific location. Format: CREATE_CARAVAN*set-off city ID#destination city ID#TAG (TAG used to mark squad). |
CREATE_TEAM | Create Squad
Function: create a squad, which takes actions according to specific directives. 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). Currently, supported directive methods are: · 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. · 1: premade directive of invading city: the parameter is the ID of the target city, invasion method (set 0 by default). · 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). |
DISMISS_TEAM | Dismiss Squad
Function: dismiss a specific squad. Format: DISMISS_TEAM*map unit identification ID |
TEAM_ORDER | Change Squad Directive
Function: change the current directive list of the squad. Format: TEAM_ORDER*map unit identification ID#new directive (for the detailed directive format, please see the Squad Preset Directive). |
INVASION_PLACE | Attack Location
Function: assign one location to attack another location. These two locations must belong to two opposite factions and have battle units inside. Format: INVASION_PLACE*attacker (location) ID#target location ID#attack method (set 0 by default). |
INVASION_CAMP | Attack Faction
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. 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; >0: bases that are close)#invasion intensity (0: Maintain strength; 1: All out (use all resources)). |
OPENSTORE | Open Trade Panel
Function: open the trade panel with a specific merchant. Format: OPENSTORE*merchant ID (execute an auto query based on the location and the current NPC if this ID is empty). |
RESET_STORE | Refresh Merchant’s Items
Function: refresh a merchant’s item based on the configuration. Format: RESET_STORE*merchant ID |
ADD_LOCAL_PRODUCT | Add Map Specialty
Function: add specialities to a specific map. Nearby merchants will refresh their speciality offerings after adding. Format: ADD_LOCAL_PRODUCT*specialty ID#map ID#central coordinate X#central coordinate Y. |
TRADE_PERMISSION | Set Trade Permission
Function: set trade permission for a location. Format: TRADE_PERMISSION*location ID*can trade or not (0: No; 1: Yes). |
TROOPS_ALLOC | Garrison Panel
Function: open the garrison panel of a location. Format: TROOPS_ALLOC*location ID (refer to the current location if the ID is empty). |
GETSKILL | Learn Skill
Function: add a new skill to a character. Format: GETSKILL*character ID#skill list (format of single skill: skillID, level(optional); use “|” to separate multiple skills). |
LEARN_SKILL | Consume Skill Point to Learn Skill
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. Format: LEARN_SKILL*skill ID#skill point needed (can be empty; set 1 by default). |
REMOVESKILL | Forget Skill
Function: remove a skill from a specific target. Format: REMOVESKILL*character ID#skill list (use “|” to separate multiple skills) |
RESET_SP | Reset Skill Point
Function: reset the skill points of a character. Format: RESET_SP*character ID |
ADD_UNUSEDSP | Change Available Skill Point
Function: add a new skill point to a player and allocate the skill point. Format: ADD_UNUSEDSP*number of skill point. |
SET_SKILLPAGE | Activate or Remove Player’s Skill Page
Function: activate or remove a skill page of the player. Format: SET_SKILLPAGE*skill page ID table (separate with “,”)#status (1: Activate; 0: Remove)#target character ID (optional; set to be player by default). |
SHOW_TEAMINFO | Show Info of Current Squad
Function: show the information on the current squad that you encounter. Format: SHOW_TEAMINFO*1. |
SET_FLAG | Set Complete Mark
Function: set a mark to indicate accomplishment, which is usually used at the critical turning point of the story. Format: SET_FLAG*name of the mark#mark value. |
UPDATE_MARKS | Mark Update
Function: update marks on the map. Format: UPDATE_MARKS*1. |
SET_DUMMY | Set Dummy or Creep Status
Function: set the status of dummies or creeps on the map. When taking control of creeps, the dummy ID is the creep ID. Format: SET_DUMMY*dummy ID#status (0: Displayed; -1: Hidden). |
SET_CAMERA | Set Camera Mode on Sandbox Map
Function: control the camera mode on the sandbox map. Format: SET_CAMERA*camera mode#parameter and meanings of the parameters: 0: follows the player’s character. No parameter (default). 1: follows a specific target. The parameter is the particular map unit identification ID. 2: focuses on a position. The parameter is the coordinate (map ID: X, Y)#camera movement speed. |
SET_PLACE_CAMP | Set Faction-exclusive Location
Function: change the faction of a location. Format: SET_PLACE_CAMP*target location ID#target faction ID#occupy by invasion (1: Yes; 0: No). |
SET_MAP_CAMP | Set Faction-exclusive Map
Function: change the faction of all cities on a map. Format: SET_MAP_CAMP*target map ID#from faction ID#to faction ID#occupy by invasion or not (1: Yes; 0: No). |
TRY_RECRUIT_FREE_ROLE | Try Neutral Hero Recruitment
Function: try to execute a neutral hero recruitment check (Return 1: successful; return 0: Internal error; return 2: squad full). Format: TRY_RECRUIT_FREE_ROLE*character ID. |
CHK_RECRUIT_CAPTIVE | [Unavailable] |
RELEASE_CAP | [Unavailable] |
SEND_ENVOY | Send Diplomatic Envoy
Function: send a diplomatic envoy for specific diplomatic missions. 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). |
DIP_DECIDE | Execute Diplomatic Event Check
Function: have a check on the current diplomatic event (used only in a specific trigger environment of the diplomatic event). Format: DIP_DECIDE*result code (1: Agreement; 0: Decline). |
EXPEL_ROLE | Expel Character
Function: expel a character out of a faction. Format: EXPEL_ROLE*faction ID#character ID. |
TRY_REWARD_ROLE | Try to Reward a Follower
Function: try to reward a follower. Format: TRY_REWARD_ROLE*character ID (refer to the current object if the ID is empty). |
ADD_GLOBAL_BUFF | BUFF Add Global Buff to Squad
Function: add a global buff to the current squad. 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). |
RM_GLOBAL_BUFF | BUFF Remove Global Buff of Squad
Function: remove a global buff of the current squad. Format: RM_GLOBAL_BUFF*buffID |
RM_GLOBAL_BUFF_BYCLASS | BUFF Remove Global Buff of Squad by Buff Type
Function: remove a global buff of the current squad by buff type. Format: RM_GLOBAL_BUFF_BYCLASS*Global BUFF type. |
RM_ALL_GLOBAL_BUFF | BUFF Remove All Global Buffs of Squad
Function: remove all global buffs of the current squad. Format: RM_ALL_GLOBAL_BUFF*1. |
PLAYER_FAILED | Game Failed
Function: a common result of the player failing their game. Format: PLAYER_FAILED*1. |
LOSE_INVENTORY | Player Loses Common Items
Function: the player loses their items once (only goods and money). Format: LOSE_INVENTORY*proportion(the proportion is an int, which stands for percentage). |
SET_TAGROLE | Change Object Character of Current Script
Function: set a default object character of the environment variable of the current script. Format: SET_TAGROLE*character ID. |
SET_TAGPLACE | Change Object Location of Current Script
Function: set a default object location of the environment variable of the current script. Format: SET_TAGPLACE*location ID. |
SURRENDER | Faction Surrenders
Function: assign one faction to surrender to another faction (all bases are occupied; the degree of royalty will randomly decide whether followers will surrender). Format: SURRENDER*ID of the faction who surrender#ID of the surrender accepter |
GEN_RND_PLACE | Select Random Location to Query
Function: generate a random location, which can be queried via the [%last_rnd_place_XX%] directives. Format: GEN_RND_PLACE*faction ID (if this ID is empty, then the location will belong to player’s faction) |
HERO_UPGRADE | Hero Enhancement
Function: enhance an attribute permanently of a specific character. Format: HERO_UPGRADE*hero ID#attribute ID#value increase#limit of increase (must fill in a number; -1 means that there is no limit). |
HERO_SET_STATU | Set Character Attribute Field
Function: set a value of an attribute field for a specific character. Format: HERO_SET_STATU*character ID#attribute ID#new value(refer to player when character ID is emptyID). |
ADD_CAMP_BUFF | BUFF Add Faction Buff
Function: add a faction buff to a specific faction. 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). |
RM_CAMP_BUFF | Remove Faction Buff
Function: remove a faction buff from a specific faction. Format: RM_CAMP_BUFF*faction ID#buff ID. |
RM_CAMP_BUFF_BYCLASS | Remove Faction Buff by Buff Type
Function: remove a faction buff from a specific faction by buff type. Format: RM_CAMP_BUFF_BYCLASS*factionID#faction BUFF type. |
RM_ALL_GLOBAL_BUFF | Remove All Faction Buffs
Function: remove all faction buffs from a specific faction. Format: RM_ALL_GLOBAL_BUFF*faction ID. |
ADD_CAMP_EXTRA_STATU | Add Faction Attribute Field Value
Function: add a dynamic attribute field to a faction. Format: ADD_CAMP_EXTRA_STATU*faction ID# dynamic attribute field list (see the format of initial faction attribute in the “阵营表”(excel file)). |
RESET_CAMP_EXTRA_STATU | Reset Faction Attribute Field Value
Function: reset all values in the dynamic attribute field in a faction. Format: RESET_CAMP_EXTRA_STATU*faction ID. |
WEAPON_DURABILITY_DOWN | Weapon Durability Decrease
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. Format: WEAPON_DURABILITY_DOWN*value. |
ITEM_DURABILITY_DOWN | Specific Item Durability Decrease
Function: reduce the durability of an item (with the right tag and meets the level condition(>= the required level) ) in the player’s bag by [value] points. If the item does not have sufficient durability, then it will be destroyed. Format: ITEM_DURABILITY_DOWN*weapon tag#weapon level filter#value. |
SET_SYNTH_STATE | Set Status of Recipe
Function: set the status of a specific recipe. Format: SET_SYNTH_STATE*recipe ID#new status (0: Not learned; 1: Learned) |
OPEN_SYNTH_DLG | Open Item Crafting Dialog
Function: open the dialogue UI of item crafting. 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). |
OPEN_CARD_SYNTH_DLG | Open Card Crafting Dialog
Function: open the dialogue UI of card crafting. Format: OPEN_CARD_SYNTH_DLG*1. |
PLAY_EFT | Play Special Effect
Function: play a special effect on the current map. 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). |
PLAY_MU_EFT | Unit Following Special Effect on Map
Function: play a special effect that follows a unit on a specific map. 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). |
OPEN_MAPAREA_SELECTOR | Open Map Area Selector Panel
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$]. Format: OPEN_MAPAREA_SELECTOR*area identification ID# shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info. |
OPEN_FREEAREA_SELECTOR | Open Free Map Area Selector Panel
Function: same as OPEN_MAPAREA_SELECTOR, but is no longer limited regarding provided map areas. Format: OPEN_FREEAREA_SELECTOR*width (int)#height(integet)#shown model#exclusion mode (0: Non-exclusive; 1: Custom chest excluded)#notice info. |
PLACE_SELECTOR | Open Location Selector Panel
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. Format: PLACE_SELECTOR*notice info#selection condition (transmitted to [%tagplace%] as a judgmental parameter). |
SET_LORD | Set City Ruler
Function: set a city ruler for a specific location. Format: SET_LORD*character ID#location ID. |
ADD_CUSTOM_CHEST | Add a Custom Chest
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). Format: ADD_CUSTOM_CHEST*chest ID#ID in the according 宝箱表(Chest Table)#position info#initial status (>0: How many times you can open the chest; -1: Chest Opened)#default direction (0-360). |
SET_CHEST | Set Chest Status
Function: set the status of a controllable chest on a map. Format: SET_CHEST*map ID#chest ID#status (>0: How many times you can open the chest; <=0: Chest Opened). |
SET_CURCHEST | Set Current Chest Status
Function: set the status of the target chest in the current script. Format: SET_CURCHEST*statu (same as SET_CHEST). |
CLOSE_SYSTEM_UI | Turn Off System UI
Function: turn of the current system UI. Format: CLOSE_SYSTEM_UI*. |
CLOSE_ITEM_PANEL | Close Bag UI
Function: close the current UI panel of the player’s bag (if it exists). Format: CLOSE_ITEM_PANEL*. |
ROLES_SELECTOR | Turn Off Character Selector UI
Function: turn off the current system UI of the character selector. Format: ROLES_SELECTOR*title of selection list box#number limit of options (<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). E.g., ROLES_SELECTOR*select character in the target faction #1#0#[$tagrole:campid$][=][$player:campid$]&[$tagrole:campid$][<>][$null$]# ROLES_SELECTOR*one of the several target objects #1#2##character 1|character 2|character 3|character 4. The result of selection is stored in [%last_seled_roles%]. If there is only one result, it will also be stored in [%tagrole%]. |
ASK_ABOUT_SOMEBODY_SELECTOR | Ask-about Character Selector
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. Format: ASK_ABOUT_SOMEBODY_SELECTOR#character you ask about. |
CARD_SELECTOR | Card Selector
Function: show the panel of current card list for the player to select. Format: CARD_SELECTOR*title of selection list box#number limit of selection (<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). |
ASSEMBLE_ARMY | Gather Troops
Function: gather all troops and followers of a faction. 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. |
RELEASE_ALL_ASSEMBLE_ARMY | Dismiss All Gathered Troops
Function: dismiss all troops that have been gathered or gathering. Format: RELEASE_ALL_ASSEMBLE_ARMY#gatherer ID. |
SET_ROLE_IN_PROJECT | Character Starts to Execute Project
Function: a character starts to execute a specific project. Format: SET_ROLE_IN_PROJECT*character ID#project ID. |
SET_ROLE_FINISH_PROJECT | Character Ends Current Project
Function: a specific character ends their current project compulsorily. Format: SET_ROLE_FINISH_PROJECT*character ID1, character ID2,... |
ROLE_PROJECT_ADMIN | Open Personal Project Panel
Function: open the personal project execution panel. Format: ROLE_PROJECT_ADMIN*project ID#location to bind (optional; set to be the current location by default). |
GROUP_PROJECT_ADMIN | Open Group Project Panel
Function: open the group project execution panel. Format: GROUP_PROJECT_ADMIN*project label#title#project binding type#project-bound object parameter (optional; set to be the current object by default). Currently, supported project binding types are: Place: location building construction; object parameter is the location ID; refer to the current location if the ID empty 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). |
SET_REVIVE_POS | Set Respawn Position
Function: set a new respawn position. Format: SET_REVIVE_POS*world map position (map ID:x,y). |
SET_SILENCE_MODE | Set Silence Mode
Function: enable or disable message silence mode. 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). |
START_RAID_PLACE | [Abolished] |
ADD_CUSTOM_PLACE | Add Custom Location
Function: add a custom location on a specific spot on the world map. 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. |
SET_PLACE_NAME | Change Location Name
Function: change the name of a specific location. Format: SET_PLACE_NAME*location ID#custom name. |
OPEN_PLACE_BUILD_UI | Open Location Building Construction Panel
Function: open the location building construction panel. Format: OPEN_PLACE_BUILD_UI*location ID#script executed after successful construction (optional)# script executed after construction is cancelled (optional). |
ADD_CARD | Add New Card
Function: add a premade card. Format: ADD_CARD*card ID#recruit for free (1: Free; 0: With a cost; set 0 by default). |
ADD_CARD_PIECE | Add Card with Specific Durability
Function: add a premade card, whose durability is a specific number (lower than the durability limit). Format: ADD_CARD_PIECE*card ID#maximum durability#recruit for free (1: Free; 0: With a cost; set 0 by default). |
SET_OBS_AREA | Set Obstacle Area Status
Function: set the status of an obstacle area on a map. Format: SET_OBS_AREA*control ID#status (0: Enabled; -1: Disabled). |
EXPLORE_AREA | Explore Area
Function: explore an area of the current map (dispel the war fog). Format: EXPLORE_AREA*X coordinare,Y coordinate#exploration radius |
EXPLORE_MAP | Explore the Whole Map
Function: explore the whole map (dispel the war fog of the entire map). Format: EXPLORE_MAP*map ID. |
ADD_INTVAL_WATCHER | Add Custom Variable Monitor Field
Function: add a custom variable monitor field to supervise the current value of the variable field on a specific area. Format: ADD_INTVAL_WATCHER*variable monitor info. (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). |
REMOVE_INTVAL_WATCHER | Remove Custom Variable Monitor Field
Function: remove a specific custom variable monitor filed. Format: REMOVE_INTVAL_WATCHER*field KEY. |
CLEAR_ALL_INTVAL_WATCHERS | All Variable Monitor Field
Function: exact all variable monitor fields. Format: CLEAR_ALL_INTVAL_WATCHERS*. |
SET_TIMER | Set Event Timer
Function: set an event timer, and a specific event will be executed when the timer ends. Format: SET_TIMER*timerID (when the ID has been taken, the other timer info will be covered)#time parameter (<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). |
REMOVE_TIMER | Remove Event Timer
Function: remove an event timer. Format: REMOVE_TIMER*timer ID. |
CHANGE_TIMER_TIME | Change Event Timer
Function: increase/decrease the time of a timer. Format: CHANGE_TIMER_TIME*timer ID#time (count by day; can be a negative or decimal number. |
ADD_TIMER_WATCHER | Add Monitor Field of Custom Event Timer
Function: add a monitor filed of a custom event timer (same as custom variable monitor UI). Format: ADD_TIMER_WATCHER*timer monitor info (format: timer ID1,displayed time format1,scale parameter1([optional;set 1 by default] 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. |
REMOVE_TIMER_WATCHER | Remove Monitor Field of Custom Event Timer
Function: remove the monitor field of a custom event timer. Format: REMOVE_TIMER_WATCHER*field KEY. |
CLEAR_ALL_TIMER_WATCHERS | Clear All Monitor Fields of Custom Event Timer
Function: clear all monitor fields of custom event timer. Format: CLEAR_ALL_TIMER_WATCHERS*. |
PLAYER_RECRUIT_CARD_IN_PLACE | Open City Recruitment Panel
Function: open the player’s recruitment panel in a city. 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). |
STORY_CARD_START
STORY_CARD_LINE STORY_CARD_END |
Open Story Card (2D Image) Panel
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). Format: STORY_CARD_START*file name of the card. STORY_CARD_LINE*story paragraph 1. STORY_CARD_LINE*story paragraph 2. STORY_CARD_LINE*story paragraph 3. ... STORY_CARD_END*. |
AUTOSAVE | AutoSave
Function: execute autosave immediately. Format: AUTOSAVE*1. |
OPEN_SAVE_DLG | Open Game Saving Dialog
Function: open the game-saving dialogue. Format: OPEN_SAVE_DLG*1. |
OPEN_SAVE_DLG | Open Game Loading Dialog
Function: open the game loading dialogue. Format: OPEN_LOAD_DLG*1. |
EXCHANGE_CARD | Open Card Exchange Panel
Function: open the card exchange panel. 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). |
LEVEL_FINISH | Complete Level
Function: used in scenarios to indicate the accomplishment of a level. Format: LEVEL_FINISH*. |
SET_CAMERA_FILTER | Set Camera Filter
Function: set a filter for the camera. Format: SET_CAMERA_FILTER*filter parameter (no filter is used if the field is empty; for parameter details, please see Section 6.10). Test code: SET_CAMERA_FILTER*black-and-white,0|classic,100|vignetting,100. |
TLACTION | Timeline Action
Function: specific units on the world map do TIMELINE actions. Format: TLACTION*map character ID#file name of Timeline action#lasting time of action. |
SELECTION_VIEW | Fullscreen Special Story Selection
Function: open a fullscreen selection panel of a special story. Format: SELECTION_VIEW*file name of the scenario image#story content (can use “\n” to break a line)# selection option (please refer to SELECT*). |
DIALOG_BUBBLE | Map Unit Chat Bubble
Function: a chat bubble pops up above a unit on the world map. Format: DIALOG_BUBBLE*map character ID#dialogue content#time of displaying. |
TEXT_EXPLORE_START
TEXT_EXPLORE_OVER TEXT_EXPLORE_FORCE_OVER_AND_CD |
Text Adventure Relevant
Function: a specific text adventure mode. Format: TEXT_EXPLORE_START*map ID for text exploration. Start a text adventure. TEXT_EXPLORE_OVER*. Ends the current instance. TEXT_EXPLORE_FORCE_OVER_AND_CD*. Ends the current instance by force and the instance starts cooling down. |
SHOW_CG | Show CG Image
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). 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). |
HIDE_CG | Hide CG Image
Function: hide the CG interface. Format: HIDE_CG*. |
GENERATE_RANDOM_CARD | Select a Card Randomly
Function: select a card randomly, which will be stored in the tag card of the current variable. Format: GENERATE_RANDOM_CARD#1. |
VOICE_OVER | Voice Over
Function: show a voice-over interface. Format: VOICE_OVER*voice over the content. |
CREATE_STORYARMY | Create a Story Squad
Function: create a squad only for stories. 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). |
REMOVE_STORYARMY | Remove Story Squad
Function: remove a story squad. Format: REMOVE_STORYARMY*tagkey. |
BAZZAR_BUY_ITEM | Bazaar Merchant Buy-in
Function: bazaar merchants buy items. Format: BAZZAR_BUY_ITEM*bazaar ID#merchant ID#”交换用物品”(ID) of the bazaar (optional)# “交换用物品”(ID) of the merchant (optional). |
BAZZAR_SELL_ITEM | Bazaar Merchant Sell-out
Function: bazaar merchants sell items. Format: BAZZAR_SELL_ITEM*bazaar ID#merchant ID. |
SHOWROLE | Show Character Painting
Function: show character paintings in dialogues. Format: SHOWROLE*character 1 ID@position of character 1 painting (#character 2 ID@position of character 2 painting) (optional) *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. *painting position |
HIDEROLE | 对话隐藏角色立绘
用途:对话时隐藏角色立绘 格式:HIDEROLE*角色1立绘显示位置(#角色2立绘显示位置)(可选) *立绘显示位置:可以是L或者R,L为隐藏左侧立绘,R为隐藏右侧立绘 |
SELECT_QUEST_ASK | 任务询问
用途:在普通的SELECT基础上添加满足条件的任务询问 格式:SELECT_QUEST_ASK* |
SELECT_TEAMROLE | 队伍角色选择
用途:选择队伍里的人物角色 格式:SELECT_TEAMROLE* |
ROLE_PLAYER_ACTIVE | 激活角色信息状态
用途:设置角色在“情报”界面中可见,传入角色ID(此方法一般用于剧情中,如酒吧女郎) 格式:ROLE_PLAYER_ACTIVE*角色ID |
ROLE_ORDER | 内置角色指令
用途:为一个角色下达一些内置指令并立即执行 格式:ROLE_ORDER*角色ID[为空表示当前目标角色]#指令代码:指令参数表
|
ADD_INTERACTIVE_MSG | 添加可交互消息
用途:添加一条自定义的可交互消息,并在对应的UI中显示 格式:ADD_INTERACTIVE_MSG*消息类型#标题#内容文本#参数文本#持续时间(<=0为永久持续,否则为天数)#发起者信息#TAG参数
当消息类型为非财务消息时,参数文本的格式为: 参数Key1:参数值1;参数Key2:参数值2;...;参数Key N:参数值 N 目前系统内置的参数KEY类型有:
例如:ask:是=Event1:否=Event2
账单字段1=账单明细表(格式为: 资源1,数目1|资源2,数目2|...|资源N,数目N);账单字段2=账单明细表;[...];账单字段N=账单明细表 发起者信息的格式为: 发起者类型代码:发起者ID 目前支持的发起者类型有:
|
REMOVE_INTERACTIVE_MSG | 移除可交互消息
用途:移除指定条件的可交互消息 格式:REMOVE_INTERACTIVE_MSG*消息类型#发起者信息#TAG参数
发起者信息格式见 ADD_INTERACTIVE_MSG |
REMOVE_THIS_INTERACTIVE_MSG | 移除当前可交互消息
用途:移除当前环境变量中的可交互消息 格式:REMOVE_THIS_INTERACTIVE_MSG*1 |
以下指令适用于游戏版本≥0.7.1.3 | |
FORCE_CHANGE_HEADAVATA | 强制更换主角立绘
用途:改变主角立绘 格式:FORCE_CHANGE_HEADAVATA*立绘代码 |
FORCE_CHANGE_MODEL | 强制更换主角模型
用途:改变主角模型 格式:FORCE_CHANGE_MODEL*模型ID |
以下指令适用于游戏版本≥0.7.2.1 | |
SHOW_INTVAR_CONFIG | 显示游戏中可配置的自定义整形字段选项界面
用途:打开一个游戏内自定义字段配置界面 格式:SHOW_INTVAR_CONFIG*开启模式(0:创建游戏模式 1:游戏中模式) |
SET_MAP_MARKER | 增加或设置自定义地图标记
用途:在大地图上增加或者设置一个自定义的地图标记,当标记ID已存在时为覆盖此地图标记信息 格式:SET_MAP_MARKER*标记ID#标题#备注信息#地图位置信息#标记图标文件名(可为空,默认为"map_flag",此图标为位于“\BuildSource\map_res\MinimapMakers\” 资源目录下的一个PNG图片资源) |
REMOVE_MAP_MARKER | 移除一个自定义地图标记
用途:移除指定ID的自定义地图标记(如果存在的话) 格式:REMOVE_MAP_MARKER*标记ID |
以下指令适用于游戏版本≥0.7.3.1 | |
| |
RUN_SCRIPT_FUNC | 运行指定Lua脚本中的方法
用途:运行指定的Lua脚本中的标准方法 格式:RUN_SCRIPT_FUNC*脚本相对路径文件名(同RUN_SCRIPT)#标准方法名称(脚本中的方法名,参数为传入的环境变量) |
OPEN_GUI | 打开自定义GUI
用途:打开一个自定义的GUI窗口 格式:OPEN_GUI*GUI包名#窗体组件名#窗体的脚本文件路径(相对于脚本根目录“Asset\BuildSource\LuaScripts\” ,无文件扩展名)#窗体参数(参数格式为json格式,如:{"arg1":"val1","arg2":"val2"})#是否不阻塞指令队列(默认0 阻塞, 当为1时不阻塞) |
OPEN_CONTAINER_GUI | 打开容器界面
用途:打开一个已定义的容器界面 格式:OPEN_CONTAINER_GUI*容器ID(实例ID用于标识)#模板信息ID(定义在容器定义表中的信息ID) 当参数表为空或者为"THIS"时,表示直接打开当前环境变量中指定的容器(如果有传入的话),如:OPEN_CONTAINER_GUI*THIS |
CONTAINER_CMD | 容器指令
用途:为当前环境变量中指定的容器执行特定指令 格式:CONTAINER_CMD*容器指令类型#参数1#参数2#...#参数N 目前支持的集中内置指令类型: add_exp:对容器内所有卡牌增加经验,参数为经验数字 add_items:向容器内添加指定的元素。(如:物品类容器可为 CONTAINER_CMD*add_items#道具1,10|道具2,5 ;卡牌类容器为卡牌的ID表,以"|"分隔) |
PLACE_CONTAINER_CMD | 地点容器指令
用途:将地点视为容器对象,执行和容器相同的特定指令 格式:PLACE_CONTAINER_CMD*地点ID(为空或者THIS表示当前环境变量所指定的地点)#容器指令列表(同CONTAINER_CMD参数说明) |
SET_MAP | 设置地图的状态
用途:设置指定地图的可见状态 格式:SET_MAP*地图ID#状态值(0:正常 1:关闭) |
RESET_LUAENV | 重置当前LUA脚本运行环境
用途:重置当前LUA脚本运行环境并清除缓存,可用于调试LUA脚本时避免重新启动游戏 格式:RESET_LUAENV*1 |
以下指令适用于游戏版本≥0.7.4.1 | |
SET_ARG_INT | 设置当前环境变量中的参数值
用途:设置存储在当前运行脚本环境变量中的整型参数值(对应 [%arg_int_val1%] [%arg_int_val2%] [%arg_int_val3%]) 格式:SET_ARG_INT*设置新的值#目标参数索引(可选,默认为0。0,1,2分别对应[%arg_int_val1%] ~ [%arg_int_val3%]) |
全局存档相关的操作指令
全局存档是用来记录一些所有存档共享的数据记录的存档。记录在全局存档中的数据更改后可以在所有不同的存档中进行访问。
指令 | 说明 |
---|---|
SET_GLOBAL_INTVAR | 设置全局存档自定义整形变量
用途:设置一个全局存档中的自定义整形变量。记录在全局存档中的自定义整形变量可以通过查询指令[%global_int:ID%]来进行查询访问。 格式:SET_GLOBAL_INTVAR*变量ID#当前int值 |
CHANGE_GLOBAL_INTVAR | 修改全局存档自定义整形变量
用途:修改一个全局存档中的自定义整形变量。 格式:CHANGE_GLOBAL_INTVAR*变量ID#改变值(正负数皆可)#锁定最小值(可选,不填为不限制)#锁定最大值(可选,不填为不限制) |
SET_GLOBAL_STRVAR | 设置全局存档自定义字符串变量
用途:设置自定义字符串变量。记录在全局存档中的自定义字符串变量可以通过查询指令[$global_str:ID$]来进行查询访问。 格式:SET_GLOBAL_STRVAR*变量ID#string值 |
PUSH_GLOBAL_ROLES | 存入角色状态至全局存档
用途:将指定的角色表存入全局角色状态表中 格式:PUSH_GLOBAL_ROLES*自定义全局存储Key#角色ID(该角色只能为非模板角色) |
PULL_GLOBAL_ROLES | 从全局存档取回角色状态
用途:将指定的角色表的状态从全局角色状态表读入到当前游戏模式中 格式:PULL_GLOBAL_ROLES*自定义全局存储Key(该Key值对应的角色必须为当前游戏模式人物模板表中存在的角色) |
LOCK_CMD_QUEUE | 锁定当前指令队列
用途:锁定当前的指令队列,当锁定后切换游戏存档或者重置游戏模式时不会清空执行的指令队列 格式:LOCK_CMD_QUEUE*是否锁定(0否1是) |
SWITCH_GAME_MODE | 切换游戏模式
用途:切换并载入到目标游戏模式 格式:SWITCH_GAME_MODE*目标游戏模式的ID |
内置指令列表
内置指令是指一些专门用于程序内部实现某些特定功能的指令。一般专门供一些特定脚本使用。
指令 | 说明 |
---|---|
ENCOUNTER | 遭遇野怪UI
用途:打开遭遇野怪信息面板 格式:ENCOUNTER*1 |
CHEST_INFO_DLG | 宝箱守卫信息UI
用途:打开宝箱守卫信息面板 格式:CHEST_INFO_DLG*宝箱ID |
CHEST_COST_DLG | 宝箱开启代价信息UI
用途:打开宝箱开启代价信息面板 格式:CHEST_COST_DLG*宝箱ID |
CHEST_CALLBACK | 宝箱开启逻辑回调
用途:开启宝箱逻辑回调命令 格式:CHEST_CALLBACK*回调代码(1:击败守卫 2:完成开启)#目标宝箱ID |
EXEC_RECRUIT_CAPS | 执行招募队伍中的俘虏判定
用途:执行招募队伍中的俘虏判定 格式:EXEC_RECRUIT_CAPS* |
脚本预设字段及含义
在脚本编辑中有时会使用一些特定的指令来替代具体的对象,比如CUR_ROLE可以用来替代当前遭遇对象的人物ID,这样就可以实现一些通用脚本编辑的应用场景。
目前支持的预设字段有:
- CUR_ROLE:当前遭遇人物模板的ID,专门用与对话框及选择框
- CUR_BATTLE:当前遭遇的大地图刷新单位对应的战斗ID
剧情事件中的结果脚本指令格式
剧情事件中结果脚本指令的格式为(以换行符分割):
条件表达式组1:执行命令1 条件表达式组2:执行命令2 ... 条件表达式组N:执行命令N
执行方式为:先判定条件表达式组1,如果成立则执行命令1,否则接着判定条件表达式组2……直到有任意一组成立,或者所有条件均不成立
条件表达式组格式
条件表达式组由多个形如" [%CONDITION%][=]1"这样的条件表达式组成,以符号"|"(或) 或 符号”&”(与)进行连接,”&”(与)的优先级大于"|"(或)的优先级,当条件表达式左右值均为整数字符时,将返回其数值大小的比较结果,否则只能执行字符串比较且仅支持[=]和[<>]两种判定。
例如:
[%result_code%][=]1|[%player_money%][>=]100 表示当结果为1或玩家身上有100金钱时执行 而[%player:level%][>=]3&[%player_money%][>]100 表示玩家等级大于等于3并且身上的金钱大于100时执行
以下为条件表达式中支持的比较符号
- [=]:等于
- [>]:大于
- [>=]:大于等于
- [<]:小于
- [<=]:小于等于
- [<>]:不等于
游戏数据中运算值表达式系统说明
在游戏中很多地方可以以“[&expression&]”的格式嵌入一些数值公式进去(如BUFF列表的状态值等)
数值公式中支持一些基本数学运算,目前支持的运算符号如下:
- +:加法运算
- -:减法运算
- *:乘法运算
- /:除法运算
- %:模运算(取余)
- ^:幂运算
- ( ):改变运算优先级
此外,当数值公式以 @func(expression1,expression2...) 的格式出现时,则调用相关的内置函数返回计算结果。目前支持的内置函数如下(注意:当前此等内置函数只能用于最外层的计算)
- @min(a,b):返回a与b中较小的一个值
- @max(a,b):返回a与b中较大的一个值
比如某段数据中[&1+2*3&]将会被替换为7,[&@max(1+2*3, 8)&]将会被替换为8,[&@min(1+2*3, 8)&]将会被替换为7……
注意:在战斗中使用的脚本及技能指令中,可以使用“[@expression@]”的格式嵌入一些返回结果为小数的计算公式。
剧情事件中可用的嵌入式查询指令
目前游戏中很多地方都支持插入嵌入式查询指令,通过这些查询指令,可以很方便的在一些文本或者条件表达式中插入我们想要的数值或者字符串类型的查询结果。所有嵌入式查询指令都是以[%QUERY:arg1:arg2...%]或者[$QUERY:arg1:arg2...$]这样的格式(两者等效)插入到目标位置的。
注意:目前暂不支持查询中再次嵌入查询指令!
目前支持的查询指令列表如下:
查询指令 | 说明 |
---|---|
[%result_code%] | 返回当前事件中最后一个有返回结果的命令结果值(比如在剧情事件脚本中代表返回的选择框选项、输入的数值、战斗的结果等)
以下为result_code在不同类型命令下返回的含义
|
[%rnd_num%] | 返回一个0-100的整数 |
[%rnd_range:A:B%] | 返回一个大于等于A,小于等于B的随机数 |
[%last_rnd%] | 返回上次产生的随机数 |
[%player_money%] | 玩家身上的金钱数 |
[%player_wood%] | 玩家拥有的木材数 |
[%player_iron%] | 玩家拥有的铁矿石数 |
[%player_jade%] | 玩家拥有的玉石数 |
[%player_food%] | 玩家当前的饱食度 |
[%game_time%] | 当前游戏中的天数 |
[%is_gametime_night%] | 判断当前是否是晚上,如果是,返回1,否则为0 |
[%is_gametime_daytime%] | 判断当前是否是白天,如果是,返回1,否则为0 |
[%mod_day:MOD%] | 当前游戏的天数对MOD取余的值 |
[%generate_rob_money%] | 生成当前等级遭抢劫时索取的金额 |
[%rob_money%] | 获取上次生成的抢劫索取金额 |
[%get_ts:ID%] | 返回一个触发器当前的状态值 0正常 1关闭 |
[%get_es:ID%] | 返回一个剧情事件当前的状态 -1:未执行 其他:返回Result Code |
[%get_es_first_time:ID%] | 返回一个剧情事件的首次完成时间 |
[%get_es_time_score:ID:minTime:maxTime:maxScore%] | 返回一个剧情事件的首次完成时间得分,minTime是设定的最短完成时间(在此时间前完成均为满分),maxTime是设定的最长完成时间(之后完成均为零分),maxScore为最高得分。 |
[%int_val:ID%] | 返回编号为ID的自定义int值 |
[%int_val_for_calc:ID%] | 返回编号为ID的自定义int值用于计算,必定存在计算值,如果ID不存在则值为0 |
[%str_val:ID%] | 返回编号为ID的自定义string值 |
[%team_num%] | 当前队伍当前数量 |
[%team_max%] | 当前队伍最大数量 |
[%unit_name:兵种key%] | 返回某种兵的名称 |
[%item_number:物品key%] | 返回背包中某种物品的数目 |
[%item_with_tag:tag%] | 返回背包中具有某种tag的物品数目 |
[%item_with_tag_and_level:tag:level%] | 返回背包中具有某种tag、且物品等级>=level的物品数目 |
[%item_qualify_as_present:present_desc%] | 返回背包中满足某种礼物描述字符串要求的道具数目。礼物描述字符串的格式参见人物列表excel中的Tag一列中的“Like”这个Tag的格式写法。 |
[%item_name:物品ID%] | 返回物品的显示名称 |
[%admin_level%] | 返回玩家在当地的管理权限 0:无 1:任职 2:城主 3:阵营领袖 |
[%gametime_elapse:ID%] | 返回距上次设置的自定义游戏时间点ID过去的游戏时间(整数天数,算法是:(当前时间-ID时间)后取整。 |
[%gametime_elapse_by_day:ID%] | 返回距上次设置的自定义游戏时间点ID过去的游戏时间(整数天数,算法是:(当前所在的天-ID所在的天)。一般用于一天内只能触发一次的事件。 |
[%tag_gametime_elapse%] | 返回预先设置的动态tag的gametime_elapse,如果没有预先设置的动态tag,或者没有该ID,则返回-1。算法是:(当前时间-ID时间)后取整 |
[%tag_gametime_elapse_by_day%] | 返回预先设置的动态tag的gametime_elapse,如果没有预先设置的动态tag,或者没有该ID,则返回-1。算法是:(当前所在的天-ID所在的天),通常用于一天内只能触发一次的事件判断。 |
[%is_custom_cd:ID%] | 返回编号为ID的自定义CD时间是否已就绪(1:是 0:否) |
[%has_gametime_elapse_tag:ID%] | 查询上述的自定义游戏时间点ID是否存在(存在1,不存在0) |
[%realtime_elapse:ID%] | 返回距上次设置的自定义现实时间点ID过去的现实时间(秒) |
[%qs:ID%] | 返回指定任务ID的状态值0:未领取 1:进行中 2:已完成 3:已终结 |
[%qs:ID:index%] | 返回指定任务ID的子项值,index为从0开始的子项序号 |
[%get_flag:ID%] | 返回一个完成标记的当前值,没有值则返回-1 |
[%camp_rep:ID%] | 返回主角对目标阵营ID的声望值 |
[%is_player_triggered_encounter%] | 一个遭遇对话是否是由玩家主动点击的,0否,1是。(如果玩家是被其他人追上的情况下触发对话,则此值为0) |
[%place_rep:ID%] | 返回主角对目标地点的声望值 |
[%arg_int_val1%]
[%arg_int_val2%] [%arg_int_val3%] |
当前事件数值参数1、2、3 |
[%g_buffs%] | 返回当前队伍全局BUFF的个数 |
[%last_battle_res%] | 上一次战斗的战斗结果 0:胜利 1:失败 2:撤退 |
[%last_dungeon_res%] | 上一次地城的结果 0:退出 1:通过 2:失败 |
[%g_buff:ID%] | 查询当前队伍是否存在目标ID的全局BUFF,存在返回1 |
[%g_buff_c:CLASS%] | 查询当前队伍当前类型为CLASS的全局BUFF的个数 |
[%g_stat:STAT_FILED%] | 返回当前队伍状态中字段为STAT_FILED的当前值 |
[%has_KeyValues:ID%] | 直接对存储中的KV进行查询,存在相应KV为1,不存在为0 |
[%get_KeyValues:ID%] | 直接对存储中的KV进行查询,存在相应KV返回相应值,不存在为空 |
[%rnd_place_id:CAMP_ID%]: | 返回一个由一个势力控制的随机地点id,如果没有camp_id则返回主角势力控制的随机地点id |
[%last_rnd_place_id%] | 返回上一个生成的随机地点id |
[%last_rnd_place_name%] | 返回上一个生成的随机地点的名称 |
[%last_rnd_place_map_name%] | 返回上一个生成的随机地点的所在地图名称 |
[%last_rnd_place_products%] | 返回当前地点的每周期产出列表,符合GETITEMS的物品格式 |
[%last_rnd_place_products_name%] | 返回当前地点的每周期产出描述 |
[%last_rnd_place_has_products%] | 当前地点每周期是否有产出,1为有产出,0无 |
[%last_seled_items%] | 返回上一次物品选择框命令(ITEMS_SELECTOR)选择的物品列表 |
[%last_seled_roles%] | 返回上一次人物选择框命令(ROLES_SELECTOR)选择的人物列表(注意,此方法不能用在条件表达式组中,因为当多个人物被选中后,其返回值中包含冲突的连接字符"|",可使用[%last_seled_roles_count%]来替代判断) |
[%last_seled_roles_count%] | 返回上一次人物选择框命令(ROLES_SELECTOR)选择的人物列表的数量 |
[%weather:ID%] | 查询当前地图中指定ID的天气效果的当前值 |
[%monster_news:X:Y%] | 查询当前地图中坐标为(X,Y)附近的野怪信息,X/Y不填则为主角当前队伍所在位置信息 |
[%attack_intend_code%] | 查询当前相遇的地图单位对玩家的攻击意图,详情见MuUnitBase.IntendToAttack |
[%place_randmom_pos%] | 查询一个地点所在位置附近的随机位置,输出特定的字符串如:沙盒红石城:123,123 |
[%tag_role_with_role_relation%] | 输入参数和tagrole或place的关系 |
[%tag_role_with_city_relation%] | tagrole和输入的role的关系 |
[%result_val%] | 当前环境变量中的curResultVal值 |
[$player:INFO$]
[$tagrole:INFO:ID$] |
查询指定角色 (主角 player / 指定角色 tagrole) 的指定信息字段。当tagrole时,ID字段不存在时则返回当前交互对象的查询结果
INFO可为如下内容:
|
[$called:call1:call2$] | NPC对玩家的称呼(当为男性时返回call1,当为女性时返回call2) |
[$null$] | 替换为空字符串 |
[$trig_tagtype$] | 当前执行事件的触发对象类型 |
[$trig_tagid$] | 当前执行事件的触发对象ID |
[$input_str$] | 前一个输入框的输入结果 |
[$argvs:INDEX$] | 查询当前附加的参数信息,编号从0开始。(当前用于随机事件的参数填充) |
[$tagplace:INFO:ID$] | 查询一个地点的信息,当地点ID字段不存在时为查询当前地点
INFO可为如下内容:
|
[$tagmap:INFO:ID$] | 查询一个地图区块的信息:
|
[$tagbuilding:INFO$] | 查询当前目标建筑信息
|
[$tagwb:INFO$] | 查询当前遭遇战斗的信息INFO可为如下内容
|
[$tagteam:INFO(:QUERY_INFO)$]
[$playerteam:INFO$] |
查询当前遭遇队伍(tagteam)/主角队伍(playerteam)的信息。
当查询为tagteam时,可以选择指定队伍查询参数,当指定队伍查询参数指定时,只返回查询目标的信息 INFO可为如下内容
当前支持的查询类型有:
|
[$tagcamp:INFO:ID$] | 查询目标阵营信息,当ID不存在时为查询当前阵营。INFO可为如下内容
|
[$tagbazzar:INFO$] | 查询当前系统传入的集市的信息
|
[$tagbazzarItem:INFO:bazzarID:merchantID$] | 查询某个集市的某个商人在当前时候买/卖的货物信息
|
[$tagproduct:INFO:ID$] | 查询某种特产的信息,ID不填时查询当前传入的特产信息
|
[$tagTextExplore:INFO:ID:copyID$] | 查询某个文字探索地图的信息,copyID是因为探索地图可能存在多份副本,可以不填(基本上只有系统传入参数才会填这个copyID)。不填就是地图上可见的那种探索地图。
|
[$tagquest:INFO:ID$] | 查询任务信息
status:0:未领取 1:进行中 2:已完成 3:已超时(等待超时惩罚) 4:已超时(等待自动领取奖励) 5:已终结 |
[$arg_str_val1$]
[$arg_str_val2$] [$arg_str_val3$] |
当前事件字符串参数1、2、3 |
[$rnd_enum:PROB_A,RES_A:PROB_B,RES_B:PROB_C,RES_C[:...]$] | 随机枚举值,根据所有项的概率分布返回其中一个项的RES值。比如[%rnd_enum:25,A:40,B:35,C%]表示有25%的概率返回”A”,40%的概率返回”B”,35%的概率返回”C” |
[$tagitem:INFO$] | 查询当前物品的信息,INFO可为以下内容
|
[$tagproject:INFO:ID$] | 查询一个项目的信息,如果不填ID将从SET_TEMP_ID指定的id中读取。
|
[$tagunit:INFO$] | 查询当前查询目标小兵单位的信息
|
[$tagcard:INFO$] | 查询指定卡牌的信息
|
[$save_version$] | 返回当前游戏存档创建时的版本号 |
[$version_compare:TAG_VERSION$] | 用当前游戏存档创建时的版本号与TAG_VERSION进行比较,如果大于TAG_VERSION返回1,等于TAG_VERSION返回0,小于TAG_VERSION返回-1 |
[$tagmsg:INFO$] | 查询当前可交互消息的信息
|
以下查询需要游戏版本高于0.7.4.1 | |
[$lua_str:KEY$] | 返回定义在游戏核心逻辑脚本中的 GetLuaStringVal 接口的值 KEY为查询参数 |
[$lua_int:KEY$] | 返回定义在游戏核心逻辑脚本中的 GetLuaIntVal接口的值 KEY为查询参数 |
[%envoy_enable%] | 返回当前玩家自己的势力中的外交信使是否可用 |
全局存档查询指令字段
用来查询全局存档中的一些指令
查询指令 | 说明 |
---|---|
[%global_int:ID%] | 返回全局整形字段ID的值 |
[$global_str:ID$] | 返回全局字符串字段ID的值 |
内置全局变量字段
以下是内置的全局变量关键字段:
字段KEY值 | 说明 |
---|---|
save_max_hard_level | 已经解锁过的最高难度,默认为0 |
内置自定义变量字段
可使用SETINTVAR、CHANGEINTVAR等指令进行修改并保存的系统内置自定义变量。一般都具有特定的功能。
字段KEY值 | 说明 |
---|---|
system_探索地图点数 | 探索地图点数 |
system_星星 | 星星数目 |
system_敌方角色血量百分比 | 当玩家与敌方角色对战时,对方血量的额外附加倍率 |
system_敌方角色攻击百分比 | 当玩家与敌方角色对战时,对方攻击力、魔法攻击力的额外附加倍率 |
config_ai_level | 当前AI强度等级 0:简单 1:普通 2:困难 |
config_roll_limit | 是否开启战斗中翻滚限制 0:关闭 1:开启 (开启饥翻滚限制在战斗中进行翻滚时将会有CD时间及次数限制) |
config_hunger_penalty | 是否开启饥饿惩罚 0:关闭 1:开启 (开启饥饿惩罚会在饥饿状态时影响队伍的移动速度) |
config_upgrade_cost_reduce | 当前升级单位花费的经验及所需材料折扣率(百分比 0~100,默认为0) |
config_soldier_dead_scale | 当前小兵阵亡概率倍率(百分比,默认100,最终阵亡概率=基础阵亡概率*(config_soldier_dead_scale/100)) |
以下设置需要游戏版本高于0.7.3.1 | |
config_project_concurrent | 当前地点项目建设最大同时进行的基数 |
初始设定表内置字段说明
游戏初始设定表中,可以配置一些具有实际功能的初始字段值。
字段KEY值 | 说明 | 默认值 |
---|---|---|
init_pos | 默认出生点位置信息 | |
init_statu | 玩家出生时默认的属性状态信息 | |
init_money | 默认的初始财产 | 0 |
home_place | 默认的初始地点ID | |
init_skillpages | 初始点亮的技能页,格式见 SET_SKILLPAGE 指令说明 | |
init_skills | 主角初始拥有的技能表,格式同 GETSKILL 指令 | |
init_equip | 主角初始的装备表信息 | |
init_camp_rl | 初始阵营关系表,格式为:
阵营A,阵营B,关系状态,友好度(-100~100)|阵营A,阵营C,关系状态,友好度(-100~100)|...|阵营N,阵营N,关系状态,友好度(-100~100) |
|
unchanged_diplomatic_relationship | 是否游戏过程中不可动态改变势力间的外交关系 (0否 1是) | 0 |
gametime_scale | 当玩家位于大地图上时,游戏时间进行的缩放系数(游戏天/秒) | 0.01 |
battletime_scale | 当玩家位于大地图上时,游戏时间进行的缩放系数(游戏天/秒) 当此值为0时,遭遇战或攻城战中游戏时间会静止 | 0.005 |
no_card_auto_supply | 不可卡牌补给耐久度 | 0 |
drop_card_when_no_durability | 在此模式下卡牌耐久为0时会消失 | 0 |
enable_card_upgrade | 允许卡牌进阶 | 0 |
equipment_loss_durability | 装备具有耐久度损耗 | 0 |
levelup_exp_scale | 升级经验倍率 | 1.0 |
seige_time | 基础攻城的准备时间(天) 围城时间 = 基础时间 + 武装度 * 每点武装度提供的准备时间加成(siege_time_per_armvalue字段) | 0 |
siege_time_per_armvalue | 每点武装度提供的准备时间加成 | 0 |
project_time_scale | 项目所需时间比例,小于1即为缩短时间,大于1延长时间 | 0.99 |
dailyIncomeScale | 每天城镇资源收入的倍率 | 1.0 |
recruit_cost_scale | 招募/补给/进阶/开宝箱的成本倍率 | 1.0 |
building_cost_scale | 建造建筑/其他项目的成本倍率 | 1.0 |
custom_intval_watcher | 默认监视自定义变量字段 同 ADD_INTVAL_WATCHER 指令 | |
show_star_info | 显示声望(星星) | 0 |
ai_soldier_add_exp_per_period | 每天AI士兵增加经验基数 | 0 |
team_role_count_base | 每个队伍基础携带角色数量 | 3 |
team_role_max | 部队最多携带角色数 | 5 |
team_card_count_base | 每个队伍基础携带部队数量 | 6 |
team_card_max | 部队最多携带卡牌数 | 40 |
ai_recruit_resource_scale | AI招募的资源倍率 | 1.0 |
ai_build_resource_scale | AI建造的资源倍率 | 1.0 |
ai_upgrade_resource_scale | AI升级兵种的资源倍率 | 1.0 |
ai_highlevel_upgrade_average_days | AI模拟高等级升级兵时的检测周期期望(天数)
此数值越高,AI升级兵种越慢。 |
20 |
ai_auto_balance_resource | AI是否会自动平衡各项资源 | 0 |
ai_invade_prob | AI的进攻偏好系数,范围0~1 ,越接近1概率越高 | 0.8 |
invasion_destroy_factor | 侵略占领建筑物损毁概率。格式为:
摧毁个数1:概率1 摧毁个数2:概率2 ... 摧毁个数N:概率N 例如: 1:50 2:30 3:10 4:5 |
|
monster_move_speed_random | 野怪发射器野怪随机移动速度随机修正范围,最多0.75 | 0 |
soldier_battle_killed_prob | 士兵的基础战损,每个士兵在战斗结束时如果战败,有多少概率重伤 | 0.2 |
ai_soldier_battle_killed_prob | AI部队战败后阵亡概率 | 1 |
ai_recruit_hero_free | AI免费招募英雄 | 0 |
army_base_move_speed | 军队基础移动速度 | 240 |
monster_min_movespeed | 野怪最小的移动速度 | 150 |
caravan_move_speed_range | 商队移动速度范围 格式为: 最小速度,最大速度 | 100,100 |
farmers_move_speed_range | 农民移动速度范围 格式为: 最小速度,最大速度 | 100,100 |
army_base_move_speed_range | 军队的移动速度范围 格式为: 最小速度,最大速度 | 100,100 |
global_move_speed_range | 全局移动速度范围 格式为: 最小速度,最大速度
该数值影响所有的地图上可移动单位 |
20,400 |
battle_gain_money_scale | 战斗中标准获取金钱的放大系数 | 1 |
npc_drop_equipment | NPC是否会掉落装备 (0:否 1:是) | 0 |
npc_drop_equipment_prob | NPC掉落装备概率 | 0.15 |
loot_food_each_soldier | 每组士兵掉落食物的概率 | 0.1 |
loot_food_each_hero | 每个英雄掉落食物的概率 | 1 |
hungry_fail_days | 饥饿失败天数 | 3 |
以下设置需要游戏版本高于0.7.2.1 | ||
ai_dailyfight_period | AI势力强制讨伐判定间隔时间天数,<=0为关闭此判定。(此选项为默认AI侵略判定之外的逻辑,0.7.2.1之前版本默认为5)此外,此判定从本版本起将受到AI强度因数影响 | 0 |
ai_active_level_default | 默认的AI强度等级,影响 config_ai_level 自定义字段的默认值 | |
def_config_roll_limit | 默认的是否开启翻滚限制,影响 config_roll_limit 自定义字段的默认值 | |
def_config_hunger_penalty | 默认的是否开启饥饿惩罚,影响 config_hunger_penalty 自定义字段的默认值 | |
def_seige_battlemap | 缺省的攻城战地图ID | |
以下设置需要游戏版本高于0.7.3.1 | ||
init_inventory_capicity | 默认初始背包容量基数 | 60 |
def_project_concurrent | 地点默认同时进行项目建设的数量 | 1 |
以下设置需要游戏版本高于0.7.4.1 | ||
camp_rep_wanted_val | 个人在阵营声望达到通缉状态的阈值(小于此值但未达到战争状态时野外遭遇不会被攻击,但是进入此阵营地点时会被限制) | 0 |
camp_rep_war_val | 个人在阵营声望达到战争状态的阈值(小于此值野外遭遇会被该阵营的单位攻击) | -10 |
以下设置需要游戏版本高于0.8.0.1 | ||
dg_levelup_skill | 战斗中升级时播放特效对应的技能ID | 升级特效 |
init_items | 初始道具表 | |
def_dropitem_model | 战斗中默认道具掉落在地上的模型及特效信息(格式为:大地图单位模型ID#特效信息) | chest1#psChestFlash1,0,0 |
除了以上表中的特定初始设定字段外,初始设定表中还会有一些以 "gui_"开头的UI重置特定字段用来实现对一些游戏内置UI的自定义重置,具体见重置游戏界面相关说明
对话框及一些通用UI中支持的字体颜色指定代码
在对话框、文字框以及一些常见的UI中,通常可以使用以下格式来为文本中的指定文字更改颜色。
例如:这是一段[[imp:红色字体]],[[red:红色字体]],[[&ff6699ff:自定义颜色]]的字体
目前可支持的定制颜色如下(自定义颜色需用"&"符号替换"#"):
- place:地点名称的统一颜色
- role:人物名称的统一颜色
- camp:阵营名称的统一颜色
- item:物品名称的统一颜色
- imp:重要信息的统一颜色
人物角色位置指令格式
人物位置格式为:位置代码:位置参数
支持的位置代码有 0:未分配 1:地点中 2:队伍中 3:项目中
- 当位置代码为1地点中时:格式如下 1:地点ID,设施ID (设施ID为空表示在设施外部)
- 当位置代码为2队伍中是:格式如下 2:队伍ID
游戏内全局位置指令格式
当为一个队伍或者大地图上的对象指定位置信息时,就需要一个可以进行全局位置指定的指令格式(如使用TELEPORT指令等)。
全局位置格式为:
地图ID:坐标X,坐标y
特定战斗中的单位限制指令格式
在特定战斗表中,可以在“限制条件”一栏中填入以下格式的指令字段进行单位或者特殊限制。
格式如下:
命令1:参数1;命令2:参数2;...命令N:参数N;
目前支持的限制命令如下:
- player 重置队伍英雄列表 格式为:人物ID1,重置等级(-1或不填表示不重置)|人物ID2,重置等级|人物ID3,重置等级|...|人物ID N,重置等级
- units 重置队伍小兵列表 格式为一般卡牌列表格式
- add_stat 附加角色属性状态 格式为:目标人物ID#状态表
大地图单位控制指令表
大地图单位(队伍)控制指令是用来对大地图上的单位进行序列行为指定的控制方法。当单位被指定控制指令表后,会按照先后顺序逐步执行每一条指令,直到指令表执行完成。当单位执行动作进行中途保存退出后,读档时会按照之前的指令表继续执行指令。
注意:除了假人(包括剧情控制中需要的假人和游戏中的野怪等)外,其他类型的队伍的指令表执行结束后会自动解散队伍。
控制指令的格式是由整形数字的命令类型加命令内容组成,多行以“;”进行分隔,每行指令以指令类型代码+”,”开头,后面为指令参数,例如:
1,测试地图:100,100;1,测试地图:100,200;99,0
上述代码表示先移动到测试地图的坐标1(100,100),再移动到2(100,200),然后解散队伍;
目前支持的指令类型代码如下:
控制指令代码 | 说明 |
---|---|
1 | 向大地图坐标移动 参数为目标地图坐标(地图坐标格式 地图ID:坐标X,坐标Y) |
2 | 在原地停留 参数为停留时间(单位:游戏内天数) |
3 | 进入地点 参数为目标地点ID |
4 | 攻打目标地点 参数为目标地点ID,攻占方式(0:占领 1:掠夺) |
5 | 在目标地点内停留 参数为目标地点ID,停留时间 |
7 | 执行一个事件 参数为事件ID |
8 | 更改当前StateNum值 参数为新的StateNum值
说明:StateNum 可以用来标记一些控制队伍的当前状态。例如:命令一个单位去地图某个地方执行一个动作,当它到达之前StateNum为0,到达后将StateNum改为1,这样就可以在脚本中判断该队伍当前处于什么状态了。 |
9 | 永久执行自定义运动命令,命令格式说明见 单位队伍默认运动指令格式 |
10 | 加入一个战团 参数为战团的数字ID(系统内置方法,不推荐调用) |
11 | 执行一个动作 参数格式为:动作ID,循环次数(-1无限循环 ≥1有限次循环,当动作自身是循环动画时设置为1即可),单次动作时间(秒为单位,当非无限循环的动作次数播放结束后执行下一条指令),播放对象(0默认全体 1仅领队 2所有追随模型),初始帧区间(0~1之间,1为动画最后一帧。-1为随机取0~1之间的值),播放结束后是否转入下一个指令(默认为0否 1是)
模型当前支持的默认动作表:
|
12 | |
13 | 开宝箱 参数为宝箱ID |
14 | 执行一个TimeLine动作 参数格式为:TimeLineID,持续时间(默认-1,始终持续,当>0时播放执行时间后结束) |
15 | 改变当前队伍对玩家的态度 0:中立 1:敌对 |
16 | 改变当前队伍移动速度 参数为目标移动速度 |
17 | 交易成功 参数为交易目标地点ID |
18 | 进行交易 参数为交易目标地点ID |
19 | 跟随队伍目标 参数为跟随目标的控制ID |
99 | 解散当前队伍 |
单位队伍默认运动指令格式
大地图上的假人、野怪、队伍中会需要设置默认的运行方式或者是通过脚本改变其运动模式。指定运动模式后,单位会按照此指令进行默认的行为动作。
单位运动指令的格式为:
运动方式,参数1[,参数2,...,参数N]
当前可支持的运动方式及参数格式为:
- 范围内游荡:WANDER,运动半径,[中心坐标X,中心坐标Y](如不指定中心坐标则以当前位置为中心)
- 巡逻运动:PATROL,坐标1X,坐标1Y,坐标2X,坐标2Y,...,坐标NX,坐标NY(当第一个坐标等于最后一个坐标时执行循环运动,否则为往复运动)
- 其他为静止不运动
物品列表信息格式
物品列表信息是最常使用的信息格式之一,各种物品获取相关的指令(GETITEMS等指令)、配置表中都会用到这种信息格式。
物品信息的格式如下:
物品代码1,数量1[,细节信息表]|物品代码2,数量2[,细节信息表]|....|物品代码N,数量N[,细节信息表]
细节信息表为格式为"key1=val1,key2=val2,..."的字典表,其支持以下信息字段内容:
- 【mf】自动匹配创建词缀:mf=最低品质N-最高品质N[-变量数值附加基数]
例:长剑,1,mf=0-3 说明:以mf开头的词缀代码表示自动适配出品质从0-3之间的词缀(0为不附带词缀)。
- 【cw】创建制定词缀:cw=词缀ID+变量数值附加基数(0-100)
例:长剑,1,cw=吸血剑+50 说明:表示附带吸血剑指定词缀的物品,所有变量数值指定由50-100之间。
- 【w】指定物品词缀详情:w=词缀ID$[变量代码数组]
- 【qv】指定物品属性的变量数组:qv=变量代码数组
- 【p】指定物品的记录买入价格:p=买入价格
变量代码数组由列数为2的二维数组组成,列1为枚举值,列2为品质数值(0-100),以”/”进行连接。比如一个词缀有3条词条,那么他的变量数组可能为:0/50/0/100/0/100
天气效果信息格式
使用指令代码控制天气时多以组合天气效果为主,多个天气效果以"|"进行连接。
天气效果描述信息格式为:
天气效果ID1,强度值|天气效果ID2,强度值|...天气效果IDn,强度值
目前游戏中支持的天气效果ID有:
- 雨:强度为0时关闭 1~50为普通 50~100为大雨
- 雪:强度为0时关闭 1~50为普通 50~100为大雪
- 风沙:强度为0时关闭 1~100
- 雷电:强度为0时关闭 1~100
- 雾:强度为0时关闭 1~100
- 黑暗:强度为0时关闭 1~100
- 炎热:强度为0时关闭 1~100(热变形特效)
- 云:强度为0时关闭 1~100(晴天时地面的云朵阴影)
地图编辑器及各种配置表中的天气效果信息字段填写格式如下:
概率1,持续时间1:[天气效果描述信息1];概率2,持续时间2:[天气效果描述信息2];概率3,持续时间3:[天气效果描述信息3];[...];概率N,持续时间N:[天气效果描述信息N]
比如:30,1:;50,3:雨,20|雾,10;20,5:风沙,30
表示30%的概率持续一天无天气效果,50%的概率持续3天下雨,20%的概率持续5天风沙天气
镜头滤镜效果信息格式
当使用SET_CAMERA_FILTER等指令时可以对当前游戏设置镜头滤镜效果。
镜头滤镜效果信息的格式为:
滤镜效果ID1,强度值|滤镜效果ID2,强度值|...滤镜效果IDn,强度值
目前游戏中支持的镜头滤镜效果ID有:
- 暗角:强度为0时关闭 1~100为镜头边框的暗影程度
- 黑白:强度为0时关闭 1~100为同一黑白照片效果
- 老旧:强度为0时关闭 1~100为老旧(泛黄)照片效果
人物表中具有特殊含义的TAG
目前一些程序中使用的人物TAG字段
字段 | 说明 |
---|---|
LIKE | 标识人物所喜欢的物品类型,影响好感度提升速度
格式:LIKE:类型1|类型2|... |
DEF_WEAPON_SPEED | 默认的武器速度,有此tag时会在人物不装武器时候以此速度为默认武器速度 |
FVChangeUnit | 通过礼物改变角色好感度的算法单位系数,无此标记为默认值 |
dg_skill | 替换此人物的地城技能 |
attached_script | 人物在战斗中挂载的脚本事件ID |
loot_list | 地城战斗中此人物的掉落列表(可用“经验”物品ID作为指定经验获取的来源) |
IsNoExpel | 是否不允许驱逐此角色 (不为空生效) |
IsNoBetray | 是否不会背叛或主动离开阵营 (不为空生效) |
地点表中具有特殊含义的TAG
程序中具有实际功能的地点TAG表
字段 | 说明 |
---|---|
迷你地图显示 | 除城镇地图默认显示外,其他地方如果要显示必须此tag=1 |
迷你地图不显示 | 顾名思义 |
AI出征关闭 | 有此tag的据点不会主动出征、巡逻、占领资源点 |
SharedPermission | 共享通商许可地点ID,当此项存在时此地的通商许可与该ID的地点共享。 |
阵营表中具有特殊含义的TAG
程序中具有实际功能的阵营TAG表
字段 | 说明 |
---|---|
NO_CHANGE_DIP | 游戏过程中不会受动态改变外交关系因素的影响,直接使用脚本指令改变除外 |
UNFAILED | 此势力无法通过正常的途径被消灭 |
EMBARGO | 此势力占据的地点不会派出商队,也不会和其他地点通商 |
NO_FARMER | 此势力占据的地点不会有人口流动 |
CAMP_COLOR | 指定的阵营颜色值,示例格式 CAMP_COLOR=FFFFFF |
HIDE_BY_ACTIVESTATE | 按照当前的ActiveState隐藏相关信息,如果配置表中“是否隐藏”字段为1时此TAG无效 |
物品表中具有特殊含义的TAG
程序中具有实际功能的TAG字段:
字段 | 说明 |
---|---|
IgnoreBagSpace | 该道具不会占据道具栏的使用空间,此字段为"1"时开启 |
NoSellOrDrop | 该道具不能被丢弃或者出售,此字段为"1"时开启 |
BatchUse | 是否支持批量使用,此字段为"1"时开启。 当一个带有此TAG的物品被使用时,其脚本中的 [%arg_int_val1%] 参数为使用时选择的数量值 |
DoNotCostWhenUse | 使用时不消耗改物品,此字段为"1"时开启 |
Present | 礼物的类型标签字段,以"|"分隔 |
AiNotLoot | AI不可通过正常手段获取到,此字段为"1"时开启 |
Mendable | 是否可修复,不可修复的道具耐久度为0后自动损毁,“1”为是 |
DropModel | 战斗中该物品在地上的模型信息(格式为:大地图单位模型ID#特效信息 如为空则以初始设定表中的 def_dropitem_model 字段代替) |
地图表中探索地图信息字段中特殊字段说明
程序中具有实际功能的信息字段:
字段 | 说明 |
---|---|
BattleLoseStay | 失败后停留在原地。仅探索地图模式中可用。0:否 1:是 |
以下字段适用于游戏版本≥0.7.2.1 | |
RolePlay | 当玩家处于此地图时,角色的模型及名称将以此字段值为ID的人物信息所代替,并且不会显示随从单位的模型,此外背包、队伍等界面功能将被禁用 |
FixedGameTime | 当此选项不为空时,游戏时间将被冻结到该字段值所代表的一天中的某个时间(范围0~1.0,例如0.5代表正午12点)。当时间冻结时,世界时间将不会推进,只有当前地图上的单位才可以行动 |
CameraFilter | 当处于此地图时强制使用此字段值信息作为镜头滤镜效果。效果同SET_CAMERA_FILTER指令 |
NoFoodConsume | 当此选项为1时,玩家在此地图中不会有食物消耗,也不会被饿死 |
副本信息表中TAG特殊字段说明
程序中具有实际功能的信息字段:
字段 | 说明 |
---|---|
PlayerInitType | 玩家角色初始化模式 0:默认模式(以默认的角色模板和副本初始化位置来初始化角色) 1:手动模式(通过LUA接口来实现控制角色初始化) |
ExpMode | 经验分配模式,格式为:分配模式[,半径参数]
分配模式有以下几种
|
物品道具词条信息格式
物品道具的词条以“词条类型:{枚举信息1,数值1;枚举信息2,数值2;...}”的格式设置在物品表中,其中词条类型分为以下几种:
- a:被动增加角色属性,枚举信息为增加属性的Key
- skill:增加角色可用技能,枚举信息为技能ID
- dg_skill:替换角色当前的地城技能,枚举信息为地城技能ID
物品掉落信息格式
物品掉落信息格式为:
概率1,物品ID1,最低数量,最高数量[,附带参数表(见 物品列表信息格式 )]|概率2,物品ID2,最低数量,最高数量[,参数表]|...|概率N,物品N,最低数量,最高数量[,参数表]
(如LOOT*100.0,金钱,100,200|50.0,经验,100,200 表示100%的概率获取100~200金钱 50%的概率获取100~200经验)
其中,物品ID一项可指定特殊ID “QUERY”,表示从全局掉落表中查询一个掉落结果并返回。(见Q全局掉落表.xlsx 中格式)
QUERY的参数表格式为“参数1=val1,参数2=val2,....”,可支持以下查询参数:
- 【id】直接从全局掉落表中取目标ID的结果(此项存在且不为空时将忽略所有其他查询条件)
- 【lv】指定的适配等级,当-1时适配所有查询结果 当为0时以主角当前等级进行查询
- 【t1】查询筛选TAG1
- 【t2】查询筛选TAG2
- 【t3】查询筛选TAG3
特效对象事件脚本指令格式
特效对象可以附加 eftEffectEventHelper 脚本为其增加播放事件,每个事件的输入格式为: 事件时间点(start后的秒数):指令类型,参数1, 参数2,....,参数N
目前支持的指令类型有:
shake_cam:晃动屏幕 参数1为晃动时间 参数2为强度
play_sound:播放一个声音 参数1为声音ID