#MidiQOL
1 messages ยท Page 20 of 1
It shouldn't, that's just the two things we're changing - the damage parts and, in this case, the flag containing the item macro. The damage seems right on my end - for one of the messages. :p
Kk
wait wtf now it's doing it right ._.
It ROLLS the first message though, which will be an issue if you have automation
I can see it just before it's deleted
That didn't eliminate the looping for me
How are you setting up this feature?
Okay yeah, you need to change whatever field that is or toggle it off on the cloned item. Mine is an ItemMacro embedded in the item, that's what I'm updating out of with the clone.
Here's the unarmed strike of monk with the item macro embedded. Try to import it and give it a go, should leave 1 message (after rolling and deleting the first one) with updated damage values.
Although I think in your case it's just js item = item.clone({ "data.damage.parts": newDamage, "flags.midi-qol.onUseMacroName": "" }, { keepId: true });
Removes the macro name to run from the item and it shouldn't be able to loop anymore, because the cloned item doesn't know the macro
I still have no idea how this thing is deleting the first message though, commons.js just seems to do it, magic I tells ya
So, that does stop the loop sort of
I get the first prompt again, to drop the template or consume resources. But the macro dialog doesn't pop up again
I don't think it's going to work the same way it does with your item
I think somehow I need to update the existing card with different damage dice
and within the same workflow
In this case, it would definitely be easier to update the workflow before damage is rolled. For your other monk features, it seems like the flow of the macro is off. Needs to stop the original one from getting to the point where placement and resources are consumed, create the new "empowered" feature and roll that instead...
Yeah. I don't have a lot of experience with midi QoL, so I'm having to figure out a lot of these pieces as I go.
I see similar things being handled on the preDamageRoll step
But I would like to do as you said. I want to be able to modify the card
I just looked at the feature in question, and well.. Unless I misunderstood something about it its just a big collection of spells that can be upcast, right?
No, it's monk stuff, so they can change the fundamentals of the spell
Yeah, some of them are actual spells. Some of them are features that can change when additional ki points are used.
I'm trying to get the chat card to reflect those changes and allow for "upcasted" damage dice as well
Well, have you considered using Magic Items module and just creating them as "spells" in there? It can do upcast
Yeah. That doesn't quite do what I'm looking for. With that module, I can upcast with item charges or spell slots. But this is a resource that is used by multiple features already.
That also doesn't get me the dialogue options
As long as you put the "spells" onto the feature with the Ki points stored I don't see why it being used by other features would be a problem ๐ค
Because there is no option to upcast with them, as far as I know
Isn't that a charge?
Yes? Not quite sure what else it would be
Charges vs Item Uses
Item Uses can have a secondary feature assigned
Which is what this requires
Fotoply is right about Magic Items for Four Elements monk. Macros are another way but that's a method I just don't have mastery of for this. But the module worked for my players monk, when we were playing. Requires more upkeep on increasing Uses (Ki) and increasing the max Ki Upcast, but its worked for us.
Until either a) the 5e system implements something for this particular function or b) a module shows up to aid this process, gotta find workarounds.
Personally, I'd just slap an item macro onto the spell that asks if you want to upcast and change the workflow to do so. That also allows you to update the remaining ki with the macro too.
Toll the Dead in the example compendium has a simple method of changing the damage, we overcomplicated.
const theItem = await fromUuid(args[0].uuid);
let formula = theItem.system.damage.parts[0][0];
formula = formula.replace("1d4", "2d8"); // define the formula with both standard and new ki value here, check toll the dead for an example of the calculation
theItem.system.damage.parts[0][0] = formula;```
I'd still like to figure out the proper way to do empowered features that change fundamentally how the item works, not just scale damage, I think I'll deal with that another time
The proper way of doing that would be clone, not by making a local override to the item...
The same goes for the other thing. Clone.
What's does proper mean in this context? For the other thing, I would clone, easier than recreating the item, but we did not have much success with making clone play nice with midi
Not shown by the way, the example from midi has a damage formula calculation, this is just the proof of concept
Not throwing tposney under the bus, the above is just a snip for changing damage
You set theItem to have a new formula, but never change it back.
Making a clone that has the new formula gets around that.
True, but rolling that item proved to be the problem. There's presumably a trick to it, I could not find it.
That I wouldn't know. I do this in Roll Groups, just rolling a clone and that always works.
Does this need the render() part?
I thought the setDamageRoll took care of all the rest
Yeah the issue is that here you've already started rolling the item when you change stuff around. Works in the context of the midi Workflow.
You are not making a clone and then rolling that cloned item.
What is not working (if something isn't, too many messages to go through!)?
So I've gotten pretty close with it, using a clone
The only issue I run into now is I need a way to disable the first dialog prompt
Is that the consumption dialog?
The Usage Configuration prompt that asks if you want to Consume Resource or Place Measured Template
yeah
but only on the first roll
not the clone
Will be included in next midi version. For the time being let me find the response from tposney
...shit lol
I don't think I know enough to understand how to use those pieces he mentions
Is that something I could do now?
Or need a later version?
Actually I was trying to find a way to do witch bolt easily.
You can use the hook now
So what is your macro?
Are you running it as an onUse preItemRoll?
In the preItemRoll phase you can use a Hook.once function to pass the consumeUsage:false on the next item roll
I am on my phone now and it's not easy to write it properly
Ok. Yeah, I'm not sure how to use those. Will have to find an example or something.
Ok let me see if I can write it
It essentially boiled down to me being unable to create and then roll a Clone item within Midi's workflow, and not run the remainder of the original workflow. I could only figure out how to roll it and also finish the original workflow.
don't even need a hook
Hooks.once("dnd5e.preUseItem", (item,config,options) =>{
console.log(item,config,options)
foundry.utils.setProperty(config,'consumeUsage',false)
foundry.utils.setProperty(config,'needsConfiguration',false)
})
Try this inside the macro
you can just return it
if (lastArg.macroPass === "preItemRoll") {
if(itemD.attunement < 2){
ui.notifications.error(`This item requires attunement.`);
return false;
} else if ((actorData.spells?.spell1?.max || actorData.spells?.pact?.max) === 0) {
ui.notifications.error(`No spell slots found on ${actorD.name}`);
return false;
}
}
I think they just need to continue with the workflow, but not trigger the resource consumption dialog
can abort it too
Yeah still they don't need to abort from what I've surmised, just on the one roll of the item to not trigger the Configure dialog
I have created infinite loops trying that more that once ๐
That actually just happened to me a little while ago. I panicked and shut my browser
I managed to sneak my way into avoiding the infinite loops, but would still have the original excessive workflow and I didn't really find a way around it.
Dialectikal's issue gave me the idea to run "empowerable" features that would do different things, so my idea is to clone the item in the workflow if player opts for it and add the additional stuff without changing the original, but that seems not in scope
Yeah, from within an initiated workflow, you cannot ๐ค should not be able to stop it and start a new one for the same item.
infinite loops are fun 
You might be able to do something like that if you created a totally different uuid of the item ๐ค
Cause the workflow is attached to that now that I think about it
Where should this go in the macro?
Didn't seem to change anything
Hmm so what is the premise of the macro? You got that in an ItemMacro | preItemRoll correct?
So if you clone an item and then do MidiQOL.completeItemRoll(cloneItem), it's getting snagged on the uuid?
Yeah. It initially generates one of these config windows, then I have another option to select a resource. Then, once that is selected, it prompts the second one of these.
So if you have initiated the args[0].itemUuid workflow and in the preItemHook abort it, clone the item and call again MidiQOL.completeItemRoll(cloneItem) that one will still be the same item.
As such it will follow the same pattern in the macro and thus infinite loop ๐ค
If that makes sense ๐
I just need that first box not to pop
You can just toss it on all
I just had that segment added to the top of the macro. It never gets hit.
Not sure what this means. What is "all"?
How do you set up the macro execution?
I did not run into that, so maybe I did get it and it's the aborting part that's the problem. How do I abort a workflow?
Hmm you can return false in the preItemRoll, or you can try something like setProperty(workflow,'aborted',true) for a quick test
@raven ore oh are you on v9?
Yeah
Oh, you mean the preUseItem thing?
Ah, bummer
Yes that prompts for template placement and consumption
I'd say remove the template and have warpgate create the crosshairs for the template.. think that should be possible
So in the preItemRoll, you could eliminate the template and the resource consumption and then it should not prompt ๐ค
can do that too
And then put them back in for the second call
Ok. Let me see if I can do that
โค๏ธ
You can save the macros in the item, and then the macros transfer to the templates. ๐
You can even edit them afterwards.
That's the stuff!
You have Door Macro to thank for this.
I basically just copied it and changed all instances of door with template
(used Door Macro in tonight's session btw, never had players so excited about a dumb thing.)
Everyday I will be going through that door from now on
I created some trap workflows... nasty stuff
Returning false seems to work just fine actually, Midi comes up with a notification saying the original item's name is blocked but the cloned one seems to roll just fine. The other suggestion, can I refer to the workflow like that in a macro?
pre release, use with caution or whatever, toodle-oo!
You can reference the workflow as this in macros for MidiQOL, or going through the hoops to properly define it, ```js
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
Oh! It works! but... it throws an error
All I did was include this:
foundry.utils.setProperty('consumeUsage',false);
foundry.utils.setProperty('needsConfiguration',false);
from what you had given me before
So setProperty(this,'advantage',true) will give advantage to the current workflow
I was actually trying to test something else
guess pearl of power isn't possible for pact magic, since it's supposed to give a 3rd level pact slot
Gotta do a lot of finagling for that one, at least
I guess that stops everything cause there is an error ๐คท
You are misusing the setProperty
But... it works lol
You need to setProperty on an object
Sweet, thanks. Now I can make stupid items more dynamically.
Magnifique... if only I was on v10
yeah my issue with that is the notification. You can supress it within the macro. There were a couple of scripts in #macro-polo iirc
How many macro modules must I make to drag you here?
I saw some v10 ATL mess Kaelad was fixing this morning, gave me the willies again
I'm not sure what to set it on. It doesn't work on actor.items.getName(itemData.name).
sorry, the item, I mean
I mean you cannot use that as is in v9 afaik
It happened to ~~work ~~seem to work, because I think you broke the workflow with your macro, as it errored out
Ok. I don't see where I can disable the template and consume resource options otherwise
Been looking through the item properties
Now make an Item Piles macro (well that doesn't make sense...)
Mimic a macro ๐
Macro Macro?
Only v10 for Moto Moto to take the ๐ช
OK ๐ป with me.
You will need to change the properties of the Item in the workflow in the preItemRoll phase.
Get in there and change the workflow.item.data.data.target to not be a template so it doesn't trigger the dialog, and if it has uses change that too
Ok. So like just set value to 0 or something?
You will need to save these details in flags, before changing them actually.
Then in the After Active Effects phase change the item back to the original
(can be done with a warpgate mutation too, much easier)
Yeah to anything that doesnt trigger that dialog
You told me that you didn't want the dialog to appear the 1st time, but the next time it should appear correct?
I haven't followed 100% the topic and its pretty late here, so I hope I am not confusing you unnecessarily!
Nope. That's right. I see where you're going. It's a workaround, but it should work, I think.
As long as it handles it before trying to pop that prompt
Just test it quickly in a test item. Make an item with a target template 10 ft radius.
Use an Item onUse macro preItemRoll that does something like this.item.data.data.target = {}
Does it change before the dialog pops up?
Yeah, that works
Same principle for item uses etc.
Yeah. Already tested
So more or less that should get you going
I just need to copy the values, so I can add em back
actually does it change back if the workflow finishes?
I mean so I can make the clone
yeah I was just wondering about what happened in your test item
did the target revert to the initial one?
I am too tired to think now, but it should be locally changed. Does a reload change it back?
After refreshing, it's still blank
OK!
You need to set some Flags on the item to preserve the original ones before changing them, or just mutate the item with Warpgate
and revert it After Active Effects
What triggers does it have? Not at my PC to test it out.
Same with @short aurora and anybody else who chimed in
You can find warpgate mutation scripts for items in the discord here, but also as examples in the Warpgate repo wiki and readme
Totally worth the time to read through it!
Does it happen within the macro if it's the last line? I'll have a look at macropolo, seems to be some css shenanigans
I would imagine so. Haven't tried it yet
Is there a hook for ui notifications that you could hook once to supress the next one ๐คท
Yeah I was just wondering if I could turn it back 'on' in the same macro, but guess I could hook on a midi stage once to do so anyway
The thing is that if you return false you are off the preItemRoll phase, so just do it in a later one
What version is this? And how is the item's damage set up?
I can quickly check with your settings before going to bed, if you export them and DM to me
err how do i do that
MidiQOL settings => Workflow Settings => Misc tab click export
OK I can replicate with your settings.
speaking of my workflow settings a lot of stuff doesnt work :/
like i cant proc the midi reactions menu
it worked for like once first i tried, now it doesnt work (not sure if module conflict)
If you choose Merge Cards the damageType repeat stops
also is there a syntax i can put in "other formula" so that it can show a dmg type?
1d4[slashing]
wheres merge cards?
@gilded yacht 10.0.15 Without Merge Cards the damage type is repeated for a damage formula like 1d4 + @mod +2 Slashing.
Intended?
below the export button from before
3rd checkbox below
o i found it... problem... im running retroactive advantage and merge cards destroys that
if midi could have roll20 style "2 rolls by default (or 3 with elven accuracy)" that would be fantastic ๐
for atk rolls/saves etc (anything that can have adv/disadv)
elven accuracy is an option in special traits of the character sheet
ye but the player would need to roll with adv to proc it yea?
yes, or use midi flags to auto roll with advantage etc
the roll20 way is to always roll with all 2 (or 3) rolls, so that all rolls are 1 click
but if you are using Advantage Reminder, probably that will not be the case as AR doesn't play well with Fast Forward rolls
hmm i never tried, how reliable is it?
I use it all the time. Needs setting up but you can automate conditions pretty robustly (with DFreds CE that has predefined 5e conditions that work with MidiQOL automation)
That means spending some time to get the hang of it
that means ditching CUB right
i had trouble just getting conc tracking right ๐
with midi + cub
or even midi alone...
For concentration it is one or the other. I use MidiQOL
how does this automation thing handle things like underwater (do i need to define on the map whats underwater) or retroactive things like warding flare
CUB and DFreds can play together
or straight up declared advantage things like tides of chaos or inspiration
You can create a condition on the tokens affected that will be an Active Effect with all the flags it might need for disadvantage.
If you are already using Advantage Reminder and you are OK with that workflow going full automation with Midi means that you will need to learn to make things differently and you will have to decide if the time that you will need to spend is worth it or not!
Anyways, off to bed! If you need anything ask and there will be users around that can help ๐
ah my bad!
is there a way to reference how many weapons someone has equipped?
9x token.actor.itemTypes.weapon.filter(i=> i.data.data.equipped);
10x token.actor.itemTypes.weapon.filter(i=> i.system.equipped);
you can also mix in i.hasDamage
So I want to reference the number of equipped items for the purpose of calculation โฆ (Equip items)*(d4)
Can I do it?
Like to add as a damage calculation to a weapon
so the more of this item the player has and can equip the more damage it does
@dull condor Yes and no. I tag all of the terms with the damage type when creating the damage list so that dice so nice damage dice are coloured correctly, but it was unintended that the non-merged card display. I'll see if I can juggle it so that the display is as before and the dice are still coloured.
Should be 'fixed' in 10.0.16, the side effect of that is that dice so nice damage dice won't be coloured according to the damage type for non-merge card rolls.
Creating, deleting, hiding, and revealing the template, and when a token enters, leaves, or moves within the template.
What about when a creature starts it's turn within the template ๐ฅบ
See, I thought of that
But that would be a combat hook, so you might as well use Effect Macro or something.
Though I'm gonna make an api function to easily get all templates that contain the token.
But there is a bunch of logic that would need to be implemented in each of the EM macros
Plus it would complement how EM does it really logically, e.g. EM can do it if you have an effect, TM can do it if you are standing in an effect ๐ฅบ
Also one more question: is the macro triggered locally or globally, and if locally as I assume, which client is it run on, the template owner or the token owner?
The one creating, deleting, hiding, or revealing the template, unless you set the script to be run as GM (using the first GM found, does not require Advanced Macros)
and the one moving the token (unless you set the script to be run as GM (using the first GM found, does not require Advanced Macros)).
In other words, same as Door Macro. Praise Door Macro.
Alright so it depends on the context, makes sense
Yeah this way it should let you do whatever you want. And of course no args. ๐
Blasphemy 
Entering and leaving is easy enough to use to add an effect to do combat turn macros
I'm interested in what variables are available to work with
Like if you stay in the template during a move does it have the start and ending coords
Wall of fire is a good example of what I'd try to setup
What would you need for that?
Another big one is spike growth
Calculate the delta move in a template to apply damage
Cloud kill another good one
But that should be already doable with what you already have
Spike growth that doesn't rely on a buggy AA template is all I want lol
scene (document), template (placeable), userId (string), gmId (string), and sometimes token (placeable)
token is null for triggers on template creation for example. No token involved.
It doesn't. Not a bad idea tho.
Can come up with cloudkill
I'd want to make sure a token that doesn't move, but otherwise leaves the template is captured
Would you want the top-left coords of a token or the center?
If I pass the previous and new coordinates
Whatever it uses already in the token info is probably easiest
That's the top left.
That would make it easier to do comparisons with other tokens
What would you want from a trigger when a template is moved?
Just its new coordinates?
Can't you grab that from the template?
Just a trigger honestly. So we could do cleanup on actors no longer in the template.
mmm. A helper function to get all tokens within a template could be fun.
We all agree that sharing at least 1 grid space is enough to be considered "inside", surely
I saw you mentioned that in your GitHub issues
Yeah only got the opposite currently - get all templates that contain a token
But yes
Cloudkill is pretty easy with Active Auras
or i suppose you could have a overtime for each
(did you read the rest of the conversation or....)
have it check for itself so doesn't apply twice
I was just giving examples of spells that could be reworked with Zhells new shiny template macros
Anyway. A trigger when a template is moved, which gives you template, scene, and maaaybe an array of token ids?
Plus AA not officially on v10
Yea
Or a helper
That we just pass the template ID or something
Yeah not much need to pass them to the trigger if I just make an api function.
If that isn't already core
Getting all tokens contained within a template?
No quick core method, but it's close.
I never messed with templates beyond initial targeting
A quick way to find all tokens in the already placed template is ideal
can someone help me out with something midi here. I'm trying to educate myself on damageOnlyWorkflow. I've written a super simple macro based on @gilded yacht's example of divine smite. it's this: ```js
console.log("args[0]:", args[0])
let target = await fromUuid(args[0].hitTargetUuids[0] ?? "");
console.log("target:", target);
let damageRoll = new Roll(2d6).roll();
console.log("damageRoll:", damageRoll);
console.log("actor:", actor);
console.log("token:", token);
console.log("itemCardId:", args[0].itemCardId);
new MidiQOL.DamageOnlyWorkflow(actor, token, damageRoll.total, "bludgeoning", target ? [target] : [], damageRoll, { flavor: "Falling Damage!", itemCardId: args[0].itemCardId })```
i've got it on a very basic item: it does 1d4 damage and rolls the itemMacro.
but I keep getting this error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length') [Detected 1 package: midi-qol] at createDamageList (utils.js:119:29) at new DamageOnlyWorkflow (workflow.js:3041:23) at eval (eval at callMacro (workflow.js:1591:15), <anonymous>:13:1)
everything is returning true actor, target, etc., in the console.log.
and the DamageOnlyWorkflow is taken straight from his example on his readme.
so... I'm not sure what I'm doing wrong.
Using that macro as is?
the macro I have posted above is the one I'm using.
await new Roll("2d6").roll();
Evaluating rolls is async
It probably chokes because damageRoll.total is undefined
Looks like the example is dated
yes, that fixed it. Tim's example on the page is out of date.
thank you.
thank you, @molten solar
usually the system will mention rolls needs async:true or asyc:false in a console.warn
A trigger for a token starting its turn and ending its turn in the template sounds potentially useful, but it's also easy enough to just apply an effect macro for the same thing.
Yeah, I can't think of a situation in which you wouldn't have had the opportunity to apply an effect to them already
Either when the template was created, or when it was moved
Entering and leaving the template may also need the move coords too
Yep
Lmk when that version is out. I'd love to have a crack at spike growth and cloudkill with it.
Now we just need Token Macro
Middle-mouse-click a token to trigger an embedded macro? lol
Thatโs what I wanted with Hunger of Hadar however it works perfectly well with midi overtime and active auras.
Start of turn auto cold damage and end of turn if still in it acid damage with a save.
Anyone know an easy way to export effects as json?
If there was an easy way to have a template move with a token then we wouldnโt need auras. AA was painful in our session tonight again ๐
put them in items
is Token Attacher not easy? I don't use it so I dunno
Attach the template with token attacher
Itโs pretty manual afaik
I'm sure you can write a macro for it.
I ran a session last week with Darkmantles and the aura just followed them round. The aura of darkness was on the tokens.
So template macro can replace AA then?
Technically yes
Keep in mind using template macros to do it is less user friendly
Build a bonus should be used when you can
This is my channel now. /s
If there was some way to use crosshairs or something to โstickโ a template to a token or automatically have it stuck to the caster then we would be golden
Essentially template macros gives us the foundation to apply effects to those in it
A macro triggered when the template is created...?
I think token attacher has an api
It didn't seem well documented last I looked
But yes on template creation to call whatever function that module has to attach it would do it
That seems like the basic approach Atro was hinting at. Using templates for auras
Oh damn I was about to post for the top left Vs center question but I saw 100 messages after
What happens with larger tokens?
Does foundry natively deal with that?
Nope it's always top left I think. You need to get the size and test the center ๐ค
This does seem promising
The functions I stuffed in the API (in babonus as well) calculate distance between each center of every grid cell you occupy
So if you're Large, it calculates 4 centers
3 modules needed to replace 1, what an upgrade
It's the high automation way
AA also interacted with multi level modules, but I won't miss that
As in the Levels module?
Damn interesting convo but I am on the road. will catch up later
I'm not touching that with a 10 ft pole
Actually a good question, how do you interact with Levels and its volumetric templates?
Pretty sure that predates levels
how about 
MLT was always a bit of jank, though the newer versions are less janky
What about elevation in general?
A much easier addition.
Nothing stopping us from doing that ourselves in the macro
That is a fair point, though having it interact nicely with volumetric templates and levels would mean stuff blocked by roofs/floors ๐
yall bein greedy
Seems outside the scope
Always have been ๐
Sooo Spirit Guardians with Template Macro, Effect Macro and Token Attacher?
๐
Ooooh
Dungeon puzzle: door can't be opened unless under the effect of Spirit Guardians. Door Macroโข๏ธ ๐
Apply macro directly to the door.
Apply forehead directly to door! ๐
Cody wrote in the email when it was approved that it made him want to run away screaming. ๐ฆ
As Iโm not on v10 and donโt know how this worksโฆ can a template macro and any effect macros it calls all be on an item?
I put the macro config in both the item and on each template. When a template is created, it tries to find the item that created it (there is a flag in dnd5e for this now), and then it just takes the flag data from the item and copies it
So if you put the Template Macro in the item, all templates have them.
Effect Macros, however, are in effects, not items.
I'm going to embed the effect in the macro when I make it with what I'm doing
OK Iโm adding CE to my list of modules for Spirit Guardians then
What does CE do in this case?
Keeps my effects tidy and gives me a nice description when theyโre running
CE + EM is working great for me
game.dfreds.effectInterface.addEffect({ effectName: 'Effect Name', uuid }); a lazy way to do it
Just make the spirit guardians effect then add that effect via enter and leave
I just made Aura of Life using CE + EM โฆ and AA ๐ฆ
Yall really don't like AA it seems. I thought you guys swore by it.
More like no other options
We swear by it as making a lot of stuff possible, but it's still janky
In theory itโs amazing, in practice itโs doing way more harm than it should
Adds a new tab to effects that you configure and it updates effects to tokens around it
based on how it's configured
Not quite, it only applies if the token does not already have it, but other than that basically
(to the movement)
In reality, it it likes to have the same effect show up 2-4 more times than it should on nearby tokens
Cause reasons
ยฏ_(ใ)_/ยฏ
Except sometimes it does apply the AE even if the token already has it
I assume it runs through the GM?
Oftentimes those are not actual instances, as in they are not saved to the database, those are phantoms
But they still are treated as real in the local client of course
It picks a GM to handle it
I'm of the opinion for whatever reason it also selects a spare player or two
and that's where the phantom issues pop up
Ah, and then the player moving too quickly can trigger it multiple times due to latency.
or that
It seems to get really unhinged on my familiar especially
Yeah multiple phantoms are usually due to latency
tbh that might be impossible to avoid
Tbf, I'm not sure applying a full synchronized AE is the way to go tbh, I think that potentially a more local solution would be more stable and less laggy
What, praytell, is a sync AE
Can clients put active effects on non owned tokens?
My ignorant brain is saying why doesnโt it check if something already exists?
Ask that twenty times and you might not get the answer before the 5th
It does, most likely, but due to a race condition the check is performed multiple times before it gets too apply it
"no, no, no, no, yes" -> 4 effects
Synchronized as in actual AE. Imagine if it instead calculated and applied a fake AE client-side that was never saved to the DB. No need for sockets then, though it might cause other issues ๐
Is this why BG3 is taking so long? Auras are impossible?
let's not.
Nah, they just need to implement everything from the bottom up ๐
Probably easier since they got one 'client' (the game itself) doing an aura, while we got three parts; player moving, server side, and the GM, all trying to be in sync
though I havent touched bg3
BG3 has co-op but I guess the server has more dominance
This did just give me an idea though.. If AA only ran on the GM (and yes, sometimes there are more GMs, ignore that), as in it just exited out early on non-GM clients, it might actually be less jank ๐ค
I was looking at it's github, I'm pretty sure it already does that
I am letting you do that in TM, executing all scripts as GM.
@molten solar What's the variable names for location stuff that was added?
console.log(this)
Ok Iโm off to bed now. With the brainpower in here I look forward to waking up to a solution to auras in FVTT ๐
Heya, I am currently trying to automate my paladins Divine Smite on Foundry v10 using midi-qol.
I am using the Divine Smite from the Midi SRD and everything seems to work fine, except that I can not get the Smite critically hit.
Do I have to press some special keys in order for it to work?
Hey man, could you drop me a DM on how to set it up correctly or just send me a screenshot?
Do you have the module effect macros?
Sorry, guess I didn't describe that well enough in the description. It uses the module Effect Macros, it's run as a end of turn macro inside the effect.
You'll also need the fork of Active Auras that works with v10
I fixed AA myself, assuming that is the same fix tho x)
Are you using the macro or no macro version?
I tried both and neither worked.
Do I need to disable Auto Fast Forward of damage roles for it so players can manually click "Critical Hit" or "Normal Hit" for the damage roll?
If you hold down T while you roll it it should show the normal item card, then you can do critical from there.
Technically holding down C should force a critical, but not sure that works with fast-forward
I did try using C but that only works with the chat-card buttons.
Is it possible to disable fastforward for certain spells? Otherwise I guess I have to remind myself and my players to hold T for divine smite ๐
can you drop me the fork link for the fixed AA?
Might be possible with a macro actually, but not natively as far as I know
Well everything is possible with a macro ๐
I guess I can also just roll without forwarding damage ever. One more click is not gonna hurt people... hopefully ๐
I'm looking at the workflow right now to see if its possible, give me a minute ๐
https://raw.githubusercontent.com/fotoply/Active-Auras/main/module.json
I think it's this one.
Got it!
Which version did you prefer? The macro or non-macro version?
All you need to add is
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
workflow.rollOptions.fastForwardDamage = false;
But it needs to happen at the right step.
So you can create a new macro in the world, call it something like Force damage dialog, then you put the code above into it.
Then in any item where you want to force the dialog you add in the following in the onUse macro section:
Its very important that it happens at that step through, as otherwise other things may reset the flag
@molten solar Do you know if Foundry has a native way to count distance between grid spaces that uses the game settings for diagonals?
I preferred the macro version.
Is the same workflow passed to all macros in the onUse section?
Yes
it do
And also yes, it needs to happen before the damage roll but as late as possible
canvas.grid.measureDistance(original, other, {gridSpaces: true});
Also you can disregard the macro vs non-macro question, at first I thought I would have to modify the macro, but then I realized that you could just put it in world scope and add multiple ๐
what would original and other be in that context?
I think that uses whatever option you have set
Two placeables
uses their top-left corner, however
No, for that you want to construct Rays and use canvas.grid.measureDistances
which takes an array of rays. ๐
an a-Ray if you will
or actually it takes an array of objects that has ray: Ray ๐ค
Testing out my template macro and realized it's rounding in a not ideal way
not using the api?
oh, I didn't even look at that
I get a ```js
await is only valid in async functions and the top level bodies of modules
message
Oh, hold on
easy fix
I was including my helper functions in that, so that was a copy and paste issue
I think that should fix it
Are you talking about your API for this module or the Foundry API?
Unexpected identifier 'showMenu'
bleh hold on
okay, thanks a lot!
this module
You want all tokens within the template, or all templates that have the token, right?
not for this
(offtopic: Is there a proper IDE like lines module for macro fields xX)
I'm currently setting up Spike Growth
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'classes')
[Detected 1 package: effectmacro]
at eval (eval at executeScripts (main.mjs:21:18), <anonymous>:5:33)
at Object.eval (eval at executeScripts (main.mjs:21:18), <anonymous>:63:9)
at EM.executeScripts (main.mjs:22:16)
On v10 right?
correct
Person has levels in cleric?
dont remember the spell offhand.
The caster yes
I just need to calculate how my grid squares they moved
oh wait, its a CE, that is applied to the caster by hand. is that a problem?
Yes
It's grabbing it via the origin, I expected that to be a feature
Doesnt CE applying via name matching keep the origin? ๐ฆ
Are you setting this up so you press the convenient effect?
No, i press the feature in the PCs sheet
that should work then
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
let me test locally
before pasting it again
And the feature is set to target self
Using DAE to make the effect?
Yea, don't do it that way
Maybe this is useful?
okay, so CE doesn't keep origin around?
or changes it in a way I didn't plan on when I made it
You'll also want to delete the CE or at least check don't apply CE for that feature
try gridSpaces: true and just use the parts you need
Yeah just change it up a bit to use coordinates
Works now ๐
Coolio
Is there a nice way to label the roll as "temp hp from twilight sanc" like?
You should be able to edit line 55
that is midiqol code?
It's just using damageRoll.toMessage to make the message
I didn't want the full cardbox for Sanctuary every time it applied
because it can be quite spammy with a lot of allies
yeah, just right now it provides no context on what is rolled ^^
Gonna sound dumb, but I don't actually know the format for making chat messages
that part was just a copy and paste
add flavor: "your flavor text here"
@molten solar Any way to get the template when working inside "When Entered" and "When Left" ?
I need to look at the template to get it's radius so I can subtract that from the distance calculations when they're moving in and out of spike growth.
Is there not template in the macro when you move the template?
Nah, this, template, scene, and token
token sometimes null, and this sometimes has different stuff
but template and scene should always be there
No documentation for pre-releases. ๐ ๐
Cost of living on the edge
@kind cape Hey, regarding the Divine Smite discussion from earlier.
So I have created a macro called "Force damage dialog" with the code you provided and added it as a onUse macro with the right trigger "Before Damage Roll".
Still, it seems the damage is rolled automatically and instantly.
Do I have to change something regarding the ItemMacro in the Divine Smite?
or do I have to name the macro without spaces?
Should not be nessecary, can you check in the console (F12) if there is any warnings/errors that appear when you use the item?
nope. no errors, no warnings.
Could you take a screenshot of your details tab?
if (canvas.scene.grid.units != 'ft') return;
let x1 = this.coords.previous.x;
let x2 = this.coords.current.x;
let y1 = this.coords.previous.y;
let y2 = this.coords.current.y;
let ray = new Ray({x: x1, y: y1}, {x: x2, y: y2});
let [distanceFeet] = canvas.grid.measureDistances([{ray}], {gridSpaces:true});
let distance = distanceFeet / canvas.scene.grid.distance;
let damageDice = (4 * distance) + 'd4';
let diceRoll = await new Roll(damageDice).roll({async: true});
let diceTotal = diceRoll.total;
diceRoll.toMessage({
rollMode: 'roll',
speaker: {alias: name},
flavor: 'Spike Growth Damage'
});
let token = canvas.tokens.get(this.tokenId);
await MidiQOL.applyTokenDamage(
[
{
damage: diceTotal,
type: 'piercing'
}
],
diceTotal,
new Set([token]),
null,
null
);```
This is what I have so far, works well. I just need to figure out what kind of dumb math I'll need to handle cases of the token starting outside of the template.
As of right now, throwing this inside of "When Staying" works great.
@kind cape sure, here
And a screenshot of your macro?
Difference between template radius and distance to token starting position?
yea
you can also just do ```js
const {previous, current} = this.coords;
const ray = new Ray(previous, current);
Hmm, could you try it on the non-macro version?
I'm sure there is some Ray thing I can do
the non-macro version works
Hmm, the macro must be doing something then
it does a new damage only workflow, but it still reads the "isCritical" from the args[0]
but not really something that should interfere with disabling fastforwarding before it happens...
Actually that might be interfering, since it might re-set the options based on your settings ๐ค
Is the non-macro version adequate for you?
Or insist everyone moves one grid space at a time
Moving one grid at a time is probably also a good idea so that you don't get surprised with the amount of damage you suddenly take ๐
I thought about that lol
But if you manage to invent a 'distance travelled through template' function, I'd like to adf it to the api.
@kind cape how did you find what fields and properties the workflow has?
Pretty sure my geometry teacher would be upset with me right now
I'm blanking on what to do
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
console.log(workflow);
As an onUse macro
Then you can explore the element in the console
ahhh
There is also the source code for the workflow in the MIDI repo, which can be useful when trying to figure out timings ๐
I think it doesn't show the dialog for damage since the spell itself has no damage
at least the macro version
@molten solar What happens when a token passes through a template, but winds up not landing in it?
Presumably it doesn't get counted for anything right?
though giving the item any damage doesn't fix it either. The args[0].isCritical parameter is still not true
actually, its not even false, its undefined.
Updated macro:
if (canvas.scene.grid.units != 'ft') return;
let {previous, current} = this.coords;
let ray = new Ray(previous, current);
let [distanceFeet] = canvas.grid.measureDistances([{ray}], {gridSpaces:true});
let distance = distanceFeet / canvas.scene.grid.distance;
let damageDice = (4 * distance) + 'd4';
let diceRoll = await new Roll(damageDice).roll({async: true});
let diceTotal = diceRoll.total;
diceRoll.toMessage({
rollMode: 'roll',
speaker: {alias: name},
flavor: 'Spike Growth Damage'
});
let token = canvas.tokens.get(this.tokenId);
await MidiQOL.applyTokenDamage(
[
{
damage: diceTotal,
type: 'piercing'
}
],
diceTotal,
new Set([token]),
null,
null
);
For now, it's a good proof of concept for spike growth.
How would I implement this? My Druid player loves Spike Growth.
Until Zhell's new module has a proper release, I'd stick with the current method using AA.
(Just need to remind myself what that isโฆ)
I think midi has a sample item for spike growth
using active auras
I'm attempting to set up the spell in a way that doesn't use active auras
I'm trying to make the new (OneD&D) Grapple for some playtesting. I'm using midi-qol.Overtime with "turn=end, saveAbility=str, saveDC=@attributes.spelldc, label=Grappled" - is there a way to change saveDC so it will be equal to [8 + your Strength
modifier + your Proficiency Bonus]?
I really really like active auras and hope its not being replaced
It's not, but a lot of us here find it mega buggy
@kind cape could it be that the damage dialog does not actually change anything about the workflow being critical / not critical?
I saw your comment about lag causing issues with auras. Not been using any auras for now but one of my players has very slow up/down speeds so this may well come into play.
I believe it should be setting the isCritical ๐ค
I do not think that is an issue, it clearly states its best used in combat only and in combat nobody moves around all at once, a singular person moves at a time, no aura issues occur then, it only ever becomes an issue when many people/tokens are moving all at once and rarely are spells being cast tin these moments, its almost always just aura of protection that gets weird, and even then, the solution is to move in and out of the pally aura before you make a save if you have duplicate buffs on you.
when I log the workflow from the item macro (divine smite) it shows that "isCritical" is undefined, hm...
Try logging the specific value. The object you see in the console is "live", so any changes that happen later on in the flow may impact the values you see
is still undefined
Is that not the default when you use Strength to set the save dc?
If @attributes.spelldc means it can use roll data, can you use the item's roll data? If so, the DC is in there.
No clue whats going on then
no - in OverTime i need to set a DC - I think it should work with saveDC=8+@abilities.str.mod+@smoky smeltiency (don't know how to include proficiency here)
@prof
yeah, now it's working
I could probably just give it a damage of 1d1, then if it crits its a 2 and otherwise a 1
hacky but it should work
kinda confusing though. I wonder how the tim does it for their games
Ah... something else I just noticed is that the no macro version does not roll critical damage if its a fiend or undead
Hey guys, I was having an issue with the arcane ward macros that are not temp HP based in the Midi sample items not applying to damage the caster takes. Currently on version 9.280, Is there additional setup other than importing the feature and using it?
Smite works fine for me but I don't fast forward
make sure your activation condition settings are setup
you can also do @abilities.str.dc
I am using the one from the midi-srd... so it should already be setup
midi srd doesn't setup your midi settings for you
my spell and mwak / rwak roll other damage is set to: activation condition and it rolls the normal damage for a fiend / undead but not the critical damage.
So basically normally it does 2d8 + 1d8 against undead. Then for a crit it should do 4d8 + 2d8, no?
since we double all damage dice on a critical hit
are you hitting normal in the popout or crit?
crit
that standard dice roll won't apply crit
oh wow
you'll need to use either return damage roll or dnd5e roller
I think that option of smite is meant for non fast forward
I'm using the smite with the item macro and it detects fiend/undead and crits just fine
I switched over to dnd5e roller for all macros
we want to drag and drop premades so we can save on time, bab also is v10, we're on v9
why aren't you using the macro version of smite?
because I originally wanted to also use auto forward
it won't crit cause theres no attack roll then
my version auto fast forwards and uses the same target as the previous attack
okay I disabled fast forward and for some reason it still auto rolls damage without any dialog... I think I just broke something ๐
wow I'm testing now and you are right, this v9 smite is broken
it is impossible to crit with either of them
okay, good thing that I am not the crazy one now XD
Looks like I'm using Advantage reminder
I could just write my own macro with a made up dialog
this the midi sample version?
yep
yep, both refuse to crit, either fast forward or normal
same here
they don't give you a damage popout, they just happen
yup
9.x version with no macro?
well I am on v10
Ok the no macro version works with crits
its the macro version that is borked
but you have to have fast forward off, cause its not attached to the weapon attack
I think its borked because the item itself has no attack or damage roll
Might as well just use advantage reminder honestly at this point
Divine Smite 10.0.8 does have if (args[0].isCritical) numDice = numDice * 2;
well, need the spell expense so probably stickin with the no macro version
yeah but how do you make isCritical true? XD
the dialog doesn't change it
could be numdice isn't a number
let numDice = 1 + args[0].spellLevel;
change that to let numDice = 1 + Number(args[0].spellLevel);
and then without fast forward, yes?
I thought the problem was you already established that args[0].isCritical was always falsy
yeah it should always be false unless critical then true
Yes true is not false
the problem is that there is no popup window ever to set if its critical or not
even with no fastforward it simply doesn't popup since the spell has no damage and so the system probably never wants to roll any
it doesnt
which is the confusing part
I thought the workflow would tell it, if you get the popup.
but I just made it give the popup and pressing crit doesn't work anyways
yeah I think he forgot to include a workflow grabber to check your last attack
yeah, mine checks the workflow and everything else.. then applies crit if needed
How do you get the previous workflow?
ah okay
and does MidiQOL.Workflow.workflows only contain recent workflows or all ever created ones?
lemme see if my version 10 works right.. I updated it but I forget if I've tested it or not heh
it has all current listed workflows by token actors
You can only have 1 per scene token.actor
oh
so my PC can only have one workflow at once. Wouldn't the new one override the previous one then immediately?
no, not until damage roll complete is done
ahh
actually you can have 2
one hasn't finished yet finalized till it's ended, then it trashes the previous workflow
This looks a lot like the built-in methods Foundry already has for whether a template contains a point/token
The idea is to use the move as a line segment then see where it collides with the template (circle in my case). Then just measure the distance with foundry.
ok so new report on v9 smite:
Macro version never crits
No Macro version's additional damage for fiend/undead does not roll additional dice for crit
I had no idea this was borked and my poor pally player never caught on either
I think I'm just gonna get a macro polo macro to expend a spell slot and use advantage reminder
Good thing I literally try to automate as much as possible before every starting my first campaign / one shot
that way its all in the same attack
I also have advantage reminder installed. How do you get it all in the same attack?
just as situation bonus?
basically you make a button for [[/r 1d8]]{Fiend/Undead} and then [[/r 2d8]]{Level 1} and so on so a bunch of buttons.
and I'm going to add in a button that just expends a spell slot so he can do all of it in the popout
cause I aint makin no macros for this lol
ahhh so you just add buttons to the chat card of the item
very roll20 ๐
but if it works, it works
wait thats possible?
Thats Advantage reminder ๐
I thought It can only highlight stuff and show some text
but the text can be buttons?!
and you are showing that for every damage roll the pally does?
Do you use Advantage Reminder in combination with midi-qol?
it pops it all into the situational bonus field when you press buttons for damage, but the smite, will actually activate the smite spell independent of the attack, but like we both found out, smite don't work right so I'm removing it and using advantage reminder fully
The red is part of advantage reminders settings, he added the ability to use specific colors or player colors
I'm red in my game, set to player colors
ahh
theres probably way more functionality I don't know about in v10 as kaelad has done alot more in v10 for the module and I'm stuck in v9
you have no fast forward at all, correct?
but what I like about advantage reminder is that its all UI stuff that I can figure out with my 3 brain cells and I don't have to write a bunch of macros
yeah my players were trained quickly to never fast forward
All my players are from Roll20 without Premium, so they also are not at all used to fast forwarding stuff
so I guess I just disable all fast forwarding and work from there
still use midi for alot of things, but advantage reminder is great for the really situational stuff
Can you share your midi settings?
I mean, I can share the whole enchilada, but really its just like 3 settings
well then those 3 settings would be enough xD
the abilities and saves are outside in the main menu of midi, not in workflow, and then theres the attack ones in DM and Player tabs inside workflow
um...I'm on v9 so maybe same places?
when needed
Auto attack and Auto roll are not fast forward fyi
fast forward is the skipping of the two popouts, auto rolls are the skipping of having to click the button in chat to activate attacks and damage, very different( and I auto attack/when needed for that)
Okay very good
and you just setup divine smite as a passive effect that gives those messages?
The above is the player tab
I haven't fixed it to not use the midi sample item yet but yeah...
its possible to have multiple messages too, right?
Okay I definitely will use more of advantage reminder on the future.
his inline rolls module looks awesome too but its v10 only and alas I cannot use
Divine Smite with Advantage Reminder
Till a macro guru can clean it up, I'm just using a blank spell in their level 1 category to expend the slot
I am very tempted to just write a dialog that shows up where you can select spell slot and whether its a crit or not for the divine smite,
but thats actually not in the games rules since it would have to trigger before any mwak damage roll...
with your way they smite before knowing the normal damage, so its great
@fallen token Is there a way to correct the spacing between lines in advantage reminder so the buttons don't overlap?
Is there a bug where a reaction check on magic items doesn't see reaction spells within the magic item? It seems to delay like it put out a choice dialog, but nothing pops up when Check Player reactions is set to On + Item Magic?
what is the item?
I just set up something kinda similar for Minute Meteors, a macro to consume one of the meteors and then the additional damage as a separate button
As for spacing, maybe try a <br> before the Level 1 buttons?
Currently still trying to automate / improve Divine Smite, I had the idea to use Roll Groups.
Now it seems that Roll Groups can add its buttons to the midi-qol item card shown in the chat, but it also wants to auto roll the combined damage.
Can I turn off auto rolling damage for specific items?
Any compatibility between Midi and RG will be nothing more than a happy coincidence.
I'm surprised it can even add the buttons.
also, I dunno if RG is like MRE, but MRE really screws up items for midi and uninstalling MRE would not fix it, you'd have to sit there replacing all the items for midi to work right again
ewww
it was cause MRE added damage formulas and they'd stay there after you removed it, and midi does not like extra damage formulas, or needless versatile/other formulas
Hey Yall, Im trying to use Midi QoL and Item Macros together, but when I use the Midi QoL Samples, it doesn`t do anything, and the console pops up this
"Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'itemData')
[Detected 1 package: itemacro]
at eval (eval at Item._executeScript (modules/itemacro/scripts/helper.js:82), <anonymous>:39:30)
at Macro.eval (eval at Item._executeScript (modules/itemacro/scripts/helper.js:82), <anonymous>:41:9)
at Item5e.Item._executeScript (modules/itemacro/scripts/helper.js:88)
at Item5e.Item.executeMacro (modules/itemacro/scripts/helper.js:60)
at HTMLDivElement.<anonymous> (modules/itemacro/scripts/helper.js:170)
at HTMLDivElement.dispatch (jquery.min.js:2)
at HTMLDivElement.y.handle (jquery.min.js:2)"
Can you help me figure it aout? ๐
disable the item macro sheet hook
pretty sure nothing should be checked in Item Macros module settings if midi is installed, odd that this keeps coming up, is there something oing on with the v10 builds? Normally they are defaultd to off
Yeah, both the Hooks and overrides are checked in item macros, i'll disable them
Did you install item macro before midi was ever in the world?
I think so, yeah
Yay it worked โค๏ธ โค๏ธ thxthx
The sheet hooks MUST be off in Item Macros settings to work with MidiQOL
Thx, I'm just getting started on foundry and I'm having trouble figuring stuff out still
No worries. Just asking around the discord will most of the time get you there!
Also reading the readmes of the modules you are using is a really good way to get yourself acquainted with specific settings etc
Yeah, I got a little bit overwhelmd but I'll go slowly and figute stuff out
I'm just trying out the sample items first jut to get a feel
Sample items might be a bit advanced when just starting out ๐
But its a good way to check what can be done and get ideas ๐
Hey all! I'm trying to edit the Invisibility spell to get MidiQOL/DAE to drop the Invisible CE condition, as opposed to the CE Invisibility Spell. Not quite sure what I'm doing wrong. Any thoughts?
You are applying the DFreds CE first and then if absent you check for effects defined on the Item. MidiQOL checks the DFreds CE database against the name (Invisibility in this case) and applies the one that is found
You should change that to Item Effects first, or apply both and on the Item's detail page close to the bottom, check the Don't apply DFreds convenient effect, so as to not double up on conditions applied
Hell yeah, that did it!
To be clear, I did have to manually add that DAE to the Invisibilty spell, right? Or was that somehow redundant?
Like is there some system-level way to have Foundry reach for CE conditions by default when a spell references the condition? For example:
It is redundant I think. DFreds should set the correct core status afaik
I might be running into an imported vs SRD content issue. I just checked the SRD Spell compendium and it looks right.
Oof imports, yeah no idea then ๐คท
My usual way is to create a CE that matches the name of the feature and then have it use macro.CE to apply the actual effects
yeah but why ๐คท ๐
It makes it clear where an effect comes from and if there are multiple conditions I can remove them by removing the parent effect
Plus the CE descriptions are 
I just meant why use the macro.CE. It should automatically apply it or I can be confused now ๐ป
Well the effect is not named the same as the spell, so how would it know? ๐ค
Ah I went off the "matches the name of the feature" you mentioned
Macro ce uses effects icon instead of status I think as well
Helps us remember sources
anyone have a zephyr strike build? i'm trying to figure out how to have an optional damage boost to an attack that then ends the spell
reminder of Zephyr Strike?
1 minute concentration, during that time, you do not provoke attacks of opportunity. Once during the duration, you can add 1d8 force damage to a melee attack, adding 30 ft to your movement speed for that round (whether it hits or misses).
Optional bonus effects of MidiQOL for the damage part
so rather complex. i can definitely just remember to keep track of it with the concentration effect over the actor's head if it's violently difficult.
When you attack it drops concentration or not until the duration ends?
nope, reread it, my apologies. stays in effect, just removes the option for the bonus damage/speed up
Give a quick read through the midiqol readme (link in the pins up top)
how would one get to optional bonus effects? (i've piecemealed my way into this module so forgive me for the probably very basic answer)
literally just answered my question. thank you.
I can help later if you need help setting that up.
for sure. lemme see if i can manage it, and then if not, i'll definitely bug ya! appreciate you guys. this stuff isn't too hard, just tedious as hell. happy someone actually understands the underlying systems, it'd take me a week and a half of hyperfocus to get even close.
Could have the bonus always on, and use EM to remove the damage bonus on the first damage roll. ๐
true, but that's assuming it's always the first hit, it's optional sadly
whenever they'd like
can also just check and make sure they're cool with it and do that...
There's probably some CSS that can adjust the line spacing. I noticed the same issue with regular chat messages so I didn't bother adding any CSS to fix it
got the "first attack" bonus cleared with the player. second question: when they attack, it give a movement speed bonus as well, but for 1 turn. is there a way to turn on a secondary effect (with it's own duration) when the first effect ends?
Yeah, swap it with a new array of changes in the effect data, rather than deleting the damage bonus
ok, so i'm gonna look up what that means, and then that should work! thank you @molten solar
wait this isn't macro-polo...
lol. i do be seeing you there a lot. appreciate you
so how does one swap the array? (i figured out what it meant in a basic sense)
With a script. How do you trigger it?
so it's in a spell, and it's just adding an effect to the actor that adds a (loss on melee attack) +1d8 force melee damage bonus.
i'm assuming that i'm either looking at the wrong module. which is likely. or i'm not understanding the more intricate parts lol
its not exactly a spell people automate, its got heavy situational steps
yeah. i generally tend to be difficult
I'd make the spellcast add an advantage reminder message that has a document link to a macro that will activate removal of said previous effect and then activate an expire on hit damage bonus and then another expire at end of turn walking speed bonus if I was being forced to automate it....but you could also just totm it.
can def just go "you've got 30 extra feet of movement till the end of turn" out loud. lol
I think you will find the ranger doesn't use that spell unless its a oneshot
Zephyr strike is 100% doable within MidiQOL /DAE with a bit of macroing
probably gonna do that if i'm honest. otherwise it gets mucky. for sure with the macroing. lol. and you are correct. generally unless it's a new player who will definitely be doing & trying literally everything as much as possible. lol
the curious goblin. the most dangerous kind.
but how do you automate choice lol
thats the part that makes me think advantage reminder lol
I will make a sample item for Zephyr Strike tomorrow. And another for Divine Smite for Moto with a twist. Will make it for v10 and then you need to change it back to v9
cause they have to choose when to use it
Optional bonus effects
that sounds v10ish
Will prompt with every attack and they can click on it when they want
that literally sounds like advantage reminder lol
Same thing like legendary resistance in midi sample items
i'm reading the readme, and it's equally as confusing. i so love coding. but dear lord plain text helps.
I'll stick to UI friendly stuff like adv reminder
It is a big one and quite scary to navigate at first
You do the same with AR. You need to create a flag on the item, no?
Same thing for the optional bonus effects.
yeah... but now i'm determined.
But it prompts on a separate window which can be tedious at times. But for something with has a finite duration ๐คท
so... flags.midi-qol.optional.Name.damage.mwak - add - 1d8. does it turn itself off after or do i need to add something somewhere?
You need to give it a count of once.
And a label for good measure
this is all in a macro yes? or in the effects area of the spell?
But you will need to package it on a DAE on the Zephyr z strike item and that one to have a target of self in the 3rd available box
Zephyr Itemโs title bar, click on DAE and create the effect in there.
yeah, got there, Label: Zephyr Strike, transfer to actor on item equip checked right?
i feel like i'm 8 and learning how to make a minecraft map. lol
Nope
This means that it will transferred on the actor when you drag the item in the character sheet
oooh. so apply to self when item is rolled. so when they use the spell it applies
Either that, or on the target details in the Itemโs details tab choose Self (3rd box)
gotcha. that works. alright, so where do the optionals go? i have now found the lines for count & label as well, but in the readme, so i'm lost as to where they are in the DAE interface
Zephyr strike item, DAE tab in the title bar. Do you see it?
yeah, i'm in the "Configure Acive Effect: Zephyr Strike" popup atm
oh i'm dumb. gotcha. those are attribute keys, and since it's Midi, it needs to be override or custom right?
Yes. Check readme if they need override it should say
gotcha. so set the bonus, the count, and the label (so it's there, usable only once, and named). and it'll expire on it's own due to the "count" key yeah?
And create a secondary effect for the movement part
Niche but you might use it ๐คท
is there a way to have it trigger the secondary movement effect when the first (dmg bonus) de-activates
nah you're good, that makes it so much better. thank you!
How would I word proficiency in wisdom saves in an active effect?
@violet meadow you are going to make a V10 midi-qol automated Divine Smite?
Does @vast bane need a v9 Divine Smite? The one Iโm using works last time I checked. Itโs a feature not a spell, you activate after a hit and it adds a temp effect with damage bonus. Works with undead and crits, even stacks with Hunters Mark etc properly
It has a prompt asking for what slot to use
I pieced it together from parts I found on this server iirc
That was the plan ๐
But you still need to say when you want to use it ๐
(even though for a player of mine I can safely make a case to auto roll it when a nat 20 is rolled ๐
)
For reference, here's the Divine Smite (v9) macro I'm using... just whack it in an itemMacro on your class feature โ activate it after attack but before you roll damage
// if effect, just remove it
const flag = `${actor.id}-${item.name}`;
const effect = actor.effects.find(i => i.getFlag("world", item.name) === flag);
if(effect) return effect.delete();
// find target
const target = game.user.targets.first();
if(!target) return ui.notifications.warn("You must have a token targeted.");
// generate radio buttons
const inputs = Object.entries(actor.getRollData().spells).filter(s => s[1].value > 0).map(i => [nth(Number(i[0].replace("spell",""))), i[1]]);
if(inputs.length < 1) return ui.notifications.warn("You have no spell slots remaining.");
const content = inputs.reduce((acc, e, i) => acc += `
<tr>
<th style="width: 50%">
<label>${e[0]} (${e[1].value}/${e[1].max})</label>
</th>
<td style="width: 50%; text-align: center">
<input type="radio" value="${e[0]}" name="group1" ${i === 0 ? "checked" : ""}>
<td>
</tr>
`, `<table style="width: 100%"><tbody>`) + `</tbody></table>`;
// show dialog
const choice = await new Promise(resolve => {
new Dialog({
title: item.name,
content,
buttons: {
yes: {
icon: `<i class="fas fa-check"></i>`,
label: "Apply",
callback: (html) => {
const value = html[0].querySelector("input[name=group1]:checked").value;
resolve(value.at(0));
}
},
no: {
icon: `<i class="fas fa-times"></i>`,
label: "Cancel",
callback: (html) => { resolve(false) }
}
},
default: "no",
close: (html) => { resolve(false) }
}).render(true, {height: "100%"});
});
if(!choice) return;
// if target is fiend/undead, bonus die
const bonusDie = ["fiend", "undead"].includes(target.actor.getRollData().details.type?.value) ? 1 : 0;
// calculate total dice and damage
const dice = Math.min(5, 1 + Number(choice)) + bonusDie;
const damage = `+${dice}d8[radiant]`;
// create effect
const effectData = [{
changes: [{key: "data.bonuses.mwak.damage", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: damage, priority: 20}],
icon: item.data.img,
label: item.name,
origin: `Actor.${actor.id}.Item.${item.id}`,
tint: "#000000",
[`flags.world.${item.name}`]: flag,
"flags.core.statusId": item.name,
"flags.dae.specialDuration" : "DamageDealt",
"flags.convenientDescription": "Your next attack deals additional damage."
}];
await actor.createEmbeddedDocuments("ActiveEffect", effectData);
// remove spell slot
await actor.update({[`data.spells.spell${choice}.value`]: actor.getRollData().spells[`spell${choice}`].value - 1});
function nth(n){return n + (["st","nd","rd"][((n+90)%100-10)%10-1]||"th")}
does it have to be an item macro?
can it be a folder macro?
definitely
cause then its great to use with advantage reminder 8)
yeah you could do that, but I'm not sure if it'd work if you've already started to roll damage
hmmm
could give it a try... our Paladin never forgets to activate it when he crits for some reason ๐ค
he just has it as a hotbar button next to his halberd
Oh I thought you meant reference it from the folder in the OnUse field
It's not hard to put it in the Divine Smite class feature item, where it should live ๐คทโโ๏ธ
you can't document link class features?
I'll stickwith my ugly method
theres a thought, make it an item macro and link the blank item lol
drag it to hotbar, remove from hotbar (it will still be in the folder)
Looks like one of mine. ๐ค And an older one at that.
It could be!
Before I even knew who I was yoinking from
I can tell by the reduce and the elongated indentation from Notepad++.
You must be proud that it's still chugging along just fine and in my opinion works the best
Oh wow, radio buttons. Glad I don't do that anymore!
Using a spell for Divine Smite? pffft
Yeah heck no
Who would want Divine Smite sitting in their spell list
I just use a spell to expend the slot, cause I don't do macro fu well
I made a new thing for my paladin player though. Item Macro embedded in the smite feature, clones it and rolls damage using all the system's hooks.
Savages, the lotta them. Features are features!
You've built a mini midi just for them, that's so nice
Nah, I'm all about the QOL, not the Midi.
Having to tick off a spell slot and roll dice manually (or make it a spell) is mildly inconvenient, and thus the absolute worst.
There's something amazing about watching our vengeance paladin crit with maxed level smite and hunter's mark going... do many dice flying around. Having it all in one roll is neat
Last session the paladin player found the gem I made that gave everyone a +STR increased crit range
... during a fight against undead.
The undead dude's ability to heal himself for 60+ hp each round did not make much of a difference.
That sounds amazing... we almost got wiped out by three intellect devourers who got the jump on us. Stupid me for eschewing my headband of intellect
my only close player death so far in dotmm is from an intellect devourer
but I've murder hoboed the familliar 30 times
I haven't had a player death yet. I'm in the mood. Would you recommend it?
they're frickin dangerous against a party of dump INT dummies
They are level 9.