XP (Entity Condition Type)
Compares the entity's experience, in levels or points.
Compares the player’s experience. The aliases pick the unit for you: apoli:xp_levels compares levels, apoli:xp_points compares raw points.
Type ID: apoli:xp (aliases apoli:xp_levels, apoli:xp_points)
Fields
| Field | Type | Default | Description |
|---|---|---|---|
comparison | Comparison | required | <, <=, >, >=, ==, !=. |
compare_to | Integer | required | The value to compare against. |
unit | Unit | levels | levels or points. Filled in by the aliases. |
Examples
Level 30 or higher:
{
"type": "apoli:xp_levels",
"comparison": ">=",
"compare_to": 30
} Gate an expensive ability behind experience you then spend:
{
"type": "apoli:action_on_key_press",
"key": { "key": "key.origins.primary_active" },
"cooldown": 100,
"condition": {
"type": "apoli:xp_levels",
"comparison": ">=",
"compare_to": 5
},
"entity_action": {
"type": "apoli:and",
"actions": [
{ "type": "apoli:add_xp", "levels": -5 },
{ "type": "apoli:apply_effect", "effect": { "effect": "minecraft:strength", "duration": 400 } }
]
}
}
levelsis what the number on the XP bar says;pointsis the raw total, which grows non-linearly with level. Compare against points only when you actually mean the raw amount.