Skip to main content
Version: 1.10 NeoForge

Tasks

Tasks are given to faction player to collect items or achieve certain goals. They are given by a Faction Representative

Location

All task files need to be located in the folder data/<modid>/vampirism/tasks/

Id

Every task has an id that is determined by the files' name and directory. E.g., the task in the file data/vampirism/vampirism/tasks/hunter/hunter_lord2.json will have the id vampirism:hunter/hunter_lord2

Schema

taskname.json
{
"requirements": {
"requirements": []
},
"rewards": {},
"title": {},
"description": {},
"unlocker": []
}
  • requirements: The requirements to finish the task.
  • rewards: The rewards for finishing the task.
  • title: The title of the task. Component
FieldTypeDescription
requirementsRequirementsThe requirements to finish the task.
rewardsRewardsThe reward for finishing the task.
unlockerUnlockerThe requirements to accept the task.
titleComponentThe title of the task.
descriptionComponentThe description of the task.

Requirements

Entity Requirement

This requirement checks if the player has killed a certain amount of a specific entity.

{
"type": "vampirism:entity",
"amount": <amount>,
"description": <description>,
"entityType": "<entity_type>",
"id": "<id>"
}
FieldTypeDescription
amountintthe amount of entities that need to be killed
descriptionComponentthe description of the requirement
entity_typeResourceLocationid of the entity
idResourceLocationunique id of the requirement inside of the task

Entity Type Requirement

This requirement checks if the player has killed a certain amount of entity belonging to an entity tag.

{
"type": "vampirism:entity_type",
"amount": <amount>,
"description": <description>,
"entityType": "<entity_type>",
"id": "<id>"
}
FieldTypeDescription
amountintthe amount of entities that need to be killed
descriptionComponentthe description of the requirement
entity_typeResourceLocationid of the entity tag
idResourceLocationunique id of the requirement inside of the task

Stat Requirement

This requirement checks if a given stat was increased by a defined number.

{
"type": "vampirism:stat",
"amount": <amount>,
"description": <description>,
"id": "<id>",
"stat": "<stat>"
}
FieldTypeDescription
amountintthe amount with which the stat need to be increased
descriptionComponentthe description of the requirement
idResourceLocationunique id of the requirement inside of the task
statResourceLocationthe id of the stat that should be checked

Item Requirement

This requirement checks if the player has the itemstack in their inventory.

{
"type": "vampirism:item",
"description": <description>,
"id": "<id>",
"item": <item>
}
FieldTypeDescription
descriptionComponentthe description of the requirement
idResourceLocationunique id of the requirement inside of the task
itemItemthe item that should be checked. This includes the amount

Boolean Requirement

The Boolean requirement checks a registered funtion, if the requirement is completed. This can only be registered using the api

{
"type": "vampirism:boolean",
"description": <description>,
"id": "<id>",
"function": "<function>"
}
FieldTypeDescription
descriptionComponentthe description of the requirement
idResourceLocationunique id of the requirement inside of the task
functionResourceLocationthe id of the registered function that should be checked

Rewards

Item Reward

A simple item reward that will reward the player with a specific itemstack.

{
"type": "vampirism:item",
"item": <item>
}
FieldTypeDescription
itemItemthe itemstack that will be rewarded to the player

Refinement Item Reward

This is a special item Reward that rewards an accessory item to the player. When a parameter is not given, it will be randomly chosen from the available refinements.

{
"type": "vampirism:refinement_item",
"faction": <faction>,
"item": <item>,
"rarity": <rarity>
}
FieldOptionalTypeDescription
factionxFactionthe faction for which the accessory should be created
itemxItemthe accessory item that should be filled with refinements
rarityxRaritya specific rarity for the refinements.

Lord Level Reward

The Lord Level Reward will reward the player with a specific lord level.

{
"type": "vampirism:lord_level",
"description": <description>,
"targetLevel": <targetLevel>
}
FieldTypeDescription
descriptionComponentthe description of the requirement
targetLevelintthe level that should be awarded

Action Reward

The action reward will execute a specific registered action upon completion.

{
"type": "vampirism:consumer",
"description": <description>,
"consumer": "<action>"
}
FieldTypeDescription
descriptionComponentthe description of the requirement
consumerResourceLocationthe id of the registered function that should be executed

Unlocker

Level Unlocker

{
"type": "vampirism:level",
"reqLevel": <minLevel>,
"maxLevel": <maxLevel>
}
FieldRequiredTypeDescription
reqLevelxintthe minimum level that is required to unlock the task
maxLevelintthe maximum level that allows this task

Lord Level Unlocker

{
"type": "vampirism:lord_level",
"exact": true,
"reqLordLevel": <lord-level>
}
FieldRequiredTypeDescription
exactxboolif the lord level should be exactly the given level
lord-levelxintthe lord level to unlock this task, or the minium level

Parent Unlocker

{
"type": "vampirism:parent",
"parent": "<task-id>"
}
FieldTypeDescription
parentResourceLocationthe id of the task that needs to be completed before this task can be started

Example

{
"requirements": {
"requirements": [
{
"type": "vampirism:stat",
"amount": 6,
"description": {
"translate": "stat.vampirism.capture_village"
},
"id": "vampirism:capture_village",
"stat": "vampirism:capture_village"
},
{
"type": "vampirism:item",
"description": {
"translate": "item.minecraft.gold_ingot"
},
"id": "minecraft:gold_ingot",
"item": {
"Count": 64,
"id": "minecraft:gold_ingot"
}
},
{
"type": "vampirism:entity_type",
"amount": 100,
"description": {
"translate": "entity_tag.vampirism.vampire"
},
"entityType": "vampirism:vampire",
"id": "vampirism:vampire"
}
]
},
"rewards": {
"type": "vampirism:lord_level",
"description": {
"translate": "task_reward.vampirism.lord_level_reward",
"with": [
"5"
]
},
"targetLevel": 5
},
"title": {
"translate": "task.vampirism.hunter_lord5"
},
"unlocker": [
{
"type": "vampirism:lord_level",
"exact": true,
"reqLordLevel": 4
}
]
}