Help us make DnD Effect Resolver better with your Feedback
✨ Effect Resolver
Effect Configuration
Advanced: Custom Effect JSON
Custom Effect Syntax
You can create custom effects using JSON format. Each effect is an object with properties like name, level, and steps that define how the effect behaves.
Basic Structure
{
"name": "My Custom Effect",
"level": 3,
"steps": [
// Steps go here
]
}Step Types
Steps are the building blocks of effects. Each step performs a specific action:
selectTargets
Selects the targets affected by the effect.
{
"type": "selectTargets",
"method": "choose", // point, area, self, touch, choose, ranged
"numTargets": "3", // Can be a number or an expression
"allowDuplicates": true,
"output": "targets" // Variable to store selected targets
}rollDice
Rolls dice and stores the result.
{
"type": "rollDice",
"numDice": "spellLevel", // Can be a number or expression
"dieType": 8, // The die type (d6, d8, etc.)
"output": "damageAmount" // Variable to store result
}applyDamage
Applies damage to a target.
{
"type": "applyDamage",
"amount": "damageAmount", // Amount of damage (number or variable)
"damageType": "fire", // Type of damage
"target": "target" // Target to receive damage
}savingThrow
Resolves a saving throw with conditional outcomes.
{
"type": "savingThrow",
"ability": "Dexterity", // Ability used for the save
"dc": "spellSaveDC", // Difficulty class
"target": "target", // Target making the save
"onSuccess": [/*steps*/], // Steps if save succeeds
"onFailure": [/*steps*/] // Steps if save fails
}attackRoll
Resolves an attack roll against a target.
{
"type": "attackRoll",
"bonus": "caster.spellAttackBonus", // Attack bonus
"targetAC": "target.armorClass", // Target's AC
"target": "target", // Target being attacked
"onHit": [/*steps*/], // Steps if attack hits
"onMiss": [/*steps*/] // Steps if attack misses
}setVariable
Sets a variable to a calculated value.
{
"type": "setVariable",
"variable": "numProjectiles", // Variable name
"value": "3 + (spellLevel - 1)" // Value (number, string or expression)
}forEach
Iterates over a list and executes steps for each item.
{
"type": "forEach",
"list": "targets", // List to iterate over
"as": "target", // Variable name for current item
"steps": [/*steps*/] // Steps to execute for each item
}if
Conditionally executes steps based on an expression.
{
"type": "if",
"condition": "target.hitPoints < 10", // Boolean expression
"then": [/*steps*/], // Steps if condition is true
"else": [/*steps*/] // Steps if condition is false
}Example: Fireball
{
"name": "Fireball",
"level": 3,
"steps": [
{
"type": "selectTargets",
"method": "area",
"output": "affectedTargets"
},
{
"type": "rollDice",
"numDice": "8 + (spellLevel - 3) * 1",
"dieType": 6,
"output": "damageAmount"
},
{
"type": "forEach",
"list": "affectedTargets",
"as": "target",
"steps": [
{
"type": "savingThrow",
"ability": "Dexterity",
"dc": "caster.spellSaveDC",
"target": "target",
"onSuccess": [
{
"type": "applyDamage",
"amount": "damageAmount / 2",
"damageType": "fire",
"target": "target"
}
],
"onFailure": [
{
"type": "applyDamage",
"amount": "damageAmount",
"damageType": "fire",
"target": "target"
}
]
}
]
}
]
}Context Variables
These variables are available in expressions:
caster- The creature casting the effectspellLevel- The level at which the spell is casttargets- List of all available targetsselectedTargets- Targets selected by user
You can also access properties like caster.spellSaveDC or target.armorClass.
Expression Evaluation
Expressions support:
- Arithmetic:
+,-,*,/,() - Comparisons:
>,<,=,>=,<=,!= - Logical:
&&,||,! - Variables:
spellLevel,caster.spellSaveDC