插件手册:betonquest:高级技巧

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
插件手册:betonquest:高级技巧 [2019/02/01 08:30]
小小k酱 [让NPC表现得更随机一些] 翻译
插件手册:betonquest:高级技巧 [2019/02/01 12:17] (当前版本)
小小k酱 [让NPC表现得更随机一些]
行 3: 行 3:
 (版本:2018-10-16 翻译:kjiang [[https://github.com/Co0sh/BetonQuest/blob/b18b2b1521d79e3020864808f1d5c59f39f28361/docs/11-Tips-and-tricks.md|原文链接]]) (版本:2018-10-16 翻译:kjiang [[https://github.com/Co0sh/BetonQuest/blob/b18b2b1521d79e3020864808f1d5c59f39f28361/docs/11-Tips-and-tricks.md|原文链接]])
  
 +(为便于理解,本文和原文有所出入)
 ===== Handling death in your quests ===== ===== Handling death in your quests =====
  
行 19: 行 20:
 Starting the random quest must be blocked with a special tag. If there is no such tag, the conversation option should appear. Create a few quests, each of them started with single ''folder'' event (they **must** be started by single event!). Now add those events to another ''folder'' event and make it ''random:1''. At the end of every quest add ''delay'' which will reset the special blocking tag. Now add that ''folder'' event to the conversation option. When the player chooses it he will start one random quest, and the conversation option will become available after defined in ''delay'' objective time after completing the quest. Starting the random quest must be blocked with a special tag. If there is no such tag, the conversation option should appear. Create a few quests, each of them started with single ''folder'' event (they **must** be started by single event!). Now add those events to another ''folder'' event and make it ''random:1''. At the end of every quest add ''delay'' which will reset the special blocking tag. Now add that ''folder'' event to the conversation option. When the player chooses it he will start one random quest, and the conversation option will become available after defined in ''delay'' objective time after completing the quest.
  
-===== Each day different quest (same for every player) =====+===== 每日固定随机任务 =====
  
-To do this use something called "[[https://github.com/Co0sh/BetonQuest/wiki/Other-important-stuff#static-events|Static event]]"Using the static event run ''folder'' event every day at some late hour (for example 4am)The ''folder'' event should be ''random:1'' and contain several different ''setblock'' events. These events will set some specific block to several different material types (for example dirtstonewood, sand etc)Now when the player starts the conversation and asks about the daily quest the NPC should check (using ''testforblock'' condition) which type of block is currently set and give the player different quest, depending on the block type.+(所有人都是同一个随机任务) 
 + 
 +通过设置[[插件手册:betonquest:基本概念#静态事件_static_events|静态事件]],配合[[插件手册:betonquest:事件列表#事件包folder|事件包folder]]就可以创建一个每天都固定的随机任务。思路是让BetonQuest每天在固定的时刻随机更改某个座标上的方块,然后在玩家和NPC对话中,判断这个座标上的方块种类,展示相对应的对话内容。 
 + 
 +具体实现步骤如下: 
 +  - 首先编辑你的__main.yml__,在**static**新增加一个静态事件(如果没有static就创建一个。):<file yaml main.yml> 
 +static: 
 +  '23:59': 刷新随机任务 
 +</file>这会在每天的23:59刷新这个随机任务。 
 +  - 然后在__events.yml__创建一个叫“刷新随机任务”的事件:<file yaml events.yml> 
 +刷新随机任务: folder 改成紫色羊毛,改成黄色羊毛,改成黑色羊毛 random:1 
 +</file>这里的“改成紫色羊毛”是另一个事件,它会修改某个座标的方块种类,例如:<file yaml events.yml> 
 +刷新随机任务: folder 改成紫色羊毛,改成黄色羊毛,改成黑色羊毛 random:1 
 +改成紫色羊毛: setblock PURPLE_WOOL 123;64;456;world 
 +改成黄色羊毛: setblock YELLOW_WOOL 123;64;456;world 
 +改成黑色羊毛: setblock BLACK_WOOL 123;64;456;world 
 +</file>(你可以查看[[插件手册:betonquest:事件列表#设置方块setblock|设置方块setblock]]的用法和参数格式)例子中123;64;456;world座标是随便举的例子,你应该把这个座标设置在碰不到的地方,比如搜保护的领地内。 
 +  - 在任务NPC的各个初始对话中各插入一个[[插件手册:betonquest:条件列表#方块检测testforblock|方块检测testforblock]]条件__//conditions//__,比如:<file yaml conversations/工会NPC.yml> 
 +quester: 工会NPC 
 +start: 任务A,任务B,任务C 
 +NPC_options: 
 +  任务A: 
 +    text: '今天工会提供任务A哦,你要接受吗?' 
 +    conditions: 是紫色羊毛 
 +  任务B: 
 +    text: '今天工会提供任务B哦,你要接受吗?' 
 +    conditions: 是黄色羊毛 
 +  任务C: 
 +    text: '今天工会提供任务C哦,你要接受吗?' 
 +    conditions: 是黑色羊毛 
 +</file> 
 +  - 别忘了你的__conditions.yml__:<file yaml conditions.yml> 
 +是紫色羊毛: testforblock 123;64;456;world PURPLE_WOOL 
 +是黄色羊毛: testforblock 123;64;456;world YELLOW_WOOL 
 +是黑色羊毛: testforblock 123;64;456;world BLACK_WOOL 
 +</file>
  
 ===== 让NPC表现得更随机一些 ===== ===== 让NPC表现得更随机一些 =====
行 30: 行 66:
  
 <file yaml conversations/怀疑者.yml [enable_line_numbers="true"]> <file yaml conversations/怀疑者.yml [enable_line_numbers="true"]>
-quest: 怀疑者+quester: 怀疑者
 start: 初始对话 start: 初始对话
-npc_options:+NPC_options:
   初始对话:   初始对话:
     text: "我要怎么相信你?"     text: "我要怎么相信你?"
行 39: 行 75:
     text: "行吧,我相信你。"     text: "行吧,我相信你。"
     conditions: 相信的概率     conditions: 相信的概率
-  我怀疑:                 # 有35%的概率会显示+  我怀疑:                   # 有35%的概率会显示
     text: "我没空,下次再说吧。"     text: "我没空,下次再说吧。"
     conditions: 怀疑的概率     conditions: 怀疑的概率
-  我不信:                 # 有50%的概率会显示+  我不信:                   # 有50%的概率会显示
     text: "我不信,除非你证明给我看。"     text: "我不信,除非你证明给我看。"
     conditions: 不信的概率     conditions: 不信的概率
  • 插件手册/betonquest/高级技巧.1548981044.txt.gz
  • 最后更改: 2019/02/01 08:30
  • 小小k酱