插件手册:betonquest:快速教程

差别

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

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
插件手册:betonquest:快速教程 [2019/01/27 06:32]
小小k酱 搬运BQ英文文档(尚未翻译)
插件手册:betonquest:快速教程 [2019/02/01 12:20] (当前版本)
小小k酱 [BetonQuest快速教程]
行 1: 行 1:
-====== BetonQuest快速教学 ======+====== 快速教程 Quick Start Tutorial ======
  
 (版本:2018-10-16 翻译:kjiang [[https://github.com/Co0sh/BetonQuest/blob/b18b2b1521d79e3020864808f1d5c59f39f28361/docs/04-Quick-start-tutorial.md|原文链接]]) (版本:2018-10-16 翻译:kjiang [[https://github.com/Co0sh/BetonQuest/blob/b18b2b1521d79e3020864808f1d5c59f39f28361/docs/04-Quick-start-tutorial.md|原文链接]])
  
-The first thing you probably want to after installing the plugin is to check out how it's working. If you want to use inventory GUI open _config.yml_ and change ''default_conversation_IO'' to ''chest'', save the file and issue **/q reload** command on the server.+(为方便理解,本文和原文有出入)
  
-Now log in and place somewhere in the world a block of stained clayOn top of it put a head (can be a Creeper's head), and on the side of the clay block place a sign. Write this on first and second line:+成功安装完BetonQuest之后,你一定想先了解这个插件是怎么运作的吧?不过首先,如果你想修改对话展示方式,比如从文字该城GUI,你可以修改__config.yml__中的设置,把''default_conversation_IO''修改成''chest'',然后输入**/q reload**重载配置。
  
-<code yaml [enable_line_numbers="true"]> +BetonQuest在成功安装之后,会默认自带一个叫Innkeeper的简单任务。如果需要在服务器中启用这个任务,你首先需要创建一个NPC,这里有两种创建方法: 
-[NPC] +  * 如果你没有安装Citizens: 
-Innkeeper +    - 首先进入你的服务器,然后在地上摆放一个粘土块 
-</code>+    - 在粘土块的上方摆放一个头颅,你可用苦力怕头颅 
 +    - 在粘土块正面贴上牌子,并写上<code>[NPC] 
 +Innkeeper</code> 
 +    - 然后右键点击头颅,触发NPC任务对话 
 +  * 如果你安装了Citizens: 
 +    - 你只需要使用''/npc create Innkeeper''指令即可 
 +    - 右键这个刚创建的Citizens NPC即可触发对话 
 +如果NPC对话未能显示,你可能需要检查一下BetonQuest是否已被正确安装(使用**/bq version**指令确认),或NPC创建步骤是否有遗漏。
  
-Done. Now right-click on the NPC's head. The conversation should start. If it did not, check if you correctly built the NPC. Ask the Innkeeper for some quests. He will tell you to cut some trees. If you want, type **/journal** to get the journal and see a new entry. Now, don't try to place any wood blocks. BetonQuest will detect that and increase the number of blocks to destroy. Just go and find some trees. Cut them down and if you're in creative mode, give yourself 16 blocks of wood. Now you can return to Innkeeper and give him the wood. You will receive the reward.+如果没有问题,你就可以接着体验这个初始任务了。一开始这个NPC会向你提供一项简单任务,当你选择接受之后,你会被要求去砍一些树。在任务过程中你可以使用**/journal**指令查看//任务日志//以及一些新的任务提示。如果要完成这个任务,不要往地上拜放原木,否则BetonQuest会相应地增加你需要砍伐的原木。当你砍伐并收集到16个原木之后(你也可以从创造模式直接拿16个原木),返回Innkeeper NPC与之对话,它会把你的木头收走并给予你奖励。
  
-===== Using events and conditions =====+===== eventsconditions开始 =====
  
-Now that you know how a (very) simple quest looks like time to start learning how to write something similar. Let's start with events. We won't do conversations just now, since they heavily use events and conditions, so you need to know them first. You can read complete reference to events in the _Reference_ chapter. Do that now or just continue with this tutorial.+现在你已大概了解一个简单的任务是什么样子的了,那么该怎么设计出一个类似的呢?我们先从__//events事件//__和__//conditions条件//__开始入手:
  
-==== Events ====+==== 事件 Events ====
  
-Let's just open _events.yml_ file inside the _default_ package. At the end add a new line:+我们先打开__default__文件夹中的__events.yml__文件,然后在后面加入新的一行:
  
-<code yaml [enable_line_numbers="true"]>+<file yaml events.yml>
 foo: message Hello world! foo: message Hello world!
-</code>+</file>
  
-This is an event instruction. BetonQuest will use it to determine what type of event it is and what exactly should it do. ''foo'' is the name, ''message'' is the type and ''Hello world!'' tells the message type what it needs to display. In this case, if you run ''foo'' event, it will display to you ''Hello world!'' message. Now save the file, issue **/q reload** command and run the event with **/q e {name} foo** command (''q'' is shortcut for ''quest'', ''e'' is shortcut for ''event'', ''{name}'' is your Minecraft name without the brackets and ''foo'' is the name of the event we've just created). It should show you white ''Hello world!'' message in the chat.+这是一条__//事件指令//__。BetonQuest会根据这个指令执行触发相应的__//[[插件手册:betonquest:基本概念#事件_events|事件Events]]//__。在这个例子中,''foo''是你对这个事件的命名(名为''foo''的事件);''message''是事件的类型,这个是[[插件手册:betonquest:事件列表#消息message|向玩家发送消息]];而''Hello world!''则是message事件的参数,也就是消息内容。当你执行这个''foo''事件,BetonQuest就会向你显示''Hello world!''消息。
  
-Let's create another event, more complicated one. ''teleport'' seems complicated enough. As you can read in the _Events list_, it needs a single argument, the location. Press F3 and check out your current location (it's shown on the left, three numbers, ''x''''y'' and ''z''). Now add in _events.yml_ another line:+现在保存这个文件,并输入**/q reload**命令重新加载。然后我们可以测试这个__//事件//__是否有效了:在游戏中输入**/q e {name} foo**命令(备注:''q''是''quest''的缩写,''e''是''event''的缩写,''{name}''填入你的Minecraft名字,''foo''则表示上面刚刚编写的''foo''__//事件//__。如果成功,那么玩家的聊天框就会显示''Hello world!''这一段消息。
  
-<code yaml [enable_line_numbers="true"]>+我们现在来试一试别的__//事件//__,就拿[[插件手册:betonquest:事件列表#传送teleport|传送]]''teleport''好了。只要你看过__[[插件手册:betonquest:事件列表|事件列表]]__,就知道这个传送事件需要一个座标作为参数。在游戏里按F3就可以看到你现在的座标(在左边,有三个数字分别代表''x''、''y''和''z''座标)。现在把这个座标写到__events.yml__文件的末尾: 
 + 
 +<file yaml events.yml>
 bar: teleport 100;200;300;world bar: teleport 100;200;300;world
-</code>+</file>
  
-and replace ''100'' with your ''x'' coordinate, ''200'' with ''y'' and ''300'' with ''z''''world'' needs to be replaced with your current world's name. Save the file, reload the plugin and run this event with a command described before. It should teleport you to the location you have specified.+记得把''100''改成你的''x''座标,''200''改为''y'',还有''300''改为''z''''world''改为你现在所在的世界(一般情况下就是world)。然后保存这个文件、重新加载BetonQuest(**/reload**)并照葫芦画瓢用上面的''/event {namne} bar''命令测试这个//事件//。如无意外,你会被传送到那个座标。
  
-Congratulations, you have just created your first events. Go ahead and do some experiments with other event types. You can find them in _Events list_ chapter. Once you're done let's start learning conditions.+现在恭喜你!你已经学会了怎么创建__//事件//__。你现在可以自己试试[[插件手册:betonquest:事件列表|事件列表]]中的其它事件。熟练之后我接着学习__//条件Conditions//__:
  
 ==== Conditions ==== ==== Conditions ====
  • 插件手册/betonquest/快速教程.1548541952.txt.gz
  • 最后更改: 2019/01/27 06:32
  • 小小k酱