Skip to content

Tasks documentation

Peter Crew edited this page Dec 28, 2018 · 3 revisions

This page covers the TaskRegistry class, along with all of the classes for requirements and rewards.


TaskRegistry

This purely static class is used to register new tasks with the game and has only one method that should be used.

Methods

Name Arguments Return type Description
registerTask {} void Registers the given task object with Equilinox.

Settings object for registerTask

The registerTask method takes a JavaScript object which can have the following properties:

Name Type Required? Description
id int Yes The numeric ID that Equilinox will use internally to track the task.
name String Yes The name of the task that will be displayed to the user.
repeatable boolean No True if the task can be repeated, false otherwise.
description String Yes A description that can be shown to the user explaining the task.
requirements Requirement[] Yes The requirements that need to be satisfied in order for the task to be completed.
rewards Reward[] Yes The rewards to give the user if they complete the task.

Requirements

The following requirements can be added to a custom task:

BreedRequirement

Requires that a certain number of creatures fitting the given classification be born.

Constructor

The constructor takes a single JavaScript object with the following properties:

Name Type Description
classification String The classification code of the species (e.g. ahl).
count int The number of creatures required.
shortDescription String A very short description of the task.
longDescription String A more detailed description of the task.

CashRequirement

Requires that the user has a certain number of Diversity Points.

Constructor

The constructor takes a single integer argument stating the required number of Diversity Points (e.g. new CashRequirement(1000)).

EvolutionRequirement

Requires that a certain number of creatures fitting the given classification be evolved.

Constructor

The constructor takes a single JavaScript object with the following properties:

Name Type Description
classification String The classification code of the species (e.g. ahl).
count int The number of creatures required.
shortDescription String A very short description of the task.
longDescription String A more detailed description of the task.

FullGrownRequirement

Requires that a certain number of creatures fitting the given classification be fully grown.

Constructor

The constructor takes a single JavaScript object with the following properties:

Name Type Description
classification String The classification code of the species (e.g. ahl).
count int The number of creatures required.

HappyEntityRequirement

Requires that a certain number of creatures fitting the given classification be happy with their environment.

Constructor

The constructor takes a single JavaScript object with the following properties:

Name Type Description
classification String The classification code of the species (e.g. ahl).
count int The number of creatures required.
environmentFactor int The percentage satisfaction required (e.g. 100 for 100%).
fullyGrown boolean True if the creature has to be fully grown for their happiness to count.

Rewards

The following rewards can be added to a task:

CashReward

Rewards the player with a certain number of Diversity Points.

Constructor

The constructor takes a single integer argument stating the rewarded number of Diversity Points (e.g. new CashReward(1000)).

ShopItemReward

Rewards the player with a new species or other object from the shop.

Constructor

The constructor takes a single integer argument stating the ID of the rewarded item (e.g. new ShopItemReward(116) for a poppy).

TaskUnlockReward

Rewards the player with one or a number of tasks that they can then complete.

Constructor

The constructor takes a single integer-array argument stating the IDs of the new tasks (e.g. new ShopItemReward([263, 832])).

MusicReward

Rewards the player with a new music track to listen to.

Constructor

The constructor takes a single integer argument stating the ID of the rewarded music track (e.g. new MusicReward(988) for a track with an ID of 988).

Clone this wiki locally