You're welcome! I've learned a lot about Foundry since this, too.
@comfortablegrey11 ай бұрын
The first macro is from one token, to one target. The second macro is from one token, to a point AoE.
@comfortablegrey11 ай бұрын
// Usage: Select a token, and target a token, then activate this macro. // A dialogue box will pop-up. Select an element that makes sense // for whatever successful spell or effect you want to animate. Enjoy! // This tells the console who the target is let target = Array.from(game.user.targets) [0]; // This creates the dialogue. Fabula Ultima has nine elements, // so there are nine options. I will explain the first one. let d = new Dialog({ title: "Spell Effect", content: "Select the spell's element", buttons: { one: { icon: '', label: "Air", // Callback is the output from selecting "Air" in this case callback: () => new Sequence() // This animation takes place on the caster .effect() .file("jb2a.cast_generic.sound.01.pinkteal") .atLocation(token) .scale(0.25) .effect() // This animation stretches towards the target .file("animated-spell-effects-cartoon.simple.11") .atLocation(token) .stretchTo(target) // This makes it happen a few times, with a random delay between them .repeats(3, 200, 300) // This makes the animation look a little more natural // by making it rightside up, or upside down randomly. // It looks better on animations with an arc. .randomizeMirrorY() .effect() .file("animated-spell-effects-cartoon.air.blast.circle") .scale(0.5) .atLocation(target) .delay(1500) .play() }, // This is the next option, repeat. two: { icon: '', label: "Earth", callback: () => new Sequence() .effect() .file("jb2a.cast_generic.earth.01.browngreen") .atLocation(token) .scale(0.25) .effect() .file("jb2a.boulder") .atLocation(token) .stretchTo(target) .randomizeMirrorY() .effect() .file("animated-spell-effects-cartoon.earth.explosion.02") .atLocation(target) .scale(0.25) .delay(2000) .play() }, three: { icon: '', label: "Fire", callback: () => new Sequence() .effect() .file("jb2a.cast_generic.fire.01.orange") .atLocation(token) .scale(0.25) .effect() .file("jb2a.fire_bolt.orange") .atLocation(token) .stretchTo(target) .delay(500) .repeats(3, 200, 600) .randomizeMirrorY() .play() }, four: { icon: '', label: "Ice", callback: () => new Sequence() .effect() .file("jb2a.cast_generic.water.02.blue") .atLocation(token) .scale(1) .effect() .file("jb2a.spell_projectile.ice_shard.blue") .atLocation(token) .stretchTo(target) .repeats(3, 200, 600) .randomizeMirrorY() .play() }, five: { icon: '', label: "Bolt", callback: () => new Sequence() .effect() .file("jb2a.chain_lightning") .atLocation(token) .stretchTo(target) .repeats(3, 200, 300) .randomizeMirrorY() .play() }, six: { icon: '', label: "Poison", callback: () => new Sequence() .effect() .file("jb2a.markers.poison.dark_green.02") .atLocation(token) .scale(0.25) .effect() .file("animated-spell-effects-cartoon.cantrips.acid_splash") .atLocation(token) .stretchTo(target) .repeats(3, 300, 500) .randomizeMirrorY() .play() }, seven: { icon: '', label: "Physical", callback: () => new Sequence() .effect() .file("jb2a.markers.chain.spectral_standard.complete") .atLocation(token) .scale(0.5) .effect() .file("jb2a.impact.001") .atLocation(target) .repeats(2, 500, 1000) .randomizeMirrorY() .effect() .file("jb2a.impact.007") .atLocation(target) .repeats(2, 500, 1000) .randomizeMirrorY() .effect() .file("jb2a.impact.010") .atLocation(target) .repeats(2, 500, 1000) .randomizeMirrorY() .play() }, eight: { icon: '', label: "Light", callback: () => new Sequence() .effect() .file("jb2a.cast_generic.01.yellow") .atLocation(token) .scale(0.25) .effect() .file("jb2a.energy_beam") .atLocation(token) .stretchTo(target) .repeats(2, 200, 400) .randomizeMirrorY() .play() }, nine: { icon: '', label: "Dark", callback: () => new Sequence() .effect() .file("jb2a.markers.fear.dark_purple.02") .atLocation(token) .scale(0.25) .effect() .file("jb2a.magic_missile.purple") .atLocation(token) .stretchTo(target) .repeats(3, 200, 300) .randomizeMirrorY() .play() } }, default: "two", render: html => console.log("Register interactivity in the rendered dialog"), close: html => console.log("This always is logged no matter which option is chosen") }); d.render(true);