#MidiQOL
1 messages ยท Page 68 of 1
you could change the Symbiotic Entity to whatever your effects name is
I think Chris made this
I'm gonna test it now! Thanks!
I run this in the worldscripter module cause its a safe hook to run with
I believe I have a manual way of catching this too but I can't remember
cause this only applies if you are using midi auto damage application(or manual with damage card)
Really? So i think it wouldn't work. I don't use that
I'd probably argue what is the point of the overtime then if you aren't using midi for damage
why aren't you?
most people misidentify midi's damage section as "automated damage" when it is not and just shut it all off not realizing theres more nuance to the whole section
The circled drop down is the only thing related to automated damage application. You can do NO + Card and reap the rewards and benefits of midi automation while still being manual.
The system I use is not DnD5e, it's a homebrew based on DnD5e with a lot of things different and some things are just impossible to configure with the DnD5e and automated would just be in the way. Or I just don't know how to do it hahaha
Really? I didnt know that
I'm gonna test it
then whenever you apply damage via the chaser damage card, thats workflow damage and the world script would trigger
I'm automatic but a manual would have to go in and click the checkmark button in the damage card to apply damage(or change the drop down to apply half/heal/whatever)
personally I do automatic and just undo any damage that is wrong
it is far less likely that midi is wrong so its better to auto apply and undo the rare cases
plus having to make sure the players adjust their hp is annoying
Is DamageOnlyWorkflow only supposed to be use with OnUse macros? When I try and use it to do FireShield/Armor of Agathys stuff on the preDamageRoll hook, it applies the damage to the source actor/token rather than the hit targets.
Man... I'm testing it and... I don't know WHY I don't use it... It just applied the damage and took in consideration the resistence the actor have... it's wonderful!
Sounds like you might be passing the wrong arguments to it, what does your macro look like?
actor,
token,
damageRoll.total,
damageType,
hitTargets,
damageRoll,
{
flavor: `${action.item} Damage`,
itemCardId: action.itemCardId,
itemData: action.item,
useOther: false
}
);
Gonna need more of the macro to see what the values of the variables are
you can't use actor and token like that can you?
unless you have advanced macros
v10 does not like it when people use actor and token yeah?
True, but it should be throwing "cannot reassign constant" errors if they don't have Advanced Macro's and try to assign them, IIRC
advanced macros will mask that and let you fwiw
actor/token are from the actor with the fireshield, hitTargets is the array with the token that triggers this retributive damage
I've checked this 17 times. If I replace the actor/token with the data from hitTargets[0], it applies the damage but then the card is all fubared like:
Booming blade implementation has the same issue...
And you are saying that if you move the same code to be performed in a later step it works? ๐ค
Sneak attack uses the same exact code and shows a good card without having to monkey with the actor/token parameter
Works perfect! Thanks a lot for this ๐
what sneak attack is that? Sneak is a damage bonus macro in samples issn't it?
My own sneak attack that is an onuse macro
chaser damage would induce additional conc checks
Yes, it isn't perfect but one has to balance vs "I didn't want sneak attack on that one..."
the midi sample that is NOT auto prompts the player if they want to use it on each attack
theres a manual and auto version in the samples
oddly enough the auto requires the manual which is a really nuanced missing step when setting up auto
Agreed my sneak attack sucks. However, it shows the damageOnlyWorkflow working vs the others that are goofy
Have you tried this? @opaque patrol
I'm not sure what you mean since the code in question is running off of either an UpdateActor hook or a preDamageRoll hook on an incoming attack.
Yeah honestly sorry for sidetracking the convo, just wanted to let you know there was a good viable alternative that is very accessible to you is all.
Yup, no worries
The mention of a preDamageRoll hook on an incoming attack has me worried!
Does it trigger on the same client?
GM only
Yeah the preDamageRoll will be triggered by the client making the attack
Not the receiver
I am missing context but just my 2 cents
GM only stuff is the devil I know, but it seems to get the right damage to the right place.
Could you print out all the values?
sure, gimme a minute
That worked good. Thanks!
I have a weapon that's supposed to deal 1 damage to the wielder of the weapon if they're not Good Aligned. Is it possible to set that up with Build A Bonus?
Deal that damage every time they attack with it.
Oh that could be a midi on use fwiw, reminds me of my janky life transferrance spell
heals target and nukes self
This is a Fire Shield I had made, but I am not sure if its the latest version (Not at my PC to check) <#1010273821401555087 message>
I just use the dfreds CE one, I probably am missing out on stuff but /shrug
I just say Dfred take the wheel and go with it lol ;p
To the wielder of the Weapon is an Item onUse 2 lines
How do I do that?
const {tokenId, damageTotal, itemCardId} = args[0];
const sourceToken = canvas.scene.tokens.get(tokenId);
const sourceActor = sourceToken.actor;
const necroDamageTotal = 0.5 * damageTotal;
const necroDamageRoll = await new Roll(`${necroDamageTotal}`).evaluate({async:true});
new MidiQOL.DamageOnlyWorkflow(sourceActor, sourceToken, necroDamageTotal, "necrotic", [sourceToken], necroDamageRoll, {flavor: "Life Transference", itemCardId});
RL issue popped have to divert a few minutes.
I imagine the self damage would be a const of the damage amount and then my "new MidiQOL.DamageOnlyWorkflow..." line
Yeah... actually it can. Assuming you never ever ever cancel an attack roll
wouldn't he need 3 lines since he has to define the target?
I can live with that.
oh duh the damage is just an integer
Custom script filter. actor.applyDamage(1); return true;
or for MidiQOL ```js
if (!args[0].actor.system.details.alignment.toLocaleLowerCase().includes("good"))
await MidiQOL.applyTokenDamage([{damage: 1, type: "necrotic"}], 1, new Set([token]), args[0].item, new Set(), {}); //inside the last {} you can pass forceApply:false if you don't want the damage to auto apply.
Absolute abuse of the intent of the filter but that's what you kids are all aboot
That seems like that'd just do damage to anyone who uses it, and not exclude Good Aligned characters.
Oh sure, just add that in the filter, too
Its not abuse, its just letting the creativity flow ๐
if(!actor.system.details.alignment.toLocaleLowerCase().includes("good")) actor.applyDamage(1);
return true;
Haha, I'm using an official weapon. It's the Magic Axe from Yester Hill in the Curse of Strahd module.
must be not good
OK ๐
Absolute abuse. Disgusting. I am taking my otters and Steves. Good day, sirs, I say good day.
come back, its so fun when one finds ways to abuse a system/module in ways the author didn't expect!
Creativity 101 ๐
Doh, it's doing the opposite, haha. How do I get it to apply it to non-good characters?
The real question is which way had the least characters
I think Zhell wins
except that I think zhells would bypass midi's damage management right?
What do you want it to do?
I think that's what it does? If not "good" in alignment, 1 damage
Right now it's applying the damage to Good aligned characters.
if the damage is of a type that should be immune then midi manages that, but zhells doesn't right?
?
Sorry, what's the question?
That is what we were trying to emulate. What you asking in this one
If the wielder in NOT good, takes 1 point
Right, it's dealing damage to Good Aligned characters.
It should be not doing that, and dealing damage to characters who are not Good Aligned.
can you post the script you're using?
if(!actor.system.details.alignment.toLocaleLowerCase().includes("good")) return false;
actor.applyDamage(1);
return true;
It's the one Zhell posted, verbatim.
lol that's before the ninja edit of Zhell
Get the one for MidiQOL if you care about damage reduction or application of damage
and use that insted the actor.applyDamage(1);
Item Macro, and then at the bottom of the item On use: ItemMacro
in the on use field do ItemMacro
Why are we not using a on-use damage bonus for this btw? ๐ค
cause its self harm
Oh, I didn't realize that part
smack target, hit self too
another reason why I think you want midi is conc checks?
would the bab one prompt a conc?
the bab one does prompt conc cause concentration checks fire off manual hp reductions too
Sorry for the delay. Here is the parameters that go into my call that goes the wrong way (I substituted id for data for brevity). In this case, token 'w7...' gets the damage, not '9u...'.
actor: "Urz4iwg8ijxaEoFW";
damageRoll: Roll { data: {โฆ }, options: {โฆ }, terms: Array(1), _dice: Array(0), _formula: '15[cold]', โฆ }
damageType: "cold";
options: { flavor: 'Armor of Agathys Damage', itemData: Item5e, itemCardId: 'new'; }
targets: ['9uoylLSUnlLtu5jW'];
token: "w70MfQI2jaTlBdWn";
total: 15;
}```
๐ค
I thought maybe it had something to do with what tokens were targeted at the time of call, but in my booming blade instance I'll have nothing targeted and the damage still goes to the initial actor/token rather than what is specified in the [targets] array
Well the workflow should not be limited when it can be called, in terms of hooks
So I am not sure whats going on
I was hoping it was something obviously wrong I was doing. Sigh.
Thanks, I like coding my own sometimes - keeps me off the streets.
it seems both chris and mr primate have one, if you want inspiration for ways of going about it.
I'm not sure who chris is
Sources of premade stuff for Midiqol:
Midi Sample Items Compendium(comes with the module)
Midi SRD's compendiums
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json
More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats
Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros
Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros
Activation condition examples by ThatLonelyBugbear
#1010273821401555087 message
Been through some of that, some is new to me. Thanks.
MASIF is a lil on the old side of things but theres a few gems in there, I repurposed his circle of mortality feature for the Beacon of Hope spell
Mostly I keep them all on speed dial so that I can look through them for examples on how to do something
oooh I gotta add the activation conditions tutorial that Bugbear just made
I'm all about hoisting code to speed learning.
I will need to put more in there. Tomorrow
Or a part 2 for workflow options etc
ping me if you have to make a second one
I will put a link in the first post too
also the fail/succeed by more than 5 thing is not there I think yet, thats a popular request
Yeah I haven't touched any workflow options yet
need to dissect how chris is doing his dialog and see if I can make an example out of it for example display
Any examples of 5e Items that would need an activation condition, other than the ones in midi samples?
I want to make some as examples
I have the spirit shroud's or whatever that name is
can sub types be done? Like Goblinoid?
psst, https://hackmd.io/ ๐
Oh yes, Moto this is your weekend homework ๐
if the source actor is using a weapon with the reach property?
I'm grasping at straws for ideas I dunno if thats even one lol
ooh
if the prior workflow was an action type
bah we're getting too far into the weeds
let it organically grow
as you get asked to make an activation condition thats unique just toss it in there
This wonky behavior shows up every time I use DamgeOnlyWorkflow outside of the regular on-item-use workflow.
You can invoke a new DamageOnlyWorkflow even from the console, for example ```js
await new MidiQOL.DamageOnlyWorkflow(_token.actor, _token, 5, "temphp", [_token], await new Roll("5").evaluate(), {flavor: "look at that"}); //to be used in console with a token selected...
I'll have to spend some time looking at how folks are using this to see what subtle difference there is in my use.
And if you modify the above to take your targets it also works:
await new MidiQOL.DamageOnlyWorkflow(_token.actor, _token, 5, "temphp", [...game.user.targets], await new Roll("5").evaluate(), {flavor: "look at that"})
And that is how I thought it worked, but I still get the weirdness in my hook uses. Gotta spend a while looking through code before I make another guess.
@violet meadow
Activation condition request lol
The target is grappled (escape DC 14) if it is a Large or smaller creature and the chuul doesn't have two other creatures grappled.
Both parts or just the larger or smaller?
I mean if you can pull off both parts that'd be pretty dang amazing but I'd settle for large or smaller
its more a thing for him to add to his lil tutorial
arent all PCs large or smaller?
not if they polymorph to trexs or giant apes 8)
lol, fair
Rune Knights have a way of being huge too but we're getting technical
also a player could dominate them to attack a huge thing
๐ค I feel like this should work, but it doesn't seem to
target.traits.size !== "huge" && target.traits.size !== "grg"
I wonder if traits are not populated, that would be weird though
traits changed in 2.1 are you on 2.1 dnd5e?
Oooh, I'm still on 2.0.3 ๐ค
thats good cause so am I lol
But it should still work on my local.. I think? ๐
are you on midi 24 or later?
Cause I found the path by inspecting the object
midi 24 is the last 2.0.3 guarenteed safe midi
Yeah 24
Guys, I don't know why but this effect only applied the Paralisado (paralyzed) effect and don't applied the Amedrontado (fear). Can someone help me?
Hmm, something is really wrong with my Foundry, let me just reload
this is a known bug with midi, it can only do 1 condition per overtime
you can cheese it if you have cub or dfreds
I have CUB
make the second key macro.ce or macro.cub
and you should get dfreds CE cub is...only good if you are super invested in it
dfreds Ce+midi is a much smoother ride than cub+midi
you can also do all 3 if you want 3 status effects but you really gotta be careful when you enable enhanced conditions in cub
it needs to have all its conditions deleted and you gotta make a fake "Frighttened" or something so that dfreds doesn't get confused.
how do you turn on attribution in midi and where does it show up? I only know how Advantage reminder shows them
The homebrew system I use have more conditions than DnD and I have to translate all that to brazilian portuguese
its a bug with conditions and overtime effects, but you can use macro.cub to get a second one, but beware its very finicky and you are exploiting bugs to solve a bug
Alright, I figured it out, it does work (on 2.0.4 at least)
target.traits.size !== "huge" && target.traits.size !== "grg"
@vast bane
I was just a dumb-dumb and forgot to check "Roll other".. Figured it out when the activation condition true didn't work ๐
Works! Thanks!
it might only work the first time you use it I dunno I do know its not 100% success
Theres a ton of poisons that do 2 conditions and its annoying having to use this workaround
D;
Another way to do the not Huge or Gargantuan activation ```js
["tiny","sm","med","lg"].some(v=>target.traits.size.includes(v))
Mind you this is on actor, so token sizes won't matter ๐
Now if you want tokenSize hmm ```js
["0.5","1","2"].some(h=>h == workflow.hitTargets.first().document.height) //square tokens only and only against 1 target.
//small and med both are both 1
//can do [CONFIG.DND5E.tokenSizes.tiny,CONFIG.DND5E.tokenSizes.sm,CONFIG.DND5E.tokenSizes.med,CONFIG.DND5E.tokenSizes.lg] instead
(when you think you had hit sent...)
Wouldn't it be better with a < comparison, in-case a token is a non-integer size for some awful reason
can't you do tokensize > 2?
I see that great minds think alike ๐
can do whatever you like ๐
cause nobody does sub 1 the same
I was just being explicit for the example
Was referred here by the Macro-Polo folks, but I am using DND5e and I have Midi and DAE. I am looking for a macro to fit a custom ability that affects a custom primary resource called Holy Power. The point spending abilities would work like normal where they would pull from the primary resource, no problem there. The difference though is that the resource has 3 resource generating abilities which increase the holy power. The points should drop to zero after an LR or SR, as well as dropping to 0 hp.
The ability description is : In combat, when you make a successful melee attack with a two handed weapon against an enemy you generate 1 Holy Power.
I have created the resource point value increase in the advancement tab for level 3/7/15 with a maximum of 4/5/6 respectively. The resource attribute name is below, but I was informed you can't use a negative consumption on resources.
@scale.retribution.holypower
So currently it seems to be working halfway, but the resource keeps going beyond the maximum. Furthermore, its only supposed to add a point on a successful hit, and its adding a point just on use. I would like to make it work perfectly to not have to remember adding and subtracting resource expenditure and generation. Any assistance would be greatly appreciated, or even some in game support to fine tune and tweak some of the items for this new subclass I have made. Also wouldn't mind helping out a Kofi or Patreon ๐ .
i can actually help a little with the resource going beyond maximum, that just requires a Math.min(maxValue, newValue) in the update. for the succesful hit, my midiqol is way too rusty i havent made a new macro with it in about half a year, and LOTS happened in that time
So Math.min(maxValue, newValue) this would need to be inside the macro?
yeah where maxValue is what the resource can be maximally, and newValue is what you are trying to set it to.
but preferably if you know the value is already at max, you should have an if at the beginning of your macro that returns out of it
no need to do a lot of things if it isnt needed
i know there is something in the workflow about crits and fumbles, is there something about hit success too or was it just that the hit targets set?/array? wasnt empty (very rusty memory ๐ )
this is where you are gonna need the big brains ๐
It was only added if hit=true
theres a weapon that builds statcks on hit in midi sample items that might be worth looking at
There is a set of hit targets
the biggest brain move, stea... copy existing work!
you could also steal my world script from earlier and attach it to the resource instead of the active effect
What is your current macro? Should be pretty easy to modify it to make it work
change it from looking at tempHP to hp.value
if you don't apply damage in midi then honestly...you gotta go back to macro polo lol
unless you need help checking hits
^
but the reset at 0 hp thing is totally doable with my worldscript
For exiting out early if there is no targets hit:
if (workflow.hitTargets.size === 0) return;
Oh tbh, I hadn't even started anything yet.
Was attempting to use the options before making a custom script, which is my least experienced skill set in Foundry ๐ญ
Ah okay, let me see if I can't make something up ๐ I assume you want this as an item macro that is run whenever the specific weapon is used
Correct, a 2 handed weapon must be used.
So any two-handed?
These were the 3 generated abilities
Its any two hander
Crusader Strike and Blade of Justice I am wondering if they could be separate items in the directory but run off the same macro to check for 2 hander and smite?
Because I believe the point generation was meant to stack
Hmm, detecting divine smite is not straight-forward, I'll start out with the two-hander version
Anything is helpful at this point
How do you make MidiQOL's rolling as similar to the deprecated Better Rolls 5e as possible?
You don't, you have a hard decision ahead of you
Alright, here is the one for Crusader Strike @tepid dock
const item = args[0].item;
const user = args[0].actor;
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
if (workflow.hitTargets.size === 0) return;
if(!item.system.properties.two) return;
let currentValue = user.system.resources.primary.value ?? 0;
let maxValue = Number(user.system.scale["class"]["max-holy"]) ?? 0;
if(currentValue >= maxValue) return;
user.update({"system.resources.primary.value": currentValue + 1});
It needs to be in a on-use macro, in any pass after the attack roll has been made
OH WOW! Super quick! When you say on-use, where should the script live?
item macro probably, if you have to install it, make sure character sheet hooks is off
Oh right, also make sure to update ["class"]["max-holy"] to match the scale value you created and "system.resources.primary.value" to point to the resources you want to use
The easiest is to create it as a normal hotbar macro, with a distinctive name, then give the feature that adds it an effect with the following key
Here? Where is character sheet hooks.
in the modules settings
Item macro is its own module that midi hijacks as a storage device
ooohh its a feature not a weapon
yeah do what fotoply says
I didn't realize it was a feature
Yeah its on all attacks, regardless of weapon ๐ (two handed only) I didn't realize that at first either
I'd store it as an item macro on the feature and reference it in fotoplys effect value
(his is preDamageRoll fyi)
I'm just showing how to reference an item macro in that flag
I found that if you aren't specific enough on actor on uses, that you can get your stuff firing on unintended actions
Details tab look ok?
Thats an effect ๐ค
^
because you are editing an owned item confirm that you only have 1 effect on the actor by that name when you finish making that
hows this
Player and GM but you do NOT want to reuse them
in midi it is really shitty to reuse the attack/damage buttons cause you lose automation with them
(I leave them for manual use in edge cases)
Thank you!
(Oh that was actually a hit go ahead and roll damage)
That should work, assuming the macro in the hotbar directory is named exactly crusaderStrike (capitalization matters)
I do know camel casing
theres a GM and player setting for it beware and the apply active effects button can also be set to stay in the workflow tab/specials section first drop down
Good good ๐
is your macro a folder macro or is it on the feature as an item macro?
in the macro directory
Not as an item macro
my problem with player specific stuff like this, is that it won't carry to a new world now. If you set it in the item macro on the feature its for, then it carries on imports/new actors
Should any of this be changed?
Would it be an issue if I did both?
plus after a while your folder macros are a disaster zone
It shouldn't need to be an attack, just a passive feature
the feature is basically a storage device really
So not even an action?
it has nothing of value to it so just leave it or make it a generic item no action type, no action economy
if you wanted to cover all bases you could make it roll a manual strike or something of the bonus damage but I wouldn't bother, midi never fails (/s)
Just trying to think about how to do the Blade of Justice one, how are you currently doing Divine Smite?
So class is Paladin with a subclass name of 'Oath of Retribution' so which would I put there? The Max Holy is holy power that scales to a max of 4/5/6 at levels 3/8/13, so will I need to change the value at each level? Lastly, the resource name is @scale.retribution.holypower do I still need the .value at the end? ex. @scale.retribution.holypower.value
Hmm, I assumed you were using the 3 resources at the front of each sheet, is that incorrect? ๐ค
your resource you have it pointing to is what you put there, not the scale value
the scale value is for purely just the max field of said resource
when making a macro it needs to point to the resource
maxValue in the macro is ok if he replaces it with the scale value of the class
Oh so I keep the system.resource.... line in there?
const item = args[0].item;
const user = args[0].actor;
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
if (workflow.hitTargets.size === 0) return;
if(!item.system.properties.two) return;
let currentValue = user.system.resources.primary.value ?? 0;
let maxValue = Number(user.system.scale["retribution"]["holypower"]) ?? 0;
if(currentValue >= maxValue) return;
user.update({"system.resources.primary.value": currentValue + 1});
Should do it then, looks like you are using the "primary" AKA first resource field ^^
If Holy Power is the primary resource sure, it looks like it is in your snippet
yes it is
maxValue could totally just reference the max of system.resources.primary.max
How does foundry know that title: "Holy Power" = 'holypower'
cause he has an active effect setting up Holy Power
the 4 is actually the scale value in his snippet
Thats a good point
I remember showing him how to do that
Quick re-write coming
if hes making the class to distribute, then he also may want to consider all of this being on the feature instead of a folder macro so it distributes to other worlds/games
I wasn't planning on it
K wasn't sure if you were one of those guys
hahahaha
theres been a few in dnd5e chat makin homebrew modules
No, its just something im doing for a player request for Campaign 3
Also referencing the max on the resoruce would allow for flexibility if you have homebrew that modify his holy power like a class specific artifact. I do precisely that for alternative rewards in campaigns, my barbarian gets an additional rage and my druid gets an additional wildshape and its a modifier to the scale value so referencing the scale would not catch that
Maybe ill steal this idea ๐
I stole it from...The DM Lair guy on youtube
alternative ways to reward your players is the name of his video
I also give my druid custom wildshapes
She has a dog thats basically a gloomstalker and a cat thats basically a human torch
hahaha
thats good
Also I should ask if this would affect anything or if I should leave it as is.
this is fine, I think that multiclassing could cause issues if you have another class that tries to adjust the primary
the only one I can think of is Pally lay on hands
and only if you use the midi one
I'd make yours the secondary resource since lay on hands comes first
pally subs are level 3ish I think?
I use the midi LOH.. when I update the module do I need to reimport from the compendium to the directory?
um he usually says if he adjusts any premades
ahh ok
honestly he hasn't really done much since 2.1 with premades I think hes kinda backlogged getting things fixed in 2.1
I think crymics loh is the best of them, midi's just lacks the curing of poison/disease conditions
^ I use Crymics Divine Smite
you can realy just add the cure in if you use dfreds CE pretty easily I think
const item = args[0].item;
const user = args[0].actor;
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
if (workflow.hitTargets.size === 0) return;
if(!item.system?.properties?.two) return;
//Change this to primary/secondary/tertiary depending on which you use
const maxValue = user.system.resources.primary.max ?? 0;
const currentValue = user.system.resources.primary.value ?? 0;
if(currentValue >= maxValue) return;
//Update primary here as well to match above
await user.update({"system.resources.primary.value": currentValue + 1});
Anything I need to change here?
change all instances of primary to secondary if you do intend on making it compatible with lay on hands from midi/crymic
^ Only that
Awesome! Test1 incoming
but also edit your ae that set it to primary then
Is Crymics Divine Smite a separate feature that you have to use after the attack or is an automatic dialog thing?
I use chris' which is built into the workflow fully
pre damage roll leads me to believe its a goodun
So where can I pay you?
No payment needed, coding challenges are fun ๐
This works like a charm! Generates up to the max, doesn't go over, and only does it on hit! Exactly what I need for this ability.
did you get the drop to 0 reset done yet?
Oh ye, this part isn't in there. Would that be more on the Holy Power feature itself though?
Okay, so looking at the Divine Smite one from Crymic, it looks like you have to click it when you want to use it, after each attack? ๐ค
Oh sure, because smiting is an after confirmed use.
So its essentially if smite used = true, add 1 more holypower
Chris' will prompt you before it puts the damage workflow in chat if you want to use it and then adjust from there
I could use either, It wouldnt matter to me
Well this one is pretty easy to modify then to make it work the way you want
Shouldnt the 2 middle keys make it 0 on rest?
Also I just realized a bug in the code I posted, fixing and reposting! ๐
Updated #1010273821401555087 message @tepid dock
what was wrong?
I broke rolls for items that didn't have a properties field, AKA spells ๐
Like it would brick the workflow, cause exception ๐
I did the same thing while making my beacon of hope, it kept breaking other action types while beacon of hope was going lol
had to phone-a-bugbear to figure it out
So in the last image I posted, shouldnt those 2 keys drop the holy power to 0 on am LR or SR
Variation, setup the same way as the other as an on-use macro, that should make it so that you get more power when you smite:
const item = args[0].item;
const user = args[0].actor;
if(item.name !== "Divine Smite") return;
//Change this to primary/secondary/tertiary depending on which you use
const maxValue = user.system.resources.primary.max ?? 0;
const currentValue = user.system.resources.primary.value ?? 0;
if(currentValue >= maxValue) return;
//Update primary here as well to match above
await user.update({"system.resources.primary.value": currentValue + 1});
(This needs to be added separately, but the steps are the same)
you should just cause theres always a chance when the player gets their feature for the first time, they have some rando m dumb thing in the second slot
overriding them to off would be wise like you have
smite is tied to holy power?
Wow thats a powerful class
even worse if its a pallock
Thats what the text blob that was posted says ๐
even worse if its a hex dip pallock lol
my problem with OP builds is that it gives me no room to shower them with power over the course of the campaign
Yea it generates a holy power for a successful hit with a 2 hander, plus an additional point if smite was used.
And actually, the same method above can be used for the level 7 feature as well, with some minor changes
const item = args[0].item;
const user = args[0].actor;
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
if (workflow.hitTargets.size === 0) return;
if(item.name !== "Wake of Ashes") return;
//Change this to primary/secondary/tertiary depending on which you use
const maxValue = user.system.resources.primary.max ?? 0;
const currentValue = user.system.resources.primary.value ?? 0;
if(currentValue >= maxValue) return;
//Update primary here as well to match above
await user.update({"system.resources.primary.value": Math.min(currentValue + 3, maxValue)});
(This assumes that Wake of Ashes is its own "thing" that you activate, just like smite is right now)
It will be a feature that takes an action, replacing an attack via measured template
Yeah then the above macro in an on-use should work
agreed, thankfully none of my players are min/maxers and enjoy the RP more
So to sum it up, the features in regards to increasing holy power described in #1010273821401555087 message can be solved with the following 3 on-use macros:
Crusader strike:
#1010273821401555087 message
Blade of Justice:
#1010273821401555087 message
Wake of Ashes:
#1010273821401555087 message
All of them needs to be configured to point to the right resource field (primary/secondary/tertiary) and setup as an on-use macro that runs at some point AFTER the attack roll (preDamageRoll is simplest).
the reset of holy power on unconscious you could probably pull off with my world script or just by adding a reset to resource effect macro on the dead and unconscious conditions in dfreds CE
If resource named Holy power exists on actor, reset to 0
@vast bane @kind cape thank you both so much!!! seriously this is a huge help! If you guys have patreons or kofi I would be happy to pay for the hard work! Thanks a ton!
Just realized the Wake of Ashes is only if at least one guy does not save, so just making those changes, don't copy the code yet! ๐
Oh wait nvm, it does not require any of them to fail their saves
So it does work, as written
Yea its only on any one single hit landing
With that being said, you will have a hard time fitting that into a template, I would recommend just making it a "normal" attack with no target limit, so that they can just target the ones that are in the "area" and click it
I do that for a bunch of template spells, mass cure wounds to name one
Slow is another
templates with a max target count
Where is this option in Dfreds
um, not sure how to make the effect macro if fotoply wants to continue here. But it'd be an on creation effect macro for dead and unconscious.
install the module Effect Macro
then you get the new feature in dfreds in the bottom right of the first tab to add macros for various events, you want an on creation one that will check if the actor has a resource called Holy Power, if yes, set .value to 0
Whats the effects thats supposed to happen/when?
if the paladin is ever unconscious their holy power resets I believe?
same with LR or SR
LR and SR can be Effect macros on the active effect that sets the resource up
You could also use the 0 hp effect macro trigger but you can fall unconscious with more than 0 hp
if you wanted it all to be attached to class items, I'd install effect macro and put it all in the feature that controls the max resource of the holy power
it'd be the same macro, but in 3 places, setup one for On combatant marked defeated, on short rests, and on long rests
this assumes you are using auto defeat at 0
I dunno if midi defeats player characters
All 3 of those could just be Effect Macros triggered at the right time, EM has a trigger for long/short rest, and the unconscious could be an on-create on the unconscious effect, the same code applies to all of them:
if(token.actor.system?.resources?.primary.label !== "Holy Power") return;
await token.actor.update({"system.resources.primary.value": 0});
(And again primary needs to be changed to the correct resource field that you use ๐ )
I really should write it in a generic way where it finds the field on its own ๐ค
So would I need to make additional items for each use case?
For unconscious you need to duplicate the existing one in DFreds, as DFreds prioritizes custom effects over built-in. For the others you can put them on any effect really, including a shared one, though it of course needs to be active at all times on the actor.
it has to be on an effect thats always on, which would be perfect for that one you have that sets up the resource pool
for the SR and LR flags in effect macro
you could also try just using the third one which is on combatatnt marked defeated
before messing with the unconscious
That probably will work yeah ๐
I don't know if midi auto defeats players
theres no dead on the player usually, but isn't defeated technically not dead? its a combat tracker thing?
This might be a question for Zhell honestly, its his module/flag
we should probably confirm you are not using cub alongside dfreds CE
do you actually have anything invested in cub?
like are there 30 custom conditions built in it?
if you don't, then go into CUBputer in the settings side bar and turn off enhanced conditions
honestly if it were me, I'd even do it if it had 30 customs built in it. Dfreds UI is simpler and they do the same thing
if enhanced conditions is unchecked we guchi. Ok right click the dead and unconscious conditions in dfreds lil hand window in the left hand scene tools and duplicate as custom
it should open them to edit automatically, add the same macro to the dead and unconscious but add them in the on creation
these are only necessary if Zhells hook for mark defeated is not what we think it is
He'll chime in when he sees this I'm sure
change anything?
just the on creation effect macro is all
do unconscious too
cause midi typically auto unconscious' players
I'm a lil unhappy to have to lean on external changes for the class but you should be fine. I bet you Zhells defeated flag would have done it too
It does in the combat tracker
if I hit the dead icon there it wipes it
But this is nice because I dont always use that one
yeah I just tested, Zhells hook is for defeated. Midi does not defeat players
it unconscious's them
so you do have to use the 2 custom dfreds to cover your bases
plus defeated only happens in combat, your pally could go down via a trap or totm too so its better to capture it at the dead/unconscious.
So after consulting with #macro-polo I made an update version of all the macros that work without having to specify the resource, the name just has to match ๐
Crusader Strike:
function getResource(act, name) {
return Object.keys(act.system.resources).find(k => act.system.resources[k].label === name);
}
async function updateResource(act, name, newValue) {
return act.update({[`system.resources.${name}.value`]:newValue});
}
function getResourceValue(act, name) {
return act.system.resources[name].value ?? 0;
}
function getResourceMax(act, name) {
return act.system.resources[name].max ?? 0;
}
const item = args[0].item;
const user = args[0].actor;
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
const resourceName = "Holy Power";
if (workflow.hitTargets.size === 0) return;
if(!item.system?.properties?.two) return;
const resource = getResource(user, resourceName);
const maxValue = getResourceMax(user, resource);
const currentValue = getResourceValue(user, resource);
if(currentValue >= maxValue) return;
await updateResource(user, resource, currentValue + 1);
Blade of Justice:
function getResource(act, name) {
return Object.keys(act.system.resources).find(k => act.system.resources[k].label === name);
}
async function updateResource(act, name, newValue) {
return act.update({[`system.resources.${name}.value`]:newValue});
}
function getResourceValue(act, name) {
return act.system.resources[name].value ?? 0;
}
function getResourceMax(act, name) {
return act.system.resources[name].max ?? 0;
}
const item = args[0].item;
const user = args[0].actor;
const resourceName = "Holy Power";
if(item.name !== "Divine Smite") return;
const resource = getResource(user, resourceName);
const maxValue = getResourceMax(user, resource);
const currentValue = getResourceValue(user, resource);
if(currentValue >= maxValue) return;
await updateResource(user, resource, currentValue + 1);
Wake of Ashes:
function getResource(act, name) {
return Object.keys(act.system.resources).find(k => act.system.resources[k].label === name);
}
async function updateResource(act, name, newValue) {
return act.update({[`system.resources.${name}.value`]:newValue});
}
function getResourceValue(act, name) {
return act.system.resources[name].value ?? 0;
}
function getResourceMax(act, name) {
return act.system.resources[name].max ?? 0;
}
const item = args[0].item;
const user = args[0].actor;
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
const resourceName = "Holy Power";
if (workflow.hitTargets.size === 0) return;
if(item.name !== "Wake of Ashes") return;
const resource = getResource(user, resourceName);
const maxValue = getResourceMax(user, resource);
const currentValue = getResourceValue(user, resource);
if(currentValue >= maxValue) return;
await updateResource(user, resource, Math.min(currentValue + 3, maxValue));
Reset on incapacitated/rest:
function getResource(act, name) {
return Object.keys(act.system.resources).find(k => act.system.resources[k].label === name);
}
async function updateResource(act, name, newValue) {
return act.update({[`system.resources.${name}.value`]:newValue});
}
function getResourceValue(act, name) {
return act.system.resources[name].value;
}
const name = "Holy Power";
const resource = getResource(token.actor, name);
if(resource === "unknown") return;
await updateResource(token.actor, resource, 0);
So I don't actually use any flag; Effect Macro simply listens for updates to a combatant. As you've seen, it works when a combatant is marked as defeated in the tracker. Whether that involves having the "dead " condition applied is irrelevant.
Marking as defeated should (at least in core) apply the dead condition, but the inverse isn't technically always true.
Really minor nitpick: You'll want to return those async calls in your small async functions so they actually return a promise
I just realized we could use macro.actorUpdate for this as well, if we didn't want to modify the existing incapacitated effect. Might be worthvile to make it portable
yeah and after we thought about it more, we couldn't really rely on in combat as you can get knocked out outside combat too
Minor but you're right, fixed ๐
(and no need for return await lol)
I may be a bit sleepy, its late ๐
Doesn't hurt, just doesn't do much lol
Fixed that as well
Hey can anyone help with spell effects to auto apply buffs for a bladesinger wizard in 5E
Sources of premade stuff for Midiqol:
Midi Sample Items Compendium(comes with the module)
Midi SRD's compendiums
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json
More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats
Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros
Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros
Activation condition examples by ThatLonelyBugbear
#1010273821401555087 message
magic weapon I think is in midi srd
I forget bladesongs stuff but its basically just a feature you roll to get a bunch of buffs at once so it shouldn't be difficult to find here somewhere
dnd5e likes to suggest a calculation for it but its better as a bonus since midi users have DAE
Bladesinging can pretty much be done with just flags in the DAE interface.
isn't it like ac bonus, advantage on conc checks and dex stuff?
I forget but dae should help you immensely
theres a magic weapon on use macro in ddbimporter link above, but I'm pretty sure theres also one in midi srd
I handle it with advantage reminder lol simpler if you don't fast forward
Dynamic Effects using Active Effects
"DAE SRD" is a module that gets confused with it and is 1000% a dead module you should not install
looks like both the premades just use dae/midi to make the magic weapon
So I tried to use it but I canโt get it to apply to the target
which one do you have
which link above
also are you doing magic weapon or bladesong
I was trying to do both but I tried to download MIdi SRD and it failed
Midi srd requires you to install the link above, the one in the foundry menu is for v9 and is broken
bugbear fixed it so it installs in v10 and you have to manually paste the url link for it above into the manual install field in the add ons menu
lol this is the dependency warning for midi srd:
MASIF has this:
I am trying this macro for Dimension Door & getting a few errors. Did you not run into this issue?
i did not run it, but it appears that sequencer could not find that particular file
So if I replace that animation file that should in theory resolve all 3 errors?
yeah it would seem thats a patreon animation
Yellow is the conjuration free
innocent mistake usually its blue for animations
I did a search and tried to wade through the results, but I didn't see anything about Midi not properly autocalculating damage. It properly adds up all modifiers for attack, but when I roll the damage, it only applies the die roll. I've disabled damn near everything else to ensure there's nothing conflicting
screenshots of the Damage chat card and the details page of the Item would be helpful
Okay, let me snag a few
Midi does not work with:
Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e
Advanced Spell Effects module is in beta in v10 and often the culprit of things...
Midi requires Item Macro to have its "Character sheet hooks" feature set to unchecked in order for on use macros to work right.
When editing owned items(items on actors) active effects beware of duplicating active effects that interfere. Always check the actors effect tab for rogue ae's.
It's calculating correctly, but on this particular roll, it automatically took of the hp of the monster, but only deducted 3 from its total
Like the calculations all check out, but the removal of HP is not consistent with what the card is showing
probably just have it off in midi settings
midi settings->workflow button->workflow tab->scroll down to Damage, first Drop down controls damage application
While you are there turn on merge card in misc tab cause default workflow is ugly AF
Also your importer is adding redundant flavors
ok, but redundant
check that first box in damage
Great recommendation for the merge card, it looks much better. But the damage is still not being deducted properly based on the roll. Can screen share if it'd make it easier.
Even after checking that box, still the same issue
11 damage on this last roll, but only 5 hp removed
are you a DM
yes
is the Dm logged in?
yes
oh swarms got weird settings I bet you 20 bucks midi/imported creature with custom damage resistance set
The damage card is calculating properly, it's just not deducting properly. This particular one has 22
Ohhhh, let me try a different enemy
you sstill ned to fix that swarms damage resistance
this sounds like damage resistance
If I recall importers suck at swarm damage types
yeah the swarms have an odd entry let me pull it up in the book
Thank you so much! I appreciate your help. I was going insane
they have outright resistance to ALL the 3 types
and I bet you your importer put it as custom
magic and normal, resistance to piercing, bludgeoning, and slashing
I'm dense...the importer was fine, it was just calculating the resistances. I just didn't see any indicator because I didn't bother checking. I just assumed it was a module issue. Any setting to show when resistances come into play?
Or will it just always be a surprise if I didn't bother to look up what resistances they might have?
Pro tip, if you mouse over the tokens picture in that damage applier card, it will say the DI/DV/DR of the actor
The option that is shown in the bottom of this screenshot is good to have
You don't need that setting if you are using Advantage Reminder ๐
Hi. I'm working on an Active Aura where hostile creatures inside or entering a 15โ radius experience difficult terrain on a failed int save.
Best practice is apparently to base it on midiQOL's Spirit Guardians (SG), in part because an on-enter save is tricky but it's scripted in the macro. Essentially I need a de-clawed SG that only halves walking speed. I gave it a best guess shot but it's not working. The caster is targeted for a save and nothing else works.
I changed the flags for flags.midi-qol.OverTime:
turn=start,
label=Drag Me To Hell,
rollType=save,
saveAbility=int,
saveDC=@attributes.splldc,
saveRemove=true,
killAnim=true
I (recklessly) commented out this line in the macro
// damage: { parts: [[${args[2]}d8, "radiant"]] },
Otherwise, the spells only differ in level, school, level scaling
How should it actually be done?
the apply on enter is handled in SG's item macro it can't just be an active aura/overtime
Y'all are amazing. Thank you for saving me about 13 more hours of slamming my head on the desk ๐
you aren't the first to use an abnormal actor as a test dummy hehe
I copied and tweaked the latest SG macro
Do they need to make a save?
Also changed the save to "int" in the macro
Yup
saveDC=@attributes.splldc is that how you've written it in the effect?
nice catch!
Change it and check for errors when it should apply
doesn't that need an e?
yeah it does, lets see if that is the reason it failed ๐
ah - my bad, that was in the original post...
Hmm, no difference. I'm going to make a fresh copy of SG and make as few changes as possible. Was the edit to the macro appropriate?
Any errors in console?
I don't remember the macro by heart and cannot check it now ๐
So maybe post it here
commenting that line should be fine, but check for any missing commas in the rest of it
Weird, I duplicated and renamed SG, but can't rename the macro. I didn't copy the SG spell last time. How do you break the association with the old macro?
Are we talking about the Spirit Guardians 10.0.10 from MidiQOL sample Items?
yup
I'm ditching the duplicated spell and just making sure the one I made from scratch is identical
The macro is embedded in the Item as an Itemmacro
I am not sure I understood what you meant with the
How do you break the association with the old macro?
I think hes confusing ae's with macros
he may not even have item macro and has no idea theres a macro involved
nope they said that they changed the code
yeah in the overtime
I was configuring the duplicate of SG, last step was editing the macro, I clicked "Item Macro" and the Spirit Guarding macro popped up. I wasn't able to edit the title.
damage: { parts: [[${args[2]}d8, "radiant"]] }, that is in the macro
The ItemMacro title name will match the Item's name
With all item closed, when I click "Item Macro" the Spirit Guardians macro pops up. Can't edit the name.
if an item is set to destroy on empty doesn't that fuck up midi?
if it applies an ae?
thats ok, the item macro is still going to be ItemMacro.SG Test
make a small change in the macro, and save it
it will grab the new name of the Item afterwards
I've actually read a couple of JavaScript textbooks, I just never had time to practice. I know XSLT which isn't much help. Eventually I'll study the API.
no issues afaik. not sure if that is true in general. I remember only about potions...
Potions of something work fine for instance
its a process! I had never used JS before starting messing with Foundry macros ๐
Cool! I'm looking forward to really understanding how Foundry works, eventually.
I'm getting even fewer results from the duplicate SG. Concentration and the spell name are applied as temporary effects. That's it.
Modified macro is attached. I commented out the damage, change the save to "int", and added the spell name to the error message in the last line.
The rest of the effects are as described above
Is there a way to get the playerID of the player that caused an action from the
"midi-qol.RollComplete" hook?
The workflow->Actor->ownership would have been my guess as the easiest way but I don't understand the ownership data
Hey gang, is it possible to make an effect heal the effect bearer on either expiration or if they reach 0 hit points?
very easily with effect macro and dae
Oh really? I'm new to all this so if you would be able to teach me that'd be great.
set the dae to have a special duration of when the token reaches zero hp, and then put an on deletion effect macro in that updates the hp of the actor to full
or whatever the heal is
On deletion effect? Alright, got it, thanks!
Hmm, odd.
I don't have the effect macro portion as shown in the images here available to me.
I do have DAE installed so is there something extra I have to do to access it?
Effect Macro is a module
Ah, okay, so that's what I was missing, alright, thank you!
also if you are missing that special duration in the second image you need to install Times Up module
I do have times up just didn't have Effect Macro.
if for some reason you insist on this using midi workflows you will need to use a different macro than mine:
if (actor.system.attributes.hp.value != 0) return;
actor.update({'system.attributes.hp.value': 1});
await game.dfreds.effectInterface.removeEffect(
{
'effectName': 'Prone',
'uuid': actor.uuid
}
);
prolly a damageonly workflow for midi but I'm not fluent enough in them
await the actor.update
Hah, it's working and probably was in my last post. I was stupidly looking for a visible aura. So the tweaks I described above work.
Hey peeps, is there a better Lay On Hands macro between Crymic's and Midi-QoL's version? I have both, but not sure of the difference or which is one is more efficient
Crymics' cures for 5, midiqol's just says to remove it, personally I feel a dfreds CE line could be inserted in to make it fully functional
Cures for 5? What do you mean?
paladins can spend 5 loh points to cure a disease or poison off a target
Ohhhh ok
midi's just says a message, crymic's I believe literally removes both conditions from target
but you could literally yoink the message in the macro and put in a dfreds CE function to remove the two ce's
if you have cub...shame on you ;p
Ok... what is CUB for? I think I got it early on my inception of Foundry and saw some flashy bells and whistles and at this point, I am not sure what it does for me.
Im worried if I get rid of it itll mess with something in the background
do you have dfreds CE?
yessir
disable enhanced conditions in cub and leave it dormant
What's wrong with CUB exactly?
Aside from the 100 premades in CE, CE also has integration with midi:
(second drop down)
Plus alot of premade stuff we share around here use its api
Cub is fine, for non midi builds and for people who want to do things the harder way
and for non dnd5e worlds
If you have an item macro setup, do you need an effect to fire it?
that really depends how you want to launch it
Well when im using Crymics LOH It doesn't seem to do anything
I don't know how his macro works but theres three ways we launch macros in midi setups
midi on use, which is a box you add to the bottom of the details tab of the item, and its almost always referencing an Item Macro. Then theres the dae way with macro.Execute or macro.itemmacro and then theres effect macro which is sorta kinda its own thing
crymic usually does them as on use
I can't see why it would be a dae on use
make sure you install item macro and turn off character sheet hooks on it
What do I put in this box though?
where is the macro?
Item macro, on the item itself
ItemMacro
does he say a macro pass for it?
"After Active Effects" or something like "Predamageroll"?
if nothing is suggested, its usually after active effects(Default)
Nothing is suggested
So I could just leave the enhanced condition effects from CUB off and then just install this module then?
That shouldn't have any conflicts issues right?
if you have 30 conditions already premade in cub that could cause some issues but if you never utilized its condition lab, yeah, disable enhanced conditions but dfrecs CE you need to setup to replace status conditions
Alright, thanks for the info!
dfreds CE is not automatically setup perfectly, you gotta change its status conditions settings drop down to replace and then go into its menu and right click all the things you want to be status effects
@violet meadow I know rarity colors is totally not your module really, but is there anyway to make it color the items in compendiums?
Hi, this might be a dumb question but I cannot seem to figure it out but is there a way to make a custom feature only work if a token is targeted? (like the midi qol feature where you must target a token before you make an attack roll)
Also is there a way to set a token to have advantage on initiative rolls?
Edit the details of the feature, Midi checks the targeting rules there. Advantage on imitative is a core trait. flags.dnd5e.initiativeAdv | Custom | 1 if you want to apply it via a passive effect.
Ah, for some reason the targeting wasn't working before but it works now, thank you!
Also I probably should have mentioned that I'm still on V9, would you happen to know the name of the flag on V9? I can't seem to find the V9 equivalent on the list, I only see these ones.
Maybe I should upgrade to V10 hmm
Alright, I'll have a scroll through the list and see if I can figure it out, thank you!
I just noticed on the github readme for Effect Macro that it cautions against using MIDI:
You should not expect this module to work with modules that overhaul or destroy core roll behaviour, particularly WIRE and MIDI. These modules are unsupported, and any compatiblity is nothing but a happy accident.
Have you ever run into any issues with that?
Effect Macro gets used a lot with midi stuffโฆ despite the disdain of the EM dev. You shouldnโt run into any trouble unless youโre doing something really wild
Has anyone managed to automate Enervation?
Create an Item that does the damage and healing source for half of it in the Sidebar or a compendium (do you have an example already for that?).
Create a DAE macro.createItem on the Enervation spell and link the first Item in there.
(If you want to be a bit fancier and try getting another use of Active Auras in the process, I would try linking an Active Aura to only one specific target)
Hey. Is it possible to setup a Condition like Frightened as a result of failed Frightful Presence?
After using the Frightful Presence as an action?
Yep
I mean using Midiqol and Dae ofc
Yes, you can create a Frightened Condition as a DAE on the Item and make a save of whatever you need.
If the save fails the Effect will be applied
But what is an Attribute key should be for that?
Best way, create the DAE using the small wrench icon on the Item's title bar
Then choose Frightened from the drop down menu
I am on it atm... Hm, wait a sec
my idea for enervation is to make it a macro.createitem that is a special lifetap attack that recharges on 1 and you can just cancel it(I dion't fast forward)
use effect macro to roll it on turn start
is that the pally aura
cause frightful aura doesn't do anything, its the pally's channel divinity and fear spells that get enhanced by frightful presence
I thought about an "attack" like a dragon's ability tbh
also pro tip for active auras/paladins. Combine them all into one active aura.
yep, it's for dragon
I just want to mark targets with frightened condition auto, not manually
yeah then open the Item's DAE
That is the best way to do conditions in my opinion.
Otherwise you can use effect keys, like macro.CE or macro.CUB or statusEffect etc
easy does it ๐ฅณ
Nope, without this chat not so easy ^^
Why do you have the cover rays turned on? ๐
Messing with this module atm
Oh I saw that probably @coarse mesa will add a new module in his trophy case ๐
Sounds simple enough! The only trouble is the initial 2d8 successful save/4d8 failed save. It's not exactly a half-damage-on-save deal, just different damage dice
So this is something that would need a full on macro if you want it to be RAW
Ech ๐ฉ
This is why <#1010273821401555087 message>
You might need to vote for
in this case, but I don't know if/what is gonna be implemented.
Anyways, how committed are you on having it RAW? ๐
Honestly? I'm not sure now ๐
Because really it could just be boiled down to half damage, since it's only 2d8/4d8, but at the same time one might roll higher on 2d8 than 4d8.
Like... rolling all 1s on a 4d8 vs two 8s on 2d8.
I think I have a decent heal-on-damage macro from a custom homebrew spell that works, though it deals max healing on the damage, instead of half, and it doesn't heal on a failed save.
EDIT: Nevermind, figured it out. Editing the code to use the new version
EDIT 2: Hmm, so it looks like it's just healing the caster based on damage rolled, not the damage actually dealt to the target.
https://i.gyazo.com/f02e61a20d672fb716b6c508f093d13b.png
async function wait(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); }
const lastArg = args[args.length - 1];
let actorD = game.actors.get(lastArg.actor._id);
let tokenD = canvas.tokens.get(lastArg.tokenId);
let target = canvas.tokens.get(lastArg.hitTargets[0].id);
let healingType = "healing";
let damageTotal = Math.floor(lastArg.damageTotal / 1);
let damageRoll = new Roll(`${damageTotal}/2`).evaluate({ async: false });
new MidiQOL.DamageOnlyWorkflow(actorD, tokenD, damageRoll.total, healingType, [tokenD], damageRoll, { flavor: `(${CONFIG.DND5E.healingTypes[healingType]})`, itemCardId: lastArg.itemCardId, damageList: lastArg.damageList });
let targetList = `<div class=\"midi-qol-flex-container\"><div class=\"midi-qol-target-npc midi-qol-target-name\" id=\"${target.id}\">hits ${target.name}</div><div><img src=\"${target.data.img}\" width=\"30\" height=\"30\" style=\"border:0px\"></div></div><div class=\"midi-qol-flex-container\"><div class=\"midi-qol-target-npc midi-qol-target-name\" id=\"${tokenD.id}\">heals ${tokenD.name}</div><div><img src=\"${tokenD.data.img}\" width=\"30\" height=\"30\" style=\"border:0px\"></div></div>`;
await wait(500);
const chatMessage = await game.messages.get(args[0].itemCardId);
let content = await duplicate(chatMessage.data.content);
const searchString = /<div class=\"midi-qol-hits-display\">[\\s\\S]*<div class=\"end-midi-qol-hits-display\">/g;
const replaceString = `<div class=\"midi-qol-hits-display\"><div class=\"end-midi-qol-hits-display\">${targetList}`;
content = await content.replace(searchString, replaceString);
await chatMessage.update({ content: content });
await ui.chat.scrollBottom();```
Ok, I can't find where to turn it off :/ can you help me pls pls?
What's the module you're using for cover ? ๐คท ๐
over complicating much? ๐
Simbuls Cover Calc
I might be, though I'm not sure how else to pull it off. I'm sure there's easier solutions out there. I just don't know about them 
I have it on but still
So is this an example? Damaging and healing the same target?
you need to have it off!
Damaging the target, and healing the caster for half of the damage dealt
LOL
At least that's my intention
Yeah I meant in your example it seems to do both at the same target!
maybe you need a reload if you changed any settings
Otherwise you might need to contact the module dev directly!
I just grabbed the macro from an existing life-stealing spell and modified it. I can't recall where I got it from 
For the damage part, you can get the applied by using ```js
const damage = Math.floor((args[0].damageList[0].appliedDamage)/2);
Then do an MidiQOL.applyTokenDamage()
await MidiQOL.applyTokenDamage([{damage: damage , type: "healing"}], damage , new Set([token]), args[0].item, new Set(), {});
So something akin to this?
async function wait(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); }
const lastArg = args[args.length - 1];
let actorD = game.actors.get(lastArg.actor._id);
let tokenD = canvas.tokens.get(lastArg.tokenId);
let target = canvas.tokens.get(lastArg.hitTargets[0].id);
let healingType = "healing";
const damage = Math.floor((args[0].damageList[0].appliedDamage)/2);
await MidiQOL.applyTokenDamage([{damage: damage , type: "healing"}], damage , new Set([tokenD]), args[0].item, new Set(), {});
let targetList = `<div class=\"midi-qol-flex-container\"><div class=\"midi-qol-target-npc midi-qol-target-name\" id=\"${target.id}\">hits ${target.name}</div><div><img src=\"${target.data.img}\" width=\"30\" height=\"30\" style=\"border:0px\"></div></div><div class=\"midi-qol-flex-container\"><div class=\"midi-qol-target-npc midi-qol-target-name\" id=\"${tokenD.id}\">heals ${tokenD.name}</div><div><img src=\"${tokenD.data.img}\" width=\"30\" height=\"30\" style=\"border:0px\"></div></div>`;
await wait(500);
const chatMessage = await game.messages.get(args[0].itemCardId);
let content = await duplicate(chatMessage.data.content);
const searchString = /<div class=\"midi-qol-hits-display\">[\\s\\S]*<div class=\"end-midi-qol-hits-display\">/g;
const replaceString = `<div class=\"midi-qol-hits-display\"><div class=\"end-midi-qol-hits-display\">${targetList}`;
content = await content.replace(searchString, replaceString);
await chatMessage.update({ content: content });
await ui.chat.scrollBottom();```
You need to clear this part a bit ```js
const damage = Math.floor((args[0].damageList[0].appliedDamage)/2);
let damageTotal = Math.floor(lastArg.damageTotal / 1);
let damageRoll = new Roll(${damageTotal}/2).evaluate({ async: false });
await MidiQOL.applyTokenDamage([{damage: damage , type: "healing"}], damage , new Set([token]), args[0].item, new Set(), {});
new MidiQOL.DamageOnlyWorkflow(actorD, tokenD, damageRoll.total, healingType, [tokenD], damageRoll, { flavor: (${CONFIG.DND5E.healingTypes[healingType]}), itemCardId: lastArg.itemCardId, damageList: lastArg.damageList });
You apply the healing twice now
Oop-
const damage = Math.floor((args[0].damageList[0].appliedDamage)/2);
await MidiQOL.applyTokenDamage([{damage: damage , type: "healing"}], damage , new Set([token]), args[0].item, new Set(), {});
``` should be enough.
or use the other combo with the DamageOnlyWorkflow.
here instead of token you can use tokenD that you've already declared
or just not declare tokenD and actorD and directly use the predefined token and actor which fall back to the selected token.
(mainly depends on whether you always have selected token on the canvas when you use it or not)
Works a lot better now!
Though I'm noticing the token images on the "hits/heals X" are a bit skewiff. Is that related to the macro?
Given a Workflow object from the MIDI-QOL.RollComplete hook is there A way to get the person who made the roll? I was thinking workflow->actor->owner or getting there from the actor/ Actor obj but it doesn't seem to have an owner property anywhere.
mouse over the enemy tokens image of the token in the damage one, it should say he has resistance to necrotic.
or they saved?
How to transfer Hunters Mark from prev target to new one after killing? I thought that second button should do it but meh
that M thing can be shut off in token action hud so that it doesn't show up anymore, its for non midi builds.
The midi sample item should have a way to move the mark
How does it look like?
I am not certain if it's available or not some place else right now, but you can filter through the game.users for the one with a character matching the provided workflow.actor and then get that one
if you are using warpgate, it exposes a very helpful "get first player owner (fall back to GM if none)" function: https://trioderegion.github.io/warpgate/warpgate.util.html#.firstOwner
@violet meadow @dark canopy Thanks. Might have got a way. Workflow.actor.ownership. Has an object of key value pair. {UserID: ownershipLevel}So Iโm thinking Iโll just sort through the keys.
that's more or less what that helper is doing ๐
accept token or actor documents and will grab appropriate permissions based on such
Hello. I was wondering, is there a way to have an effect to add a "Do this with advantage" on strenght checks/save with an effect?
Yes, grab DAE module if you don't have it, create an Active Effect and go through the provided flags by MidiQol
Type advantage in the key field and then scroll through the drop-down
I see, thanks!
@nocturne frigate regarding the question in #dnd5e for the specific bonuses on a weapon, MidiQOL provides activation conditions that when they evaluate to true, it will add whatever is in the Other Formula field
What can be done to make Flanking also work on neutral actors and not only on enemy ones
@gilded yacht ๐
Could there be a setting to allow for Neutral creatures be flanked by allies?
No, but maybe it's enough to add something to some .js file
flanking is written as "friendly to you", which a neutral token does not represent, right?
dispositions are relative to the players, in effect, not "teams" so much
heh, if you wanted a macro, you could modify neutral dispo. to friendly dispo with a warpgate mutation then revert all of them afterwords
When a creature and at least one of its allies are adjacent to an enemy and on opposite sides or corners of the enemy's space, they flank that enemy, and each of them has advantage on melee attack rolls against that enemy.
You would probably need to change the disposition to Enemy to be RAW so I don't know ๐คท
it appeared that they wanted the neutral token to be counted as friendly on the right side in order to flank the enemy orc
but yes, one way or another (no neutral, neutral is allied with no one)
I thought that the Orc was set to Enemy on the 1st column and Neutral on the 2nd
but same issue ๐
The same thing happens to me too, it does not contemplate โno coverโ when it is reduced to 0hp.... bug of simbul's cover?
the original implementation did not have that ๐ค wonder if it was snatched from kandashi's expansion module
I think so. There was some talk about that iirc
Make them hostile.
I am testing Levels Auto cover calc as an addon to Midi and on fireball test I got this cover bonus, how can i fix it?
+999 is nice, but...
Pretty sure +999 means full cover, AKA behind a wall?
Fireball and sacred flame ignore cover, its a known thing with both cover calculators
I think tposney has stated at some point that it might offer that at some point in the future ๐คท
you can override that actors damage in the chaser card
though he still succeeded so in that instance no change needed
So it's a bug and I just override it manuallyt
He rolled an 18 without cover
Its midi leveraging the cover, and nobody is accounting for fireball/sacred flame cause of their unique ignores cover feature
if your players use the two spells alot, its up to you, but I personally turned off auto cover
sacred flame is my cleric players primary action in combat and my wizard player is evocation wizard
Ah ok
- Added No Full Cover option to item properties. If set a target can't benefit from full cover (will be downgraded to 3/4 cover for spells like Fireball that go round corners.
where is it?
midiQOL 10.0.21 changelogs
thats gonna be a weird setting for fireballs with no path to the otherside of the wall hehe
And this is what I was remembering:
<#1010273821401555087 message>
I think it should be "No Cover"
I don't know of anything that allows for no full cover
Well a fireball going around a corner still has 3/4rd cover right? Hence no full cover
As for Sacred flame I think you are correct
Preliminary tests show no change but I didn't refresh so maybe that was it
Sacred flame needs 3/4 of the token visible to not get "can't see target"
I have no idea! I haven't played that much with cover after I had messed about with Kandashi's cover thingy for Lukas ๐
if you can see their finger, you can sacred flame them technically
Yeah, but then you should also have vision on them in Foundry ๐
I think MTB blocks cover calculating
I suppose this was my real problem:
yeah I dunno
cover ain tdoin jack here for me
How is simbuls suppose to be setup?
Do you have it set to use a keybind to check cover?
You can either do that fully automatically or not
this is lightning bolt through a wall
I think I got it setup right now, but I am pretty sure full wall coverage will behave weirdly
Try this
I wonder if midi could employ super savers for this exception
Let MidiQOL do the wall checks and Simbul the rest
I tried that and it turned off cover
you have to set both to the same calculator
Both work but you can still go through walls which is my point here
also no full cover means no full cover
this is with that box checked
I think it should be No Cover not No Full Cover
No full cover means that it downgrades it to 3/4 cover
I don't know of anything that denies only full cover
๐คท
The target gains no benefit from cover for this saving throw.
I really think that its just a simple mistake on tims part on the checkbox, I think it should be a "shut off cover" checkbox.
or a new checkbox for "no cover"
Override also doesn't shut off cover
How do i enable late targeting for players?
For the DM its pretty self explanatory, i just click here
But i can't turn it on for my players
Here being the player settings
Scroll down in the main MidiQOL settings menu (not inside the Workflow Settings) and you will find it.
Inside the Workflow Settings, in the GM tab, there is an extra setting to affect GM client differently if needed.
I think the reason behind three settings is that the one outside is a clientside setting. So you can enable it as an option for all players in the workflow button, but every client needs to check the main one to opt in.
I'm pretty certain the setting outside the workflow is a "client" setting not "account"
You can "push" it to other clients as a GM
with a sync settings module or something
I got my players trained to always target first. 
I have it to always require
But I suppose you could try a checker then enable it if no targets are detected
Like of an elevation is the issue via template
What is the point of MIDI qol autorolling damage if it misses? Is there any way to activate to only autoroll damage on a hit?
I don't see the option here
Damage roll needed!
Ahaaa, thanks xD
Any way to disable the damage self? Can't find it in settings, dunno if I am blind
damage self?
Would be on the item details
Where is item details? I don't see such a tab
In an item.
@idle stag @violet meadow There's a bug I just discovered in the no full cover flag. The way it is supposed to work is you set template targeting to always (with or without ignore defeated) so that walls don't stop targets from being targeted by the template. Then midi will use the cover calculation to determine a save bonus (if any) from cover. As of the next release spells with the no full cover flag set will ignore cover (i.e. a bonus of 0) if set for the item meaning fireball will give no cover bonus for targets hidden by a wall. Other spells will use the cover calculator to determine the bonus (giving 999 for full cover meaning a save).
Attempted to use your setup for a Death Ward esque effect, however the macro didn't play on effect delete it manually myself, any idea why that could be?
On another note, does anyone know how to apply an effect that grants immunity to all damage but disappears when they have a condition applied to them?
Specifically struggling to figure it out on the condition application part.
Using EM?
EM stands for what exactly?
Effect Macro?
If so, yeah, it's just that I'm completely new to this whole deal, it's a whole new learning process and I don't know where to look for documents to learn from.
EM is my module. What's not working?
Oh I see! Let me go give you the full details in a second.
On Effect Deletion:
if (actor.system.attributes.hp.value != 0) return;
await actor.update({'system.attributes.hp.value': 25});
await game.dfreds.effectInterface.removeEffect(
{
'effectName': 'Prone',
'uuid': actor.uuid
}
);```
Here's the full setup I've been using, the script fires properly if I use anything but On Effect Deletion in conjunction with this specific special duration condition.
Midi doesn't update the health fast enough for the script to catch it IIRC.
I don't know what module that is, I assume DAE. But if it disables the effect, EM cannot fire the script.
Ah, I see.
socketing back and forth?
If you have warpgate, slap a warpgate.wait(200); at the top and see if that fixes it.
Yeah that's gonna mess with stuff
Midi sockets the damage application to the GM.
I do have warpgate yeah, so I'll give that shot.
Hmm, no, that didn't do it unfortunately.
Might need a longer delay, throw a console.log(actor.system.attributes.hp.value) at the top and see what it outputs.
Alright, will do.
Yep
Yeah if nothing else works then I'll just do it manually haha.
I have death ward setup as a world script to avoid this mess.
I do appreciate you two coming on over to help though.
Works in a similar function.
What's a world script exactly?
A miniature module, of a sort.
Oh I see.
Pin in #macro-polo if you want to read more.
Definitely will, that does sound very intriguing and ever since I got my Foundry license I've just been hard stuck to my PC editing and all. ^^'
Yeah once you figure that you can do almost literally anything with just some JS knowledge, it becomes like crack.
I have little to no knowledge regarding JS and have just tried to learn a bit to bring my players the best experience possible.
That's pretty much how it starts
That's where it starts.
Hey so, simbuls cover calculator
I'm actually in the process of converting my automations from macros on a github into a module.
is it ridiculously spamming for everyone else too?
like tonight I had it on and it was AWFUL spam in the console
I am on the newest version I don't see a setting for debug but like it seemed like whenever I set a target, all creatures i owned started to check cover calculations so I as the DM saw the calculation of every creature on the canvas vs the target
I turned off midi's cover and it kept going, so its a simbuls setting
Just because it's spammy in the console doesn't mean it's actually doing anything bad.
Changing targets will always have cover modules re-check cover.
oh it was bad lol
it would hitch every time I hovered over a token and pressed T
Midi for the mosst part was fine in 2.1.4, I did notice my overtimes failed, I have to look at whats wrong in it
You also play on a server / computer that sounds like it's part toaster
nah the laptop got ram, my pc isn't bad
I also have more dead links on icons that spam the hell out of me
Every time I target something I get this:
and its not midi
Hmm, nothing really popped up, in-fact, nothing was happening, so I assume the auto-deletion idea should be discarded for manual, thanks for your time the both of you though!
its calculating things between owned and target
does nobody eelse use simbuls cover calculator?
I'd imagine everyone would be reporting it
I haven't met anything like that from Simbul's Cover Calculator yet.
Do you have extended debug o- oh okay.
its gotta be module side not user side then
Like he left something in on his side
kinda like how tim does sometimes
I missed 1, literally 1 icon after the update that was wrong and had a 404, and it was the icon for the active effect on Beacon of Hope for the paladin in the party, and he cast it with 20 allies in combat
so every turn I was getting 404 errors in the console galore
cause everyone had the active effect on them and the combat tracker refreshes/regets the icons on turn change
Yeah I'd imagine so, although I do see you have very different looking UI to what I have, at least icon wise.
the lil icons to the left of features is df settings clarity
globe is global setting, shaded person is client/account
Have you tried using "find the culprit" in case these are actually causing these issues?
@vast bane @violet meadow looks like Tim has made v10 the home page on midi git now ๐
If it comes "imported" from the Kandashi cover expansion... then it carries the bug.
https://github.com/kandashi/dnd5e-helpers-cover-expansion/issues/7
https://github.com/kandashi/dnd5e-helpers-cover-expansion/issues/6
Tokens at 0 hp still provide cover and there is an error in the console log: tokenCover.js:109 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setFlag'...
I have to recheck because it has been a long time, but I think I had fixed at least one of the two issues, when I made a small addition to token cover checks for something @coarse mesa needed
I will need to dig up the changes to see what was going on
sorry, can someone help me understand in the Check Flanking dropdown what is the benefit of CE Flanking + Advantage vs. just CE Flanking?
CE Flanking does add the midi flags for adv attack to the token already. I think I'm missing the point.
I am guessing now, as I haven't checked the actual code, but CE Flanking can be a custom Flanking condition which could be whatever you please.
It might just give you an extra option to add advantage on top ๐คท
ok, yeah, that could be the explanation for it.
OK just went through it.
It is an easy fix for Simbul's cover calculation. https://github.com/vtt-lair/simbuls-cover-calculator/pull/30
heya, when players use a spell, they cant choose to upcast it to a 2nd level spell anymore, anyone know where the setting for that is?
me as DM can still upcast spells to 2nd lvl though
Auto consumption
hmm but i want to it to keep track of the spell slot consumed still?
What do you mean? If you don't auto consume the player will need to just check what level they want and click use afterwards
Otherwise, it will not display the configuration Dialog and just auto-consume the available spell slot
Because if you choose one of the options named Auto consume it will consume automatically the spell slot or the resource etc
Otherwise there is a dialog pop up
so yeah example, i want to cast sleep, it is a 1st levl spell, but i want to upcast it to 2nd lvl.
it should atuo consume the 2nd lvl spell slot
Foundry doesn't know what you want if you don't say to it I want this and that.
So when you cast a spell normally (MidiQOL or no MidiQOL) a dialog will pop up, asking the user what level should the spell be cast at and if they want to consume the relevant spell slot or not.
You Choose the spell slot and the checkboxes to consume or not etc
If you use any of the Auto Consume options in MidiQOL, this Dialog will not be displayed, the spell slot will be automatically chosen to be the one needed according to the actual spell level and consume it
shillelleigh broke badly last night in our campaign
Midi srd item
wtf:
DAE 20 you have some splainin to do
This is not an error though. What did happen?
I cannot see any data in the MidiSRD macro ๐ค
I got it
false alarm sorry
first off its a sample item not midi srd
and secondly I had the v9 version on the druid
There is a macro involved -- yeah that probably
however, something is firing 300 dae compat warnings on launch lol
I can't reproduce it now wtf
some items maybe ๐
its not dae most likely, as the call is coming straight from the script
the script itself is using old paths
oh so the 300 is probably the v9 macro parsing all the data of the weapons on her or something, it stopped happening when I redragged it out from midi samples
Yes, by this point you shouldnt expect warnings
Does this not cause issue with spells that are half damage on save? Since most spells should not affect you at all if you have full cover
I think cover adds bonus' to dex saves not affect the save itself
in simbuls you see lil ( + 2) in the check save/check hit spots for cover calculations
Yes, but with the setup that is being described walls will no longer block targeting, which in turn means that other aoe spells will hit, and you will auto save, even though you should never have been trying to save in the first place
actually simbuls does negatives, midi is the one that adjusts the targets stuff
Example: Cleric with spirit guardian active is on the other side of a wall. You should not be affected at all, but with this setup midi would try to apply half damage to you, as that is the result of a successful save
How are you targeting on the other side of the wall?
sure but they'd have +999 on the save and likely would super save it
if you read tims patch notes if you want fireball/sacred flame to work right you can't use the walls setting in targetting anymore, instead leverage the cover modules
if its not super saving, I agree fotoply has a point
Wait are we talking for Active Auras + MidiQOL Spirits Guardians or another that creates an "attack" Item on the actor?
I would hope that midi is super saving +999 covers
tim says we can't use the walls block ranged spells and templates anymore in midi if we want the cover thing for fireball/sacred flame to work
we have to instead turn on cover and let the cover modules and midi handle it that way
I'd hope the 999 covers are super saving, but that IS the solution if tim hasn't accounted for this
Doesn't Active Auras wall block?
That is a good point thats probably all handled by AA
so SG is a bad example but fotoply's got a good point
lightning bolt through a wall would be an example
I'm about to test it when I'm done fixing anonymous
Fair point about AA, my central point still stands ๐
I really want to believe the 999's are super saving cause...it makes no sense for them to take half
if anything if you are a dice superstitious person the games making you throw a d20 for no reason
is there any setting in anonymous that throws midi off?
yep Fotoply is right
cause cover only handles dex saves
Cone of Cold goes through walls
(con save)