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

GuillaumeVDN的插件文档/QuestCreator/详细特性:修订间差异

来自Minecraft插件百科
跳转到导航 跳转到搜索
(创建页面,内容为“{{模板:VDNBox}} =任务模型设置= ==显示== ==GUI物品== ==限制== ==完成/限时/冷却== ==同时进行任务数/玩家/组队== ==保存任务== ==变量…”)
 
无编辑摘要
第1行: 第1行:
{{模板:VDNBox}}
{{模板:VDNBox}}
=任务模型设置=
= 任务模型 =
==显示==
==GUI物品==
==限制==
==完成/限时/冷却==
==同时进行任务数/玩家/组队==
==保存任务==
==变量==
==激活器==
==分支/目标==
=任务分支=
==分支设置==
==分支类型==
==独立分支==


=任务激活器=
== 全部模型设置 ==
==激活器设置==
==激活器类型==
===NONE|无===
===AUTO|自动===
===POSITION|位置===
===物理激活器===
====显示设置====
====交互设置====
====GUI设置====
===POSITIONS_INTERACT|位置交互===
===ENTITIES|实体===


=任务池=
=== 显示 ===
==设置==
 
==任务配置==
<source lang="yaml">display_name: '&aA more friendly name for this quest'
==池组配置==
 
==奖励配置==
 
 
description: |
 
  &7A description for this quest,
 
  &7to tell the user what will happen here.
 
 
 
description_placeholder: |
 
  &7An alternate, multiple-lines placeholder
 
  &7that can be used with PlaceholderAPI (see "generic placeholders").
 
 
 
information_message: >
 
  &aMessage sent to the player when he clicks this quest's item in any GUI, if he didn't start the quest yet.
 
 
 
progress_notify:
 
  # ... to be sent every once in a while to inform the players of their current progression (see "generic configuration/notifications")
 
 
 
progress_notify_scoreboard: true  # to allow this quest to be on the scoreboard
 
 
 
# Display priority
 
# With this, you can define what quest will be preferred to display for the actionbar/scoreboard/etc.
 
# Quests will be sorted depending on their priority, and depending on their last date of progression if they have the same priority.
 
# This setting is optional, but quests with no set priority will always be behind quests with a set priority.
 
# Note that GUI items won't be affected by this priority
 
display_priority: 1</source>
=== GUI物品 ===
 
Quests can be displayed in GUIs. For each quest model, you can specify a list of items (eventually depending on their current status).
 
Keep in mind that different controls options will be added to the lore depending on the status. For instance, stopping/leaving an active quest, or starting it. Those are messages that can be configured in texts.
 
<source lang="yaml">status_items:
  AVAILABLE:
    # item for when the quest can be started
  PROGRESS:
    # item for when the quest is active
  COOLDOWN:
    # item for when the quest is on cooldown
  UNAVAILABLE:
    # item for when the quest can't be started
  COMPLETED:
    # item for when the quest is completed (when the max completion count has been reached)
 
all_status_items:
  # to set the same item regardless of the quest state
  # if a state doesn't have an item, the plugin will fallback on this</source>
Placeholders for all status :
 
* <code>{quest}</code> : quest name
* <code>{description}</code> : quest description
* <code>{controls}</code> : dynamic controls list depending on what the player can do ; if there are no controls, this placeholder will be blank
* <code>{completions}</code> : completion text for this quest ; if the quest was not yet completed, this placeholder will be blank
* <code>{last_completion}</code> : last completion text for this quest ; if the quest was not yet completed, this placeholder will be blank
* <code>{cooldown}</code> : cooldown text for this quest ; if the quest was no cooldown, this placeholder will be blank
* <code>{detailed_progression}</code> : the detailed progression for this quest ; if the quest is not active, this placeholder will be blank
* <code>{detailed_errors}</code> : the text explaining why the player can’t start the quest ; if the quest is not ‘unavailable’, this placeholder will be blank
 
Placeholders for status PROGRESS :
 
* <code>{players}</code> : the players ; if this is not a coop quest, this placeholder will be blank
* You can also use the quest placeholders listed [http://www.guillaumevdn.com/plugins/doc/#/generic/placeholders?id=custom-placeholders here].
 
=== 限制 ===
 
<source lang="yaml">permission_start_restriction: questcreator.quest.my_quest  # a permission required to start this quest
 
conditions_start_restriction:
  # ... some conditions that must be respected to start this quest (see "conditions")
 
world_restriction:  # a restriction for worlds
  whitelist: |
    list_of_worlds
    to_allow
  blacklist: |
    list_of_worlds
    to_deny
 
command_restriction:  # a restriction for commands when the quest is active
  whitelist: |
    /list of commands
    /to allow
  blacklist: |
    /list of commands
    /to deny</source>
=== 完成/限时/冷却 ===
 
<source lang="yaml">completion:
  max_completions: 10  # the maximum amount of times the player can complete this quest
  apply_actor_restriction:
    # ... to mark the quest as completed only for some actors (see "miscellaneous/actors")
  notify:
    SUCCESS:
      # ... to be sent when the quest is completed (see "generic configuration/notifications")
    # ... keys : SUCCESS, FAIL, CANCEL
  notify_coop:
    SUCCESS:
      # ... to be sent when the quest is completed, specific for the coop players (see "generic configuration/notifications")
    # ... keys : SUCCESS, FAIL, CANCEL
 
time_limit:
  duration: 1 HOUR  # quest must be completed under that time
  reminder:
    # ... to be sent every once in a while to remind the player of the remaining time (see "generic configuration/notifications")
    # - placeholder for remaining time : {time}
  fail_goto: QUEST_FAIL  # a goto to apply when the time is over
 
cooldown:
  duration: 12 HOUR
  end_types: [SUCCESS]  # to apply cooldown only for some end types ; values : SUCCESS, FAIL, CANCEL, COOP_LEAVE
  apply_actor_restriction:
    # ... to set the cooldown only for some actors (see "miscellaneous/actors")</source>
=== 同时进行任务数/玩家/组队 ===
 
<source lang="yaml">max_concurrent_instances: 5  # the maximum amount of active instances of this quest
 
# To add the player / group of player to a queue for this model if there are too many instances at the moment
max_concurrent_instances_queue: true
 
# The minimum/maximum player count (counting the leader)
min_players: 1
max_players: 3  # set this to more than 1 to allow coop players
 
# To allow coop players to leave the quest, set this to less than the max player count
# Coop players will be allowed to leave the quest until there's only that remaining player count
min_active_players: 2
 
allow_leader_stop: true  # allow the leader to stop the quest
 
# Dispose quest on leader disconnect
# Set this to false to allow coop players to keep progressing the quest when the leader is offline
# This is not recommended if you're using variables in the quest
dispose_on_leader_disconnect: true
 
# Allow other players to parse the quest settings
# This is a useful thing to enable if some of your settings contain variables, as we don't want to take the coop player's value
only_leader_parsing: true
 
notify_coop_player_leave:
  # ... to be sent when a coop player leaves (see "generic configuration/notifications")</source>
=== 保存任务 ===
 
<source lang="yaml">saving: ENABLED</source>
Values :
 
* <code>ENABLED</code> : the quest will be saved to disk/database
* <code>PLUGIN_ACTIVE</code> : the quest will remain active as long as the plugin is active
* <code>PLAYER_ONLINE</code> : the quest will remain active as long as the plugin is active and the player is online
 
=== 变量 ===
 
<source lang="yaml"># The default model variables values
model_variables:
  my_variable: default value</source>
=== 激活器 ===
 
<source lang="yaml"># The activators for this quest (see "quest activators")
activators: |
  first_activator
  second_activator
 
# To set a dialog with the activators before actually starting the quest (only works with physical activators : npcs/blocks/...)
# Every time the player wil click the activator, the next dialog message will be sent
# Once there are no more messages, a confirmation GUI might open (or not, if that option is disabled in config) to start the quest
activators_dialog: |
  &7嘿!
  &7你想接点任务吗?
 
# To automatically send the first dialog line when the player is under a certain radius
activators_dialog_auto_start_distance: 3.5
 
# To reset the dialog under certain conditions
activators_dialog_reset:
  reset_delay: 30 SECOND  # to reset it after a certain time
  reset_distance: 5  # to reset it if the player walks away
  reset_notify:
    # ... to be sent when the dialog is reset (see "generic configuration/notifications")</source>
=== 分支/目标 ===
 
<source lang="yaml"># The branches for our quest
 
branches:
 
  branch_1:
 
    # ... see ("quest branches")
 
  branch_2:
 
    # ... see ("quest branches")
 
 
 
# To perform some objects when the quest is over, for some end types
 
end_objects:
 
  SUCCESS:
 
    # ... a list of objects to perform when the quest succeeds
 
  FAIL:
 
    # ... a list of objects to perform when the quest fails
 
  CANCEL:
 
    # ... a list of objects to perform when the quest is cancelled
 
  COOP_LEAVE:
 
    # ... a list of objects to perform for coop players when they leave the quest
 
 
 
# To perform the end objects even for offline coop players (when they reconnect later)
 
end_objects_for_offline_players: true</source>
 
= 任务分支 =
 
== 分支设置 ==
 
<source lang="yaml">starts_directly: true  # to make the branch start directly on quest start
 
starts_at: OBJECT_1  # wat object should the branch start at
 
# List of objects for this branch
objects:
  OBJECT_1:
    # ... (see "quest objects")
  OBJECT_2:
    # ... (see "quest objects")</source>
== 分支类型 ==
 
默认分支类型
 
<source lang="yaml">type: NONE  # 这是默认类型 so you don't actually have to write this line
 
 
 
display_name: >  # display name of this branch (optional)
 
  &aMy cool branch</source>
Secret branch, this one won’t appear in progression or display (actionbar/scoreboard/…) :
 
<source lang="yaml">type: SECRET</source>
== 独立分支 ==
 
Those are only really relevant for coop quests. If you use individual branches for solo quests, it’ll basically have the same effects as a regular branch, and just be overall confusing, so don’t do that.
 
Individual branches are specific to every player in the quest. So, player GuillaumeVDN could have a running individual branch <code>my_branch</code>, and player Notch could have a different state for that branch, or even not have it active at all.
 
They’re mainly useful to perform effects specific to a single player, or have different progression for different players in the quest. You can trigger them manually in a SERVER_ACTIONS object, and also in each event object.
 
For instance :
 
<source lang="yaml">branches:
 
 
 
  TRIGGER_BRANCH:
 
    starts_directly: true
 
    starts_at: TRIGGER
 
    objects:
 
      TRIGGER:
 
        type: PLAYER_CONNECT
 
        goto_individual_branches: [INDIVIDUAL_BRANCH]  # this starts the individual branch for the player who reconnects
 
        goto: OBJECT TRIGGER  # loop the trigger so it's always active
 
 
 
  INDIVIDUAL_BRANCH:
 
    starts_directly: false
 
    starts_at: EFFECT
 
    objects:
 
      EFFECT:
 
        type: SERVER_PLAYER_EFFECTS_GIVE
 
        start_notify:
 
          message: >
 
            &aWelcome back, {player} &a! Here's a speed II effect.
 
        effects:
 
          a:
 
            type: SPEED
 
            amplifier: 1
 
            duration: 1 MINUTE
 
        # no goto, so the branch stops instantly
 
        # so here, only the player who just reconnected gets a speed II effect. other players, who might be connected, wil not receive the effect.</source>
It should be noted that goto’s called from an individual branch will be applied to individual branches. For instance, if you a <code>BRANCH MY_BRANCH</code> goto is called from an individual branch, the branch will be started for the same individual, not for the whole quest.
 
 
= 任务激活器 =
 
Activators are located under <code>/quest_activators/</code>.
 
== 激活器设置 ==
 
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.
 
<source lang="yaml">type: AUTO  # 示例</source>
== 激活器类型 ==
 
=== 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.
 
<source lang="yaml">type: AUTO
delay: 15 SECOND  # the check delay</source>
=== POSITION|位置 ===
 
The quests will automatically every once the player matches a certain position.
 
<source lang="yaml">type: POSITION
position:
  # ... the position to match to start the quest (see "generic configuration/position")
delay: 15 SECOND  # the check delay</source>
=== 物理激活器 ===
 
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.
 
<source lang="yaml">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")</source>
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.
 
==== 交互设置 ====
 
<source lang="yaml">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</source>
==== GUI设置 ====
 
<source lang="yaml">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</source>
==== POSITIONS_INTERACT|位置交互 ====
 
The quest will automatically every once the player interacts with blocks in certain positions.
 
<source lang="yaml">type: POSITIONS_INTERACT
positions:
  # ... the position to match to start the quest (see "generic configuration/position")</source>
==== ENTITIES|实体 ====
 
The quest will automatically every once the player interacts with certain entities.
 
<source lang="yaml">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)</source>
= 任务池 =
 
任务池位于 <code>/quest_pools/</code>.
 
== 设置 ==
 
<source lang="yaml">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)</source>
== 任务配置 ==
 
<source lang="yaml">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</source>
== 池组设置 ==
 
<source lang="yaml">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</source>
== 奖励配置 ==
 
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 [http://www.guillaumevdn.com/plugins/doc/#/questcreator/detailed/quest_objects_types_server 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.
 
<source lang="yaml">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</source>
= 任务组 =
 
You create group of quests to apply some properties. They’re located under <code>/quest_groups/</code>.
 
== 分组设置 ==
 
<source lang="yaml">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</source>
= Goto|前往类型 =


=任务组=
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|前往=
==Goto类型==
普通:
普通:


* OBJECT <object from the same branch>:set the current branch object (it can be the same object to loop it)
* <code>OBJECT &lt;object from the same branch&gt;</code> : 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
* <code>BRANCH &lt;branch id&gt;</code> : stops the current branch and starts another one
 
任务结束:
任务结束:


* QUEST_SUCCESS:stops the quest as successfully completed
* <code>QUEST_SUCCESS</code> : stops the quest as successfully completed
* QUEST_SUCCESS_THEN_START:stops the quest as successfully completed, then start another quest
* <code>QUEST_SUCCESS_THEN_START</code> : 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)
* <code>QUEST_SUCCESS_THEN_START_BYPASS</code> : stops the quest as successfully completed, then start another quest (bypassing start restrictions)
* QUEST_FAIL:stops the quest as failed
* <code>QUEST_FAIL</code> : stops the quest as failed
* QUEST_FAIL_THEN_START:stops the quest as failed, then start another quest
* <code>QUEST_FAIL_THEN_START</code> : 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)
* <code>QUEST_FAIL_THEN_START_BYPASS</code> : stops the quest as failed, then start another quest (bypassing start restrictions)
* QUEST_CANCEL:cancel the quest
* <code>QUEST_CANCEL</code> : cancel the quest
* QUEST_CANCEL_THEN_START:cancel the quest, then start another quest
* <code>QUEST_CANCEL_THEN_START</code> : cancel the quest, then start another quest
* QUEST_CANCEL_THEN_START_BYPASS:cancel the quest, then start another quest (bypassing start restrictions)
* <code>QUEST_CANCEL_THEN_START_BYPASS</code> : 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)
* <code>QUEST_COOP_LEAVE</code> : 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
* <code>QUEST_COOP_LEAVE_OR_STOP</code> : 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.
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.
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 :
 
* <code>NONE|无</code> : no restriction, all players in the quest
* <code>ROLE LEADER|队长</code> : only the quest leader
* <code>ROLE COOP</code> : only the coop players (so every player except the leader)
* <code>RANDOM</code> : select a random player in the quest
* <code>JOIN_ORDER &lt;list of numbers, separated by a space&gt;</code> : 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 : <code>JOIN_ORDER 1 2</code> will be players who joined at order 1 and 2. <code>JOIN_ORDER 2</code> would be only the second player.
 
= 记录点 =


* NONE:无限制
* ROLE 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.
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:
<source lang="yaml">checkpoint:
 
  # Things to save
  # Things to save
  save_location: true  # to save the location of all players
  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_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_branches: true  # to save the current states of all branches
  save_individual_branches: true  # to save the current states of all individual 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_model_variables: true  # to save the current model variables
  save_user_variables: []  # a list of user variables to save
  save_user_variables: []  # a list of user variables to save
 
  # When to restore them
  # When to restore them
  restore_on_respawn: RESTORE_TYPE  # when the player respawns
  restore_on_respawn: RESTORE_TYPE  # when the player respawns
  restore_on_connect: RESTORE_TYPE  # when the player reconnects
  restore_on_connect: RESTORE_TYPE  # when the player reconnects
  restore_on_resume: RESTORE_TYPE  # when the quest resumes
  restore_on_resume: RESTORE_TYPE  # when the quest resumes
  restore_conditons:
  restore_conditons:
    # ... some extra conditions that will lead to checkpoint restore if respected (see "conditions")
    # ... some extra conditions that will lead to checkpoint restore if respected (see "conditions")
  individual_restore_conditons:
  individual_restore_conditons:
    # ... some extra conditions that will lead to individual checkpoint restore if respected (see "conditions")
    # ... some extra conditions that will lead to individual checkpoint restore if respected (see "conditions")</source>
RESTORE_TYPE can be either <code>GLOBAL</code>, <code>INDIVIDUAL</code> or <code>NONE</code>. 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 <code>/points_categories.yml</code>.


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.
You can modify those points using the [http://www.guillaumevdn.com/plugins/doc/#/questcreator/detailed/quest_objects_types_server?id=type-server_logic_points SERVER''LOGIC''POINTS] object and use them as a requirement using the [http://www.guillaumevdn.com/plugins/doc/#/questcreator/detailed/conditions?id=type-logic_quest_points LOGIC''QUEST''POINTS] condition.
=任务点=
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 SERVER_LOGIC_POINTS object and use them as a requirement using the LOGIC_QUEST_POINTS condition.
They can be seen and manipulated using the <code>/qc points</code> command. You can display them in GUIs and open ranking GUIs that will display the player’s points.


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.
=任务目标=
=任务目标=
==设置==
==设置==

2020年10月24日 (六) 08:36的版本

GuillaumeVDN的插件文档
页面

GuillaumeVDN的插件文档 · 迁移

所有插件都有的常见内容

配置 · 杂项 · 关联

QuestCreator

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

任务模型

全部模型设置

显示

display_name: '&aA more friendly name for this quest'



description: |

  &7A description for this quest,

  &7to tell the user what will happen here.



description_placeholder: |

  &7An alternate, multiple-lines placeholder

  &7that can be used with PlaceholderAPI (see "generic placeholders").



information_message: >

  &aMessage sent to the player when he clicks this quest's item in any GUI, if he didn't start the quest yet.



progress_notify:

  # ... to be sent every once in a while to inform the players of their current progression (see "generic configuration/notifications")



progress_notify_scoreboard: true  # to allow this quest to be on the scoreboard



# Display priority

# With this, you can define what quest will be preferred to display for the actionbar/scoreboard/etc.

# Quests will be sorted depending on their priority, and depending on their last date of progression if they have the same priority.

# This setting is optional, but quests with no set priority will always be behind quests with a set priority.

# Note that GUI items won't be affected by this priority

display_priority: 1

GUI物品

Quests can be displayed in GUIs. For each quest model, you can specify a list of items (eventually depending on their current status).

Keep in mind that different controls options will be added to the lore depending on the status. For instance, stopping/leaving an active quest, or starting it. Those are messages that can be configured in texts.

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

all_status_items:
  # to set the same item regardless of the quest state
  # if a state doesn't have an item, the plugin will fallback on this

Placeholders for all status :

  • {quest} : quest name
  • {description} : quest description
  • {controls} : dynamic controls list depending on what the player can do ; if there are no controls, this placeholder will be blank
  • {completions} : completion text for this quest ; if the quest was not yet completed, this placeholder will be blank
  • {last_completion} : last completion text for this quest ; if the quest was not yet completed, this placeholder will be blank
  • {cooldown} : cooldown text for this quest ; if the quest was no cooldown, this placeholder will be blank
  • {detailed_progression} : the detailed progression for this quest ; if the quest is not active, this placeholder will be blank
  • {detailed_errors} : the text explaining why the player can’t start the quest ; if the quest is not ‘unavailable’, this placeholder will be blank

Placeholders for status PROGRESS :

  • {players} : the players ; if this is not a coop quest, this placeholder will be blank
  • You can also use the quest placeholders listed here.

限制

permission_start_restriction: questcreator.quest.my_quest  # a permission required to start this quest

conditions_start_restriction:
  # ... some conditions that must be respected to start this quest (see "conditions")

world_restriction:  # a restriction for worlds
  whitelist: |
    list_of_worlds
    to_allow
  blacklist: |
    list_of_worlds
    to_deny

command_restriction:  # a restriction for commands when the quest is active
  whitelist: |
    /list of commands
    /to allow
  blacklist: |
    /list of commands
    /to deny

完成/限时/冷却

completion:
  max_completions: 10  # the maximum amount of times the player can complete this quest
  apply_actor_restriction:
    # ... to mark the quest as completed only for some actors (see "miscellaneous/actors")
  notify:
    SUCCESS:
      # ... to be sent when the quest is completed (see "generic configuration/notifications")
    # ... keys : SUCCESS, FAIL, CANCEL
  notify_coop:
    SUCCESS:
      # ... to be sent when the quest is completed, specific for the coop players (see "generic configuration/notifications")
    # ... keys : SUCCESS, FAIL, CANCEL

time_limit:
  duration: 1 HOUR  # quest must be completed under that time
  reminder:
    # ... to be sent every once in a while to remind the player of the remaining time (see "generic configuration/notifications")
    # - placeholder for remaining time : {time}
  fail_goto: QUEST_FAIL  # a goto to apply when the time is over

cooldown:
  duration: 12 HOUR
  end_types: [SUCCESS]  # to apply cooldown only for some end types ; values : SUCCESS, FAIL, CANCEL, COOP_LEAVE
  apply_actor_restriction:
    # ... to set the cooldown only for some actors (see "miscellaneous/actors")

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

max_concurrent_instances: 5  # the maximum amount of active instances of this quest

# To add the player / group of player to a queue for this model if there are too many instances at the moment
max_concurrent_instances_queue: true

# The minimum/maximum player count (counting the leader)
min_players: 1
max_players: 3  # set this to more than 1 to allow coop players

# To allow coop players to leave the quest, set this to less than the max player count
# Coop players will be allowed to leave the quest until there's only that remaining player count
min_active_players: 2

allow_leader_stop: true  # allow the leader to stop the quest

# Dispose quest on leader disconnect
# Set this to false to allow coop players to keep progressing the quest when the leader is offline
# This is not recommended if you're using variables in the quest
dispose_on_leader_disconnect: true

# Allow other players to parse the quest settings
# This is a useful thing to enable if some of your settings contain variables, as we don't want to take the coop player's value
only_leader_parsing: true

notify_coop_player_leave:
  # ... to be sent when a coop player leaves (see "generic configuration/notifications")

保存任务

saving: ENABLED

Values :

  • ENABLED : the quest will be saved to disk/database
  • PLUGIN_ACTIVE : the quest will remain active as long as the plugin is active
  • PLAYER_ONLINE : the quest will remain active as long as the plugin is active and the player is online

变量

# The default model variables values
model_variables:
  my_variable: default value

激活器

# The activators for this quest (see "quest activators")
activators: |
  first_activator
  second_activator

# To set a dialog with the activators before actually starting the quest (only works with physical activators : npcs/blocks/...)
# Every time the player wil click the activator, the next dialog message will be sent
# Once there are no more messages, a confirmation GUI might open (or not, if that option is disabled in config) to start the quest
activators_dialog: |
  &7嘿!
  &7你想接点任务吗?

# To automatically send the first dialog line when the player is under a certain radius
activators_dialog_auto_start_distance: 3.5

# To reset the dialog under certain conditions
activators_dialog_reset:
  reset_delay: 30 SECOND  # to reset it after a certain time
  reset_distance: 5  # to reset it if the player walks away
  reset_notify:
    # ... to be sent when the dialog is reset (see "generic configuration/notifications")

分支/目标

# The branches for our quest

branches:

  branch_1:

    # ... see ("quest branches")

  branch_2:

    # ... see ("quest branches")



# To perform some objects when the quest is over, for some end types

end_objects:

  SUCCESS:

    # ... a list of objects to perform when the quest succeeds

  FAIL:

    # ... a list of objects to perform when the quest fails

  CANCEL:

    # ... a list of objects to perform when the quest is cancelled

  COOP_LEAVE:

    # ... a list of objects to perform for coop players when they leave the quest



# To perform the end objects even for offline coop players (when they reconnect later)

end_objects_for_offline_players: true

任务分支

分支设置

starts_directly: true  # to make the branch start directly on quest start

starts_at: OBJECT_1  # wat object should the branch start at

# List of objects for this branch
objects:
  OBJECT_1:
    # ... (see "quest objects")
  OBJECT_2:
    # ... (see "quest objects")

分支类型

默认分支类型

type: NONE  # 这是默认类型 so you don't actually have to write this line



display_name: >  # display name of this branch (optional)

  &aMy cool branch

Secret branch, this one won’t appear in progression or display (actionbar/scoreboard/…) :

type: SECRET

独立分支

Those are only really relevant for coop quests. If you use individual branches for solo quests, it’ll basically have the same effects as a regular branch, and just be overall confusing, so don’t do that.

Individual branches are specific to every player in the quest. So, player GuillaumeVDN could have a running individual branch my_branch, and player Notch could have a different state for that branch, or even not have it active at all.

They’re mainly useful to perform effects specific to a single player, or have different progression for different players in the quest. You can trigger them manually in a SERVER_ACTIONS object, and also in each event object.

For instance :

branches:



  TRIGGER_BRANCH:

    starts_directly: true

    starts_at: TRIGGER

    objects:

      TRIGGER:

        type: PLAYER_CONNECT

        goto_individual_branches: [INDIVIDUAL_BRANCH]  # this starts the individual branch for the player who reconnects

        goto: OBJECT TRIGGER  # loop the trigger so it's always active



  INDIVIDUAL_BRANCH:

    starts_directly: false

    starts_at: EFFECT

    objects:

      EFFECT:

        type: SERVER_PLAYER_EFFECTS_GIVE

        start_notify:

          message: >

            &aWelcome back, {player} &a! Here's a speed II effect.

        effects:

          a:

            type: SPEED

            amplifier: 1

            duration: 1 MINUTE

        # no goto, so the branch stops instantly

        # so here, only the player who just reconnected gets a speed II effect. other players, who might be connected, wil not receive the effect.

It should be noted that goto’s called from an individual branch will be applied to individual branches. For instance, if you a BRANCH MY_BRANCH goto is called from an individual branch, the branch will be started for the same individual, not for the whole quest.


任务激活器

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

物品设置

物品类型