1.x/List of Objective node types

From Citizens Wiki
< 1.x
Jump to: navigation, search
Not Supported!
This page is about Citizens 1.x, while the current version is Citizens 2.0.2. This page's content may be outdated, and shouldn't be trusted as being correct. See this page's talk page for more information. If you were looking for the 2.0.2 equivalent of this page, try List of Objective node types. If you feel this message was displayed in error, please contact an administrator.

To aid with generic objective design, each objective can use one of a common set of variables: amount, leeway, string, materialid, location, item and npcdestination (destination NPC ID).

Each objective type may use one or more of these variables.

Item nodes have three sub-nodes, two that must be included and one optional.

  • The id sub-node designates the item/block ID.
  • The amount sub-node specifies the item amount.
  • The optional data sub-node specifies the item data value to be used.

Location nodes have 4 required sub-nodes, two optional.

  • The world node specifies the world name of the location.
  • The x, y, and z nodes specifies the x, y, and z values.
  • The optional pitch/yaw nodes specify the rotation (think aeroplanes) of the location.

Other optional nodes can be included for more functionality. These are not required.

  • The finishhere node can instruct the quest to be completed at that step. By default, to finish a quest, you must talk to the original quester.
  • The message node will display text to the player when the objective is completed.
  • The reward node is set up exactly like quest rewards, except granted when the player completes the sub-objective.
  • The optional node can set an objective to be optional. This is typically backed up with a sub-objective reward for "side quest" capabilities.


Objective Types

Below are objective types and their required flags. Remember: Quest sub-objectives can also have other optional nodes.


Build

Build quests require the player to place a certain number of blocks.

'0':
    '0':    
        type: build      # Specifies build objective.
        materialid: 54  # Chest. Material player is required to build.
        amount: 1        # Number of items that must be placed.

Chat

Chat quests require something to be said in chat.

'0':
    '0':
        type: chat
        string: 'I cracked the code!'

Chat quests can be further extended. The string: node can be a comma-separated list of all text that can be matched. Special syntax flags are r: to match regex and c: to check if the text contains something else. For example, 'r:[0-9]' matches any 1-digit number, and 'c:hi' matches any text containing 'hi'.

By setting the leeway: and npcid: parameters, valid chat can be limited to a radius from an NPC.

Location

Location quests (move location) require the player be within a certain range of a location.

'0':
    '0':    
        type: move location   # Specifies loaction objective.
        location:
            x: 150       # Coordinates of location required to visit.
            y: 47
            z: 420
            world: 'world'
        time: 10         # The time (in seconds) that the player has to stay in this location for.
        leeway: 1        # The leeway in blocks that the player can be away from the location before finishing.

In previous versions the leeway in blocks was set with the amount: node. 1.1.6 on, use leeway: instead. Additionally, in 1.1.5, location quests were broken.


Hunt

Hunt quests require the player to kill a certain number of monsters.

'0':
    '0':    
        type: hunt   # Specifies hunt objective.
        amount: 10         # The amount of monsters the player needs to kill.
        string: LavaSlime, PigZombie    # Requires Magma Cubes and Zombie Pigmen to be killed to count.
                      # Using '-' as the first character makes a whitelist. '*' represents all.

Valid entity types are categorized and listed below:

Passive - Chicken, Cow, MushroomCow, Ozelot, Pig, Sheep, Squid, Villager

Neutral - Enderman, Wolf, PigZombie

Hostile - Blaze, CaveSpider, Creeper, Ghast, LavaSlime, Silverfish, Skeleton, Slime, Spider, Zombie

Utility - SnowMan, VillagerGolem

Bosses - EnderDragon


Move Distance

Move distance quests requires the player to walk a certain number of blocks.

'0':
    '0':    
        type: move distance   # Specifies move distance objective.
        amount: 1000         # The amount of blocks required to traverse.


Destroy Block

Destroy Block quests require the player to break a certain amount of blocks.

'0':
    '0':    
        type: destroy block   # Specifies hunt objective.
        amount: 10         # The amount of blocks to break.
        materialid: 1        # The type of block required.


Delivery

Delivery quests require the player to 'deliver' a specified item to a specified NPC.

'0':
    '0':
        type: delivery    # Delivery Quest type
        materialid: 341     # Slimeballs set as material to deliver.
        amount: 6      # Quantity: 6
        npcdestination: 22      # deliver to NPC ID


Player Combat

Combat quest (player combat) - kill a certain number of players.

'0':
    '0':
        type: player combat    # Player Combat type
        amount: 1    # Amount of players to kill
        string: Notch,fullwall,      # Which players should be killed. 
                # Using '-' as the first character makes a whitelist. '*' represents all. g:group represents groups.

KillNPC

- Note: Requires Citizens 1.1.6 or higher.

Kill NPC quests require the player to slay a Guard NPC. Note: EvilNPCs will be supported soon.

'0':
    '0':
        type: killNPC    # KillNPC type
        amount: 1
        string: Cantrell,Notch,      # Which NPCs should be killed. 
                # Using '-' as the first character makes a whitelist.  '*' represents all. NPC ID or Name can be used.

Collect

Collect quest requires the player to pick up a certain number of items.

'0':
    '0':    
        type: collect   # Specifies hunt objective.
        amount: 10         # The amount of blocks to collect.
        materialid: 3        # The type of block required.

Note: For the items to register, the player has to pick them up from the ground. Materials obtained through chests/furnaces will not register. This also opens up a possible exploit in which the player can throw down and pick up the same item to get it to count more than once. One way to protect against this would be to follow it up with a delivery quest that would require the items to be physically delivered to an NPC to check for the correct amount.