Incrementation
The /incmark and /incfact commands let builders and mobs change a numerical mark or fact by a given amount.
For example, if a player has a counter mark with a value of 5, this command updates the value to 6:
/incmark player counter 1Negative values decrease the stored value. The following command decreases counter by two:
/incmark player counter -2Both commands support integers and decimals. If a balance fact is 1.1, this command sets it to 1.6:
/incfact balance 0.5Note: A numerical mark or fact does not have to exist before you increment it. If
bosses_killed_counthas never been set,/incfact bosses_killed_count 1creates the fact with a value of1.
Use cases
Section titled “Use cases”Incrementing marks and facts reduces the need to set a new value manually every time something changes. Useful patterns include:
- Load a certain number of mobs and set a fact to the same number. Each mob’s death can decrement the fact until it reaches
0, triggering something new. - Increment a mark whenever a player kills a particular mob. After the value crosses a threshold, something different can happen.
- Increment a mark whenever a player triggers an action. Crossing a threshold might unlock new content.
Threshold conditions
Section titled “Threshold conditions”Use mark_above and fact_above to check whether a mark or fact has crossed a given threshold. Adding not before either condition makes it pass when the value is not above the stated threshold.
mark_above access_level 2not fact_above enemies_remaining 0See Conditions for the complete condition reference and Mob and room commands for the command reference.