-
Notifications
You must be signed in to change notification settings - Fork 16
Setting Up and Using Variables
The core of quests in BattlePass is the variable system. The basis of this system is that it is a filter. If the variable is set to none
, there is no filter. If it is set, if whatever the variable is entered as when a user performs an action matches the variable, it will progress.
Recently, we've also added sub variables to BattlePass which can make this system a bit more confusing. Here are some examples for different quest types with and without sub variables.
Every quest has the global sub variables listed below:
variable:
root: none
holding:
item: diamond_sword:0
name: 'IDK some name'
amount: 1
Every sub-variable is optional. If you don't specify it, it won't be filtered for. Therefore, you can just use holding.item
if you wish, or just holding.amount
.
Examples Without Sub-Variables:
The following two quests function in the same manner, they're just two ways of formatting them.
block-break
variable:
root: stone:0
block-break
variable: stone:0
Some more random examples:
throw-projectile
variable: SNOWBALL
Examples With Sub-Variables:
block-break
variable:
root: diamond_block:0
holding:
item: golden_pickaxe:0
enchant-all
variable:
root: SOUL_SPEED
item: diamond_sword
level: 3
This quest is to enchant an item with soul speed 3 using an anvil.