#MidiQOL
1 messages Β· Page 11 of 1
how can I select a value from a targeted token in a onUse macro?
I'm gonna get to the bottom of that exploding issue right now!
You sure?
this seems like a ton of headache
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
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
can I use args outside of an item macro?
although, that macro should belong in macro polo
args is midi stuff, item macro is just a storage device midi hijacks for convenience
can I use midi args in a regular macro?
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
my bad, it works fine when I execute it form the item
how does target.actor work 0_o
no args[0].targets[0].actor.getRollData().details.cr work π
thought I could only use args with item macros
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
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
});```
do they have a target?
they do yeah
0.25 (1/4) but the Math.ceil should take care of that, no?
unless the issue is with the result value
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}})
}
yeah result is NaN lol
weird, it did work with the other way I was calling it, but it doesn't with rolldata
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?
yeah that's a good idea
but in that case....you realize all you are doing is running in a circle back to a normal saving throw lol?
@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)
I really hope this was not the problem the whole time:
something tells me worldscripter would have caught that
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 π₯Ή
yeah plus sounds were playing
I too very much remember it working, though maybe we were testing for success and not failure?
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 π
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
Everyone should have that sound file, but its in core and its not visible from the tile browser, since its a sound file π
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
Thats odd, but good to know that it finally works! π
wait, it did the yellow message you put in it
@scarlet stump get the macro again. I edited it
dang on my phone...
rebooting with a sound that plays lol
getting Cannot read properties of undefined (reading 'actor')
(on v9 if it's relevant)
could you have edited it to fix the fact that bugbears was source and you wante dtarget and that wound up making the error?
That should be an onUse ItemMacro on the shield thingy that you use, like how Uncanny Dodge is set up from MidiQOL sample items
ah my bad let me try it as an itemmacro
To test grab the Uncanny dodge from MidiSample items
oh yep, thats one of those nuances of item macro that zhell linked
Put that code snippet in the ItemMacro of it.
and add an onUse ItemMacro | After Active Effects on it
@kind cape sound is not playing, no error message, but I see your yellow message
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
why no sounddddddddddddddddddddd π
I deserve every ounce of this
This roll an additonal save but the DC is Null
Does that creature have a CR?
cause I haven't removed the save part from the thing I guess
it does have a 1/4 CR
This is why I think the built-in editor should be something like Monaco, so that we get syntax highlighting inside of Foundry, cause it makes some things dead obvious, like discord just showed π
It does, but it is not compatible with Effect Macro, it breaks the window pretty badly π¦
Monaco Macro Editor, a Module for Foundry Virtual Tabletop
I was going to make a patch for it, but then I forgot/got lazy
oh yep yeah, it messes with item macro too
In general it messes with macro windows that does not have a script/chat dropdown
I see this error in console foundry.js:2540 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split') [Detected 1 package: midi-qol]
OK I will need to revisit that when on my server. Typing on the phone without the console to check what's up is no good π
the hook works perfectly
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?
fixed in v10 already
I do, but should I have the monster attack the pc to get this to trigger?
yes
(and I will absolutely 100% shit on Monaco for this bug. It's idiotic.)
my bad, I was rolling it manually from the sheet
I'm not getting prompted, let me check the workflow
this part will be no good if you roll from the sheet args[0].workflowOptions.sourceActorUuid
these are my reaction workflow settings atm
the item
hope thats the right screenshot
Doesn't help me in V9.. And is it fixed in Effect Macro or in the editor?
Cause it should be fixed in Monaco, as it breaks both Item Macro and Effect Macro
was missing the "reaction Damaged" part...it's working now @violet meadow !
zhell did you see my stupidity above that triggered the conversation?
Hmm ItemMacro with monaco seems fine to me
I think I was thinking of advanced macros breakage with item macro
Effect macro yes v9 kaput
where you have to turn off the formatting helpers
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
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)
Nope, but I've seen it as well, annoyed the heck out of me
Huh.
yeah it came some time after 1.7.0
Well that's an easy fix. BRB making a PR.
now I'm getting prompted correctly, still not capturing the attacker's CR but at least the workflow runs its course π
can you ceil a fraction?
yeah, check in console math.ceil(0.12)
Math with a capital M
you might need the math.js module or something π€
still getting that Cannot read properties of undefined (reading 'split') whenever I run the reaction
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)
Send me the item over
sure
I still say use monks ;p
or requestor!
what is the actor you are pulling the CR from?
tried a few ones, a goblin, a custom created monster and a custom created npc
are they all unlinked actors?
the others have a CR > 1
just spit ballin is all
I think so, I've just dragged them on the canvas from the actor list
double right click them
see if it breaks only on one or the other type
find a unique linked npc and an unlinked npc
yeah they are unliked
trya linked npc
same
What version of Midi are you on?
The item you sent me works fine π€·
PR sent, lmao
1 line of code
Its 0.9.83 nowadays π
mmm let me update π€£
You might need to update ItemMacro too
should I switch to the 1.8.0 version for ItemMacro even if I am on v9?
update to the newest v9 fork branch
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
Item Macro's newest update works in both v8, v9, and v10. Because Badger lost his damn mind.
should work*
I had no idea he wrote item macro
so the good news is that the split error is gone. The bad news is that I'm not getting any "this has been broken" message even if the Save is failed
No message. Just the name change
aaah
I didnt write anything for that π
it's really broken now π€£
ok I'll change the effect when it breaks, thank you so much for the help!
Yeah it adds a broken each time
So you can make it use resources as Moto said and make it unavailable if its broken
You should probably update dae too btw
MidiQOL will respect the Item Uses for the reaction trigger iirc
yeah I will update everything...I tend to update only whenever I update Foundry and I've been on v9 for far too long
well dont' go nuts, only update when a breakage is happening but midi+dae are two that you should mirror updates on
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
(/s)
(hope its clear now :D)
I don't mean update v10, I just meant make sure you got midi+dae paired with their corresponding versions hehe
someone was mentioning Uncanny Dodge before...is there an existing macro for it, or is it handled automatically?
Import the item from the MidiQOL sample items compendium and use that. You should be good to go
why did I never realized there were all these premade effects Γ§_Γ§
π π₯³
you lose a bunch if you update to v10 π¦
well that's not happening for the foreseeable future, not until all the DF toolkit and token attacher get ported over
Token Attacher I think is v10 compat now
@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
this is what i got on v10
you wanna know how to seperate them
i think i used to be able to type 'true' or '1' and it worked but now it doesnt
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
ok
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?
The core way would be to add all the types one by one
yeah thats what I was starting to say before we came here till I realized all existed in his image
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 π
do you have 10.0.0.8?
or whatever
Yeah
I'm not on V10, just have a testing environment π
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?
yeah i have that one, was just hoping there was an easier way to do it
Use a... π² π¦ π¨ π· π΄
it works in v9
its cause dnd5e changed the ordering and removed or added 1 of them and it messed up his code
@gilded yacht something off?
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?
I thought he already said midi didn't support the rework to non-magical physical (why do I know this)
yeah i have the versions you mentioned
makes sense that that breaks the .all thing too
just a button or two away. click that install module and join usssssss
Highlighted the relevant versions
You know it would do my game more harm than good. I can't go down on my level of automation, sheesh.
I can see how an automated damage session would need dr to be working right
Why haven't yall just written a macro to create the array of changes in the effect
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
I'd make a sandwich but my fridge has been hacked
Cause making the macro would take longer than setting up the effects manually π
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
smh
Y'all still trying to figure out how to do damage resistance to all types? Tried flags.midi-qol.DR.all yet?
isn't that damage reduction ;p
dang it, stupid names got me again
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
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 };
})
});
i.data.label for v9? system replaced with data.data?
Sorry, I don't speak your language.
oh wait forget I asked, I forgot, I'm not broken he is
What is a "9"?
leaves
do you have to put quotes around the types?
can you do a chain of them like fire, cold, acid...?
Sure. Do you want to be resistant to the damage type called fire, cold, acid...?
then wouldn't it be faster to do dae's drop down x times?
Strange, looks like data.traits.dr.all should do the trick
https://gitlab.com/tposney/dae/-/blob/master/src/module/Systems/DAEdnd5e.ts#L550
in v9 it does do the trick, but the two of them were in v10
system.traits.dr.all is the broken one
data works just peachy
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)
midi is fine with having too many targets if you never define the amount of targets
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
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
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
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
That looks broken. Will ahve a look.
ok, no easy way to get around this. metamagic stuff will just have to be done manually I guess
that's fine
Yep
just tell him to remove the numbers in that first box from his spells if he wants to easily twin
You could do it with a Warpgate macro π€
lol guys, you can count on like 2 hands how many twinnable useful spells there are, thats a minute of his time to edit
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
Latest version does support the non-magical-physical (10.0.12) - .all broken is a separate and previously not realised issue.
But then you could accidentially use them on multiple targets without Twin spells!
how terrible π
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
π¬
btw, do you know about careful flag in midi for that sorcerer?
no, I was going to ask about subtle spell next
not subtle
it is careful
brainfart
careful I believe
that was the other issue we ran into
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
ok one minute while my brain tries to figure out this
I give the sorc a passive effect with those flags
just the second one
of course
the first is the wizard equivalent
no scuplting for mr. sorc
make sure you do custom for the middle thing, and 1 for the effect value
so I have to pretarget the protected tokens?
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
The caster has to pre-target the protected tokens, just to be clear
yes, and midi then I guess detects the double targetting of them in the backend to give them special results
ah I got it
everyone has to pretarget
I pretarget the protected tokens, sorc pretargets all intended targets
then places the template
That does not sound correct π
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
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?
if you are on v9 there is a whole module of premade stuff for a battlemaster
if you are on v10....I dunno if hes made it v10 compatible yet
I doubt it, it shows white in compatibility checker
that's unfortunate
yeah I'm on V10
maybe compatability will arrive before I start the campaign
copium
More Automated Spells Items and Feats, a Module for Foundry Virtual Tabletop
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
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
thats months old though
I want to believe
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.
its identical to careful I believe
not too bad then
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).
the link I just shared is the readme, use ctrl F for flags
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.
V10 struggles
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
yeah I learned about them today scrolling through this chat thread trying to gleam if anyone had answered the stuff I was wondering before
if they use macros, you'll need to make them v10 ready by tweaking some stuff here and there
A lot of MIDI-SRD stuff use macros FYI
yeah, someones gonna have to bite that bullet...
I know it's a dead modules but I'm sad that Sadness Chan doesn't work with midi
cause its not like we can post those in macro polo
I noticed my spell templates are not showing the distance while placing them, Is there a setting I am missing somewhere?
v9 or v10 Foundry?
Doesn't sound MidiQOL specific issue. They are shown fine for me in both versions
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
Find the culprit time
I would take a look at whatever handles templates for you. Walled Templates, DF templates enhancements etc π€·
@gilded yacht
Hi, I found a typo in your last v10 compatible version :
pressedKeys.autoRollDaamge
https://gitlab.com/tposney/midi-qol/-/blob/v10/src/module/MidiKeyManager.ts#L290
will the midi qol items like emboldening bond be updated to work in v10?
like is there some kind of supplemental module you need?
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.
Is it every token or just a specific one?
Is it every hit or just from a specific creature?
You'd need a world script for this
But yes as mentioned all or one?
Only if its every hit, if its from a specific creature it can be done with onUse
Every critical hit.
World script then
I'm not familiar with making world scripts. Are there any good tutorials for this?
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
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
I have it all written out in parts but I am at work
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
World Scripter, a Module for Foundry Virtual Tabletop
Actually, forgot to test something, might need players to have observe on the actor
Thank you!
If I had a question about a macro that uses midi-qol stuff, should I ask here or in #macro-polo ?
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
Here
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?
That was the one with advantage against spells that apply poison right?
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)
Honestly cleaner code than most macros π
preCheckSaves wasn't applying the condition before the roll
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
ahh
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
Well I can't see any obvious issue with this, so I'm trying not to go full "PR review" mode on it π
I wouldn't mind honestly, seeing as it's a hook
And yeah, doing it through the workflow would be the nicest, but I am not entirely sure how the flow normally does it
I should have it run as cleanly as I can
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 π€
Funny thing
if you do that
it just changes the results to show "(advantage)" in chat
but doesn't actually give them advantage
π
At least that's what it was doing for me when I was doing this on Hooks.callAll("midi-qol.preCheckSaves", workflow)
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 π€
guess not then
oh?
Testing it right now
coolio
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};
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 π
Don't believe so
Since workflows are not actually propagate to other clients in the first place
but not actually setting it on the actor?
They are entirely local to the player that triggered them
Honestly not entirely sure
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
Would it be better to set flags.midi-qol.advantage.ability.save.all to true
Hold up, refreshed my browser to test persistence and now it doesn't work π€
I wish I understood the workflow thing better
You could give advantage with an AE to the next save
Thats his current solution π
does midi have his own discord?
well rip
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?
Would that just blindly give everything I'm doing advantage?
Because this is in the middle of workflow
You need to filter when you want to give that
I wouldn't want to accidently give the attack roll advantage
Haven't read the whole conversation
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
Yeah I cannot open that now properly on the phone
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
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
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
π’
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?
Give me moment, I have a macro just for that
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
Oh, great! Thank you very much!
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
I'm trying to handle the Charisma drain of the Maurezhi's Claws. The hint concerning the brackets is great, going to try this.
This did it, thx.
That workflow will provide the target, then you'll just use the target function and can execute the feature. Can even just look up the item via Items
That assumes that the item is present on the attacker/target, I assumed that it was not
Or even just provide the uuid in the macro
And completeItemRoll gets unhappy if you try to pass it an unowned item unfortunately
Yeah just make sure it's on an actor
Should be mentioned that the above macro does work, it just has the requirements of a placeholder actor π
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:
its red because my player color is red, the players all have theirs set to whatever they want
My players tend to forget some of their more obscure stuff, so I try to automate as much as I can.
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.
Hey, I'm just starting to learn how to use Midi QOL. I was wondering if someone could explain to me what ItemMacro means.
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
Item Macro is a module written by Kekilla, it was originally intended to allow you write advanced custom items via javascript using it's own item scripting. However, the midi community uses it has delivery of javascripts which utilization the midi workflow instead.
Thanks @vast bane I'll install item macro on VT and check what you mentioned
the more I look at the v10 hunters mark the more I think it has an error, does it actually work?
It does actually work
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?
doesn't look wrong at all
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
it's taking advantage of the dae's placement features
Sorry for the confusion, I didn't duplicate it. I created it from scratch just using what I could find in the example spell.
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
I created it in the side bar and then dragged it to the actor.
then once the actor looks clean, drag the item back from the side bar onto them
Here's an image of the example spell at work.
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?
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
I don't think the v10 one has an item macro but you could try
how does it call it, look at his item, it has no on use field, is that a flaw with v10?
it's going through damage bonus
oh so is the ae on the spell putting hunter's mark as an actor on use?
as mentioned it's using DAE's new application method
ok so v10 shenanigans gotcha
nah it's in v9
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
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
Awesome, thanks for the help and the advice!
Anyone know how exactly i would flag an effect for duergar resilience? advantage on saving throws against charm and paralyzed condition
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:
Ahhh that may work. If i disable fast forward most of midi should still work properly right?
yes its important to understand that fast forward=/= auto roll
fast forward just skips the two pop out windows like the one above
I do have advantage reminder, so now i want to learn how to set that blurb up
Stone cunning:
Rage has 2 at the bottom
I think midi's rage now does divine fury automatically
if the barb is a zealot
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
My dwarven serker got steered away from battlerager, seemed like a poorly built class didn't want them to get let down by it.
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
Yeah I'd enhance it some, it seems like a reall weak sub
Seeems honestly like most of the barb subclasses
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
A good question I don't really have an answer for
just make it overwrite the first
Make your life easy and just make the effect -15 each stack
is this still the project to automate exhaustion?
It's characters spraining their angles, them barbarians and monks would still be able to crawl :p I'll figure something out
remove the previous on application of the second which zeros it out
Maybe I can math speed * (0.5 x stackCount) actually, wonder if pemdas is enough there
asterisks are very unfriendly to dae's effect window
that's also if the speed value would be a reduction one, I realize, which is not the case lol, back to pondering
Are you making wound tables?
if so, just use MMM!
https://foundryvtt.com/packages/mmm
Even if you aren't use this anyway, I love it, I use it for motivation to RP especially brutal failures and attacks, you can disable its midi automation and make it fully voluntary
Maxwell's Manual of Malicious Maladies, a Module for Foundry Virtual Tabletop
One day I will get a bunch of hardcore dnd'ers who wanna play with it fully on
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
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
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
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
ah well before it actually said the ac
so not sure
i want to see the actuall ac :b
i dont wanna do math
You don't have to do math
14-4. what is that
its telling you you hit
yeah but whats the ac
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?
i dont wanna look at the sheet every time
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
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
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
joined as player, this is what they see
7 divided by 3? now i i have to do math to figure out the ac?
It's not maths dude
not divided
/ means divided by
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
I can't see an option to set it that way
What a confusing discussion
When is "Before"?
Before, it showed the ac, and now it doesnt, what settings did i have before x3
Did you update?
On the latest version I only see options for showing saving throw DC, not AC
I don't think midi ever showed ac did it?
i figured one of it out, needed to have gm aswell online otherwise it woulnt calculate the true ac
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
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
dfreds is all messed right now aswell x3
lesson learned, dont mess with ce
gotta restore evrything back to how it was
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
i had dfreds and CE before aswell
lol all I did was tell you to install it π
Does it though π€ ?
I think it works for me without a GM present on v9 from a quick test.
From the screenshot that was messed up with the dragon hits, it seemed that the dragon had its AC set to 0. So a 12 was a hit (by 12) and a 5 too (by 5) π€·
I would expect a NaN or something if the client couldn't get the target's AC not an AC of 0
guys, it worked for him in his screenshot lol
But I don't think it matters anyway
you can clearly see it calculating while he was on the player
This one I mean <#1010273821401555087 message>
A 12 and a 5 are both hits at the same target
I thought we could see values, just not modify them without gm or midi
oh actually yeah, how would they select the enemy
T for target
but only midi references targets right?
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
I cannot reproduce that. All attacks hit/miss normally when a player without a GM present is attacking linked or unlinked tokens.
π€
well hes got about 152 potential culprits
I heard from the author that he will do an update - but is waiting for the v10 excitement to settle down - his macros depend on other modules so probably wants them to be "solid" before starting.
his battlemaster set is amazing
Thanks, as always. Fix in next version
The midi sample items module is updated for v10 - all of the items should have a version number like 10.0.10 or later. Make sure you are on the latest midi-qol. You will need to re-add them to the actor that has the item.
Everyone has read access to all data
I also notice a fail safe check that should probably be moved up one line:
https://gitlab.com/tposney/midi-qol/-/blob/v10/src/module/itemhandling.ts#L478
Huh, interesting π€
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.
You think you could achieve that even if hooks do not support async?
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?
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β¦
Is there an effect for only adding AC to ranged attacks? (DND 5e - V10) - Midi / Dfred
So you will need the target to have better AC when attacked with a ranged weapon?
Use an AE to grant a negative bonus to rwak
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?
That is from a specific Module called MidiSRD.
You can type MidiMacros.<name of the spell> and get it from console
Or from the MidiSRD repository https://github.com/kandashi/midi-srd/blob/master/scripts/MidiSRD-macros.js
So far yes. That's where I really don't like it. I fail the roll, then go through all of the checks and if that succeeds then do the roll again passing a flag to say that checks have passed.
he already has that doesn't he?
if you have advantage reminder installed you actually see midi trying to utilize AR
Perfect - many thanks
That's the other way around, what I want is a method I can call when I'm using Hooks to do stuff that flags cannot do, because they require logic.
ok gotcha my b
But if you setProperty advantage in the workflow when the specific conditions are met, you should be good, no?
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
Boolean flags now do support boolean logic (same evaluation as activation conditions). To do it yourself you need to make sure it is done at the right point in the workflow. Can you raise an issue in the gitlab to remind me to look at this and work out how you can do it sensibly?
(the macro example #1010273821401555087 message)
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Currently it's applying an AE with advantage.all on it, which then needs to be cleaned up
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.
Well I wasn't really looking for the entire functionally of advantage against conditions, just an easy way to add a source of advantage after I have determined in my macro that it exists π
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.
So basically just having a list of advantage sources (which are just labels + target!) that MIDI uses when checking it
Depending on how complicated the condition is the current flags.midi-qol.advantange.abilities.save might work.
flags.advantage.abilities.save.all CUSTOM workflow.item?.effects.map(ef=>ef.label).includes("Paralyzed")
should I think work now. (v10)
utils.js:3075 there is a console.error("Roll data is ", duplicate(rollData)); forgotten MidiQOL v10.0.12
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 π
The same example above could include the workflow type of creature too, no?
Now I am confused π
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! π
That is doable with Active Auras that would create a reaction on the actor
when A-A is ready for v10
I just want it in my hooks π Also forcing the owner to use their reaction is not possible with AA
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.
Does anyone have a working hex?
mhm
giv me a sec
Thank you so much its always giving me trouble!
Yes! π
The earlier it can be set in the workflow the better though, so that MIDI would deal with multiple sources/having advantage and disadvantage
Is your focus per token or all target tokens in the workflow? Since I think they need different implementations (but I could be wrong).
Try this. Its an Item so you will need to import it
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.
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 π€
yeah I tried that, no go
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.
What was not working? It is meant to work - but I've been know to f*** things up before and will again.
like nothing happens when you click the ability
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
Did you rename the item when equipped to the actor?
yes
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?
I'm having a problem with every single one of them
none of them fire
anything involving an item macro auto fails
That looks fine. Anything in the console?
?
Hit F12 and look for errors (in red) relating to midi-qol
Item Macros settings. Do you happen to have options 2 and 3 selected?
One day I'll remember to ask that first.
Config settings for the module ItemMacros - check if character sheet hook is enabled - it must be disabled.
I haven't touched ItemMacros
I dont know what any of those settings mean beyond player access
Thats the issue
Uncheck "Character Sheet Hook"
When set ItemMacro takes over the "click" on the character sheet and the macros won't work.
@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;
});
}
ok now it seems to be working
Isn't that just Sneak Attack re-flavored
thanks
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
Basically, but a bit more restrictive conditions
wait will disposition stuff work for me as the DM?
Yeah you can set it to add an AE for that
I think it just reads token disposition, so yeah, could probably just use midi sneak attack and remove the advantage stuff
but I'm hostile, does it work that way in reverse?
I'm team red
also doesn't sneak use rogue classes?
Yeah but easily changed
It compares token dispositions, not player π
Also why do I await the getWorkflow? π€
it might not be your macro, I stole it while quietly lurking
No it rings a bell
Actually it's not a disposition, but hostile -> -1 which means find nearby who have a disposition -1 * target's disposition, i.e. if friendly -> hostile, if hostile -> friendly.
yeah its mine it has the arrayRemove π
I'm trying to automate hobgoblins
Yeah its the pack tactics light. After that one I got all the relevant conditions, so as not to trigger for Paralysed etc too
Dangerous choice, like Zhell they resist automation.
lol
I'm hosting dotmm, I figure since they will see 1000 of them in the campaign that ability should be automatic
If nobody else does I can whip something up later, but won't be at a PC for~2 hours still
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
Hey, I did some amazing shit with a warpgate macro the other day and nobody was around to help or see it
//function needed?
OK so allied to the hobgoblins are other hobgoblins only, or all hostile to the PCs creatures
Or do you want to use Tagger to indicate who gets to "help"
how come midi puts a flag in console for advantage constantly?
The check for advantage?
It helps me when checking for stuff, so I am not complaining
suppose it could also be AR
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 π
So my working theory for what to do is to drop everything after the else and put the dfreds macro in after the else
Yeap
and the dfreds ae is basically just a damagebonus for mwak/rwak
A bit more tricky to get the once per turn
with an expiration of....1 attack
But then you will need some logic to permit only once per round
ugh, not gonna lie, the once per turns is literally the main reason I use ar
or turn π©
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
Divine Fury π
I got you if you want but its v9 still
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
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
nah I'm doing an AR lol
hasEffectApplied check from DFreds CE helps with that
sorry to waste all yalls brain power on a misread of an ability
genuinely thought it was just like pack ticktacks
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
DFreds CE has updated the Rage
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
v10?
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?
Whats the item macro then?
And no!
//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
hey that seems like mine π€
hmm
there must have been something else in this I wanted then and never noticed divine fury
It even has a really nice unSetProperty in there π π π€£
Enraged Divine Fury Damage π
getProperty(tactor.data.flags, "world.divineFuryTime")
shakes head
usegetFlag!
(it may be serialized)
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
If you dont care about Divine Fury yes!
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
*I need to rewrite many older stuff * π© ...
When you gonna get to PR's for midi srd 8)
Ohohohoh you can use a Tagger or a flag for when his ability should be active and if not present revert to the old macro π
Yeah I'm honestly thinkin that way, but I gotta get this last prep sequence done to meet my goal for the day
tactor.setFlag at the bottom and just below, so I hope not
It worked thank you!
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
I think MidiQOL will expire conditions when the token is incapacitated automatically π€
its not concentrating fwiw
I wonder if I can make it concentrate...no I don't want him failing conc saves via midi nm
babonus! π
I'm on v9!
BOO!
magic
effective transferal with an AE was my approach
I'm basically just cut and pasting my emboldening bond and flagging Active auras
Oh right. Yeah. Core.
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
nah thats why AR is so easy I leverage my brain for the triggers:
human brain, so powerful when it's up for the task at hand
now I just hope ar is compatible with active auras
specially the whole red vs blue team thing
whoa wait...whats this lol :
Should be. kaelad is dabbling in Active Auras for v10
that's what I meant for once per turn
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
OK so then you need MidiQOL optional flags
Nah π§
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
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
This is just looking at the name of the effect right? Not checking if it's using the usual method of applying a condition? I feel like most of the time the name of the ability won't include the condition it's going to apply.
But that's not the end of the world, I could just setup stuff in a way knowing this.
You would have to go down to the changes on the effect instead of relying on the effect name
Maybe Tim could add an exported utility function that would simplify the writing of the activation conditionβ¦
Itβs just a simple way to declare an anonymous functionβ¦
I would have to double up on the map part right, to look through all the effect changes
You would have to trough the array of changes: ef.changes
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
Yea, but thankfully in my own setup I know I only use macro.ce
If you already have a world script setup, you could even export a utility function yourself and call it in activation conditionβ¦
Ooh
Just want to point out that conditions are recursive too π E.g. A applies B, which applies C that you are looking for π
Noβ¦.
He's right and I don't think foundry, or rather midi considers that
Doable with a mapping of one to manyβ¦
99% of the time I'll be looking for poisoned lol
but one doesn't exist, its implied
But that is true
The you iterate through the list. This really screams for a utility function
Hmm there is a topic going on about flags on AEs that could be expanded for that I guess: <#dnd5e message>
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 π
unconscious has prone usually
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
But those other conditions might apply what you are looking for! π
yeah incapacitated is one of them
I already linked something that needed to reference that today
leadership on hobgoblin captain
I just did that as a aura iirc
Breaking concentration also in midi requires or should look for, incapacitated
Btw you still wanted that macro for once-per-turn @vast bane? Or did you end up scrapping it?
Worked well enough
I can't work on session, gettin ready for bed her
Having a world script export a function is still a nice idea
I kinda do that stuff in the opening 2-3 days of the week anyway, too late now to work on stuff like that
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?
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
