#MidiQOL
1 messages · Page 35 of 1
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
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
@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.
Oh awesome thank you!
maybe this is a dumb question. But how do I import that macro? I only see a create macro button
You import the item fvtt-Item-next-attack-half-damage.json from above.
You copy paste the macro in one of yours
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
That target will need to update its Resource 1, based on damage absorbed ?
It is something like Arcane Ward?
Arcane Ward Item in MidiQOL sample items compendium will be a good example
I'll take a look
@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
}
I'm quite a newb here, but I feel like your activation condition is not complete, it looks like you took half of a mace of disruptions condition, look at the end of the maces
nm you have includes in there
I see a data in the macro
The issue is that you have 0 as damage.
Either use 0d1 in the damage field or add in the macro```js
if (!roll.terms[0].faces) return;
after the `const roll = args[0].damageRoll;`
Thank you! Added the line and it worked like a charm
But still if you are on v10, needs some updating to be future proof
Yep, v10. Foundry 288, 5e 2.0.3
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;
Tested, works fine
ok the condition applies on hit and expires like I want. But it still doesn't half the damage automatically. (I can just manually half it and use the condition to remind me to do that. But it would be nice if it just happens)
The name of the macro is not correct. Needs to match the one in the Effect Value of the DAE.
The macro name should be nextAttackDamageReduction as things now are
ah ha! I get it now. Ok cool. That worked. Thank you very much! I really appreciate your help!
I would not have been able to code that macro on my own.
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
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.
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
I ran into this same issue, I ended not placing the roller within the effect, but just @damage
Can anyone tell me how to make the effected token roll 4d6 fire damage when they fail the dex save on this immolation effect?
you pasted too much of whatever your source was
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
yea
not sure how to add that after. My macro and js skills are basically replacing words form other peoples work
https://gitlab.com/tposney/midi-qol/-/blob/fc343162c0dd2e16946d3b6d6875c8478bafebfd/README.md
Search on the page for "overtime" its really the best source for how to make these
okay. I'll take a look!
I know some folks shrug off readme,s but that genuinely is the best source for overtime options
I got it working! Thanks!
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?
just put the special phrase in the description for auto fail friendly
I forget what it is but readme should have it
oh, didn't know there was such a thing. that seems way easier, thanks
Thanks worked as a decent base
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)
I'm seeing this q a lot. I wonder if we could request it as one of the buttons along the bottom of Details tab
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;
Oh sick! Thanks for looking at it
If you do get a chance and are in there anyway, could you add minConcentrationSave if it's a simple one? use case is for Starry Form Druid getting min10 on con saves while in the form
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
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
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
that is weird and yeah @token is the caster, not the target
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.
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
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"
@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)
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?
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?
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
I know Tim has a fix in .23 for overtime, but I thought it was something introduced in .22
But it basically rolls the save, then rolls the damage again, prompting another save over and over
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
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
go the monk
then you can also use the nice contested roll shove/grapple etc macro that's been brought up a lot lately
just disabled monk and tried lmrtfy again and yeah it's the problem
constantly redoes the damage over and over
I haven't even heard lmrtfy mentioned for a while in here, you might be the first to notice it
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
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
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
oh that's nice actually
is it an npc casting it?
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
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
Nice
Aside from figuring out how to give shapechangers disadvantage
Pretty much all shapechangers have a feature literally called Shapchanger
just look for that on the target
oh thats gonna tingle a few gurus to try and make
Oh? interesting
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"
but it would have to be in a macro cause its attached alongside another ae that doesn't hinge on that
That could trigger only twice right? once at the start, and once if they leave then reenter
Yea stuff like that gets complicated
I got it worked out in my cloudkill template macro
but it was a lot of work
Yeah I think there's some logic built into crusher that handles whether or not it's been used by setting a flag
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
How does it handle overlapping moon beams?
hmm. I will have to check that
It's basically just spirit guardians, but I put it on a template
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.
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
It's unlikely they'll do it because of that rule
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
But it can happen
isn't the overlapping spells rule a xge thing anyway?
xge's is not the one you speak of my bad
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
This is a big one for our group. A lot of forced movement in our builds this campaign. @violet meadow has been working on a SG implementation that does it properly, but it uses Template Macros and Token Attacher 
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
I'd reverse the damage when things rarely got wonky
The last para is the important bit
While undoing damage is easy enough, it's nice when you don't have to worry about it
Foundry Ctrl+Z
if only you could ctrl + z your way back through a midi workflow lol
I understand, I just don't see that scenario happening (alot) and the solution is just a mouse click
Ok say you do damage to someone that's concentrating on a spell and they do their con save and fail
the spell drops
I'd say just close the MTB request for the save, but I recently learned that has adverse effects in your session
you can still undo the damage
but having to recast the spell is annoying
plus the time would be wrong
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
If you have MTB for saves you can just +20 the save
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?
What does a weapon have to do with moonbeam?
or if you aren't fast forwarding like me, you can +20 with any module setup
This is what I pulled from midi spirit guardians. I believe it creates a weapon to then be rolled
yeah you actually need to tandem auras imo unless you wanna get dirty with it
There's an overtime effect for the start turn thing
but you can't do two overtime effects in the same ae can you?
but I think this is done on the "first entry"
MidiQOL.doOverTimeEffect(token.actor, effect, true);
You can manually trigger an overtime effect
I believe one of the midi samples does first entry properly... cloudkill maybe?
No need to complicate it with a temp weapon
Or I might be thinking of mr primate's version 🤔
wait I'm confused here. The overtime effects aren't named are they?
If you have two on one effect how do you call them?
Or do I create a separate AE entirely for it?
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
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
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
you have DDB importer? check Mr Primate's cloudkill itemMacro – it scares me but does pretty much that I believe
Yep, used it many times on my players, they keep falling for that one.
No, keep that
Only issue now is that it applies turn start and args[0] === on at the start of a turn
so it does damage twice
How are you triggering it?
if (args[0] === "on" && lastArg.tokenId === game.combat?.current.tokenId)
Again just pulled from the spirit guardians one
in an item macro?
yeah
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
the what now?
Let me go look at your cloudkill lol
he's talking about the module Template Macro
If you're not using that module
Oh, no sorry I don't think I'm using that
Oh gotcha
I'd look at the ddb importer version of cloudkill then
See how it handles first time enter
Should I just get template macro?
I'll check it out, does it conflict with the other stuff I'm using?
you can still keep everything on the spell item with TM right?
Yep
nothing to lose then 🙂
it's when you get into world script territory I nope out
too many things to keep track of
Midi worldscripts at least can be done with the world scripter module
So with this new strategy
Is there a way to insert disadvantage to the overtime effect?
Create an OT in one effect and the disadvantage key in the same effect. When OT is removed, so is the disadvantage
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
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
Not worth automating yea
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
fair enough
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
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
Only really an issue if you use fast rolling
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
Hmm. the way this reads seems like it's really only activatable once per turn
yeah anyone's turn
and also the clarification makes it seem like the logic I'm currently using can't cover it
I'm using it quite a bit: repelling blast, crusher, telekinetic
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?
Correct... it's a tricky one. I think bugbear had it working but using Template Macro
I mean, I think if I just use a flag per turn like was mentioned before, that'd probably work
He also had it working without by using some crazy reading stuff from the chat log shenanigans but gave up on that for TM
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
That's fantastic
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?
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
Turn is each character within a round. Like everyone has a 'turn' before the round is over
Oh wait! It's cause I still have the logic in there that looks for the character's turn
I find it confusing too because when I started playing D&D 'turn' meant ten rounds
Ugh, this one is hard
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
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
Why would it be setting people to prone?
as for random disadvantage, nothings random, whats the active effect being applied to them
no this is absolutely not easy to manage in combat, something is completely breaking
none?
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
Is your aura of protection using build a bonus or AA?
ok well give us some errors in the console to work with, maybe a snippet of what the canvas loooks like
I think you mean active auras, which I hae and appears to be up to date
theres no active effects on the guy getting random disadvantage? that kinda smells of actor on use shenanigans
Is your Aura of Protection being handled with Active Auras or build a bonus
is that saying emboldening bond (from MIDI) is breaking?
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
I don't know what that means
uninstall ASE
did you carry over v9 emboldening bond and not redrag out the new one?
no
That's out of date, but unlikely related
ASE is very likely the culprit
I didn't use ASE on that
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
what do you mean dead
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
why would a map break defensive duelist
I have no clue, but it shows that something is using the same icon as prone but its not prone
Not sure what you mean, but it's pretty clear you have outdated macros running
anyone here have a Channel Divinity: Twilight Sanctuary Active Aura or macro?
is ASE a concentration handler?
I do, gimme a moment
Sweet
no MIDI is set to do that
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
did you add it via an importer
Midi compendium must be out of date then lol
well redrag and try the new one?
aight, weird question. Spirit Guardians has a CE effect associated, and that gets applied as soon as someone enters the field
show us the description of emboldening bond that will tell us how old it was
come to think of it I think aura of protection was from MIDI, though it has 3 confusing listings
you rockin some new kinda setup?
Nah, it's in CE. I didn't put it in there
or did you forget to disable mid+defreds for premades
I don't think so
what item
Do you have warpgate and use CE?
I do not see anything about midi's spirit guardians that calls dfreds, you likely have the midi setting on where dfreds applies first
Yes I do
Do you have effect macros too?
Yeh
I don't really think emboldening bond is automateable
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.
I handle emboldening bond via advantage reminder
Make sure the active effect is an active aura.
Let me know if you need me to screenshot the DAE options.
Can you export a token with the ability? won't that work
But just send me it, trying to get more into automation with 5E
You'll need to replace the description back in.
Actually hold on
There
Let me know if you run into issues
Then just add the Item Macro onto the item right?
Ohh
The export should have it 100% setup to go
Gotcha gotcha testing time, thanks a million
You'll likely need to relink the resource usage to use your channel divinity
But that's for any import you do
token.document.setFlag('world', `spell.cloudkill.${template.id}.turn`, combatTurn);
@scarlet gale is this flag just arbitrarily named? Or is this something specific
When I set up a test encounter, it does not add the temp HP to the other actors not sure what I'm doing wrong here
Could I just set a flag with spell.moonbeam.turn or something?
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
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?
you pag returned the js
Oh I think there was a space after it
So basically, I thought this should equate correctly to only do damage once a turn
is your macro running on turn start?
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
On Combat Turn Starting right?
There might be a bug
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
One sec
Yes, there is a Syntax error
screenshot it
interesting. This shouldn't be equating to true
if (tokenTurn != combatTurn) doDamage = true;
that's the logged tokenTurn and combatTurn
is the default of doDamage true?
That was just a code snippet
Are you on v10?
Yes
Does the character have any cleric levels?
Ah, thats the issue checking it now sec
Thanks, I'm missing simple things now my bad
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
That fixed it, thank you very much.
On your spirit guardians, does it put an icon on the creature entering?
Or is that just CE on mine?
Are most of your spells/Items on your github?
show me the bottom 1/3 of your spirit guardians spells details
yea, I'm currently in the process of updating a ton of them from v9 to v10
But everything on there is v10
for disable CE?
correct, you should disable it
unless your custom spirit guardians relies upon dfreds ce
the v9 and v10 sg does not
least the ones that midi gives us
This is straight from midi samples no changes
you didn't share the bottom 1/3 fwiw
This is the end of it
hmm
doesn't the bottom part only show if you change action type to something?
yeah
just from the midi sample library
fwiw it doesn't look like the CE has anything on it, it's just visual seems like
I think the problem is he did not have dfreds when making the samples, so he can't set the flag
Is there anything potentially troublesome about it being on?
it will mislead you to think its doubling
I kind of do prefer the icon showing up on the creature entering the aura for clarity
if you ever set up a macro for Giants Might for the Rune Knight hit me up, and thank you very much for the cleric macro
So on my moonbeam macro right now, I have an active effect, and it toggles on and off on entry, but it doesn't show an icon on the creature
Was thinking the difference on that was that SG has a CE that's getting matched
Is that a wrong assumption?
The DDB importer has a giant's might automation that works well.
The icon won't show up unless it's a temp effect. Give it a duration.
or force show
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
all dfreds CE's have the force show field checked
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
happens with newest SG in midi sample?
This is dfreds CE version, that is your own version
unless you duplicated as custom, you can't edit it in the menu
I duplicated as custom yeah
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
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"
but the user would also need to have that setting on in midi
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
thats not how that feature works
midi+dfreds only work together automatically on spell casts item rolls.
anything else, thats on you to program in your automation macros
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
are you sure its applying dfreds ce, cause my v10 sample item is not
its applying a special SG though
May not be Dfreds but has an icon yeah
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
show the duration tab
that would be why bud, no duration
I am getting this error with spirit guardians v10 sample item:
It is preventing animations from playing
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
the magic is in the macro
oh actually no, its in the template thing
you have no duration set in moonbeams details
you keep dwelling on this ce thing
Yeah sorry, just getting kind of mixed up where everything is
on moonbeam
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
Well, spirit guardians works as expected
it applies the icon and everything
that's where my confusion was coming from
is automated animations killing the template in moonbeam?
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
is anyone else experiencing an error with spirit guardians from newest midi with active auras?
I don't seem to be. I'm on midi 10.0.20 and aura 0.4.24 I think
Active auras is 0.5.2
FWIW isn’t there an option on the Auras tab to display icon on the target?
@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
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
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
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?
didn't he just add custom damage type support, whats the world script for?
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
oh sorry, the mention of support for it in midi is v10 only
oh well... is there another way to do what I'm looking for?
You can’t change the attack rolled on a reaction, because it is called after the attack was rolled, but it can turn a hit into a miss
You would need a manual reaction that the player would activate before the attack is triggered
I think it would still fail on nat 20's though wouldn't it?
Did you read the change log about it, it seems that there are 2 config that can be modified.
https://gitlab.com/tposney/midi-qol/-/blob/v10/Changelog.md#anchor-10021
But doesn't something like the shield spell basically do the same? It could also turn a hit into a miss by adding to the AC
By that time the attackRoll has been registered, but the evaluation of whether it actually hits or misses is not done yet.
So the Shield can change the AC of the target to "make" the attack miss.
But you cannot force it re-roll another attack Roll as this stage has already finished.
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
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?
I'm guessing this is for Silvery Barbs?
the new version of the lucky feat from One DnD
can you post a short description?
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.
So can you actually see the result of the d20 and decide afterwards?
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
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.
@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
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...).
@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?
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
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
@past spade
You can use a socket to call completeItemUse in MidiQOL
I've dug into this before for Silvery Barbs, you'll have to implement or find a module that can do sockets to do this.
Otherwise there is the requestor module that allows to show a dialog on an another user browser
the lines of code here are the same thing that is being done by the world script. I still wanna try it that way if it somehow fixes flag integration but yeah.
I would like to edit the config but I can't seem to find CONFIG.DND5E.damageTypes (Sorry no development experience and my folder doesn't have a file containing this line of code)
If you open a console (F12), if you type CONFIG.DND5E.damageTypes what does it display?
You should have an array of damage types
Yes, but I cant edit it or see the full code displayed like in the changelog
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);
To add another type you just need to type something like this:
CONFIG.DND5E.damageTypes["mydamage"]= "My Custom Damage";
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 🥲
so looking through the discord history, it seems like abilities like warding flare are not currently supported right?
imposing disadvantage after a roll?
I think it was only applying on a failed save in that case, which was making things weird with the start of turn stuff if the status was not present
Ah, I'm on MrPrimate's I guess
It's the same rules as moonbeam right?
Is there a list of available activation conditions? I had to pretty much guess how to setup a slayer weapon with the gitlab example.
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
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.
Probably. I am validating now that is working and sharin
Cool. looking forward to seeing your approach. I've been trying my best for a couple days
@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.
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) 🤔
Wow this seems to be working exactly as I'd expect it to
I'll have to dissect what you're doing and edit mine
That one is using Effect Macro to circumvent the issue I mentioned in the post above.
Wait but I don't have Effect Macro installed I just realized
Maybe I haven't tested the case for that I guess
Effect Macro is so powerful it doesn’t even need to be installed 😆
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
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
Once per turn, no matter what!
way*
That is how I read it 😄
If they start their turn in it OR enter for the first time
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
you would be damaged if you stayed on the "fire" for a full turn 🤷
They’re just cutting you a little slack I guess
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
yeah cause its the first time on a turn ...
I know it's for balance sake, but it's just very odd
You can only ‘burn’ so much in one turn
Its... kinda stupid but 😄
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
yeah I guess this is just how I'll have to reason it. That makes a kind of sense I guess
I mean even now we are scratching the bottom of the barrel. It's the edge case of an edge case...
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
What are your settings on the first page of the AE config?
actually it only works when I target myself and click the Apply Active Effects button in the chat card
Ah ok so you don’t have effects being auto applied in midi at all
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
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
I've also got it to work on bladesinging
Check your midi workflow settings and see if effects are being applied for things that aren’t CEs
This one?
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
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
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
So, when I pass @token in for an AE parameter, sometimes it finds the value and sometimes it doesn't
Yeah, I'm mostly doing this for fancy sequencer effects haha
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
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)
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
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.
No probs. If there’s a save it typically won’t apply the effect unless the save is failed
Got everything working nice and smoothly after getting rid of the saving throw, thanks again 
Time to melt some GPUs with excessive amounts of visual effects
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
@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 🤣
yeah well I want babonus 
the dex bonus to saves is only if they are the only target
yeah
the super save is only when a shield is equipped
ugh, don't make me look up feats...
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.
"against a spell or other harmful effect that targets only you."
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.
Yeh buddy that's out of scope for babonus 👋
I use advantage reminder personally
Yep.
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
Exactly. You add the (babonus) shield ac bonus to dex save only when the attack is only against you 😄
🤣 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!
Can I post longer scripts here (56 lines) or should I use pastebin?
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
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
Nice one!
I have included that same playerForActor function from MidiQOL in a world script too. Quite useful 😄
yeah, I deleted a few lines because it gave me inactive players, but other than that it's really neat!
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! 😅
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 😁
I just never finish the attack and reroll
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.
I honestly wonder with the amount of automation prompts you guys get, that if you really are reducing the popout counts or not hehe
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
What are you trying to do
When and where should the AE be applied?
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
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?
can you confirm version numbers of midi, levels and levels auto over?
Moonbeam. The problem can be replicated by just using the example moonbeam in the Auras compendium
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
why are targets not wanting to be hit by it?
oh are you still trying to do the shapechanger part?
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
I see that with a few active aura premades, I dunno what setting it is that stops that
some remove when you walk out, others do not
its beyond my paygrade
If they leave on their turn it drops.
darkness from active auras compendium suffers from this, and changing the key to macro.ce fixes it, no idea why
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
maybe make the ae in dfreds, then you can use macro.ce in moonbeam
I guess that's a possibility. Was hoping to be able to share it pretty easily without much setup though
if you got free time combine crusher feats movement crosshairs with shieldmaster skill challenge macro 8)
have it prompt if the user wants to prone or move them 8)
@strong yew https://github.com/MrPrimate/ddb-importer/blob/main/macros/spells/moonbeam.js
nvm wrong thing... 
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
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?
you don't need crosshairs for that one, do you? 5 ft backwards?
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?
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})
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}
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?
This isn't supposed to run with an execute as GM. Just from the client
Wait cause I think there are 2 issues now.
Moonbeam should not have a saving throw defined
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
The Overtime effect will take care of the save
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
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
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
its v9 carried over to v10 /shrug
Aura is working as expected. It's just the initial cast that applies on the temp effect on no save/failed save
I cannot see the passive one in mine
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
fyi, I tested on a player, with the shield bash macro on the item as an item macro, it does not apply prone.
it does apply prone if we transfer the args and run an execute as GM macro
oof
pushing 5ft should still be possible though right cause even though its run as the gm its just pushing 5ft away from the pusher
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
@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})
This would force fail the save so it might be fine.
Too tired now to think clearly, so I might need to come back to that at some other point 😅
Oh, I thought it would be easy to change it to force success
after active effects?
Yeah
k that works, no push though
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
pretty sure you did not type the message @violet meadow where is this other macro?
Here @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
Oh well do you want a dialog to choose?
oh do I have a crazy idea lol
is there any other more reliable module for multiple bars? other than bar brawl?
I did want a dialog but its nbd if its too much hassle, he rarely pushes them anyway
Is there a way to add animations to the conditions effects ?
yes, however I found them to add significant lag to the system and were highly distracting
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
ermergerd bugbear, this thing is sexy
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
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()
});
I see. I have token magic but now what do I do ?
Anyone have experience with hooks?
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
Not so bad in combat, keep one eye on the tracker
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
Levels auto cover is 1.5, levels is 3.5.3, and midi is 10.0.22
Here’s what I see:
Targeting situation:
Chat message:
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
@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
how would I get an effect that added an additional weapon damage die to the next attack?
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.
@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
what do you mean? just change their attacks to 10ft instead of 5
wonder if bab would do that
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 🙂
flags.midi-qol.grants.advantage.attack this would give all attackers vs a target advantage right?
Yep
as long as they don't have any disadvantages
You could also use it as a feature that adds an onUse actor macro executing during the preItemRoll phase too, so that it doesn't need to actually modify module's files
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... 😀🤣
Hahaha
Perhaps add a hyphen between fear & aura in the effect value (fear-aura)?
that has been disadviced
Is there a way to grab and alter the midi workflow, and just scrub any targets and let it continue?
you can reset the sequencer if you need to remove effects that are bugged
I can't tell, is he accounting for the meme for bugbears? They only get the range increase on their turn.
I cant seem to get the effect on
the frightened i mean
status= is wrong, are you not looking to the readme?
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
I was looking amount the excel 😅
Sheet1
PURPOSE,VARIABLE TO MODIFY,Flag Type,COMMENTS
Target Gains ADV/DIS,Can substitute ".disadvantage." for ".advantage."
Multiple Types - ALL,flags.midi-qol.advantage.all ,Activation Condition,All attack/damage/saves/checks/skill/deathSaves rolls have advantage
Attacks - ALL,flags.midi-qol.ad...
I stole that from the hold person thingy
the excel document even references the readme for overtimes hehe
hold person does not have saveremove
now I question where where you got your premades
This is Hold Person
Hey bugbear, so I finally got around to testing this while waiting taking a break from moonbeam
Thanks, works great
the absence is the same thing as true, not needed unless you want false, same goes for a bunch of them
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
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.
but now he gets the frightened status, regardless of the save
who does?
multiple times sometimes even
the gazer i put in the radius
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
dfreds ce?
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
okay, thanks
I think I will remove the condition instead and just get the trigger for the save
you also don't need the range on the spell, active auras handles that
yhea, I added it just in case when troubleshooting
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
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
the reason Im not doing it, is because I dont want to overload my brain with all the new stuff. I had Midi over a year ago, but never got into it because I combined it with 20 other features
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
because if you set one more foot, you might shatter your leg and never run again?
maybe a bit dark 😅
also not accurate but to each their own.
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.
if you didn't set a distance in active auras, then it uses your details tab
which was set to 20
that is working correctly
i mean, if they succeed on the save one time, they get immunity for 24h
that is macro territory
you could find a similar feature and search here for it and find out how they did it
ah I can add the damage bonus to critical damage rather than critical dice in bab
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"
this one is for the dragonbones golem
aura of courage gives immunity.
via system.traits.ci.value
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
hah, searching for stench, I responded to that person telling them its macro territory too
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.
Does anyone have a working hex macro for v10 they could possibly share?
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
what is your use case
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
why do you need an ae to track lair actions?
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
now it tracks what I've used. along with placing templates, shooting rays and handling the status effects on restrained targets etc.
you can configure actions to consume the legact resource
which will decrement their NPC counter of legendary actions
lair actions typically dont need to track usage right? they happen on init 20?
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
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
Zephyr strike seems like alot of work to automate for so little
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
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?
if you are on v10 I'm pretty sure there are now keys for that in midi, no need for scripts as long as you put the flavors in right
Wait midi can do custom damage types?
oh I guess you still need to make a world script but now midi will handle it
Awesome
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.
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
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
anyone know a way to get the magic stone cantrip from XGE working properly with midi/dae/ce?
pretty sure thats in the warpgate wiki built for midi even.
hmm. I had a look and there's a template for sunbeam that does something similar but with much more going on https://github.com/trioderegion/warpgate/wiki/Sunbeam
Anyone got an idea why Midi is no longer applying CE effects on Spells like "Shield"? -> Ready Set Roll is doing fuckerys.
someone shared it, maybe its on badgers profile or something
ready set roll should never run with midi, thats the mistake
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]);
is this the macro format for applying it though?
I'm guessing
await actor.createEmbeddedDocuments("ActiveEffect", [effectData]); is the apply part?
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
Yes, this code creates an active effect on the actor, and it will be applied
thankyou, will start playing around with it now get back to playing about with this on the other side of sleep
Oh, it's still good to do in my case. In the original it would just roll 2 dice on a crit, but I run max crit dice in my game so doing it your way actually does the 1dx + 1dxminx
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
Alright, Zephyr strike is fully working if anyone wants it. Going to look at some other troublesome ones