Activation - DragonSurvivalTeam/DragonSurvival GitHub Wiki
Description
The activation describes all the properties of how an ability activates, as well as its cost for use. This includes things like passive costs for abilities that aren't directly cast.
Parents
This object is used by the following objects
Dependencies
This object references the following objects
Schema
{
"type": [Activation], // [Mandatory] || The activation type
"initial_mana_cost": [LevelBasedValue], // [Optional] || The initial mana cost when the ability is successfully cast.
"continuous_mana_cost": [ManaCost], // [Optional] || The mana cost per tick whilst channeling the ability.
"cast_time": [LevelBasedValue], // [Optional] || Cast time for the ability.
"cooldown": [LevelBasedValue] // [Optional] || Cooldown for the ability.
"can_move_while_casting": [boolean] // [Optional] || Whether you can move while casting. Defaults to true.
"sound": [Sound] // [Optional] || Sound effects for the ability.
"animations": [Animations] // [Optional] || Animations for the ability.
}
ActivationType
An ability can have 3 different activation types: "passive"
, "active_channeled"
, and "active_simple"
.
A "passive"
ability does not have a way to be cast. Its effects continuously trigger as long as the ability is enabled.
An "active_channeled"
ability can be cast, and its effects continuously trigger while it is being cast.
An "active_simple"
ability can be cast, and its effects trigger once at the moment the casting completes.
ManaCost
The ManaCost is a structure used to determine the type of continuous mana cost an activation is using.
There are two types: "ticking"
and "reserved"
.
A "ticking"
mana cost is a cost that is paid each tick while the ability is being channeled, if the ability's activation type is "active_channeled"
.
A "reserved"
mana cost is the amount that your max mana is reduced by if the ability is active (but not necessarily being cast or channeled). This can only be used for a passive activation type.
Schema
{
"type": [Activation], // [Mandatory] || The mana cost type.
"amount": [LevelBasedValue] // [Mandatory] || The cost per tick if it is ticking, or the amount reserved if it is reserved.
}
Sound
The sound for an activation includes the various sound effects that play during the different phases of an ability.
It is important to understand the distinction between when an ability is charging versus when an ability is actually being cast; the start sound plays when the ability is actually cast (e.g when a fireball is shot or fire breath starts coming out), but the charging sound plays while the ability is charging (before any of those example effects begin happening).
All of these entries use SoundEvents.
Schema
{
"start": [SoundEvent], // [Optional] || The sound effect that plays when charging is complete and the ability activates.
"charging": [SoundEvent], // [Optional] || The sound effect that plays whilst the ability is being charged (while the bar is being filled).
"looping": [SoundEvent], // [Optional] || The sound effect that plays whilst the ability is being channeled.
"end": [SoundEvent] // [Optional] || The sound effect that plays when casting is completed (for an instant ability, this happens the second charging is complete, or for a channeled ability when you stop channeling the effect).
}
Animation
The animation for an activation includes the various animations that play during the various phases of an ability.
For the startAndCharging animation, the animation will hold its ending pose if it is a SimpleAbilityAnimation
.
Dragon Survival uses a few animation keys for various abilities in the base mod. You may want to re-use this keys to maintain compatibility with the base abilities if you wish to author new model types:
cast_mass_buff
mass_buff
cast_self_buff
self_buff
breath
Schema
{
"startAndCharging": [Either CompoundAbilityAnimation or SimpleAbilityAnimation], // [Optional] || The initial animation that plays when charging. Can either be a single animation, or a compound animation.
"looping": [SimpleAbilityAnimation], // [Optional] || The animation that loops while the ability is channeled
"end": [SimpleAbilityAnimation] // [Optional] || The animation that plays when casting is completed (for an instant ability, this happens the second charging is complete, or for a channeled ability when you stop channeling the effect).
}
SimpleAbilityAnimation
Contains all the data to play a single animation during an ability.
Schema
{
"animation_key": [string], // [Mandatory] || The key for the animation. This should match up with a key inside of your animation data for the dragon's model.
"layer": [AnimationLayer], // [Mandatory] || The layer that this animation should play on. Either "base", "breath", or "bite".
"transition_length": [int], // [Mandatory] || The transition time (in ticks) to this animation
"locks_neck": [bool], // [Mandatory] || Whether the animation locks the neck bones on the model
"locks_tail": [bool] // [Mandatory] || Whether the animation locks the tail bones on the model
}
CompoundAbilityAnimation
Contains two animations, one to start the animation with, and one to loop once the starting animation is complete.
Schema
{
"starting_animation_key": [string], // [Mandatory] || The starting animation for this compound animation. This should match up with a key inside of your animation data for the dragon's model.
"looping_animation_key": [string], // [Mandatory] || The looping animation that plays after the starting animation is complete. This should match up with a key inside of your animation data for the dragon's model.
"layer": [AnimationLayer], // [Mandatory] || The animation that loops while the ability is channeled
"transition_length": [int], // [Mandatory] || The transition time (in ticks) to this animation
"locks_neck": [bool], // [Mandatory] || Whether the animation locks the neck bones on the model
"locks_tail": [bool] // [Mandatory] || Whether the animation locks the tail bones on the model
}