main/Tutorial

NOTE: For Quest creation, this tutorial is no longer needed. You may simply use the in-game /quests editor command to design Quests

Tutorial

Once you have downloaded Quests and all of it's dependencies, place each of them in your server plugins folder.
Afterwards, run your server once and allow Quests to generate the default config and quests data.

Let's have a look at your quests.yml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
quests:
  Miner:
    name: Stone Miner
    ask-message: <yellow>Mine <purple>10<yellow> blocks of <purple>Stone<yellow>, and retrieve <purple>10<yellow> pieces of <purple>Cobblestone<yellow>.
    finish-message: <yellow>Well done. Here is your reward.
    requirements:
      item-ids:
      - 270
      item-amounts:
      - 1
      fail-requirement-message: <red>You must have a <purple>Wooden Pickaxe<red> first.
    stages:
      ordered:
        '1':
          break-block-ids:
          - 1
          break-block-amounts:
          - 10
          collect-item-ids:
          - 4
          collect-item-amounts:
          - 10
          quest-items:
          - true
    rewards:
      money: 1000
      quest-points: 1


To create a Quest:
First, create a new block inside quests:
Call it whatever you like, as long as it's unique. It won't matter what you call it, as it is just used for code reference.
Inside your block, create the following paths and values:

name: Stone Miner
This is the name of your Quest that will appear in-game.

(Optional, requires Citizens 2) npc-giver-id: ID of the NPC that will give out this Quest

(Optional) block-start: Location of a block that will give the Quest when right-clicked. Format: "WorldName x y z"

(Optional) redo-delay: Amount of time (in milliseconds) that a player must wait before they may take the Quest again after completing it. If not set, the Quest may not be done more than once.

ask-message: This is the message that will be displayed to a player when they are asked to take the Quest.

finish-message: This is the message displayed to the player when they complete the Quest.

-------------------------------------------------------------------------------------------------------------------------

(Optional) requirements:
Choose the requirements you would like your Quest to have

item-ids: List of item ids required to take the Quest
item-amounts: List of item amounts required, corresponding to the item-ids list

money: Currency required to start the Quest

quests: List of Quests needed to be completed to start the Quest. (Use the name: value, not the block name. e.g. ^ "Stone Miner", not "Miner")

permissions: List of permission nodes needed to start the Quest

If you have any requirements, you must have a fail-requirement-message.
fail-requirement-message: message to be displayed if the player does not pass the requirement check.
-------------------------------------------------------------------------------------------------------------------------

Now we will create your Stages.

Create a block called "stages:" inside your quest block.
Right inside the "stages:" block, create another block called "ordered:" (Initially I was going to implement ordered stages, and stages that could be completed at any point during the quest. Perhaps I will add these later.)

Inside "ordered:", add as many blocks as you want stages. Call each block a number, starting at 1. In the example Quest "Stone Miner", 2 stages are present.
Inside each stage block, you may add different objectives. You may add as many as you like.

To view a list of all the objectives you can add inside of a stage, view the Reference page.


-------------------------------------------------------------------------------------------------------------------------

Events

The event system is a new feature added in Quests 1.4, which allows Events to fire at the end of any Quest Stage. An Event can perform a variety of things (for a complete list, see the Reference page).
Open your events.yml.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
events:
  ExampleEvent:
    message: '<red>Event happened!'
    potion-effect-types:
      - Speed
      - Jump
    potion-effect-durations:
      - 100
      - 25
    potion-effect-amplifiers:
      - 3
      - 2



Here is an example Event. Firstly, to make an Event you must create a block with your Event name. In this case, it is called 'ExampleEvent'. Inside of the block, you can add whatever Event functions you like. Again, check the Reference page for a list of the functions.
In this example Event there are 2 things that happen:
1. The message "Event happened!" is sent to the player, in red.
2. The potion effects Speed and Jump are applied to the player, with durations of 100 and 25 ticks, and amplifiers 3 and 2.

After you create your Event, you can have it fire after a Stage is completed. Simply add "event: EventName" to the Stage.

-------------------------------------------------------------------------------------------------------------------------

Lastly, we come to the Rewards. The whole reason we do these Quests!
Add a new block inside of your quest block, outside of the stages block. Call it "rewards:"
Inside of rewards: Here are some reward examples (see Reference page for full list):

item-ids: ids of the items the player is given
item-amounts: amounts of items the player is given, corresponding to item-ids:

money: amount of currency given to the player

quest-points: amount of Quest Points given to the player

-------------------------------------------------------------------------------------------------------------------------


And you're done!