• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

“GuillaumeVDN的插件文档/QuestCreator/详细特性”的版本间的差异

来自Minecraft插件百科
跳转至: 导航搜索
任务分支
分支设置
第206行: 第206行:
 
  <code>starts_directly: true  # 在任务开始时自动开始分支
 
  <code>starts_directly: true  # 在任务开始时自动开始分支
 
   
 
   
  starts_at: OBJECT_1  #分支开始时的目标
+
  starts_at: OBJECT_1  # 分支开始时的目标
 
   
 
   
 
  # 该分支的目标列表
 
  # 该分支的目标列表
 
  objects:
 
  objects:
 
   OBJECT_1:
 
   OBJECT_1:
     # ... (see "quest objects")
+
     # …… 见任务目标
 
   OBJECT_2:
 
   OBJECT_2:
     # ... (see "quest objects")</code>
+
     # …… 见任务目标</code>
  
 
== 分支类型 ==
 
== 分支类型 ==

2020年11月24日 (二) 19:57的版本

GuillaumeVDN的插件文档
页面

GuillaumeVDN的插件文档 · 迁移

所有插件都有的常见内容

配置 · 杂项 · 关联

QuestCreator

基础内容 · 示例 · 详细特性 · 高级内容 · 关联

目录

任务模型

全部模型设置

显示

display_name: '&a任务显示名'

description: |
  &7任务描述
  &7任务描述第二行

description_placeholder: |
  &7多行占位符
  &7可和PlaceholderAPI一同使用(见通用变量)

information_message: >
  &a当玩家点击任务物品而未开始任务时发送的消息

progress_notify:
  # …… 每隔一段时间发送给玩家的进度提醒(见通用配置/提醒)

progress_notify_scoreboard: true  # 允许任务显示在计分板上

# 显示优先度
# 优先度从低到高排序。如果A的优先度为1,B的优先度为2,则A的优先度更高。
# 你可以用这个来决定任务显示在actionbar、计分板等地方的优先度。
# 插件会根据优先度分类任务。如果优先度相同,则优先显示进度最新的任务。
# 这是可选设置,没有设置优先度的任务低于设置了优先度的任务。
# 请注意GUI物品不会影响这个优先度
display_priority: 1

GUI物品

任务可以显示在GUI中。你可以给每个任务模型设定物品列表(最终取决于其当前状态)。

要记住,不同的任务状态会有不同的控制选项和lore。比如停止或开始任务以下是可配置的消息。

status_items:
  AVAILABLE:
    # 可开始任务的物品图标
  PROGRESS:
    # 任务进行中的物品图标
  COOLDOWN:
    # 任务冷却中的物品图标
  UNAVAILABLE:
    # 无法开始任务的物品图标
  COMPLETED:
    # 任务完成的物品图标(达到最大完成次数时显示)

all_status_items:
  # 全部状态都显示为同一物品
  # 如果一个状态没有物品,则插件会自动使用一个物品

全部状态的占位符:

  • {quest}:任务名
  • {description}:任务描述
  • {controls}:根据玩家能做什么显示的动态控制列表;如果没有控制,则该占位符为空
  • {completions}:该任务的完成文本;如果任务未完成,则该占位符为空
  • {last_completion}:该任务的上次完成文本;如果未完成过任务,则该占位符为空
  • {cooldown}:该任务的冷却文本;如果没有任务冷却,则该占位符为空
  • {detailed_progression}:该任务的详细进度;如果任务未激活,则该占位符为空
  • {detailed_errors}:显示玩家无法开始的原因的文本;如果如果不是“无法使用”状态,则该占位符为空

PROGRESS 状态的占位符:

  • {players}:多个玩家名;如果不是多人任务,则该占位符为空
  • 你也可以使用上面列出的任务占位符。

限制

permission_start_restriction: questcreator.quest.my_quest  # 开始任务所需权限

conditions_start_restriction:
  # …… 开始任务所需条件(见条件)

world_restriction:  # 世界限制
  whitelist: |
    list_of_worlds
    to_allow
  blacklist: |
    list_of_worlds
    to_deny

command_restriction:  # 任务进行时无法使用的指令
  whitelist: |
    /list of commands
    /to allow
  blacklist: |
    /list of commands
    /to deny

完成/限时/冷却

completion:
  max_completions: 10  # 该任务的最大可完成次数
  apply_actor_restriction:
    # …… 只对一些身份的玩家将任务标记为已完成 (见“杂项/身份”)
  notify:
    SUCCESS:
      # …… 任务完成时发送的提醒(见“通用配置/提醒”)
    # …… 键:SUCCESS、FAIL、CANCEL
  notify_coop:
    SUCCESS:
      # …… 如果完成时发送的提醒(多人任务)
    # …… 键:SUCCESS、FAIL、CANCEL

time_limit:
  duration: 1 HOUR  # 任务限时
  reminder:
    # …… 发送提醒玩家剩余时间的消息(见“通用配置/提醒”)
    # - 显示剩余时间的占位符:{time}
  fail_goto: QUEST_FAIL  # a goto to apply when the time is over

cooldown:
  duration: 12 HOUR
  end_types: [SUCCESS]  # 只对一些结束类型使用冷却;值:SUCCESS、FAIL、CANCEL、COOP_LEAVE
  apply_actor_restriction:
    # …… 只对一些身份的玩家设置冷却(见“杂项/身份”)

同时进行任务数/玩家/组队

max_concurrent_instances: 5  # 任务最大同时进行数

# 如果已达任务同时进行数上限,则将玩家加入到队列中
max_concurrent_instances_queue: true

# 玩家数上下限(包括队长)
min_players: 1
max_players: 3  # 设置为大于1的值则允许多人任务

# 允许组队玩家离开任务,该数值需小于最大玩家数
# 如果组队人数低于该值,则剩下的组队玩家无法离开任务
min_active_players: 2

allow_leader_stop: true  # 允许队长停止任务

# 队长掉线时的处理方式
# 设置为false则队长掉线后队员仍能继续进行任务
# 如果你在任务中使用了变量则不推荐设置为false
dispose_on_leader_disconnect: true

# 允许队员解析任务设置
# 如果你的设置包含变量,我建议开启该选项
only_leader_parsing: true

notify_coop_player_leave:
  # …… 组队玩家离开任务时发送的提醒

保存

saving: ENABLED

值 :

  • ENABLED:保存任务到磁盘/数据库中
  • PLUGIN_ACTIVE:只要加载了插件,任务就会持续活跃
  • PLAYER_ONLINE:只要加载了插件且玩家在线,任务就会持续活跃

变量

# 默认模型变量值
model_variables:
  my_variable: 默认值

激活器

# 该任务的激活器(详见“任务激活器”)
activators: |
  first_activator
  second_activator

# 在正式开始任务前发送的对话(只对物理激活器有效)
# 玩家每激活一次激活器就发送一条对话
# 发送完全部对话后,玩家可以打开开始任务的确认GUI
activators_dialog: |
  &7我找你有事!
  &7你想要开始任务吗?

# 自动向范围内的玩家发送第一条对话
activators_dialog_auto_start_distance: 3.5

# 在特定条件下重置对话
activators_dialog_reset:
  reset_delay: 30 SECOND  # 在一段时间后重置
  reset_distance: 5  # 在玩家走远后重置
  reset_notify:
    # …… 对话重置时发送的提醒

分支/目标

# 任务的分支
branches:
  branch_1:
    # …… 见任务分支
  branch_2:
    # …… 见任务分支

# 对一些结束类型的任务执行目标
end_objects:
  SUCCESS:
    # …… 任务完成时执行的目标列表
  FAIL:
    # …… 任务失败时执行的目标列表
  CANCEL:
    # …… 任务取消时执行的目标列表
  COOP_LEAVE:
    # …… 多人任务取消时执行的目标列表

# 对离线的组队玩家执行结束目标(在玩家重新登录后执行):
end_objects_for_offline_players: true

任务分支

分支设置

starts_directly: true  # 在任务开始时自动开始分支

starts_at: OBJECT_1  # 分支开始时的目标

# 该分支的目标列表
objects:
  OBJECT_1:
    # …… 见任务目标
  OBJECT_2:
    # …… 见任务目标

分支类型

默认分支类型:

type: NONE  # 这是默认类型,你可以不填该选项

display_name: >  # 分支显示名(可选)
  &a分支

隐藏分支,该分支不会显示在进度中:

type: SECRET

独立分支

独立分支对多人任务有实际意义。如果你用独立分支来制作单人任务,那么它的效果就和普通分支基本一样,不过整体比较混乱,所以请不要这么做。

独立分支是针对任务中的每个玩家的。所以,玩家GuillaumeVDN可以有一个运行中的独立分支my_branch,而玩家Notch可以在这个分支内有不同的状态,甚至未激活该分支。

独立分支主要用来执行作用于单个玩家的效果,或者让任务中的玩家有不同的进度。你可以在SERVER_ACTIONS目标中手动触发,也可以在每个事件目标中触发。

比如:

branches:

  TRIGGER_BRANCH:
    starts_directly: true
    starts_at: TRIGGER
    objects:
      TRIGGER:
        type: PLAYER_CONNECT
        goto_individual_branches: [INDIVIDUAL_BRANCH]  # 对重连的玩家开始独立分支
        goto: OBJECT TRIGGER  # 循环激活器以使其常时有效

  INDIVIDUAL_BRANCH:
    starts_directly: false
    starts_at: EFFECT
    objects:
      EFFECT:
        type: SERVER_PLAYER_EFFECTS_GIVE
        start_notify:
          message: >
            &a欢迎回来{player}&a!这是你的速度 II。
        effects:
          a:
            type: SPEED
            amplifier: 1
            duration: 1 MINUTE
        # 无goto,该分支会立即停止
        # 只有第一个重连的玩家会获得速度 II的效果。

需要注意的是,从独立分支调用的goto将被用于独立分支。例如,如果你的分支MY_BRANCH的goto是从一个独立分支中调用的,那么该分支将为同一个人开始,而不是整个任务。

任务激活器

Activators are located under /quest_activators/.

激活器设置

Unlike objects or models, activators don’t have generic settings. All their settings are specific to their type. The only generic setting, you’ve guessed it, is their type.

type: AUTO  # 示例

激活器类型

NONE|无

An activator with no type (for internal use ; this activator will not start quests).

AUTO|自动

The quests will automatically every once in a while.

type: AUTO
delay: 15 SECOND  # the check delay

POSITION|位置

The quests will automatically every once the player matches a certain position.

type: POSITION
position:
  # ... the position to match to start the quest (see "generic configuration/position")
delay: 15 SECOND  # the check delay

物理激活器

Physical activators, though, do have generic settings.

显示设置

For each activator, you can specify a list of particle scripts depending on the activator’s current status.

particles:
  AVAILABLE: script_id  # script for when a quest can be started
  PROGRESS: script_id  # script for when a quest is active
  COOLDOWN: script_id  # script for when a quest is on cooldown
  UNAVAILABLE: script_id  # script for when a quest can't be started
  COMPLETED: script_id  # script for when a quest is completed (when the max completion count has been reached)

particles_location:
  # ... a location adapter based on the activator's location (see "generic configuration/relative location")

The activator’s quest will be sorted depending on their status. For instance, if one quest is available and one is on cooldown, the particle script for the available status will be shown, and the available quest could be started.

交互设置

interaction_clicks: [LEFT_CLICK,RIGHT_CLICK]  # the interaction clicks that will trigger the interaction
                                              # only the right-click might work for some activator types (in particular, NPCs)

sneak_click_cancel: true  # to allow cancelling an active quest linked to this NPC by clicking it while sneaking

GUI设置

custom_gui: gui_id  # to link a configured GUI to this activator, instead of generating one from the current activator's status

gui_name: >  # the name of the activator's GUI
  &aMy cool activator
gui_type: CHEST_6_ROW  # the type of the activator's GUI (see "generic configuration/GUI types")

gui_show_status: [AVAILABLE,PROGRESS]  # a list of status to be allowed in the activator's GUI (empty for all) ; values : AVAILABLE, PROGRESS, COOLDOWN, UNAVAILABLE, COMPLETED

required_gui_quests: 5  # to only allow the GUI to open if there are at least X visible quest items

POSITIONS_INTERACT|位置交互

The quest will automatically every once the player interacts with blocks in certain positions.

type: POSITIONS_INTERACT
positions:
  # ... the position to match to start the quest (see "generic configuration/position")

ENTITIES|实体

The quest will automatically every once the player interacts with certain entities.

type: ENTITIES

entity_types: [CREEPER]  # the entity types that are allowed (empty for all) ; values : https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html

entity_names: []  # the entity custom names that are allowed (empty for all)

entity_colors: []  # the entity colors that are allowed (for colorable entities) (empty for all)

任务池

任务池位于 /quest_pools/.

设置

display_name: My pool  # a display name for this pool

time_frames:
  a:
    # ... see "generic configuration/time frames"
  b:
    # ... see "generic configuration/time frames"

quests:  # processed first
  quest_id_1:
    # quest configuraiton (see below)
  quest_id_2:
    # quest configuraiton (see below)

quest_groups:  # processed second
  group_id_1:
    # quest group configuraiton (see below)
  group_id_2:
    # quest group configuraiton (see below)

order: RANDOM  # to respect the configuration order when processing quests/groups, or to select them randomly ; values : IN_ORDER, RANDOM

amount: 2  # the amount of quests or groups this pool will give tokens for, during every time frame
           # every quest that's given a token reduces the amount by 1
           # every group in which at least one quest is given a token reduces the amount by 1

amount_tolerance: COUNT_STARTED  # to subtract (or not) the count of quests/groups that are already active from
                                 # the amount of tokens to be given ; values : COUNT_STARTED, DONT_COUNT_STARTED

rewards:
  a:
    # reward configuration (see below)
  b:
    # reward configuration (see below)

任务配置

process_conditions:
  # ... conditions to respect for this pool to be processed (see "conditions")

pre_reset_token: true  # to reset the tokens for this quest before choosing which quests will be selected
pre_stop: true  # to stop this quest (if active) before choosing which quests will be selected
pre_reset_history: true  # to reset the history of this quest before choosing which quests will be selected

selected_reset_token: true  # to reset the tokens for this quest if it is selected
selected_stop: true  # to stop this quest (if active) if it is selected
selected_reset_history: true  # to reset the history of this quest if it is selected

min_tokens: 1  # the minimum amount of tokens to randomly give if this quest is selected
max_tokens: 2  # the maximum amount of tokens to randomly give if this quest is selected

refund_token_on_end_types: [CANCEL]  # to refund the token if the quest ends with some specific types ; values : SUCCESS, FAIL, CANCEL, COOP_LEAVE

池组设置

process_conditions:
  # ... conditions to respect for this pool to be processed (see "conditions")

pre_reset_token: true  # to reset the tokens for the quests of this groups before choosing which quests will be selected
pre_stop: true  # to stop the quests of this groups (if active) before choosing which quests will be selected
pre_reset_history: true  # to reset the history of the quests of this groups before choosing which quests will be selected

selected_reset_token: true  # to reset the tokens for the quests of this groups if it is selected
selected_stop: true  # to stop the quests of this groups (if active) if it is selected
selected_reset_history: true  # to reset the history of the quests of this groups if it is selected

amount: 1  # the amount of quests in this group that will be given tokens if it's selected

min_tokens: 1  # the minimum amount of tokens to randomly give if this group is selected
max_tokens: 2  # the maximum amount of tokens to randomly give if this group is selected

refund_token_on_end_types: [CANCEL]  # to refund the token if the quest ends with some specific types ; values : SUCCESS, FAIL, CANCEL, COOP_LEAVE

奖励配置

You can add rewards for when the player completes the pool for a time frame. More specifically, a pool will be considered as ‘done’ and will be given rewards when a quest from this pool is completed and there are no more quests configured in the pool have tokens.

Rewards are under the form of quest objects. Only timer-driven objects are allowed, so most SERVER objects.

Each object in the rewards list (above) can be performed exclusively if it matches a certain streak in the pool. The streak for a pool is increased when it’s finished in a time period. The streak will be reset to 0 when the pool must reprocess but the player still has tokens for some of its quests.

object:

  # ... the object to perform (see "quest objects")



min_streak: 1  # the minimum required streak for this object to be performed

max_streak: 5  # the maximum streak ; the object will not be performed if the current streak is greater

任务组

You create group of quests to apply some properties. They’re located under /quest_groups/.

分组设置

models: [quest_1,quest_2]  # a list of quests for this group



max_concurrent: 1  # the maximum amount of active concurrent quests from this group



execution_order: true  # to require the player to complete the quests in order

Goto|前往类型

普通:

  • OBJECT <object from the same branch> : set the current branch object (it can be the same object to loop it)
  • BRANCH <branch id> : stops the current branch and starts another one

任务结束:

  • QUEST_SUCCESS : stops the quest as successfully completed
  • QUEST_SUCCESS_THEN_START : stops the quest as successfully completed, then start another quest
  • QUEST_SUCCESS_THEN_START_BYPASS : stops the quest as successfully completed, then start another quest (bypassing start restrictions)
  • QUEST_FAIL : stops the quest as failed
  • QUEST_FAIL_THEN_START : stops the quest as failed, then start another quest
  • QUEST_FAIL_THEN_START_BYPASS : stops the quest as failed, then start another quest (bypassing start restrictions)
  • QUEST_CANCEL : cancel the quest
  • QUEST_CANCEL_THEN_START : cancel the quest, then start another quest
  • QUEST_CANCEL_THEN_START_BYPASS : cancel the quest, then start another quest (bypassing start restrictions)
  • QUEST_COOP_LEAVE : leave the quest, if the player is a coop player and allowed to leave it (this will be useful in individual branches)
  • QUEST_COOP_LEAVE_OR_STOP : leave the quest, if the player is a coop player and allowed to leave it, or cancel it, if the player is the quest leader

任务身份

Some objects and settings allow you to apply them only to some actors of the quest. An actor is a player inside a quest.

For player-driven objects, this setting will restrict who can progress the object. For server-driven objects, it’ll restrict to who the effects of the object will be applied.

Actor types :

  • NONE|无 : no restriction, all players in the quest
  • ROLE LEADER|队长 : only the quest leader
  • ROLE COOP : only the coop players (so every player except the leader)
  • RANDOM : select a random player in the quest
  • JOIN_ORDER <list of numbers, separated by a space> : only the players at the specific join order ; order start at 0 and the first in the join order list is always the leader

Example for the join order one : JOIN_ORDER 1 2 will be players who joined at order 1 and 2. JOIN_ORDER 2 would be only the second player.

记录点

Each quest can have at most one active checkpoint. When an object with a defined checkpoint starts, it overwrites the current checkpoint, says what information must be saved and when the checkpoint should be restored.

checkpoint:

  # Things to save
  save_location: true  # to save the location of all players
  save_specific_location: world,x,y,z  # to save a specific location instead of the players' location
  save_branches: true  # to save the current states of all branches
  save_individual_branches: true  # to save the current states of all individual branches
  save_model_variables: true  # to save the current model variables
  save_user_variables: []  # a list of user variables to save

  # When to restore them
  restore_on_respawn: RESTORE_TYPE  # when the player respawns
  restore_on_connect: RESTORE_TYPE  # when the player reconnects
  restore_on_resume: RESTORE_TYPE  # when the quest resumes
  restore_conditons:
    # ... some extra conditions that will lead to checkpoint restore if respected (see "conditions")
  individual_restore_conditons:
    # ... some extra conditions that will lead to individual checkpoint restore if respected (see "conditions")

RESTORE_TYPE can be either GLOBAL, INDIVIDUAL or NONE. Global will restore the checkpoint of the whole quest, and individual will restore only the particular player’s location and individual branches. If the checkpoint is restored individually for GuillaumeVDN, coop player Notch will not get his location or individual branches restored.

任务点数

Quest points are separated in different categories, so you can have different points leaderboards. You have to register those categories in /points_categories.yml.

You can modify those points using the SERVERLOGICPOINTS object and use them as a requirement using the LOGICQUESTPOINTS condition.

They can be seen and manipulated using the /qc points command. You can display them in GUIs and open ranking GUIs that will display the player’s points.

任务目标

设置

显示设置

预目标设置

激活设置

目标结束设置

位置设置

所需物品设置

进度条件设置

事件驱动目标设置

计时驱动目标设置

特殊类型

NONE|无

GROUP|分组

RANDOM|随机前往

CONDITIONS_SWITCH|条件切换

LOGIC_SWITCH|逻辑切换

DIVERGE_CHAT|聊天分支

DIVERGE_GUI|GUI分支

DIVERGE_OBJECTS|目标分支

PLAYER玩家类型

方块

实体

物品

移动

物理

其它

SERVER服务器类型

SERVER_ACTIONS|服务器操作

实体

物品

物理

逻辑

其它

条件

设置

条件元素

条件配置

类型

GUI

GUI

物品设置

物品类型