#MidiQOL

1 messages · Page 35 of 1

spark briar
#

I had another version in there aswel the first time and fudged around with it a bit to much. So i redid everything from 0 and now it works.
Thanks guys.

#

Fixed it, thank you

#

Fixed it, ty

orchid folio
#

It does have a saving throw set. I'll do that - thanks!

#

I suppose that removes the option of them rolling the saving throw from the item card, though

violet meadow
#

oh yes, you mentioned manually rolling 🤷

#

You could use Monks TokenBar maybe

#

How comfortable are you with MidiQOL macros?

#

I think you can create an effect on the target, which will have a special duration of 1 Attack.

That effect will apply an actor onUse macro on the target which will fire postDamageRoll and setDamageRoll to half of the rolled amount

violet meadow
#

@obsidian orbit an Item that will trigger what you need with the following macro that you create as a script macro in your Macros Folder (named nextAttackDamageReduction) ```js
//Paste these lines in your script macro. From here:
if (args[0].macroPass === "postDamageRoll" && ["mwak","rwak"].includes(args[0].item.system.actionType)) {
const newDamageRoll = await new Roll(floor(${args[0].damageTotal}*0.5)).evaluate();
this.setDamageRoll(newDamageRoll);
}
//to here.

#

Import the attached item in your Foundry and check how it is set up to replicate.

#

You might need to change the special duration to match your usecase. And now it is hardcoded to reduce the damage if that attack is made with a melee or ranged weapon.

obsidian orbit
violet meadow
#

You import the item fvtt-Item-next-attack-half-damage.json from above.
You copy paste the macro in one of yours

undone sorrel
#

What approaches could you take to go about taking the damage from an attack on a target and storing it in Resource 1

#

I think a world script would be trivial but that's not allowed

#

I tried giving an effect with the flags.dae.onUpdateSource using the filter system.attributes.hp.value but that resulted in an infinite loop when I tried to "heal" the initial damage

violet meadow
#

That target will need to update its Resource 1, based on damage absorbed ?

undone sorrel
#

yeag

#

until, it's full then the damage goes through as normal

violet meadow
#

It is something like Arcane Ward?

#

Arcane Ward Item in MidiQOL sample items compendium will be a good example

undone sorrel
#

I'll take a look

unique cape
#

@violet meadow On yesterday's issue with a Piercer feat macro. I am using Holy Water setup like this.
Activation True Required, Also Roll Other and Critical Other all checked, no On Use macros.
When attacking a non-undead creature, it works just fine, 0 radiant damage.
When attacking an undead, it throws an error and doesn't display any damage.

#

Reposting the script for convenience

//Piercer Feat 5e macro for MidiQOL/DAE/ItemMacro as currently stands.
if (args[0].hitTargets.length < 1) return {};
const target = canvas.tokens.get(args[0].hitTargets[0].id);

token = canvas.tokens.get(args[0].tokenId);
actor = token.actor;

const roll = args[0].damageRoll;
const dieSize = roll.terms[0].faces;
const lowDice = Math.min(... roll.terms[0].values)
const isCrit = args[0].isCritical;

if (args[0].tag === "DamageBonus" && args[0].item.data.damage.parts[0][1] === "piercing"){
    if(isCrit) return {damageRoll: `1d${dieSize}[piercing]`, flavor: "Critical Piercer Feat extra damage"}
}

if (args[0].macroPass === "postDamageRoll") {
    let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid)
    let response = await Dialog.confirm({
        title: 'Piercer feat',
        content: `<p>${token.name} rolled a ${lowDice} on 1d${dieSize}. Reroll?</p>`,
    });
    if(!response)return;
    let damageRoll = new Roll(`1d${dieSize}`)
    await damageRoll.toMessage({flavor:"the rerolled result"});
    
    if (args[0].isCritical) {
        if (workflow.damageRoll.dice[0].results[0].result > workflow.damageRoll.dice[0].results[1].result) workflow.damageRoll.dice[0].results[1].result = damageRoll.total
        else workflow.damageRoll.dice[0].results[0].result = damageRoll.total
    }
    else workflow.damageRoll.dice[0].results[0].result = damageRoll.total
}
vast bane
#

nm you have includes in there

#

I see a data in the macro

violet meadow
unique cape
violet meadow
#

But still if you are on v10, needs some updating to be future proof

unique cape
#

Yep, v10. Foundry 288, 5e 2.0.3

violet meadow
#

Actually change the args[0].item.data.damage.parts[0][1] === "piercing") to
args[0].item.system.damage.parts[0][1] === "piercing")

#

And remove the ```js
token = canvas.tokens.get(args[0].tokenId);
actor = token.actor;

unique cape
#

Tested, works fine

obsidian orbit
violet meadow
obsidian orbit
#

I would not have been able to code that macro on my own.

violet meadow
#

Time and getting acquainted with javascript and Foundry will help a lot!

#

@strong yew change my Piercer macro to work with the critical babonus extra dice ! ```js
//Create a DAE on the Piercer feature, make it to Transfer to actor on Item equip
//and the effect should be a
//flags.midi-qol.onUseMacroName | CUSTOM | ItemMacro.Piercer,postDamageRoll
//with the following macro inside the ItemMacro.

if (args[0].hitTargets.length < 1 || args[0].item.system.damage.parts[0][1] !== "piercing") return {};
const roll = args[0].damageRoll;
if (!roll.terms[0].faces) return;
const dieSize = roll.terms[0].faces;
const lowDice = Math.min(... roll.terms[0].values)

if (args[0].macroPass === "postDamageRoll") {
let workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid)
let response = await Dialog.confirm({
title: 'Piercer feat',
content: <p>${token.name} rolled a ${lowDice} on 1d${dieSize}. Reroll?</p>,
});
if(!response) return;
let damageRoll = new Roll(1d${dieSize})
await damageRoll.toMessage({flavor:"the rerolled result"});
workflow.damageRoll.dice[0].results.find(i=>i.result === lowDice).result = damageRoll.total
}

#

The Babonus on the Piercer feat

marsh crescent
#

Is there a compendium of Babonus for feats somewhere to view?

#

Seems like every time I section out time to figure it out for my game I get sidetracked.

vast bane
#

the few that were in midi sample items broke with a recent update to bab, so give it a few for folks to rebuild em I guess

celest bluff
#

I ran into this same issue, I ended not placing the roller within the effect, but just @damage

lofty kindle
#

Can anyone tell me how to make the effected token roll 4d6 fire damage when they fail the dex save on this immolation effect?

vast bane
#

the drop down needs to be Override, and the initial flag, and OVERRIDE need to be removed from the effect value

#

and make sure you clear any rogue spaces or page returns from that bad paste after you clear those two things out of it

#

oh wait you are missing the damage portion

lofty kindle
#

yea

#

not sure how to add that after. My macro and js skills are basically replacing words form other peoples work

vast bane
lofty kindle
#

okay. I'll take a look!

vast bane
#

I know some folks shrug off readme,s but that genuinely is the best source for overtime options

lofty kindle
#

I got it working! Thanks!

past spade
#

I'm trying to make the Light cantrip only require a DC when the targets disposition is hostile. I tried it via preSave or postSave macro, but I can't figure out how to modify which targets need to roll a save. Is there a way, or is that the entirly wrong method?

vast bane
#

I forget what it is but readme should have it

past spade
#

oh, didn't know there was such a thing. that seems way easier, thanks

undone sorrel
#

Though it looks alot like one of my prototypes. Gonna assume the reason that one didn't work was because I wasn't returning true at the end (copium)

coarse mesa
gilded yacht
#

That should be pretty easy. Will have a look

#

I had a look at the macro and it's actually passing a TokenDocument, rather than a token. Mostly midi munges things so that you can pass either. However the cover calculator really requires a token. I'll put in a fix for that in the cover calculator, for the moment you can change line 81 of the macro from

  const casterToken = await fromUuid(lastArg.tokenUuid);

to

  const casterToken = await fromUuid(lastArg.tokenUuid).object;
strong yew
strong yew
#

Also general question to everyone more experienced, but I'm trying to understand what exactly I'm doing with this as I'm kind of mix/matching things to learn

#

It seems like these are passed in as args[1], [2], and [3] I would think

#

I logged them and args[3] definitely came up with spelldc value

#

but args[1] and args[2] came up as undefined

#

Basically, I'm trying to incorporate the midi Spirit Guardians "first time entering damage" to moonbeam, which has the aura attached to the template with active-auras

coarse mesa
#

I'm not sure if it'll help but when you actually have this AE applied by the aura onto a creature – if you go into the resulting AE config you can see the final values for those args

strong yew
#

Oh, like on the creature? thanks I'll check

#

Interesting, yeah undefined undefined then the spelldc is right

#

It looks like the actual macro is calling @item.level instead of spell level and returning correctly above

#

I think @token is supposed to be the triggering enemy, but that's coming up as undefined

#

It strange that those arguments work for spirit guardians but not for moonbeam

#

gotta be a difference of having the aura on the token rather than having it on the template I guess

coarse mesa
#

that is weird and yeah @token is the caster, not the target

strong yew
#

Looks like you're right, I was misreading the logic in the if statement

#

I guess that means since spirit guardians is an aura from a toekn

#

@token can pull that

#

but it would be undefined since the moonbeam template is the originator of the aura

#

You know though, Moonbeam still hurts the caster if they walk into it

#

So maybe I don't actually need that logic

#

but I'm still curious if a template has that stored somewhere.

strong yew
#

looking at the DAE docs, it doesn't seem like it. @actor and @token are both blank here. Not going to affect much in this case I guess since moonbeam still hits the caster if they walk into it, but might affect other spells like this

strong yew
#

Anyone know what causes a "Damage over time" effect?

#

Have moonbeam pretty much working, except it rolls 4x each time it's activated

#

and the following cards read as "Damage over time"

coarse mesa
#

@strong yew yeah it's in the AE:

#

overtime effects are a big benefit of midi – you can find out more about them in the midi documentation (pinned)

strong yew
#

Ah, ok I thought it was something separate

#

Spirit Guardians from midi samples is triggering 4x each turn as well on 10.0.19, 10.0.20 as well

#

maybe there's a setting I have that's wrong somewhere? Don't need to enable anything in midi do I?

coarse mesa
#

I don't think so, I know there were some recent issues with midi which is why it got patched so quickly, not sure if that was including overtime... is .23 out yet?

strong yew
#

So even 10.0.17 having same issue

#

and actually, it's a lot more than 4x with spirit guardians

#

seems like it's 4x with moonbeam I made, and a lot more than that with spirit guardians

#

I am using lmrtfy

#

Idk if that has some kind of weirdness associated

coarse mesa
#

I know Tim has a fix in .23 for overtime, but I thought it was something introduced in .22

strong yew
#

But it basically rolls the save, then rolls the damage again, prompting another save over and over

coarse mesa
#

ah, could be it.... most of the folk in here seem to use Monk's Token Bar for saves, including myself

#

I think the UX is much nicer

strong yew
#

I'll try that instead, maybe there's some weirdness and I've literally been troubleshooting my macro for nothing lol

#

So disabling lmrtfy eliminates the issue

#

interesting

coarse mesa
#

go the monk

#

then you can also use the nice contested roll shove/grapple etc macro that's been brought up a lot lately

strong yew
#

just disabled monk and tried lmrtfy again and yeah it's the problem

#

constantly redoes the damage over and over

coarse mesa
#

I haven't even heard lmrtfy mentioned for a while in here, you might be the first to notice it

scarlet gale
#

That has to be a bug

#

We must all use monk's so never noticed it

strong yew
#

my players are not the most tech savvy in some cases, so lmrtfy was nice since it prompted them on the middle of the screen

coarse mesa
#

ours aren't much better but they quickly got used to the chat prompt

#

plus, with monks if someone goes rogue you can pull their roll into the group roll window

strong yew
#

goes rogue?

#

We only allow wizards at my table

coarse mesa
#

haha I mean rolls a save off their sheet/TAH instead of using the chat prompt

#

save or check

#

there's a button in monks that allows the GM to nab another chat card and pull it into the group save card – which keeps the midi workflow going

strong yew
#

oh that's nice actually

vast bane
#

the SG running multiple times and spreading to others I believe used to be a bug where an npc casted it

#

is your SG new from v10 or carried over from a previous version

strong yew
#

10.0.10 version

#

maybe someone could install lmrtfy and see if it's also broken on theirs

#

In case anyone else runs into an issue trying to get @token working on a template aura, just don't pass it in the active effect, and in your macro you can use lastArg.origin to retrieve the caster

#

Also, I now have a working active-aura moonbeam macro if anyone wants it

scarlet gale
#

Nice

strong yew
#

Aside from figuring out how to give shapechangers disadvantage

scarlet gale
#

Pretty much all shapechangers have a feature literally called Shapchanger

#

just look for that on the target

vast bane
scarlet gale
#

actor.items.getName('Shapechanger')

#

if not undefined they have that feature

strong yew
#

Also, maybe someone has some insight on this, I just deemed it not really that important, but by the wording on moonbeam and spirit guardians "Whenever a creature starts its turn or enters the field for the first time"

vast bane
#

but it would have to be in a macro cause its attached alongside another ae that doesn't hinge on that

strong yew
#

That could trigger only twice right? once at the start, and once if they leave then reenter

scarlet gale
#

Yea stuff like that gets complicated

#

I got it worked out in my cloudkill template macro

#

but it was a lot of work

strong yew
#

Yeah I think there's some logic built into crusher that handles whether or not it's been used by setting a flag

scarlet gale
#

I store the round and turn as a flag on the token

strong yew
#

I'll check it out. I figured it's an edge case that you'd have an enemy just run through the effect multiple times on a turn, but eh, I like to be thorough when I can

scarlet gale
#

How does it handle overlapping moon beams?

strong yew
#

hmm. I will have to check that

#

It's basically just spirit guardians, but I put it on a template

vast bane
#

If I had more than one sg or mb cast, before the second one casted I'd just add a character to the ae/spells so they weren't the same

#

if its players spells, just rename them permenantly, X' spirit guardians.

scarlet gale
#

The issue is overlapping spell rules in 5e

#

They shouldn't get effected by both

vast bane
#

hmmm, I know the rule you speak of, but then I can't help but think of many instances where SG gets used by two clerics

scarlet gale
#

It's unlikely they'll do it because of that rule

vast bane
#

in streaming, not a definitive source but still, why didn't anyone consider that. I feel like when it comes to SG, its a self spell, its only on others cause of how the vtt does it

scarlet gale
#

But it can happen

vast bane
#

isn't the overlapping spells rule a xge thing anyway?

scarlet gale
#

Nah

#

PHB

#

And even if it was XGE, why wouldn't you use it?

vast bane
#

xge's is not the one you speak of my bad

scarlet gale
#

The effects of different spells add together while the durations of those spells overlap. The effects of the same spell cast multiple times don’t combine, however.

#

Look for the section called Combining Magical Effects

coarse mesa
#

With SG if you force them in outside of their turn, they take damage. Then they take more at the start of their turn

#

Moonbeam should be similar

vast bane
#

I'd reverse the damage when things rarely got wonky

coarse mesa
#

The last para is the important bit

scarlet gale
marsh crescent
#

Foundry Ctrl+Z

coarse mesa
#

if only you could ctrl + z your way back through a midi workflow lol

vast bane
scarlet gale
#

Ok say you do damage to someone that's concentrating on a spell and they do their con save and fail

#

the spell drops

vast bane
#

I'd say just close the MTB request for the save, but I recently learned that has adverse effects in your session

scarlet gale
#

you can still undo the damage

#

but having to recast the spell is annoying

#

plus the time would be wrong

strong yew
#
const itemData = mergeObject(duplicate(sourceItem.toObject(false)), {
            type: "weapon",
            effects: [],
            flags: {
                "midi-qol": {
                    noProvokeReaction: true, // no reactions triggered
                    onUseMacroName: null // 
                    
                },
            },
            system: {
                actionType: "save",
                save: {dc: Number.parseInt(args[2]), ability: "con", scaling: "flat"},
                damage: { parts: [[`${args[1]}d10`, "radiant"]] },
                "target.type": "self",
                components: {concentration: false, material: false, ritual: false, somatic: false, value: "", vocal: false},
                duration: {units: "inst", value: undefined},
                weaponType: "improv"
            }
        }, {overwrite: true, inlace: true, insertKeys: true, insertValues: true});

So here's what the macro does for applying the damage. Creates a weapon to then be rolled

vast bane
#

If you have MTB for saves you can just +20 the save

strong yew
#

So if Shapechanger was found, is there a way I can add a midi flag for disadvantage without having to create a separate weapon if it was a shapechanger?

scarlet gale
#

What does a weapon have to do with moonbeam?

vast bane
#

or if you aren't fast forwarding like me, you can +20 with any module setup

strong yew
#

This is what I pulled from midi spirit guardians. I believe it creates a weapon to then be rolled

vast bane
#

wolfes misreading the spell

#

oh nm

strong yew
#

This is what he has in the wiki

vast bane
#

yeah you actually need to tandem auras imo unless you wanna get dirty with it

scarlet gale
#

Oh interesting

#

I would just use a overtime effect

strong yew
#

There's an overtime effect for the start turn thing

vast bane
#

but you can't do two overtime effects in the same ae can you?

strong yew
#

but I think this is done on the "first entry"

scarlet gale
#

MidiQOL.doOverTimeEffect(token.actor, effect, true);

#

You can manually trigger an overtime effect

coarse mesa
scarlet gale
#

No need to complicate it with a temp weapon

coarse mesa
#

Or I might be thinking of mr primate's version 🤔

strong yew
#

If you have two on one effect how do you call them?

#

Or do I create a separate AE entirely for it?

scarlet gale
#
if (doDamage) {
    let effect = token.actor.effects.find(eff => eff.label === 'Cloudkill');
    if (effect) MidiQOL.doOverTimeEffect(token.actor, effect, true);
}
#

It doesn't actually even need to be on the actor you're doing the overtime on

#

false to run the end of turn overtimes

strong yew
#

So the one I grabbed from spirit guardians has this turn=start

#

Would that interact strangely? Could I just call the same overtime effect when they trigger the condition of walking in?

#

If this works, that seems way cleaner

#

than the whole creating a weapon business

scarlet gale
#

Yep

#

My cloudkill template macro plops the effect on them and I manually trigger it if they enter the template for the first time that turn

coarse mesa
marsh crescent
#

Yep, used it many times on my players, they keep falling for that one.

strong yew
#

Well, I'll be damned. It worked

scarlet gale
#

No, keep that

strong yew
#

Only issue now is that it applies turn start and args[0] === on at the start of a turn

#

so it does damage twice

scarlet gale
#

How are you triggering it?

strong yew
#

if (args[0] === "on" && lastArg.tokenId === game.combat?.current.tokenId)

#

Again just pulled from the spirit guardians one

scarlet gale
#

in an item macro?

strong yew
#

yeah

scarlet gale
#

This is for a template macro right?

#

Just throw it into the on enter part

#

So it only gets manually triggered when they walk into the template

strong yew
#

Let me go look at your cloudkill lol

coarse mesa
#

he's talking about the module Template Macro

scarlet gale
#

If you're not using that module

strong yew
#

Oh, no sorry I don't think I'm using that

scarlet gale
#

Oh gotcha

strong yew
#

It's just midi and active-auras

#

and item macro I guess

scarlet gale
#

I'd look at the ddb importer version of cloudkill then

#

See how it handles first time enter

strong yew
#

Should I just get template macro?

scarlet gale
#

I like it

#

¯_(ツ)_/¯

strong yew
#

I'll check it out, does it conflict with the other stuff I'm using?

scarlet gale
#

nah

#

Template Macros, Effect Macros, Door Macros, all work fine with midi stuff

coarse mesa
#

you can still keep everything on the spell item with TM right?

scarlet gale
#

Yep

coarse mesa
#

nothing to lose then 🙂

#

it's when you get into world script territory I nope out

#

too many things to keep track of

scarlet gale
#

Midi worldscripts at least can be done with the world scripter module

strong yew
#

So with this new strategy

#

Is there a way to insert disadvantage to the overtime effect?

spice kraken
#

Create an OT in one effect and the disadvantage key in the same effect. When OT is removed, so is the disadvantage

strong yew
#

Oh sorry, in context of having it only add disadvantage to shapechangers

#

This is in reference to @scarlet gale suggestion on the shapechanger stuff above

vast bane
#

its disadvantage on the OT save for the record, nothing else

#

and once they fail, they change back to normal form

#

not exactly something you can automate though

#

or worth automating

scarlet gale
#

Not worth automating yea

vast bane
#

9/10 times if someones using moonbeam against werewolfs, its going to be well stated at the table they are doing it precisely for this hehe

#

easily managed

strong yew
#

fair enough

scarlet gale
#

This actually is starting to sound like something you don't want to run a overtime effect for

#

And instead just have effect macros do the save

#

So you can apply disadvantage on the save first if they're a shapechanger

vast bane
#

the odds of there actually being a werewolf though... I would just use it as is and manually deal with shapechangers

#

leave it to the player to read their spells

scarlet gale
#

Only really an issue if you use fast rolling

vast bane
#

yeah

#

I don't fast forward, though I do have auto for dm saves when my session is idle so they can combat dummy stuff

strong yew
#

Hmm. the way this reads seems like it's really only activatable once per turn

coarse mesa
#

yeah anyone's turn

strong yew
#

and also the clarification makes it seem like the logic I'm currently using can't cover it

coarse mesa
#

I'm using it quite a bit: repelling blast, crusher, telekinetic

strong yew
#

So if he starts his turn in it, then moves out, then moves back through it going elsewhere

#

He only really takes the damage from the turn start?

coarse mesa
#

Correct... it's a tricky one. I think bugbear had it working but using Template Macro

strong yew
#

I mean, I think if I just use a flag per turn like was mentioned before, that'd probably work

coarse mesa
#

He also had it working without by using some crazy reading stuff from the chat log shenanigans but gave up on that for TM

strong yew
#

Well looks like I got it working

#

I guess with the idea that it can be anyone's turn, and can only trigger once per turn

#

All I had to do was check the "Only activate aura once per turn" option

coarse mesa
#

That's fantastic

strong yew
#

Actually, looks like it doesn't trigger right on someone else's turn

#

I always get turn and round mixed up

#

is turn overall?

#

round is by character?

scarlet gale
#
if (game.combat != null && game.combat != undefined) {
    let combatTurn = game.combat.round + '-' + game.combat.turn;
    let tokenTurn = token.document.getFlag('world', `spell.cloudkill.${template.id}.turn`);
    if (tokenTurn != combatTurn) doDamage = true;
    token.document.setFlag('world', `spell.cloudkill.${template.id}.turn`, combatTurn);
} else {
    doDamage = true;
}
``` My solution for it.
#

Store the round an turn as a string and compare if it's the same

coarse mesa
strong yew
#

Oh wait! It's cause I still have the logic in there that looks for the character's turn

coarse mesa
#

I find it confusing too because when I started playing D&D 'turn' meant ten rounds

strong yew
#

Ugh, this one is hard

vagrant wharf
#

I think this is MIDI but something is making attacks randomly have disadvantage etc, and one player is getting assigned the prone status when she uses defensive duelist, aura of protection is applying either double or not at all, its a total mess

#

kind of completely broken right now and I don't know what changed since saturday when it worked fine

vast bane
#

aura of protection in a live session if its active auras version, can have that effect especially if you guys are really high latency

#

once you go into combat its pretty easy to manage the issues, its only bad when you got everyone moving at once

scarlet gale
#

Why would it be setting people to prone?

vast bane
#

as for random disadvantage, nothings random, whats the active effect being applied to them

vagrant wharf
#

no this is absolutely not easy to manage in combat, something is completely breaking

#

none?

scarlet gale
#

Oh I misread that

#

doubled up aura of protection

#

Are you on v9 or v10?

vagrant wharf
#

I don't know that the two are connected

#

v10

#

but its one of many issues

#

that just cropped up suddenly yesterday out of nowhere

#

everythings updated

scarlet gale
#

Is your aura of protection using build a bonus or AA?

vast bane
#

ok well give us some errors in the console to work with, maybe a snippet of what the canvas loooks like

vagrant wharf
vast bane
#

theres no active effects on the guy getting random disadvantage? that kinda smells of actor on use shenanigans

scarlet gale
vagrant wharf
#

is that saying emboldening bond (from MIDI) is breaking?

vast bane
#

one common mistake some make is they drag out the build a bonus version and then turn on active auras for it, which is not what you suppose to do

vagrant wharf
vast bane
#

uninstall ASE

vagrant wharf
vast bane
#

did you carry over v9 emboldening bond and not redrag out the new one?

vagrant wharf
#

no

scarlet gale
#

That's out of date, but unlikely related

vast bane
#

ASE is very likely the culprit

vagrant wharf
#

I didn't use ASE on that

scarlet gale
#

Is ASE even enabled?

#

If so, disable it

vast bane
#

no but its showing up plenty there and its a massive module that is now dead in v10

#

the prone thing is a bad icon choice

vagrant wharf
#

what do you mean dead

vast bane
#

you aren't actually prone, some sort of map you bought/downloaded causes something to use the prone icon

#

ASE has no v10 version

#

and its too complex to survive the changes properly

vagrant wharf
#

why would a map break defensive duelist

vast bane
#

I have no clue, but it shows that something is using the same icon as prone but its not prone

scarlet gale
#

Not sure what you mean, but it's pretty clear you have outdated macros running

worthy viper
#

anyone here have a Channel Divinity: Twilight Sanctuary Active Aura or macro?

vast bane
#

is ASE a concentration handler?

worthy viper
vagrant wharf
vast bane
#

just disable ASE and see if things improve

#

its very likely gumming up a ton of stuff

#

disable all of the v9 stuff and see if things improve

#

also v10 emboldening bond uses these:

#

so yours is old

vagrant wharf
#

No.

#

it was added like two wekes ago in v10 so

scarlet gale
#

What was added two weeks ago?

#

ASE?

vast bane
#

did you add it via an importer

vagrant wharf
#

no that emboldening bond from MIDI

#

I dragged it out of the compendium

scarlet gale
#

Midi compendium must be out of date then lol

vast bane
#

well redrag and try the new one?

strong yew
#

aight, weird question. Spirit Guardians has a CE effect associated, and that gets applied as soon as someone enters the field

vast bane
#

show us the description of emboldening bond that will tell us how old it was

vagrant wharf
#

come to think of it I think aura of protection was from MIDI, though it has 3 confusing listings

vast bane
strong yew
#

Nah, it's in CE. I didn't put it in there

vast bane
#

or did you forget to disable mid+defreds for premades

strong yew
#

I don't think so

vagrant wharf
vast bane
#

edit the item macro

vagrant wharf
#

what item

scarlet gale
vast bane
# strong yew I don't think so

I do not see anything about midi's spirit guardians that calls dfreds, you likely have the midi setting on where dfreds applies first

worthy viper
scarlet gale
#

Do you have effect macros too?

worthy viper
#

Yeh

vast bane
#

I don't really think emboldening bond is automateable

scarlet gale
#
let healingFormula = '1d6';
let clericLevels = origin.actor.classes.cleric.system.levels;
if (origin.uuid != actor.uuid) {
    healingFormula = healingFormula + '+' + clericLevels;
}
async function showMenu(title, options) {
    let buttons = options.map(([label,value]) => ({label,value}));
    let menuReturn = await warpgate.buttonDialog({
        buttons,
        title,
    }, 'column');
    return menuReturn;
}
function applyDamage(damage, damageType, targets) {
    await MidiQOL.applyTokenDamage(
        [
            {
                damage: damage,
                type: damageType
            }
        ],
        damage,
        new Set(targets),
        null,
        null
    );
}
let charmed = actor.effects.find(eff => eff.label === 'Charmed');
let frightened = actor.effects.find(eff => eff.label === 'Frightened');
let needMenu = false;
if (charmed || frightened) needMenu = true;
let action = 'Heal';
if (needMenu) {
    let options = [];
    if (charmed) options.push(['Remove the charmed condition.', 'Charmed']);
    if (frightened) options.push(['Remove the frightened condition.', 'Frightened']);
    options.push(['Gain temporary HP.', 'Heal']);
    action = await showMenu('You are charmed or frightened, what would you like to do?', options);
}
if (action === 'Charmed' || action === 'Frightened') {
    await game.dfreds.effectInterface.removeEffect({effectName: action, uuid: actor.uuid});
} else {
    let damageRoll = await new Roll(healingFormula).roll({async: true});
    applyDamage(damageRoll.total, 'temphp', [token]);
    damageRoll.toMessage({
        rollMode: 'roll',
        speaker: {alias: name}
    });
}```
Throw this as a on combat turn ending effect macro.
vast bane
#

I handle emboldening bond via advantage reminder

scarlet gale
#

Make sure the active effect is an active aura.

#

Let me know if you need me to screenshot the DAE options.

worthy viper
#

But just send me it, trying to get more into automation with 5E

scarlet gale
#

You'll need to replace the description back in.

#

Actually hold on

#

There

#

Let me know if you run into issues

worthy viper
scarlet gale
#

Nope

#

The macro is in the effect macro

#

There is no item macro

worthy viper
#

Ohh

scarlet gale
#

The export should have it 100% setup to go

worthy viper
scarlet gale
#

You'll likely need to relink the resource usage to use your channel divinity

#

But that's for any import you do

strong yew
#

token.document.setFlag('world', `spell.cloudkill.${template.id}.turn`, combatTurn);

#

@scarlet gale is this flag just arbitrarily named? Or is this something specific

worthy viper
strong yew
#

Could I just set a flag with spell.moonbeam.turn or something?

scarlet gale
#

Yea, generally it's recommended to use the world when it's not a module flag.

#

Honestly you could probabbly just get away with copying my cloudkill and editing it's overtime effect

strong yew
#
 if (game.combat != null && game.combat != undefined) {
        let combatTurn = game.combat.round + '-' + game.combat.turn;
        let tokenTurn = token.document.getFlag('world', `spell.moonbeam.turn`);
        if (tokenTurn != combatTurn) doDamage = true;
        token.document.setFlag('world', `spell.moonbeam.turn`, combatTurn);
    } else {
        doDamage = true;
    }
    const lastArg = args[args.length -1];
    // Check when applying the effect - if the token is not the caster and it IS the tokens turn they take damage
    if (args[0] === "on" && doDamage === true) {
#

huh, why isn't it formatting? It's just js right?

vast bane
#

you pag returned the js

strong yew
#

Oh I think there was a space after it

#

So basically, I thought this should equate correctly to only do damage once a turn

scarlet gale
#

is your macro running on turn start?

strong yew
#

Yeah, but with this, I thought if I dragged the actor in and out of the effect it would only trigger once

#

Let me refresh and see if it's some weird caching or something

scarlet gale
#

Mine was setup for on enter template macro

#

Very unlikely to be any sort of caching

worthy viper
scarlet gale
#

Is there an error in console when the person ends their turn?

#

I had to modify the macro I gave you to not use my helper functions

worthy viper
#

One sec

worthy viper
scarlet gale
#

screenshot it

worthy viper
scarlet gale
#

oh

#

easy 2 sec

strong yew
#

interesting. This shouldn't be equating to true

#
if (tokenTurn != combatTurn) doDamage = true;
#

that's the logged tokenTurn and combatTurn

scarlet gale
strong yew
#

is the default of doDamage true?

scarlet gale
#

@worthy viper

#

This should actually work

scarlet gale
strong yew
#

I'll check out the cloudkill again

#

that's what it was from right?

worthy viper
scarlet gale
#

Are you on v10?

worthy viper
scarlet gale
#

Does the character have any cleric levels?

worthy viper
#

Ah, thats the issue checking it now sec

strong yew
#

So this is actually working pretty alright. Only triggering once a turn now, triggers on turn start or entering it for the first time

#

The only thing I'd even want at this point is just aesthetic

worthy viper
strong yew
#

Or is that just CE on mine?

worthy viper
vast bane
scarlet gale
#

But everything on there is v10

strong yew
vast bane
#

correct, you should disable it

#

unless your custom spirit guardians relies upon dfreds ce

#

the v9 and v10 sg does not

strong yew
vast bane
#

least the ones that midi gives us

strong yew
#

This is straight from midi samples no changes

vast bane
#

you didn't share the bottom 1/3 fwiw

strong yew
#

This is the end of it

vast bane
#

hmm

strong yew
#

doesn't the bottom part only show if you change action type to something?

vast bane
#

yeah

strong yew
#

Spirit Guardians 10.0.10

#

is the version I'm grabbing

vast bane
strong yew
#

just from the midi sample library

#

fwiw it doesn't look like the CE has anything on it, it's just visual seems like

vast bane
#

I think the problem is he did not have dfreds when making the samples, so he can't set the flag

strong yew
#

Is there anything potentially troublesome about it being on?

vast bane
#

it will mislead you to think its doubling

strong yew
#

I kind of do prefer the icon showing up on the creature entering the aura for clarity

worthy viper
strong yew
#

Was thinking the difference on that was that SG has a CE that's getting matched

#

Is that a wrong assumption?

scarlet gale
scarlet gale
vast bane
#

or force show

strong yew
#

Oh, interesting. Thanks for the tip

#

so interestingly enough

#

there's no duration on the effect for SG

#

but there is for the CE that gets called

vast bane
#

all dfreds CE's have the force show field checked

strong yew
#

that's why I'm getting that behavior

#

Ah, I guess that could also be why then

vast bane
#

there should not be durations on the aura effect because they lose it when they leave it

#

just pop a character into the force show field

#

if you do, make sure you turn off active effects setting in automated animations

strong yew
#

This is SG in CE

vast bane
#

happens with newest SG in midi sample?

scarlet gale
#

FYI that's not actually an error

#

midi left debugging in

#

(again)

vast bane
#

unless you duplicated as custom, you can't edit it in the menu

strong yew
#

I duplicated as custom yeah

vast bane
#

apply that

#

it will change

#

no ce applies without an icon, it will add the dfreds code into the force show field

#

to get around this, I make some ce's transparent icons

strong yew
#

Man, I'm confused

#

So, potentially, if I don't have the "Don't use CE" checked, it should try to match one based on name right?

#

If I created a custom CE that is titled "Moonbeam"

vast bane
#

but the user would also need to have that setting on in midi

strong yew
#

So that's the weird thing then. I have a CE I created for it, and it's named the same. Doesn't get applied though when they walk in the aura

#

Not make or break or anything

#

Just odd

vast bane
#

midi+dfreds only work together automatically on spell casts item rolls.

#

anything else, thats on you to program in your automation macros

strong yew
#

I guess I'll have to look at the SG one again then since it applies it

#

didn't see anything like that in there but maybe I missed it

vast bane
#

are you sure its applying dfreds ce, cause my v10 sample item is not

#

its applying a special SG though

strong yew
#

May not be Dfreds but has an icon yeah

vast bane
#

its applying to the tokens cause it has a duration

strong yew
#

your SG has a duration on the effect?

#

In the duration tab on the spell itself?

#

My moonbeam drops the temp effect on the token when they enter, and it fills in some duration info

#

but the icon doesn't show up on the token

vast bane
#

show the duration tab

strong yew
vast bane
#

that would be why bud, no duration

#

I am getting this error with spirit guardians v10 sample item:
It is preventing animations from playing

strong yew
#

sorry if I'm being dense

#

But spirit guardians doesn't have duration info on the actual effect. So I guess I don't understand where to put the info

vast bane
#

oh actually no, its in the template thing

#

you have no duration set in moonbeams details

strong yew
#

in the CE?

#

template thing?

vast bane
#

you keep dwelling on this ce thing

strong yew
#

Yeah sorry, just getting kind of mixed up where everything is

vast bane
strong yew
#

on moonbeam

vast bane
#

and if you still don't see a duration, do you have the thing turned on in midi, or maybe dae where it toggles off the special template control thing

#

I dunno where it is in v10, its the thing that we couldn't turn off in v9

strong yew
#

Well, spirit guardians works as expected

#

it applies the icon and everything

#

that's where my confusion was coming from

vast bane
#

is automated animations killing the template in moonbeam?

strong yew
#

does seem to change the behavior if I toggle off the info

#

No worries though, I'll probably revisit it at some point. At least the effect is working

vast bane
#

is anyone else experiencing an error with spirit guardians from newest midi with active auras?

strong yew
#

I don't seem to be. I'm on midi 10.0.20 and aura 0.4.24 I think

vast bane
coarse mesa
#

FWIW isn’t there an option on the Auras tab to display icon on the target?

vast bane
#

@violet meadow the multiple spirit guardians animations bug is actually a mistake on my part, you will notice in the spirit guardians items effects theres a strange entry at the bottom of the overtime for killanim. I had removed that to try and fix the lack of animation at first, then I remembered I had no auto recog. So when I turned on auto recog for spirit guardians, thats when the multi animations started playing.

#

its weird cause Automated animations has a setting to not play animations on active effects, yet SG does

#

and somehow Tposney knew to make a special key value for it lol

#

I don't even see killAnim in the overtime options

violet meadow
#

OK I think I got the Active Auras Spirit Guardians in a good place for the forced movement stuff. Testing now and I can share later

past spade
#

Hi, I'm trying to create a Reaction that imposes disadvantage on the incoming attack roll. I tried adding a custom effect with key flags.midi-qol.optional.luckyreaction.attack.all and value reroll-kh, but although the effect seems to be applied to the attacker, the attack is not rerolled and basically nothing happens

sinful hamlet
#

Hello, I'm trying to create an effect that automatically adds a modifier when a certain type of damage is being dealt by the actor that has it.
Thing is, they are custom damage types added through a world script and don't show up in the flag dropdown (well they do but only under absorbtion)

How would I need to go about that?

vast bane
sinful hamlet
#

The world script creates the custom damage/resistance types as I haven't found a module that lets me do it. I'm on v9 but am updated and haven't found anything in the settings.
The only place where MidiQoL acknowledges the custom types existence is in the effect dropdown where they show up as flags.midi-qol.absorption.acid for example

#

and only absorbtion

vast bane
sinful hamlet
#

oh well... is there another way to do what I'm looking for?

sudden crane
vast bane
#

I think it would still fail on nat 20's though wouldn't it?

past spade
violet meadow
past spade
#

I see. I guess there is also no way to always call the reaction check and impose disadvantage regardless of it will be a hit or a miss

violet meadow
#

It would take some effort to make all attacks against a specific target to have disadvantage.
Which ability are you trying to emulate, so as to better understand what needs to be done?

scarlet gale
#

I'm guessing this is for Silvery Barbs?

past spade
#

the new version of the lucky feat from One DnD

violet meadow
#

can you post a short description?

past spade
#

in general it should be called before the player knows if it's a hit or miss, but from the midi readme reaction is only for hits

#

When a creature rolls a d20 for an attack roll against you, you can spend 1 Luck Point to impose Disadvantage on that roll.

violet meadow
past spade
#

from my understanding, you would have to decide before the roll. but since you can only do it 3 times, I wouldn't want to always use it but have a popup that asks if I want to use a luck point

#

hmm, maybe I could do it via a world script that checks if the target has "lucky" on every attack roll and add disadvantage there? although I still don't know how I would do the popup thing

gilded yacht
# strong yew If you do get a chance and are in there anyway, could you add minConcentrationSa...

There's a big difference between macro.ItemMacro and item on use macros. macro.ItemMacro is handled by DAE and has a limited set of data that is passed by default. The @params allow you to add extra info to the macro call (macro.ItemMacro existed long before item onUse macros). Item onUse macros are called by midi and have access to the whole workflow data, targets and so on, so generally parameters are not needed/supported.

The default fields for actor/token etc are populated, and the parameters are evaluated in the context of the actor causing the effect to be applied and its targets. If a template is applying the effect then those things will not be defined.

sudden crane
#

@past spade
This is why I told to use a manual reaction in this case, the player would need to use it before the DM rolls an attack

violet meadow
# past spade from my understanding, you would have to decide before the roll. but since you c...

If you are fine with dealing with that during a normal reaction, triggered if hit, it can be done easier.
You can, in that reaction, post a dialog and request another roll and depending on that result, "make" the initial attack miss.

Otherwise it would need a way to trigger on every attack made (as you said either world script - preferable - or a semi-PITA Active Aura creating actor onUse macros on all creatures...).

sudden crane
#

@gilded yacht Does the fix for overtime with a saveAction=true, that does not roll damage on turn start, will be included in the next version of MidiQOL?

sudden crane
# violet meadow If you are fine with dealing with that during a normal reaction, triggered if hi...

It could also be done with an aura that transfers a AE containing a on use macro on preTargeting, it could change the options to set disadvantage. It’s doable when the feature specifies a max range, but in this case it doesn’t seem to…
What we really need for these kind of reactions, is an on use macro but called during another token’s turn, like reaction but more generic.
But for this midi would need to go through all the tokens on the scene to look for these kind of on use macro, unless he adds a way to register them so during a workflow phase midi will only need to look into that list

past spade
#

What I'm currently trying is a global script with a hook on midi-qol.preAttackRoll that checks if the target has an item called lucky. I just don't know how I would get a popup on another users screen, and the result of that popup in the global script

sudden crane
#

@past spade
You can use a socket to call completeItemUse in MidiQOL

scarlet gale
sudden crane
sinful hamlet
sudden crane
sinful hamlet
past spade
sudden crane
# past spade Do you have an example how a socket call with MidiQol works?

Here is an example, note: the item can be a temporary item also:

  const options = {
    targetUuids: [macroData.tokenUuid],
    configureDialog: false,
  };

  const data = {
      itemData: feat.toObject(),
      actorUuid: feat.parent.uuid,
      targetUuids: options.targetUuids,
      options,
    };
    await MidiQOL.socket().executeAsUser("completeItemUse", player.id, data);
sudden crane
sinful hamlet
#

Thanks!
But my suspicion was correct, it doesn't make them show up in the effects dropdown either, so the change is just doing what the custom damage type example in the wiki entry for world scripts did and doesn't actually create flags besides absorption either 🥲

strong yew
#

so looking through the discord history, it seems like abilities like warding flare are not currently supported right?

#

imposing disadvantage after a roll?

strong yew
strong yew
strong yew
bold plover
#

Is there a list of available activation conditions? I had to pretty much guess how to setup a slayer weapon with the gitlab example.

strong yew
#

Damn I thought I finally had it working, but was just not doing good testing lol

#

Was always trying the "entering for the first time" and never just cast it directly on the token haha

#

It activates the OnUse and the On parts of the macro at the same time lol

violet meadow
# bold plover Is there a list of available activation conditions? I had to pretty much guess h...

There is the MidiQOL readme that explains what activation conditions are https://gitlab.com/tposney/midi-qol/-/blob/v10/README.md#roll-other-formula-for-rwakmwak-roll-other-formula-for-spells
and what you can use.

There isn't a guide cause, you can pretty much use everything from the token.actor.getRollData() or the target.actor.getRollData(), and everything from the workflow of the particular item use.

violet meadow
strong yew
#

Cool. looking forward to seeing your approach. I've been trying my best for a couple days

violet meadow
#

@gilded yacht when you use a DAE macro execute and use a repetitive trigger duration for Turn Start, the macro is being executed at the previous combatants turn.
So something like ```js
if (args[0] === "each") {
await fromUuidSync(lastArg.tokenUuid).actor.setFlag('foo','bar',{lastDamaged:${game.combat.id}-${100*game.combat.round + game.combat.turn } })
}

will point to the `game.combat.turn` of the previous combatant.

I ended up using for the time being an Effect Macro's `combat turn start` to do the same.
violet meadow
#

OK. Let's see. Spirit Guardians for MidiQOL/DAE/Effect Macro/Item Macro/Active Auras.

Should respect forced movement, spell scaling, once per turn damage utilising OverTime effects.

I haven't checked its behaviour when a token is under multiple auras, so I guess that both will apply for now.

From a quick look at the Active Auras code, there might be something that can differentiate and apply best one, but will play with that another time.

#

I think that by disabling the OT (but leaving it on the AE) one could move all the logic, of multiple auras handling damage, in the ItemMacro, where at any given time you could check which one of the OTs currently on the token you should manually roll, by filtering for the most powerful one based on damage (or in case of equal damage, higher spellDC) 🤔

strong yew
#

I'll have to dissect what you're doing and edit mine

violet meadow
#

That one is using Effect Macro to circumvent the issue I mentioned in the post above.

strong yew
#

Wait but I don't have Effect Macro installed I just realized

#

Maybe I haven't tested the case for that I guess

coarse mesa
#

Effect Macro is so powerful it doesn’t even need to be installed 😆

violet meadow
#

EM is handling the combat turn start, setting a flag for last time the OT was triggered, so that if on the target's turn you move out and in again, it won't trigger it again

strong yew
#

Oh, is that how the effect is supposed to work?

#

That seems odd if they leave the effect from turn start, and reenter that it wouldn't damage them again

#

the first time anywzy

violet meadow
#

Once per turn, no matter what!

strong yew
#

way*

violet meadow
#

That is how I read it 😄

coarse mesa
#

If they start their turn in it OR enter for the first time

strong yew
#

Man that's such an odd ruling. If I stand in fire, then move out of the fire, then run back through the fire, I'd still take damage from the first time and the reentry

violet meadow
#

you would be damaged if you stayed on the "fire" for a full turn 🤷

coarse mesa
#

They’re just cutting you a little slack I guess

strong yew
#

Yeah but also on the ruling they said other people can throw you through it

#

So like, you can repelling blast someone all the way through an effect and just passing through does the damage

violet meadow
#

yeah cause its the first time on a turn ...

strong yew
#

I know it's for balance sake, but it's just very odd

coarse mesa
#

You can only ‘burn’ so much in one turn

violet meadow
#

Its... kinda stupid but 😄

strong yew
#

Yeah, I mean it makes sense that you can't just keep throwing someone through it

#

but leaving on your own turn, and then reentering seems like it would be different in a sensible kinda way

strong yew
violet meadow
#

I mean even now we are scratching the bottom of the barrel. It's the edge case of an edge case...

coarse mesa
#

Overlapping SGs is even edgier

#

I feel sorry for that DM

lunar zephyr
#

I can't seem to get thunderous smite to apply an effect to the person casting it, even with target & range set to self

#

is it because it's a saving throw spell effect or something?

#

It does work perfectly fine on spells like shield for example

#

also it works when I target myself, interestingly enough

#

I'm probably missing something very obvious somewhere

coarse mesa
#

What are your settings on the first page of the AE config?

lunar zephyr
#

I think that's the page you mean

lunar zephyr
coarse mesa
#

Ah ok so you don’t have effects being auto applied in midi at all

lunar zephyr
#

I don't think so

#

Sorry I didn't realise this was the midi channel, I searched for some keywords related to my problem and this channel popped up a few times in the search results haha

#

I just kinda copied what I did for the shield spell to this one but I must've done something wrong

coarse mesa
#

You definitely want midi if you want effects being applied automatically. I’m not sure how shield is working and not this tho if you don’t have effects being auto applied

#

Maybe because shield is a Convenient Effect

lunar zephyr
#

I've also got it to work on bladesinging

coarse mesa
#

Check your midi workflow settings and see if effects are being applied for things that aren’t CEs

lunar zephyr
#

This one?

coarse mesa
#

Yeah that seems ok 🤔 Wonder why you’re still getting the button then

#

On my phone right now so can’t check but wonder if shield has range of self? Or just target self

lunar zephyr
#

Both

#

The only real difference between the two spells is that the smite has a different action type spell effect

#

saving throw instead of utility

coarse mesa
#

Just looking at that spell, it’s a tricky one. Because you don’t want to be rolling the save yourself. The save is on hit

strong yew
#

So, when I pass @token in for an AE parameter, sometimes it finds the value and sometimes it doesn't

lunar zephyr
#

if I could just get the effect to show up on the casting character I'd be happy, but I assume the saving throw is tossing dirt in my cereal

coarse mesa
#

Yeah remove the save, there isn’t actually a save rolled when you first use this spell

#

For it to work fully you’d need to go into Macro territory (I know Crymic has one)

lunar zephyr
#

Yeah macros I can do, it's getting them to trigger via effects that's proving more difficult than I thought

#

I appreciate your help though lad, thanks

hot flower
#

hi, @gilded yacht I’m having some issues with the cover calculation and Levels AUto Cover. It’s applying +5 to every roll that has any cover, regardless if the cover is half or three-quarters. There’s no error in the console, and no clue as to what’s going on. 😦

#

These are my midi settings, and Levels auto cover is set for library access.

coarse mesa
lunar zephyr
#

Got everything working nice and smoothly after getting rid of the saving throw, thanks again GWvertiPeepoSalute

#

Time to melt some GPUs with excessive amounts of visual effects

strong yew
#

Question regarding active effects

#

Is there a way to have the AE not apply on cast?

#

Running into an issue I've been debugging for a few hours. When I place the template, it's wanting to apply the AE to any tokens within

#

Thought it was my macro, but ultimately just made it as simple as possible and it's still happening

violet meadow
#

@molten solar the conversation in #macro-polo just gave me an idea.
I will double check, but I think I a babonus version of Shield Master for Dex saves bonus only when the relevant conditions are met is pretty doable 🤣

molten solar
#

Uh?

#

It's doable with 0 modules.

violet meadow
#

yeah well I want babonus target

vast bane
#

the dex bonus to saves is only if they are the only target

violet meadow
#

yeah

vast bane
#

the super save is only when a shield is equipped

molten solar
#

ugh, don't make me look up feats...

vast bane
#

If you are subjected to an effect that allows you to make a Dexterity saving throw to take only half damage, you can use your reaction to take no damage if you succeed on the saving throw, interposing your shield between yourself and the source of the effect.

molten solar
#

"against a spell or other harmful effect that targets only you."

vast bane
#

If you aren't incapacitated, you can add your shield's AC bonus to any Dexterity saving throw you make against a spell or other harmful effect that targets only you.

molten solar
#

Yeh buddy that's out of scope for babonus 👋

vast bane
#

I use advantage reminder personally

molten solar
#

Yep.

vast bane
#

need to revisit the shield bash ability from it, and make it choose between knock prone or something akin to crusher feat

#

Well by revisit, I mean harass Bugbear till he makes it

violet meadow
violet meadow
#

🤣 I think it works

#

Custom script for the babonus (with MidiQOL enabled) - Shield Master dexterity bonus on saves against you. ```js
const itemD = fromUuidSync(game.messages.contents.at(-1).flags["midi-qol"].itemUuid)
if (itemD.system.target.type === "creature" && itemD.system.target.value===1) return true

#

Need to put also a condition blocker for incapacitated!

past spade
#

Can I post longer scripts here (56 lines) or should I use pastebin?

violet meadow
#

paste in the message box and hit enter. It should upload it as a message. Edit the name to something.js if it is a macro

past spade
#

So this is my solution to the impose disadvantage before an attack roll as reaction. It is quite hacky but it works for me. Just wanted to post it here because someone else also asked something like this

violet meadow
#

Nice one!

I have included that same playerForActor function from MidiQOL in a world script too. Quite useful 😄

past spade
#

yeah, I deleted a few lines because it gave me inactive players, but other than that it's really neat!

violet meadow
#

My player with the Lucky feat tends to get upset if there is a pop up whenever someone rolls against them, but it certainly does the trick for anyone who wants something like it! 😅

past spade
#

yeah, I had the problem that my player used lucky after the roll, so they knew it would have hit, and then I had to manually roll another time and remove the damage if it changed it to a miss.. I'd rather annoy my players 😁

vast bane
#

I just never finish the attack and reroll

violet meadow
#

I just ended up making it obvious that someone is attacking them, let them be for a couple of seconds and if they don't say anything about Lucky, its over.

vast bane
#

I honestly wonder with the amount of automation prompts you guys get, that if you really are reducing the popout counts or not hehe

strong yew
#

I can't figure out how to not have the AE apply to the tokens within the template

#

Only idea I have to fix it is to just query the actors inside for the temporary effect and remove it but that seems off

#

Either that or turn off auto-targeting for templates in the midi settings

violet meadow
#

When and where should the AE be applied?

strong yew
#

While they're within the template, and that works, but when casting it on tokens, it applies the temporary effect on the targets

#

So the aura is working for entering/being inside and all, but it also applies a temporary effect if I cast it on top of a token. Makes them roll a save, or does it automatically if I disable the save

violet meadow
#

So you are not supposed to have a template on the spell to target. Most of the auras have a target of Self and the Active Aura module will push the AE to the tokens in the radius.

#

Which one are you trying to make?

gilded yacht
strong yew
#

with auto-targeting for templates on in midi, place the template on top of a token

#

you should see that it applies the AE to the token inside as a temporary effect

#

for the full duration, whether or not they move outside of the template

vast bane
#

oh are you still trying to do the shapechanger part?

strong yew
#

moonbeam only does damage while you're in it

#

So casting it on a target would seem pretty standard, then they should take damage at the start of their turn

#

problem is, casting it puts the full duration moonbeam on them and stays even if they leave

vast bane
#

some remove when you walk out, others do not

#

its beyond my paygrade

violet meadow
#

If they leave on their turn it drops.

vast bane
#

darkness from active auras compendium suffers from this, and changing the key to macro.ce fixes it, no idea why

violet meadow
#

Hmm I had other auras in mind

#

Moonbeam needs updating probably 🤔

strong yew
#

I've got it pretty much entirely working aside from this

#

once per turn, start of turn, flags to mark initial castings and all that

vast bane
#

maybe make the ae in dfreds, then you can use macro.ce in moonbeam

strong yew
#

I guess that's a possibility. Was hoping to be able to share it pretty easily without much setup though

vast bane
#

have it prompt if the user wants to prone or move them 8)

violet meadow
strong yew
#

I have some logging in it, and whatever it is that is causing the temporary effect to be applied is before the OnUse macro call

#

it prompts for the save prior to processing any of that

vast bane
#
let results;
const attacker = canvas.tokens.get(args[0].tokenId);
const {object: target} = await fromUuid(args[0].hitTargetUuids[0]);

const skilltoberolled = target.actor.data.data.skills.ath.total < target.actor.data.data.skills.acr.total ? "acr" : "ath";

results = await game.MonksTokenBar.requestContestedRoll({
    token:attacker,
    request:'skill:ath'
},{
    token: target,
    request: `skill:${skilltoberolled}`
},{
    silent:true, 
    fastForward:false,
    flavor: `${target.name} tries to resist ${attacker.name}'s shove attempt`, 
    callback: async () => {
        const attackerTotal = results.getFlag("monks-tokenbar", `token${attacker.id}`).total;
        const targetTotal = results.getFlag("monks-tokenbar", `token${target.id}`).total;
        if (attackerTotal >= targetTotal) {
            if(!game.dfreds.effectInterface.hasEffectApplied('Prone', target.actor.uuid)) {
                await game.dfreds.effectInterface.addEffect({ effectName: 'Prone', uuid: target.actor.uuid});
                ui.notifications.info(`${attacker.name} shoves ${target.name} to the ground`)
            }
        }
        else ui.notifications.info(`${target.name} resists the shove attempt from ${attacker.name}`)
    }
});```

Would love if this prompted for prone or crusher feat's crosshairs.
#

its an execute as GM macro so probably impossible eh?

violet meadow
#

you don't need crosshairs for that one, do you? 5 ft backwards?

vast bane
#

yeah sure!

#

5ft back works

#

but its one of those macros that is run by the gm with advanced macros would that still be possible?

dark canopy
#

not from the GM client, no

#

need the initiator client to select

violet meadow
#

Put that after the ui.notification for the successful shove ```js
//Based on Freeze's example
const knockBackFt = -5;
const knockBackFactor = knockBackFt / canvas.dimensions.distance;
const ray = new Ray(attacker.center, target.center);
const knockbackPixels = knockBackFactor * canvas.grid.size * (Math.abs(1/Math.cos(ray.angle))); //for 5/5/5 grids.
let newCenter = ray.project((ray.distance + knockbackPixels)/ray.distance);
const isAllowedLocation = canvas.effects.visibility.testVisibility({x: newCenter.x, y: newCenter.y}, {object: target}); //might have an issue with going through walls based on some vision settings...
if(!isAllowedLocation) return ChatMessage.create({content: ${targetToken.name} hits a wall});
newCenter = canvas.grid.getSnappedPosition(newCenter.x - target.w / 2, newCenter.y - target.h / 2, 1);
const mutationData = { token: {x: newCenter.x, y: newCenter.y}};
await warpgate.mutate(target.document, mutationData, {}, {permanent: true})

gilded yacht
# hot flower hi, <@378398557050503168> I’m having some issues with the cover calculation and ...

Also check the logs, midi displays what auto cover returns for the percentage of the token visible and compares that to you auto cover settings.
For example

midi-qol | ComputerCoverBonus - For token  Luthar  attacking  Goblin  cover data is  2 
{rawCover: 76, obstructingToken: null, cover: null}
(2) [{…}, {…}]
0: {percent: 25, name: 'Three Quarters Cover', effectData: ActiveEffect5e}
1: {percent: 65, name: 'Half Cover', effectData: ActiveEffect5e}
strong yew
#

I guess as an alternate solution, is there a way to guarantee that they succeed on a saving throw? So it could just never be applied?

violet meadow
violet meadow
strong yew
#

lol I guess saving throw can accept negative values, so I could guarantee that, but also just don't want to prompt for a save

violet meadow
#

The Overtime effect will take care of the save

strong yew
#

Yeah, I added it just to try and test different ways

#

It auto applies the temp effect if no save is defined

#

if you do define a save though, it only applies on a failure

violet meadow
#

That is the way to do it

#

You apply it when the template lands. The issue is that is should delete it if you move out not during your turn too

#

The way these premade AA spells work, is taking into consideration only what happens during the targets round

#

You need to implement additional logic for everything else afaik

strong yew
#

Well on application, it actually ends up like this

#

The passive effect from the aura toggles on and off depending on when they move in and out

#

but the temp effect that gets applied on cast is the problem one

vast bane
strong yew
#

Aura is working as expected. It's just the initial cast that applies on the temp effect on no save/failed save

violet meadow
#

I cannot see the passive one in mine

strong yew
#

hmm. If you don't cast it on a token, and just cast it near one, it should work as expected

#

Just have the other token walk into and out of it and you should see it toggle the aura

vast bane
#

it does apply prone if we transfer the args and run an execute as GM macro

violet meadow
#

oof

vast bane
#

pushing 5ft should still be possible though right cause even though its run as the gm its just pushing 5ft away from the pusher

strong yew
#

Hmm. I'm wondering if I could use something like this to just bypass the request for saves?

#

Or if there's a way to intercept and edit the object and pass it back after scrubbing the targets

violet meadow
#

@vast bane change the whole macro to this and you will not need to pass anything to the GM```js
let results;
const attacker = canvas.tokens.get(args[0].tokenId);
const target = fromUuidSync(args[0].hitTargetUuids[0]).object;
if (target.length > 1) {
ui.notifications.warn("Please select 1 target only");
return;
}
const skilltoberolled = target.actor.system.skills.ath.total < target.actor.system.skills.acr.total ? "acr" : "ath";
results = await game.MonksTokenBar.requestContestedRoll({token:attacker,request:'skill:ath'},{token:target[0],request:skill:${skilltoberolled}},{silent:true, fastForward:false,flavor: ${target.name} tries to resist ${attacker.name}'s shove attempt});

let i=0;
while (results.flags['monks-tokenbar'][token${attacker.id}].passed === "waiting" && i < 30) { //while wait for 30*500 ms for the results to be made available. If in the meantime the 2 opponents don't click on the Monks Tokenbar to roll, it will do nothing.
await new Promise(resolve => setTimeout(resolve, 500))
i++;
}
if (results.flags["monks-tokenbar"][token${attacker.id}].passed === "won") {
if(!game.dfreds.effectInterface.hasEffectApplied('Prone', target.actor.uuid)) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Prone', uuid: target.actor.uuid});
ui.notifications.info(${attacker.name} shoves ${target.name} to the ground)
}
}
else ui.notifications.info(${target.name} resists the shove attempt from ${attacker.name})

violet meadow
strong yew
#

Oh, I thought it would be easy to change it to force success

violet meadow
vast bane
violet meadow
#

Yeah you need to paste that part in 😄

#

You might need to delete the prone effect though, depending on how you want to use it

vast bane
#

pretty sure you did not type the message @violet meadow where is this other macro?

vast bane
#

doesn't work that way though, you can choose to move the token 5 ft or prone them, not both

#

but I just had a crazy idea

violet meadow
#

Oh well do you want a dialog to choose?

vast bane
#

oh do I have a crazy idea lol

#

is there any other more reliable module for multiple bars? other than bar brawl?

violet meadow
#

No idea, never used that anyways

#

Ask around in the mod discussion, more eyes 🤷

vast bane
hot brook
#

Is there a way to add animations to the conditions effects ?

vast bane
#

if you have dfreds CE, you can edit his conditions and add tmfx AE's to them, TMFX is token magic FX module.

#

My man, you are an allstar

violet meadow
#

Oh damn I forgot stuff in...

vast bane
#

I love the accept dialogue, for those rare cases when the terrain is weird

#

hmmmm possible issue with prone stand by

#

yeah its not applying prone, my guess is spelling mistake

#

NEVERMIND lol

#

I forgot about the new TVA setting

#

wow thats gonna get so many people lol

#

great feature, but its totally going to confuse some folks till they get used to hover

orchid folio
#

I have a map with oodles of exploding barrels that react to damage dealt. I'm trying to write a macro I can have in the bar that will call the "Explode" feature on a singleton barrel instance off map, which triggers the placement of a template. How can I get the center of the template in this macro so I can play the animation at the appropriate location? Does Midi pass all tokens within the template to the workflow as I've written it below?

const trapActor = game.actors.getName("Trap: Explosive Barrel APL6");
const trapItem = trapActor.items.getName("Explosive Barrel");

new MidiQOL.TrapWorkflow(trapActor, trapItem, [token]);

Hooks.once("midi-qol.RollComplete", async function(result) {

    new Sequence().wait(100)
    .effect()
        .file("modules/JB2A_DnD5e/Library/Generic/Explosion/Explosion_01_Orange_400x400.webm")
        .atLocation( OMG_WHAT_DO_I_PUT_HERE )
    .play()
});
hot brook
#

I see. I have token magic but now what do I do ?

vast bane
#

dfreds CE mirror illusion is the easiest way to see it in play

strong yew
#

Anyone have experience with hooks?

hot brook
vast bane
# hot brook How do I get access it ?

I don't know your question but if its how to do token magic effects, you are in midi qol, so I assume you have midi, so just put macro.tokenMagic into an effect key

#

I gave you the example in the above image

#

oh yeah now I understand, if you don't have dfreds Convenient effects installed, then you can't add to the conditions effects properly

#

you could technically do this with cub, but I have no clue how to use cub, its like the pepsi to coke, you only use one or the other not both and I never learned it cause it doesn't have good synergy with midi nor all the premades that dfreds has

hot brook
coarse mesa
vast bane
# hot brook

that is neither tokenmagic fx, nor dfreds convenient effects bud

#

although if you have jb2a, you could do persistent on token effects for source actors in there

#

alot more choices than the token magic animations

hot flower
hot flower
#

Targeting situation:

#

Chat message:

spark fossil
#

What does "mwak", "msak", "mpak" mean

#

is it Melee Weapon AttacK, Melee Slash AttacK...?

#

Was thinking about adding in long-limbed handling to utils.ts

#

could you @ me a response please as I should sleep

coarse mesa
#

@spark fossil melee weapon attack, melee spell attack, ranged weapon attack, ranged spell attack

#

mpak isn’t used in 5E, probably from some other system

tranquil cloak
#

how would I get an effect that added an additional weapon damage die to the next attack?

vast bane
#

well the simplest way would be to make an item that you roll to chat that adds an effect that adds damage to the next attack, have its expiration be after 1 damage roll/attack. if you want it all in one thing it would require macros though.

spark fossil
#

@coarse mesa THanks so much. I have added a few lines in to support long-limbed on characters

#

However not quite sure how i branch in git labs

vast bane
#

what do you mean? just change their attacks to 10ft instead of 5

#

wonder if bab would do that

spark fossil
#

ive changed the code so you don't have to do that

#

if (itemData.actionType === "mwak") {
token.item.forEach((i)=>{
if (i.name === "Long-Limbed"){
console.log('Actor is long-limbed, increase range by 5');
range += 5;
break;
}
});

#

just needs to be included around line 1729

#

in utils.js

#

leave that with someone that knows how to use gitlabs or has access 🙂

vast bane
#

heh gonna adversely effect importer bugbears

#

oh nm they don't have it

tranquil cloak
#

flags.midi-qol.grants.advantage.attack this would give all attackers vs a target advantage right?

scarlet gale
#

Yep

vast bane
violet meadow
#

And probably will need to put msak in the test too, as there are bugbears out there who use more evolved attacking abilities than mere crude weapons... 😀🤣

spark fossil
#

Hahaha

spark briar
#

Hey guys, I am trying to make a fear aura, but it doesnt seem to work, any tips?

marsh crescent
#

Perhaps add a hyphen between fear & aura in the effect value (fear-aura)?

spark briar
#

that has been disadviced

strong yew
#

Is there a way to grab and alter the midi workflow, and just scrub any targets and let it continue?

spark briar
#

you can reset the sequencer if you need to remove effects that are bugged

vast bane
vast bane
#

AND it should be OVERRIDE

spark briar
#

the frightened i mean

vast bane
#

pretty sure you put the status as another effect key in the same ae

#

search his readme for "overtime"

#

those are the valid options in effect value for overtime, even if you aren't one to read readmes, this really is the best spot for overtime help

spark briar
vast bane
#

saveremove looks wrong too

#

what excel?

spark briar
spark briar
vast bane
#

the excel document even references the readme for overtimes hehe

spark briar
#

...

vast bane
#

hold person does not have saveremove

#

now I question where where you got your premades

#

This is Hold Person

spark briar
#

sorry, it was spirit guardians

strong yew
#

Thanks, works great

vast bane
# spark briar

the absence is the same thing as true, not needed unless you want false, same goes for a bunch of them

strong yew
#

only thing actually I guess is that it rolls an extra critical dice

#

and I run max crit in my game so it's maxing the extra dice too

vast bane
# spark briar

add your preferred status marker modules entry to the active effect, overtime alone does not accomplish the task. If its frightened you need then macro.cub, macro.ce, or statusEffect in a new key below the overtime one should do the job.

spark briar
#

but now he gets the frightened status, regardless of the save

vast bane
#

who does?

spark briar
#

multiple times sometimes even

spark briar
vast bane
#

yeah honestly, that bug is fixable if you don't use statuseffect, I'm sure someone smarter can chime in but that is a weird interaction with active auras and midi, macro.ce solves that for me but you need dfreds ce handling your status markers

spark briar
#

dfreds ce?

vast bane
#

dfreds convenient effects, its the popular choice for statusmarkers for midi setups

#

due to having a ton of premades and midi synergizes with it

#

if you have cub installed, disable enhanced conditions or they will step on each other

spark briar
#

okay, thanks

#

I think I will remove the condition instead and just get the trigger for the save

vast bane
#

you also don't need the range on the spell, active auras handles that

spark briar
#

yhea, I added it just in case when troubleshooting

vast bane
#

also it sounds liek you are editing an owned item, make sure that pitfall is handled right, your multiples could be because the actor has multiple effects from buggy experiemental owned item editing

spark briar
#

yhea, I just removed all tokens and such and fixed the issue

#

no status

vast bane
#

whats the point of automating if you aren't gonna go all the way though. dfreds CE is a pretty common module to install with active auras and midi qol, has very little if any setup requirements and just lets you use a different key instead of statusEffect

#

and if its cause you use cub, use macro.cub than

spark briar
vast bane
#

k, its just that its like running a marathon and stopping 10 feet from thefinish line. whats the point of automating the aura if it doesn't automate the frightened condition for ya

spark briar
#

because if you set one more foot, you might shatter your leg and never run again?

#

maybe a bit dark 😅

vast bane
#

also not accurate but to each their own.

spark briar
#

but I do appreciate the help though

#

btw, we are more then 10 feet away.
I also need to find a way to stop the triggers if they succeed once.

vast bane
#

if you didn't set a distance in active auras, then it uses your details tab

#

which was set to 20

spark briar
#

i mean, if they succeed on the save one time, they get immunity for 24h

vast bane
#

you could find a similar feature and search here for it and find out how they did it

strong yew
#

ah I can add the damage bonus to critical damage rather than critical dice in bab

vast bane
#

my firs tthought is the ghoul or ghasts aura I forget which one

#

theres also the paladin frighten aura called a different name than "fear aura"

spark briar
#

this one is for the dragonbones golem

spark briar
#

via system.traits.ci.value

vast bane
#

thats not the one I speak of

#

aura of conquest is the one I speak of but its not really an aura bad example

#

You are looking for features that are from older creatures/classes that have a 24 hour immunity

#

so probably stench on the ghast

spark briar
#

well, I ran out of time for today

#

but thank you for the help

vast bane
#

hah, searching for stench, I responded to that person telling them its macro territory too

strong yew
#

So interesting caveat here. I've altered things like hunter's mark and favored foe to use this method, but also have the bab piercer bugbear made on the same character. So when copying options from someone with an extra crit die, it will copy that too. Just in case anyone else runs into it on a character, you can just add another line for delete dmgOptions.criticalBonusDice; before constructing the roll.

unreal vector
#

Does anyone have a working hex macro for v10 they could possibly share?

weary rune
#

how do I reference item name in DAE Effect value? @item.data.name doesn't work and rolldata for item doesn't have item name in it as far as I can find

weary rune
#

status effect label, used @name
then referring to that in macro script generically by "used" + item.data.name so I don't need to edit the macro if I use this on another object

#

I just need to access the item.data from the Effect Value

#

can't get item name from DAE Effect Value as far as I can work out. unless via a midi flag?.
I just used a prefix to match it. "used " + item.data.name in my macro and named the Effect the same as it's Item Name prefixed with "used ".
I had to do this because I have two effects on a Feature, one effect is for the targets under a Square template, the other effect is a "self" effect marker to show I've used a Lair Action with a round countdown and the item itself adds a Template expiry effect (as normal when duration is set). The self Effect never triggers without doing it manually with macro, probably due to the auto handling or targets and template expiry etc

vast bane
#

why do you need an ae to track lair actions?

weary rune
#

because there's no way to track used lair actions?

#

besides the counter 1/3

#

and it puts an icon on the token so it's handy

weary rune
#

now it tracks what I've used. along with placing templates, shooting rays and handling the status effects on restrained targets etc.

dark canopy
#

you can configure actions to consume the legact resource

#

which will decrement their NPC counter of legendary actions

weary rune
#

I guess I gotta add that

#

no wait these are lair actions. they don't track usage

dark canopy
#

lair actions typically dont need to track usage right? they happen on init 20?

weary rune
#

you can't use two in a row and you can't use the same ones until all have been used

#

two in a row only happens at the end of a cycle, abccba not allowed.

#

I'm just setting them to 3 round duration because it's kinda the same thing

strong yew
#

Alright, so I'm running into a bit of a corner. I have Zephyr Strike's effects working, but the conditions are giving me some trouble.

#

Basically trying to get it to prompt the user when they make a mwak or rwak attack to ask if they want to activate the 1 time buff while they have the spell active

vast bane
#

Zephyr strike seems like alot of work to automate for so little

strong yew
#

Got it figured out

#

I need to put ItemMacro.(macroname) for it to call something that's not the main item

#

Also, Zephyr Strike is working now

stoic seal
#

Wanted to ask but would creating a custom damage type with a world script cause problems with midiqol in terms of auto applying damage and resistances?

vast bane
stoic seal
#

Wait midi can do custom damage types?

vast bane
#

oh I guess you still need to make a world script but now midi will handle it

stoic seal
#

Awesome

pine forum
#

looking for a sample world macro format for applying an active effect as a result of an overtime.
non specific example example; say I have a active effect for Symbol covering an area set as an aura
flags.midi-qol.OverTime | Override | turn=start, label=Symbol(Pain), saveAbility=con, saveDC=@attributes.spelldc, saveMagic=true, macro=macro1minIncapacitate
where macro1minIncapacitate (silly name I know) is a world macro for applying the appropriate active effect with the appropriate timing and flags.
I know how to get the format of the effects themselves by building them on items/actors and exporting those. Just need the format of the macro to paste them in on for when a target fails the overtime the macro correctly targets them to apply it onto.

vast bane
#

why does it have to be a macro?

#

just add an additional key that is macro.ce and incapacitate with a duration of 1 minute

#

They would need to be in combat as they walk into it, probably better to do it in effectmacro instead

#

kinda like chris' potion of poison

pine forum
#

I don't use the Convenient Effects module

#

the above is also a non-specific example, there's a few other things I'm looking at doing that as a world macro I'll have control over in a way I already understand, just need to learn the base format to get started

signal kettle
#

anyone know a way to get the magic stone cantrip from XGE working properly with midi/dae/ce?

vast bane
signal kettle
pulsar pawn
#

Anyone got an idea why Midi is no longer applying CE effects on Spells like "Shield"? -> Ready Set Roll is doing fuckerys.

vast bane
#

someone shared it, maybe its on badgers profile or something

vast bane
sudden crane
# pine forum the above is also a non-specific example, there's a few other things I'm looking...

Here is an example of data format for an active effect:

  const effectData = {
    changes: [
      // who is marked
      {
        key: "flags.world.ancestralProtectors.targetUuid",
        mode: CONST.ACTIVE_EFFECT_MODES.OVERRIDE,
        value: targetUuid,
        priority: 20,
      },
    ],

    origin: macroData.sourceItemUuid, //flag the effect as associated to the source item used
    disabled: false,
    duration: { rounds: 1 },
    icon: sourceItem.img,
    label: `${sourceItemName} - Target`,
  };
  await actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
pine forum
#

I'm guessing
await actor.createEmbeddedDocuments("ActiveEffect", [effectData]); is the apply part?

sudden crane
# strong yew So interesting caveat here. I've altered things like hunter's mark and favored f...

Thanks, I looked into the code of dnd5e and here is the list of all the options field used by DamageRoll:
critical
criticalBonusDice
criticalMultiplier
multiplyNumeric
powerfulCritical
criticalBonusDamage
preprocessed
configured

Initially I thought it would be a good idea to keep the same roll options but maybe it would be better to just set critical if that causes to much side efffects

sudden crane
pine forum
#

thankyou, will start playing around with it now get back to playing about with this on the other side of sleep

strong yew
severe mango
#

Trying to craft a Armor of Agathys macro, in the activated item macro I have

const lastArg = args[2];
const spellLevel = args[1];
const message = game.messages.contents.findLast(i=>i.content.includes("<div class=\"dnd5e chat-card item-card midi-qol-item-card\""));
let workflow = MidiQOL.Workflow.getWorkflow(message.flags["midi-qol"].workflowId);
const validAttacks = ["mwak", "msak"];
if (validAttacks.includes(workflow.item?.system?.actionType) && workflow.hitTargets?.has(lastArg.sourceToken) && !workflow.agathysFlag){
 const attackerToken = workflow.token;
 const damageAmount = 5 * spellLevel;
 const damageType = "cold";
 const messageContent = `Armor of Agathys reactive damage: ${damageAmount} (${damageType})`;
 await ChatMessage.create({content: messageContent});
 console.log(attackerToken)
 await MidiQOL.applyTokenDamage( [{type: `${damageType}`, damage: damageAmount}], damageAmount, new Set([attackerToken]), item, new Set(), {forceApply: false});
 workflow.agathysFlag = true;
}
if(lastArg.updates.system.attributes.hp.temp <= 0){
 const effectId = lastArg.sourceActor.effects.find(eff => eff.label === "Armor of Agathys").id;
 await MidiQOL.socket().executeAsGM("removeEffects", { actorUuid: lastArg.actorUuid, effects: [effectId]});
}```
everything seems to work but no errors into console and no damage applied to the token that attacked me
strong yew
#

Alright, Zephyr strike is fully working if anyone wants it. Going to look at some other troublesome ones