-
Notifications
You must be signed in to change notification settings - Fork 42
PenaltyTrigger
A penalty trigger determines the way a penalty effect is activated.
This object is used by the following objects:
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"
.
Some supply triggers use recovery items to restore their supply bar.
{
"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.
}
{
"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.
}
An instant trigger triggers the penalty effect based on the trigger rate.
The key for this trigger is "instant"
.
{
"trigger_rate": [number] // [Mandatory] || The rate at which the penalty triggers.
}
An item used trigger triggers the penalty effect when an item is used.
The key for this trigger is "item_used"
.
{
"condition": [Predicate] // [Mandatory] || The item predicate to trigger the penalty
}
■ Still have questions about Dragon Survival? Ask them in the Discord Server! I always try to help everyone as much as I can.
Datapack Documentation
- Dragon Species
- Projectile
- General Data Formats
- Installation
- "Mod doesn't work!"
- Incompatibility
- Configuration
- Update
- Moving appearance between saves
- Linux compatibility
- How do I use Curseforge?
- Installing the modpack
- Optimizing