#MidiQOL
1 messages · Page 81 of 1
Yeah, Pistol and Musket. It gives me a warpgate duplicate name error though, yellow not red
yea, indicating the mutation wasn't applied
as i use the name as a unique id (for better or worse)
Would it be the “boom gun” name towards the end of the macro that I need to change?
Only thing in both items that is the same when I look
yes -- https://trioderegion.github.io/warpgate/warpgate.html#.mutate (api docs for that function)
Okay looks like I can do something generic like “small boom gun” from what one seeing
use the item name/id as part of the mutation name
Oh that’s a better idea
https://github.com/chrisk123999/chris-premades/blob/master/scripts/macros/spells/hex.js#L129
It's been reported to me that dice so nice just shows the original roll.
Can you delete the second entry for actionType?
Apparently setDamageRoll doesn't change the chat card on the uncombined card
Should only be the abil one
hello.
Does anyone know how to get Midi-SRD installed? I keep getting an error message about a metadata file failing validation...
I will push an update over the weekend for MidiSRD
Almost done
Okay. Thank you for the work that you do ❤️ (I'm also super glad I'm not doing something wrong. XD)
Nah it's not yet compatible with v10. I have a working fork but there will be quite a few changes from that one, so you would be better served if you waited a tiny bit more 😁
You should be able to pass a parameter to not show the DSN for the original roll and trigger them for the modified one
Also is there a reason that you don't return a bonus instead of altering the original roll?
These items are more or less the reason why the damageBonusMacro exists 😅
@quiet solar I think you use MidiQOL correct?
It has a function already for distance checking.
MidiQOL.getDistance in console
I do - Thank You! (it didn't seem midi-specific and I am trying to be well-behaved... :D)
Yeah I just happened to see your question and that was the easiest answer
There are quite a few shared examples in macro polo for distance checking with rays etc if you still need it though
I would suggest typing MidiQOL. in console and going through the auto complete options for the exposed functions
Same with DAE.
For other automations that rely on parsing damage rolls and modifying them
A lot less work to do when I know it's all just in the damage roll
I am trying to pin down a routine on how to deal with multiple onUseMacroName triggers, on the same event on the same actor.
It's not easy to pass the damage List correctly if for instance you have the Retribution feature and a Fire Shield doing damage at the same time 😁
That's why I setup a priority queue for mine. And started looking at the damage roll instead of damage details when I'm looking for a specific type of damage
Updating the roll doesn't update the damage details right away
warpgate queue?
I close my eyes and remember my days playing StarCraft with the amount of things I have been using warpgate for, the last couple of days
shakes head, its a method that will queue arbitrary functions to be run sequentially
at the moment, there is no way to wait for the queue to complete -- so treat it as "the final step" for your operations, which are race condition dependent
"go do this update, safely, at some point in the future -- i wont be back to check your work"
priority as in?
currently, its a FIFO queue
yea, so not as much use for me then
But good to know it's there if I need something like this
how does your use case differ?
My use-case is multiple on use macros all firing at the same time for reasons and I need to make sure some wait for others to complete first
It comes up for me when I have class features that require damage rolls to have a certain damage type
and other class features adding potentially different damage types to the roll
Midi just has all on use macros for the same workflow state run at the same time
¯_(ツ)_/¯
It also prevents me from getting multiple pop-up dialogs overlapping each other when multiple class features with dialogs happen
makes sense, given the environment i guess
I've asked tposney about it before. I'm abusing midi on use macros more than was expected when it was developed
it is a bit tricky to manage sequential macro execution
Yea, I wound up just finding a javascript implementation of a priority queue and making a system around it
Any of my macros that need to go in a specific order just wind up sleeping while waiting for their turn in the queue
and times out after 5 minutes
On the macro itself? I can try when I get back to a computer.
Once I get the duplicate name thing solved I’d like to add in the proficiency thing we attempted earlier and the chat message cause that’s just cool lol
Yes. There are 2 similar entries.
Let me know if you want any more help with that.
I think I will at some point create a reload/misfire function and integrate it into my Loadout macro 🤔
I have a pretty crappy one that I was using
All this discussion about it makes me want to remake it
Will do. I’m out in the field today so probably won’t get to it for a few hours and will have questions for sure cause I wanna add things to the macro that I know for sure works
I did have a follow up though. So the musket and pistol are both one shot and then you have to load, so I want to use the consumable drop down and force the action to load the weapon again. That make sense?
Anyone able to help with an ItemMacro script for a homebrew ability? I am stuck with making a workflow for rounds compared to RL time.
What is it you are trying to do?
Its for a custom resource, but this is the description:
Spend 1 to 6 Holy Power - A divine blade descends down on your target, after an amount of rounds equal to the amount Holy Power spent, the blade strikes your foe.
1 Holy Power: 1 round, 3d4+2
2 Holy Power: 2 rounds, 3d6+4
3 Holy Power: 3 rounds, 3d8+6
4 Holy Power: 4 rounds, 3d10+8
5 Holy Power: 5 rounds, 3d12+10
6 Holy Power: 6 rounds, 3d20+12
// Prompt the user to select the amount of Holy Power to use
const options = Array.fromRange(actor.system.resources.tertiary.value, 1).reduce((acc, n) => {
return acc + `<option value="${n}">${n} Holy Power</option>`;
}, "");
const content = `
<form class="dnd5e">
<div class="form-group">
<label>Amount of Holy Power to use:</label>
<div class="form-fields">
<select>${options}</select>
</div>
</div>
</form>`;
const holyPowerSpent = await Dialog.prompt({
title: "Consume Holy Power",
rejectClose: false,
content,
label: "Consume!",
callback: (html) => html[0].querySelector("select").value
});
if (!holyPowerSpent) return;
const target = game.user.targets.values().next().value;
if (!target) {
ui.notifications.warn("You must have a target selected to use Execution Sentence.");
return;
}
const dice = [
{count: 3, sides: 4, modifier: 2},
{count: 3, sides: 6, modifier: 4},
{count: 3, sides: 8, modifier: 6},
{count: 3, sides: 10, modifier: 8},
{count: 3, sides: 12, modifier: 10},
{count: 3, sides: 20, modifier: 12},
];
const {count, sides, modifier} = dice[holyPowerSpent - 1];
// Update Holy Power resource
await actor.update({[`data.resources.tertiary.value`]: actor.data.data.resources.tertiary.value - holyPowerSpent});
// Execute the delayed damage
setTimeout(async () => {
const damageRoll = await new Roll(`${count}d${sides} + ${modifier}`).roll();
new MidiQOL.DamageOnlyWorkflow(actor, token, damageRoll.total, "radiant", target ? [target] : [], damageRoll, {flavor: `Execution Sentence Damage Roll (${holyPowerSpent} Holy Power)`})
}, holyPowerSpent * 6000);```
And the macro itself what I have so far. It works, just works off real time rather than round combat. So if its used, even during combat it just happens after X amount of real life seconds have elapsed.
actor.data.data.resources.tertiary.value -- this v10? data.data -> system
Do you have Effect Macro?
yes
So it should read actor.system.resources.tertiary.value
and be careful about using actor -- for unlinked tokens, it refers to its sidebar actor
@dark canopy You had a convenient method for turning a function into a string object or was that Zhell? 🤔
await actor.update({[`data.resources.tertiary.value`]: actor.system.resources.tertiary.value - holyPowerSpent});
Anything I should change here?
Well I am going to programmatically add a EM to an effect, so figured I would at least make the code look pretty 😂
replace with system (doh, thanks bugbear)
`(${functionName.toString()})()`
Doesn't that also include the function name?
Oh I see 🤔
It's weird but it works
Yeah I see it now, it makes it into a function wrapped in () with a () after it 😂
Zhell showed me it
IIFE -- immediately invoked function expression
I use it when I need to embed an effect macro in an item macro
system instead of data
resources is a system specific field 
How are you currently executing this? ItemMacro?
Yes
No worries, also if you needed access to my campaign let me know I wouldn't mind doing that either. Or just... ya know hiring you for a while? 😬
Don't worry, its a fun little project 😛
Well if you ever had time I had 5 other fun little projects 😄
so i have asked this i think a number of different ways but never specifically. using active effects and active auras am i able to make an aura effect that forces anyone that starts their turn in the aura to make a con save, then if failed apply a condition? i keep trying different things and not getting that effect.
How can I add an existing attribute on the effect value?
Like system.attributes.movement.walk/2
Alright, had to make sure it worked as intended, can you try this macro @tepid dock
// Prompt the user to select the amount of Holy Power to use
const options = Array.fromRange(actor.system.resources.tertiary.value, 1).reduce((acc, n) => {
return acc + `<option value="${n}">${n} Holy Power</option>`;
}, "");
const content = `
<form class="dnd5e">
<div class="form-group">
<label>Amount of Holy Power to use:</label>
<div class="form-fields">
<select>${options}</select>
</div>
</div>
</form>`;
const holyPowerSpent = await Dialog.prompt({
title: "Consume Holy Power",
rejectClose: false,
content,
label: "Consume!",
callback: (html) => html[0].querySelector("select").value
});
if (!holyPowerSpent) return;
const target = game.user.targets.values().next().value;
if (!target) {
ui.notifications.warn("You must have a target selected to use Execution Sentence.");
return;
}
const dice = [
{count: 3, sides: 4, modifier: 2},
{count: 3, sides: 6, modifier: 4},
{count: 3, sides: 8, modifier: 6},
{count: 3, sides: 10, modifier: 8},
{count: 3, sides: 12, modifier: 10},
{count: 3, sides: 20, modifier: 12},
];
const {count, sides, modifier} = dice[holyPowerSpent - 1];
// Update Holy Power resource
await actor.update({[`system.resources.tertiary.value`]: actor.system.resources.tertiary.value - holyPowerSpent});
async function damageTrigger(count, sides, modifier, uuid, holyPowerSpent) {
// Execute the delayed damage
let actorD = await fromUuid(uuid);
const damageRoll = await new Roll(`${count}d${sides} + ${modifier}`).roll();
new MidiQOL.DamageOnlyWorkflow(actorD, actorD.getActiveTokens()[0], damageRoll.total, "radiant", token ? [token] : [], damageRoll, {flavor: `Execution Sentence Damage Roll (${holyPowerSpent} Holy Power)`})
}
const effectData = {
"changes": [],
"disabled": false,
"origin": null,
"tint": null,
"transfer": true,
"duration": {
"rounds": holyPowerSpent,
},
"icon": "icons/magic/holy/projectiles-blades-salvo-yellow.webp",
"label": "Execution Incomming",
"flags": {
"core": {
"statusId": "true"
},
"effectmacro": {
"onDelete": {
"script": `(${damageTrigger.toString()})(${count}, ${sides}, ${modifier}, "${actor.uuid}", ${holyPowerSpent})`
}
}
}
}
MidiQOL.socket().executeAsGM("createEffects",{'actorUuid':target.actor.uuid, effects:[effectData]});
Dude super quick! Thanks yea I can test it in a few here.
could anyone tell me why this is not triggering at the start of the turn? it is set as an aura at 10 ft. i can make it actually do the correct effect if i click on the feature manually. but i would like it to do it itself.
it seems like the aura portion is not working but i cannot tell
Well if they save and it is removed (cause saveRemove defaults to true) there is nothing to do at the start of the turn
there is no save it is set to go away at the start of their next turn
they dont roll a save though? does it not show them rolling a save for that?
let me add it to see if it changes
Well what the general flow of all this
Each creature that starts its turn within 10 feet of the corpse flower or one of its zombies must make a DC 14 Constitution saving throw, unless the creature is a Construct or an Undead. On a failed save, the creature is poisoned until the start of its next turn. On a successful save, the creature is immune to the Stench of Death of all corpse flowers for 24 hours.
No
Like how is the aura made, are you sure it's applying, what the turn order is, etc
i have no clue honestly im trying to get info and as i was not i tried to use this https://gitlab.com/tposney/midi-qol/-/blob/master/README.md#flagsmidi-qolovertime-overtime-effects to figure it out. this is what i was able to come up with so far.
for the aura i have this
been reading through documentation and walkthroughs for days now and none of it seems consistent or to make much sense to me sadly.
Hard to tell in the picture but the Check creature type did you type that out?
Also are you in combat?
And check the Apply AE button
it is in combat, i left check creature type alone, the text is default greyed text not an entry, and do you mean the apply active effect icon to affected tokens button? as otherwise im not seeing the apply ae button
also thank you for the help
Yeah that one. Just shorthanded my typing there
toggled that one and no change there. added another character to the combat to see if it changed, it seems like the aura settings arent doing anything
when i trigger it manually it only hits if im targeting a actor
no change there either
an altered corpse flower. but i added it myself so homebrew i suppose
i believe so
Give me a few to get back to my pc and test
ok thanks again for the help'
Dude! Works like a charm!!!!! Thanks! I got more stuff to throw at you sometime. But seriously thanks
Np
I do wanna add one thing. I personally wouldn't use this as an aura cause of this part of the description
On a successful save, the creature is immune to the stench of all corpse flowers for 24 hours.
Cause if they do save, and the aura is setup right, the AE is gonna get applied to them again and they'd have to save, over and over again
So with that info, do you want me to still try and configure the aura or do you wanna handle this like a targeted attack/save
i would like to still get it working as i have another that does similar but does not have that immunity
Alright, give me a few
thanks again
It's been a minute since I used auras but I got it working but not right
I could only get it to work if I applied to self here
But that's not good cause then the plant itself also gets hit with it
yea i got that to where it applied to itself
Ahhhhh
Got it
Don't make it on the feat
Make it as a passive effect on the creature
trying it now
Just remember, if they succeed on the save, leave the aura, and come back, it will reapply
so for him i can leave it as is on the feat. but for the summoned zombie i can make it on him and it will work properly
that helps a ton for figuring out what i was doing wrong with this
Custom attempts to evaluate to true/false and to allow expressions attempts to Roll.safeEval the formula, not sure why -3 returns an error, but in any event if you want a numeric value there put in override/upgrade/add instead of custom
I wonder if this could be automated?
While you are on the ground, the ground within 15 feet of you is difficult terrain for your enemies.
It's a midi bug - will be fixed in 10.0.34
Easy if you don't care about checking for being on the ground
fixed in 10.0.34
I don't much care about the ground thing. 🙂 How would you automat ethis?
active aura to reduce the walk speed of those around you
it'll look weird
personally, I just wouldn't bother with it
In that case it just won't add :р
As already discussed above, positive numbers with the key flags.midi-qol.DR.healing and flags.midi-qol.DR.healtemp (I don't remember exactly the key for temporary hits) in combination with add do nothing. No errors, no results. Moreover, negative numbers give an effect, but the opposite
just put like a visual aura with automated animations and call it a day
That sounds like it could cause a lot wierdness with walking in and out and such.
oh for sure
I've been catching up and noticed this question and figured I'd answer with what I've done. I figured that the triggering event was so broad (any successful d20 roll within 60 feet, basically) that it would be annoying for the player to get a reaction prompt every single time it happened, so I made it "reaction manual" and will make sure the player knows they'll have to mention when they're using it. Then I figured that it would be easy enough to manually reroll whichever roll they wanted to interrupt, and I made an effect that gave the target advantage on all saves and attack roles - I'll tell my player to target the person they want to receive the benefit when they cast the spell.
There was a reason that DR.healing was treated specially - I'll have a look and see if I can recall. The whole negative DR was never intended and just happened to work for most things.
Silvery barbs is a tough one to do since you'll wind up having to prompt on every single attack and that'll slow down combat
I just have my players roll a d20 after they do a manual reaction for it
and hit the undo button if it changes the outcome
Yeah, that's what I'm going to do.
Is there a way to differentiate between voluntary movement and forced movement 😅 ? One of my players has repelling blast and another one has booming blade... 😅
This is an overall good tip actually. Gonna use that for more spells.
The bug where midi applying dfred is not applying nested effects is odd. I really should make a git for it.
I wonder if it is midi or dfred.
You could differentiate between on turn movement and out of turn.
Or if you set up some infrastructure for that, like making all the macros that force a token to move, to setFlag that the momevent was forced.
Then if you have an AE on that actor, with a special duration is moved.... Well that's a maybe
Please make a git for it - midi applies CE effects via a special interface from dfreds and with the recent change there could be a mixup between the two of us over nested effects.
Ofcourse, do I create one in both?
Create it in midi since dfreds does not have visibility of the midi shenanigans
changing the name from boom gun to pistol seems to have fixed that issue with the duplicate name thing, so both gun options are functioning correctly, now to add the proficiency and the text
maybe im just not seeing it, but is there not an option to see the dice rolls for saving throws? looked through the settings like 5 times now and im just not seeing it, just the result in chat, but id like the dice to be rolled on screen if possible
dice are shown for saving throws by default
How is the save triggered?
prolly has the two settings for DM's set wrong in DSN
If you want the dm's stuff to roll 3d dice you want these settings in DSN set this way:
i love how your initial response is that i always have something set wrong lol, havent even touched DSN settings lol
settings when i open DSN
If something is not working then something is wrong /shrug
is the save on the item or in a macro
its the misfire macro we've been working on, everything so far works, but the dice isnt rolling on the screen, its done behind the scenes
so ill see the result on the chat, but i want them to see their rolls for it
yeah one second, was about to message you about the proficiency thing we were trying to add cause that part isnt working correctly
code
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if (!actor || !item || !tokenUuid ) return;
let misfireScore = 1;
if ( !item.system.proficient ) misfireScore += 1;
const tokenDoc = fromUuidSync(tokenUuid)
if (!!d20AttackRoll && d20AttackRoll <= misfireScore) {
Hooks.once("midi-qol.RollComplete", async () => {
const updates = {
embedded:{
Item: {
[item.name]: {
name: item.name + " (destroyed)",
flags: {"midi-qol":{onUseMacroName:"[postActiveEffects]ItemMacro"}},
system: {
ability:"int",
actionType:"abil",
target: {type:"self"},
actionType: "other",
damage: {parts:[],versatile:""},
formula:"",
save: {ability:"dex",dc:8 + Number(misfireScore),scaling:"flat"}
}
}
}
}
}
await warpgate.mutate(tokenDoc ,updates,{},{name:"pistol"});
})
}
if(!d20AttackRoll && this.saves.size > 0) await warpgate.revert(tokenDoc,"pistol")```
actionType:"abil",
target: {type:"self"},
actionType: "other",
Delete the ```js
actionType: "other",
and you should be fine
fine for the dice rolling on screen? (didnt) or the proficiency thing
the function works, we just dont see dice when we do the roll to try and fix, just the end results in chat
im using whatever settings you had me import yesterday during our tests
i did just see the saving throw roll box pop up like 40 seconds after i did the actual roll, seeing if theres something there
You will need to change the setting in MidiQOL settings, Workflow Settings, Workflow
The bottom 2 are Auto for you, correct?
yeah
Auto will not show the DSN
gotcha
Make it either Chat Message or something else using the other modules (if you have them). MOnks tokenbar and Let Me Roll That For You
If it's chat message, a message will appear saying, you need to make this roll and wait for you to roll it
Until the timeout (Delay before rolling for players setting) passes at least and then auto rolls
okay now its not rolling anything at all for saves when before id at least see the result, when we click the item again to do the roll, how we set it up, just the gm message appears now, before i at least saw the results lol
the system now just waits for the auto roll to go off, lol
Just open the character sheet and roll manually
it will pick it up
Or use Monks Tokenbar module, which will pop a nice message to click to roll
worked well, thanks a bundle
Hello, I'm having an issue with Concentrator, it's not removing the concentration on a failed save
Also, I can't remove the concentration status from the token, I need to remove it on the effects tab on the sheet
OK, it seems I need to select save automation, and then Monks Token Bar to allow the player to roll
Hello, fin Adventurers !
I'm sorry to beg in this manner but I'm desperate at this point...
I'm trying to setup spells automations and I can't figure out how to do it :
- Web : features of entering the web with the save asked and the effect restrained apply
- Sleep : I don't know where to begin with...
- Maelstrom : I want to know if it's possible to move automatically a token or if I have to move them manually (not a problem at this point) and if this overtime effect is good : turn=start, saveAbility=str, saveDC=@attributes.spelldc, rollType=save, saveDamage=fulldamage, damageRoll=6d6, damageType=bludgeoning
For the next ones :
- Wall of fire (Circle and Line)
- Control winds (Gust and Downdraft only, updraft I will only apply a zone and it will not be automated)
- Wrath of nature (Grasses and Undergrowth : enemies move macro ?/Trees/Roots and Vines/Rocks)
I want to create multiple items (those between parentheses) with the automation and all but with this maccro :
const actorD = game.actors.get(token.actor.id);
const berry = game.items.getName("Goodberry").toObject();
berry.data.quantity = 10;
await actorD.createEmbeddedDocuments("Item", [berry]);
How do I do it and are these possible or do I search to much ?
Thank you for your time and if you want, you can DM me if it's more practical.
Have a nice evening/day and may the gods be with you !
There are a ton of already made sleep automations around. The DDB importer has a good one, as well as Crimic. Web can be done with AA templates, may already be one around somewhere?
I'm spying Web in midi srd that's rumored to get an update soon, so I'd peek at that when the update hits.
For difficult terrain stuff, I think you'd need to macro that yourself using other modules too, unless I missed some development? Terrain Ruler + Enhanced Terrain Layer + Drag Ruler...?
Midi QOL has just started automatically rolling every attack with advantage. It started after I wildshaped a player, but hasn't stopped. Any ideas please?
Just the one player that was Wild Shaped or all players? Do you use any importers or anything that touch features?
Okay, my idea was a stuck "pack tactics" or something similar automated feature, but if it's everyone, then that sounds unlikely. Does this happen only with Midi and dependencies on?
yes
as soon as i turn midi off it goes away
i get a funny warning in the console
sec
I just realized I have a similar issue. What version of midi do you have?
sidenote for comedy, looked up that line in the script and it has this lovely comment above it
10.0.34
Ditto. In a new world, I also roll with advantage everywhere, but mine says due to "hidden", so not quite the same as yours... Are you attacking different targets in your tests?
yeah lots of different targets, player vs npc and visa versa
Its just stopped doing it!
._.
I haven't made any changes since talking to you, earlier I shut down foundry, came back and it was still doing it
WELP, praise be, if it works, it works
actually it is still doing it. Its very odd.
praising never works, I think your best bet is creating an issue https://gitlab.com/tposney/midi-qol/-/issues/new and including your settings
It wasn't for some tokens vs other tokens then it started again
the new version did touch on some grants flags which your console is talking about
you can try downloading the older version if you need something in the meanwhile, but no guarantee that wont bork things
yeah
I think I've sussed it out. I had an active effect on one of the enemies, and it seemed midi transferred that to anything that hit it. I've completely cleared the canvas and added everything back and its stopped.
If it was after a wild shape the actor probably didn't have vision setup right
Thanks I'll check that out
Can you elaborate how that'd cause it? Just curious
The advantage due to being hidden, indicates some times that vision is not setup correctly on the tokens involved
If you have that option in MidiQol settings (under Rules tab) enabled, you NEED to make sure that all tokens have vision set up.
Asked a couple of days back about triggering an effect on a failed attack. Managed to get something working so thought to share despite the niche usecase: https://github.com/ScottWilson0903/foundryMacros/tree/main/Spells/tauntingBlade
Just love it when I see a feature request of mine utilized, I feel heard hehe
Added rollMode to overtime effects settings. You can specify gmroll, blindroll, publicroll, selfroll and the rollmode will be applied to the overtime item roll
Now things like regeneration will not be spoiled by a public roll
if (game.dice3d) game.dice3d.showForRoll(damageRoll);
``` to ```js
game.dice3d?.showForRoll(damageRoll,game.user,true);
``` to force show to other users as well
Do you ever do attacks against multiple targets (with that ability)?
Nope. Similar to booming blade so should always be single target
So im new to coding things in MidiQOL and i have a question im hoping someone can point me in the right direction. I would like to create the defender role in 5e as an aura? The goal is to create an aura that targets any ally within 5ft of the token. Any enemy targeting the ally will have disadvantage imposed on any attacks against that target Any ideas how to start?
I based this on a MrPrimate macro. Would the current version not roll for other users at all?
Autodamage in Midi is throwing this error, anyone know what it might be related to?
are you on the midi 34?
all that has changed I think with the newest midi, theres now two new hooks to stop attacks. But generally third party reactions are janky at best. You use an active aura, that gives the allies an item via the key macro.createItem that is a reaction that uses 0 reactions and the players ask each other if they are using the reaction or not. I personally think this is a good idea cause it helps the players remember they have them.
you will need to wait for the guru's to dive into the new hooks to see how to kill a workfow or change one to disadvantage with the changes in 34 though
It won't no
For the effect itself you want flags.midi-qol.grants.disadvantage.attack.all, to apply it as an aura, I think Active Auras is still the best go to? throwing question up in air to also hear answer myself
Also if you do something like js const roll = await new Roll('1d6[acid]').evaluate({async:true}) await game.dice3d?.showForRoll(roll, game.user, true); //creates a promise and you await it to resolve await ChatMessage.create({ content: "You did it again! Message created" }); it will the message will be created only after the DSN has finished rolling, compared to ```js
const roll = await new Roll('1d6[acid]').evaluate({async:true})
game.dice3d?.showForRoll(roll, game.user, true); //creates a promise but you don't await it to resolve
await ChatMessage.create({ content: "You did it again! Message created" });
Hello again, fine Adventurers !
I found how to do Maelstrom and Sleep but the other spells continue to escape my grasp :
- Web : all the spell
- Wall of fire (Circle and Line)
- Control winds (Gust and Downdraft only, updraft I will only apply a zone and it will not be automated)
- Wrath of nature (Grasses and Undergrowth : enemies move macro ?/Trees/Roots and Vines/Rocks)
I want to create multiple items (those between parentheses) with the automation and all but with this maccro :
const actorD = game.actors.get(token.actor.id);
const berry = game.items.getName("Goodberry").toObject();
berry.data.quantity = 10;
await actorD.createEmbeddedDocuments("Item", [berry]);
Is the macro good or do I need to change some things? (like the berry at the third and fourth lines? what does it mean ?)
Thanks again for your advises @scarlet gale and @short aurora
You could with Active Auras, yes.
I tend to do these within world scripts though, to not have to really on Active Auras.
the problem with that is that the defender uses its reaction to apply it to a singular attack, its better to make the item with macro.createitem
Ah is it not an always on thingy?
they said defender, I assume thats either steel defender or defender sidekicks
which have use reaction to impose disadvantage on an attack targetting an ally within 5ft of defender
could also do that active aura but have it shutoff whenever their reaction used effect is on them
but then you are manually handling reactions still, imo the item creation is best cleanest janky way to do a third party reaction
If the aura is just a range indicator, I would not make an aura beyond maybe visually
can have the reaction gifted by the defender also apply the reaction used to the defender on use, and link the aura to their reaction
I was thinking aura since its can be applied to whjoever is 5ft from the character with this feat
I found that even just putting blank items in to prompt the reaction was just as good cause then everyone remembers the reactions exist
I'll make some updates. Thanks!
Defender sidekick
The Aura should then create a Reaction Item on valid targets (allies within 5ft)
When I first handled protective bond, a similar reaction setup, the players NEVER remembered it existed. The second I added the created item to them that prompted for reactions, they suddenly were using it all the time
It's that whole "react on another token's thing that should be reacted to", is there a proper way to automate this now?
the newest midi seems to have made editing the workflow easier not sure if that changes things
right now that reaction doesn't work pre 34 does it?
ok let me try to make something
you can't impose disadvantage after the workflows started
let him cook™
didn't he add a reaction in 33 or 34 for targetting?
right now we only have Reaction, and Reaction Damaged
which happen after the attack and after the damage?
.33 yes. Pre Atac
Yeah it works fine 😄
- Create a Reaction Pre Attack Roll feature or whatever in the sidebar and Target
empty | empty | Self
- A DAE with
special duration: 1 Reactionand an AEflags.midi-qol.grants.disadvantage.attack.all | Custom | 1 - an
ItemMacro | After Active Effectswith a macro: ```js
const actorUuid = "" //put here the Steel Defender's token.document.uuid
const effect = duplicate(game.dfreds.effects._reaction)
await MidiQOL.socket().executeAsGM("createEffects", {actorUuid, effects:[effect]});
2. Feature with Aura affecting allies 5ft around not affecting self.
- The aura feature with apply a DAE `macro.createItem | Custom | ItemId from the sidebar`
so that used to be macro only, but now we can do impose disadvantage as a reaction so that makes life easier
is there a way to have the aura actor drop their aura while they have the reaction used AE on them?
What if we used a uniform naming mechanism for third party reaction auras, where our reaction used ae could seek out any "third party reactions" aura's and disable them until next combat turn?
I used this to adapt @chrome pike 's Booming Blade to an OnUse ItemMacro (also had to modify the spell details because it was 'behaving badly') - the only changes I made to the original are shown in the screencap.
and I am sure that if I understood how https://github.com/MrPrimate/ddb-importer/blob/main/src/effects/spells/boomingBlade.js worked, I could have avoided all of this, but the nice thing is that I have a portable spell now that I can just drop in a compendium.
Integrate your dndbeyond.com content into Foundry virtual tabletop - ddb-importer/boomingBlade.js at main · MrPrimate/ddb-importer
Yep!
If you develop a system in your game for sure you can.
I would suggest tagging all the relevant spells with Tagger module and then disable them with an EM in the reaction used DFreds CE
yeah I have tagger installed for other stuff
Sheer force of will
This just makes me wish that the 5e system had some sort of traits-like built in
what exactly are you trying to represent? adding properties to items isn't difficult at all
At that point, it seems like you need to track every tokens action/b action/reaction, which I suppose some modules do
Its not, but it would make a bunch of stuff more streamlined and would make having multiple different automation/import "platforms" work better together
yep, im with you, just curious as what you are envisioning -- i mean, with bugbear taking over Midi SRD, there is no shortage of opportunity
(and ive hacked the dnd5e system to pieces, so a personal curiosity as well)
The main thing would be about it being part of the system instead of being a separate system, the whole "17 standards" syndrome and just people not being as willing to add new dependencies
So I haven't given too many thoughts to the actual contents of it tbh
i mean, midi itself could add things like this -- im sure a MR would accelerate greatly
yes, others would need to use those features, but "legacy" scripts are a bit ubiquitous round these parts
Is there a problem with latest version of Midi?
like all things, when something is less than a day old, and you use it, you are leading the way for the rest of us
I'm pulling a double header this weekend for my games so I did not elect to touch the new dae/midi, I'll be on them on monday
Is there a feature to send a chat message on a failed saving throw?
Not sure what you are asking for, my guess is you are using auto or chat message option instead of Monks Tokenbar or LMRTFY?
I have an attack that when they fail the save, they are on fire and continue to take damage every round (I'm not going to bother automating that part). I just want an automatic message saying "YOU ARE ON FIRE!" if they fail the save.
Flavor field on the attack
You could also just put a generic active effect on them
or better yet automate it, thats actually a really easy automation
simple overtime effect
- I don't know how to do an overtime effect.
- By putting it in the flavor field, it comes up on the chat card before the roll.
Standby I gotchu
I'm not even sure if this is a MIDIqol thing or if I should hop over to #macro-polo. But I figured I'd start here
Heres an on fire overtime. If you have the newest midi .34, you can squeeze a new line into that overtime that is rollMode=gmroll, make sure you do not add it to the end, my syntax implies its either at the start of it or in the middle somewhere cause the comma is on the end.
you can change the damage in the overtime to whatever you want
I assumed action save cause thats what most onfires are
make sure the attack has an attack roll and save setup on the attack, and chck the box for activation true that I show in one of my images above.
You add the ae to the actual attack
This assumes you are using midi for effect transfer
I'm not running the newest version but it still works. Thank you!
Has anyone managed to automate Produce Flame?
Okay, here's something else. I'm using this in conjunction with TMFX. When they are on fire, rather than having a symbol on them, i have a TMFX on them. But when I delete the effect, the TMFX is still there. How can I automate that?
I've never known a player to actually use Produce Flame as a light source, so this piques my curiosity.
on the same active effect I just made for you, add the following key: macro.tokenMagic and find your fx
ok, let me rephrase....i've taken a TMFX and changed it slightly, so it is no longer in the TMFX compendium.....I'm using macro.execute, but stopping the effect doesn't stop the edited TMFX
you would need to copy the delete filter macro from the tmfx compendium, I personally make my own tmfx with Mass Edit Module
either use effect macro with the two macros for on deletion/oncreation OR install mass edit module and edit your own tmfx, and save it as a preset, then it shows up with the DAE key macro.tokenMagic
New ones will show up at the bottom of the drop down in DAE:
the editor of TMFX filters is a macro you drag to the hotbar from a compendium that comes with Mass Edit
you can also make custom ones in tmfx alone but it involves macros and I hate macros
Alright. Thank you for your help. I really appreciate it
Crymic has a produce flame macro on his patreon
would be good use case for warpgate! a dialog to select "attack" or "hold" and roll normally if attack (and undo any mutation), or light up token via mutation 🙂
It's SRD too. I will include it in MidiSRD update ✍️
I wish i knew javascript so I could be the one helping instead of the one needing the help
stay around and ask questions and try to work out simple requests yourself, even if you dont post 🙂 so that when the answer/help does come in, you can compare notes and find out if/where you went wrong 🧠
i like playing the game of "why did the 'fixed' script work when the original didnt?"
I like watching the game of "it works on my end, why doesn't it work on yours?"
triage is its own very important, yet generally underdeveloped skill
turns out it was a lack of a comma or they used a ` instead of a '
and then you follow that train of thought -- how did javascript interpret it the first time? and what were the effects of it?
trying to figure out what a compiler does in the face of an unintended command is big brain stuff
dear god, i don't even want to jump into that rabbit hole
@scarlet gale Does Chris Premades have a hard requirement of midi 34 yet?
haha, that usually comes later when trying to figure out "how did this ever work?", but im going off-topic -- in summation: keep at it, tons of now-module-devs started exactly where you are 🙂
Nah
not willing to update dae/midi for the game session in an hour but am willing to update your module and fiddle with the new bits
I recently added the version numbers I develop around on my readme
I'd love a single module that does everything that my current 116 modules do
the min/verified/max fields of dependencies are also helpful here
honestly I kinda don't like how some authors split their stuff up
trying to keep my mod count below 65 and Simbuls/monks little details are really makin that hard
Mod count is like a peer imposed taboo 😄
nah I felt it man
I have 140 and feel fine
I had almost 80 and my server is kinda poor hardware and we suffered a session then I chopped off a ton and now my server is like a speedboat
though I honestly think alot of my performance hit was Levels
ping times and server power will affect some of that, but its mostly client side mods
as mods are transferred on load
that and simbuls cover till he fixes the log
I'm only at 136, but I have ~5 more I am going to add when I finally update
With the dev tools off, why does the log bother you?
I bet I could see huge improvements if I dropped DSN and the animation modules
animation yes
I have a user who has a 2003 pc with an nvidia gt 220 gpu he suffers horrendously
DSN auto sets settings based on Foundry performance setting now
in general: mod count is just a canary
if something goes wrong, with a ton of modules, its likely modules
I'm actually not updating to that cause its a client side setting and my players would get angry if they had to redo their settings
but... performance 😅
Just force the setting with monks or something
that too
the problem with that is that suddenly the dice are linked to normal foundry settings
I personally have a strong dislike for client settings
thats another module though hehe its all a giant pyramid scheme lol
Module count is meaningless. If anything you should count the number of hooks they use
is there a way to override dsn settings vs the core setting for performance?
I had a really really awesome server performance last week so I'm utterly petrified to hit any update buttons
The server really doesn't do much other than distribute files and handle connections
(save for constant compendium access, that will kill servers)
I've slowly started to move away from compendiums
Chris the readme is a 404 error in the manage modules for your module
That's odd
its not a link to your git, its a link to my drive but it doesn't include the full folder path
I have been needing to access the compendium(s) for the MidiSRD stuff constantly and boy oh boy
I think you need to make your readme entry that url instead of what it is currently, it sends me to a dead link that is local
you may want to consider some sort of local caching mechanism -- compendium docs will be deleted locally every now and then causing a full round trip on the next lookup. Keeping the docs referenced in memory -- or saved as their object data -- and managing their lifetime may be the more performant route
Like for on the fly loading or just adding things when you're developing?
I am testing macros being called from compendium Items
I looked at the example midi item that did that and decided against it
I was considering keeping some needed "items" as a game.foo.bar entry
The macro was in an item macro (on an item) in a compendium
overall, the ideal solution would be to parameterize "families" of spell functions
then flag your items with the parameters for their specific needs
allowing modification, but also faster data lookups as you can request the compendium index to include your flag data, then cache that locally for future uses in that session
so, spike growth, would be something like aoe({...neededBaseData, lifetime: '1 minute', onStartWithin: {...parameters for the "moving through" or "starting in"})
something along those lines -- abstracting the "work" from the "data"
as currently, midi macros are too intertwined (in general)
hmm, that there is some food for thought
very long term thing that should be architected and prototyped, but "data driven" code has served me extremely well in foundry
I know I want to eventually just ask for a way to directly call a function as a macro instead of having to go through a item macro or world macro
and here I was just considering how to best make 3-4 items, which might need some calls to a compendium entry 😅
(i feel like that concept doesnt make sense entirely...but i sorta get what you mean)
Confirming with some more testing but I'm pretty certain that Circle of Mortality and Beacon of Hope are healing over the max of the hp of targets @scarlet gale
mismatch on the numbers but you said thats a known issue so disregard that
Trivial against 1 target with the new MidiQOL update
not so trivial for more than one targets, such as for spells like Mass Cure Wounds.
I have one solution to be included in the MidiSRD too'
I'm not on that version or I would have already switched it out atleast for beacon of hope, circle of mortality would probably require the unconscious and dead conditions to have a version of the grant key that evaluates if the caster has the feature circle of mortality
I didn't realize it would let me. I'll fix in next release by clamping to max hp.
I'm editing the damage details to make sure it works for multi-target spells
Without doing max healing for everyone like the grants flag would
Just didn't take into account an upper limit
To be fair Circle of Mortality typically can't hit the max lol I was testing on a giant rat, then again it is a low level feature
I just untarget the ones with 0 and applyTokenDamage to them.
yeah its a level 1 feature so it would be possible to hit a player past their max
Depending on the settings they might not be targeted already for aoe
But are there AOEs for healing 🤔
It's easily fixed
They are targeted individually though
true
healing spirit also doesn't happen at the same time
Probably a better way to do it then looking at the roll terms
But this will catch something that has healing and damage at the same time
👍
I just wanted to make it clear who got maxed but not sure it’s needed
Oh well
It'll show up in the damage card for gms
My magical inspiration macro does something similar
Since it applies to only one target in an aoe spell
So many things to do, so little time ahhhhhh
btw, .34 has an issue with the vitality thingy.
I just saw that they posted an issue in gitlab
Quick inspiration tangent question, Chris- have you looked at making an automation for the “mote of potential” inspiration feature for the creation bard subclass?
It's one of been meaning to do
Looking it over, looks simple enough
It will have to be combined with the other bardic inspiration feature
I’ll keep an eye out for it - thanks! It’s been one of those things that my bard player is pretty good at tracking but everyone else forgets they have it/all its uses when he gives it to them so it’ll be a super helpful one.
for some reason Midi isnt applying damage anymore
anybody knows why ?
https://streamable.com/gj6fh3
Hey guys, is there a way to add a effect on a token when a specific actor deals a killing blow to it?
If I understand it correctly: A hits B, which kills B. B then applies an effect to A, due to a feature of B.
In that case: Macro
something like: A kills B which triggers an effect on B(visual effect) but if C kills B nothing triggers
ok thank you 🙂
I've just installed Item Piles. I've grabbed the macro's from the readme, which work as far as functionality however visually nothing is changing. In the console there is an error related to midi qol which I think is where that is putting the 'dead' overlay on and its conflicting. Any ideas how I fix that error and make the macro change the token into an item pile visually? Thank you.
Screenshot the error?
warning, not an error. But something is going wrong
Sorry I meant a warning
Kinda surprised that is showing up as an warning, pretty sure its actually an error 🤔
Generally a warning shouldn't break anything. But I think that's a function that's trying to patch something. So maybe it's in a try catch?
I would check where patching.js is from, that would be the module that is the culprit most likely
That's midi-qol using libwrapper
libWrapper.register("midi-qol", `game.${game.system.id}.canvas.AbilityTemplate.prototype.refresh`, midiATRefresh, "WRAPPER");```
It happens every time I use the macro from the item piles readme
Did you want the macro I'm using?
Not sure it would mean much
@vast bane Your reported issue with going over max healing should be fixed now. Let me know if it's working weirdly. I don't have players that use that spell.
Late targetting seems to be working a bit weird. It works for a single use per item/spell but then won't work again until I refresh the browser
have you tried with modules disabled
midi works fine for all of us so best to rule out modules and then versions of everything before we dive into midi settings
The simplest way to target things is to hover over the target and press the T key, I will never understand why modules exist to make this any easier than it already was in core, you likely have a bad targetting module
https://gitlab.com/tposney/midi-qol/-/issues/1202
@scarlet gale and @kind cape
Not sure that this should have been closed as an issue by the author though
Yep. Pretty sure it's a module conflict, just wasn't sure if it was a known one.
honestly ditch the target modules I don't get why people use them, how much easier does it get than hover and press T
it's not a seperate module, it's just the late targetting from midi
if you think its that then you need to report your foundry version, dnd5e version, midi, dae, and socketlib/libwrapper to us cause we need to confirm for you
What is your late targetting settings too so we can test it
With all modules disabled other than midi it works so almost certainly a conflict i'm just not sure what could be causing it.
Full list of modules is attached.
Foundry v10.291
DnD 53 v2.1.5
Late targetting is set to always on.
Delete DAE SRD
Worst case I can just enable modules one by one. Just wondered if it was a known issue
delete either VAE or Dfreds Efffect panel
they are redundant together
personally I'd keep vAE
Delete ASE, its likely what is your problem
Delete MTB or LMRTFY having both is redundant
Yeah I'm gonna pin all my hopes on you having ASE installed in v10
I think thats your target problem
install find the culprit, disable all but libwrapper, socketlib, dae, and midiqol and test your targetting
Made those changes but still no luck. Will try find the culprit and go from there
I tend to use LMRTFY to request rolls, but MTB has a bunch of features that LMRTFY doesn't right?
personally I'd just use MTB then cause MTB handles requests too and then you can trim the fat
also I didn't check but you should have all your v9 compatibility warnings turned off unless they are pure content modules like compendiums of maps/items/animations/yada yada
So looks like the issue still persists with just these
what version of foundry, dnd5e are you on?
and what are your 3 late targetting settings set to
Foundry v10.291
DnD 5e v2.1.5
I have the exact same versions as you and cannot replicate your issue late targetting works just fine for me
after sharing your settings you may want to create a video of your issue as maybe its a matter of not conveying your issue to us in a way we understand
Only finding two options for late targetting not 3. Potentially that's the issue
ther eis the client side setting outside which is set per user, then theres the DM setting and the player setting in workflow button
all three must be set to the same for late targetting to function
I have never had an issue so far with any combination to have to reload my browser
Coincidentally it is really uncanny that my late targetting window is always off in a corner while everyone elses snippets of late targetting is in the center of the screen
I guess i can bypass the issue by export settings, change setting, import settings.
Odd that it's not in player though
Both GM and client side are always display
I have those settings and have no issues so could you make a video of your issue for us to see?
maybe its some kind of user error?
HOLD UP
I just replicated it, there is indeed a problem with late targetting
it works once then stops working
yep, this exactly
once per item/spell etc
your gonna have to learn to play without it for 2 weeks it would seem
Tposney posted the patch for 35 and stated hes on vaca for 2 weeks so I'll report the issue to the gitlab but you likely won't see a fix for more than 2 weeks on this
There is no errors in the console either really strange
Okay no worries. Think it was working a couple of days ago
you could try downgrading fwiw, but let me find my copy paste for the mirky waters of downgrading since we're just freshly post dnd5e 2.1.x and fresh off the dfreds rework...
If you are on dnd5e 2.1.x update to 2.1.5 and you can run the newest midi/dae/dfreds ce
Dfreds CE 4.0 requires midi 32+ and dae 22+.
I'd have to do some digging to confirm how far back you can go and stay on dnd 2.1
You definitely can't go back as far as dae 14/midi 24 as those are the stable versions for dnd5e 2.0.3. and I'd say half the versions between those and now are buggy at best so I'd only try 32/33/34/35
The strange thing is I swear this was working previously and it didn't seem to break on an update. Just wasn't working one time
Bug exists for all listed versions. Interestingly if you attack multiple targets, the bug does not occur
Quick recap of the issue? Late Targeting as a player works only for the 1st time?
for anybody
it only works the first time then you have to reload your browser for that window to ever pop again
Done some debugging. Can provide much more info in a moment
I will take a look later too
10.0.33 is the breaking change.
I thought I had tested 10.0.32 earlier but the current 10.0.32 zip is actually the 10.0.33 zip - it was accidentally updated in the 10.0.33 commit.
10.0.32 does not have the bug.
The bug requires "Roll a separate attack per target" to be enabled, and only occurs on targetting a single target.
i'm fairly confident the cause is the following change in itemhandling.ts:
Current workarounds:
- rollback to 10.0.32 (which must be done by manually grabbing the zip from the 10.0.32 commit)
- disable "Roll a separate attack per target"
- disable late targetting
You should create an issue with your findings https://gitlab.com/tposney/midi-qol/-/issues
tposney will be away though for some time.
Is there a way to automatize saving throws but still show the button to roll the save on the ability card?
If I cast a spell and don't target any creature, it hides the save button
install monk's tokenbar
Hm, ok
and you must target someone, entangle is also automated in midi srd fyi
you can't use spells without targets or the automation will fail regardless
Entangle was just an example. You could cast firewall without targets inside it and then a creature walks into it later
But the button won't show up there
It's Off for both the GM and the players, but there is no option for saves, only for attacks
I honestly don't think that is possible
You could probably do that with ready set roll or core but midi expects automation, banking the save to reuse later just isn't feasable
also I don't think entangle works that way
instant save, difficult terrrain thereafter
I think an example of persistant saves would be spirit guardians but thats already premade
it would help if you told us what item you are trying to automate
if you don't remove damage/attack buttons those work fine including saves for damage, but saves that just apply effects unfortunately I cannot find a way to reuse the save button
if you turn off midi automation for saves fully you can get the button but at that point you might as well just uninstall midi
I don't need them to apply any effects automatically, I just want the save button to show up while still making the concentrator work
It's dumb that I can't have the concentrator without auto save roll
it sounds like what you want is to uninstall midi, use the core roller and install concentration notifier
Hi strangers,
I'm coming back to you to check if what I created is right.
This macro is used in flads midi-qol.OverTime for the effect of the spell heroism :
turn=start,
damageRoll=@attributes.spellmod,
damageType=temphp,
condition=@attributes.hp.temp > 0 && @digital lagoontributes.hp.temp < @digital lagoontributes.spellmod
The system.traits.ci.value to immunise against frightened is active but the temporary hp doesn't apply.
What did I do wrong ?
or use Wire, or use Ready Set Roll, or use Effective Transferral+ CN
heroism is automated in one of the premade modules already
How did you have that ? I just have MidiQOL Sample Items...
Sources of premade stuff for Midiqol:
Midi Sample Items Compendium(comes with the module)
Midi SRD's compendiums(this is the manual install link)
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
Chris' Module form of his macros:
https://foundryvtt.com/packages/chris-premades
Activation condition examples by ThatLonelyBugbear
https://github.com/thatlonelybugbear/FoundryMacros/wiki/MidiQOL-activation-conditions-examples
@vast bane My good fellow, you are one of a kind soul !
Thank you very much I will go right this instant look at all of this !
if you can hold off on that midi srd install, bugbear is now the official author of it, and hes got somethin cookin he said possibly sometime this weekend a completely overhauled midi srd is about to drop officially
but fwiw, midi srd is about 75% workable in the fork form
How do i level scale a spell based on PC level?
This example lv 5 +1 dice
lv 11 +2 damage dice
lv 17 +3 damage dice
I will look into that and stay alert.
Thank you again for your informations
hmmm thats gonna be macro territory unless its a spell very specific to that class then you could do a scale value in the class feature to reference in the scale of the spell
wait...
thats cantrip
thats the scaling of cantrips isn't it?
There are other benefits to midi, like collapsing rolls into a single card, but I'll check that module and maybe I can not use Midi's concentrator
yes
set the scaling on the spell to cantrip even if its not a cantrip that should solve it?
if theres 0dX at level 1-4, put a 0dx in the equation maybe
kinda like GFB
then it scales with level by base on the lv 5 +1 lv 11+2 and 17+3?
Death Touch.
You can focus your deadly touch against your foes. As an action, make one unarmed strike. On a hit, the target takes an additional 1d10 necrotic damage. This damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).
I would just do cantrip scaling like moto said
Its Part of a character advancement
Umbrakin wings
Proficiency = charges/LR, bonus action to use
Casts shadows in a 30 ft sphere and dowses unprotected lightsources
Granting a flight speed equals to your walking speed. For one hour per charge used after each the wings disappear.
+1 Umbrakin Character Creation Option
Cling to Life.
When you make a death saving throw and roll 16 or higher, you regain 1 hit point.
Death Touch
You can focus your deadly touch against your foes. As an action, make one unarmed strike. On a hit, the target takes an additional 1d10 necrotic damage. This damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).
**Revenance.
**
You retain your creature type, yet you register as undead to spells and other effects that detect the presence of the undead creature type.
So its a bigger picture just working it off step by step
My MidiQOL is not applying damage anymore... Is this a known issue?
What version?
yeah thats cantrip scaling and put 1d10 in the field to the right of cantrip
Have you tried the one that just came out?
Either roll the dice in hopes that todays release of midi 35 is pristine and functional as it fixes that bug, or downgrade to midi 33 in the pins here for a more guarenteed stable release if you are running a session today.
I personally am a huge cynical person when it comes to new releases so I will always suggest downgrading on very very new releases till they are properly vetted by the brave folks
Like that?
yeah that looks good to me
@vast bane well, I had the issue "in session". So trying to fix it post
for the record you can use @mod instead of @abilities.str.mod
in that specific case cause the drop down is set to Strength just above
If that doesn't work, then you need to use the really long version of cantrip scaling that I never remember, but always yoink out of roll20 lol cause they don't have the shorthand version they do them all the long way
unless some brave fella remembers the cantrip scale formula
@vast bane .35 did the trick
I figured it would
My module will require.35 whenever I update it next. Tposney implemented my request
you keep your previous ones up too just incase right?
Yep
35 is a lil too new to go all in on atm lol
I'll be able to technically cut item macros from my dependencies now
Well you never really needed it in the first place, its only needed for people that want to edit the macro's
technically you don't require it right....we don't have to put anything in them do we? its like midi srd/midiqol, its only required if we want to edit them
Yea true
Fotoply beat me lol
I am speed 🚤
You must run faster Barry Allen(for the uninitiated)!
Also means my macros folder that is created with my module can be deleted after I switch everything over to the new function method
I absolutely love the button on the top bar that thing makes life alot easier when updating your module
I have to remake the MidiSRD ones too.
If you haven't been keeping up, ddb importer can mass update to my automations
Cling to Life.
When you make a death saving throw and roll 16 or higher, you regain 1 hit point.
A Clue how to get started on that?
Im Close making an action to make a save and on success to just heal one on 16+ xD
Unless there is a way to make it in a different way
Though I fail to trigger an onUseMacroName for preTargetSave 🤔
Could be an oversight
Yeah both new triggers are not included
Activation condition for a roll of 16 or higher and then a actorUpdateMacro 😄
babonus can do it
what
That actually cool
Just give the actor a bonus of 3 to critical death saves
and by 3 I mean 4 because math is hard
i do not even know how the current foundry handles deathsaves currently
It just reads the d20 and if it's a 20, you gain 1 hp
babonus swoops in and lowers that 20 if you want it to
is that a module?
Build-a-Bonus
His module
My module
But that would also make them succeed on a 7 on a death save
manually do it lol
No, different bonuses
Target value and critical threshold
Oh, I see
Build-a-Bonus how is that modified in the game?
Check the module page 🙂
probably right?
Yes, it's in the flags.
Awesomesauce
So how do i get that interaction going between babonus and the specific item?
is it part of the midi flags now?
put the baboni on the feature that you linked
no its a badger icon on the top of items and active effects
I'd personally put it on the feature
Sorry I keep mixing up if its a badger or an otter or a weasel lol
and then saves?
Oh wow
text
i immediately despise every bit of it and i love it
soooo
*Zhell aggresively emotes*
In his UI, tooltips are your greatest ally
Death Critical +4 then?
No need for a leading plus, but yes
is that all?
A name and a description, then you're a cool kid
can it be on the feature or does it need to be on a blank ae attached to said feature
is it always on?
or is it only active during X time
Doesnt matter where it is
Its AE Passive on my side now
k
actually think it could be on the feature then and save yourself a needless ae, I feel thats one of the greatest parts of baboni is shaving off ae management
Aside from the adorable Otters that is
áhh no its a custom item i add to the character gaining the benefits
because its no part of any class
its a variant magic item thing
Whether the babonus is on the item or on an effect, babonus don't care.
basically part of my players progression is not you get cooler shit, you get cooler
how do i refference another item in a items description
just to make things cleaner
is it @itemid.[itemid] ?
Drag the item to the description
if you want it rollable in description, install inline roll commands. and do [[/rollItem NAMEOFITEM]]
nah
im good
stuff is already complicated and thats just another step into the door of hellfire headaches i do not need xD
a description is more then enough
<moved to #module-development >
My warding bond suddenly does not "share" the Damage anymore 🤔
the sample items are...desperately in need of revisiting. I honestly think we should look to CPR and the new Midi SRD for more solid premades of that stuff.
Midi/dae had a rough patch the past like 15 versions due to v10+dnd5e 2.1.x so he hasn't really had time to retouch stuff and nboody has really submitted any fixes for them yet. If you know what to do to fix it, you can put an issue on his gitlab
so looking at Chris's premade macros, i can see how they wrote the Spike Growth to get it to work per 5ft taken by token, but how would i do the following for a spell? thats where im a bit stuck atm
"Creatures within the area must make a dexterity saving throw, taking 1d10 piercing damage on a failed save and half as much damage on a successful save. When a creature enters the area for the first time on a turn or starts its turn in the area, it must make the dexterity saving throw, taking the same damage."
i know where its supposed to go "When Entered" "When Staying", but not what to put into the macro itself to trigger the above
I wish I could. I guess I will have to try and learn 😅
Thank you 😊
that sounds alot more like a spirit guardians like ability and not spike growth
oh that spell does fit better for sure
oh theres a premade for that, lemme see what i can do
theres a bunch of them
Theres an active auras version, a midi sample item, a ddb importer one, and CPRU has one
is there a way to use mass edit to change settings of tiles without resetting all of their rotations?
I'd probably ping Aedif for that one. Though you are in midi's channel, you might wanna ping him in module troubleshooting
wups wrong channel
okay so all i really need is the secondary effect of spirit guardians, not the animations or all that stuff
have a few how to tweaks for some of the spells im adding:
- giving creature advantage on specific saving throws in the spell builder
- giving a creature dmg resistance until end of turn
- is there a way to have a spell be made available as both an action and a reaction? the dropdown only gives me one or the other in spell details
that last one would need a duplicate of the spell
Which spell would need both Action and Reaction?
You cannot trigger Reaction on other player's turn
You need to "create" that reaction item on the valid targets, via Active Auras probably, and they can afterwards use it when needed, asking the original player to "use" its reaction
It's a bit messy but can be done. I shared on such combo yesterday
ill need to modify the spell then (hombrew from gmbinder) since cant use reaction on another players turn?
You can use it, but not automate it easily 😅
ahh
declare to the GM that hey the roll happened, but I want to use my reaction for this and that and resolve what happens after
🤷
Or and that's with a number of caveats, <#1010273821401555087 message>
yeah maybe not have the reaction automated, might be too much for them lol, just the action i think should be enough
how would i do the grant ability check when casting the spell?
Nah, I'd lazy it up and make it a reaction and tell the player it can be used manually too as an action
A reaction that can never be used on a devotion paladin or anyone within its aura lol
its a good thing nobody is using a paladin this campaign lol
this is likely what ill do, just need to add the effect onto the spell itself now
third party reactions are wonky and get worse the larger the active aura has to be fwiw
yoiu could also just bypass the aura and give all players that feature/reaction and have them talk amongst themselves whenever they get prompted for it
i see, so that would be the only way to do it, an aura?
was hoping it would be something simple in the spell details 😦
oh wow, actually that reaction is complicated as hell
it'd be a reaction on the enemies lol
oh really? damn
I'd probably handle that exactly how the help action works
here i am thinking it could just be like a little buff on the player
yeah it can be, but it can't be automated
the player would use their reaction to buff the pklayer at the start of their turn
how would i do it without automation? thats where im stuck
oh huh, there isnt anything in details that can give advantage to player, or im not seeing it, thats frustrating
that does seem like the easiest way to go about it
thats what ill do actually, forget about making a macro for it lol
is there a way to let players click on a spell in the chat and it opens up the spell description? setting in 5e config is unchecked so they should be able to click and open things up now if im understanding right (was suggested midi might be interfering somehow)
there we go
thanks!
makes it easier, skip the macros for weird things and they can just see/scroll up in chat when needed
. probably coming in MidiQOL 10.0.42
if I am attempting to intercept multiple points in the workflow (eg "called before targeting is resolved", "called before the item is rolled", and "before damage application") to do different things...
like:
assign multiple 'impacts' per target
chose how many charges to use of a wand instead of the default of 1
run my existing working macro
How do I best set that up? is this a case for flags.midi-qol.onUseMacroName with 3 different entries in the Effect? (currently using the OnUse ItemMacro in the details tab)?
I think I could probably do this by adding additional dialog boxes instead of reusing the existing and confine the macro to "Before Damage Application" but then there are somewhat redundant dialog boxes (up to 4 for a simple spell) and that seems at odds with automating
You can do all then check the pass with args[0].macroPass
oh
What are you trying to setup?
this is still magic missile 😄
Ah
the horse isn't dead yet
but I learned how to set up a shared class in my module, so that is kinda sweet
Crimic has a good one. I think the public version is for v9 so needs a few small fixes to fix the token images.
I'd go with doing a damageonlyworkflow and a dialog for magic missile if you want to make your own.
I think I based mine off of a Sequencer tutorial - I do need to find that for proper attribution
I have a fully functional wand and spell, but I can't yet:
- choose how many missiles are applied to each target (it just assigns in order until it runs out)
- choose how many charges to use from the wand - the current default dialog only allows for 1 charge
I will try using 'All' and switching off of args[0].macroPass - that sounds doable
Make a dialog and have it handle the target selection and number of dice.
I have a re-usable dialog function that I like for stuff like this here: https://github.com/chrisk123999/chris-premades/blob/master/scripts/helperFunctions.js#L148
that's a good idea - there's no reason it has to be split into different dialogs
(requires warpgate)
I use warpgate, but I'm not sure I want it as a module requirement. regardless, I'll take a look at your dialog, thank you!
Well it uses the warpgate API for the dialog lol
ah... ok. maybe 🙂
There are probably other examples of dialogs around here and #macro-polo
That don't use warpgate
dialogs seem like they would be easy but I think that's probably because I haven't done anything with them yet... everything I touch in foundry is a reminder of how little I know
Regular javascript dialogs confuse me to no end.
lol
this is the first javascript I've touched in ?? 20 years? it has grown up a bit
thank's again - more fun to be had.
I should really make my own magic missile automation.
This is from my preserve life macro, would be simple to reuse the same setup for number of missiles
Low priority for me however, the crimic one works pretty much the same
I need to make an initial commit to my "module" (which is like 3 spells, 1 feat, and a one-liner change of one of the midi-qol samples, so far)
Seconded. Also scorching Ray. I have them both working through the ASE fork right now and they work but it is veeery fiddly with the midi workflows. The chat window has a manic episode when cast. 😂
Scorching ray is a weird one. I just have my players click it again and uncheck use spell slot.
Since I let them see the damage to the target before having to setup for their next one
so you don't get wasted beams
I found the ASE one works if I don’t require targeting but the spell then fires once with no target as its clicked, THEN the dialogue to choose targets pops and it proceeds with the player’s choices and resolves. You make a good point about wasted beams though. I wonder if someone who knows how to make things work could make a version where if a ray targets a token that has hit 0 it moves to the next target 🤔
That's not the worst idea
have it fire one ray at a time
then ask for your next target...
args[0].workflow.damageList[].newHP <= 0
sorry for pseudocode - tired
Might not be as visually spectacular as the multi-ray blast but definitely very practical
or take multiple targets up front
Having you select the number of beams per target up front would be easy
I suppose I could have it check damage after each then give you a new dialog at the end for unused beams
I meant with the fallthrough of "that one's dead"
It’s genuinely kind of you to think I understand any of that. I’m the classic foundry user who is like “if it can be done with a module with a GUI I can teach you how, if it requires code I will disassociate and slowly weep” 😅.
Might just be better to have it give you a limited use feature with the number of beams
instead of a dialogue
I'm really still pretty close to there myself 🙂
Is there a way to make difficult terrain half a person's speed automatically?
Depends on the modules you're using. Enhanced terrain layer can do it.
Technically you could apply a half speed reduction with an effect too, but that will act weird over long distance moves
It's an effect surrounding a stationary monster.
I don't have enhanced terrain
How could I do it with an effect?
Their wouldn't be any long distance moves.
I will be mindful of your warning and kill it with fire if it becomes problematic.
If they have other effects that add movement it'll be weird
Understood
Had an amazing session but found out that the sample item for emboldening bond is no longer functional in midiqol, need to tweak it somehow
not only does it break but it really destroys performance while its breaking
That's not good
@crimson junco
thank you!!!
the emboldening bond from the Sample Items?
yeah
the macro has the wrong keys they are missing the tail end new key additions to them so they throw deprecation errors
I'm trying the different settings there to hide the rolls but they don't do anything, when I set my chat as public, players see everything no matter the setting in midiQoL
They will always see a message of some kind when chat as public, but those settings should censor or remove parts of it, you're not seeing a change in the messages at all?
As a player, I mean, the GM still sees everything
No, they still see all the roll numbers, I only want them to see name, icon and description, but it shows evrything
I'm using a second pc to check from player's PoV
<#1010273821401555087 message>
Could try this 😄
Or open the ItemMacro and add .all to the keys, plus one more for .skill.all if that's needed
Okay so i've managed to hide everything but the saving throw DC number, I guess I can work with that
I can't see a way to hide it
share some screenshots of the end result
save dc is hideable in the save subsection in the workflow tab of workflow button
oh not hideable if you are using the sub modules MTB/LMRTFY I don't think
tbf theres alot about those two modules we wish were better. They also spoil names.
It is hideable for Merged card only. And yeah MTB/LMRTFY is another story
thank you again
Tried it and it doesnt hide the DC number, still displays a clickable button in chat with the DC number
um.....
are you using midiqol with another roller?
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
The following modules have template settings that step on midi:
Spell Template Manager
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.
If you are on dnd5e 2.1.x update to 2.1.5 and you can run the newest midi/dae/dfreds ce
Dfreds CE 4.0 requires midi 32+ and dae 22+.
Midi now requires sight to be setup on all monsters or the players will get unseen attacker advantage.
what would be another roller? the only roll realted modules I have are dice so nice and dice tray
i dont have any of those
I have never seen a save dc button in chat
you are probably using abnormal settings, likely turned off one of the core pillars of midiqol
or its the LMRTFY window cause I don't use that module, but requests will prompt the player and I think atleast in MTB's case theres no way to control it spoiling things
Can you share a screenshot, please? Makes it easier to spot what's off
I think they have the very first setting in the save section to off
this is what the player sees now, if they click on save DC while their token is selectd, the save is rolled, it was always there I dont think i installed a module for it and if I did, it was MidiQoL I think
The button is midi qol but the rest I don't recognize
the button is core
I've had this for half a year
And is this with only MidiQOL active?
or more, honestly I think it was like that since the beggining
that button is the core saving throw cause the user has the first thing in the save section off
huh
although its worth pointing out the players have a right to know the DC of everything
that is the whole point of a DC
You're right there, that's why I said I can work this this right now
but the button showing in chat means you have save automation off
Much disagree but #tabletop-discussion for that one, Domaik do you see the same message if you only have Midi and it's dependencies on? Those two last rows smell of another module
I don't have full automation on, I can't remember what settings I back when I set it up but players asked to at least be able to click and roll some things so it's not just sitting there watching the machine do all
thank you anyway
oh
I can disable and try
My prefered save setup is to turn on save automation cause then you get the cool stuff like proper effect transfer and then to prevent auto rolling, I use MTB as the request process
this is player's view without MidiQoL
funny enough, it displays the description that I want them to actually read
but with midiQoL description is hidden lmao
thats a setting at the top of one of the tabs in workflow
also I think those addon roll messages are multi attack...in the list
with no other modules active and only Midi QoL active it looks the same as no modules active...I must be doing something wrong
Misc -> "Show Item details in chat card" and then you can edit which and what there, some options require merged cards
I can't access my world to show you, but in the save subsection in the workflow tab you have the very top first thing unchecked and that causes saves to suddenly look like core
do you mean auto check saves?
yes, I changed it and it hides the DC click button but shows other messages depending on target tokens chosen or not
I might keep it off though, depends what the players prefer, some of them like clicking rolls instead of having everything super automated
thank you a lot for all the help
If you want the player POV to be something like this, you disable a lot of automation
No save checking, no auto rolling damage (I could not get Midi to stop showing that the GM had auto rolled damage for the player pov?)
if you turn it on the three drop downs at the bottom control how midi requests
personally I'm a fan of MTB but maybe LMRTFY lets you hide the DC's so maybe a user can confirm if theres some feature there
thank you. I think I got it set to show what I want, the only thing not working well now is that the actual 3d dice rolled do show the numbers, but they do fade...I did check the box that says to show ghost rolls if i'm using dice so nice
but all midi-qol managed rolls don't show the ghost dice, the rest from my macros do show them hidden
I can't help you there I've never been that secretive about rolling, I dunno whats up with it but its a common complaint about DSN.
I have a similar problem with the new preApplyTargetDamage, but in my case it is a little bit too early. It should be moved to util.js, https://gitlab.com/tposney/midi-qol/-/blob/v10/src/module/utils.ts#L733 , Also triggerTargetMacros is missing an if to handle the new trigger…
yeah saw the new triggers missing too
But all the new triggers open up so many possibilities.
I started writing a small module to handle transferring reactions to other players.
I will test it during the week.
is there a simple way to apply poison status to an item or would it be simpler to just apply it to the token itself via gm control? scratch that, so much easier to do myself
I’m also experimenting with the Barbarian Spirit Shield feature
I rewrote my Flames of Phlegethos without an active aura, just the new trigger isDamaged and it work perfectly
Rune Knight's Cloud Rune is my jam 🤣
Did the same for Fire Shield. So easy now
One small issue with how you end up passing the item's itemData in a new DamageOnlyWorkflow.
You might end up targeting self if the initial spell is target Self. 😄
(based on Retribution sample Item)
I end up fetching another item with some changes to pass along
And secondary issue, if you go by the same example, and you have multiple similar effects on isDamaged eg, Retribution and Fire Shield at the same time, the auto damage card will get a bit confused.
In this case an automatic application of damage via applyTokenDamage instead, should be better.
Actually as the DamageOnlyWorkflow ends up calling the applyTokenDamage anyways, a parameter to forceApply:true in that one too, would make much sense!
oh but that's where it does its best!
my v9 module dependent on warpgate (squadron) worked perfectly in v10 with no upgrades because I based it heavily on warpgate 😎
Is there any way to get a reaction to be prompted when its not your turn in combat?
not easily yet.
You can just very hard to do?
And if its hard what does that entail?
Active Auras, create Reaction Item on relevant actors, ask Reaction's source user if its OK to use their reaction, use reaction and have a macro "consume" source user's available reaction
<#1010273821401555087 message>
i think im going insane, i could swear that an hour ago i saw a command to give player option to make a saving throw as an action. now i cant find it. am i just crazy?
nope found it i am crazy
is there a way to query the workflow for the TYPE of attack before it hits? Like, I'm specifically thinking of counterspell, which would only trigger as a reaction if it was an incoming spell attack.
There is a new onUse macro that can be triggered when the target isAttacked… in the macro you would have access to the triggering workflow
so this error is happening when testing the summon spiritual badger for warpgate macro
But for now, there is no way to specify a condition which to allow a Reaction to be useable or not
around line "5" in your macro, you are trying to read the items field from a undefined variable. Poke around there for clues.
hm. so, this is the set up i have right now.
At the moment, the ItemMacro on counter spell does nothing more than console.log("workflow:", args[0])
but it's not printing that to the console.
so, the macro doesn't seem to be triggering.
Hey I am trying to find the Item ID and the Uuid of the actor token, but I can't find the pinned message about what to put into the console to find it. Any idea which chat that its in or how to do it?
@dark canopy got it, downloaded Arbrons and this one is a bit easier for me (has like a step by step guide lol)
just need to tweak the hp
feels like one more condition (attackIsSpell) could be added to the reaction stuff. It's pretty niche, but would be useful for Counterspell
Is your effect set to transfer to actor? If not, the effect will not be a passive effect.
And it would not be triggered
it is indeed set to transer
And your on use macro has been enabled on actor, I think there is a setting in midi to configure this which is different than the one for item on use macro
It could also be a bug… these triggers are pretty new and some of them have problems
Like the preApplyTargetDamage
not seeing any midi setting that might be useful...
It won't work with an ItemMacro.Counterspell afaik. You will need to reference a macro from your world folder, or the ItemMacro on an Item on the sideabar, via ItemMacro.Item.id or ItemMacro.Compendium.Item.UUID
For the macro.createItem drag and drop onto the actual Effect Value of the AE, the Item from the sidebar
You are right, because it is executing on the attacker workflow, it probably look for an item with that name on the attacker…
For the token, select the token and type in console _token.document.uuid
can also open the token config, and right click on the
icon
which copies the UUID to your clipboard
ok. I set the onUseMacroName to: Override | ItemMacro.CounterspellMacro,isAttacked and created the macro called CounterspellMacro in my macro directory. Macro text is simple: ```js
console.log("Workflow:", args[0])
Gotcha! and in the [actorUuid, effects:[effect]}); I assumed the second effect needs to be the name of the effect?
~~That will give the Actor5e#UUID and some times it can create issues, for multiple linked actor's on the scene ~~😄
Now i read it...
it's still not triggering
but so much better
Remove ItemMacro.
It should only be the name of the macro in this case
nope, its the actual EffectData
as in the macro
Any good description you can provide as to how the logic flows?
Im just trying to wrap my head around the concept
that did it!
- Active Auras creates an AE on allies.
- That AE is a
macro.createItemwhich will create the linked Item on the Actor. - The linked Item is a Reaction of the type you want.
- Attacker attacks Actor, Reactions are evaluated.
- Player owner of Actor which is attacked, asks the player source of the Active Aura, "is it OK to use your reaction in this case"?
5a. If yes, clicks on reaction and the secondary macro will make sure that a DFreds reaction used AE is placed on the source Actor.
5b. If no, you don't click on the reaction and go on with your merry ( or not depending on the damage ) life 😄
Ok awesome, so the initial effect of what I want it to do goes in place of the flags.midi-qol.disadvantage.attack.all ?
Yes, that is on the Reaction Item
Ok and on the second item, the aura could be changed to any radius correct?
yes
Making it all over the battlefield should be fine, if not a bit resource intensive
i think this might more more of a worldscript. Check all attacks before they're rolled. If it's a spell, and the target has the item Counterspell, pause the workflow, roll the target's Counterspell item (which has its own macro that will adjudicate the counterspell mechanics) and then continue the workflow or not, depending on the adjudication.
Is such a thing possible? Or is it just too gnarly?
yeah. This is an incomplete version of one I had made and the only I can find right now ```js
Hooks.on("midi-qol.preambleComplete", async (workflow) => {
console.log(workflow)
// if(!game.user.isGM) return;
if(!workflow.item.type.includes("spell")) return;
const spellLevel = workflow.itemLevel;
const sourceToken = fromUuidSync(workflow.tokenUuid)
//check targets within 60ft, maybe of different disposition so as to trigger counterspell...
//MidiQOL.findNearby ƒ findNearby(disposition, token, distance, maxSize = undefined)
const isInRadius = MidiQOL.findNearby(null, sourceToken, 60) //need to check for walls blocking or testVisibility, but I think it is included in .findNearby that calls upon MidiQOL.getDistance ƒ getDistanceSimple(t1, t2, includeCover, wallBlocking = false) { return getDistance(t1, t2, includeCover, wallBlocking).distance; }
let canCounterTokens = [];
for (let t of isInRadius) {
const uuid = t.actor.uuid;
const hasEffectApplied = game.dfreds.effectInterface.hasEffectApplied('Reaction', uuid);
if (t.actor.items.getName("Counterspell") && !hasEffectApplied) canCounterTokens.push(t);
}
// missing logic etc
Oh god, that logic is preparing for a not too unlikely result of multiple people being able to counterspell the same spell