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:
1
variable:
2
root: none
3
holding:
4
item: diamond_sword:0
5
name: 'IDK some name'
6
amount: 1
Copied!
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
1
variable:
2
root: stone:0
Copied!
block-break
1
variable: stone:0
Copied!
Some more random examples: throw-projectile
1
variable: SNOWBALL
Copied!
Examples With Sub-Variables:
block-break
1
variable:
2
root: diamond_block:0
3
holding:
4
item: golden_pickaxe:0
Copied!
enchant-all
1
variable:
2
root: SOUL_SPEED
3
item: diamond_sword
4
level: 3
Copied!
This quest is to enchant an item with soul speed 3 using an anvil.
Last modified 10mo ago
Copy link