Spell Dictionary
Spells are the combat skills that players, NPCs and interactables use to affect players and NPCs. They can be divided into damage, heal, dot, hot, buff, debuff, and aura spells. All spell data are contained in the data/db_spells.json file.
The spell data are stored in dictionariestwo inseparate a JSON file. When loaded into the game, this dictionary is stored twice.dictionaries. The first dictionary is called spell_base, andwhich representscontains the base values ofas found in the spell.data/db_spells.json Thesefile. valuesThis aredictionary onlydoes changednot whenchange. theThe rolesecond ofin spell_current, which is based on spell_base, but can be modified by talents or other effects. For example, if a specificspell classgains isa changed10% (e.g.increase whento changingcritical hit chance from a healertalent, to a tank, which can fundamentally change how the spell functions), but are not mutated by talents, buffs, debuffs, etc. The second dictionarythis is called spell_current, and represents the current state of the spell, which is affected by talents, buffs, debuffs, etc. This is separate from changes made to player stats.
The spell dictionaries store coefficients that are applied to thespell_current. player stats, such that only the functionality of the spell itself is stored, along withOnly effects that are applied to theindividual spellspells specifically,are Forhandled example, if all damage is increased by 10% via a talent or buff,in this isway. doneChanges to player stats are handled in the stats_current dictionary in the player stats,script.
Basic data/db_spells.json keys
All spells have some common keys that are required in the data dictionary, or are common optional keys for all types of spell. However,These if a very specific spell has its damage increased by 10% via a talent, this is represented in the spell dictionary.are:
The spell dictionary has the following keysRequired
name: The name of the spellspell, as displayedit appears in the logcombat andlog.
targetgroup: shownThe togroup players(player, npc, hostile, etc.) that can be targeted by this spell.
Optional
icon: The nameicon used for a spell
role: The player role (i.e., tank, heal, melee, ranged) that uses this variant of the iconspell. Needed for player spells that isare used for the spell, must correspondavailable to themore actualthan fileone name of the icon without file extensionrole.
resource_cost: The cost of the main resource to trigger the spell. This canCan be negative to allowgain forresource.
max_range: spells to build a resourcerange: The maximalmaximum allowedrange distance betweenof the source and the targetspell.
cooldown: The cooldown period of athe spell in seconds, independent of the global cooldownseconds.
on_gcd: Whether or not the spell is affected by and triggers the global cooldown,cooldown.
Damage Spell Keys
Damage spells require some further keys to function. These are:
spelltype: Must be 0set (not affected) or 1 (affected)spelltype:to "damage",.
effecttype: Must be set to "heal"physical" or "aura"magic", dependingand onwill which type of eventuse the spellcorresponding triggersmodifiers.effecttype: Whether the effect of the spell is physical or magic, dot, hot, buff, debuff or absorb
value_base: WhichThe statvalue that is used as a base.base Usuallyto primarycalculate stat,the buteffective allows for things such as max health scalingdamage.
value_modifier: The coefficientmultiplicative modifier that is applied to the base value to generatecalculate the finaleffective spell valuedamage.
avoidable: Whether or not the spell can be avoided,avoided. canSet beto 1 for avoidable, or 0 (for not avoidable) or 1 (avoidable)avoidable.
can_crit: Whether or not the spell can critically strike,hit. canSet beto 1 for critical hits, and 0 (cannotfor crit) or 1 (can crit)crit_chance_modifier: increases tono critical strikehits.
crit_chance_modifier: chanceAdditive forconstant this spellcrit_magnitude_modifier: The coefficient by whichto the critical strikehit increaseschance of the spell. Applied to the base critical hit chance of the source.
crit_magnitude_modifier: Multiplicative modifier to the effective damage when a hit is critical.
Healing Spell Keys
Healing spells require some further keys to function. These are:
spelltype: Must be set to "heal".
effecttype: Must be set to "physical" or "magic", and will use the corresponding modifiers.
value_base: The value that is used as a base to calculate the effective healing.
value_modifier: The multiplicative modifier that is applied to the base value to calculate the effective healing.
can_crit: Whether or not the spell valuecan critically hit. Set to 1 for critical hits, and 0 for no critical hits.
crit_chance_modifier: Additive constant to the critical hit chance of the spell. Applied to the base critical hit chance of the source.
crit_magnitude_modifier: Multiplicative modifier to the effective healing when a hit is critical.
IfDoT Spell Keys
DoT effects use the spellsame iskeys as damage spells for the damage events that they trigger. However, they require a few additional keys:
ticks: The number of ticks that a DoT effect has.
tickrate: The time between two ticks, in seconds.
unique: Whether a DoT effect can only be present on a unit once in total (value 1), or once per source (value 0).
HoT Spell Keys
HoT effects use the same keys as healing spells for the healing events that they trigger. However, they require a few additional keys:
ticks: The number of ticks that a HoT effect has.
tickrate: The time between two ticks, in seconds.
unique: Whether a HoT effect can only be present on a unit once in total (value 1), or once per source (value 0).
Buff Spell Keys
Buffs do not cause damage or healhealing overevents, timeand effect,therefore thenrequire somea morefew different keys needto function:
auratype: Must be set to "buff".
modifies: An array of stats that is to be specified,modified. asCan followscontain the same stat multiple times.duration:modify_type: TheAn durationarray of the effectsame inlength secondsas "modifies", containing either "mult" or "add" for each element, which determines whether a stat is affected additively, or multiplicatively.tick:modify_value: TheAn tick ratearray of the effectsame inlength seconds
If"modifies", containing the spell is a buffadditive or debuff,multiplicative othermodifier keys needapplied to additionallyeach bestat.
duration: specified, as followsmodifies: The stats that are affected by the buff, as a listmodify_type: Whether the stat is multiplicatively or additively affected, as a listmodifiy_values: The values by which the stat is affected, a a listduration: Thetotal duration of the buff oreffect.
unique: debuffWhether a buff effect can only be present on a unit once in secondstotal (value 1), or one per source (value 0).
Debuff Spell KeysTheDebuffs indicesdo not cause damage or healing events, and therefore require a few different keys to function:
auratype: Must be set to "debuff".
modifies: An array of stats that is to be modified. Can contain the same stat multiple times.
modify_type: An array of the listsame needlength toas be"modifies", consistent,containing ineither that"mult" theor first"add" index offor each listelement, describeswhich howdetermines thewhether first modified is affected, the second index specifies how the second modifieda stat is affected,affected etc,additively, or multiplicatively.
modify_value: An array of the same length as "modifies", containing the additive or multiplicative modifier applied to each stat.
duration: The total duration of the debuff effect.
unique: Whether a debuff effect can only be present on a unit once in total (value 1), or one per source (value 0).
IfAbsorb Spell Keys
Absorb effects are essentially a combination of healing and buff effects. The keys they require are:
auratype: Must be set to "absorb".
value_base: The value that is used as a base to calculate the total absorb amount.
value_modifier: The multiplicative modifier that is applied to the base value to calculate the total absorb amount.
can_crit: Whether or not the spell can critically hit. Set to 1 for critical hits, and 0 for no critical hits.
crit_chance_modifier: Additive constant to the critical hit chance of the spell. Applied to the base critical hit chance of the source.
crit_magnitude_modifier: Multiplicative modifier to the total absorb amount when a hit is absorb,critical.
duration: I'llThe thinktotal aboutduration itof laterthe :Dabsorb effect.
unique: Whether an absorb effect can only be present on a unit once in total (value 1), or one per source (value 0).