#M&M Macros #2: Refresh Heroes

1 messages · Page 1 of 1 (latest)

acoustic obsidian
#

This Macro removes all Injuries and Conditions from the selected tokens.

#
//Refresh Heroes by Gazkhan - Jules and honeybadger with minor tinkering by DeviousHearts

//Required: Sequencer Module.
//Ensure you have all the file paths updated in order for this to run properly for the files the macro calls for.

// Get all selected tokens
let selectedTokens = canvas.tokens.controlled;

// Loop through each selected token
selectedTokens.forEach( tok => {

// Delete all active effects on the token's actor
tok.actor.deleteEmbeddedDocuments('ActiveEffect', tok.actor.effects.map(ef => ef.id));
  
// Set system.blessure to 0
tok.actor.update({"system.blessure": 0});

const rfstyle = {
  "fill": [
    "#ffc480",
    "#8e80ff"
    ],
  "fontFamily": "Impact, Charcoal, sans-serif",
  "fontVariant": "small-caps",
  "lineJoin": "round",
  "strokeThickness": 4,
  "wordWrap": true
}

new Sequence()
  .effect()
    .atLocation(tok)
    .text("REFRESH!",rfstyle)
    .scaleIn(0, 500)
    .fadeOut(6000)

.play()

new Sequence()
    .sound()
        .file("/Audio/Music-Stings/213095__soundsexciting__dramatic-musical-sting.ogg")
        .endTime(600)
        .volume(.05)
        .fadeOutAudio(150)
    .play()
});```
#

The sound file is only meant to notify the players of an action done. It is a short note. I got it from Freesound - https://freesound.org/browse/tags/sound-effects/ and converted it to an .ogg file to optimize storage. You can easily find it there and it is free to have an account to download many different sounds. 🙂

acoustic obsidian
#

Icon for you "Refresh Heroes" Macro

manic juniper
#

For replacing the ".file("/Audio/Music-Stings/213095__soundsexciting__dramatic-musical-sting.ogg")", where would the base section start from in the foundry data folder path? e.g. From the Root folder /Sounds?

acoustic obsidian
hexed roost
#

So I think I found a bug with this macro. Whenever you use it on a hero where they have an effect variant Active Effect, it gets rid of that effect. From then on, if you activate it in the menu, it no longer works till you replace the token

acoustic obsidian
#

Help me understand a bit. What do you mean by "Effect Variant Active Effect"?

hexed roost
acoustic obsidian
#

@tiny salmon and @zinc wasp Have you guys ever seen something like this? Is this part of a module interacting with the M&M system?

zinc wasp
#

What is that? I didn’t even know it existed lol

#

I don’t know what it is but I want it lol

hexed roost
#

Want what?

#

I'm confused

hexed roost
zinc wasp
#

Don’t take me seriously; it’s have never seen that screen before; and have no idea what it does

acoustic obsidian
#

Wow... That is either something new @tiny salmon added or I have been onblivious to it all this time. I have no idea even what it does. 🙂

hexed roost
#

It lets powers and advantages affect stats

acoustic obsidian
#

Amazing. Update went right past me. 🙂 I have never used them. Help me learn! What do they do? 🙂

hexed roost
#

Basically, you can click on the activate button to make the stat modifiers you put in your variant effects section become active

#

This allows for things like enhance strength to be easily togglable

#

The problem is that the way it does this is with an Active Effect, and this macro deletes all active effects on the character

acoustic obsidian
#

Nice!

hexed roost
#

See, you can see in the log for the character object that it lists the variant effects as Active Effects

#

So the macro completely breaks the system

acoustic obsidian
#

If that is used apparently, yep. Since I never used Power Mods, it never affected me.

hexed roost
#

Fair. They were only added 3 Weeks ago

#

Also, how do you get the conditions to do all those animations?

#

They don't do that for me

acoustic obsidian
#

Token Variant Art Module, I believe.

hexed roost
#

I just install the module and then the effects happen?

acoustic obsidian
#

No, you do have to program them but it is really east.

#

One sec. I think there is a Youtube on it.

#

here ya go.

#

Here's a pic of mine. Once you setup th module, you click Shift + G to get started

zinc wasp
#

Is there a way to export the config for Tia? If so wants pass,your cop y @acoustic obsidian ?

hexed roost
# acoustic obsidian

Right, but I'm not sure what settings to do for the overlay to make them look like yours did

hexed roost
hexed roost
#

@acoustic obsidian I made my own fix using the origin value idea. Here is the code for it


//Refresh Heroes by Gazkhan - Jules and honeybadger with minor tinkering by DeviousHearts

//Required: Sequencer Module.
//Ensure you have all the file paths updated in order for this to run properly for the files the macro calls for.

// Get all selected tokens
let selectedTokens = canvas.tokens.controlled;

// Loop through each selected token
selectedTokens.forEach( tok => {

// Delete all active effects on the token's actor
tok.actor.deleteEmbeddedDocuments('ActiveEffect', tok.actor.effects.filter(ef => ef.origin == null).map(ef => ef.id));
  
// Set system.blessure to 0
tok.actor.update({"system.blessure": 0});

const rfstyle = {
  "fill": [
    "#ffc480",
    "#8e80ff"
    ],
  "fontFamily": "Impact, Charcoal, sans-serif",
  "fontVariant": "small-caps",
  "lineJoin": "round",
  "strokeThickness": 4,
  "wordWrap": true
}

new Sequence()
  .effect()
    .atLocation(tok)
    .text("REFRESH!",rfstyle)
    .scaleIn(0, 500)
    .fadeOut(6000)

.play()

new Sequence()
    .sound()
        .file("https://assets.forge-vtt.com/65fb7c65683015b1cd32fd6f/Music/Sound%20Effects/Heal%20Sound%20Observation%20Haki.mp3")
        .endTime(600)
        .volume(.1)
        .fadeOutAudio(150)
    .play()
});
acoustic obsidian
#

Thanks! BTW, JB2a has many animations you can add to your Condition effects when you have Token Variant art but just using Token Variant Art, you can add a lot. I wish there was a way to save my settings for you.