#MidiQOL

1 messages Β· Page 11 of 1

vast bane
#

its firing on upcasts atleast

#

It played with this roll

scarlet stump
#

how can I select a value from a targeted token in a onUse macro?

kind cape
#

I'm gonna get to the bottom of that exploding issue right now!

vast bane
#

this seems like a ton of headache

scarlet stump
#
let cr = target.actor.getRollData().details.cr;
let crRounded = Math.ceil(cr);
let result = 10 + crRounded;
let result_html = `<h2>Shield Mastery!</h2>
The DC for the Con save is <a class="inline-result"><i class="fas fa-dice-d20"></i> ${result}</a>`
ChatMessage.create({
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor}),
content: result_html
});```
#

I get an error saying that target is not defined

vast bane
#

I think you need to find the way zhell gets targets if not using midi workflows

#

target is probably not defined?

#

just scan macro polo till you find on of their examples

scarlet stump
#

can I use args outside of an item macro?

vast bane
#

although, that macro should belong in macro polo

#

args is midi stuff, item macro is just a storage device midi hijacks for convenience

scarlet stump
#

can I use midi args in a regular macro?

vast bane
#

define regular macro

#

if its being used on a server using midi then ofcourse

#

are you making the roll without midi workflows?

#

wait if all you want is to make a saving throw with a cr, seriously...why not just use requestor or monk's token bar lol

scarlet stump
#

my bad, it works fine when I execute it form the item

vast bane
#

how does target.actor work 0_o

scarlet stump
#

no args[0].targets[0].actor.getRollData().details.cr work πŸ™‚

#

thought I could only use args with item macros

vast bane
#

all item macro is is a macro stored on the item instead of the folders/hotbars. Midi lets you use args as long as midi is installed

#

I think there are a few nuanced features you can utilize in item macro though

scarlet stump
#

still getting a NaN on the value when I execute this macro from the item though :v

let cr = args[0].targets[0].actor.getRollData().details.cr;
let crRounded = Math.ceil(cr);
let result = 10 + crRounded;
let result_html = `<h2>Shield Mastery!</h2>
La CD per il Tiro Salvezza di Costituzione Γ¨ <a class="inline-result"><i class="fas fa-dice-d20"></i> ${result}</a>`
ChatMessage.create({
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor}),
content: result_html
});```
vast bane
#

do they have a target?

scarlet stump
#

they do yeah

vast bane
#

what is the CR of the target?

#

wait you can't round a fraction can you?

scarlet stump
#

0.25 (1/4) but the Math.ceil should take care of that, no?

#

unless the issue is with the result value

violet meadow
#

Try this as an onUse on the reaction Item ```js
const roll = await token.actor.rollAbilitySave('con')
const sourceActor = await fromUuid(args[0].workflowOptions.sourceActorUuid)
const DC = Math.ceil(sourceActor.getRollData().details.cr) + 10;
if (roll.total < DC) {
let item = token.actor.items.get(args[0].item._id)
await item.update({'name':Broken ${item.name}})
}

scarlet stump
#

yeah result is NaN lol

vast bane
#

I bet you ceil doesn't work on fractions

#

use their pb

violet meadow
#

ha ok

#

I cannot test it rn

scarlet stump
#

weird, it did work with the other way I was calling it, but it doesn't with rolldata

vast bane
#

seriously the PB scales relatively similar to their cr's anyway and how on earth are you going to save against a cr 24 monster?

scarlet stump
#

yeah that's a good idea

vast bane
#

but in that case....you realize all you are doing is running in a circle back to a normal saving throw lol?

kind cape
#

@vast bane Try this one.. I dislike JS syntax sometimes, 99% sure this should work, even for upcasts

Hooks.on("midi-qol.RollComplete", function (workflow) {
    if (workflow.damageDetail.filter((detail) => detail.type === "healing").length === 0) return;
    let dice = workflow.damageRoll.dice;
    let explodedDice = [];

    function hasExploded(die) {
        for (const result of die.results) {
            if (result.exploded === true) return true;
        }
        return false;
    }

    for (const die of dice) {
        if (hasExploded(die)) {
            explodedDice.push(die);
        }
    }
    if (explodedDice.length === 0) return;

    console.warn("Explosive sounds", explodedDice);

    //AudioHelper.play({src: "sounds/dice.wav", volume: 1, autoplay: true, loop: false}, true);
});
#

(Obviously replace the audiohelper line with a non-comment)

vast bane
#

I really hope this was not the problem the whole time:

#

something tells me worldscripter would have caught that

kind cape
#

It should, otherwise you would see it in your chat

#

But it was broken as well on my end, no idea how it worked the first time when I tested it πŸ₯Ή

vast bane
#

yeah plus sounds were playing

vast bane
kind cape
#

Might be yeah

#

This time I tested the case of rolling a 1, rolling a 4 and upcasting and rolling a 4

#

And also this time I use console log, cause I was sometimes unsure of if the sound I heard was from elsewhere πŸ˜‚

vast bane
#

oh, it worked, my issue is I forgot to edit the sound, and again...why do all of you have the sound file and I don't?

#

this is really weird that my foundry doesn't have a sound you all say is built into foundry lol

kind cape
#

Everyone should have that sound file, but its in core and its not visible from the tile browser, since its a sound file πŸ˜›

vast bane
#

mine doesn't play the sound says it doesn't exist

#

but it works, I'm fixing with my own sound now but it for sure works

kind cape
#

Thats odd, but good to know that it finally works! πŸ˜‚

vast bane
#

wait, it did the yellow message you put in it

violet meadow
#

@scarlet stump get the macro again. I edited it

dang on my phone...

vast bane
#

I assumed that was an error for sound but its your error code

kind cape
#

Ahhh xD

#

Yeah that was my "sound" for testing

#

Hence the explosive sounds name

vast bane
#

rebooting with a sound that plays lol

scarlet stump
#

(on v9 if it's relevant)

vast bane
#

could you have edited it to fix the fact that bugbears was source and you wante dtarget and that wound up making the error?

violet meadow
scarlet stump
#

ah my bad let me try it as an itemmacro

violet meadow
#

To test grab the Uncanny dodge from MidiSample items

vast bane
#

oh yep, thats one of those nuances of item macro that zhell linked

violet meadow
#

Put that code snippet in the ItemMacro of it.

#

and add an onUse ItemMacro | After Active Effects on it

vast bane
#

@kind cape sound is not playing, no error message, but I see your yellow message

scarlet stump
vast bane
#
Hooks.on("midi-qol.RollComplete", function (workflow) {
    if (workflow.damageDetail.filter((detail) => detail.type === "healing").length === 0) return;
    let dice = workflow.damageRoll.dice;
    let explodedDice = [];

    function hasExploded(die) {
        for (const result of die.results) {
            if (result.exploded === true) return true;
        }
        return false;
    }

    for (const die of dice) {
        if (hasExploded(die)) {
            explodedDice.push(die);
        }
    }
    if (explodedDice.length === 0) return;

    console.warn("Explosive sounds", explodedDice);

    //AudioHelper.play({src: "hakuna_meow02.ogg", volume: 1, autoplay: true, loop: false}, true);
});
#

oh my god

#

I'm so embarassed, I'm leaving this so you all can shame me

violet meadow
#

why no sounddddddddddddddddddddd πŸ˜„

vast bane
#

I deserve every ounce of this

scarlet stump
violet meadow
#

Does that creature have a CR?

scarlet stump
#

cause I haven't removed the save part from the thing I guess

#

it does have a 1/4 CR

kind cape
vast bane
#

didn't a module have that in it?

#

like furnace or advanced macros or something

kind cape
#

It does, but it is not compatible with Effect Macro, it breaks the window pretty badly 😦

#

I was going to make a patch for it, but then I forgot/got lazy

vast bane
#

oh yep yeah, it messes with item macro too

kind cape
#

In general it messes with macro windows that does not have a script/chat dropdown

scarlet stump
violet meadow
scarlet stump
violet meadow
# scarlet stump sure, thank you anyway for now πŸ™‚

damn it no2. Try that: ```js
const roll = await token.actor.rollAbilitySave('con')
let sourceActor = await fromUuid(args[0].workflowOptions.sourceActorUuid)
sourceActor = sourceActor.actor ? sourceActor.actor : sourceActor;
const DC = Math.ceil(sourceActor.getRollData().details.cr) + 10;
if (roll.total < DC) {
let item = token.actor.items.get(args[0].item._id)
await item.update({'name':Broken ${item.name}})
}

#

Make sure that this is used through the Reaction process of MidiQOL

#

Do you use that?

scarlet stump
violet meadow
#

yes

molten solar
#

(and I will absolutely 100% shit on Monaco for this bug. It's idiotic.)

scarlet stump
#

my bad, I was rolling it manually from the sheet

#

I'm not getting prompted, let me check the workflow

violet meadow
scarlet stump
#

these are my reaction workflow settings atm

violet meadow
#

the item

#

hope thats the right screenshot

kind cape
#

Cause it should be fixed in Monaco, as it breaks both Item Macro and Effect Macro

scarlet stump
#

was missing the "reaction Damaged" part...it's working now @violet meadow !

vast bane
violet meadow
vast bane
#

I think I was thinking of advanced macros breakage with item macro

violet meadow
#

Effect macro yes v9 kaput

vast bane
#

where you have to turn off the formatting helpers

vast bane
#

weird advanced macros doesn't have that setting anymore, it has no settings

#

I swear there was a setting in advanced macros that caused item macros to go misaligned and hard to select text

violet meadow
#

on the off-topic of ItemMacro, does anyone know why ItemMacro redraws over the same window when you open the Item macro of another item?
I have lost a couple of macros that was writing and I hadn't saved without realising... 😩

#

(it was not in the past)

kind cape
#

Nope, but I've seen it as well, annoyed the heck out of me

molten solar
#

Huh.

violet meadow
#

yeah it came some time after 1.7.0

molten solar
#

Well that's an easy fix. BRB making a PR.

vast bane
#

I can't use item macro to edit stuff

#

I absolutely yoink it out to an editor

scarlet stump
# violet meadow

now I'm getting prompted correctly, still not capturing the attacker's CR but at least the workflow runs its course πŸ™‚

vast bane
#

can you ceil a fraction?

scarlet stump
#

the DC value is Null

#

so it always passes

violet meadow
#

yeah, check in console math.ceil(0.12)

scarlet stump
#

Math with a capital M

violet meadow
#

you might need the math.js module or something πŸ€”

vast bane
scarlet stump
#

still getting that Cannot read properties of undefined (reading 'split') whenever I run the reaction

violet meadow
scarlet stump
#

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split') [Detected 1 package: midi-qol] at fromUuid (foundry.js:2540) at Workflow.eval (eval at callMacro (modules/midi-qol/src/module/workflow.js:1262), <anonymous>:6:25) at async Promise.all (index 0) at async Workflow.callMacros (modules/midi-qol/src/module/workflow.js:1211) at async Workflow._next (modules/midi-qol/src/module/workflow.js:770) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256) at async Workflow.next (modules/midi-qol/src/module/workflow.js:256)

scarlet stump
#

sure

vast bane
#

I still say use monks ;p

#

or requestor!

#

what is the actor you are pulling the CR from?

scarlet stump
#

tried a few ones, a goblin, a custom created monster and a custom created npc

vast bane
#

are they all unlinked actors?

scarlet stump
#

the others have a CR > 1

vast bane
#

just spit ballin is all

scarlet stump
vast bane
#

double right click them

#

see if it breaks only on one or the other type

#

find a unique linked npc and an unlinked npc

scarlet stump
#

yeah they are unliked

vast bane
#

trya linked npc

scarlet stump
#

same

violet meadow
#

The item you sent me works fine 🀷

scarlet stump
#

0.9.53

#

no idea 🀣

molten solar
#

PR sent, lmao
1 line of code

violet meadow
scarlet stump
#

mmm let me update 🀣

violet meadow
#

You might need to update ItemMacro too

scarlet stump
#

should I switch to the 1.8.0 version for ItemMacro even if I am on v9?

vast bane
#

update to the newest v9 fork branch

violet meadow
#

I cannot say 100%, but there were some changes in MidiQOL to work with the newest ItemMacro.
Probably tposney would have some backwards compat but not sure at this point

molten solar
#

Item Macro's newest update works in both v8, v9, and v10. Because Badger lost his damn mind.

#

should work*

vast bane
#

I had no idea he wrote item macro

molten solar
#

He did not

#

He maintained it while Kekilla was away.

scarlet stump
violet meadow
#

No message. Just the name change

scarlet stump
#

aaah

violet meadow
#

I didnt write anything for that πŸ˜…

scarlet stump
#

it's really broken now 🀣

#

ok I'll change the effect when it breaks, thank you so much for the help!

violet meadow
#

Yeah it adds a broken each time

#

So you can make it use resources as Moto said and make it unavailable if its broken

vast bane
#

You should probably update dae too btw

violet meadow
#

MidiQOL will respect the Item Uses for the reaction trigger iirc

scarlet stump
#

yeah I will update everything...I tend to update only whenever I update Foundry and I've been on v9 for far too long

vast bane
#

well dont' go nuts, only update when a breakage is happening but midi+dae are two that you should mirror updates on

violet meadow
#

might need a bit of though on how to do that though but hit me up if you dont find a way soon

#

nah update All now! The only way to be certain murderkitty (/s)

(hope its clear now :D)

vast bane
#

I don't mean update v10, I just meant make sure you got midi+dae paired with their corresponding versions hehe

scarlet stump
#

someone was mentioning Uncanny Dodge before...is there an existing macro for it, or is it handled automatically?

violet meadow
scarlet stump
#

why did I never realized there were all these premade effects Γ§_Γ§

violet meadow
#

🎁 πŸ₯³

vast bane
scarlet stump
#

well that's not happening for the foreseeable future, not until all the DF toolkit and token attacher get ported over

violet meadow
#

Token Attacher I think is v10 compat now

vast bane
#

@bold plover they sent you here, but I don't know how v10 midi/dae has changed, I'm still on v9, but if you need to do all Resistances, you'll probably have to make every one of them.

#

Oh I see now what you were talking about, this actually isn't even midi lol

bold plover
#

this is what i got on v10

vast bane
#

you wanna know how to seperate them

bold plover
#

i think i used to be able to type 'true' or '1' and it worked but now it doesnt

vast bane
#

Try just putting a 1 in there

#

ok, yeah, I think maybe thats still broken, cause what we said in the other channel still stands, dnd5e 2.0.3 changed stuff on dae/midi and it messed up his code, he fixed the individual flags, maybe he missed this one

#

I'm sure theres something in the pins in normal dnd5e channel for what to put in for the field normally

bold plover
#

ok

vast bane
#

Zhell may even have the answer, he didn't know you were talking about that specific flag I bet

#

we were all thinkin .value

#

wait I know how to get its formatting

#

nope didn't work lol damn

#

They look like this in the console so maybe try these?

molten solar
#

The core way would be to add all the types one by one

vast bane
#

yeah thats what I was starting to say before we came here till I realized all existed in his image

kind cape
#

Okay that is kinda funny, just tested out .all in V10 and this is how the DR section looks if you set it to 1 πŸ˜‚

vast bane
#

or whatever

kind cape
#

Yeah

vast bane
#

think we need to ping him then

#

should be one of you two v10 users lol

kind cape
#

I'm not on V10, just have a testing environment πŸ˜‰

vast bane
# bold plover ok

For now, do what zhell said, its tedious, but it will solve your problem, do the dr.value and choose every single one

#

is there a limit to how many keys you can have in an effect?

bold plover
#

yeah i have that one, was just hoping there was an easier way to do it

molten solar
#

Use a... πŸ‡² πŸ‡¦ πŸ‡¨ πŸ‡· πŸ‡΄

vast bane
#

it works in v9

its cause dnd5e changed the ordering and removed or added 1 of them and it messed up his code

violet meadow
vast bane
#

do you guys having the issue have the right 3 versions, dnd5e, dae, and midi?

#

10.0.12+ midi, 10.0.8+ dae, and 2.0.3+ dnd5e

#

he said that he made it so you can't have the wrong versions but maybe /shrug you do?

molten solar
#

I thought he already said midi didn't support the rework to non-magical physical (why do I know this)

bold plover
#

yeah i have the versions you mentioned

molten solar
#

makes sense that that breaks the .all thing too

violet meadow
kind cape
molten solar
#

You know it would do my game more harm than good. I can't go down on my level of automation, sheesh.

vast bane
#

I can see how an automated damage session would need dr to be working right

molten solar
#

Why haven't yall just written a macro to create the array of changes in the effect

vast bane
#

cause I the only way I can use my tv remote is by speaking into the microphone on it

#

I can copy others work but I can't create

scarlet stump
#

I'd make a sandwich but my fridge has been hacked

kind cape
vast bane
#

yeah specially with the dae drop downs for value, if you are a hunt and peck keyboardist, manually typing them out would probably take a while though

#

but you'd also need to know what to put in the macro, I certainly don't lol

molten solar
#

smh

fallen token
#

Y'all still trying to figure out how to do damage resistance to all types? Tried flags.midi-qol.DR.all yet?

vast bane
#

isn't that damage reduction ;p

fallen token
#

dang it, stupid names got me again

vast bane
#

those two keys have gotten me enough times now that I'm wise to them

#

the v10 key does the weird bug, the v9 key works like my image shows, we think that the latest dae/midi/dnd5e broke the key

molten solar
#
await token.actor.effects.find(i => i.label === "Steve").update({
 changes: Object.keys(CONFIG.DND5E.damageResistanceTypes).map(type => {
  return { key: "system.traits.dr.value", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: type };
 })
});
vast bane
#

i.data.label for v9? system replaced with data.data?

molten solar
#

Sorry, I don't speak your language.

vast bane
#

oh wait forget I asked, I forgot, I'm not broken he is

molten solar
#

What is a "9"?

vast bane
#

I can just use dr.all ;p

#

I'm pretty sure 9 was eaten by 7

molten solar
#

leaves

vast bane
#

do you have to put quotes around the types?

molten solar
#

Doubtful

#

They are already strings.

vast bane
#

can you do a chain of them like fire, cold, acid...?

molten solar
#

Sure. Do you want to be resistant to the damage type called fire, cold, acid...?

vast bane
#

then wouldn't it be faster to do dae's drop down x times?

molten solar
#

or just... run the macro...

#

it's... right there

fallen token
vast bane
#

system.traits.dr.all is the broken one

#

data works just peachy

unborn cosmos
#

Hi, is there a good way to make metamagic like twinned spell work when using midiqol to run combat?

#

basically I'm asking if there's a way to get around the targeting restrictions and have one actor concentrating on three different hold persons (for example)

vast bane
#

just don' have 1 in the target field

#

you can even have a weapon attack everyone in range if you wanted to be crazy and set no limit to targets

unborn cosmos
#

ok wat, I tried it again today and now it lets me target more than 1 token, but yesterday when I ran a short combat test with my players a yellow warning popped up saying he could only target 1

#

Also thanks, thats good to know

vast bane
#

remove the 1 from here:

#

and that warning stops happening

#

but also, theres a midi targetting setting that would also eliminate that warning, the requires target warning

unborn cosmos
#

oh I see what happened just now, targeting restrictions is not enforced outside of combat it seems

#

that's why I was able to do it just now

gilded yacht
unborn cosmos
#

ok, no easy way to get around this. metamagic stuff will just have to be done manually I guess

#

that's fine

gilded yacht
vast bane
kind cape
vast bane
#

lol guys, you can count on like 2 hands how many twinnable useful spells there are, thats a minute of his time to edit

unborn cosmos
#

yeah you're right

#

it's easy enough to edit the spells and just be smart when casting non-twinned

#

just don't target wrong

gilded yacht
unborn cosmos
#

and it's easy to fix a wrong target anyway

#

cheers moto

kind cape
unborn cosmos
#

how terrible πŸ˜†

vast bane
#

thats what the circular arrow thing is for on the damage card ;p

#

if hes like my evocation wizard player with his sculp spells, the turn is 30 minutes long and hes got damn near a lifetime to remember to target right

unborn cosmos
#

😬

vast bane
#

btw, do you know about careful flag in midi for that sorcerer?

unborn cosmos
#

no, I was going to ask about subtle spell next

#

not subtle

#

it is careful

#

brainfart

vast bane
#

careful I believe

unborn cosmos
#

that was the other issue we ran into

vast bane
#

i dunno what the nuance difference is but I think the thing you need to do is first add a passive ae to the sorcerer that tells midi hes careful

#

then if you pretarget the people hes protecting, when he casts the spell and drops the template midi picks up the pretargets

#

the passive ae key can be found probably just by typing careful in the field if you have dae

unborn cosmos
#

ok one minute while my brain tries to figure out this

#

I give the sorc a passive effect with those flags

vast bane
#

just the second one

unborn cosmos
#

of course

vast bane
#

the first is the wizard equivalent

unborn cosmos
#

no scuplting for mr. sorc

vast bane
#

make sure you do custom for the middle thing, and 1 for the effect value

unborn cosmos
#

so I have to pretarget the protected tokens?

vast bane
#

yep

#

also if he forgets and hes got the template on his mouse but not placed yet, he can right click to cancel placement and repeat the process

kind cape
#

The caster has to pre-target the protected tokens, just to be clear

vast bane
#

yes, and midi then I guess detects the double targetting of them in the backend to give them special results

unborn cosmos
#

ah I got it

#

everyone has to pretarget

#

I pretarget the protected tokens, sorc pretargets all intended targets

#

then places the template

kind cape
#

That does not sound correct πŸ˜“

unborn cosmos
#

ok, did I succeed by accident? suspicious

#

so many nuances

vast bane
#

the player pretargets and then targets with the template to trigger

#

you sit back and watch the automation work

#

you can target tokens by holding the T key with your mouse hovering over them. then drop the template. You can hold shift to pretarget more than one

unborn cosmos
#

aha got it

#

thanks, this stuff is so cool

#

but also it's a lot πŸ˜†

#

while I'm here on a roll, are there any neat flags for battle master maneuvers I should know about?

vast bane
#

if you are on v10....I dunno if hes made it v10 compatible yet

#

I doubt it, it shows white in compatibility checker

unborn cosmos
#

that's unfortunate

#

yeah I'm on V10

#

maybe compatability will arrive before I start the campaign

#

copium

vast bane
#

You could install a v9 build, get the macros, and try and see if folks in the gearhead discord, or folks here could help you make them v10 compatible

#

His macros are really voluminous so they are not a walk in the park to break down and edit lol

unborn cosmos
#

makes sense, they do a bit of work

#

I will watch that module, it looks like the creator is working on V10 compatability. says so on the github page at least

#

will probably take a hot minute

vast bane
#

thats months old though

unborn cosmos
#

I want to believe

spring dove
#

Not really user error, but the problem wasn't with Simple Calendar. I started and ended an effect over and over with the character sheet open, I didn't just stare at it in the effects panel. This seems more a problem with Core than anything, because if you're in combat rounds the effect does update with each round, 6 seconds at a time, without having to close the sheet and open it again. It may be helpful to put this in your readme or somewhere else in the documentation, but I don't think there's anything you can change in your module to remedy this.

unborn cosmos
# vast bane

For posterity, do you mind explaining how the sculpt spell flag works?

vast bane
#

its identical to careful I believe

unborn cosmos
#

not too bad then

kind cape
#

Spell Sculpting: flags.midi-qol.sculptSpell and flags.midi-qol.carefulSpell

If a spell caster with flags.midi-qol.sculptSpell set to 1, casts an area of effect (template or ranged) Evocation spell, any tokens targeted before casting the spell will always save against the spell and they take no damage from spells that would normally do 1/2 damage on a save. So if casting a fireball into an area with allies, target the allies before casting the spell and they will take no damage.

If a spell caster with flags.midi-qol.carefulSpell set to 1, casts an area of effect (template or ranged) Evocation spell, any tokens targeted before casting the spell will always save against the spell and damage as if they had saved (no matter what they roll).

unborn cosmos
#

cheers

#

is there a list of all flag descriptions like that?

unborn cosmos
#

nice

#

very good

vast bane
#

the link I just shared is the readme, use ctrl F for flags

unborn cosmos
#

who would have ever thunk to read a file called readme

#

not me

vast bane
#

specific flags, but also you can get alot of info from using deductive logic while looking at the compendiums of premade items

#

Make sure if you are on v9, you have more automated spells and feats, midi srd, and also in midiqol itself he has a midi sample items compendium. All 3 of these modules have a ton of premade items in compendiums that you can totally look at and plagerize or just use as is.

unborn cosmos
#

V10 struggles

vast bane
#

in v10 you still get midi sample items fwiw

#

you can probably carry over all of midi srd and the other modules compendiums if you copied them probably

unborn cosmos
#

yeah I learned about them today scrolling through this chat thread trying to gleam if anyone had answered the stuff I was wondering before

vast bane
#

if they use macros, you'll need to make them v10 ready by tweaking some stuff here and there

kind cape
#

A lot of MIDI-SRD stuff use macros FYI

vast bane
#

yeah, someones gonna have to bite that bullet...

spice kraken
#

I know it's a dead modules but I'm sad that Sadness Chan doesn't work with midi

vast bane
#

cause its not like we can post those in macro polo

pallid shard
#

I noticed my spell templates are not showing the distance while placing them, Is there a setting I am missing somewhere?

violet meadow
#

v9 or v10 Foundry?

#

Doesn't sound MidiQOL specific issue. They are shown fine for me in both versions

pallid shard
#

v9

#

Wasn't sure where to ask

#

Just a simple one like fireball, the current template distance is always showing 0 regardless of where I move it to

violet meadow
#

I would take a look at whatever handles templates for you. Walled Templates, DF templates enhancements etc 🀷

sudden crane
vagrant wharf
#

will the midi qol items like emboldening bond be updated to work in v10?

#

like is there some kind of supplemental module you need?

long fiber
#

I'm running 5e in version 9 of foundry. I'm looking for a way to force a token to automatically make a saving throw after being hit with a critical hit and adding a custom condition on a failed save.

Note: I do use MidiQoL and DAE.

kind cape
#

Is it every token or just a specific one?

Is it every hit or just from a specific creature?

celest bluff
#

But yes as mentioned all or one?

kind cape
#

Only if its every hit, if its from a specific creature it can be done with onUse

celest bluff
#

World script then

long fiber
celest bluff
#

Look at Kekillas module for it. You're basically writing a hook macro on damage roll complete in midi and you'll need to filter the hell out of it. So it will only run during that specific event that a nat 20 is rolled.

#

You can use socketlib to force the saving throw.. Or if you want to.. You could make an actor with all sorts of features and execute those on the target

kind cape
#

I might have some code for the hook + check if crit part

#

And the saving throw can easily be done with the above actor suggestion

celest bluff
#

I have it all written out in parts but I am at work

kind cape
#

I'm in a LoL game πŸ˜‚

#

@long fiber

Hooks.on("midi-qol.RollComplete", function (workflow) {
    if(!workflow.isCritical) return;

    let specialCritItem = game.actors.getName("Special crit actor").items.getName("Special crit");
    MidiQOL.completeItemRoll(specialCritItem);
});

This is the simple version. Requires an actor named the first name (you can change it if you want), with an item named the second.

So you put this in a macro, then make it active on load with https://foundryvtt.com/packages/world-scripter

#

Actually, forgot to test something, might need players to have observe on the actor

long fiber
#

Thank you!

scarlet gale
#

If I had a question about a macro that uses midi-qol stuff, should I ask here or in #macro-polo ?

kind cape
#

Okay, just tested, the players need to have "limited" on the actor holding the crit item. And I also just updated the script, small fix @long fiber

scarlet gale
#

So, I'm continuing on my worldscript to automate handling features that give actors advantage on saves for specific conditions.

#

Is there a less jank way to do this?

kind cape
#

That was the one with advantage against spells that apply poison right?

scarlet gale
#

Yea

#

I pretty much went with checking if the effect on the rolled item item is using macro.ce or statuseffect.

#

Then giving the actor an effect that gives them advantage for a single save.

#

It works

#

But I feel like I'm using the workflow totally wrong

#

(I'm not so great at javascript)

kind cape
#

Honestly cleaner code than most macros πŸ˜‚

scarlet gale
#

preCheckSaves wasn't applying the condition before the roll

kind cape
#

Well first of all instead of doing a manual cleanup afterwards I think you can just set the effects to "expire on hit" πŸ€” Not quite sure when in the ordering its triggered, but I think it can work

scarlet gale
#

I did that

#

but

#

It wasn't working for stuff that has an attack roll and a save

kind cape
#

ahh

scarlet gale
#

since the save is never made if an actor doesn't get hit

#

Originally I just wanted to edit the workflow

#

But I couldn't figure out what to change to give an actor advantage in the workflow

kind cape
#

Well I can't see any obvious issue with this, so I'm trying not to go full "PR review" mode on it πŸ˜‚

scarlet gale
#

I wouldn't mind honestly, seeing as it's a hook

kind cape
#

And yeah, doing it through the workflow would be the nicest, but I am not entirely sure how the flow normally does it

scarlet gale
#

I should have it run as cleanly as I can

kind cape
#

Gonna check something

#

Hmm, I feel like it should be as simple as adding the token to the "advantageSaves" set on the workflow, but I am unsure of the timing πŸ€”

scarlet gale
#

Funny thing

#

if you do that

#

it just changes the results to show "(advantage)" in chat

#

but doesn't actually give them advantage

kind cape
#

πŸ˜‚

scarlet gale
#

At least that's what it was doing for me when I was doing this on Hooks.callAll("midi-qol.preCheckSaves", workflow)

kind cape
#

Hmm, okay, so the logic in MIDI for advantage is a bit convoluted, but I might have figured an ugly way to apply advantage through it πŸ€”

vagrant wharf
#

guess not then

kind cape
#

Testing it right now

scarlet gale
#

coolio

kind cape
#

Nope, didn't work πŸ˜‚ It sets the "advantage" flag, but it doesn't actually roll with it when I roll through MTB

#

Oh wait, I might have misunderstood it, let me try a different way

#

Haha! It works! Its jank, but it works!

#
    let [target] = workflow.targets;
    target.actor.data.flags["midi-qol"].advantage = {all:true};
scarlet gale
#

Can't be less jank then what I'm doing

#

oh

kind cape
#

I don't know why MIDI has those flags, but since we are able to do this right before the save hook is called I don't even bother setting them persistently πŸ˜‚

scarlet gale
#

That shouldn't cause any weird desync right?

#

It's just setting it in workflow

kind cape
#

Don't believe so

#

Since workflows are not actually propagate to other clients in the first place

scarlet gale
#

but not actually setting it on the actor?

kind cape
#

They are entirely local to the player that triggered them

scarlet gale
#

would I have to unset that after the save?

#

or should it not matter

kind cape
#

Honestly not entirely sure

sudden crane
#

From my experience, it is cleared on the next update of the document, in this case actor

#

So it will stay until something updates the actor

scarlet gale
#

Would it be better to set flags.midi-qol.advantage.ability.save.all to true

kind cape
#

Hold up, refreshed my browser to test persistence and now it doesn't work πŸ€”

scarlet gale
#

I wish I understood the workflow thing better

violet meadow
#

You could give advantage with an AE to the next save

kind cape
#

Thats his current solution πŸ˜›

scarlet gale
#

It works

#

But

#

It could be better

vagrant wharf
#

does midi have his own discord?

scarlet gale
#

Β―_(ツ)_/Β―

#

Not as far as I can tell

#

tposney is in here tho

vagrant wharf
#

well rip

violet meadow
# scarlet gale But

Or try this in the hook when you need to have advantage: ```js
foundry.utils.setProperty(this, 'advantage', true)

#

Does it give what you need?

scarlet gale
#

Would that just blindly give everything I'm doing advantage?

#

Because this is in the middle of workflow

violet meadow
#

You need to filter when you want to give that

scarlet gale
#

I wouldn't want to accidently give the attack roll advantage

violet meadow
#

Haven't read the whole conversation

scarlet gale
#

I posted my current macro a little bit up

#

Trying to figure out how to give a specific actor in a midi-qol workflow advantage on the save it's about to do

violet meadow
#

Yeah I cannot open that now properly on the phone

scarlet gale
#

too long to paste normally 😦

#

long story short, is I can't figure out what property of the workflow needs to be changed

#

to do what I want

#

So the current solution is to just filter the workflow for information then add an effect that gives a flag that gives advantage on the save

#

then clear it after the roll is done

violet meadow
#

Ok change the DFreds application with that snippet above and try to see what happens

#

You could also give advantage with the effect with a duration of 1 save which would not need cleaning up after too

scarlet gale
#

I am doing that

#

but

#

if the feature is an attack that also does a save

#

and the attack misses

#

the effect stays

#

because the actor never did the save

#

so I just manually cleaned it up after

#

and I'm working too early in the workflow to know if the attack is going to hit or not

#

if I try to add the effect later in the workflow, it doesn't get taken into account

#

😒

grim bane
#

Hi all. Is there a way to reduce a specific attribute of a hit target? I tried dae, but this re-rolls the previous effects with each new reduction. Any ideas you guys might have?

scarlet gale
#
const {hitTargetUuids: [targetUuid], hitTargets: [{actor}]} = args[0];
const damageTotal = args[0].damageList[0].appliedDamage;
const label = "Draining Kiss";
let effect = actor.effects.find(eff => eff.data.label === label);

if( !effect ) {
  await game.dfreds.effectInterface.addEffect({ effectName: label, uuid: targetUuid });
  effect = actor.effects.find(eff => eff.data.label === label);
}
if ( damageTotal > 0 ) {
  const changes = foundry.utils.duplicate(effect.data.changes);
  changes[0].value -= damageTotal;
  await effect.update({changes});
}```
#

You'll need to adjust it to fit your needs

#

But essentially you apply an effect then edit it afterwards

#

This is done in an itemmacro

#

for whatever feature you're using

grim bane
#

Oh, great! Thank you very much!

scarlet gale
#

You'll need to make a convenient effect for that macro btw

#

in this example I'm having the effect apply data.attributes.hp.tempmax to 0

#

then letting the macro edit it after it's been applied

#

What is this for?

#

Because you might just be able to put the reduction in [[ and ]] in the effect.

#

That'll stop it from re-rolling the value every time you look at the sheet

#

My macro works well if it's for something like the vampire bite or Draining kiss feature

#

since you can get the value from the damage roll

grim bane
#

I'm trying to handle the Charisma drain of the Maurezhi's Claws. The hint concerning the brackets is great, going to try this.

scarlet gale
#

yea

#

in that case

#

just set the value to [[1d4]]

celest bluff
kind cape
#

That assumes that the item is present on the attacker/target, I assumed that it was not

celest bluff
#

Or even just provide the uuid in the macro

kind cape
#

And completeItemRoll gets unhappy if you try to pass it an unowned item unfortunately

celest bluff
#

Yeah just make sure it's on an actor

kind cape
#

Should be mentioned that the above macro does work, it just has the requirements of a placeholder actor πŸ˜›

lucid barn
#

Thanks, I'll check

#

Fixed! Thx 4all!

vast bane
#

If you don't fast forward, this is how I handled those kinds of things:

#

Neat thing is it can work for a ton of other niche things like stone cunning:

scarlet gale
#

That's neat

#

Cool that it lets you add text to the pop-up.

vast bane
#

its red because my player color is red, the players all have theirs set to whatever they want

scarlet gale
#

My players tend to forget some of their more obscure stuff, so I try to automate as much as I can.

vast bane
#

I purposely wanted to preserve the popouts and not fast forward when we moved to foundry cause of that very issue, I wanted to train my players to live with the popouts so that I could remind them of things easier this way.

#

plus adv reminder is a lot easier to make than a macro as someone who goes cross eyed just trying to change the channel on my smart tv.

sweet wave
#

Hey, I'm just starting to learn how to use Midi QOL. I was wondering if someone could explain to me what ItemMacro means.

vast bane
#

Its a macro that is stored in the items data behind the scenes, if you have the module it puts a button at the top of the items bar that lets you view that data:

#

So for your specific issue, you copied all the front facing aspects of Hunter's mark but because you didn't have Item macro, you couldn't see the data behind the scenes:

#

I don't know why they don't just make item macro required, I guess its technically optional but it sure as heck is used ALOT.

#

an end point user can still use hunters mark just fine, cause midi references the stored data behind the scenes regardless of whether item macro is installed

#

They do this cause it allows folks like Kandashi and Tposney and others to store everything in 1 item, cause normally without item macro, the macro would be a seperate entity and because foundry splits items away from macros in compendiums there would be confusing cross referencing and setup for premade items.

#

Also...someone should double check v10 and see if hunters mark actually does have an item macro for them cause I'm basing all this on the v9 hunters mark

#

his item had no on use macro set

#

and claimed it was the midi sample item

#

Could it be that the v10 midi sample items strip the on use macro if Item Macro is not installed or is v10 just doing things differently?

#

This is his image of v10 hunter's mark, there is no on use:

#

Also v10 has the checkbox for activation true set, mine doesn't

#

I guess the ae on the item is whats firing the automation

#

not an item macro after all

celest bluff
sweet wave
#

Thanks @vast bane I'll install item macro on VT and check what you mentioned

vast bane
#

the more I look at the v10 hunters mark the more I think it has an error, does it actually work?

sweet wave
#

It does actually work

vast bane
#

hunters mark seems to run a built in macro not item macro in v10, but one of the ae's is set to transfer on equip, that seems wrong

#

alot of tposney's are bulit into midi and you don't get to actually see the nuts and bolt of how he pulled it off I believe, hunters mark is apparently now one of them

#

I don't see any reason why your duplicate should not work

#

when you made a copy of it, was it already on the ranger?

celest bluff
#

doesn't look wrong at all

vast bane
#

editing and making items with active effects on an actor is technically functional with midi+dae but its not adviseable for new people cause of weird things

#

you should make the copy in the item side bar then move it to the actor after

celest bluff
#

it's taking advantage of the dae's placement features

sweet wave
vast bane
#

right, thats what I mean

#

did you create it on the actor or in the side bar?

#

try moving it to the side bar, and then double checking that there are no weird phantom effects on the rangers effect tab

#

also remove any duplicate hunters marks on the actor

sweet wave
#

I created it in the side bar and then dragged it to the actor.

vast bane
#

then once the actor looks clean, drag the item back from the side bar onto them

sweet wave
#

Here's an image of the example spell at work.

vast bane
#

didn't you say its not working?

#

lol now I'm worried I misread you all the way at the beginning!

#

what exactly was wrong with it again?

sweet wave
#

The sample does work, but the one I created doesn't work.

#

This is the result of the one I created

#

And what you mentioned regarding the ItemMacro stuff not being visible is what I believe is the problem

vast bane
#

I don't think the v10 one has an item macro but you could try

celest bluff
#

it does

#

it only applies on the caster

vast bane
#

how does it call it, look at his item, it has no on use field, is that a flaw with v10?

celest bluff
#

it's going through damage bonus

vast bane
#

oh so is the ae on the spell putting hunter's mark as an actor on use?

celest bluff
#

as mentioned it's using DAE's new application method

vast bane
#

ok so v10 shenanigans gotcha

celest bluff
#

nah it's in v9

sweet wave
#

So it was the ItemMacro content that was missing. I wasn't aware of the module so I didn't what I was looking for. I just added the item macro to the one I created and it works just fine. now

vast bane
#

yeah theres a few other modules that aren't required but if you are doing automation macros, you damn better get em lol

#

Warpgate, sequencer, Item macro...what else guys?

#

Effect macro is pretty dope for some automation also

#

obviously only install these if you think you will need them, but everytime you yoink one of those automated items to use, they are likely eventually going to need those like hunters mark needd item macro if you wanted to tweak it

sweet wave
#

Awesome, thanks for the help and the advice!

nova lark
#

Anyone know how exactly i would flag an effect for duergar resilience? advantage on saving throws against charm and paralyzed condition

vast bane
#

above someone shared a long complex macro on how to do saves for specific things, but situational advantage like this is hard to code, I use Advantage reminder and I disable fast forward at my table to pull it off:

nova lark
#

Ahhh that may work. If i disable fast forward most of midi should still work properly right?

vast bane
#

yes its important to understand that fast forward=/= auto roll

#

fast forward just skips the two pop out windows like the one above

nova lark
#

I do have advantage reminder, so now i want to learn how to set that blurb up

vast bane
#

auto roll auto clicks the buttons in chat

nova lark
#

Awesome

#

Ty

vast bane
#

Stone cunning:

#

Rage has 2 at the bottom

#

I think midi's rage now does divine fury automatically

#

if the barb is a zealot

nova lark
#

Oooh intersting

#

This guys character im helping with is going duergar battlerager

#

so trying to make his stone cunning and so many others work is just mildly annoying

vast bane
#

My dwarven serker got steered away from battlerager, seemed like a poorly built class didn't want them to get let down by it.

nova lark
#

He really wants to try it

#

hes a huge fan of the whole drizzt universe, and ill let him spice it up quite a bit

vast bane
#

Yeah I'd enhance it some, it seems like a reall weak sub

nova lark
#

Seeems honestly like most of the barb subclasses

short aurora
#

Unsure if it's a midi DAE combo or just midi, is it possible to refer to stackCount in an active effect or do I need to make a macro? Got an effect that halves your walking speed on first stack, makes it 0 on second

spice kraken
#

Yeah you can use stack count but math wise how are you gonna do that?

short aurora
#

A good question I don't really have an answer for

vast bane
#

just make it overwrite the first

spice kraken
#

Make your life easy and just make the effect -15 each stack

vast bane
#

is this still the project to automate exhaustion?

short aurora
vast bane
#

remove the previous on application of the second which zeros it out

short aurora
#

Maybe I can math speed * (0.5 x stackCount) actually, wonder if pemdas is enough there

vast bane
#

asterisks are very unfriendly to dae's effect window

short aurora
#

that's also if the speed value would be a reduction one, I realize, which is not the case lol, back to pondering

vast bane
#

Are you making wound tables?

#

if so, just use MMM!

#

One day I will get a bunch of hardcore dnd'ers who wanna play with it fully on

short aurora
#

It is essentially a wound table yeah, but already made with its' own system, wanting to implement it with some custom sheet shenanigans and was looking at the effects

vast bane
#

Ripper made MMM and it has some automation, pretty dope crit/fail system

#

using it in full glorious effect is basically playing dnd on hard mode

molten token
#

anyone know why the AC hits dettection is weird all the suddenly?

#

before it said hits 11/10 (10 being the ac)

#

now it just seems random/

#

14 being the attack, wth is the 4

vast bane
#

the fraction is roll/difference of roll vs ac

#

so the ac is 10, the roll was 14, so it will be 14/4

#

10/0 means you met the ac

#

if you don't want hit spoiling on, its a setting in midi

#

the first picture was not 11/10, its 11/1, cause the ac is 10

molten token
#

ah well before it actually said the ac

#

so not sure

#

i want to see the actuall ac :b

#

i dont wanna do math

vast bane
#

You don't have to do math

molten token
#

14-4. what is that

vast bane
#

its telling you you hit

molten token
#

yeah but whats the ac

vast bane
#

you don't have to do anything, thats just spoiling the ac for the players is all

#

look on the sheet or use an overlay?

molten token
#

i dont wanna look at the sheet every time

vast bane
#

tokenmold lets you place an overlay over tokens but it hides the art a lil too much for my tastes

#

my server is rebooting so I can't look up if midi just has a flat ac reveal setting

molten token
#

yeah i do wanna see the ac, but i dont wanna do math to see it lol

#

before it was very clear what the ac was

#

now i have to do math

vast bane
#

maybe someone will chime in with an answer for you but I personally use that setting you have on right now, I just can't recall by memory if there were other options

#

it looks like you are automating hit calc and damage application so does the ac really matter?

#

the games doing it all for you

#

I know the players will see a different card that also displays a fraction like display of the difference too

#

he purposely made the two different cards and the DM can't see the other unless they login as a player

opaque current
#

Set it like this, like a normal person

#

IDC what the AC is, just if it hits!

molten token
#

joined as player, this is what they see

#

7 divided by 3? now i i have to do math to figure out the ac?

opaque current
#

It's not maths dude

violet meadow
#

not divided

molten token
#

/ means divided by

violet meadow
#

you rolled a 7 total

#

the ac was 10

#

you missed by 3

opaque current
#

Not in this case it doesnt

#

Go to this in the settings and turn that shit off

molten token
#

you guys missunderstyand me, i want to see how much it misses by

#

before it said the ac though

#

and its wrong, becuse this dragon hav emore then 10 ac

opaque current
#

I can't see an option to set it that way

vast bane
#

I think hes crossing the streams πŸ˜‰

#

cause the others do....

unborn cosmos
#

What a confusing discussion

violet meadow
molten token
#

Before, it showed the ac, and now it doesnt, what settings did i have before x3

violet meadow
#

Did you update?

molten token
#

like before @vast bane convinced me to mess with CE x3

#

1 hour ago

opaque current
#

On the latest version I only see options for showing saving throw DC, not AC

vast bane
#

I don't think midi ever showed ac did it?

molten token
#

i figured one of it out, needed to have gm aswell online otherwise it woulnt calculate the true ac

kind cape
#

Since the players do not have access to the sheet their client cannot know the AC without calling through a GM client, so that makes sense

vast bane
#

he wanted a way to toggle lights, I tried to help him install dfreds, he wanted a module designed just for torch to do other things and pinged the author, I had nothing to do with this change

molten token
#

dfreds is all messed right now aswell x3

#

lesson learned, dont mess with ce

#

gotta restore evrything back to how it was

vast bane
#

I just can't right now, for the record, the dudes previous images cclearly show he was loggd in as a GM then too lol and wtf is true ac

#

bro just uninstall dfreds CE it didn't break your game

molten token
#

i had dfreds and CE before aswell

vast bane
#

lol all I did was tell you to install it πŸ˜•

violet meadow
#

I would expect a NaN or something if the client couldn't get the target's AC not an AC of 0

vast bane
violet meadow
#

But I don't think it matters anyway

vast bane
#

you can clearly see it calculating while he was on the player

violet meadow
#

A 12 and a 5 are both hits at the same target

vast bane
#

oh yeah, I see it now and the 12/12 is weird

#

doesn't Better rolls display vs ac?

violet meadow
#

Never used it so 🀷

#

Maybe MidiQOL did in earlier versions too

vast bane
#

I thought we could see values, just not modify them without gm or midi

#

oh actually yeah, how would they select the enemy

violet meadow
#

T for target

vast bane
#

but only midi references targets right?

kind cape
#

I'm pretty confident that they cannot access the data of actors they don't have permission for, but I'm unsure if the same holds true for the synthetic actor created for unlinked tokens

violet meadow
#

I cannot reproduce that. All attacks hit/miss normally when a player without a GM present is attacking linked or unlinked tokens.
πŸ€”

vast bane
#

well hes got about 152 potential culprits

gilded yacht
vast bane
#

his battlemaster set is amazing

gilded yacht
gilded yacht
dark canopy
kind cape
gilded yacht
# sudden crane I also notice a fail safe check that should probably be moved up one line: https...

Good point - will do that. The itemHooks version is very much a work in progress (definitely author/foolhardy user testing only) - I really don't like the way it works at present so it will likely get rewritten - it's really just a test to see if I can just use the dnd5e hooks, rather than overriding methods. If it will work ok then it may/might/should increase compatibility with other roller modules.

sudden crane
kind cape
#

Speaking of development/hook features: Would it be possible to have something added to the workflow that would easily allow adding a "source" of advantage, which if set in/before preCheckSave would be accounted for in the advantage calculation?

sudden crane
# kind cape Huh, interesting πŸ€”

A player that is tech savvy, could just open the browser’s console and access data through it. Like getting the info on a monster or it’s location even if hidden/invisible…

neon pike
#

Is there an effect for only adding AC to ranged attacks? (DND 5e - V10) - Midi / Dfred

violet meadow
#

So you will need the target to have better AC when attacked with a ranged weapon?

kind cape
#

Use an AE to grant a negative bonus to rwak

torpid kestrel
#

Probably a stupid question here, but I've been looking and have gotten frustrated. I see a variety of Item Macros such as "MidiMacros.fireShield(args)" on the midiqol spells etc, but I can't seem to find those macros anywhere to see how they work. Where do I locate them?

violet meadow
gilded yacht
vast bane
#

if you have advantage reminder installed you actually see midi trying to utilize AR

vast bane
#

Thats midi doing something in AR

#

AR's not adding that I don't think

kind cape
vast bane
#

ok gotcha my b

violet meadow
#

But if you setProperty advantage in the workflow when the specific conditions are met, you should be good, no?

kind cape
#

So something like the advantage against poison saves that was talked about yesterday, being able to say workflow.addAdvantage("Poison resistance") in a pre-save hook and have it dealt with would be nice

gilded yacht
kind cape
#

Currently it's applying an AE with advantage.all on it, which then needs to be cleaned up

gilded yacht
# kind cape So something like the advantage against poison saves that was talked about yeste...

The particular example you have is "complicated" since it applies to the saving throw of one token out of all the targets and that's "tricky". Internally midi would have to do the same sort of checks as listed in the thread above, but could probably do it faster by not having to call a macro. I have been holding back on doing anything here as I was hoping that dnd5e might tag saving throw rolls with a "type" that would make this easier to handle. It might make sense to do this in midi-qol and then pick those up in the code that rolls the saving throw.

kind cape
gilded yacht
# scarlet gale

I can't think of a less janky way - since saves against conditions are not really defined in the dnd5e system. I think it might makes sense for midi to tag the saving throw with the same information you are fetching, which in turn could make a flags.midi-qol.abilities.save.conditionName possible.

kind cape
#

So basically just having a list of advantage sources (which are just labels + target!) that MIDI uses when checking it

gilded yacht
violet meadow
#

utils.js:3075 there is a console.error("Roll data is ", duplicate(rollData)); forgotten MidiQOL v10.0.12

kind cape
#

But.. I think we might be talking past each other πŸ˜…

The advantage against conditions was just an example, it could also be advantage against saves from undead creatures, or similar. It was more if a request for a general item on the workflow object that we can put (arbitrary) sources of advantage in and that MIDI will respect πŸ˜…

violet meadow
#

The same example above could include the workflow type of creature too, no?

#

Now I am confused πŸ˜…

kind cape
#

I want to be able to do this from a macro πŸ™ƒπŸ˜‚ Another example, I want to give advantage against saves if the target creature is inside of an aura and the owner of that aura uses their reaction! πŸ˜›

violet meadow
#

when A-A is ready for v10

kind cape
#

I just want it in my hooks πŸ˜‚ Also forcing the owner to use their reaction is not possible with AA

gilded yacht
# kind cape But.. I think we might be talking past each other πŸ˜… The advantage against cond...

However, I agree that there are cases where the condition is sufficiently complicated that a simple logic expression would not cut it. I'm happy to implement something to support it. Remembering that save advantage needs to be evaluated per target, the logic is complicated. Save advantage is (currently) evaluated at the point that the saving throw is rolled by the target (to support modules like LMRTFY/Monks token bar which don't have access to midi's workflow data).

What you want here is a check (at the right point in the workflow) that would set a workflow (or per target) setting to say these saves are done at advantage and have that reflected in the same roll, whichever module is doing the roll.

unreal vector
#

Does anyone have a working hex?

violet meadow
#

v9?

unreal vector
#

mhm

violet meadow
#

giv me a sec

unreal vector
#

Thank you so much its always giving me trouble!

kind cape
gilded yacht
violet meadow
gilded yacht
#

And if there are competing sources of advantage, i.e. you want to grant advantage but another condition causes disadvantage, do they cancel out (as per RAW) or is this an override.

kind cape
#

Per-token would be preferred, since that can also cover the whole workflow, and there are some AOE spells where it could be relevant

#

And for me it would be per RAW at least

#

Just like setting an AE with advantage.all is doing right now πŸ€”

gilded yacht
# kind cape Just like setting an AE with advantage.all is doing right now πŸ€”

Ah, if only it were so easy, the saving thow data needs to be sent to the client doing the saving throw (LMRTFY/Monks), but the only data shared with between the clients is the token/actor data that has been committed to the database - so actually getting the information that the roll should be done with advantage is either a db transaction and a second to remove it or specifically added my midi to the roll request to the module. In any event I will have a play.

gilded yacht
vagrant wharf
#

it doesn't roll or execute

#

bizarrely enough I was able to get hunters mark working by creating a brand new spell and then manually copying over the same after effects

gilded yacht
vagrant wharf
#

yes

gilded yacht
#

Bother - I'll have a look. Hunter's Mark should definitely be working - used it in my game on the weekend. So you are having problems with Hunter's Mark and Emboldening Bond?

#

It's 1 am here, so will have to wait for tomorrow.

#

What version numbers where they showing in the sample items compendium?

vagrant wharf
#

I'm having a problem with every single one of them

#

none of them fire

#

anything involving an item macro auto fails

gilded yacht
#

That looks fine. Anything in the console?

vagrant wharf
#

?

gilded yacht
#

Hit F12 and look for errors (in red) relating to midi-qol

violet meadow
#

Item Macros settings. Do you happen to have options 2 and 3 selected?

gilded yacht
vagrant wharf
#

idk what that means what options

gilded yacht
#

Config settings for the module ItemMacros - check if character sheet hook is enabled - it must be disabled.

violet meadow
vagrant wharf
#

I haven't touched ItemMacros

#

I dont know what any of those settings mean beyond player access

violet meadow
#

Thats the issue

gilded yacht
#

When set ItemMacro takes over the "click" on the character sheet and the macros won't work.

vast bane
#

@violet meadow pretty sure this is one of yours, this is pack tactics, is there a way to make this do this:
Once per turn, the hobgoblin can deal an extra 2d6 damage to a creature it hits with a weapon attack if that creature is within 5 feet of an ally of the hobgoblin that isn't incapacitated.

if (args[0].macroPass === "preAttackRoll") {
    if(!token || args[0].targets.length < 1) return;
    const target = args[0].targets[0].object;
    const creatures = MidiQOL.findNearby(CONST.TOKEN_DISPOSITIONS.HOSTILE,target,5);
    const validCreatures = arrayRemove(creatures, token);
    const workflow = await MidiQOL.Workflow.getWorkflow(args[0].uuid);
    if(validCreatures.length === 0 || validCreatures.filter(t=>t.actor.effects.find(i=>i.data.label === "Incapacitated")).length === validCreatures.length) return;
    else setProperty(workflow, 'advantage', true);
}

function arrayRemove(arr, value) {
    return arr.filter(function(ele){
        return ele != value;
    });
}
vagrant wharf
#

ok now it seems to be working

short aurora
#

Isn't that just Sneak Attack re-flavored

vagrant wharf
#

thanks

vast bane
#

before you ponder, is it going to be a hassle? Cause I got an advantage reminder ready to go instead if you think it'd be too much work

kind cape
vast bane
#

wait will disposition stuff work for me as the DM?

violet meadow
short aurora
vast bane
#

but I'm hostile, does it work that way in reverse?

#

I'm team red

#

also doesn't sneak use rogue classes?

violet meadow
kind cape
#

It compares token dispositions, not player πŸ˜›

violet meadow
#

Also why do I await the getWorkflow? πŸ€”

vast bane
#

it might not be your macro, I stole it while quietly lurking

violet meadow
#

No it rings a bell

gilded yacht
violet meadow
#

yeah its mine it has the arrayRemove πŸ˜„

vast bane
#

I'm trying to automate hobgoblins

violet meadow
#

Yeah its the pack tactics light. After that one I got all the relevant conditions, so as not to trigger for Paralysed etc too

gilded yacht
vast bane
#

lol

#

I'm hosting dotmm, I figure since they will see 1000 of them in the campaign that ability should be automatic

kind cape
#

If nobody else does I can whip something up later, but won't be at a PC for~2 hours still

violet meadow
#

OK so instead of advantage make it to add a DFreds with the appropriate bonus.
Then set a flag that they used the condition for the round (or another AE checking) and make it once per round

#

Ez pz

#

I B E L I E V E I N U

vast bane
#

Hey, I did some amazing shit with a warpgate macro the other day and nobody was around to help or see it

violet meadow
#

//function needed?

vast bane
#

I just copied you

#

lol

#

We don't talk about that

violet meadow
#

OK so allied to the hobgoblins are other hobgoblins only, or all hostile to the PCs creatures

vast bane
violet meadow
#

Or do you want to use Tagger to indicate who gets to "help"

vast bane
#

how come midi puts a flag in console for advantage constantly?

violet meadow
#

The check for advantage?

vast bane
violet meadow
#

It helps me when checking for stuff, so I am not complaining

vast bane
#

suppose it could also be AR

violet meadow
#

nope

#

itemhandling:js is MidiQOL alright. Click on that on the right to check the code

#

Many modules display stuff in console like

#

And you can just take a look when you roll a Monks Tokenbar save or something! Oh my πŸ˜„

vast bane
#

I actually like that mtb roll

#

lets me peer in

violet meadow
#

Just from a Strength save 🀣

vast bane
#

So my working theory for what to do is to drop everything after the else and put the dfreds macro in after the else

violet meadow
#

Yeap

vast bane
#

and the dfreds ae is basically just a damagebonus for mwak/rwak

violet meadow
#

A bit more tricky to get the once per turn

vast bane
#

with an expiration of....1 attack

violet meadow
#

But then you will need some logic to permit only once per round

vast bane
#

ugh, not gonna lie, the once per turns is literally the main reason I use ar

violet meadow
#

or turn 😩

vast bane
#

yeah I think I'm gonna just use AR, I hate having macros manage that

#

Midi started doing that to zealot barb rages and I haven't been able to figure out how to stop divine fury through midi yet

violet meadow
#

I got you if you want but its v9 still

vast bane
#

no I wanna stop those cause I actually homebrew boons where they can buy them from Halaster and some of them allow divine fury and favored foe more per turn

#

so the automation screws things up

#

I just don't know where its coming from, its new cause It never fired like 1ish months ago and I haven't updated the barbarians rage

violet meadow
#

OK the easiest way to check is to create 2 DFreds CE.
One the damage bonus as discussed.

The second a once per turn AE. If the second AE is present, do not add the 1st DFreds

vast bane
#

nah I'm doing an AR lol

violet meadow
#

hasEffectApplied check from DFreds CE helps with that

vast bane
#

sorry to waste all yalls brain power on a misread of an ability

#

genuinely thought it was just like pack ticktacks

violet meadow
#

Which one do you mean? I am confused. Pack tactics main logic will work for the hobgoblin's thingy

#

Add the DFreds and you are golden

violet meadow
vast bane
#

hmmm maybe his checkmark got fubaredd at some point

#

no its in the midi sample items rage macro

#

something is doing divine fury and I sure as hell didn't set it

violet meadow
#

v10?

vast bane
#

v9, this is all his rage has:

#

its in the item macro somehow and I don't know how it updated, does midi update deployed items?

violet meadow
#

Whats the item macro then?

vast bane
#
//Midi-QOL, DAE and times-up is the way to go and this is a DamageBonusMacro.

const levels = args[0].rollData.classes?.barbarian?.levels ?? 0;
//console.log(args[0]);
if (!levels) return {};
if (!args[0].item) return {};
const ttoken = args[0].tokenId;
//console.log(ttoken);
const tactor = canvas.tokens.get(args[0].tokenId).actor;
const titem = tactor.items.get(args[0].item._id);
const rollMod = titem.abilityMod;
if (rollMod !== "str") return {};
const bonusRage = levels < 9 ? "2" : (levels < 16 ? "3" : "4");
const bonusDivine = Math.floor(levels/2);
const diceMult = args[0].isCritical ? 2: 1;

if (game.combat) {
  let combatTurnActor = game.combat.turn;
  let combatTime = game.combat.round;
  let CheckTokenId = game.combat.current.tokenId;
  //console.log(CheckTokenId);
  if (CheckTokenId === ttoken) {
    let lastTime = getProperty(tactor.data.flags, "world.divineFuryTime");
    if (combatTime === lastTime) {
      return {damageRoll: bonusRage, flavor: "Rage Damage"};
    }
    if (combatTime !== lastTime) {
        await tactor.setFlag('world', "divineFuryTime", combatTime)
        return {damageRoll: `(${1*diceMult}d6 + ${bonusDivine})[radiant] + ${bonusRage}`, flavor: "Enraged Divine Fury Damage"};
    }  
   } 
  if (CheckTokenId !== ttoken) {
      return {damageRoll: bonusRage, flavor: "Rage Damage"};
  }
}

if (!game.combat) {
    return {damageRoll: `(${1*diceMult}d6 + ${bonusDivine})[radiant] + ${bonusRage}`, flavor: "Enraged Divine Fury Damage"};
    //await unsetProperty(tactor.data.flags, "midi-qol.divineFuryTime");
    await tactor.unsetFlag('world','divineFuryTime');
}
#

I see divine fury in there

#

but I swear to god this only just started happening, hes used my advantage reminder FOREVER

violet meadow
#

hey that seems like mine πŸ€”

vast bane
#

hmm

#

there must have been something else in this I wanted then and never noticed divine fury

violet meadow
#

It even has a really nice unSetProperty in there πŸ˜„ πŸ˜„ 🀣

violet meadow
molten solar
#

getProperty(tactor.data.flags, "world.divineFuryTime")
shakes head
use getFlag!

dark canopy
#

(it may be serialized)

vast bane
#

I'm getting too sidetracked I only have 40 minutes left of computer time lol

#

so bottom line, if I wanted to fix this I can just go yoink tposney's again

violet meadow
#

If you dont care about Divine Fury yes!

vast bane
#

and that sounds bad, this macro is amazing, I just want to use AR instead for campaign reasons, his divine fury behaves diifferently very often

#

He gets to use his divine fury all the time if hes within strong Melairkyn ruins areas its a dotmm storyline thing that I'm connecting with him since he went dwarven zealot barb

#

so its too complex of a situational

violet meadow
vast bane
#

When you gonna get to PR's for midi srd 8)

violet meadow
vast bane
#

Yeah I'm honestly thinkin that way, but I gotta get this last prep sequence done to meet my goal for the day

molten solar
vast bane
#

is there no special durations for conditions like isParalyzed or isStunned?

unreal vector
violet meadow
vast bane
# violet meadow should there be ? πŸ˜…

Leadership (Recharges after a Short or Long Rest). For 1 minute, the hobgoblin can utter a special command or warning whenever a nonhostile creature that it can see within 30 feet of it makes an attack roll or a saving throw. The creature can add a d4 to its roll provided it can hear and understand the hobgoblin. A creature can benefit from only one Leadership die at a time. This effect ends if the hobgoblin is incapacitated.

#

My solution is active auras+advantage reminders

violet meadow
vast bane
#

its not concentrating fwiw

#

I wonder if I can make it concentrate...no I don't want him failing conc saves via midi nm

vast bane
#

I'm on v9!

molten solar
#

BOO!

violet meadow
#

magic

dark canopy
#

effective transferal with an AE was my approach

vast bane
#

I'm basically just cut and pasting my emboldening bond and flagging Active auras

molten solar
#

Oh right. Yeah. Core.

violet meadow
#

Active Aura and DAE that expires after 1 use and the Aura is getting triggered once per turn I think

#

Ah or it might need to be continuous 🀷

#

can't think now

vast bane
#

nah thats why AR is so easy I leverage my brain for the triggers:

violet meadow
#

human brain, so powerful when it's up for the task at hand

vast bane
#

now I just hope ar is compatible with active auras

#

specially the whole red vs blue team thing

#

whoa wait...whats this lol :

violet meadow
#

Should be. kaelad is dabbling in Active Auras for v10

violet meadow
vast bane
#

that sounds too good to be true

#

yeah but its the kind of 1 per turn that is not automatically the first one

#

the player can see the roll and choose to roll the d4 to boost

violet meadow
#

OK so then you need MidiQOL optional flags

vast bane
#

Nah 🧠

violet meadow
#

It will give you the choice of once per turn and if you use it, it won't pop up again till next available time

vast bane
#

I will put it in the calendar to double back to on another day but I got a hard out very soon and I want to have atleast 2 rooms prepped on this section

scarlet gale
scarlet gale
#

But that's not the end of the world, I could just setup stuff in a way knowing this.

sudden crane
scarlet gale
#

Yep, was just trying to figure that out

#

Someday I'll understand how "=>" works

sudden crane
#

Maybe Tim could add an exported utility function that would simplify the writing of the activation condition…

sudden crane
scarlet gale
#

I would have to double up on the map part right, to look through all the effect changes

sudden crane
#

You would have to trough the array of changes: ef.changes

scarlet gale
#

Yea

#

Not at PC right now to try it

#

But looks possible

sudden crane
#

Maybe using .find and you would have to declare an inner filter function (using =>)

#

But the condition could also be complicated depending on how the condition is applied, using dae statusEffect or macroCE or CUB…

#

That’s why I think a utility function would simplify all this, you pass an item and the β€œname” of a condition and it returns true if the item applies an effect with the specified condition

scarlet gale
#

Yea, but thankfully in my own setup I know I only use macro.ce

sudden crane
#

If you already have a world script setup, you could even export a utility function yourself and call it in activation condition…

scarlet gale
#

Ooh

kind cape
#

Just want to point out that conditions are recursive too πŸ˜‚ E.g. A applies B, which applies C that you are looking for πŸ˜›

sudden crane
#

No….

vast bane
#

He's right and I don't think foundry, or rather midi considers that

sudden crane
#

Doable with a mapping of one to many…

scarlet gale
#

99% of the time I'll be looking for poisoned lol

vast bane
#

but one doesn't exist, its implied

scarlet gale
#

But that is true

sudden crane
#

The you iterate through the list. This really screams for a utility function

vast bane
#

paralyzed is also incapacitated

#

so is petrified

violet meadow
#

Hmm there is a topic going on about flags on AEs that could be expanded for that I guess: <#dnd5e message>

kind cape
#

I mean, you can "easily" look up the contents of other effects, so its not impossible. BUT that assumes that people are sane in applying their sub effects. So since I'm just being cross I'm gonna add another case that this doesn't cover πŸ˜‰ Effect A has an Effect Macro, which on creation calls a macro to add Effect B that you are looking for πŸ˜‚

vast bane
#

unconscious has prone usually

scarlet gale
#

In reality tho we're just caring about explicit "you have advantage on set condition"

#

Doesn't matter what other conditions that may also apply

kind cape
#

But those other conditions might apply what you are looking for! πŸ˜‰

vast bane
#

yeah incapacitated is one of them

#

I already linked something that needed to reference that today

#

leadership on hobgoblin captain

scarlet gale
#

I just did that as a aura iirc

vast bane
#

Breaking concentration also in midi requires or should look for, incapacitated

kind cape
#

Btw you still wanted that macro for once-per-turn @vast bane? Or did you end up scrapping it?

scarlet gale
#

Worked well enough

vast bane
#

I can't work on session, gettin ready for bed her

scarlet gale
#

Having a world script export a function is still a nice idea

vast bane
#

I kinda do that stuff in the opening 2-3 days of the week anyway, too late now to work on stuff like that

wet pagoda
#

Question if someone is not busy: With the reaction Halo of Spores, necrotic damage to one creature you can see when it moves into a space within 10 feet of you or starts its turn there, if it fails a CON saving throw (DC 12).

#

For some reason it only auto triggers when an enemy attacks instead of when the enemy enters 10ft range. Any fix, maybe within the reaction details?

spice kraken
#

There's no reaction prompt for moving closer to a token. If you wanna handle it manually just change it to reaction manual instead of reaction. You might be able to do full automation with a macro (might need active auras though but I don't think that's v10 ready