#MidiQOL
1 messages Β· Page 40 of 1
It used to do a lot of stuff, but then it got split into other modules. Now, when people install it, it just installs other modules instead. You can safely delete it. As per the above image, it literally has no code in it. Not a single script file.
technically it might actuallly be a dependency guys, cause half their list is obsolete
it wasn't ... i just disable it, and still not working
I'm not saying to save it, just pointing out that they might actually have an old module that says its needed
ty for the information.. i'll do that
Follow Moto's troubleshooting steps. Disable all but the 4 you need to test the issue.
i'll do this
I did it...
Disabled all modules
actvate just then both
and
still not work..
maybe this is something with these two modules
some conflict in V10
because they worked fine in v9 together
i was using then
I am not the first... hawehaehaeh
both i mean.. midi + Token Action HUD
wouldn't having socketlib off not have keys work lol?
you need midiqol, socketlib, libwrapper, and token action hud enabled for a true test
i did it
what version of foundry are you on?
Thanks for testing the new foundry for the rest of us I guess 8)
hahaha
post to that issue the other guy said, note that its a 291 bug
haha
I was testing
it's not my "main"
I have another in orcale cloud
but i wat to change
so i'm testing finding a way to make it work fine on V10
and i Finally will up to date
hahaha
hey there! I'm trying to use one of Crymic's macros https://gitlab.com/crymic/foundry-vtt-macros/-/blob/8.x/5e/Classes/Paladin/Harness Divine Power.js with Midi and everything seems to be working out until I select the spellslot to recover in the dialogue, then I get this error:
VM110953:57 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'spells')
[Detected 1 package: midi-qol]
at spell_refund (eval at callMacro (workflow.js:1591:15), <anonymous>:57:21)
at Object.callback (eval at callMacro (workflow.js:1591:15), <anonymous>:39:21)
at Dialog.submit (foundry.js:55937:35)
at Dialog._onClickButton (foundry.js:55866:10)
at HTMLButtonElement.dispatch (jquery.min.js:2:43064)
at y.handle (jquery.min.js:2:41048)
spell_refund @ VM110953:57
callback @ VM110953:39
submit @ foundry.js:55937
_onClickButton @ foundry.js:55866
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
not sure if it's caused by the data structure being different now that I see that 8.x
actor_data.data.spells[${slot}].value = actor_data.data.spells[${slot}].value + 1; could be the problem actually :v
Macro's outdated, my dude.
I have one as well, updated for v10, on the repo if you want
but I use midi π€£ will yours crash my world @molten solar?
old. There's a newer version here https://www.patreon.com/posts/harness-divine-53855097
This one will not. π
Macro writer faceoff
(I ended up fixing the above macro for v10 and learning some of the new data structure in the process, but thanks for all the links β€οΈ )
do you have a world script for that?
mmm weird, both the v10 crymic one and yours return this error in this world (but not in the test world for some reason, both are dnd5e system)
Uncaught (in promise) TypeError: actor.getActiveTokens is not a function
[Detected 2 packages: midi-qol, system:dnd5e]
at getSpeaker (utils.js:1831:17)
at Item5e.wrappedDisplayCard (itemhandling.js:1454:12)
at async Item5e.use (item.mjs:826:22)
at async Item5e.doItemUse (itemhandling.js:255:15)
I no longer use this
midi on use, just go from token upwards from the workflow
My macro doesn't call getActiveTokens, it has no reason to.
yeah sorry when I say "v10" I meant I've updated your v8 macro from above to use the new data structure. It works fine in the test world but not here. I have midi set up differently (here it defaults to consume resources, in the test world it doesn't)
and yeah, neither macro seems to be using that, it's...weird
both work in the test world and fail with this error in the "actual" world
so weird
MidiQOL version?
10.0.15, but it's the same in both worlds
I would imagine that this first checkbox is different in one of the worlds? In Misc settings
the only difference I can think of is midi config
But update to .23 and it will be fixed afaik
I guess you are using it from the character sheet without a token on the scene?
mmm it seems to be checked in the test world as well
I think we have a winner
Yeah last version (or even a couple of previous ones) has a fix
bingo!
ah nice, I'll update just in case. I'm always wary of updating this big modules cause I don't want to run into new issues lol
Is there a way to do the halfling Brave (advantage on saving throws vs. frightened) automatically? π€
I handle this in advantage reminder but obviously can't work with fast forward
Ah, that's too bad.
could probably prompt a save if the character gains the frightened condition vs the sources dc again
but it wouldn't be able to tell if you had advantage on the first attempt
nod Something to think about
- Added effects (the source actors effects) to the available data in evaluating conditions, so a condition could be
flags.midi-qol.disadvantage.attack.all CUSTOM effects.some(ef=>ef.label==="Restrained")
Pro-tip: Always read the update notes in #package-releases
And a protip for Bugbear. Try to read the msg through
wait....so advantage flags are no longer 0 and 1, they can be an equation?
They can nowadays evaluate an expression to be true or false and apply accordingly
0/1 are fine too for blanket effects
So the example above could be changed to frightened and advantage?
is the effect value source or target?
I didn't read the initial question correctly.
The effects are the source actor's effects.
So the example equals to, if you are restrained you have disadvantage to all attack rolls
I have a pretty simple system that uses a worldscript hook if you want it.
However it's only setup to work with effects that use macro.CE to apply status effects.
Any actor that should have resistance just needs a flag set on them (such as with DAE) similar to this:
flags.world.CR.conditionName | Overwrite | 1
is there an easy way to have an attack modify a resource value on the target of the attack? In this case, I have a resource called contamination and I want to use the amount of damage certain attacks do to increase that value up to the max
Could contamination be a condition and then use BABonus for the attacks recognising it?
when you say a condition what do you mean?
in 5e terms? Or in the sense of a logic conditional block?
Is it a specific attack? Or all attacks against that target?
no it's attacker based, IE: certain attacks on certain monsters inflict this
I can add the Item Macro formula to the relevant attacks or w/e
So would something for frightened be flags.midi-qol.advantage.ability.save.all | CUSTOM | effects.some(ef=>ef.label==="Frightened") ?
To grant advantage on saves vs. frightened
Nope that will not work. I had misread your question hence the small edit below that comment π
Ah, oh well π
You need to go with Chris' way
nod I'm not the DM of this particular game; is there a way to package it as part of a macro instead of a world script? π€
I don't suppose there's an "if feature applies/description contains [condition]" flag/operator? Heh
Not really, the client is the one that does all the workflow logic, everyone needs to be running the script.
This can be pretty easily done with the World-Scripter module.
Ah, I see; would it work if it was a global script and I ran it manually every time? Or does everyone need to run it?
Pretty much any time someone triggers the midi workflow, it runs this script.
The script does some filtering to stop processing when it's not needed, so it shouldn't have a noticeable impact or delay.
Gotcha
Pretty much, it checks if whatever ability is being used has a CE effect tied to it and then checks if any of the targets making the save should get advantage from a flag you set on them.
Setting up an actor to get advantage is a simple as having DAE apply the flag as an "On Equip" effect.
Seems very simple; hopefully I can convince the DM to install world scripter in that case π
Technically it can be done as a regular world script, but world scripter makes it pretty easy add and remove stuff like this
Since it's just a matter of adding / removing the macro from a compendium and reloading the page.
Is there a way to set a damage type to heal one specific character? As in any necrotic damage heals instead of damages.
flags.midi-qol.absorption.damageType
Thanks
Reference doc is here if you need it:
https://gitlab.com/tposney/midi-qol/-/tree/v10#flagsmidi-qol
It covers all the flags and what they do (mostly).
Thanks, I'll look it over once I get my numbers calculated and am ready to set them. π
When that flag is set, then the immunity doesn't need to be declared as well, correct?
Or rather, shouldn't.
Immunity is already taken care of on the character sheet.
I think it shouldn't already apply the effect if they're immune
Let me double check
It changes based upon campaign circumstances, so should I be setting it together with this flag or not?
Thanks π
Also, is it possible to halve the incoming damage as healing?
In my setup it looks like something removes the condition already when they're set to immune
I think it's CE doing that, but I don't actually know.
Ok, so don't set immune with the flag.
You could do an After Active Effects actor onUse macro. Something like ```js
const targetActor = args[0].hitTargets[0]?.actor;
if (!targetActor) return;
const key = Object.keys(targetActor.system.resources).find(key => targetActor.system.resources[key].label === "Contamination")
if (!key) return;
const {appliedDamage} = args[0].damageList[0];
let copyResources = duplicate(targetActor.system.resources)
let {value,max} = copyResources[key]
value = Math.min(value + appliedDamage, max)
copyResources[key].value = value;
await targetActor.update({'system.resources':copyResources})
So if the attacker hits a target which has a Resource named Contamination, it will add the applied damage to the value of that resource, up to the max.
Just realized you were talking about the damage absorption. I don't think that flag sets them immune as well. So you'll either want to do that as another thing in the effect or on the character sheet if they're just always immune.
Ok
Is it possible to adjust the effectiveness of healing potions?
Like, per person?
Or just the item in general? Because you can just edit the healing roll in the item.
For this character.
They need to heal more effectively?
One of my players came up with an undead toon, so I am adjusting how things work based upon how undead they are.
Oh interesting
From heal 100% to damage 200%
It becomes poison at the extreme.
This is worldscript territory.
I have all the code for adjusting them in a module, so that would work as well, right?
Ok, so "hooks" territory... π
It won't cover everything, but you can hook midi-qol.preDamageRollComplete and do some crazy filtering to modify healing rolls.
I do something similar for pact of the chain here.
Check if the target is that specific actor, and if so change the damage formula.
Keep in mind it'll only catch stuff done via midi workflows
That is good enough. I'll check with a potion at some point to verify.
@scarlet stump small edit to the macro to be a bit more readable
seems good, resource should always be tertiary so I can streamline that. So this only works for the attack(s) that call this macro in the on Use line, right?
You can use that as an Actor onUse macro.
So you can affect all attacks of the specific attacker
ah but I actually only want some of them to do this
like certain spells or attacks
OK either filter them in the actor onUse or add that only to the Items as onUse
Depending on how many they are
awesome I'll give it a go asap!
You can filter specific attacks "mwak","msak" etc
do I need to change the syntax if I use it as an Items onUse macro?
nope same
mmm it's not applying the contamination, but I don't see errors in console. Does Midi have bad interactions with this macro?
Let me double check that I didn't do an oopsie
Did you run it After Active Effects?
yeah
I see a bunch of warnings for the data structure in between This is an updateActor hook in the console when the attack hits
I wonder if the problem is that I have not enabled damage to be applied automatically with midi on player characters
let me change that EDIT: it made no difference, reverting
give me 2 cause I am in the middle of 2 things π
Needs appliedDamage instead of damageApplied too... 
Yeah the edited one should do it
awesome, it works!
I'll just add a chat message to notify the players, thanks again @violet meadow !
π₯³
That was just me messing around with Custom CSS module. Iβm reasonably happy with it now but doesnβt really solve the issue because it still spawns in the position as if it was as wide as before lol
π
it's interesting cause in case of a crit, the contamination added is only the base value and not the crit damage one. Not a big issue though
It should grab the applied damage, so if you are auto rolling damage it will be doubled
Otherwise you will need to choose critical on the damage card π€
teeny little bit of CSS if you want those inline buttons to blend in more π€
.visual-active-effects .effect-item .effect-info .effect-info-details .inline-roll, .visual-active-effects .effect-item .effect-info .effect-info-details .content-link {
background: var(--color-text-dark-secondary);
color: var(--color-text-light-highlight);
}
.visual-active-effects .effect-item p {
line-height: 1.4em;
}
Where do you put this?
You can use Custom CSS module, go to its settings and just copy paste the code in the available field.
Or add it in a world script
How I configure to not ask save roll from my players? Actually Midi promp if the roll is with advantage or not. We just auto roll
Enable fast forward
Though if it's in a macro, you can just write out the roll
Don't find fast forward here, only in atk and dmg
Worked very well! Thanks. I feel like a potato for not thinking about that for myself
Just going through the flags, what does the inmotion one do?
It is for vehicles. Something for AC when moving compared to motionless ```js
const inMotion = getProperty(targetActor, "flags.midi-qol.inMotion");
if (inMotion)
targetAC = Number.parseInt(targetActor.system.attributes.ac.flat ?? 10);
else
targetAC = Number.parseInt(targetActor.system.attributes.ac.motionless);
if (isNaN(targetAC)) {
console.warn("Error when getting vehicle armor class make sure motionless is set");
targetAC = 10;
}
Can somebody point me to a good (and simple) breakdown of the Midi settings and what they all mean? π
I appreciate it
Could someone here check and see if they use a monster with an attack (with an attack roll) that also has a save roll the save when it's a player doing roll.
Trying to figure out if I found a weird bug and need to confirm it with someone else.
So basically a player account with control over giant spider?
yea
only thing on either client that looked sus was a compatibility warning that made no sense
ok I think I may have narrowed it down
a NPC that's owned by a player that isn't linked
attacking a NPC that isn't owned by a player and is linked
that has an attack that also makes them do a save
strange
yeppers have two windows opened
only see the deprecation warning
save is prompted by the spider bite, and the beholder makes the save via mtb
I might just have a bugged out npc
are you on 291?
for a tiny build increment it sure does have alot of changes in it
@radiant sphinx What version of dnd5e, foundry build, dae, and midi do you have?
latest
that is not the right answer give us the numbers pls
also, midi could be trying to apply unconscious CE... if you're using DFreds?
lets get the baseline info before we start tacklin things
for all we know this users got dnd5e 1.5.7
foundry v10.290, DnD5e v2.0.3, midi v10.0.23
do you have fast rolls, roll groups, ready set roll, WIRE, dice tooltips, better rolls for 5e, or Minimal roll enhancements modules installed?
no
navigate to your midi settings, workflow button, rules tab
done
(that was a very quick no btw, did you check for sure?)
yep checked
not the rules tab, mechanics tab sorry:
oh i have seen one thing navigating there, but in Mechanics
yeah i have just seen that right now
yey ty
yw
I have no clue what is causing the dnd5e deprecation error on my spider so weird
Actualy I do, Combatbooster
you seen Ripper's new macro wheel module? π
I have to find an alternative to combatbooster module, might just live with TAH. With all the createitem keys boosters constantly looking at proto actors instead of canvas actors
well there's Macro Wheel now, and Action Pack
what is action pack?
the one Whistler just released that does a sidebar that makes TAH redundant
I'm guessing both of those are patreon modules
the one dropped at same time as WIRE but you don't need WIRE for it
it's free
hm yup Macro Wheel is premium
I'll do patreon for maps and artists but not modules/code. Stuff breaks so often, I'm not paying for patches.
I think Action Pack is a lot easier to find stuff than TAH
And has a hotkey to summon
yeah I gotta figure out character action list, I installed it for TAH, but its turned player sheets into a god awful disaster
The bonus actions are super easy to see with AP
I think I'll just install AP and folk can use that or TAH if they want
I'm testing it out now
hotkey is E.. or you can have it auto open which is good for GM
just a shame it doesn't slide MTB
ok lil worried, not exactly what I was expecting for a TAH replacement
but so much easier to find/see stuff
seems exactly like character action list on tidy5e but without the ability to minimize
(or popout)
E
too dramatic of a shift and not adding anything, I'll stick with TAH and figure out how to stop character action list from destroying the favorites page in tidy
I have that module and it doesn't touch the other tab.
TAH is def better for GMs, but I think I'll let our players choose which they want
does that module that hijacks player settings let you set settings for each player individually?
the action list tab is a client setting π
I believe Monk's Player Settings lets you do that
yep
Anyone ever try to get midi to apply extra damage to only one token when editing a workflow that his multiple targets? It something like that possible?
My instinct says BABonus
I was creating a dialog in the midst of the workflow to add to one of the targets an extra applyTokenDamage
There are some spells, or abilities rather, which need something like that
Yea, I figured I could do that, but I'm hoping to get it lumped together for an accurate concentration save.
I am trying to remember when the concentration save is being called. You might be able to update the dae flag for appliedDamage if that is what the concentration check checks for the needed DC.
Not entirely sure right now
babonus only cares about your first target. It doesn't add the roll data of any other targets you have (that'd be nuts)
is the first target the first one set as a target or the oldest token set as a target or the alphabetically first?
cause that could totally be doable if we could tell who that first is
So you couldnt do something like Hunters Mark but with a feature that targets 3 creatures at once?
(1 of which is marked)
only thing I can think of for this stuff would be the spirits bard thing
OK so the doMidiConcentrationCheck(actor, saveDC); is hooked on updateActor (in Hooks.js)
Hooks.on("updateActor", async (actor, update, diff, user) => {
//...
let hpDiff = getProperty(actor, "flags.midi-qol.concentration-damage") ?? 0;
if (hpDiff <= 0)
return true;
//...
if (actor.system.attributes.hp.value <= 0) {
concentrationEffect.delete();
}
else {
const itemData = duplicate(itemJSONData);
const saveDC = Math.max(10, Math.floor(hpDiff / 2));
doMidiConcentrationCheck(actor, saveDC);
}
return true;
So will need to check when the flags.midi-qol.concentration-damage is being set and add the extra damage to it probably π€·
game.user.targets.first() which should be the first token added to that set
do you know who I am
Tried my hand at making the life channel feature from the Adept of Black Robes feat from the new adventure. Code could be cleaned up better, but for a proof of concept it works pretty well for applying extra damage to single target save spells with your hit dice.
You could use this.setDamageRoll(Roll) method to avoid rendering the damage etc
hey guys, do you know of a method to do a range check for a trigger? in a form of :
"Actor casts spell on target. If the target moves in his next round more than 30ft away, something happens."
Book has only been out for a day and my group is already talking about setting A House Divided in Krynn so we can get the extra feats π
This life channel could be very timely haha
Not something I be done exactly, but if you have drag ruler and the option of counting the move per turn, I would imagine that its API (or one of the other relevant modules) could provide a way to do that. π€
Now if you donβt want to be precise and you are ok with just the distance between start and end point, becomes easier
hello, is it possible to use the "roll other damage" option to add extra damage in case the target has a specific alignment?
Edit: Solved
V10 5E: I finally got to setting up 3rd level spells and seem to be having a problem with Spirit Guardians. I am using the Spirit Guardians 10.0.10 from the midi sample compendium. It is casting and putting up the aura but mobs in the aura are not being effected. No save, no damage, no errors. I suspect I simply have something configured wrong - but would appreciate any help.
If DamageBonusMacro returned value could also include an array of target tokenUuid to which the bonus applies it could probably be feasibleβ¦
More work for Tim π
In combat or not?
What does Create Combatant do as a expiration for an Active effect? Been wondering what that does for a while now.
My guess is the slimes that split
On the combat tracker
is there a way to make dual rolls like roll20 for players?
i still want automation for myself
i dont even know how to show double chat cards
The best way to save yourself headache is to not replicate vtt A on vtt B
But with midi, don't think you can have the double rolls like r20
ok
guess ill just use fast forward for now
tryin to spread the good word to a r20 westmarch
Just updated not to long ago to v10, and can finally look at Build-A-Bonus. Would anyone be able and willing to inform me of what benefits or advantages BaB gives when used alongside Midi that the Midi, DAE, and Active Auras suite (ect.), itself cannot.
From the surface it seems to build bonuses that Midi is already capable of, is it just an ease of use thing?
I don't use it but have it installed just incase a premade is constructed using it. So far I've seen none.
Heard, I'll just do the same them. π»
So I ditched my idea from yesterday and not use a range check. I would now want to try and go for a Chat card button for a strength check.
I am using the roll automation for midi, but i want this check to be rolled later and not immediately on item use. Ideas would be appreciated! :)
It's pretty flexible in what it can do, and can recreate elements of those other mods in its own way. The main thing I was looking for from it is using it recreate something like Hunter's Mark, without having to rely on a bunch macros. BAB can easily let you deal bonus damage to a creature that has a certain named effect on it. It can also provide very performant auras, but I havent tried it yet.
When you say later what do you mean? You could create a chat card for the check using Monks Tokenbar.
In general, I find it much easier to offer guidance, if I have a small item description of what needs to be done.
"Make a ranged spell attack against a creature within range. On a hit, the target takes 1d8 piercing damage. Until the start of your next turn, the target must make a Strength saving throw to move further than 30 feet from you. On a failed save, it is prevented from moving until the start of your turn."
When rolling the item, MIDI is automating the attack roll+damage roll. my thought was that I then still have a chat card open just for the strength save, but click it manually once the conditions are met.
Misread that
I doubt thats possible to automate that
Shouldn't that just be a regular ol' save?
You can have an attack roll and save all in one ability.
It won't apply the AE if they succeed the save.
Make a template macro. If the target leaves the 30 ft do the save
hmm i see, would you have an example where i can look at a template macro so i can try to change it to my needs?
Its one of those modules that is very much the deep end for automation.
ah! I might have an idea how to use it though π€
Make one spell for the attack+damage roll, If hit, apply special condition.
Make second spell with a template with a Template macro "on leave" that checks for the special condition and does a strength save when the condition is present.
there is for sure a way to make it more elegant and into just one item, but for this i would need to know how to code properly...
Can just have it both on the same feature
Have the on leave template macro look for that condition
and if it's not there, don't prompt for the save
but for that i cannot use the targeting in the 'details' tab, right?
because i would need "1 target" and "30 ft radius" as targets
Don't suppose anyone knows of any commonly used modules that have a update remote item function similar to the run as GM update effect from midi?
If it's just one target and they don't fail, you don't need the template at that point right?
I'm trying to migrate away from using advanced macros for running as GM stuff.
The issue is to apply the condition to the correct target only, which will be only one even though you put down a template
Could have the item macro make the template.
I suspect it is midi trying to do reaction after the save and refering to a magic item spell that can no longer be accessed, i.e. moved compendium.
So you will need to create the template pro grammatically
yeah, guess i gotta learn then π
midi-qol asks the magic items module to get the spell and if the spell can't be fetched it throws an error. Midi should probably just ignore such cases.
@gilded yacht I don't suppose you'd ever consider opening up workflow modifications to allow per-saved-token damage changes? Recently WOTC has been making features that are worded to only apply bonus damage to one target of something you do.
For example the "Life Channel" feature from "Adept of the Black Robes" feat.
Being able to grant advantage and disadvantage for specific other tokens doing the saves would also be neat.
Something like this could do it ```js
const templateData = {
angle: 0,
borderColor: "#000000",
direction: 32.30986326421048,
distance: 30,
fillColor: game.user.color,
hidden: false,
t: "circle",
texture: null,
width: null,
x: token.center.x,
y: token.center.y
}
const doc = new CONFIG.MeasuredTemplate.documentClass(templateData, { parent: canvas.scene })
let template = new game.dnd5e.canvas.AbilityTemplate(doc)
template.actorSheet = token.actor.sheet;
template.drawPreview()
MidiQOL and relevant modules versions?
Foundry 10?
Have you tried with only MidiQOL/DAE/libwrapper/socketlib/Active Auras active?
thanks for the heads up! trying to understand: I am using this as ItemMacro for now and it gives me a template which i could put anywhere. can i also force it to be placed on top of the token using it? this part looks like it should do that, but it doesn't
x: token.center.x,
y: token.center.y
Are you making the template in the macro or just letting foundry make it?
i pasted the macro into an item macro and used the item.
using foundry while having a token selected got me the same result though
You always need to place the template down yourself in this case
If you want to place it automatically ```js
const templateData = {
borderColor: "#000000",
distance: 30,
fillColor: game.user.color,
t: "circle",
x: token.center.x,
y: token.center.y
}
const newTemplate = await canvas.scene.createEmbeddedDocuments("MeasuredTemplate", [templateData])
Down to the bare minimums needed
And lastly, as this probably would need to move around with the caster, you can attach it using Token Attacher with something like this in the When Created ```js
let originActor = fromUuidSync(template.getFlag('dnd5e','origin').split(".Item")[0]);
originActor = originActor?.actor ?? originActor;
const originToken = originActor?.token ?? originActor.getActiveTokens()[0];
tokenAttacher.attachElementsToToken([template], originToken, false);
in the newTemplate you create, you will need to setFlags to make it work with Template Macro
So you will need to create everything programmatically π
Just realised π
Not that difficult. Create the Template macros needed on a template in Foundry. And log that template in console.
Grab the structure and use that to as input for the templateData π€
okay just to be sure i got this right, If i am grabbing the flag from the screenshot, I would do
const templateData = {
borderColor: "#000000",
distance: 30,
fillColor: game.user.color,
t: "circle",
x: token.center.x,
y: token.center.y
flags.templatemacro.whenCreated: {asGM:false, command: 'Insert macro here.'}
?
or rather whenLeft, just trying to understand how to insert any flag into the template data
flags: { templatemacro: {whenCreated: {asGM:false, command: 'Insert macro here.'}, whenLeft: {asGM:false, command: 'Insert macro here.'} } }
Dont forget the comma after ```js
y: token.center.y,
But I would also include the actual macro and then log the template to get the correct syntax (you will need to be escaping some characters for the syntax to be correct etc)
alright. I'll be taking a break for now. but thanks a lot for the help already :)
is there a flag I can use for an ability to make a target vulnerable to all damage taken?
system.traits.dv.all | Custom | 1
is there a midi/DAE way of doubling any HD roll? (automating Blessing of Wound Closure)
Macro would be prolly be the best way. Or you can hit the damage multiplier dropdown and change it to 2x
HD rolling in rests is not handled by midi so there would be no 2x
I personally had another reason for solving this, which was that all my heals in my world can explode on the highest die roll, so my players don't use the resting hit dice buttons, I gave them all features that roll their hit dice and consume them
got player features that have them chugging HD a lot, so will come up fairly regularly, so was hopeful
make features and have them consume the hit dice, the only issue arrises when a player is multiclassed, thankfully my one multiclass has the same dice size

personally if it were my table, I'd say fuck it and give them all the same higher dice count
If anyone wants, you can find a MidiQOL compatible Hexblade's Curse for v10 (and v9 WIP as I cannot test it by myself right now) in my github. I have started updating it...
You can find a link to it if you click on my username.
how do you do an effect like Halfling's Lucky?
is there a collection of community created items for midi-qol?
there was in v9, but the mod is out of date now. It is midi-srd or something like that
midi srd is available in fork format
search for thatlonelybugbear midi srd in discord here and you will find the link
Click on my name, View Profile, there is a link to my github
You can find several Kandashi's modules updated for v10 compat in the pinned projects there.
special traits -- halfling luck
yes, but how do "I" do something like that? I have a feature that expands that to 2's and 3's, and would like a way to set it up once they get that high
a module, most likely, halfling lucky is coded into the system
but this is midi channel, so who knows
also where was that screenshot from?
special traits of your actor
ah, thought that was a midi thing
ah!
was scrounging through my stuff adn cou;dn't recall where i had it set as the items didn't have effect on them, and just found the system flag AE for it
Would there be a way to prevent a token from healing for a turn with an Effect? I'm looking at the new Skeletal Knight from Dragonlance, and it has an attack that prevents the target from regaining hit points for 1 round.
Maybe give them immunity to the healing damage type?
That's clever.
Lmk if that works
It works!
i just install it like a regular module right
i was looking at your hexbldes curse, do i create an item and copy everything i see in the images?
you have to manually get the raw module links and paste them into the bottom field in the add on menu in foundry
ok i got the json
https://github.com/thatlonelybugbear/FoundryMacros/tree/main/MidiQOL_related/Class Features/Hexblade's Curse/v10
for things like this
i just have to copy teh picture step by step right?
because i see the item macro , not sure if i jst use a script macro
item macro doesn't let you choose chat vs script, are you sure you are using item macro?
should i just follow the picture then to create hexblades curse
yes thats what they are there for I think
on hexblades curse item, at the top bar, click item macro, if you have it set to icon only it looks like a paper I think
you want to put the macro in that thing
make sure both the DAE's are made on the item too
curse is roll self, the other is standard roll and apply on target
nice!
now to do this for everything else
do you have a library of items i can copy over for 5e feats and stuff?
or know of one
it doesnt look like midi srd has alot
i dont see sharpshooter forone
sharpshooter is handled well by dfreds CE
which is part of the midi meta for module lineups
oh wow that was so easy
i just took an example macro from dfreds and renamed it to Sharpshooter
I actually have midi auto apply it
all you need is a properly setup feature called the same thing
and then midi will auto apply sharpshooter to whatever target is setup to on the feature
so for sharpshooter you want it to be a self/self feature
name it, give it a picture, and have the player roll it before they attack and it applies it
Is anyone else suddenly able to edit dfreds effects even when they aren't custom???
Not me
Also, there's some new new thing like midi? Is it any good?
I've been lost in a vortex at work for a week
its more of an alternative to ready set roll I think
WIRE Itβs worth checking out in a test world, looks super promising but early days (not a single setting). Also, Action Pack can be used with or without and thatβs worth a look too
I would like a full auto option before we even thought about using WIRE. Our GM would hate having to approve every roll (weβre up to 3-4 attacks per turn now)
WIRE has a good framework for pre-mades. In the long term it might be a good option for your table, once those compendiums have more features/spells in them
Really well rounded module though! With lots of automation potential too
Yeah I could see it rivalling Midi for automation eventually if thatβs the direction people want to take it. It would need a bugbear or two though
Does anyone have recommendations for automating spells such as Hail of Thorns which add an effect to the next time a successful weapon attack is made?
isn't it an aoe?
If I were setting it up, I would make Hail of Thorns the spell, a self/self that applies an ae that has the macro.createitem key. Then have it add a feature called Hail attack, that fires a normal bow shot and on hit do an extra findnearby aoe dex save damage as well.
has anyone updated the v9 ice knife with v10 stuff?
Template Macro is way off in the shallow end lol. It's splashing around in the kiddy pool.
Hmm, it has some things I'm really liking
but definitely seems very early
Ddb importer has a well made ice knife for v10
You can pull the macro out of the GitHub if you don't use the module
I have something in the works... When its ready I could share it here
Here is my Item Macro for Hail of Thorns, you can also configure a template effect for the burst in Automated Animations if you are using it.
sheesh
whats frbd
matter of fact , gotta go find some ytvideos of this new wire thing
cant find anything on WIRE
I feel like BR has to still be included because it somehow installs in v10 and jjust totally screws up everything
You can slim up a lot of this using midi commands.
Faster Rolls By Default
theres actually 2 fast rolls that aren't compatible but I think the other got renamed to quick rolls
also that new dice tooltips module breaks with midi if you merge cards
Thanks, that works really well! Just a couple things I'm working on debugging: it makes the target roll the save twice (presumably because it counts as being within range of itself), and it seems like the template is sticking around afterward
why is it inducing a save twice?
did you leave the save on the item?
No, I remade the item from scratch with no save and it's still occurring
It actually seems it's making all tokens in the area roll twice, so it wasn't the issue I thought
I don't have the item you are trying to make, that seems strange that its inducing the save twice can you show me the item details?
do you have 2 rollers installed?
No, I'm using just LMRTFY
Debug shows that it's creating two templates, only the second is getting deleted
Which makes me think the "two" bugs I listed are actually one, and it's looping through twice before ending concentration and the macro
can you show me the details of the spell Hail of Thorns please?
have you tried changing the save setting?
whats it look like when you attack?
in chat
ok for starters why is cub managing conc
did you accidentally paste the macro twice into the item macro?
and also can you share the effects tab of the hail of thorns effect
Concentrator is turned off, that message I believe is just from condition lab
disable enhanced conditions and try again
yeah my only guess is that either cub is stepping on things and/or you pasted the macro in twice
theres no WIRE, Ready Set Roll, or Better rolls shenanigans going on right?
oh show me the actors effect tab, you probably edited an owned item and have a glitch goign on maybe
Still occurs without enhanced conditions
show the effects tab of the actor pew pewing the arrow, and double check to make sure the macros not in there twice in the item macro
Twice in the same text box?
when you edit owned items sometimes you get a ghosted effect that stays on the actor, can spot it when you look at the effects tab of the actor
roll the spell and show me that image again
Already on it lol
ok open up item macros window on the item and check and see if you have accidentally pasted the macro twice
It's pasted once in the text box
can you show me this text box you speak of, you call it a strange name
k give me a minute and I'll set it up and see if its got an issue
is midi suppposed to do damage casting sleep
it also doesnt divvy out the damage, just does a flat roll and gives it out to every1
it should do "no damage" and it sounds like you got a bad version of sleep
I personally would not waste time on that spell, players won't use it past their first time casting it, its an awful spell
I consider sleep and color spray great spells to cast for npc casters to help reduce the threat of the encounter by burning turns doing really bad spells
ok ill try to reset the sleep spell or something
pretty sure the midi srd version works
the problem is that it rarely works past level 1-2
weird, theres no sleep spell in midi srd
gonna have to go fishing in mrprimates or this discords history
what do i do with lonelybugbears midi-srd? for every spell that i want to "work" i open his compendium and drag it in the actors sheet?
go back to that item details of hail of thorns, set it to an attack for action type and turn off the stuff properly
Clear out the damage formula and saving throw stuff
I think all you did was change the action type to blank
click minus on the damage formula and change the save to blank
it should look like this once you are done, then change saving throw to blank.
Those are all already blank
This is a fresh version of the spell, made right before I pasted the macro in
Just double checked
the macro is bugged, whomever shared it must have something going on that makes it work right that we're both doing wrong
the offhand error is not related
this is probably the problem
this isn't a midiQol question but might be related. Why doesn't this macro work on a token item? it creates a new effect called TEST, detects it has the effect called TEST but removeEffect fails to work, says cannot find effect named TEST. uuid is ok.
let sourceActorData = args.length == 0 ? token.data.actorData : args[0].actor;
let uuid = args.length ? args[0].actorUuid : token.actor.uuid;
let newEffectName = "TEST";
let hasEffect = game.dfreds.effectInterface.hasEffectApplied(newEffectName, uuid);
if (!hasEffect) {
let effectData = game.dfreds.effectInterface.findEffectByName('Bane').convertToObject();
effectData.name = newEffectName;
game.dfreds.effectInterface.addEffectWith({ effectData, uuid });
} else{
console.log('trying to remove effect '+newEffectName+' from '+uuid );
game.dfreds.effectInterface.removeEffect({ effectName: newEffectName, uuid });
}
might get a faster answer in #macro-polo
my spell works btw, it doesn't do the damage twice, it only prompts the save twice so technically its fine.
if anyones curious about the offhand thing, its another one of those oddball starter hero issues
it wants to add offhand to the item on the locked compendium version of the ranger
It seems like it's running through the macro several times, once through the preamble section, twice through the damage dealing section, then twice more through the preamble
my first thought is maybe theres a typo in the macro instructions fr postactiveeffects
and its defaulting to ALL instead
we need one of the smaaaht guys to wake up and check it
I can get my macro to work from the hotbar, but it wont work if I click on the item and is has the same macro name in the Midi Qol field set to before active effects
Is there a condition that is needed for a macro to run properly from the item?
if you share the macro we might be able to understand more what you are doing, did the writer of your macro say how to set it up?
Its my own based on a few I put together. I just want to have the active effect toggle with the FX on the token.
const myActor=token.actor ?? game.user.character;
const myItem= myActor.items.getName("Ioun Stone of Protection");
let stoneActive=myItem.getFlag("world","stoneActive")
if (!!stoneActive){
myItem.unsetFlag("world","stoneActive")
dnd5e.documents.macro.toggleEffect("Ioun Stone of Protection")
await TokenMagic.deleteFilters(_token);
}else{
await myItem.setFlag("world","stoneActive",1)
dnd5e.documents.macro.toggleEffect("Ioun Stone of Protection")
let params =
[{
filterType: "sprite",
filterId: "mySprite",
imagePath: "icons/commodities/gems/gem-rough-cushion-red-white.webp",
gridPadding: 1,
scaleX: 0.20,
scaleY: 0.20,
colorize: true,
color: 0xFFBB00,
inverse: false,
top: true,
animated:
{
rotation:
{
active: true,
clockWise: false,
loopDuration: 2000,
animType: "syncRotation"
},
translationX:
{
active: true,
animType: "cosOscillation",
val1: 2.0,
val2: -2.0,
loopDuration: 4000,
},
translationY:
{
active: true,
animType: "sinOscillation",
val1: 2.0,
val2: -2.0,
loopDuration: 4000,
},
color:
{
active: true,
animType: "colorOscillation",
val1: 0xFFFF00,
val2: 0x00FFFF,
loopDuration: 4000,
}
}
}];
await TokenMagic.addFiltersOnSelected(params);
}
that looks an awful lot like non midi stuff for a midi on use macro
Someone who knows how to share the code lingo should share it to them
const myActor=token.actor ?? game.user.character;
const myItem= myActor.items.getName("Ioun Stone of Protection");
let stoneActive=myItem.getFlag("world","stoneActive")
if (!!stoneActive){
myItem.unsetFlag("world","stoneActive")
dnd5e.documents.macro.toggleEffect("Ioun Stone of Protection")
await TokenMagic.deleteFilters(_token);
}else{
await myItem.setFlag("world","stoneActive",1)
dnd5e.documents.macro.toggleEffect("Ioun Stone of Protection")
let params =
[{
filterType: "sprite",
filterId: "mySprite",
imagePath: "icons/commodities/gems/gem-rough-cushion-red-white.webp",
gridPadding: 1,
scaleX: 0.20,
scaleY: 0.20,
colorize: true,
color: 0xFFBB00,
inverse: false,
top: true,
animated:
{
rotation:
{
active: true,
clockWise: false,
loopDuration: 2000,
animType: "syncRotation"
},
translationX:
{
active: true,
animType: "cosOscillation",
val1: 2.0,
val2: -2.0,
loopDuration: 4000,
},
translationY:
{
active: true,
animType: "sinOscillation",
val1: 2.0,
val2: -2.0,
loopDuration: 4000,
},
color:
{
active: true,
animType: "colorOscillation",
val1: 0xFFFF00,
val2: 0x00FFFF,
loopDuration: 4000,
}
}
}];
await TokenMagic.addFiltersOnSelected(params);
}```
yeah, I just dont know how to get both to work via the item. How do you get the code to display like that
what is the point of this though?
ioun ston eof protection? make the item, add an ae to it that gives an ac bonus, and then also if you want a tokenmagic filter add a key for macro.tokenmagic
that macro seems like a macro made by someone who didn't know you had midi
yeah, but when I do a straight item with ae, it stays on all the time, as soon as they equip
if they unequip it, it should shut off
yeah, but that just adds it permanently
items is meant to be activated by an action
which is what I am trying to achieve
uncheck equip:
(though I feel this is really unnecessary)
if you setup your tokenmagic right, it should show up in the drop down here
probably mysprite or sprite
then whenever the player rolls the item it applies, make sure they attune to the item first
ALSO this is one of the last remaining glaring bugs with editing owned items with DAE, so if you are trying to change this while its on the actor, don't. Move it to the sidebar or you will wind up with this:
you do not need any macros for what you are trying to accomplish
Thanks I'll give it a try
if you want the ae to be a toggle when they roll the item, theres a checkbox at the bottom of the details for the ioun stone
oh nope, can't do that with items, thats awkward
yeah this is why I think you should use equip not roll to toggle an item
the user will have to delete the ae whenever they wanna shut it off
think it depends on what item type you chose, I'm guessing weapons will have the toggle option
Yeah not sure why armor/clothing/trinkets don't get the bottom options.
If you make it any other item type you should unlock the options below.
Sorry, I did not put enough details on the setup of the spell, the spell must be mostly empty, because the damage and the save only happens on the next attack, the damage and save is already configured in the temporary item "Hail of Thorns: Burst". Here is my spell details tab.
Why would a player ever not have it orbiting their head. Saying it uses an action to start it is just for the rare chance they don't want it orbiting their head.
Or putting it back after it's been grabbed away.
I'm trying to automate Holy Weapon, and I'm using Effect Macro to achieve it by adding a Burst of Radiance item to the target's inventory on 'Effect Creation'
const objects = ["Burst of Radiance"].map(n => {
const obj = game.items.getName(n);
return obj.toObject();
});
const created = await actor.createEmbeddedDocuments("Item", objects);
await effect.setFlag("world", "createdIds", created.map(i => i.id));
ui.notifications.info("Burst of Radiance added to your features");```
However, I'd like the item to be used on Effect Deletion, that is: the On Deletion effect is triggered when the concentration is dropped.
```js
const deleteIds = effect.getFlag("world", "createdIds").filter(i => {
return !!actor.items.get(i);
});
await actor.deleteEmbeddedDocuments("Item", deleteIds);
ui.notifications.info("Burst of Radiance removed from your features");```
Here, it just deletes the Burst of Radiance feature, but I'd like Burst of Radiance to be used *just before* it gets deleted.
Here's an example: Effect is added to target. Effect adds an item to target's inventory On Creation of the effect, and rolls the item.
```js
const objects = ["Astral Fists","Astral Force"].map(n => {
const obj = game.items.getName(n);
return obj.toObject();
});
const created = await actor.createEmbeddedDocuments("Item", objects);
await effect.setFlag("world", "createdIds", created.map(i => i.id));
ui.notifications.info("Astral Fists and Deflect Energy added");
await created.find(c => c.name === "Astral Force").roll();```
How do I do that for On Deletion?
@molten solar I figured I'd mention you out of courtesy 'cause Effect Macro is your Module π
You might have an easier time using macro.createItem with DAE.
In reality, I feel like this spell is better done with a warpgate mutation on the item.
At any rate, you should be able to embed the item in the macro then run it when the effect gets deleted.
Does anyone know of an automation for applying the healing from Hexblade's Curse?
Crymic has one on their patreon.
That works
I already posted the details for the spell setup, as for the template, I did not see the problem because I was using Automated Animations, which removed it. I disabled the AA and I was able to reproduce the problem. What is strange is that it should delete it (I debugged the code and delete is called on the template) but for some reason the template is not deleted. I will have to investigate if its a problem with my code, or midi or another module.
How about a teaching moment where I show you how to use an item that does not exist on the actor.
On Create:
const itemData = game.items.getName("Burst of Radiance").toObject();
return effect.setFlag("effectmacro", "itemData", itemData);
On Delete:
const itemData = effect.getFlag("effectmacro", "itemData");
return new Item.implementation(itemData, {parent: actor}).use({}, {flags: {dnd5e: {itemData}}});
@sudden crane when I run it the macro seems to run through the second half (the part after the preamble) at least twice, only deleting the second template that gets created
My assumption is that when the template gets added to the concentration details it overwrite the template from the first run, then when concentration is removed it only removes the second template
When you remove automated animations does it replicate the damage/save doubling bug or just the template bug?
Hmm, that doesn't seem to trigger the feature. Here's the error I get
I'm on V9 if that's affecting anything
Yeah, that does affect it. π
Is it still possible to achieve this on v9 in a different way?
I have the following ItemMacro. I would like to modify it so that the damage done, is also applied as healing to the item user. Any suggestions on how I go about that? V10 E5
function checkTrait(type, trait) {
return args[0].hitTargets[0].actor.system.traits[type].value.indexOf(trait) > -1;
}
if (args[0].hitTargets.length != 1) return;
let damage = Math.ceil(args[0].damageTotal / 2);
let hasImmunity = checkTrait('di', 'necrotic');
if (hasImmunity) return;
let hasResistance = checkTrait('dr', 'necrotic');
if (hasResistance) damage = Math.ceil(damage / 2);
if (damage != 0) {
let sourceToken = args[0].workflow.token.document;
await MidiQOL.applyTokenDamage([{damage: damage, type: 'healing' }], damage, new Set([sourceToken]), null, null);
}
This is the item macro I have on my vampiric touch weapon. Maybe you'll be able to adapt it for what you're doing.
You are right, preambleComplete is called twice, but in my case I don't have the double save/damage problem. This code was written for v9 initially, and v10 seemed to have changed midi workflow behavior. I will investigate and send a fixed version later
I personally just have vampiric touch give the player a new feature with macro.createItem with this on the weapon it gives them.
I'm curious, is MIDI QOL AC autocheck broken? It's not working for me since the update and I messed a bit with options finding nothing weird, so I was wondering if it's some option/conflict or just a bug of some kind. I also checked the workflow option as stated in the github and everything is fine, so it's not that for sure.
@fading scarab Could pass along the updated macro for Holy Spirit and some screenshots of the spell section? It would be most appreciated. I have a Druid who just picked up Holy Spirit and Moon Beam.
I think I vaguely remember someone throwing around a macro in here for multitarget spells that increase the number of targets with spell slots like scorching ray and magic missile, anyone have the link to it? can't find it in the search
if you mean cover, yeah, midi's auto cover is a lil broken.
So... I'm working on adding Circle of Stars Druid for one of my players... and I'm not quite sure the best way to implement the Dragon Constellation, specifically, how would I replace the concentration roll with an effect or something? I know I can use 1d20min10 and wot for doing it manually, but I'd like a way to work it into the automatic midi workflow...
I used min10 con saves as a replacement when it's active. Technically stronger, but I guess it depends on how often you have your player roll con saves other than for concentration while it's active
Here's a Starry Form macro I made
adds items for Archer and Chalice and removes them when form is dropped
Ah... that's a bit more complete than what I'd been using... but I was just gonna rely on my player to only use the archer and chalice items when relevant. :P
Yeah originally that was my plan as well, but I figured may as well make one
Looks like this needs ItemMacros and Warpgate? I have both installed but haven't spent that much time in figuring them out. ^^;
It does yeah, for the mutate. Shouldn't require anything extra for warpgate. You'll just need to place this on the Starry Form feature, set it to target self, and then add the macro call to the spell details
nods
And also set up the subclass for the damage numbers, looks like?
For Chalice and Archer?
Not too hard.
Does it handle the eventual flight thing for the dragon?
so I think I had that set up from the import
Ah, not yet. I should probably update it for that. I made this for a one shot that wasn't going past level 5 so I think I opted to skip that lol
I'll take a look
It's alright. That's not too hard to do, I just wanted to check before I replicated any work. :P
Yeah just a before active effects call on the spell
It does have a visual effect I thought looked nice but that can be removed as well
Well... coocoocoo... saves me some work. π
sure thing, let me know if you find any issues. I think I'll take a look at the later effects you get sometime to day
will ping you if I update it
Thanks. :3
I'm trying to use this: https://github.com/thatlonelybugbear/FoundryMacros/tree/main/MidiQOL_related/Class Features/Hexblade's Curse/v10
But I'm unable to find the item macro button. I have Hexblade's Curse in the features section. Is that not correct?
Item Macro is a module
Your title bar buttons look great. Is that from a module or just Custom CSS?
A module, but I'm at a loss as to what exactly it is, if I'll be honest. I have 35 modules that I kinda just threw all in
its probably just v9 being so different looking lol
Could be!
make sure you are using his v9 version btw
I tried using the v10, and it didn't work as expected, but also didn't have any errors. I haven't tried the v9 version, but it's broken last I checked
you probably have the item macro hooks turned on
midi only uses item macro as a storage device, you are meant to shut off the character sheet hooks hwen you install it
I'm sorry, how do I do that?
configure module settings, item macro
personally I have every single setting option in Item macro unchecked, but specifically the character sheet hooks option needs to be unchecked or it will break midi on use
@vast bane Do you happen to know why I don't have this box on mine? I'm just missing a checkbox. I have midi and itemmacro installed now
This is for an effect. I had thought that might be the issue, but the first image I pulled from his v9 repo
what version of midi are you on
it doesn't matter, the top image is v10 no matter what
its got the uuid button to the right of the name
Midi 0.9.83
believe u me, I'm the last one to poke people about v9 to v10 updating but seriously, I was a hold out, anyone taking longer than me is pretty dedicated
I really wanted to, but a lot of the modules I'm using are using v9. It's pretty hard to move on from better rolls. I tried looking up some alternatives, but they weren't that great. Do you have any suggestions for better rolls upgrades?
BR doesn't even work right in v9
Yeah, but the only issue I had was using ammunition, and I found some solutions for that in other repo branches
What replacements do you use for BR in v10?
you don't use a replacement for BR in v10 midi
you learn how to use midi fully instead π
either turn off fast forward or use the keyboard shortcuts for advantage/disadvantage
I think I'll try upgrading to v10 again. Thanks!
back up first
and imo, don't carry over the module folder
use the old data module folder as a shopping list to install the v10's fresh in v10
save yourself a ton of headaches
don't carry over the system either cause its obviously getting replaced anyway
I think I fixed the problem, also in the spell details make sure that you have no damage nor save configured, it is the temporary item that have this. If your action type is blank, change to other and make sure there is no damage or save configured, then you can change back action type to blank.
I ran into an issue last night where many Overtime effects started ending after one round, even when they're coded to only end on saves. Anyone know what might cause that or what I should look into?
Are you on the latest version of midi? I think this may have been a bug that was fixed not too long ago.
Ended up being way more work than I realized lol. Anyway this should cover all the changes in Starry form entirely.
- added flight to Dragon at lv10, as well as a prompt at turn start if you want to change constellations that updates the effects accordingly
- added the bludgeoning/piercing/slashing damage resistance for lv14 as well
Let me know if you run into any issues. Did some testing at various levels and it seems to work so far as I could tell
Whoo! :o
There is a way to do this now. But first a little bit of background. When midi deals with a damage roll it goes through and calculates the various bits of the damage and assign the damage type for each component of the roll and creates workflow.damageDetail which is an array of {number, string} for each of the different types of damage done by the damage roll. The damage roll is then displayed and finally the damage is applied. During the damage application midi processes any resistances/Damage Reduction etc per target.
As it is doing that it calls the hook "midi-qol.damageApplied" passing the target token and item, workflow, ditem - ditem is a finalised list of all the damage being applied to that token, In addition when it has created all of the individual damage items it runs any preDamageApplication onUse macros with workflow.damageList set to the array of damage items.
Those are "live" data so you can make changes to the damage to be applied to any of the tokens. The hooks call and the macro call are awaited so you can do whatever you want in the hooks, like prompting to add damage to it.
Go to my foundry macros github from the link in my username bio. You will find it there
Saw that you've already found a solution. Sorry for the ping
The v9 version needs to be reworked in my repository.
I have a solution offered by Trazzm who did the testing for v9 as I have only v10 Foundry instance.
Oh cool thanks for the info. I don't suppose there is something similar to setting advantage/ disadvantage for saves per token?
I'm using 0.9.83
my money is on a typo in your overtime syntax, show su the effect values
Here is one offender
also overtime effects don't work outside of combat, did your calendar progress 1 minute or whatever the duration of the spell? What is the duration of the spell?
I'm trying to make this feature apply an effect to the actor who has the feature. However, it's not working. Are these settings right?
that will apply the ae only when its rolled. if you want it to apply on equip, choose the apply on equip box instead
(next box up)
I do want it to apply on roll, but it never applies. This is what the chat shows, and the effect doesn't show up on actor.
you don't use those checkboxes that way
those are for things like weapons that target others and need to apply a specific ae to self also
if you want a feature to roll on self, make its details target self/self
and if you do that, no box should be checked in the first tab
Combat isn't the issue, but I am thinking duration might be part of it. I've got duration figured out on the Midi effect. but on the main spell card I have "Instantaneous". Removing that seems to have fixed a few things.
But now I'm finding I also left out some crucial commas, so gonna test again.
Yeah, looks like a combination of syntax errors and of the duration on the main spell card overriding whatever I put into the Midi effect.
Also, is there anything that would cause Midi to run an Overtime effect twice at the end/beginning of a round? I've been running into that, too.
alright that was it. Thanks!
Can someone point me in the direction of using an effect to hook into the use of a different ability? For context, I am trying to make an upgrade to the Kobold's Draconic Cry ability. I want the upgrade to add damage onto whenever the original is used. I assume a macro of some sort?
So to clarify, you want the feature to do more damage when you have a specific effect active?
The original ability just grants advantage to attacks against affected creatures. The damage would be completely new
As an easy option, I would potentially just put an onUse in the first ability that triggers this item
So do extra damage to the target if it has that effect on them?
flags.midi-qol.onUseMacroName Set to post damage roll. Have the macro change the damage if it finds the specific effect name on the target.
my best guess would be bugs related to editing owned items.
All enemies in the radius of the Draconic Cry are affected (granting advantage on attacks), no saving throw β so not too complex. Could just run one item after the other
Easily, assuming they have the same number of uses (the description doesn't say otherwise)
Yes, that is correct
Do you mean adding an effect to the original Draconic Cry to check if this effect is active?
Have the original feature apply an effect to the caster that applies the on use macro
That macro would check all outgoing damage applications and add extra when the target has the other effect
I'm sorry, is there any way you can point me to an example? I'm super new to midi
But itβs literally just a one-off AoE effect
Then I'm confused why not just add it to the item?
I would just add the grants advantage effect to this new item and call it a day
I thought it was a do extra damage to targets effected by the cry for a round or something
I think with this upgrade, they get blasted and deafened, plus theyβd get the effect of draconic cry (grants advantage for a round). So yeah, put it all on one item
I could definitely do that. I was hoping to do something similar to the agonizing blast eldrtich invocation, but it's a bit different since Draconic Cry doesn't deal damage
Thatβs right, Iβd set up deafening cry like any self targeted AOE, with the damage and AEs for the deafening, thunder immunity and grantsAdv
Itβs a cool idea btw
Thanks! I'll give jt a shot tomorrow and come back if I run into more issues
can i automate midi to do +2 to attack isntead of adantage
If you know js and edit midi like crazy, sure (source code and what not)
yeah ill just use my voice
It actually wouldn't be too hard as a world script hook.
Hook on pre attack, check for advantage then remove it while giving a +2 to hit
This version fixes the problem, thank you!
Anyone else having trouble with the sample "Branding Smite" provided? Can't seem to get it to trigger when I hit a target
are you in combat?
yep, it applies the conc + effect to the character, but nothing to the target when the hit lands
went to take a look and it gave me a genius idea for another macro.createitem usage heh. The item looks like it should work so my only thoughts are that maybe you have multiple rollers installed or the target is immune.
oh also it could be failing because your attack is not an mwak/rwak.
oh, and it also could be failing because a GM account is not logged in
wow this premade is a great example item for making an ae in a macro
hmm... I'm using a longsword; looks like everything is filled out on it, and I'm on the GM account. Target is a basic monster with nothing special on it. I only use Midi to interact with rolls
ok, it's because I am using it from a Magic item, when it's cast as a normal spell it works fine
yet another reason to switch to items with spells module instead
hello, is someone else having trouble with the flags.midi-qol.concentrationSaveBonus DAE option? i cant seem to make it work
Is there a way to use midi to call/roll another feature when one is rolled? I was thinking of using ItemMacro to use a macro to call another feature if it exists on the actor, but I'm unsure how to hook into seeing the features on an actor
been fighting with this for ages, would someone be able to help me out... I'm trying to give this feature to one of my players "You have advantage on all attacks against creatures with the dragon type. Creatures with the dragon type have disadvantage on saving throws against your spells."
actor.items.getName("name of item")?.use()
Do you happen to also know how to get the name of the actor using the ItemMacro when using it? I feel like there is some hook, but I'm unsure exactly
actor.name...
ty! I didn't know actor was created and allocated automatically when calling the ItemMacro
All visible here
https://github.com/Kekilla0/Item-Macro
How would I go about creating the following:
An on hit effect that makes the target's next attack before the end of their next turn have disadvantage?
An on hit effect that reduces a target's AC by 1d4+1 until the end of the caster's next turn?
Disadvantage flag with expiry of end of next turn
And similar but with ac.bonus on the second thing
The special expiries on the effect duration panel will be the main thing
How do I call an item macro when rolling a feature? I thought that this should just do it, but it doesn't seem to work
is that transferred to a target, transferred to actor on equip?
How do you use it?
And what's the actual macro?
I actually got this kind of structure from your code. I figured that if there is an effect, you can use the onUseMacroName to call a macro from the ItemMacro on the item in the player's inventory.
Ideally, I want it to be where you just roll the item from the inventory, then it runs the macro attached to that item.
Right now, the macro just prints some data to console.log, but eventually I intend to use it to run multiple other items in the user's inventory
Yeah the concept is valid.
Have you created a feature with a DAE that is the one shared above, which also has the box Transfer to actor on item equip checked, in the details tab of the effect?
Ideally, I want it to be where you just roll the item from the inventory, then it runs the macro attached to that item.
What you are describing is core Item Macro functionality which you cannot use, as is, with Midi involved.
Emphasis on as is.
Thanks! I got it to work by calling ItemMacro.Draconic Cry using Midi Qol Fields On Use Macros in the details section.
So I'm trying to have an item on use add extra damage to certain monster types. This doesn't seem to work in the way I thought that it would. Any ideas?
From above, I saw this solution:
const diceMult = args[0].isCritical ? `${baseDice * baseDice + baseDice}`: 1; const baseDice = Math.ceil(rogueLevels/2); ... return {damageRoll: `${diceMult * baseDice}d6`, flavor: "Sneak Attack"};
But, I believe I'm just doing the same thing, so I'm unsure. Am I using the wrong hook?
You don't do a return to edit damage
You want to modify the workflow
The documentation is a bit dated
Since the workflow can just be accessed at args[0].workflow now.
But otherwise it still stands
workflow.setDamageRoll(damageRoll)
I saw that example, but I was really struggling to just add a new roll instead of just overwriting it
Or that needs to be a damageBonusMacro, set with a flag
flags.dnd5e.DamageBonusMacro
Easier to just overwrite it
The player will never see the difference
Since the change is made before it's applied / the card is rendered
Okay, I modified to do just that, and I get no errors, but it doesn't show up in the chat
I confirmed that the damageRoll is modified in console
Did you change it to process during postDamageRoll ?
I have this, which I assumed was calling the macro on postDamageRoll
Is there a way to do that without effects?
Could you export your item?
Because it looks setup correct to me
It should be changing it
Sure, but how do I do that? haha
Why don't you use ItemMacro in there?
try without the .name
Same issue. The damage just isn't changed. The macro is called correctly though
Any errors?
And what is the actual ItemMacro? I cannot check the item now π
No errors. The macro is called correctly, and the damage roll is confirmed to be changed
Change it to ItemMacro
and try this:
let feature = args[0].actor.items.getName("Handaxe Mastery");
if (!feature) return;
feature.use()
let workflow = args[0].workflow;
let formula = workflow.damageRoll._formula
let damageRoll = await new Roll(`${formula}+1d6`).roll({async: true});
await workflow.setDamageRoll(damageRoll);
console.log(workflow)```
Your setDamageRoll needed to be awaited
gah the await! That was exactly the issue. Thank you so much!
Are you trying to make it so all handaxes get bonus damage?
(If they have that feature)
yes, I am trying to do that
flags.midi-qol.onUseMacroName CUSTOM macroName,macroPass
As a passive effect on the "Handaxe Mastery" feature.
Then just do some filtering on the item
Check it's name or weapon type or whatever the requirements are
If you need an example, in this case it's for the Alchemical Savant feature from Artificer.
You can likely just check if the item's base weapon is a handaxe or something
Thanks! I'll look into this!
Does tpos still have no Patreon or Ko-Fi or anything?
He's working on it afaik... slowly
Fair enough. If ever a mod dev deserved my money...!
Agreed, posney you need to give us a way to throw money at you!
More of a Warpgate than Midi question, but why am I getting this error?
okay, so i changed "Item" to "item" and now I'm getting this
I had that happen to me recently when I was trying to warpgate an item onto the actor the same time macro.createItem was adding one as well.
Generally, you can use token.actor.itemTypes.weapon
Also you are filtering multiple weapons I imagine.
You could try doing something like ```js
if (args[0] = "on" && args.length === 2) {
const params = args[1]
const targetActor = game.actors.get(params.actorId)
const targetToken = canvas.tokens.get(params.tokenId);
const weapons = targetActor.items.itemTypes.weapon;
for (let weapon of weapons) {
const updates = {
embedded: {
Item: {
[weapon.name]: {
flags: {
"midi-qol": {
onUseMacroName: + ",[preAttackRoll]LivingShieldMacro", // Must change name here too if macro name is changed.
}
}
}
}
}
}
await warpgate.mutate(targetToken.document, updates, { name: "LivingShieldEffect" })
}
}
else {return;}
Just to test it out
the attempt to append the string in the midiqol onUseMacroName just makes it not add anything at all, and also i'm having troubles making it revert the mutation when the effect is deleted
Is there a reason that you use checks like if (args[0] = "on" && args.length === 2){}
Just grabbing lastArgs using const lastArg = args.at(-1); doesn't do it?
The change to the onUseMacroName, should be on the actor directly, not the item iirc
Either actor, or a DAE on the item which will be transferred on the actor afterwards
when a macro is called by dae's macro.execute, args[0] gives the string "on" or "off". I want it to check for that, and I have the eventual plan to have the same macro assume args[0] is a midi OnUse macro
Found an older example ```js
if (args[0]==="on") { //pass the token
const updates = {
token : {name: token.name},
actor: {
name: token.actor.name,
flags: {
'midi-qol': {
onUseMacroName: "[postActiveEffects]Reactive Damage",
}
}
}
}
await warpgate.mutate(token.document, updates, {}, {name: "Get close and burn"});
}
I've always found effect macros easier when making warpgate mutations tied to an effect being created and removed.
The comment I made in the start of the macro kinda breaks down my thought process
Idk, I was taking a stab at the dark with this macro, so I'm all for hearing about better ways to do this
This way works fine too
But with effect macros, you don't need to worry about the whole args nonsense
How so? What would I put there instead to check if the effect is being turned off or on?
Effect Macros has you select when to run the macro, so you can do the mutation on effect created
and the revert on effect removed
It passes you the token document already as well
So you don't need to do canvas.tokens.get
You can just do warpgate.mutate(token.document, updates, blah blah blah
i get errors doing it that way
where? I'm a bit confused because I've only noticed the args[0] mentioning that
I don't have that dialogue. Maybe I'm not updated on DAE?
it's a module
I should have specified
The DAE method you're using is totally fine too, I was just giving options
If I downloaded that module, would it be needed to run the macro should I use it to pass methods?
If you go this route, you do the macros in the effect instead of the item macro
There is no args
I'm a bit confused, but I think I'm alright with how I'm doing it regardless. I've run into another oddity however; the mutation to the actor's items all count as separate mutations, so I'm needing to run a revert multiple times to get rid of them all
Yea, you'll need to make it one big mutation
currently using await warpgate.revert(targetToken.document, "LivingShieldEffect" ) to do it
Instead of doing it one item at a time
I suppose that's the downside of doing it bugbear's way of for (let weapon of weapons)?
You can still kinda do it that way
Have the for loop go over everything and string them all together
then run the final mutation outside of the loop
your updates object is being defined within the for-loop and you are trying to access it outside the for loop -- e.g. updates = undefined when you try to actually use it
yeah, bugbear's version has it within the for loop, but now it's creating a separate mutation for every item. Wouldn't I run into that issue of updates = undefined if I did what Chris was saying, and put it outside the for loop?
i havent been following the rest of the discussion, just noting the issue in that one
but it looks like you want to create the updates object outside the for loop and add entries keyed by weapon name to the updates.embedded.Item property inside the for loop
Yeah I offered that as something to test, cause it seems you are trying to update multiple items and you were using [weapons.name] to mutate all of them in one take
So the question should be how does one mutate all the weapons on an actor to have a specific flag
That's why I imagine setting a flag on the actor itself as an actor onUse
so like this?
your mutate's options arguments are off by a position
(async, static) mutate(tokenDoc, updatesopt, callbacksopt, optionsopt) β {Promise.<(MutationData|false)>}
I have a macro floating around somewhere for one of the tattoos that mutates all weapons on an actor, sounds like a decent base for what you are trying to do without having read the entire conversation
i'm more than willing to take a look if you wanna share
fixed
Let me find it, looks like the only one I posted here was when it was still in progress
doing this way means i gotta adjust some of my ideas, but I think I can find a way to check if the attack was a weapon instead of trying to figure that out during the warpgate mutation
const lastArg = args[args.length - 1];
const uuid = lastArg.tokenUuid;
const hasEffectApplied = game.dfreds.effectInterface.hasEffectApplied('Eldritch Maul', uuid)
if (hasEffectApplied) return;
let effect = await game.dfreds.effectInterface.addEffect({ effectName: 'Eldritch Maul', uuid });
let actor = args[0].actor;
let relevantItems = actor.items.filter(item => item.type === "weapon" && (item.data.data.weaponType === "simpleM" || item.data.data.weaponType === "martialM"));
let mutations = {};
relevantItems.forEach(item => {
if(item.data.range === undefined || item.data.range.value < 15) {
mutations[item.name] = {
system: {
properties: {
rch: "true",
mgc: "true"
},
range: {
value: 15
}
}
};
} else {
mutations[item.name] = {
system: {
properties: {
rch: "true",
mgc: "true"
}
}
};
}
});
const updates = {
embedded: {
Item: mutations
}
}
await warpgate.mutate(token.document, updates, {}, {comparisonKeys: {Item: 'name'}, name:"Eldritch Claw"});
Its a bit messy, but it basically does Eldritch Claw
if (args[0].item.type !== "weapon") return;
But fotoply seems to be on the money. v9 though
ah lol not v9
has a bit of both π
Should be updated, works for my V10 player, might have forgotten a key though π
Also its messy, could be moved to use on/off as well as the relevant items filter can be done much simpler with the itemTypes
But this was written a long time ago and I never went back to revise it
if(item.data.range === undefined || i think item.data.range will always be undefined
if( (item.system.range?.value ?? 0) < 15)
can i talk about WIRE here
or #513918036919713802, either are fine
Is there a way I can hide the description info from players? Using Midi QOL I've figured out how to just display it as hit/miss and they can see the total damage on a hit, but it's been problematic quite a few times they can read the entire description on the attacks and it's given away some cool plot points. Any tips would be great thank you!
You want it hidden for players but visible for dm?
Yes if possible. Most important is text hidden from players. If I myself need to double click a sheet to check something that's fine, I just don't want them to see all that text. And with hundreds of monsters it's not really viable to one at at time delete all of it haha
I can think of 2 solutions, both may not be helpful for you.
- Midi > wokflow > misc (I'm on v9 so idk if it's changed in v10) > any option that doesn't include NPC
But obv that removes the npc ones completely
- Make your rolls always private GM roll (players won't see anything then other than damage application from your rolls)
Awesome I'll take it! Give me a moment to test that...
Yep already rocking that part. I let them see "hit/miss" and then the total damage already so that part is solid. Thanks for the help this has been wonderful!
Hi @gilded yacht β I just tried out your Emboldening Bond pre-made and itβs genius! Just wondering if itβs possible to still show the first DSN roll? Our group thinks the dice rolls are legit π
When I have an Effect origin on an active effect, how can I access it from an effect macro?
effect.origin?
oh it's that simple? kinda feel stupid understanding data structures π
Its not MidiQOL specific.
You will need to know which arguments effect macro module makes available to the user.
Take a look at the effect macro git. It has a really detailed readme
In Effect Macro, effect.origin is the uuid as always, origin is the actual document (if found)
Hi. I need step by step (explain it to me like I'm 5) instructions on how to integrate Lay on Hands with MidiQOL. All the instructions I find say "just use MidiQOL" and some script, but I really don't know what I'm doing. Please?
Well use the Lay on Hands which you will find in MidiQOL Sample Items compendium π
Joking aside, have you imported the item from the sample items compendium?
called it
I'll try again. Thank you.
can you show us what is going wrong with it when you use it?
the steps are pretty simple, things that you have to do with all items, link its consumption
Ok. When I do this, how do I activate it? If I want the PC to heal another PC? I've targeted the other PC, and tried using the dice next to the item, but it doesn't seem to do anyting.
*anything
do you have item macro installed?
to be clear, I'm not telling you to install it, I'm asking if it exists to fix it
@vernal palm β¬οΈ
do you have the module called Item Macro installed in your game?
ok thats a yes, go to configure settings, and find Item Macros settings and show us the settings for Item Macro
you also have redundant modules installed, is that Magic Items AND item with spells? just use Items with Spells Module
your issue is Characte rsheet hooks
uncheck that setting, and you should be good to go
Ok. Thank you. And I will uninstall one of magic items and items with spells.
make sure you hit the save changes button and not the close button
if you already use Items with Spells then magic Items module is very very lacking in functionality vs the other module
the only reason I'd keep it around is if your players sheets have a dozen complex premade items made, otherwise Items with Spells is just better
It might be wise if you don't want to recreate any of the items, to go into them and uncheck the magic items module box in them so the flag shuts off, cause modules like Tidy5e still pickup the MIM flag and falsely flag them as yellow when you don't have the module installed anymore.
I don't have players with complex premade items. I'll just stop using the magic items module.
let me know if it still fails to work but that should be the cause of it doing nothing when trying to roll it
Important side note that took me FAR too long to figure out. This macro doesn't work with NPC paladins because they don't have that primary, secondary, tertiary resource on the first page of player sheets. So if you want a friendly/npc pally with loh, use a player sheet to do this
It works now. Thank you so much for your help. I really appreciate it.
Could make a macro to nuke all redundant module flags... π€
I'm sure there are other reasons to do that Zhell, but this is just one of the only times its actually shown up as a confusing thing in my world, cause I had just uninstalled MIM without dealing with the premades, then went to the existing premades and made them Items with Spells, and then my players got confused by why tidy5e was color coding some magic items but not others. What I did, just cause I didn't wanna burn peoples time with such a simple task, was just reinstall it, go to the offending items and uncheck the box.
I bet you modules like Better Rolls for 5e have a ton of flag data sitting in peoples worlds
I wonder how much data that stuff takes up?
Some.
For very, very old characters, I'm sure it can be a lot. Generally should not be a concern, though.
And BR definitely. That module saved enormous flags.
I wound up making totally new characters for all my players when I updated to v10
To avoid having old junk flags on their sheets
I genuinely wish I had done that, maybe the week of christmas I can spend some time trying
is there a way to vew just flags on an actor? in the console?
I found one of my players somehow had a midi disadvantage flag for strength checks that was just set on the actor somehow
There's a handy helper, somewhere, to find all valid module ids. You can use that to nuke all invalid flags.
_token.actor.flags
ofcourse its that easy
There are some module devs who seem to... not know that they are supposed to use their module id as the flag scope though.
I'd be too afraid of active id's cause I have a scheme for prep and then a scheme for live play, and I'd be worried about prep modules flags getting stripped
Could find all ids of all installed modules, not just active ones.
suppose I could turn them all on for the macro
I got a rogue cub entry that constantly fires in live play, I really need to figure out how thats happening when virtually everything is off in cub
Ah dont forget about token.document.flags too
Do those stick around when you drop a new token down?
would you guys know how to figure out a modules name when the foundry console calls it something other than the official name?
actually oddly enough googles smart enough to figure that one out
Enhanced combat hud is Argon
Each module has their id in their Foundry URL, not their title.
There are some creepy leftovers in them too π
Just nuke it all
Not using 50% of the modules
That's very surprising
for me its automated polymorpher, argon, and splatter, not really an issue I don't think.
... why is there an about-face flag. Why does it need to remember that
I have no idea...
I don't think polymorpher was rippers module, wasn't that the other one with the name like his?
That one has seen 3 version updates iirc
What happens if you run this?
await token.document.update({flags: {}}, {recursive: false});
how do you have token hud wildcard flags on a player token lol
Why wouldn't you?
I used warpgate for all their image changes for the players
wildcard I used for npcs
actually not warpgate, ATE
nothing as far as I can see
That's specifically a module that lets you change the wildcard token from the right click menu on them
So 13 out of the 20 or 21 flags are from modules not active or not installed
await token.document.update(Object.keys(token.document.flags).reduce((acc, key) => {
acc[`flags.-=${key}`] = null;
return acc;
}, {}));
do it 
oh no I love this token.doc, holds so many memories
Let it go, man
For others this will nuke everything... not ideal, don't use it at home
Nice
I would go through active modules and exclude corresponding flags to be safe
const scopes = token.document.constructor.database.getFlagScopes();
pictured: smol
This is just active modules, though. Not installed.
We have something in common. The first 2 digits of the length...
I was half expecting a midi flag in there hehe