PenaltyTrigger - DragonSurvivalTeam/DragonSurvival GitHub Wiki
Description
A penalty trigger determines the way a penalty effect is activated.
Parents
This object is used by the following objects:
Penalty Triggers
SupplyTrigger
A supply trigger is a trigger that is dependent on some supply bar depleting before its effects start occurring. A supply trigger also needs an asset for its supply bar image to be placed in textures/gui/custom/supply_icons/<id>
.
The key for this trigger is "supply"
.
RecoveryItem
Some supply triggers use recovery items to restore their supply bar.
Schema
{
"items": [Item] // [Mandatory] || A list of items that recover the supply.
"potions": [Potion] // [Mandatory] || A list of potions that recover the supply.
"percent_restored": [number] // [Mandatory] || The percentage of the supply that is restored when consuming the item.
}
Schema
{
"id": [string] // [Mandatory] || The ID of the trigger.
"attribute": [Attribute] // [Optional] || The attribute to use to determine the maximum supply. By default uses "penalty_resistance_time".
"trigger_rate": [number] // [Mandatory] || The rate at which the penalty effects trigger once the supply is depleted.
"reduction_rate": [float] // [Mandatory] || The rate at which the supply is reduced (the amount subtracted per tick).
"regeneration_rate": [float] // [Mandatory] || The percentage that the supply recovers per tick.
"recovery_items": [RecoveryItem] // [Mandatory] || The list of items that recover the supply.
"display_like_hunger_bar": [bool] // [Optional] || Whether to display the supply like a hunger bar or not.
}
Instant
An instant trigger triggers the penalty effect based on the trigger rate.
The key for this trigger is "instant"
.
Schema
{
"trigger_rate": [number] // [Mandatory] || The rate at which the penalty triggers.
}
Item Used
An item used trigger triggers the penalty effect when an item is used.
The key for this trigger is "item_used"
.
Schema
{
"condition": [Predicate] // [Mandatory] || The item predicate to trigger the penalty
}