Number provider
Provides numerical values for item effects
Context number provider
Provides a numerical value from the item effect context based on the 'key' field, either coming from providers in the data object of the effect or added from some other outcome or provider. Unless there is a need for a fallback value a context shorthand provider is the easier way to go.
Format:{
"type": "tetra:context",
"key": "damage"
}
Effect level number provider
Provides the level of the given effect.
Format:{
"type": "tetra:effect_level",
"effect": "howling"
}
Effect efficiency number provider
Provides the efficiency of the given effect.
Format:{
"type": "tetra:effect_efficiency",
"effect": "sweeping"
}
Entity data number provider
Provides a numerical value from persisted data on the given entity.
Format:{
"type": "tetra:entity_data",
"key": "my_addon:effect_name_hit_count"
}
Entity property number provider
Provides a numerical property from the given entity.
Format:{
"type": "tetra:entity_property",
"entity": "target",
"property": "health"
}
Expression number provider
Provides a numerical value based on an expression. Supports addition, subtraction, multiplication, division, and parentheses. Can use fixed numerical values, but can also source values from the context (by using variable names matching numbers in the context). A data object can be used to define additional variables to what's available across the entire item effect.
Format:{
"type": "tetra:expression",
"numbers": {
"efficiency": {
"type": "tetra:effect_efficiency",
"effect": "bleeding"
},
"height": {
"type": "tetra:vector",
"field": "y"
}
},
"expression": "(1 + efficiency) * height"
}
Expression number provider shorthand
Shorthand for the expression number provider, allows an expression string to be provided without a typed object.
Format:Shorthand for the expression number provider, allows an expression string to be provided without a typed object.
"1 + 2 * b"
Length number provider
Provides the length of a vector, defaults to providing the square length as that's more performant.
Format:Time number provider
Provides some representation of time from the world of the triggering entity.
Format:The type of time value to get. gameTime: the time in ticks since the world was created, dayTime: the time of the current day, in ticks . moonPhase: The current moon phase, as a value between 0 and 7 (inclusive).
{
"type": "tetra:time"
}
Random number provider
Provides a random number between the two given numbers.
Format: