Help with Roll20 API FX syntax: how do I make a Fire Bolt macro use a missile/projectile effect instead of only beam/breath? I’m working on a Roll20 Mod/API spell automation script. The macro passes FX names into the script, and the script calls either spawnFxBetweenPoints() for travel effects or spawnFx() for target/impact effects. The impact FX works correctly. For example: --fxHit|explode-fire
successfully creates an explosion on the target token. The problem is with the travel/projectile FX. So far, the only travel effects I can get working through spawnFxBetweenPoints() are things like: --fxBeam|beam-fire
--fxBeam|breath-fire
I am trying to make Fire Bolt look like an actual projectile/missile traveling from caster to target, rather than a beam or breath effect. Here is the Fire Bolt macro: !smarttarget --type|attack --name|Fire Bolt --source|@{selected|token_id} --target|@{target|Target|token_id} --attackBonus|@{selected|spell_attack_bonus} --cantripDice|d10 --damageType|Fire --range|120 --fxBeam|missile-fire --fxHit|explode-fire --leftsub|2014 Cantrip ♦ Ranged Spell Attack --rightsub|120 ft ♦ Fire --titlecardbackground|linear-gradient(#5a1600, #ff6a00) --titlefallbackcolor|#5a1600 --oddrowbackground|#b83200 --evenrowbackground|#fff0df --oddrowfontcolor|#ffffff --tablebgcolor|#fff0df --descbackground|#fff0df --descfontcolor|#3a1a00 --onHit|A mote of fire streaks toward the target. On a hit, the target takes fire damage. A flammable object hit by this spell ignites if it is not being worn or carried. --onMiss|The mote of fire streaks past the target. --desc|You hurl a mote of fire at a creature or object within range. Make a ranged spell attack against the target. On a hit, the target takes fire damage.
Inside the API script, --fxBeam|missile-fire is passed into this function: spawnFxBetweenPoints(
{ x: casterToken.get('left'), y: casterToken.get('top') },
{ x: targetToken.get('left'), y: targetToken.get('top') },
fxName,
pageId
);
So in this example, the script is effectively calling: spawnFxBetweenPoints(
{ x: casterToken.get('left'), y: casterToken.get('top') },
{ x: targetToken.get('left'), y: targetToken.get('top') },
'missile-fire',
pageId
);
The target explosion works, but the missile/travel effect does not appear. If I change the macro to use: --fxBeam|beam-fire
or: --fxBeam|breath-fire
then the travel effect appears. But if I use: --fxBeam|missile-fire
or: --fxBeam|rocket-fire
or a custom point-to-point FX name, I do not see a travel/projectile effect. Direct question How do I make this Fire Bolt macro successfully use a missile/projectile-style travel effect from caster to target? Specifically, what should this part be? --fxBeam|missile-fire
And what should the corresponding API call look like? spawnFxBetweenPoints(startPoint, endPoint, fxName, pageId);
What works Target/impact effects work with spawnFx() : --fxHit|explode-fire
--fxHit|burn-fire
--fxHit|burst-fire
Travel effects work with spawnFxBetweenPoints() only when using: --fxBeam|beam-fire
--fxBeam|breath-fire
What I cannot get working --fxBeam|missile-fire
--fxBeam|rocket-fire
--fxBeam|firebolt_rocket
Additional custom FX question I also tried making a custom FX named: firebolt_rocket
with point-to-point style properties such as: {
"name": "firebolt_rocket",
"angle": -1,
"rulerType": "line",
"isPointToPoint": true,
"duration": 25
}
Then I tried calling it as: --fxBeam|firebolt_rocket
which becomes: spawnFxBetweenPoints(startPoint, endPoint, 'firebolt_rocket', pageId);
But that also did not display a projectile/travel effect. Questions What is the correct syntax for using missile effects with spawnFxBetweenPoints() ? Is missile-fire a valid API FX name, or is there a different required syntax? Does spawnFxBetweenPoints() support projectile-style effects like missile , rocket , or custom point-to-point FX, or only beam/breath-style FX? Are custom FX callable by name through spawnFxBetweenPoints() , or do they require a different internal identifier? Which built-in FX types are valid for spawnFxBetweenPoints() versus spawnFx() ? Is there a full list of API-valid FX names and syntax for both travel effects and hit effects? I’m mainly using Fire Bolt as the example here, but I’m trying to solve this generally so different spell macros can use different travel and impact FX correctly.