Paths for advanced users

You're becoming an expert on paths, but there are still a few features left to explore.

Allow a player to a path multiple times

By default, players can only complete a path once. After they've completed the path, they are not allowed to retake the path (unless you reset their data). If you want players to be able to take a path multiple times, you can use the is repeatable option, as shown below:

A repeatable path:
prerequisites:
# some prerequisites
requirements:
# some requirements
results:
# some results
options:
is repeatable: true # Allow a path to be taken more than once

Note that allowing players to retake a path should be done with some caution. You need to make sure that you do not assume any state that the player is in. If you assume that the path is never done before by a player and give them some sort of reward for completing it, you must be aware that they will receive the reward again after completing it for a second time.

Automatically assign a path to a player

By default, Autorank will only assign a path to a player if they choose to activate it themselves. Trivially, players can only activate a path if they are eligible for it (i.e. meet all prerequisites). If you want Autorank to assign a path to a player automatically, you can do that using the auto choose option. See the example below:

A path that is automatically assigned to the player:
prerequisites:
# some prerequisites
requirements:
# some requirements
results:
# some results
options:
auto choose: true # Will automatically assign a path to a player.

Autorank will only assign a path to a player automatically if the player is eligible for the path.

Hide a path from a player until they are eligible

Whenever players are looking for paths, they can use the /ar view list command. It will show them the paths that you have defined. By default, Autorank will show all paths you have defined. If, however, you want to hide paths that the player cannot activate yet (as they are not eligible), you can use the show based on prerequisites option. If the player does not meet the prerequisites of this path (i.e. is not eligible), the path is not shown to them.

Path hidden to the user
prerequisites:
# some prerequisites
requirements:
# some requirements
results:
# some results
options:
show based on prerequisites: true

Set a custom description for a requirement or result

If you want a requirement/prerequisite or result to have a custom description, you can use the description option. See the example below.

Completing the mob hunt:
prerequisites:
# Some prerequisite
requirements:
permission: # Check if the player has a permission
value: mobhunt.complete
options: # Give the requirement a better description
description: 'Complete the mob hunt!'
results:
money:
value: 10000
options: # Provide a custom description for a result
description: 'Get some well-earned cash.'

Just like requirements, prerequisites can also have custom descriptions. Try it out yourself!

Add a cooldown to a path

If you want your players to complete a path multiple times, but not immediately after it has completed the path, you can set up a cooldown. This will prevent the player from activating the path again within a certain time period. The time period is configurable. See the example below:

Path with a cooldown:
prerequisites:
in group:
value: SomeGroup
requirements:
permission:
value: have.some.permission
money:
value: 5000
results:
money:
value: 250
options:
is repeatable: true
cooldown: 5d 10h

Technically, you don't need theis repeatableoption here, but it doesn't make sense to remove it. Paths that are not repeatable can only be completed once and hence a cooldown has no effect.

Restricting how players should fulfill requirements

Let's take a look at a simple example of a path:

  • Prerequisites:

    • Some prerequisites

  • Requirements:

    • Have at least 1000 money

    • Killed at least 10 spiders

    • Be in a certain location

  • Results:

    • Some results

By default, Autorank allows you to complete the first requirement, and later on the second requirement and finally the last requirement. You have then completed the path. This means that you might have got 1000 money at some point, then killed 10 spiders. Perhaps you've lost some money during your fights and finally arrive at the location you need to be at. Autorank would then say you've completed a requirements and hence you completed the path, even though you did not meet all requirements at the same time. Generally, this is the preferred behavior.

If, however, you want a path where all requirements should be met at the same time, you can use the option allow partial completion. See the example below.

Path where all requirements should be met at the same time:
prerequisites:
in group:
value: SomeGroup
requirements:
permission:
value: have.some.permission
money:
value: 5000
results:
money:
value: 250
options:
allow partial completion: false

This example tells a player that they should have at least 5000 money and have the have.some.permission at the same time. If that is not the case, the path is not completed.

Storing progress upon deactivation of a path

Players are able to deactivate a path and pick it up after some time. When a path is deactivated, no progress is made on that path. By default, Autorank will not store the progress of the player when he deactivates a path. This means that all progress of that path will be reset for the player.

If you want the progress of a path to be stored whenever a player deactivates it, you can use the store progress on deactivation option. See the example below.

Path with stored progress:
prerequisites:
# Some prerequisites
requirements:
# Some requirementes
results:
# Some results
options:
store progress on deactivation: true

Whenever a player re-activates a path that stores progress, a player will be back to where it left the path.