“Common Scenario Directives”的版本间的差异
第287行: | 第287行: | ||
Function: Jump to and execute another specific scenario event ID. | Function: Jump to and execute another specific scenario event ID. | ||
− | Format: EVENT*scenario event ID#jump to the index value of the target | + | Format: EVENT*scenario event ID#jump to the index value of the target event's subcommand line (starts from 0). |
|- | |- | ||
|SUB_EVENT | |SUB_EVENT | ||
第311行: | 第311行: | ||
Annotation: | Annotation: | ||
− | when the KEY of an option begins with | + | when the KEY of an option begins with "+", the text box will not disappear after the player selects an option. |
|- | |- | ||
|SELECT_TALK | |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 | |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 | |CONFIRM | ||
− | |''' | + | |'''Text Confirmation Box''' |
− | + | Function: a text box with a "confirm" button pops up. | |
− | + | Format: CONFIRM*text to confirm | |
|- | |- | ||
|TOAST | |TOAST | ||
− | |''' | + | |'''Message on Screen''' |
− | + | Function: a message pops up on the screen, which disappears after a short while. | |
− | + | Format: TOAST*message content | |
|- | |- | ||
|BB | |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 | |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 | ||
− | |''' | + | |'''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 | ||
− | |''' | + | |'''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 | |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 | |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 | |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 | ||
− | |''' | + | |'''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 | |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 | |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 | |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_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 | |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_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 | |DUNGEON | ||
− | | | + | |[Unavailable] |
|- | |- | ||
|NUMSEL | |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_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 | |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 | |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 | |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 | |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 | |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_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_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_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 | |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 | |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 | |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 | |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_ROLE_LV | ||
− | |''' | + | |'''Change Character Level''' |
− | + | Function: change the level of a specific character. | |
− | + | Format: CHANGE_ROLE_LV*hero ID#expected level. | |
|- | |- | ||
|PLAYER_GUARDS_LEVELUP | |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 | |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 | |SETTRIGG | ||
− | |''' | + | |'''Set Trigger Switch''' |
− | + | Function: turn on or turn off a trigger directly. | |
− | + | Format: SETTRIGG*trigger ID#status value (0: On; 1: Off) | |
|- | |- | ||
|TRIGGER | |TRIGGER | ||
− | |''' | + | |'''Execute Trigger''' |
− | + | Function: execute a specific trigger directly. | |
− | + | Format: TRIGGER*trigger ID | |
|- | |- | ||
|SET_ES | |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 | |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 | |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_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 | |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 | |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 | |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_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 | |GET_QUEST | ||
− | |''' | + | |'''Claim a Mission''' |
− | + | Function: claim a specific mission. | |
− | + | Format: GET_QUEST*mission ID. | |
|- | |- | ||
|ADD_QS | |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 | |SETQUESTIEM | ||
− | |''' | + | |'''Set Value of Mission Subitem''' |
+ | Function: set the value of the subitem of missions. | ||
− | + | Format: SETQUESTIEM*mission ID#subitem index#value | |
− | |||
− | |||
|- | |- | ||
|DONE_QUEST | |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_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 | |CLOSE_IMG | ||
− | |''' | + | |'''Disable Character Painting Frame''' |
− | + | Function: disable the current character painting frame. | |
− | + | Format: CLOSE_IMG*preset special effect 0. | |
|- | |- | ||
|JOIN_ROLE | |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 | |QUIT_ROLE | ||
− | |''' | + | |'''Force Character to Leave''' |
− | + | Function: force a character to leave your squad. | |
− | + | Format: QUIT_ROLE*character ID. | |
|- | |- | ||
|SET_PLACE | |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_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 | |LEAVE_PLACE | ||
− | | | + | |[Unavailable] |
|- | |- | ||
|TELEPORT | |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_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_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 | |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 | |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_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_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 | |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 | |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 | ||
− | |''' | + | |'''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_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 | |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 | |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 | |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 | |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 | |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 | |FAME | ||
− | |''' | + | |'''Change Player’s Global Prestige''' |
− | + | Function: change the player’s current global prestige. | |
− | + | Format: FAME*value change. | |
|- | |- | ||
|CHANGE_FAME | |CHANGE_FAME |
2020年9月21日 (一) 22:49的版本
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_FAME*目标人物ID#更改数值 |
CHG_PERSON_FV | 改变主角与游戏角色的好感度
用途:修改主角与指定游戏角色的友善度 格式:CHG_PERSON_FV*目标人物ID#更改数值#目标值(当不为空时生效) |
SET_ROLE_ACTIVE | 改变角色活跃状态
用途:改变一个非主角角色的活跃状态。当角色处于非活跃状态时,不会自动刷新在在野酒馆里,也不会进行迁移等AI操作 格式:SET_ROLE_ACTIVE*人物ID#状态值(-1不活跃 0活跃) |
CHG_PROSP_BY_CAMP | 改变势力下所有据点的繁荣度
用途:按照百分比改变一个势力下所有据点的繁荣度 格式:CHG_PROSP_BY_CAMP*势力ID#百分比(>-100) |
CHG_PLACE_PROSPERITY | 改变地点的繁荣度
用途:按照固定数值改变一个地点的繁荣度 格式:CHG_PLACE_PROSPERITY*地点ID#更改数值#目标值(当不为空时生效 不能超过当地最大值) |
CHG_PLACE_PROSPERITY_BY_PCT | 按百分比改变地点的繁荣度
用途:按照百分比改变一个地点的繁荣度 格式:CHG_PLACE_PROSPERITY_BY_PCT*地点ID#更改数值百分比(>-100) |
CHG_PLACE_DEF | 改变地点的防御度
用途:按照固定数值改变一个地点的防御度 格式:CHG_PLACE_DEF*地点ID#更改数值#目标值(当不为空时生效 不能超过当地最大值) |
CHG_PLACE_DEF_BY_PCT | 按百分比改变地点的防御度
用途:按照百分比改变一个地点的防御度 格式:CHG_PLACE_DEF_BY_PCT*地点ID#更改百分比 |
CHG_PLACE_SECURITY | 改变地点的治安值
用途:按照固定数值改变一个地点的治安值 格式:CHG_PLACE_SECURITY*地点ID#更改数值#目标值(0-100) |
PLACE_CUSTOM_INT | 指定地点的自定义字段值
用途:指定地点的指定自定义整形字段值 格式:PLACE_CUSTOM_INT*地点ID#标记ID#整型标记值 |
CHG_PLACE_CUSTOM_INT | 改变地点的自定义字段值
用途:改变地点的指定自定义整形字段值 格式:CHG_PLACE_CUSTOM_INT*地点ID#字段KEY#更改数值#目标值 |
PLACE_ADD_BUILDING | 增加地点的自定义设施
用途:给一个地点增加一个自定义设施 格式:PLACE_ADD_BUILDING*地点ID#设施ID(目标地点已存在该设施则无效) |
PLACE_REMOVE_BUILDING | 移除地点的指定自定义设施
用途:移除地点的指定自定义设施 格式:PLACE_REMOVE_BUILDING*地点ID#设施ID |
CREATE_CARAVAN | 创建商队
用途:指定一个地点创建出一个指定的商队 格式:CREATE_CARAVAN*出发城市ID#到达城市ID#TAG(用来标记的队伍TAG) |
CREATE_TEAM | 创建队伍
用途:创建一个队伍并使其根据指定指令进行行动 格式:CREATE_TEAM*地图位置#所属阵营#人物列表(所有人物会强制离开当前队伍或地点)#卡牌单位列表(卡牌ID#等级,数目|卡牌ID2#等级2,数目2|.......)#指令方式(见说明)#指令参数#队伍TAG标签(用来查找特定的队伍) 目前指令方式支持以下几种:
|
DISMISS_TEAM | 解散队伍
用途:解散一个指定的队伍 格式:DISMISS_TEAM*地图单位识别ID |
TEAM_ORDER | 更改队伍指令
用途:更改队伍当前执行的指令列表 格式:TEAM_ORDER*地图单位识别ID#新的队伍指令内容 (指令格式见 队伍预置指令说明) |
INVASION_PLACE | 指定攻打地点
用途:指定一个地点开始攻打另外一个地点。发兵地点与目标地点必须分属两个敌对势力且发兵城内有可战斗人员 格式:INVASION_PLACE*发兵地点ID#目标地点ID#攻打方式(默认0) |
INVASION_CAMP | 指定攻打目标势力
用途:发动一个势力马上开始进攻另外一个势力。注意:这两个势力必须是敌对或中立状态的两个势力,当发起方因为兵力不足等原因时可能无法发起进攻 格式:IVASION_CAMP*进攻方势力ID#目标势力ID#选取目标方式(0距离优先 1城防优先)#入侵方式(0占领地点 1掠夺)#发动据点数量(0:全部发动 >0:发动距离最近的有限个据点)#入侵强度(0:保留有限实力 1:不顾一切(发动所有资源)) |
OPENSTORE | 打开交易界面
用途:打开与指定商人的交易界面 格式:OPENSTORE*商人ID(如为空则表示根据地点及当前NPC自动查询) |
RESET_STORE | 刷新商人所持商品表
用途:根据配置刷新商人所持的商品表 格式:RESET_STORE*商人ID |
ADD_LOCAL_PRODUCT | 增加地图特产
用途:向指定地图位置投放特产,投放后附近的商人中会刷新特产 格式:ADD_LOCAL_PRODUCT*特产ID#地图ID#中心坐标X#中心坐标Y |
TRADE_PERMISSION | 设置通商许可
用途:设置一个地点的通商许可 格式:TRADE_PERMISSION*地点ID*是否可以通商(0代表不能通商,1代表可以通商) |
TROOPS_ALLOC | 驻军界面
用途:打开一个地点的驻军界面 格式:TROOPS_ALLOC*地点ID(如为空则表示当前地点) |
GETSKILL | 学习技能
用途:给一个角色增加技能 格式:GETSKILL*人物ID#技能列表(单个技能格式为:“技能ID,等级(可选)”,多个技能以”|”分隔) |
LEARN_SKILL | 消耗技能点学习技能
用途:选择一个队伍中的角色,尝试使其学习一个技能,如果技能点不足,则无法学习 格式:LEARN_SKILL*技能ID#所需技能点(可不填,默认为1) |
REMOVESKILL | 遗忘技能
用途:移除指定角色的技能 格式:REMOVESKILL*人物ID#技能列表(多个技能以”|”分隔) |
RESET_SP | 重置技能点数
用途:重置角色技能点数 格式:RESET_SP*人物ID |
ADD_UNUSEDSP | 改变可用技能点数
用途:增加一个主角可用的技能点数并进行分配 格式:ADD_UNUSEDSP*点数 |
SET_SKILLPAGE | 点亮或移除主角技能页
用途:点亮或者移除角色可用的技能页 格式:SET_SKILLPAGE*技能页ID表(以”,”分割)#1点亮0移除#目标角色ID(可选,默认为主角) |
SHOW_TEAMINFO | 显示当前队伍信息
用途:显示当前遭遇的队伍信息 格式:SHOW_TEAMINFO*1 |
SET_FLAG | 设置完成标记
用途:设置一个完成标记,一般用于重大剧情转折标记 格式:SET_FLAG*标记名称#标记值 |
UPDATE_MARKS | 更新地图上的标记
用途:更新地图上的标记 格式:UPDATE_MARKS*1 |
SET_DUMMY | 设置假人或野怪状态
用途:设置地图假人或野怪的状态。当控制野怪时ID为野怪ID 格式:SET_DUMMY*假人ID#状态(0:显示 -1:隐藏) |
SET_CAMERA | 设置沙盒地图的镜头跟随模式
用途:用来控制沙盒地图上镜头的跟随模式。 格式:SET_CAMERA*跟随模式#参数 目前支持的镜头跟随模式及参数含义: 0:跟随主角,无参数(默认) 1:跟随指定目标,参数为指定地图目标标识ID 2:指定地图位置,参数为地图坐标(地图ID:x,y)#镜头移动速度 |
SET_PLACE_CAMP | 设置地点归属阵营
用途:改变一个地点所归属的阵营势力。 格式:SET_PLACE_CAMP*目标地点ID#目标阵营ID#是否以攻城侵略方式占据(1为是,0为否) |
SET_MAP_CAMP | 设置一个地图所有的地点归属阵营
用途:改变一个地图板块下所有据点的阵营势力 格式:SET_MAP_CAMP*目标地图ID#from阵营ID#to阵营ID#是否为攻城侵略(1为是,0为否) |
TRY_RECRUIT_FREE_ROLE | 尝试进行一次在野英雄招募判定
用途:尝试进行一次在野英雄招募判定 成功返回1、内部错误返回0、队伍已满返回2 格式:TRY_RECRUIT_FREE_ROLE*角色ID |
CHK_RECRUIT_CAPTIVE | 【暂未开放】 |
RELEASE_CAP | 【暂未开放】 |
SEND_ENVOY | 派出外交信使
用途:派出一个执行特定外交任务的信使 格式:SEND_ENVOY*势力ID(为空时表示玩家势力)#外交行为(1:赎回 2:友善 3:宣战 4:同盟 5:破裂 6:停战)#目标ID(当赎回时为目标人物ID,其他为目标势力ID)#附带参数(一般为条件金钱数)#是否即刻到达的信使(1表示不需要等待时间,0表示需要等待时间) |
DIP_DECIDE | 执行外交事件判定
用途:对当前外交事件进行结果决定。只能用在特定的外交事件触发器环境中 格式:DIP_DECIDE*结果代码(1同意 0拒绝) |
EXPEL_ROLE | 驱逐角色
用途:将一个角色驱逐出阵营势力 格式:EXPEL_ROLE*势力ID#人物ID |
TRY_REWARD_ROLE | 尝试奖赏属下
用途:尝试奖赏一个属下 格式:TRY_REWARD_ROLE*人物ID(为空时表示当前对象) |
ADD_GLOBAL_BUFF | 增加队伍全局BUFF
用途:为当前队伍增加一个全局BUFF 格式:ADD_GLOBAL_BUFF*buffID#持续时间(游戏天数)#层数(默认为1)#最高层数限制(默认为-1,无限制) |
RM_GLOBAL_BUFF | 移除队伍全局BUFF
用途:为当前队伍移除一个全局BUFF 格式:RM_GLOBAL_BUFF*buffID |
RM_GLOBAL_BUFF_BYCLASS | 按类型移除队伍全局BUFF
用途:按照类型为当前队伍移除一个全局BUFF 格式:RM_GLOBAL_BUFF_BYCLASS*全局BUFF类型 |
RM_ALL_GLOBAL_BUFF | 移除队伍所有的全局BUFF
用途:为当前队伍移除所有全局BUFF 格式:RM_ALL_GLOBAL_BUFF*1 |
PLAYER_FAILED | 游戏失败
用途:玩家游戏失败时进行的通用处理 格式:PLAYER_FAILED*1 |
LOSE_INVENTORY | 玩家通用财物损失操作
用途:对玩家进行一次财物损失操作(只损失货物和金钱) 格式:LOSE_INVENTORY*比例(比例为整数,代表百分比) |
SET_TAGROLE | 变更当前脚本中的对象人物
用途:为当前脚本的环境变量设置默认的操作对象角色 格式:SET_TAGROLE*人物ID |
SET_TAGPLACE | 变更当前脚本中的对象地点
用途:为当前脚本的环境变量设置默认的操作对象地点 格式:SET_TAGPLACE*地点ID |
SURRENDER | 势力投降
用途:指定一个势力向另外一个势力投降(所有领地被受降方占领,所有人员根据忠诚度随机选择是否归顺) 格式:SURRENDER*投降方势力ID#受降方势力ID |
GEN_RND_PLACE | 选定随机地点以供查询
用途:生成一个随机地点,并可以用[%last_rnd_place_XX%]系列指令查询 格式:GEN_RND_PLACE*所属势力ID(如果所属势力为空,则为玩家势力中的一个地点) |
GEN_RND_ROLE | 选定随机人物以供查询
用途:在指定范围内选定一个随机人物角色,并可用[%last_rnd_role_XX%]系列指令查询 格式:GEN_RND_ROLE*所属势力ID(如果所属势力为空,则为玩家势力中的一个地点) |
HERO_UPGRADE | 英雄强化
用途:为指定的人物角色永久增加某项角色属性 格式:HERO_UPGRADE*英雄ID#属性ID#增加值#增加上限(必须指定,可以为-1,即没有上限) |
HERO_SET_STATU | 设置角色属性字段
用途:为指定的人物角色设置某一项属性字段值 格式:HERO_SET_STATU*角色ID#属性ID#新值(角色ID为空表示主角) |
ADD_CAMP_BUFF | 增加阵营BUFF
用途:为指定的阵营势力增加一个阵营BUFF 格式:ADD_CAMP_BUFF*阵营ID#buffID#持续时间(游戏天数,当该值小于等于0时表示永久生效除非强制移除该BUFF) |
RM_CAMP_BUFF | 移除阵营BUFF
用途:为指定的阵营势力移除一个阵营BUFF 格式:RM_CAMP_BUFF*阵营ID#buffID |
RM_CAMP_BUFF_BYCLASS | 按照类型移除阵营BUFF
用途:按照BUFF类型为指定的阵营势力移除一个阵营BUFF 格式:RM_CAMP_BUFF_BYCLASS*阵营ID#阵营BUFF类型 |
RM_ALL_GLOBAL_BUFF | 移除所有的阵营BUFF
用途:为指定的阵营势力移除所有的阵营BUFF 格式:RM_ALL_GLOBAL_BUFF*阵营ID |
ADD_CAMP_EXTRA_STATU | 增加阵营属性字段值
用途:增加阵营势力的某一项动态属性字段 格式:ADD_CAMP_EXTRA_STATU*阵营ID#动态属性字段表(见阵营表EXCEL势力初始属性格式) |
RESET_CAMP_EXTRA_STATU | 重置阵营属性字段值
用途:重置阵营势力的所有动态属性字段值 格式:RESET_CAMP_EXTRA_STATU*阵营ID |
WEAPON_DURABILITY_DOWN | 武器装备耐久度下降
用途:降低当前装备的武器装备的耐久度,当耐久度为0时自动损毁。如果武器本身耐久为-1(没有耐久度概念),则该语句什么也不会发生 格式:WEAPON_DURABILITY_DOWN*数值 |
ITEM_DURABILITY_DOWN | 特定道具耐久度下降
用途:降低背包中一把符合tag、等级条件(>=要求等级)的道具耐久度【数值】点,如果符合条件的道具耐久不足,将摧毁这件道具 格式:ITEM_DURABILITY_DOWN*装备tag筛选#装备等级筛选#数值 |
SET_SYNTH_STATE | 设置合成配方的状态
用途:设置指定合成配方状态 格式:SET_SYNTH_STATE*配方ID#新状态(0:未习得 1:已习得) |
OPEN_SYNTH_DLG | 开启道具合成界面
用途:开启道具合成界面UI 格式:OPEN_SYNTH_DLG*是否锁定(0:不锁定主分类 1:锁定显示分类)#默认显示的分类页(可为空默认,以“,”分隔多页,默认显示第一页;当锁定主分类时该字段可显示隐藏的分类)#关闭合成面板后执行的story key(可不填) |
OPEN_CARD_SYNTH_DLG | 开启卡牌合成界面
用途:开启卡牌合成界面UI 格式:OPEN_CARD_SYNTH_DLG*1 |
PLAY_EFT | 播放特效
用途:在当前地图上播放一个特效 格式:PLAY_EFT*特效路径(相对Asset目录,例如:Assets\BuildSource\battle_effects\SkillEffects\psLightingHit1.prefab)#地图坐标#初始旋转角度(可为3方向旋转向量或者一个Y轴的旋转角度)#缩放比例(可指定XYZ3轴上的比例向量或者整体的缩放比例)#持续时间(秒,超过此时间后自动移除)#播放延迟时间(默认为0秒) |
PLAY_MU_EFT | 播放大地图单位跟随特效
用途:在指定地图单位身上播放一个跟随该单位的特效 格式:PLAY_MU_EFT*特效路径(相对Asset目录,例如:Assets\BuildSource\battle_effects\HitEffects\psHealEft1.prefab)#地图单位ID#对象范围(0:仅英雄 1:全体)#初始旋转角度(可为3方向旋转向量或者一个Y轴的旋转角度)#缩放比例(可指定XYZ3轴上的比例向量或者整体的缩放比例)#持续时间(秒,超过此时间后自动移除) |
OPEN_MAPAREA_SELECTOR | 开启地图区域选择界面
用途:在当前沙盒地图上开启一个区域选择UI界面,在此界面上可为当前操作的对象在预先定义好的地图区域中选取一个地图位置并返回。result_code返回1标识位置设置成功,为0标识失败。位置信息记录在[$last_selpos$]中。 格式:OPEN_MAPAREA_SELECTOR*区域标识ID#显示的模型#排他模式(0:不排他、1:排除自定义宝箱)#提示信息 |
OPEN_FREEAREA_SELECTOR | 开启自由地图位置选择界面
用途:效果同上,只不过不再限制可供选择的地图区域。 格式:OPEN_FREEAREA_SELECTOR*宽(整数)#高(整数)##显示的模型#排他模式(0:不排他、1:排除自定义宝箱)#提示信息。 |
PLACE_SELECTOR | 开启地点选择界面
用途:开启一个建议的地点选择界面。选中的结果存在[$tagplace$]里,编号存在[%result_code%]里,如果[%result_code%]为9999则代表玩家取消选择。 格式:PLACE_SELECTOR*提示内容#选择条件(传入[%tagplace%]作为判断参数) |
SET_LORD | 设置城主
用途:为指定地点设置一个城主。 格式:SET_LORD*角色ID#地点ID |
ADD_CUSTOM_CHEST | 增加自定义宝箱
用途:根据设置信息在大地图上增加一个自定义宝箱。(宝箱的概念可扩展为所有大地图上有价值的可交互目标。如:材料、遗迹、征兵点等等) 格式:ADD_CUSTOM_CHEST*宝箱ID#对应的宝箱表中ID#位置信息#初始状态(>0表示可以开的次数,-1表示已经开过了)#默认方向(0-360) |
SET_CHEST | 设置宝箱状态
用途:设置一个地图上可控宝箱的状态 格式:SET_CHEST*地图ID#宝箱ID#状态。状态>0表示可开启次数,状态<=0表示已开启 |
SET_CURCHEST | 设置当前宝箱状态
用途:设置当前脚本中的对象宝箱的状态 格式:SET_CURCHEST*状态(同 SET_CHEST) |
CLOSE_SYSTEM_UI | 关闭系统UI
用途:关闭当前打开的系统UI 格式:CLOSE_SYSTEM_UI* |
CLOSE_ITEM_PANEL | 关闭当前背包UI
用途:关闭当前打开的背包UI(如果存在的话) 格式:CLOSE_ITEM_PANEL* |
ROLES_SELECTOR | 关闭系统UI
用途:关闭当前打开的系统UI 格式:ROLES_SELECTOR*选择框标题#选择数量限制(小于0为不限制)#选择范围(0:全局非模板人物 1:主角队伍中 2:指定人物表范围)#筛选条件表达式#参数(当选择范围为指定人物表时该参数为人物列表信息) 示例: ROLES_SELECTOR*选择目标阵营中的人物#1#0#[$tagrole:campid$][=][$player:campid$]&[$tagrole:campid$][<>][$null$]# ROLES_SELECTOR*几个目标对象中选择一个#1#2##人物1|人物2|人物3|人物4 选取后存在[%last_seled_roles%]里。如果只有一个结果,则同时存在[%tagrole%]里 |
ASK_ABOUT_SOMEBODY_SELECTOR | 打听人物选择器
用途:被打听人现在暂没参与逻辑运算,弹出人物选项框,结果存在[%arg_str_val1%]里,选择结果[%result_code%]为9999的时候是玩家取消 格式:ASK_ABOUT_SOMEBODY_SELECTOR#被打听人ID |
CARD_SELECTOR | 卡牌选择器
用途:弹出当前卡牌列表界面供选择 格式:CARD_SELECTOR*选择框标题#选择数量限制(小于0为不限制)#选择范围(0:主角队伍中的卡牌 1:指定单位表范围)#参数(当选择范围为指定单位表时该参数为单位列表信息)#筛选条件表达式(可选) |
ASSEMBLE_ARMY | 集结部队
用途:集结阵营势力下的部队跟随集结者 格式:ASSEMBLE_ARMY#集结者ID#集结角色ID列表(可为空,“|”分割,可以使用ROLES_SELECTOR的结果[%last_seled_roles%]。如果为空,则是默认选定阵营下所有的角色。) |
RELEASE_ALL_ASSEMBLE_ARMY | 解散所有集结部队
用途:解散所有当前已进行集结中的部队 格式:RELEASE_ALL_ASSEMBLE_ARMY#首领角色ID |
SET_ROLE_IN_PROJECT | 角色开始执行项目
用途:使一个角色开始执行指定项目 格式:SET_ROLE_IN_PROJECT*角色ID#项目ID |
SET_ROLE_FINISH_PROJECT | 角色结束当前执行的项目
用途:强制指定的角色结束当前进行的项目 格式:SET_ROLE_FINISH_PROJECT*角色ID1,角色ID2,... |
ROLE_PROJECT_ADMIN | 打开个人项目界面
用途:打开角色个人项目执行界面 格式:ROLE_PROJECT_ADMIN*项目ID#绑定地点(可选,默认当前地点) |
GROUP_PROJECT_ADMIN | 打开团体项目界面
用途:打开团体项目执行界面 格式:GROUP_PROJECT_ADMIN*项目标签#界面标题#项目绑定类型#项目绑定对象参数(可选,默认为当前对象) 目前支持的项目绑定类型有 place:地点建筑建设 对象参数为地点ID,如不指定为当前地点 world:自定义地点建设 对象参数格式为:自选区域控制ID;所属地点(当所属地点为空时表示建设一个非附属地点) |
SET_REVIVE_POS | 设置复活集结地点
用途:设置新的复活集结地点 格式:SET_REVIVE_POS*大地图位置(地图ID:x,y) |
SET_SILENCE_MODE | 设置静默模式
用途:开启或关闭消息静默模式 格式:SET_SILENCE_MODE*静默模式(0:不开启 1:不显示TOAST,仅显示消息,获得物品TOAST信息在消息中显示 2:不显示TOAST及消息) |
START_RAID_PLACE | 【已废除】 |
ADD_CUSTOM_PLACE | 增加自定义地点
用途:在大地图上的指定位置增加一个自定义地点 格式:ADD_CUSTOM_PLACE*自定义地点ID(全局唯一)#附属于地点(可为空,为空表示非附属地点)#地点信息模板ID#位置信息#默认所属势力 |
SET_PLACE_NAME | 修改地点名称
用途:修改一个指定地点的显示名称 格式:SET_PLACE_NAME*地点ID#自定义名称 |
OPEN_PLACE_BUILD_UI | 开启地点建筑建设界面
用途:开启地点建筑建设界面 格式:OPEN_PLACE_BUILD_UI*地点ID#建设成功后执行的剧本(可选)#建设取消后执行的剧本(可选 |
ADD_CARD | 获得新卡牌
用途:加入一张预制的卡牌 格式:ADD_CARD*卡牌ID#是否免费招募(1免费,0付费招募,默认为0) |
ADD_CARD_PIECE | 获得指定耐久的卡牌
用途:加入一张预制的卡牌,最大耐久为指定的残值 格式:ADD_CARD_PIECE*卡牌ID#最大耐久#是否免费招募(1免费,0付费招募,默认为0) |
SET_OBS_AREA | 设置阻挡区状态
用途:设置地图阻挡区域的状态 格式:SET_OBS_AREA*控制ID#状态(0:启用 -1:禁用) |
EXPLORE_AREA | 点亮地图区域
用途:点亮当前地图某一块区域(去除区域战争迷雾) 格式:EXPLORE_AREA*坐标x,坐标y#点亮半径 |
EXPLORE_MAP | 点亮整个地图
用途:点亮整个地图(去除整张地图的战争迷雾) 格式:EXPLORE_MAP*地图ID |
ADD_INTVAL_WATCHER | 增加自定义变量监视字段
用途:增加自定义变量监视字段,在屏幕指定UI区块显示当前监视的变量字段值 格式:ADD_INTVAL_WATCHER*变量监视信息格式 (格式如:字段Key1,显示名称1,枚举值1a=枚举名称1a|枚举值1b=枚举名称1b|...|枚举值1N=枚举名称1N,是否战斗中可见([可选,默认0] 0否1是);...;监视字段信息N) |
REMOVE_INTVAL_WATCHER | 移除自定义变量监视字段
用途:移除指定的自定义变量监视字段 格式:REMOVE_INTVAL_WATCHER*字段Key值 |
CLEAR_ALL_INTVAL_WATCHERS | 清除所有变量监视字段
用途:清除所有变量监视字段 格式:CLEAR_ALL_INTVAL_WATCHERS* |
SET_TIMER | 设置事件定时器
用途:设置一个游戏计时器事件,当时间到达后将执行指定的事件 格式:SET_TIMER*计时器ID(当ID重复时将覆盖重复的目标计时器信息)#时间参数(小于0时表示关闭该计时器, 其他当类型为指定时间型时该参数为指定的游戏事件(单位天), 当倒计时型时该参数为倒计时的天数)#计时器类型(0:指定时间触发型 1:倒计时型)#时间到达时执行的事件ID#是否强制更新(1表示强制更新,0表示非强制更新:即不会更改已有的计时器的数据。不填为1) |
REMOVE_TIMER | 移除事件定时器
用途:移除一个游戏计时器事件 格式:REMOVE_TIMER*计时器ID |
CHANGE_TIMER_TIME | 更改事件定时器
用途:增加/缩减一个游戏计时器的时间 格式:CHANGE_TIMER_TIME*计时器ID#时间(以天为单位,可正可负,可以为小数) |
ADD_TIMER_WATCHER | 增加自定义事件定时器监视字段
用途:增加自定义计时器监视字段,同自定义变量监视器UI 格式:ADD_TIMER_WATCHER*计时器监视信息格式(格式如:计时器ID1,显示时间格式1,缩放参数1([可选,默认1]对时间参数(天)进行缩放的系数),是否战斗中可见([可选,默认0] 0否1是)|...|计时器ID N,显示时间格式N,缩放参数N |
REMOVE_TIMER_WATCHER | 移除自定义事件定时器监视字段
用途:移除一个自定义计时器监视字段 格式:REMOVE_TIMER_WATCHER*字段Key值 |
CLEAR_ALL_TIMER_WATCHERS | 清除自定义事件定时器监视字段
用途:清除所有自定义计时器监视字段 格式:CLEAR_ALL_TIMER_WATCHERS* |
PLAYER_RECRUIT_CARD_IN_PLACE | 打开玩家招募城镇内卡牌的面板
用途:打开玩家招募城镇内卡牌的面板 格式:PLAYER_RECRUIT_CARD_IN_PLACE*城镇ID#完成招募后执行的事件ID(可选)#取消招募后执行的事件ID(可选) |
STORY_CARD_START
STORY_CARD_LINE STORY_CARD_END |
打开剧情卡片界面
用途:打开剧情卡片界面。必须要有STORY_CARD_START和STORY_CARD_END,不然会报错。STORY_CARD_LINE为剧情段落,需要加在中间,可以加无数行 格式: STORY_CARD_START*卡片文件名 STORY_CARD_LINE*剧情段落1 STORY_CARD_LINE*剧情段落2 STORY_CARD_LINE*剧情段落3 ... STORY_CARD_END* |
AUTOSAVE | 执行自动存档
用途:立即执行自动存档 格式:AUTOSAVE*1 |
OPEN_SAVE_DLG | 打开存档界面
用途:打开存档界面 格式:OPEN_SAVE_DLG*1 |
OPEN_SAVE_DLG | 打开读取界面
用途:打开读取界面 格式:OPEN_LOAD_DLG*1 |
EXCHANGE_CARD | 打开卡牌交换界面
用途:打开卡牌交换界面 格式:EXCHANGE_CARD*对象类型(0:地点 1:队伍)#对象ID([可选,默认为当前地点] 当对象为地点时为地点ID,队伍时为队伍ID) |
LEVEL_FINISH | 关卡完成
用途:用于剧本模式描述一关结束 格式:LEVEL_FINISH* |
SET_CAMERA_FILTER | 设置镜头滤镜
用途:设置镜头滤镜效果 格式:SET_CAMERA_FILTER*滤镜参数(为空为关闭所有滤镜,参数代码见6.10节)测试代码:SET_CAMERA_FILTER*黑白,0|老旧,100|暗角,100 |
TLACTION | 播放Timeline动作
用途:让大地图上的指定单位播放TIMELINE动作 格式:TLACTION*地图角色ID#Timeline动作文件名#动作时长 |
SELECTION_VIEW | 全屏特殊剧情选择
用途:打开一个全屏特殊剧情选择界面 格式:SELECTION_VIEW*剧情图片文件名#剧情内容(支持“\n”表示换行)#选择项(参考SELECT*) |
DIALOG_BUBBLE | 地图单位气泡对话框
用途:在大地图上的单位头上弹出气泡对话框 格式:DIALOG_BUBBLE*地图角色ID#对话内容#显示时长 |
TEXT_EXPLORE_START
TEXT_EXPLORE_OVER TEXT_EXPLORE_FORCE_OVER_AND_CD |
文字探索相关
用途:特定的文字探索模式 格式: TEXT_EXPLORE_START*文字探索地图ID。开启一场文字冒险 TEXT_EXPLORE_OVER*。结束当前副本 TEXT_EXPLORE_FORCE_OVER_AND_CD*。强制结束当前副本并进入CD |
SHOW_CG | 显示CG图片
用途:用来展示一个CG图片界面(注意开了之后需要手动用HIDE_CG*关闭CG,不然会影响玩家操作) 格式:SHOW_CG*图片名称(不带后缀,可为空,空就只会显示黑色背景,对应目录为Assets\BuildSource\Backgrounds\,文件格式统一要求为png) |
HIDE_CG | 关闭CG图片
用途:关闭CG图片界面 格式:HIDE_CG* |
GENERATE_RANDOM_CARD | 随机选取一个卡牌
用途:随机抽取一张卡牌,并存放在当前变量的tagcard里 格式:GENERATE_RANDOM_CARD#1 |
VOICE_OVER | 旁白
用途:展现一句旁白界面 格式:VOICE_OVER*旁白内容 |
CREATE_STORYARMY | 创建剧情队伍
用途:创建一个用于剧情的队伍 格式:CREATE_STORYARMY*tagkey#地图位置#所属阵营#人物列表(所有人物会强制离开当前队伍或地点)#卡牌单位列表(卡牌ID1,数量1,等级1|卡牌ID2,数目2,等级2|.......)#运动信息(例如:WANDER,2500) |
REMOVE_STORYARMY | 移除剧情队伍
用途:移除一个剧情队伍 格式:REMOVE_STORYARMY*tagkey |
BAZZAR_BUY_ITEM | 集市商人买入操作
用途:进行集市商人买入操作 格式:BAZZAR_BUY_ITEM*集市ID#商人ID#交换用物品的集市ID(可选)#交换用物品的商人ID(可选) |
BAZZAR_SELL_ITEM | 集市商人卖出操作
用途:进行集市商人卖出操作 格式:BAZZAR_SELL_ITEM*集市ID#商人ID |
SHOWROLE | 对话显示角色立绘
用途:对话时显示角色立绘 格式:SHOWROLE*角色1ID@角色1立绘显示位置(#角色2ID@角色2立绘显示位置)(可选) *立绘显示位置:可以是L或者R,默认为L,立绘显示在对话框左侧,R则显示在右侧 |
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