#MidiQOL

1 messages · Page 73 of 1

vast bane
#

I think also that Dc is responsible for the previous error I reported where the save DC was not showing right on the card

violet meadow
broken bridge
#

For reference, I was using something like this:

turn=end,damageRoll=(@spellLevel)d10,damageType=psychic,saveAbility=wis,saveDC=@attributes.spelldc,label=Phantasmal Killer

and it was working really well.

vast bane
#

I did change your item, but I didn't think it would matter, I changed them from statusEffect to Macro.ce....changing back to see if thats my fault

#

oh shit it is my fault, I renamed the item to Tasha's Hideous Laughter and am noticing you call the item name

violet meadow
#

@vast bane wait I will share the Item again in a bit

#

wrong one

broken bridge
#

BTW, would you have a blurb of code I could steal to do that ? :)

spice kraken
#

Stick to one place at a time. Already answered (most likely) in #dnd5e

vast bane
#

yeah it still throws same error

#

man I kinda don't like statuseffect now that macro.ce is working right its a much cleaner workflow and spits out the dfreds CE messages for helpers for the DM

sudden crane
# broken bridge BTW, would you have a blurb of code I could steal to do that ? :)

Something like that:

  // Temporary spell data for the burst effect
  const areaSpellData = {
    _id: randomID(),
    type: "spell",
    name: `${itemName}: Burst`,
    img: sourceItem?.img,
    system: {
      level: level,
      chatFlavor: `[${nbDice}d10 - piercing] Target of the attack and each creature within 5 feet of it`,
      damage: { parts: [[`${nbDice}d10[piercing]`, "piercing"]], versatile: "" },
      actionType: "save",
      save: { ability: "dex" },
      preparation: { mode: "atwill" },
      target: { type: "creature" },
    },
  };
  setProperty(areaSpellData, "flags.midi-qol.onUseMacroName", `[preambleComplete]ItemMacro.${itemName}`);

  const areaSpell = new Item.implementation(areaSpellData, {
    parent: macroData.actor,
    temporary: true,
  });

  const targetToken = macroData.hitTargets[0].object;
  let aoeTargets = MidiQOL.findNearby(null, targetToken, 5);
  aoeTargets.unshift(targetToken);

  const options = {
    targetUuids: aoeTargets.map((t) => t.document.uuid),
    configureDialog: false,
  };
  await MidiQOL.completeItemUse(areaSpell, {}, options);
scarlet gale
#

Wasn't sure if it changed in v10 or not

vast bane
#

Dfreds ce is lookin quite stable I'm changing the copy paste

scarlet gale
#

I've been using js let spell = new CONFIG.Item.documentClass(spellData, {parent: targetActor});

broken bridge
#

I'm in v9.

vast bane
#

not sure I like how statusEffect is smooshin them together in an overtime

sudden crane
spice kraken
#

Huh?

scarlet gale
#

I think you got accidently responded to

broken bridge
#

Prob a fail reply ^^

sudden crane
#

@spice kraken sorry for the ping, wrong reply to…

spice kraken
#

Haha, I was confused there

scarlet gale
#

pings again

spice kraken
#

The way I see it, if you're a helper in this disc, be ready for pings, haha

scarlet gale
#

fair

#

#macro-polo Might be able to point you the right way for synthetic items in v9. Or I'm betting you could look at source code for modules that do it

vast bane
#

this past weeks session I ran was one of the smoothest runs I've had yet. Had only one outstanding error message. Just am waiting for simbuls to fix their debugger and should be a smooth console

scarlet gale
#

Just like delete whatever console.log or whatever is laying around

vast bane
#

I figured they'd fix it soon on their own since they answered both of our issues directly in their git

#

nah its messier than that

#

the debugger resides in the support module

scarlet gale
#

Then delete it out of there?

#

You can click on it in console and it'll show you the exact line that has a leftover console.log

vast bane
#

bugbear gave me the instructions I'll find them

violet meadow
#

The instructions are incomplete

vast bane
#

did you make a feature for your module where we can just press a button and it finds and updates any existing versions of your premades?

violet meadow
#

I have created an issue in simbul's with what needs to be done more or less

scarlet gale
#

Look for the med kit icon on your items

vast bane
#

nice, starting to work your stuff into my custom worlds

delicate quartz
#

Okay, a midi specific question as I'm pretty sure the 5E system doesn't handle this out of the box. Does Midi store the most recent skill or ability check rolls anywhere? And if so is it possible to retrieve them for use in macros or other modules? For instance, if I roll a stealth check, is that value saved anywhere?

violet meadow
#

nope. But you can access the chatMessage to retrieve it if need be

#

What are you trying to do?

#

If this roll is called from a MidiQOL workflow, like an Item rolling that check or something, you could access the Worklfow for some time to retrieve that as well (from the same client that rolled it)

vast bane
#

If its indeed for banking stealth, Stealthy module is a masterpiece module, so good.

delicate quartz
#

Streamline accessing information when I'm running combat by adding the stuff I use most to Ilandril's Token Tooltips. I thought having a token's most recent stealth check result would be handy for determining hidden status.

delicate quartz
vast bane
#

bro get Stealthy your mind is gonna be blown

#

that module is AMAZING for spot/stealth

#

are you on v10?

delicate quartz
#

Oooh you're getting me hyped up.

#

I use stealth and hiding a lot.

#

Yes I am.

violet meadow
#

Its conditional visibility for v10 on steroids for Stealth checks 😄

scarlet gale
#

I should really install that module

vast bane
#

yar its pretty dope for midi setups

scarlet gale
#

Everyone is my game is a bunch of magic casters so I haven't had much for sneaking

violet meadow
#

Can automate hidden Doors too (regular doors only though, don't try to use it on Secret Doors)

vast bane
#

I haven't turned that setting on yet now I'm even more excited

scarlet gale
#

It's my own fault, since I had everyone use Ravnica backgrounds and ebberon races.

vast bane
#

i always ban the ravnica backgrounds and strixhaven shennanigans in a similar vein

#

also the new stuff in spelljammer

#

just the wonky backgrounds

scarlet gale
#

Yea, I wouldn't normally allow Ravnica backgrounds outside the setting

#

But my game is purposefully using them

delicate quartz
#

Do I need to do anything special to get Stealthy to work with Midi? Or are they independent of each other?

vast bane
#

I got my players building their next campaign toons cause I have a feeling they are going to outpace my patreon artist I went with for dotmm, so far I got a divine soul sorcerer astral elf and a changeling champion fighter.

#

3 pending builds

#

I refuse to use any other artist for my dotmm needs, Tychmaps are like in a league of their own

scarlet gale
#

Divine soul so good to one level dip into

vast bane
#

Shes going full divine soul

scarlet gale
#

Still a fun subclass

#

Sorc with cleric spell list IIRC

vast bane
#

I had them all roll 4d6kh3 and they got 3 stat sets equalling 84

scarlet gale
#

Can do some fun stuff with that

vast bane
#

I don't care if they are high stats, I'm just happy theres going to be no pally this run lol

scarlet gale
#

That's surprising

#

I only play that class when the stats are above average

#

And those are 100% pally stats

vast bane
#

they can basically multiclass anything with those

delicate quartz
#

For my next campaign my plan for stats is to get each of my players to roll 4d6KH3 once, and then i'll roll as well to give six randomised ability scores, and then that will be the default array for all characters.

Equalises power level but everyone gets to have fun rolling.

scarlet gale
#

Do you guys think Arbron’s Summoning will get proper updates? Or should I just spin up my own summoning functions for my module?

vast bane
#

I have them all roll and myself too, and then they can pick whatever set they want in whatever order

#

My issue with arbrons summoning is why have it if you have to use warpgate/sequencer anyway in a macro with it

#

if it did it all then I'd use it, but its ripe for trimming when trying to reduce module counts due to the fact its not doing the whole thing

scarlet gale
#

I've been using p4535992's fork of Automated Evocations. But that's not exactly something I can easily do for the published module

vast bane
#

hes got like 100 modules to maintain, talk to him, I wonder if he'd gladly hand it over

scarlet gale
#

Arbron’s Summoning doesn't have enough API methods for me to properly work with at the end of the day

#

I wouldn't want it

vast bane
#

just merge it into cpr

scarlet gale
#

The issue is making the module easy to install

#

ehh

#

jbowens already mentioned merging their stuff from more items

#

I still need to take a proper look at the stuff from that

vast bane
#

If I rename Acid Arrow to Melf's Acid Arrow will that break anything with CPR?

scarlet gale
#

Nah

#

I should actually rename that in the module

#

It's just a pre-setup overtime IIRC

#

I should actually confirm it's working as intended

violet meadow
scarlet gale
#

That acid arrow isn't handling the half damage part. I'll update that.

#

(And rename it)

jade gazelle
#

Question: Is there a way to make an effect that makes its target only do half damage? I'm trying to automate Ray of Enfeeblement.

scarlet gale
#

I should add this to my module.

#

The DDB importer has it's own version of the spell, but it's janky

violet meadow
#

MidiSRD changes all weapons damage parts to be 1/2 when they use strength, but using MidiQOL workflows make much more sense

jade gazelle
#

MidiSRD? oh my

scarlet gale
#

less breaky IMO

jade gazelle
#

hm okay

#

yeah 'd rather learn how to do it the hard way anyways lol

#

then it won't be hard later

scarlet gale
#

more or less have the effect apply an on use macro

#

and have that on use macro check for str attacks and halve the damage

vast bane
scarlet gale
#

I'm not including descriptions

#

I doubt they're going to care that the name is mentioned

#

How else are you supposed to find the matching automation if I couldn't use the name of said automation

vast bane
# jade gazelle MidiSRD? oh my

Sources of premade stuff for Midiqol:

Midi Sample Items Compendium(comes with the module)

Midi SRD's compendiums
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json

More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats

Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros

Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros

Chris' Module form of his macros:
https://foundryvtt.com/packages/chris-premades

Activation condition examples by ThatLonelyBugbear
#1010273821401555087 message

vast bane
#

its not using MTB but honestly if you think about it, this is one of those times where DM auto is impossible to mess up anyway since the spell insists the rolls are advantage no matter what

violet meadow
#

Oh I need to include the if int < 5 do not apply

vast bane
#

can it be renamed or will it break the macro?

violet meadow
#

Rename the Effect's name too and will be fine

delicate quartz
#

This is SO GOOD.

vast bane
#

Now I forget which 4 letter green name is the author to ping so they see the love

jade gazelle
#

Am I dumb? I've made the effect and called it "HalfDamage" as a macro and the attached it to the effect I made

vast bane
#

either rule or idle lol

jade gazelle
#

yet it still isn't doing it

violet meadow
jade gazelle
scarlet gale
#

Keep in mind that example does half damage for everything

jade gazelle
#

that's fine. just as long as something does half, i can manual the rest lol

vast bane
#

if you install the midi srd fork you don't have to make anything and can just drag and drop

violet meadow
#

DFreds CE issue I think. Make that on a DAE directly

scarlet gale
#

You'll want to do a check on workflow.item to see what stat it uses

violet meadow
#

@jade gazelle try creating the DAE directly on the spell

jade gazelle
#

i'll try making on DAE

vast bane
#

have we cleared advanced macros from our premades yet or is it still required? he doesn't have it fyi

scarlet gale
#

I still have the module, but nothing uses it anymore

#

AA template auras needs it iirc

vast bane
#

yeah

scarlet gale
#

So if you have stuff that uses that...

vast bane
#

that might not even actually need it, thats carried over from kandashi's builds and is just checking for it

#

wonder if we can just clear that line out of the macro

scarlet gale
#

I think it's needed to pass the args

#

Anyways off to bed, I'll take a look at acid arrow and zellot barb tomorrow

vast bane
#

I actually think acid arrow is also in midi samples

scarlet gale
#

I willing to bet it won't work on a nat 1

#

Since damage workflows aren't run for that

#

Unless it manually rolls the half damage

jade gazelle
#

WOW

#

it worked, thanks dude

viscid lance
#

Is there a way to see why midiQOL is making a roll at advantage or disadvantage if you aren't sure why?

viscid lance
#

Thank you

jade gazelle
#

Oh

#

I had that happen. I couldn't figure it out. It was actually that the scenes weren't globally lit so... the tokens couldn't see... and always rolled disadvantage

vast bane
#

I actually think Tposney should make attribution on by default cause that hidden flag is sneaking up on everyone lol

sleek pulsar
#

I'm using midi .32 - is this function working as expected? I seem to recall there being a reason I turned it off

broken bridge
opaque patrol
broken bridge
#

Quick question because reading the documentation, I'm confused on how it works:
With itemMacro and midi-qol, is there a way to alter the targets of an ongoing workflow?

Because when you cast an AOE spell, it targets everything in it, and I want it to only target allies. Can I do that with an itemMacro?

violet meadow
#

Like 30 | Ft | Ally

broken bridge
#

Cannot do that.

violet meadow
#

If you want to put down a MeasuredTemplate at some other point then you can use a macro

broken bridge
#

Cuz ally is in the same menu as "sphere", and I have to have a measuredTemplate.

#

Because it's not an aura, it's an aoe on a point within range.

violet meadow
#
  • Added preTargeting onUse macro call and preTargeting Hook. This is called before any item use processing is done It is also called before the workflow is created so only very limited data is available. A dummy workflow (if a workflow does not already exist for the item) is created, with the item/actor and selected targets is passed to the macro/hook.
broken bridge
violet meadow
#

You can change them there probably, or you can change the ones you want after the template is created called only once the template is placed

I have used just the game.user.updateTokenTargets([ids]) to change them by getting the game.user.targets returned by the automatic MidiQOL (or other module's) targeting for AoE and then filtering for the allies

broken bridge
#

In general, I have a hard time understand how mutability works in foundry. Are the arguments passed to macro copies or references to the actual arguments of the workflow?

#

Hmm.

#

Ok

#

Imma try

broken bridge
violet meadow
#

Or a macro onUse

#

Filter for ```js
if

broken bridge
#

Yeah, I did that, I get the args.

#

My qyestion is, if I modify that, is it just modifying a copy, or am I actually modifying the actual workflow?

violet meadow
#

You can modify the Actual MidiQOL workflow in that stage

broken bridge
#

Oh, cool. So I just have to edit hitTargetUuids?

violet meadow
#

OK bear with me I am in a meeting 😄

broken bridge
#

I'm not pressing you for answers, I"m grateful for your time :)

violet meadow
#

Yeah no worries, didnt mean it like that. its just I need some time 😄

broken bridge
#

So theorically, I can just do :

#
args[0].targets = args[0].targets.filter(t => t.data.disposition == -1);

in the item Macro and I'm good?

violet meadow
#

Try this at any point after the template has been placed. ```js
game.user.updateTokenTargets(args[0].targets.filter(tok=>tok.disposition === canvas.tokens.get(args[0].tokenId).document.disposition).map(i=>i.id))

violet meadow
broken bridge
#

Ok, I'll try the updateTokenTargets.

violet meadow
#

You will need to change the ```js
let workflow = MidiQOL.Workflow.getWorkFlow(args[0].item.uuid)
workflow.targets = ...

torpid kestrel
#

Created a magic item for Boots of Elvenkind and was surprised when I didn't get the advantage roll. V10.291 5e 2.1.4 midiqol 10.0.32 I can see the passive effect on the character, but am not getting the advantage rolls. Any ideas?

violet meadow
#

or just plainly using ```
this.targets = ...

broken bridge
sleek pulsar
#

This Spiritual Weapon item macro is from the MidiQoL sample items compendium. It's not quite working for me. The SW actor that warpgate creates isn't set up correctly (I think - the attack isn't equipped, so there's no attack roll). I have an actor that the macro could use, but I'm not sure how to get it to do that. Any help would be gratefully received. (the macro is apparently too long for discord)

torpid kestrel
broken bridge
#

this.targets doesn't work, imma try fetching the workflow.

torpid kestrel
violet meadow
#

this.targets = [token] as an ItemMacro | Called before targeting is resolved

broken bridge
#

I did it on "call after template is placed", Imma try.

#

Fetching the workflow doesn't work either ><

#
let workflow = MidiQOL.Workflow.getWorkflow(args[0].item.uuid);
workflow.targets = new Set(args[0].targets.filter(t => t.data.disposition == 1));

Should work, right?

#

(I'm trying to target only allies for healing).

violet meadow
#

oh you are v9

#

Try without the data before the disposition

broken bridge
#

Yeah, but it's the same from what I can see in logs.

#

So my code is:

#
console.log(args)

let workflow = MidiQOL.Workflow.getWorkflow(args[0].item.uuid);
console.log(workflow);
workflow.targets = new Set(args[0].targets.filter(t => t.data.disposition == 1));

console.log(workflow)
#

And for some reason, on the second log, the targets are unchanged.

#

This is kinda frustrating x)

dark canopy
#

Likely the template actor needs a particular item on it for the macro to scale

violet meadow
#

When do you run the macro?

broken bridge
#

"After Targeting complete"

#

Imma try the game.user.updateTokenTargets thing

#

Oh! A change!

#

Now there are no targets anymore. I think I messed up in the ids, but it's promising! Thanks a ton !

violet meadow
#

Yeah the game.user.updateTokenTargets is my go-to method TBH

broken bridge
#

It works. Thanks again. You're the best bugbear there ever was.

torpid kestrel
#

Is that a really low bar?

broken bridge
#

Dunno. There are a lot of bugbears out there.

hard oxide
#

Hi guys is there a way to create a weapon with two damage type (piercing / slashing for example), but only one damage roll, just so that it applies on resistance / vunlerability etc with piercing AND slashing

violet meadow
#

Just add more Damage Formulas

kind cape
#

two damage type (piercing / slashing for example), but only one damage roll
Emphasis mine

#

I'm reading that as a 1d6[slashing/piercing] that they want 🤔

violet meadow
#

well that is a strange request that did't cross my mind!

hard oxide
#

Because im from pathfinder 1, and some weapons have two damage type thats why 😄

#

and on Midi i can't like change the damage type

#

it does rolls instantly

unkempt wing
#

Hello everyone
I was just looking at the MidiQOL class features for Bardic inspiration and there are 2: Bardic Inspiration (Valor) DND2.0.2 MQ10.0.10 & Bardic Inspiration DND2.0.2 MQ10. It also says: "You must ensure your bard has the dnd1.6 bard class not the older 1.5 version or scaling won't work."
Does anyone know which one should I use and how do I know which dnd bard class I have 1.5 or 1.6?
Thanks in advance

violet meadow
hard oxide
#

Okok thanks you a lot

kind cape
#

You can also use the versatile field, then you can use [] to have a different type in there

#

Through then you have to pick the type before you start the roll still

sleek pulsar
violet meadow
#

You can automate it. For instance if the description of the item is something like damageTypes: ["slashing", "piercing"]
ItemMacro | Before Damage Roll ```js
//const damageTypes = ["slashing","piercing"]; will make it work better later
const targetActor = args[0].hitTargets[0].actor;
if (targetActor.system.traits.di.value.has("slashing") || targetActor.system.traits.dr.value.has("slashing")) this.item.system.damage.parts[0][1] = "piercing"
else if (targetActor.system.traits.di.value.has("piercing") || targetActor.system.traits.dr.value.has("piercing")) this.item.system.damage.parts[0][1] = "slashing"

#

hmm this might work actually 🤔

hard oxide
#

it works thanks you

#

its insane how fast u did this thanks u a lot

violet meadow
#

It needs some cleaning up! There are situations that this will fail and need to filter them.

#

What happens if it has both slashing and piercing resistance etc. no need to change anything then

#

I might play more with it when I have time

#

Can change the damageType to target damage vulnerability also

hard oxide
#

Like right now, it only applies to damage resistance right ?

violet meadow
#

I changed it from probably when you copied it

#

The latest should be fine for dr and di

#

I should really clean it up to be easier to read

hot flower
#

hi, @scarlet gale just FYI, The vampiric touch isn't working. Getting an getItemDescription is undefined error....

#

think it's line 12 in the macro: featureData.system.description.value = getItemDescription('CPR - Descriptions', 'Vampiric Touch Attack');

#

there's no CPR -Descriptions compendium, and it might need to be chris.getItemDescription... is that right?

scarlet gale
#

hmm

#

That's actually the journal page

#

Are you on a GM account?

hot flower
#

yes

scarlet gale
#

Did you delete the journal entry that gets generated?

hot flower
#

no

#

i didn't know the journal entry was there...

scarlet gale
#

Could you screenshot the error in console?

#

instead of just the snippet

#

Easier to figure out the line the error is on

hot flower
scarlet gale
#

oh

#

i see the error

#

I dropped a chris.

#

from before it

#

Just pushed the update

#

You may need to force re-download it

hot flower
#

ah, i also see an issue. When I target a token and cast the spell, it creates the vampiric touch attack but doesn't execute an attack. Maybe it's just interpreting the rules differently, but my impression was that you made a mêlée spell attack, it did the damage/healing, then it added the vampiric touch attack item which you could use on your subsequent turns. since the vampiric touch is linked to the target, right?

scarlet gale
#

Oh, you should use the created attack as well

#

I didn't have it doing that automatically because it was problematic to do with renamed spells

hot flower
#

so cast the spell with no target then use the created item?

scarlet gale
#

pretty much

#

although I just thought of a fix for that

#

but for now it's intended that you just click the spell, then click the created feature

hot flower
#

ah, ok. i was using another macro before that made the attack then created an at-will spell for later use.

#

but i'm trying to cut down on multiple sources of macros

scarlet gale
#

I'm making an update for it that'll do the initial attack

hot flower
#

if anyone is interested, I wrote a script that will get various compendia (you can define them in the macro) and let you select one to update all your spells and items, etc. in one push.

scarlet gale
#

I plan on making a button in the actor hotbar that will do that for my stuff. Right now you need to do it on a per-item basis. Click on the med kit icon on a spell or feature you have and it'll look for my own automation for it.

hot flower
#

that's what got me thinking of this.

scarlet gale
#

For the split second I saw yours, it looked like a variation of my spell updater macro

hot flower
#

i modified this from somewhere. not sure where the origin is.

scarlet gale
#

Looks like mine honestly

hot flower
#

might be, but with some modifications

scarlet gale
#

I put the dryRun part at the top of mine lol

vast sierra
#

(as i see deletes in that, be sure to make backups before executing for safety reasons) 🙂

hot flower
#

probably from you then. 🙂

scarlet gale
#

Just FYI, that can result in problems on NPCs, since a lot of monster share the same feature name

hot flower
#

yes, it actually replaces items and spells, instead of just updating them. I found I was getting multiple AEs if I let it update

#

i should make a note this is just for PCs

scarlet gale
#

If you want to see how I handle NPC item detection

hot flower
#

might be a bit specialized for wider use.

scarlet gale
#

Also, you have a .data in you script

#

let actorID = actorD.data._id; should probably be let actorID = actorD.id;

hot flower
#

thank you1

quiet solar
scarlet gale
#

Next update will auto use Vampiric Touch Attack on the initial casting

kind cape
scarlet gale
# hot flower
const isFavorite = oldItem.flags.favtab && oldItem.flags.favtab.isFavorite && oldItem.flags[ "tidy5e-sheet" ]?.favorite || false;```
I think this won't ever detect anything as being a favorite.  Since you're setting it to have the old favorite flag and the new one.
scarlet gale
scarlet gale
#

At least for AOE stuff

delicate quartz
#

@opaque patrol this mod is awesome.

opaque patrol
#

@violet meadow Did something happen to the 'ReactionFilter' in the last couple updates? It doesn't seem to be respecting the adjusted item list anymore.

knotty hollow
#

Hey, I'm using the MidiQOL Sample Item for Sneak Attack, on a half-orc rogue that also has Savage Attacks (roll an extra damage die when you crit with a melee weapon attack).

Everything seems to work fine except for it's rolling 6d6 for sneak attack damage when I think it should still be rolling 3d6 as the rogue is level 6. I don't think savage attacks should give an extra damage die for each die rolled on Sneak Attack.

So the order is this that is currently happening:

  1. Rogue goes first in combat and uses scimitar+1
  2. Rogue rolls with advantage due to Assassinate, rolls 26 total
  3. Target has surprised status so Assassinate causes the attack to automatically crit
  4. Rogue rolls 3d6 +1 + 2 damage on the +1 scimitar, which would normally be 2d6 due to the crit, Savage Attacks makes that 3d6
  5. Option then appears to use sneak attack
  6. Press yes
  7. Rolls 6d6 - I think this should still be 3d6 as the rogue is level 6

How I have assassinate set up is as an item macro on the +1 scimitar, which is below, and I am using the Sneak Attack item from the MidiQOL Sample Items compendium. Savage Attacks is set up by adding a Special Trait to add one extra crit die.

The ItemMacro for the +1 Scimitar to automate Assassinate is the same one that @violet meadow posted above in this channel:

#

if (game.combat.round !== 1) return;

const sourceTokenId = args[0].tokenId;
const targetToken = args[0].targets[0];
const targetActor = args[0].targets[0].actor;
const targetTokenId = targetToken.id;

const sourceTurn = game.combat.turns.findIndex(t => t.tokenId === sourceTokenId);
const targetTurn = game.combat.turns.findIndex(t => t.tokenId === targetTokenId);

if (sourceTurn < targetTurn) {
game.assassinateAttackHookdId = Hooks.once("midi-qol.preAttackRoll", (workflow) => {
foundry.utils.setProperty(workflow, "advantage", true);
})
if (targetActor.effects.find(eff => eff.label === "Surprised")) {
game.assassinateDamageHookdId = Hooks.once("midi-qol.preDamageRoll", (workflow) => {
foundry.utils.setProperty(workflow.rollOptions, "critical", true);
})
}
}
Hooks.once("midi-qol.RollComplete", () => {
if (game.assassinateAttackHookdId) Hooks.off("", game.assassinateAttackHookdId);
if (game.assassinateDamageHookdId) Hooks.off("", game.assassinateDamageHookdId);
});

violet meadow
#

Maybe you need to poke the Big Master 😁

violet meadow
#

Hmm I am on the phone now so not easy to follow that

opaque patrol
knotty hollow
violet meadow
#

@knotty hollow the critical sneak attack should be 6d6, correct?
Plus 3d6 + mods for savage attack and critical for the scimitar.

Do you see something else?

knotty hollow
#

No that's what's happening, but I don't believe Savage Attacks should stack with Sneak Attack in that way, since Savage Attacks only gives an extra 1 damage dice on the melee weapon attack, I don't think it should add anything to Sneak Attack. Even if it did, I would've thought that should only be 4d6 (3d6+1d6) rather than rolling an extra damage die for each sneak attack damage die, 6d6 (3d6+3d6)

#

I don't know if there's some change I can make to the macro to account for that specific scenario?

#

It’s perfectly possible I’m either wrong or totally dumb

violet meadow
#

I am confused.
Lvl 6 rogue does 3d6 sneak attack.
Critical sneak attack is 6d6.

knotty hollow
#

…I’m dumb

knotty hollow
#

Ignore me haha

violet meadow
#

Hahaha no worries. I have done worse 😁

knotty hollow
#

Think I was just taken aback by the damage for a level 6 - not used to rogues at all haha, thought something had to be wrong

violet meadow
#

They do tend to be dealing lots of damage thats why I hate the shoot and hide mechanics for rogues

hot flower
#

hey all-- i'm trying to automate a wisdom saving throw on an attack that is described like so: Melee Spell Attack: +8, reach 5 ft., one target. Hit: [[/r 1d6 + 3 + 3]] slashing damage. If the target is poisoned, it must succeed on a Constitution saving throw against your spell save DC or be paralyzed until the end of its next turn.

#

I've got the condition working.

#

which triggers an item macro:

#

and the item macro is getting the target, and its uuid: ```js
const lastArg = args[args.length -1];
let target = await fromUuid(lastArg.tokenUuid);
let uuid = target.actor.uuid
console.log("uuid:", uuid);

await game.MonksTokenBar.requestRoll([{"token":target}],{request:[{"type":"save","key":"wis","slug":"save:wis"}], dc:16, silent:true, fastForward:true, rollMode:'roll'})

ui.notifications.info("This macro worked!")```

#

but i'm not sure a) how to get the spell dc from the original caster (this is an attack from a summoned creature, and the save is the original caster's spell DC) and b) how to call the saving throw elegantly.

#

basically three tokens/actors are involved

#

summoner > need spell DC
summoned > making attack
Target > poisoned and has to make wisdom save vs. summoner's spell DC

violet meadow
violet meadow
#

Undead Spirit? 😄

#

target.effects.some(eff=>eff.label === 'Poisoned') as an Activation condition on the attack

#

Ah you got that already, nice

#

I just use an actor with the attackBonus, damage and saveDC pre defined cause I am bored

hot flower
#

on my summon spells, I'm using Crymic's macro to summon from a single Undead Spirit that has all the items on it, but which get deleted/scaled depending on the type of summoning.

coarse mesa
#

My group is gonna be playing without me this weekend 😔. I think I have .30 installed right now which had some issues iirc. Am I pretty safe to just update midi, dae, CE to the latest versions before they play? Or am I gonna be wreaking havoc for them?

lucid barn
#

hello! have a way to setup magic resistance for the player? mid flag not working.. add feature with the name and nothing. Thanks

coarse mesa
#

Thanks. I think I saw some potentially worrying post from Moto that the Do Not Apply CE checkboxes might be misbehaving or something. But if you and Chris are all fine that’s good enough for me!

violet meadow
#

I think DFreds issued an update

coarse mesa
#

I can’t really test right now, in hospital for a few days

violet meadow
#

Wait for Moto to chime in

violet meadow
coarse mesa
#

How dare my group carry on without me tho

violet meadow
#

Congratulations!!

coarse mesa
#

Thanks midi fam

spice kraken
#

But congrats!!!

vast bane
# violet meadow Wait for Moto to chime in

@coarse mesa Congrats on boys and the statusid bug was fixed, the toggle now works right, and macro.ce is working great. I'm fairly confident the newest of all 3 is the new stable unless I see otherwise. Now the only outstanding instability is Simbuls Cover Calculator as it throws a ton of errors and it still has that debugger issue.

#

is anyone else unable to get flanking to work in the newest midi?
Nm hostiles can't flank hostiles

rich kelp
#

Hello 🙂 I am experiencing a problem with MIDI-QOL. Specifically when casting lightning bolt against foes, I get this :
Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'ignoreTotalCover')
[Detected 1 package: midi-qol]
Strangely enough it doesn't seem to happen, e.g. , with cone of cold

vast bane
#

isn't the solution to that to toggle the cover checkbox?

rich kelp
#

I can't find it.

#

(I supposed it would be something simple like that, but I can't find where that checkbox is)

violet meadow
#

What MidiQOL version are you on EA?

rich kelp
#

Latest I think, I just uninstalled and reinstalled - 10.0.32

violet meadow
#

Strange. This should be fixed in 10.0.32 🤔

rich kelp
#

it doesn't happen for, say, fireball or cone of cold

#

Just lightning bolt I've discovered so far.

violet meadow
#

lightning bolt from the SRD spells?

rich kelp
#

I think I imported from DDB

violet meadow
#

Can you get the Lightning Bolt from the Spells (SRD) and try again?

rich kelp
#

Let me try with both

#

No, nothing. Same with both

violet meadow
rich kelp
vast bane
#

does the user have spellsniper?

violet meadow
# rich kelp

yeah it seems it needs optional chaining there too ```js
item?.flags.midiProperties?.ignoreTotalCover &&

violet meadow
# rich kelp

Try checking the box at the bottom of the details page of the spell

rich kelp
#

That did it, thank you

violet meadow
#

The issue is why would it not find the midiProperties if the Item is a Spell?

rich kelp
#

I really have no clue...

#

Maybe something is wrong with my foundry setup, and it's not your fault? Maybe something was imported the wrong way...I truly don't know

violet meadow
#

It can't be mine, cause it's not my module 😅 but I am wondering why 😄

scarlet gale
#

Could be the flag never got set on the item somehow

#

like the whole midi flag

violet meadow
#

yeah I wonder how

rich kelp
#

Now i know how to fix it though, so win !

#

I am yes.

vast bane
#

I wonder if that could be it?

violet meadow
rich kelp
#

Upon checking/unchecking it works.

violet meadow
vast bane
#

weird

rich kelp
#

Sorry I can't be of more help :/

violet meadow
#

Somehow the midiqol flags were not set

vast bane
#

what are your dnd5e, midi, dae version numbers?

#

and foundry build

rich kelp
#

All latest

violet meadow
vast bane
#

any chance we can get the actual numbers?

rich kelp
#

Foundry : 10.291

#

DAE : 10.0.22

#

5e : 2.1.5

#

Midi : 10.0.32

vast bane
#

Man that bug is gonna bother me forever, I hope tposney says what fixes it when he finds it lol

violet meadow
#

the ignoreTotalCover?

vast bane
#

yeah just knowing whats causing it

rich kelp
#

what's strange to me, is that it shouldn't throw up

violet meadow
#

Just a ? in that line is what it will need

rich kelp
#

in the utils.breakpoint, I moused over. item?.flags is null.

#

But null checking is there with ?.

#

I really have no clue.

violet meadow
#

item.flags will exist

rich kelp
#

But not item?.flags ?

violet meadow
#

item.flags.midiProperties was the issue

vast bane
#

I don't get the error and I have the same versions as them

violet meadow
#

The error shouldn't be triggered

#

Something was bugged cause the Item didn't have a flag what was supposed to be there 🤷

rich kelp
#

What's weird is

#

if I try a similar spell (e.g. Aganazar's scorcher), it works fine

#

Ah well, no harm no foul 🙂

vast bane
#

since tim just changed that checkbox's functionality maybe he changed something about it and mr.primates imports aren't following the change?

#

maybe the srd got replaced by the ddb one through that feature

#

doesn't ddb replace srds

violet meadow
#

Does it????? 👀

rich kelp
#

No

#

it creates a copy

vast bane
#

ah

#

yeah so strange, least we know how to fix it

rich kelp
#

You know what I think?

#

I think I am going to bed 😄 Thanks for the help everyone 🙂

vast bane
#

midis shapin up to be in a good place again, all the support mod authors are updating to 32 well

quiet solar
elder path
#

is it possible to automate the damage that reduce maximum health like the bite of a vampire ? 🤔

vast bane
#

the clay golem attack and the probiscus

#

Sources of premade stuff for Midiqol:

Midi Sample Items Compendium(comes with the module)

Midi SRD's compendiums
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json

More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats

Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros

Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros

Chris' Module form of his macros:
https://foundryvtt.com/packages/chris-premades

Activation condition examples by ThatLonelyBugbear
#1010273821401555087 message

#

Pro tip, install all of the dependencies manually for Chris's Premades cause it bugs out cause his module has like 10 dependencies lol

vast bane
#

one thing of note about automated animations and midi when you have check hits/saves is if the spell is multi target it applies the animations to all regardless of save/fail. Noticed that last session. Blindness deafness was upcasted and 1/3 succeeded and it had the animation on it.

#

thats prolly an Otigan thing not tposney though

sudden crane
# vast bane one thing of note about automated animations and midi when you have check hits/s...

There is no check for save in AA, it only hooks on AttackRollComplete, DamageRollComplete and RollComplete events.

https://github.com/otigon/automated-jb2a-animations/blob/acb5523814c668d67ee7a7a2a8567fecd8f20353/src/system-support/aa-dnd5e.js#L8

GitHub

Contribute to otigon/automated-jb2a-animations development by creating an account on GitHub.

#

But it could probably be added…

vast bane
#

I'll write up a feature request for him in a lil bit

sudden crane
elder path
#

Thanks Moto <:]

vast bane
#

I'm just the messenger, Chris, Bugbear, Tposney, and Mr.Primate are the heroes here there.

daring cobalt
#

Has anyone found or devised a way to prompt for on hit effects like Divine Smite via midi and/or item macro? There's the midi damage bonus flag, but since something like smite is variable based on spell slot used, I assume you'd need to trigger a prompt on hit to ask for what level spell or something to effect the actual damage bonus

vast bane
# daring cobalt Has anyone found or devised a way to prompt for on hit effects like Divine Smite...

Sources of premade stuff for Midiqol:

Midi Sample Items Compendium(comes with the module)

Midi SRD's compendiums
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json

More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats

Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros

Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros

Chris' Module form of his macros:
https://foundryvtt.com/packages/chris-premades

Activation condition examples by ThatLonelyBugbear
#1010273821401555087 message

Chris' premades is a good smite

daring cobalt
vast bane
#

yeah can't pin it cause it has an unpublished module

#

/glares at Bugbear

daring cobalt
# vast bane yeah can't pin it cause it has an unpublished module

So interestingly enough Chris's divine smite seems to be following a similar philosophy that I was thinking, inspired by bugbear's hexblade curse iirc. However, the workflow loses me. Equipping the item gives you an effect, that effect triggers a macro by name and passes a parameter. That macro came with Chris's module and imported a macro folder, so I found the named macro. After that though I don't see where it goes, the macro is just one line and is calling:

await chrisPremades.macros.actorOnUse(this, "divineSmite");

I'm not sure where the workflow goes after this macro is triggered

#

It almost feels circular but I can't figure out where the parameter goes or where the dialogue comes from

vast bane
#

midi srd and CPR use that method so he can update things easier

#

theres a file in the module folder you can open and search for divine smite

daring cobalt
#

Oh interesting, I saw that when browsing his repo before installing. So that method isn't front facing? As in, there's nowhere in the foundry UI I could view it like the compendiums etc..?

#

Does it function like a normal macro or does it have other dependencies? Like if I copied the script and dropped it into a regular macro, and had the DAE effect call straight to that macro would it work similarly?

#

Just trying to figure out how it works for inspiration if I wanted to build my own down the line

vast bane
#

I'd wait for them to be active here and ask them, Chris and bugbear could answer that as they both maintain modules that do that, midi srd and CPR

#

I know its there for easier maintenance when midi changes how things are done

daring cobalt
#

For sure, it's a robust setup for the stuff they have, but a smidge harder to replicate on custom designs. Lol. But I think it does provide some good ideas on how stuff like this works overall. Thanks again!

gilded yacht
#

You do need to rename the item to Blessed Healer when it is added to the cleric. Then it should work - I use it in my game all the time.

unkempt wing
#

Hello everyone - I posted this earlier but no hits so far😃
I was just looking at the MidiQOL class features for Bardic inspiration and there are 2: Bardic Inspiration (Valor) DND2.0.2 MQ10.0.10 & Bardic Inspiration DND2.0.2 MQ10. It also says: "You must ensure your bard has the dnd1.6 bard class not the older 1.5 version or scaling won't work."
Does anyone know which one should I use and how do I know which dnd bard class I have 1.5 or 1.6?
Thanks in advance

vast bane
#

it has a scale value

#

did you ever have dnd 1.6?

#

dnd 1.6 was well over a year ago

elder path
#

So I searched around but is there a @raceOrType for custom subtype / type ? 🤔 I just learned how Activation Condition worked, but I need to slay a specific homebrew type of creature

vast bane
#

try that specific name

scarlet gale
#

This is essentially what it gets funneled too in the end

#

I'm not proud of the switch statement in there

#

But it works

#

¯_(ツ)_/¯

scarlet gale
elder path
# vast bane try that specific name

Like @theHomebrewName ? or "@raceOrType".includes("Homebrewname") ? (Number 2 won't activate)
Edit: Wtf, now it's working 😠
Edit 2 : Nvm, it's not working 😢

elder path
vast bane
elder path
vast bane
elder path
#

I don't know 🤣

scarlet gale
elder path
#

It's mostly just a test to see if I could easily make a homebrew slayer weapon with a custom type

vast bane
#

why are you making one from scratch?

#

and the other damage formula is in the details of the item, you don't do an active effect

elder path
#

I've missed that folder, i might come back to you Thank you again "messenger "

#

Oh my, it's not the same code as from the wiki

vast bane
#

it doesn't work though

#

I dunno why but custom type is not firing slayer

#

I'd use an effect or something instead I guess

#

or world script a new custom creature type

scarlet gale
#

I doubt many modules check the custom type box

#

Including my own

#

I should take a look at that

elder path
#

Dang.

scarlet gale
#

A world script to add a new creature type would work

elder path
#

Time to learn world script then, thank you people !

vast bane
#

you could also include the creature type in every monsters actor name and then do a check for partial on actor name instead

#

like gray/green/red slaad

#

check for if actor has name slaad

elder path
sacred furnace
#

Is there a way to have effects from conditions automated when they have the icons for them on an actor? (blinded, paralysed, etc)

vast bane
#

and get rid of cub if you have that

sacred furnace
#

cub was stopping it from working
thanks

violet meadow
#
target.details.type?.value === "undead" || target.details.type?.custom?.toLocaleLowerCase() === "buggybear" || target.details.type?.subtype?.toLocaleLowerCase().includes("buggybear") || target.details.race?.toLocaleLowerCase().includes("undead")
#

Activation condition including custom and subtype race checks for NPCs.

Includes gives you some leeway when checking as it can match only part of the string

gilded yacht
#

I've no objection in principle. The combat ones can be handled via a Hooks.on(....) already, but I guess it's a little tedious to have to add those in the itemMacro first use, so will have a look at that. The onReactionTriggered is potentially tricky - but will have a think

#

There was also a suggestion that the special duration expiry also trigger an item macro call - which might be useful

unkempt wing
#

@gilded yacht did you happen to see the message I sent regarding the bardic inspiration?

vast bane
#

because his macros are referencing scale values made by the srd class and the ddb class

unkempt wing
violet meadow
silent wave
#

Hello, Is it possible to replicate the ifSave settings with activation being enabled ?

silent wave
#

I made it work with 'workflow.saves.size == 0'

broken bridge
#

Hey guys. When creating an effect via macro scripting, does anyone know how I can specify the special durations from midi? I want the effect to go away after the next saving throw.

#

I see in the documentation isSave.wis but I don't know if I pyut that in the changes or in the duration field.

molten solar
#

@sinful phoenix here

sinful phoenix
#

thank you

#

is there a way to give a +2/-2 to rolls with an additional source of advantage/disadvantage

broken bridge
#

Like generally in all of your game?

sinful phoenix
#

yes if possible

violet meadow
violet meadow
#

So create an Active Effect as you want it on the actor.
Log that effect in the console.

sinful phoenix
violet meadow
#

Use case example to get my brain going?

#

If they have advantage, attack with 2d20 + 2?

sinful phoenix
#

yeas

violet meadow
#

Does it happen always or when a specific feature is active?

sinful phoenix
#

i guess always just in case?

broken bridge
#

Although for some obscure reason, when that effect is applied, the change mode goes from CUSTOM to ADD and I have no idea why.

molten solar
broken bridge
#

Is there a list somewhere of the socket handlers registered by a module?

violet meadow
#

MidiQOL.socket() in console will give you the midi ones.

socketlib in console will give you the modules with registered ones too

#

and you can access the FunctionLocation down the road

broken bridge
#

Ooooh. Didn't know you could call it without arguments to have the list.

#

Good to know.

sleek pulsar
#

This is from the MidiQoL Sample items -- it's a little confusing. Do we need to add something related to spell level, or is that taken care of by the item macro? My quick very noob read of the item macro seems to imply that it's taken care of by the macro?

#

Blessed Healer

violet meadow
#

@gilded yacht it seems that when you make an attack with (dis/)advantage, the workflow is updated to indicate workflow.advantage/workflow.disadvantage on AttackRollComplete.

I was trying to add a situational attackBonus to the workflow (<#1010273821401555087 message>), by either a js if (!!workflow.advantage) workflow.setAttackRoll(await new Roll(workflow.attackRoll.formula.concat(" +2").evaluate())) during the preCheckHits (hooking on preCheckHits)
or js if (!!workflow.advantage) Hooks.once("dnd5e.preRollAttack", (item,config) => {config.parts.push("2")}) during preAttackRoll (hooking on preAttackRoll),
but both ways failed cause the workflow.advantage was still undefined by these points.

Any way around it?

violet meadow
sleek pulsar
violet meadow
sinful phoenix
#

ok thank you

sudden crane
#

@vast bane about the request for AA to support saves, could you detail the use cases that you want to be supported, I may take a look at how to implement it in AA.

hot flower
#

i have hit a dead end with this macro. It's part of the macro for blight, and i've got it correctly determining target's type and managing the data... But I can't to get it to apply half (maximized) damage to a plant creature with the midi damageOnlyWorkflow. It consistently applies full damage even when the plant makes the saving throw:

hot flower
#

also, because there is a macro applying the damage (and it's a damageOnlyWorkflow), how can I determined what item made the attack and called the damage. The workflow is returning "null" for item.

vast bane
# sudden crane <@206716788929593344> about the request for AA to support saves, could you detai...

Use case 1: The spell Bane, targets 3+ targets and each makes a save, if they succeed they should not get the animation on them.

Use case 2: The spell Blindness/Deafness when upcasted allows you to pick an additional target, if one fails and the other succeeds then same thing happens, one should get the animation while the other doesn't.

Use case 3: Sorcerers can twin a single target spell, basically same as use case 2.

Use case 4: Slow spell has the caster pick X targets in an area and if they save they are unaffected, if they fail they should get the animation effects.

hot flower
#

rephrased: how would I inject the item parent item object into the midi damage only workflow so that it triggers a hook?

dark canopy
#

You can call hooks directly if you need to

#

Hooks.callAll I think

hot flower
#

put that into my blight macro, which isn't returning a workflow.item?

dark canopy
#

The idea we to call the hook with the information from the item macro, which has the item in it's scope

rich kelp
#

Ok, regarding the issue I had yesterday with MidiQOL + coverCalculations

#

What fixed it for me is this (I disabled each module, once'/turn, etc, and it was Dice so Nice)

#

And this setting in particular. Enabling it as shown below fixed it :

#

maybe it locks or overwrites the item.flags bit, while waiting for the dice to roll

#

and midiqol can't find the midiproperties, or who knows

#

But with that bit checked, it works

#

I am a backend dev 😦 I am not cool enough to know the answer to this...

#

But at least this works for now.. 😄

molten solar
#

Sounds more like midi or cc are waiting for (or failing at for) a chat message to appear. Which is a bit silly in this day and age so I hope not

vagrant wharf
#

is there some way to get midi to create an effect or flag that ignores resistances the way elemental adept does?

vast bane
#

the dr.value key has all the resistance types duplicated with -acid and acid and the negative one means its removed from the target, however most of the time you want to do this before the items rolled with midi so you gotta do a macro, my preferred method is to make a dfreds CE and apply it pre item roll

sudden crane
vast bane
#

I suppose you could pull this off alot easier if you tethered the animation to the active effect instead and disabled animation on spell cast

#

then the only scenario you need to account for is yours you just mentioned

#

I've had active effect animations off forever due to a really old bug with spirit guardians, I prolly should turn it back on and start using it instead of spells for duration effects

#

@scarlet gale I have a feature request, the stench abilities, either from the Hezrou, Troglodyte, or um...Ghoul or Ghast I forget which. All 3 have a stench like ability that is save within range or be sick, once you save it off immune for 24 hours.

#

like the stench part is easy, its the immune for 24 hours that gets me

scarlet gale
#

Probably easiest to drop an effect on targets that become immune

dapper flame
#

I'm trying this, but the flags aren't showing up

#

I can type them manually, sure, but when I look them up they're not there

#

(Got midiQOL installed of course)

#

(Well, my GM does)

vast bane
#

if its a feature thats always on, apply on equip

#

if its meant to be rolled and applied to someone, then don't check a box at all

#

if its meant to roll and apply to self also DONT check any box no matter how right they may seem for you. Instead don't check a box and set the details of the items range/target to self/self

dapper flame
#

I mean they don't show up here

vast bane
#

they don't show up in his either bud

#

its because you are MAKING a key

#

notice how his dae field below each key is blank?

dapper flame
#

OH

vast bane
#

that implies that dae aint got nothin stored for it to match

dapper flame
#

ohhhh

#

I'm trying here lmao

vast bane
#

you still have to match his key though

dapper flame
#

Yeyeye

vast bane
#

cause its a special midi key where you can set your own name in that one section of it

#

if you are curious what feature it is in the readme, I think its called an "optional.name.macro" or something

#

and infact dae auto populates that, but you shouldn't use "name"

#

otherwise you gonna have a bunch of things walking around with the same flags

dapper flame
#

Right

#

I have it like this

vast bane
#

you need dae

#

and midiqol

dapper flame
#

I have midi, but I didn't know about dae...

#

Honestly don't wanna ask my DM to install a whole module just for this

vast bane
#

honestly a midi user without dae is strange af

#

you also didn't put the flavor in the damage

#

+@prof[cold]

dapper flame
#

Thanks, of course the problem was missing DAE

sly goblet
#

I tried using the midi-qol Lay on Hands but I couldn't get it working. It just kept wanting to do 65 points

vast bane
#

(and always read the bottom of the sample item descriptions)

hot flower
#

is there a way to interrupt a midi workflow if a certain condition is met? like so: ```js
if ( macroPass === "preDamageRoll" ) {
;console.log("Rolling Damage Here!")

const [ target ] = targets;
const isUndeadConstruct = target.actor.system?.details?.type?.value === "undead" || target.actor.system?.details?.type?.value === "construct";
console.log( "isUndeadConstruct:", isUndeadConstruct );
if ( isUndeadConstruct ) {
    return;
}

}

sly goblet
#

I did read it. Couldn't figure out how to make it work

vast bane
#

thats setup right

#

when you use it do you see any errors in console?

sly goblet
vast bane
#

f12 for console

#

your paladin is not a paladin

#

LoH only works on player characters with a paladin class

#

and if you have that, you aren't using an srd paladin class

#

(or hes out of resource)

#

OR, you don't have dae installed

sly goblet
#

are these the right things?

vast bane
#

click the details on paladin

#

did he have a capital P?

#

or possibly misspelled?

sly goblet
#

should it have a capital?

vast bane
#

nope

#

it is fine the way you have it

sly goblet
#

then that's good

vast bane
#

your problem is probably user error, did you not long rest them after they got the feature?

#

what is their primary resource set to is it 0/25?

#

0/50 I mean

sly goblet
#

it's 25/25

vast bane
#

f12

#

try to use it with the console open

#

lets stop dancing around the obvious and see what the error actuall is

#

it should be 0/50 fyi

#

or 50/50 if its a level 5 paladin

sly goblet
#

why would it be 10 per level?

#

it's 5 per level

vast bane
#

oh wait I forgot I homebrewed mine lol

sly goblet
#

and wait is htis because it COUNTS UP?

#

instead of counts DOWN?

vast bane
#

nope just f12 and look at the console please

violet meadow
vast bane
#

I suspect item macro character sheet hooks

sly goblet
#

what am I looking for here?

vast bane
#

once you have the console open, try to use lay on hands

vast bane
#

perform the act of healing someone with lay on hands

sly goblet
vast bane
#

the actor is unlinked

#

in the sidebar, click the actor, does he have the resource full?

dapper flame
#

A?

sly goblet
#

looks full to me

violet meadow
vast bane
#

on the map, double click the paladin, does that actor not have it full?

sly goblet
#

same 25/25

vast bane
# sly goblet same 25/25

Midi does not work with:

Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e

The following modules have template settings that step on midi:
Spell Template Manager
SIFT(Spells, Items, Features Toolkit)

Advanced Spell Effects module is in beta in v10 and often the culprit of things...

Midi requires Item Macro to have its "Character sheet hooks" feature set to unchecked in order for on use macros to work right.

When editing owned items(items on actors) active effects beware of duplicating active effects that interfere. Always check the actors effect tab for rogue ae's.

If you are on dnd5e 2.0.3, I recommend midi 23 or 24, dae 14, and dfreds 3.1.1
If on dnd5e 2.1.x update to 2.1.5 and all three modules can be updated to newest.

If you use any others you are playtesting and expect issues to arise.

Dfreds CE 4.0 requires midi 32+ and dae 22+.

violet meadow
#

(the list keeps getting bigger 😄 )

vast bane
#

you likely have another roller rolling lay on hands

sly goblet
#

I have none of those modules, and updated all my modules to current

violet meadow
vast bane
#

show me the button you press to roll lay on hands, and show me what lay on hands looks like in chat

violet meadow
#

I think I saw that earlier

sly goblet
#

using the old one or the new one?

vast bane
#

oh I didn't even think to look at the console

#

I didn't see red so I didn't care lol

#

item handling failure hmmm

#

character sheet hooks?

hot flower
violet meadow
#

nope nope

vast bane
#

its the way hes rolling it I bet

#

show me a snippet of the literal thing that you click that starts the lay on hands process

sly goblet
violet meadow
sly goblet
#

I can also roll it from here

#

but I mostly do character sheet

vast bane
# sly goblet

disable all modules except for midiqol, dae, socketlib, and libwrapper

sly goblet
#

does it matter that when I first copy paste it onto my character sheet it has default values of 65 healing and 65 resource used?

#

should I be doing anything with those?

vast bane
#

you mean drag and drop right?

sly goblet
#

yeah

#

when I pull it onto my sheet

#

it has default values

vast bane
#

that doesn't matter, just find the culprit you got a module conflict

sly goblet
#

?

vast bane
#

disable all modules except for midiqol, dae, socketlib, and libwrapper

#

does it work with just those four

sly goblet
#

that's a lot of modules for me to turn off and on. hang on.

vast bane
sly goblet
#

okay I got Find the Culprit installed

vast bane
#

enable it, its button to use it is bottom right corner of manage modules window

#

dae, midiqol, socketlib, libwrapper

#

if lay on hands works when it restarts with those on, then say NO to the popup, if it doesn't work say yes and we wait for bugbear to remember what causes that error

sly goblet
#

same problem

vast bane
#

foundry build
dnd5e version number
midiqol version number
dae version number

sly goblet
vast bane
#

at this point, the only thing I can suggest is taking someone elses settings import which wil nuke your setup in midi

#

do you fast forward your attacks?

sly goblet
#

no

vast bane
#

import/export of midi settings is in the misc tab in workflow button

sly goblet
#

hey that worked

#

so uh

#

what settings were messing with it, do you think?

vast bane
#

thats gonna be one hell of a troubleshoot lol

#

change one setting at a time I guess

#

oh shit I think I know what it is

#

testing on my end once I fix my world

#

yeah I got no idea, thought maybe auto consume but nope

sly goblet
#

oh well. this has become prohobitively complicated for very little benefit

vast bane
#

use my settings, tweak things as you see an issue with my settings /shrug

hot flower
#

huzzah! it works. ```js
const { macroPass, targets, spellLevel, damageTotal, damageRoll, damageList, itemCardId, itemData, failedSaves } = args[ 0 ]; // destructuring the args[0] object to get relevant values

const effectLabel = "Blight-Disadvantage"; // a label can be what you want
const [ target ] = targets;
const isUndeadConstruct = target.actor.system?.details?.type?.value === "undead" || target.actor.system?.details?.type?.value === "construct";
const isPlant = target.actor.system?.details?.type?.value === "plant"
const diceAmount = spellLevel + 4;

if ( macroPass === "preSave" ) { // this macro is fired every pass of the midiqol workflow, this only runs in the presave part
if ( !isPlant ) return; // not a plant return and continue the workflow
const data = {
changes: [ {
key: "flags.midi-qol.disadvantage.ability.save.all",
mode: 0,
priority: 20,
value: "1"
} ],
flags: {
dae: {
specialDuration: [ "isDamaged" ]
}
},
icon: "icons/magic/unholy/strike-beam-blood-large-red-green.webp",
label: effectLabel
};
await target.actor.createEmbeddedDocuments( "ActiveEffect", [ data ] ); // create the above effect, all saves because lazy and i remove the effect later anyway
}
if ( macroPass === "postDamageRoll" ) {

if ( isPlant ) {
    this.setDamageRoll( await new Roll( `${diceAmount}d8` ).evaluate( { maximize: isPlant } ) )
}
if ( isUndeadConstruct ) {
    this.setDamageRoll( await new Roll( "0" ).evaluate( ) )

}

}```

#

A fully workin blight that accounts for plants and undead.

violet meadow
#

Either use a DFreds CE custom, or use a ```js
await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:target.actor.uuid, effects:[data]});

hot flower
#

ah, thank you!

#

i didn't know thaty.

violet meadow
#

@vast bane I remember setting up the emboldening bond at some point

#

What are you looking for?

vast bane
#

it was a joke, the range finder for bond is too wonky to use, we manage it manually.

#

only part I need left for emboldening bond is to tweak the protective bond level 6 version where the player chooses an ally and damages them and then teleports them to them

scarlet gale
#

Spent the last day making a way to work around midi-qol on use macros all executing at the same time.

#

So if I have multiple on use macros trying to modify damage, they'll actually catch changes from other macros that are getting executed.

violet meadow
#

🙂
I see a priority queue. I was discussing about that with a friend a couple of days ago!

scarlet gale
#

The bigger problem I ran into was that workflow.damageDetail isn't updated after a workflow.setDamageRoll so I had to rework some features to read the damage roll for damage types instead of using the damage detail.

#

The queue system is also an exported function should anyone actually want to develop around it.

#

Or make their own personal automations respect the queue

violet meadow
#

Might be a good addition to MidiQOL itself 🤷

scarlet gale
#

Well a proper fix for midi-qol would be for the stuff to just not all fire at the same time

#

my queue just has the scripts idle and wait for their turn

violet meadow
#

I guess that should be a foundry wide issue

opaque patrol
#

Can one change the damage on a preDamageRoll call? Like changing all fire to healing, etc.

scarlet gale
#

Post damage is where it's done

#

as weird as it sounds

#

workflow.setDamageRoll with your new damage roll

opaque patrol
#

So armor of agathys type redirects would happen there as well?

scarlet gale
#

type redirects?

opaque patrol
#

actor doesn't take as much damage based on a resource setting, etc.

scarlet gale
#

Depends on how your AoA is setup

opaque patrol
#

what is AoA?

scarlet gale
#

Armor of agathys

opaque patrol
#

Ah. I've written about 13 times now. Every way seems terrible though.

scarlet gale
#

So what are you trying to do? Just automate that spell?

opaque patrol
#

Yes, but also trying to understand the mechanisms that are being exercised to implement it.

#

Sorry, i mean Arcane ward, not AoA...

scarlet gale
#

arcane ward has a sample item I think? And the ddb importer also has it's own version of it

opaque patrol
#

I tried both and they each fail in different ways.

vast bane
#

yeah its pretty fubar I already tried fixing it

#

alot of the samples are too old cause midi just went through ike 9 versions

scarlet gale
#

the ddb importer version was just added, it may work the least bad

opaque patrol
#

lol I should try it again

vast bane
#

the one that does temp hp is fine but then your temp hp is messed up

opaque patrol
#

Yes, since arcane ward begs to be uses with AoA, tempHp hijinks are bad

#

The sample is closer, if I just get it to notice damage to temp. Then I have to deal with the weirdness and doubled update calls coming from the use of 'onTargetUpdate'

scarlet gale
#

Arcane Ward seems like an ideal candidate for a world script honestly

opaque patrol
#

But where can that script be hooked in to actually change damage?

scarlet gale
#

midi-qol.damageApplied

opaque patrol
#

Well I haven't tried that one yet so why not.

scarlet gale
#

this hook gets called for all targets that are getting damage calculated

#

including damage taken from the midi-qol apply damage function

opaque patrol
#

Might be the trick I need. thanks.

opaque patrol
#

Already way better. Thanks.

buoyant minnow
#

how to automatically delete an effect with mid?

vast bane
#

midi's bardic inspiration should already do that all you have to do is ensure you have the dnd5e bard class feature on the actor so it scales right

scarlet gale
#

Technically all you need is the scale name to match

buoyant minnow
vast bane
#

the simplest thing to do is just make an AR since you don't fast forward, why go through all this hastle of macros and automation if you aren't even full auto

#

leverage the human brain

digital lagoon
#

This may be a better place for this:
I'm using midiqol and Dynamic effects using Active Effects, and I can only apply effects with the chat button while targetting. Is there any way to change that? Can't seem to find a setting in the menu

vast bane
#

put a message on their attack popout

vast bane
#

Wish there was an "Effects just don't god damn stack" option in the drop down cause I can never tell which ones the right one to use.

scarlet gale
#

It's like 2 options lol

#

Don't stack by name and don't stack by origin

vast bane
#

decision paralysis

#

I need an ability to affect all BUT demons. This work?
target.details.type?.value !=== "demon"
Demon is the sub type fwiw?

buoyant minnow
vast bane
#

does it expire properly?

buoyant minnow
buoyant minnow
vast bane
#

no matter what I do, I cannot get my icon to show for one of my macro.createitems, its a reaction item

#

It shows when I edit the item but it fails to show as the tiny icon in inventory and it fails to show in the reaction prompt:

#

is it because its a jpg?

jagged plinth
#

is there a good way to add +2 to Ranged weapon attacks for the thrown weapon fighter fighting style?

vast bane
#

yes if you don't mind it working on ranged weapons also

#

otherwise edit the items directly is the only real worthwhile way to be accurate

vast bane
#

it will work on all ranged weaponry so beware, otherwise edit the thrown items manually

jagged plinth
#

sweet, thank you, i'll just do that, i dont even know if any of my players are going to be using thrown weapons, but figured better safe than sorry

jagged plinth
#

how would i go about doing this?

#

this effect is one of three options whenever the player cast's a spell with one of their pact magic slots

#

nvm, i'll just do a Situational bonus whenever it comes up

dapper vortex
#

Was looking into automating this today and I noticed that these Detection Modes no longer seem to exist 🤔 . Were these extra modes from Perfect Vision or from the 5e system at the time? Wondering if theres a way to add them back in Edit: Figured out what I was missing, needed the Adequate Vision module installed as well 😁

stoic seal
#

Guys, how do I implement a situational bonus?

vast bane
vast bane
violet meadow
#

Use ! before the sentence

#

!target...

#

Or !== not !=== when you try for equality or inequality

#

!target.details.type?.subtype?.toLocaleLowerCase().includes("demon")

keen remnant
#

How would i go about making the following as a Passive with AE?

"When the cleric hits a creature with a weapon attack, the he or she can cause the attack to deal an extra 1d8 radiant damage to the target as the weapon leaves a shine of silvern shine behind. When the cleric reaches 14th level, the extra damage increases to 2d8."

I know how to add the damage to a attackroll which is easy to do but how do i scale it with level?

violet meadow
keen remnant
#

That is something i dont know how to do tho

violet meadow
#

There are some videos in #dnd5e for setting up advancement

keen remnant
#

never seen that screen in my life

#

oh thats on the actor inventory, and then the class itself

violet meadow
keen remnant
# violet meadow

+@scale.lunar-domain-prestige-death-eldritch-knight-.earthshine-reflection[radiant]
how to do convoluted names am i right?

violet meadow
#

but why 😄

keen remnant
#

keeping track of special classes that you only get when doing specific things

#

like old prestiege classes from 3.5

violet meadow
#

Whatever works 💪
I would like to play some 3.5 at some point again.

keen remnant
#

My lunar cleric requires 3 lv eldritch knight and more then 3 in death cleric and being a follower of either Seluné or Shar as a faith and doing some biddings and travveling to a special place for a ritual

#

its fun

#

Also made a cracked healing wizzard

#

Requiring 2 lv necromancy wizzard and one level of Life cleric and a faith and alignment of CG LG or NG

#

Last feature is lv 17 btw

#

gíven the new tool in my posession now i can fasttrack making the rest of them in foundry thanks for that

violet meadow
#

Yeah no need for convoluted formulas anymore (well some of the time at least). Just take the time to get the scales down and done

rustic knoll
#

Hi, I have been told to ask here, Would anyone be able to write a macro for me please that simply does 1d6 fire damage to a creature? I need it to take into account a creatures resistances and damage reductions. I am going to apply it to a Monks Active Tile Trigger to make an effect like thorns or Lava. (I do not like having to click damage buttons if its set to Attack and doing direct damage cant set it as a damage type). I would write the macro myself but I have no idea how to make macro's.

shrewd solstice
#

I posted earlier about an issue with Produce Flam always being rolled with advantage. I disabled all of my modules and re-enabled them one at a time, starting with MidiQOL to determine what module was casuing the error. It is Libwrapper, which is required by DAE for the affects. I cannot see a setting in that module to change advantage. Any thoughts?

violet meadow
shrewd solstice
#

when its disabled with everything else enabled the roll is fine

#

its only once I enable it that it defaults to advantage

violet meadow
#

Can you try with MidiQOL, DAE, libwrapper and socketlib only active?

shrewd solstice
#

sure one sec

violet meadow
shrewd solstice
#

targeting

rustic knoll
#

I was just about to post a reply to myself... I found I had a macro for a while back written by someone that already does exactly what I need

shrewd solstice
#

with just those mods alone, it defaults to rolling with advantage

rustic knoll
#

If people would like it I can post it here

violet meadow
violet meadow
shrewd solstice
#

what do you mean?

violet meadow
#

You said Produce Flame is rolled with advantage

#

Is it a saving throw? an attack?

shrewd solstice
#

ranged spell attack

violet meadow
#

OK so the attacker has advantage on the attack.

Any actor using that spell?
Against all targets?

shrewd solstice
#

yes

kind cape
#

I would turn on advantage attribution in the midi settings, makes it a lot easier to track down where its coming from 😅

violet meadow
#

true

shrewd solstice
#

wher is that setting?

violet meadow
#

I thought that was suggested already (might be misremembering the threads 😅 )

#

MidiQOL settings => Workflow settings => misc tab

shrewd solstice
#

I enabled it, but i dont see where it shows wehere advantage is coming from

violet meadow
#

Click on the Attack roll

#

on the damage card

keen remnant
#

Is there a way to make the following apply?

"When you cast a spell that deals necrotic damage, you can swing this blade in an instant."
(Attack with the weapon before spellattack)

Because things like toll the dead already have an item macro (which i would use for this) would this mess with that in unforeseeable ways if i just add the itemattackroll to it? Or is there an easier way?

shrewd solstice
#

it doesnt show

violet meadow
#

Click on here

kind cape
#

Click where the arrow is

shrewd solstice
#

should I turn off fast forward rolls?

keen remnant
#

no it shows, just that its hidden behind the total highest number

violet meadow
#

then we can help more

kind cape
keen remnant
#

"On hit the creature takes 2d12 magical slashing damage before spell calculation"

#

thats why

shrewd solstice
kind cape
violet meadow
keen remnant
#

Its
Cast spell
Detect necrotic damage type
swing weapon (deal its damge)
finish the spell

kind cape
#

Hidden from the targets perspective. Most likely you have vision on on the target, but without giving it a range it can see in?

violet meadow
keen remnant
#

yes you deal no damage if you dont beat ac

#

you have to hit

#

which is why i struggle with it

shrewd solstice
kind cape
#

So just to be clear its:
Cast spell (Lets say inflict wounds)
Roll 1d20 for sword to hit
Deal damage if hit
Roll 1d20 for spell to hit (assuming its an attack spell)
Deal damage for spell

keen remnant
#

yes

kind cape
#

That runs into the problem I mentioned above about having multiple workflows running in tandem

shrewd solstice
# violet meadow

previously check flanking was set to none. is flanking what is causing the issue?

keen remnant
#

yeah i know, thats why ask yall

violet meadow
keen remnant
#

so that would require a itemcopy for each of the necrotic spells on each level tho

kind cape
#

Could also do it with an onUseMacro, where you bypass the normal flow and just roll the correct dice

keen remnant
#

Yes but toll the dead is a special case (why i asked, if that messes with the current workflow of the spells damage calc due to it being different on non full hp targets)

violet meadow
#

If you don't have proper Vision set up, I would just disable that option

keen remnant
#

I could make a spellcopy for each necrotic spell with itemmacro
then Put the attackmacro first and then the spell?

shrewd solstice
#

ok

violet meadow
shrewd solstice
keen remnant
#

Because its a weapon it does have its own attack properties which is its on use case

#

(also has charges)

violet meadow
shrewd solstice
keen remnant
violet meadow
#

Just make sure why/if you need MidiQOL in that case 😅

shrewd solstice
#

whats a brief description of what setting up vision means?

#

All my maps have light sources that I set up when I create the scene, and each actor already has a vision range set based on their race

#

is it more complicated than that?

violet meadow
#

I thought it was a generic feature on the actor

keen remnant
# violet meadow ok a full description of the Item would help in that case.

"This weapon has the following properties: Two handed, Reach, Finesse.

It also counts as a Spellcasting focus for the attuned user as well as a proficient weapon.
This magical weapon adds a +3 to attack and damage rolls.

Karma Strikes First. While being attuned to this weapon, you may roll and add 1d12 to your roll of initiative. This property can’t be used again until the next dawn.

Reap and Sow. When you cast a spell that deals necrotic damage, you can swing this blade in an instant. As part of the Casting you can roll an attack against that same creature within weapon range (15ft reach). On hit the creature takes 2d12 magical slashing damage before spell calculation. This effect can be used multiple times per turn as for casting another spell with Metamagic or other features is possible.

Mortal Tribute. While you are attuned to this weapon any necrotic damage you deal in damage to hostile creatures adds to your capabilities. You also ignore necrotic resistance and immunity, unless the creature has legendary resistances.

Reap and Sow On hit add 1 to the weapons charges up to 50 maximum. These charges can be spend as a bonus action to heal yourself or Allies within 60ft, each charge recovers a single hitpoint.

Anima Messis. Damage dealt by this weapon is incredibly lethal, if a creature is reduced to 0 hp by this weapon it automatically fails the first death saving throw regardless of its roll.

Requires attunement by a by a cleric, paladin or warlock of lawful or chaotic evil alignment"

violet meadow
#

If not, cause of the range of their Vision or lack of thereof, then the Hidden rule will kick in

keen remnant
shrewd solstice
#

i want to say "yes" but with those quotations im not sure. the map im testing in has a global light source, but I dont see where actors have vision set up. I see "senses" but thats only for darkvision. Does it matter which direction the token is facing? is it because the attacker is behind the target?

violet meadow
violet meadow
short aurora
#

What am I missing when I can log args in a hooked Midi function, see the data points I need, but referencing them directly errors out? Console says neither castData nor item exists within args, but the logged args have them and I figure they all launch approximately the same time?

Hooks.on('midi-qol.RollComplete', (args) => {
    console.log(args)
    console.log("The cast level is: " + args[0].castData.castLevel);
    console.log("The spell school is " + args[0].item.labels?.school);
});```
keen remnant
violet meadow
shrewd solstice
violet meadow
#

Not sure where the console.log("The cast level is: " + args[0].castData.castLevel); is located off hand

violet meadow
short aurora
#

Ah feck, you're right, it's not showing an object, thanks

shrewd solstice
shrewd solstice
violet meadow
shrewd solstice
#

Is there a core troubleshooting channel? I have another issue that isn't a how to, but a bug on the core level.

violet meadow
keen remnant
#

any spell with necrotic damage type

#

"When you cast a spell that deals necrotic damage"

violet meadow
#

If the target is in Reach

keen remnant
#

yes

violet meadow
#

Multiple targets or one?

keen remnant
#

both? the subclass stick is to taget more then one creature with spells

violet meadow
#

pff so you need to filter the targets that are not in range and attack the rest?

keen remnant
#

yes

violet meadow
#

that becomes less and less easy to do 😄

keen remnant
#

but thats currently done by the items 15ft range, it wont attack if its not in range. because of that limitation

#

i know i can do the simple things alone the difficult things i have to get help with

violet meadow
#

Yeah not injecting another workflow inside an already started one. I was trying to work around that

#

And more that one to be honest

#

hmm do you need to see the rolls?

keen remnant
#

i dont care i have everything on autoroll

#

most attacks saves and allthat

violet meadow
#

DAE with flags.midi-qol.onUseMacroName | Custom | ItemMacro.Name of the Magic Item, preambleComplete ```js
if (args[0].macroPass === "preambleComplete") {
if (args[0].item.system.school !== "nec") return;
const itemToRoll = args[0].actor.items.getName("Name of the magic Item");
await MidiQOL.completeItemUse(itemToRoll, {}, {})
}

#

Try that and see where we land

#

@keen remnant

keen remnant
#

imma get back to that in a bit having a few things to do currently thanks tho will try and get back to you (1h or so)

violet meadow
#

If the magic Item and MidiQOL are set up correctly, it should make one attack per valid target

#

Otherwise we go a different route

short aurora
violet meadow
#

args[0] === "on"/"off" will always be the on application or removal of the AE

short aurora
#

Huh, that does not trigger.

violet meadow
#

Some more context is needed 😅

short aurora
#

I must've slapped it on the wrong place, will double check

#

I had put the ItemMacro on the item only, the ActiveEffect never did anything with it >_> Thanks anyway!

violet meadow
blazing dagger
#

My MidiQOL has started enforcing range and cover for attacks when it wasn't before. Does anyone know which settings those are off hand? I scanned over them, but the last time I touched Midi was nearly a year ago, and I've been known to miss things right in front of my face regardless of how many times I look.

blazing dagger
#

Thank you. Yes, that does look very obvious. One time my boss got mad at me because I couldn't find a particular outlet cover he needed, and he walked over and grabbed it from right in front of me. 😦

violet meadow
#

@keen remnant Try this.

flags.midi-qol.onUseMacroName | CUSTOM | ItemMacro.MAGIC WEAPON NAME,preambleComplete ```js
const itemName = "MAGIC WEAPON NAME" // change this name to match the Magic Weapon.
if (args[0].macroPass === "preambleComplete") {
if (args[0].item.system.school !== "nec") return;
const itemToRoll = args[0].actor.items.getName(itemName);
let targets = args[0].targets;
let validTargets = [];
for (const t of targets) {
if (MidiQOL.getDistance(args[0].workflow.token,t,true,true) <= 10) validTargets.push(t)
}
if (!validTargets.length) return;
for (const v of validTargets) {
let roll = await itemToRoll.rollAttack({flavor:Attack against ${v.name} - AC: ${v.actor.system.attributes.ac.value}});
if (roll.total < v.actor.system.attributes.ac.value) validTargets = validTargets.filter(t=>t !== v);
}
const damage = await new Roll('2d12[slashing]').evaluate({async:true});
const msg = await damage.toMessage();
await game.dice3d?.waitFor3DAnimationByMessageID(msg.id)
MidiQOL.applyTokenDamage([{damage:damage.total, type:'slashing'}], damage.total, new Set(validTargets), itemToRoll, null, {forceApply:true});
}

#

Will not properly account for critical from the weapon attack as is now... 😩
Forgot about that

violet meadow
#

ChatGTP on the case: ```
Verse 1:
At first I was afraid, I was petrified
Kept thinking I could never play, with MidiQOL by my side
But then I spent so many nights, just trying to configure
And I grew strong and I learned how, to use this module sure

Chorus:
And now I'm back, to play the game
With MidiQOL, it's not the same
I've got macros, hotkeys, and more
I will survive, and conquer all

Verse 2:
It took all the strength I had, not to fall apart
Trying hard to understand, how to use this module smart
And I spent oh so many nights, just learning how to script
But now I know the shortcuts, and my game runs oh so slick

Chorus:
And now I'm back, to play the game
With MidiQOL, it's not the same
I've got macros, hotkeys, and more
I will survive, and conquer all

Bridge:
I should have known that I could do this all along
With MidiQOL, I've got the tools to be strong
And I learned how to automate, so much of what I do
Now I can focus on playing, and my fun will never be through

Chorus:
And now I'm back, to play the game
With MidiQOL, it's not the same
I've got macros, hotkeys, and more
I will survive, and conquer all

Outro:
I will survive, and conquer all
With MidiQOL, I will never fall
I will survive, and conquer all
With MidiQOL, I will never stall.