#MidiQOL
1 messages Β· Page 60 of 1
Don't understand the qol is not defined error tho, am I now allowed to call on midiqol inside the onUpdateTarget hook?
JS does not allow - in field names, so you need to replace the following:
if (!target.flags?.midi-qol?.elementalBane) return;
With
if (!target.flags?["midi-qol"]?.elementalBane) return;
With that being said, I believe there is a getFlag method that you are better off using (on the actor)
if( !target.flags?.["midi-qol"]?.elementalBane) return;
You seem to have an extra dot in there or am I tired? π
That is sensible
You had one too few π
Right, I am tired.. Of JS π
shakes head not me, i just grab proto data and change what im told
So they are friendly between each other now, and the enemy is neutral that they're attack but they're still not getting flanking
its a strange interaction, the token is green, but per dfreds/midi cause it says hostile in the token setting, its still hostile and doesn't qualify for things like sneak attack ally or flanking or pack tactics
this is why I have duplicates of all my polymorph/summons for another compendium, the tokens in the summons batch have their hostile changed to ally and vision settings turned on
i cant speak to the skyscraper of modules you have running π just saying that it is extremely unlikely to be a warpgate bug for something like this.
However, if such a thing can be reproduced via warpgate alone, i will absolutely address it
if they are attacking someone, that someone should be hostile
red should target green/blue, and green/blue should target red. Yellow, I'm pretty sure, is ignored
as sad as this sounds, I don't know how to use warpgate without midi lol
Ok now he has flanking, so him not being hostile was the problem. I have it set to make everyone initially neutral, is there a way to easily flip them to hostile?
either way though, my point is more that you can't trust the green color in midi
blue is reliable, but always double check greens are actually friendly
or is it the other way around, I can never tell which is player, and which is friendly of the two colors
let disposition = false
new Dialog({
title: "Disposition Editor",
content: "<h2>Select the disposition of the selected tokens</h2>",
buttons: {
friendly: {
label: "Friendly/Ally",
callback: () => {
disposition = CONST.TOKEN_DISPOSITIONS.FRIENDLY;
}
},
neutral: {
label: "Neutral",
callback: () => {
disposition = CONST.TOKEN_DISPOSITIONS.NEUTRAL;
}
},
hostile: {
label: "Hostile",
callback: () => {
disposition = CONST.TOKEN_DISPOSITIONS.HOSTILE;
}
},
},
close: async () => {
if(disposition === false) return;
const updates = canvas.tokens.controlled.map(t => ({_id: t.id, disposition}));
await canvas.scene.updateEmbeddedDocuments("Token", updates);
}
}).render(true);
isn't there a naughty _ in this macro?
There's a naughty lack of refactoring is what there is
I got it a very very very long time ago lol
am I right that the underscore is not suppose to be used?
in _id?
yeah isn't that a console only thing
No, you're thinking of _token
In this case, for batch updates, it tells Foundry what update object goes to what token document on the scene.
I really like these kinds of dialogs, if they are actually dialogs, where the choices are all presented and you one click it
im gonna rewrite it for shits and giggles
I got it from macro polo waaaay back over a year ago I think, so its either you, flix, or freeze lol
I managed to make almost everything work but the targeting in DamageOnlyWorkflow
const target = args[1].targetActor;
if (!target.flags?.['midi-qol']?.elementalBane) return;
const baneFlags = Object.keys(target.flags['midi-qol'].elementalBane);
if (!args[1].options.damageItem) return;
let damages = [];
console.log(args[1])
args[1].options.damageItem.damageDetail.forEach(d => {if (Array.isArray(d)) {damages.push(...d)}
else {damages.push(d)}});
damages = damages.filter(d => d?.type).map(d => d.type);
damages.forEach(async (d) => {
if (baneFlags.includes(d)) {
const extraDamage = await new Roll('2d6').evaluate({async: true});
const targets = new Set([target]);
new MidiQOL.DamageOnlyWorkflow(args[1].sourceActor, args[1].sourceToken, extraDamage.total, d, targets, extraDamage, {flavor: `Elemental Bane - ${d}`});
}
});
} catch (err) {
console.log(err)}```
log out args 1
I did,
The target is there or I wouldn't get the flags
Should I get the token instead of the actor?
yeah...cause its unlinked usually for targets
Righto
maybe this is an unlinked thing?
WELL
That went wrong, it got stuck in a roll loop of some sorts
π
I guess onUpdate does trigger itself again (thankfully I had to implement a once-per-turn logic anyway)
const buttons = Object.keys(CONST.TOKEN_DISPOSITIONS).reduce((acc, key) => {
acc[key] = { label: key, callback: () => key };
return acc;
}, {});
const key = await Dialog.wait({
buttons,
title: "Disposition Editor",
content: "<h2>Select the disposition of the selected tokens</h2>"
});
if(!key) return;
const disposition = CONST.TOKEN_DISPOSITIONS[key];
const updates = canvas.tokens.controlled.map(t => ({_id: t.id, disposition}));
await canvas.scene.updateEmbeddedDocuments("Token", updates);
I might share it if I manage to make it work and anyone's interested
Oh my god, that works. Thank you!
@robust vault Autosneak works great if the rogue never offhand strikes nor has 5 levels in a martial to gain extra attack
If you want the choice back, don't use auto sneak, just use the other sneak attack in midi sample items
Also if you use dndbeyond, make sure its not replacing midis item with his
yes, but that's the problem hahaha, I have a rogue with 2 weapons (one off-hand)
Yer just using the wrong one from samples
You actualyl have to have both to have auto sneak, so just figure out which one is auto, and delete it
Is it a bug that it rolls 2 times through the dae effect?
one of them seems to be visual effect
and happens when set mwak and rwak
you are not using the right things
there is absolutely no reason to add mwak/rwak stuff
melee weapon attack, and ranged weapon attack
if you see that, then you must be using non midi sample items
its all handled in the item macro in midi sample items
if you use dndbeyond, tell it to stop replacing items on players, and then drag midi sample item 10.0.13 to the rogue, and delete its old sneak attack
that will get you the prompt, if you want auto, drag the auto too
if you mean therestwo instances of rolling, the way the damage bonus macro key works with DSN, is that it rolls the attack damage, then a second later rolls sneak attack
How clumsy I am, you're right, eliminating auto-sneak and leaving the manual, yes, it ask for use it or not (midi sample item)
but it should not be rolling any dice twice, its just seperating the rider from the attack roll
and if the weapon is also a d6, it may seem like rolling twice but its not
yes, it only rolls once
So what was happening to me is a DAE bug?
I have no idea what was happening to you
Or maybe I should have separated it into 2 different effects? one for mwak and another for rwak
the dae bug is for users who install 10.0.15 or later dae
the same bug?
nope cause I'm on 14 and never see it
By the way, have you updated to 2.1.4 yet? or you still in 2.0.3
I have a test build of it but I won't update till dae is fixed and everything looks fine
stability>all
for some reason I'm on 10.0.23 midi, I dunno why lol just noticed that
I also did a test, but it seems that I had some error with "probably" tidy sheet, the item macro field was not seen in the sheet
im on 10.0.24
I didn't want to update it anymore, because I think the author said he didn't know if later versions would work correctly in 2.0.3
yeah thats why I'm not going anywhere
I think you can update without problem to 10.0.24
you see all the bug reports here, its just not worth the frustration. I only needed group sheets for my Battletech 5e crossover project anyway, nothing in 2.1.x was wanted/needed for my dnd campaign
Nah, I'm paranoid enough to trust my past judgement, I know theres something in 24 thats off
I'm vaguely remembering a MTB/midi bug with 24
How can I go about changing an effect value in a macro? Do I use updateEmbeddedDocuments? Not sure how to patch values inside the changes array
Copy the changes and add your own
Then update the effect with that
If it's on a unowned token you'll need to use a midi run as gm function
I'm new to Midi QOL and I'm wondering how I could implement splash damage from a melee attack to creatures near the target. I currently have it set to take half the melee damage if they fail a dex save, but I realize that may be too complicated and could be a separate set or rolled value.
Obviously I don't want the attacker (a giant) to take the splash damage.
can you share the feature you intend to implement instead of mechanics in foundry someone might have a better idea on how to do it
fwiw, Chris just did the cleave thing for me last night that is somewhat similar
Ooh, Cleave does sound similar.
but if you say what the rules as written are for the item, that'd be easier to figure things out with
My macro can easily be edited to include a dex save
cause you could be describing Green Flame Blade too
Or Ice Knife
is it a melee attack that splashes to all nearby creatures?
Searing Greatsword. Melee Weapon Attack: +11 to hit,
reach 10 ft., one target. Hit: 21 (4d6 + 7) slashing
damage and the target is pushed 10 feet away. If the
target is on fire, this attack does an additional 7 (2d6)
fire damage.
Creatures within 5 feet of the target must succeed on a
DC 19 Dexterity saving throw or take half the attack's
damage.
I think this is more of a case of cloaning Ice Knife imo
I forgot about the pushing target part. lol. This is so overkill.
I was thinking Ice knife also.
Only change it to melee, but the question is, does the sword damage the user
I was thinking it would use Active Auras. But I don't know if that can filter out active/selected token.
May require a whole macro.
yeah has to be an on use macro
YOu'd probably need help from the gurus here, My thought is to plagerize mr.primates ice knife but you need the dex save damage to reference the damage.total of the item
if its homebrew, and you don't mind editing it, you could make this really simple and just make a second item for the save damage, and have the on use macro roll the second item and have that item be a template placement for damage
Again, I think that part could be replaced with a new small roll instead of necessarily be related to the original damage roll.
Exactly
If you dont mind them being new rolls, then you could very easily edit ice knifes macro to work easier
Where can I find that?
however, does it damage the sword wielder?
It shouldn't.
there is a flag for it
Like if the roll was a crit?
Or just the data for the weapon?
You can export the item as json if you want to easily see how foundry formats it, or look at the item in console with a console.log
If the roll was a crit.
As in an overall Midi QOL (or other module?) setting, not for a particular item.
Midi has settings for critical rolls if that's what you're asking.
If you're trying to see if a roll was a crit in an item macro you can check this.isCritical
I see the part for setting what kind of damage a critical hit does. What I wanted to find was the way to roll by default the crit damage if it is a crit.
I've tried make something using the midi item as base, don't know if there is something wrong there, but here is the monk deflect missile as effect macro
just an fyi, you have some data.data in there
if it's data.data chagnge it to system
if it's just .data yeet it
hmm
Hi! I'm on Foundry v.9. Using Midi QOL and convenient effects. Basically, I want to create a custom status effect that causes the sufferer to deal half damage with all weapon and spell attacks. It seems like it should be simple enough but I've been tinkering around in DAE with no luck
Not sure about doing it via any specific flag, but pretty doable with an on use macro.
Is this for ray of enfeeblement?
No, it's actually a homebrew thing. Basically like a "Weakened" status effect. I couldn't find a flag that did what I wanted it to do. I was afraid that might be the case, I'm pretty bad with macros.
@stuck eagle MidiQOL onUse ItemMacro | After Active Effects on the special weapon. ```js
if (!args[0].hitTargets[0]) return;
const damage = math.floor((args[0].damageList[0].appliedDamage)/2);
const itemData = {
"name": "Radius boom",
"type": "feat",
"img": "icons/svg/item-bag.svg",
"system": {
"activation": {
"type": "special",
"cost": null,
"condition": ""
},
"duration": {
"value": "",
"units": "inst"
},
"target": {
"value": 5,
"width": null,
"units": "ft",
"type": "creature"
},
"range": {
"value": null,
"long": null,
"units": "spec"
},
"actionType": "save",
"damage": {
"parts": [
[
5,
"slashing"
]
]
},
"save": {
"ability": "dex",
"dc": 19,
"scaling": "flat"
},
"type": {
"value": "feat",
"subtype": ""
}
},
"_id": "Lb6zmde1jWwncmQx"
}
game.user.updateTokenTargets(MidiQOL.findNearby(-1,args[0].hitTargets[0].object,5).map(i=>i.id))
const pseudoItem = new Item.implementation(itemData, {parent: args[0].actor})
await pseudoItem.roll()
Should do the 5 ft radius half appliedDamage.
Wow, cool!
Will proof read it in a bit cause no way I haven't messed something up π
Do I paste the whole text into the Field in front of After Active Effects or do I save it as a new macro and reference it there somehow?
Drag/Dropping the macro didn't do anything. π
Definitely not pasting it into the field, lol.
Oh, ItemMacro is a new button at the top. I see.
Hi everyone! I'm homebrewing some spell-like abilities for my 5e game. I'm trying to get this effect to roll correctly, but it's not adding the advantage to the roll. Could that be caused by having the roll "fast-forwarded"?
effect value field needs a 1
Ah.. empty is null then. ok
Hey all. Is this part of Midi, or DnD5e module?
Another module
Yes. I changed it a bit. Copy paste it again and try it out
Should it target only enemies?
Thanks! that fixed it.
Rest Recovery
Well shit. My Rest Recovery settings page is blank.
Might need a reinstall
It should target all but the sword wielder.
This should do it. ```js
if (!args[0].hitTargets[0]) return;
const damage = Math.floor((args[0].damageList[0].appliedDamage)/2);
const itemData = {
"name": "Radius boom",
"type": "feat",
"img": "icons/svg/item-bag.svg",
"system": {
"activation": {
"type": "special",
"cost": null,
"condition": ""
},
"duration": {
"value": "",
"units": "inst"
},
"target": {
"value": 5,
"width": null,
"units": "ft",
"type": "creature"
},
"range": {
"value": null,
"long": null,
"units": "spec"
},
"actionType": "save",
"damage": {
"parts": [
[
damage,
"slashing"
]
]
},
"save": {
"ability": "dex",
"dc": 19,
"scaling": "flat"
},
"type": {
"value": "feat",
"subtype": ""
}
},
"_id": "Lb6zmde1jWwncmQx"
}
game.user.updateTokenTargets(MidiQOL.findNearby(null,args[0].hitTargets[0].object,5).map(i=>i.id !== args[0].tokenId))
const pseudoItem = new Item.implementation(itemData, {parent: args[0].actor})
await pseudoItem.roll()
Another small edit. I had forgotten to add the proper damage
I think I'm getting too many roll dialogues and the damage isn't being applied anymore. I don't know what to do. Sorry, I should get the basics of MIDI QOL figured out before I go into these advanced macros.
Do I need to remove the nromal Dex save setting on the item?
It looks like the Rock attack which I haven't messed with still applies damage.
I didn't see anyone correct your earlier message but hes making you an on use macro, that means you save it in your folder macros or you make it an item macro. And then you get its name OR use ItemMacro at the bottom of the items details where the on use field is created
it sounded like you were pasting the macro into the on use field which is bad.
You just need this in the main weapon as either an ItemMacro | After Active Effects or macro name | After Active Effects
they will need to install item macro and if its a fresh install, go in and turn off character sheet hooks in item macro
I've got ItemMacro installed, yeah. I pasted it into the ItemMacro and set ItemMacro as the text.
ok so whats not working about it, show us what it looks like in chat
Oh, looks like the issue was that it wasn't equipped after I had dragged it from my items.
To the actor.
I don't suppose there is a flag to ignore Disadvantage when making a ranged attack, is there? That would just be something the player would hopefully remember (an effect of a homebrewed spell)
I don't know why Windows has decided to turn everything bright white when snipping now, lol.
As usual, i'm in awe of your encyclopedic knowledge of midi and foundry!
I'm pretty sure you have two roller modules installed?
unless bugbear meant for the macro to repeat itself?
Midi does not work with:
Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e
Advanced Spell Effects module is in beta in v10 and often the culprit of things...
flags.midi-qol.ignoreNearbyFoes - when set cancels ranged attack disadvantage from a nearby enemy. Useful for Crossbow Expert feat.
flags.midi-qol.sharpShooter- cancels disadvantage when shooting at long range.
Hey Great! That's good enough π
Is it necessary to give effects different priorities if you have multiple effects coming from the same spell/item/whatever?
Thanks, that was really not clear. I had Ready Set Roll for 5e active.
You cannot mix rollers
nope, except for some really unique edge cases
Now I've getting this
I don't see a roll for dex save or damage applying to nearby tokens.
That still doesn't look like the midi chat card
Can you get a screenshot of the rest of the Item pls?
It will not be an actual item that you roll. It will be used automatically after a successful attack of your Searing Greatsword
You don't need any saving throw on the greatsword
Just the macro execute call
Can you export me the Item?
π
Oh, maybe that happened after I deleted ll the empty things that were created when pasting in the wrong place.
oh, this might be helpful or fun here -- warpgate 1.16 added a notice function for pinging/panning any user as any user.
https://trioderegion.github.io/warpgate/warpgate.plugin.html#.notice
(a player is mutating unowned tokens and pinging them to just the owner -- the gm observing, in this case)
Works fine for me π€
Yeah, I remade the item... It doesn't seem like the macro is triggering.
Uncaught (in promise) ReferenceError: undefined. math is not defined
[Detected 1 package: midi-qol]
at eval (eval at callMacro (workflow.js:1628:15), <anonymous>:5:16)
at Workflow.eval (eval at callMacro (workflow.js:1628:15), <anonymous>:56:4)
at Workflow.callMacro (workflow.js:1629:14)
at Workflow.callMacros (workflow.js:1519:21)
at Workflow._next (workflow.js:924:18)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
I found this error.
math is a library I need for the macro?
why is it attacking at -4?
This is actually a bug I've been ignoring with midi/dae
dae's buttons and midi, sometimes don't update the UI when you click the + key
It's to do with using proficiency dice instead of static proficiency bonus. I know, it doesn't make a lot of sense.
you have to close and reopen and then suddenly you have 20 blank effects or 20 blank on use fields
isn't that automated?
Does dnd5e really do that?
I swear there is a setting for that somewhere
yes
I know you can change to prof dice in dnd5e's settings, had no idea they did it...janky like that
I added the negative because I found the attack bonus way too high, but this is a homebrew monster, so that may have to do with it.
a prof die of 4 would be 1d6 I believe?
oh so you are just handicapping the monster then
its not dnd5e's feature doing that
either way, you need to clean the item up, but I suspect bugbears probably going to link a clean item for you to import
That seems neat. Would be interesting to try adding pings to my token selector dialogue.
@dark canopy There a way to not have a radio button take up 50% of the dialog box when using a warpgate menu?
I'm running into the issue of long monster names not fitting the dialogue well.
part of the reason we had the name I think was to be able to tell them apart, but if that new warpgate thing can do pings..
Honestly, dialogs confuse me to no end
I'm not sure how to get a 3rd column in here
or have the buttons do the ping without closing the dialog
Might be a case of making the dialog without warpgate
For now I guess I'll just chop off the end of the string if it gets too long
You will need to do stuff in the render, get the data.content from the dialog, change them as needed and rerender the dialog
If I understood what you said correctly
Would likely be a simple fix in Custom CSS for your own serverβ¦ but not gonna help if youβre sharing it
Wanted to avoid doing that
At any rate I cleaned it up slightly from the version I gave Moto (and removed the damage reduction). Here's a DMG cleave macro: https://github.com/chrisk123999/foundry-macros/blob/main/Mechanics/DMG Cleave/Chris-Cleaver.js
Setup as an on use macro on the actor that's run after active effects.
Iβve been forced to do the same for a few dialogs. Have a special section in my CSS to keep them clear of more permanent adjustments
I looked at the render thing and decided I'll just be lazy and clip the name to 24 characters
Β―_(γ)_/Β―
Be neat if there was a way to add inline CSS to warpgate dialogs
the text takes html
But the dialog is made with a table and I didn't see any obvious way to customize that
Nothing to see here: https://github.com/thatlonelybugbear/FoundryMacros/blob/main/Loadout selection/Loadout_v10.js#L66
Well I need to update that βοΈ
I have an idea.... how do I trigger this dialog?
Kill an enemy while having another one within 5 feet of the enemy and the attacker.
Make it a button dialog with each target another button π
you can pass a render callback similar to regular dialogs, but at the moment, i dont have a ton of styling control
noob chiming in here... this will fix the dialog once it's onscreen but I don't know how to get this to run at the right time lol.... (async is hard)
let ths = document.querySelector('.dialog-content').getElementsByTagName('th');
for (let t of ths) {
t.style.width = "auto";
t.style.textAlign = "left";
};
let tds = document.querySelector('.dialog-content').getElementsByTagName('td');
for (let t of tds) t.style.width = "50px";
use the render callback: https://trioderegion.github.io/warpgate/warpgate.html#.menu
Hey a quick poll for midi users - should damage be rolled before saving throws? Yes means that players see how important the roll is. No means that in the event that everyone saves and there is no damage on save, no saves would be required. π means damage before save (the way things are now) π change it so save before damage
It should be a configuration option (this might be hard/tedious to do)
Not sure if this got resolved, I think the problem is that it should be Math not math in the macro code
I don't actually mind either way, and don't want extra work for you β but our table has often scratched their head at needing to roll damage before the save. Especially with DSN going it just takes more time. And yeah a config would be the ideal but not if it's tedious for you!
Well isn't that a smart thing to have in there...
@scarlet gale it's kinda brute force but this works
in the render callback, i bet you need that wait because it was executing too early?
its because you are calling it immediately π
render: chris.funcName
no parens, that evaluates the function
oh neat, thanks
Smooth as silk now... have updated
@scarlet gale you should update your macro to MidiQOL.completeItemUse
Doesnβt work with Roll Groups?? I have both activated and have not noticed anything "strange".
Is there a problem with midiqol? I have the lastest 10.0.27 version and the workflow settings just dont save
Strange. I haven't encountered something similar
It was already weird to me that when i updated the dnd system from 2.0.3 to 2.1.4, and all of my midi settings were deleted :/
Does RG actually get to do anything?
Yes... I have midi and RG, and I can roll RG as normally. I Actually have an item, dagger of venom that works. And I think I have a few more.
Well then.
So far it seems that both modules work fine. Even with automated apply dmg from midi
I'm trying to implement a "death burst" ability, like the Dust Mephit monster has. Basically, an AOE save that triggers when the creature dies. Is there a MidiQOL flag for something like that, or would I need a macro?
So I found this message further up in the chat when trying to set up AoA for a player yet it seems to not work - When I cast it; it DOES apply an effect to the player but there is no temp HP and no damage dealt when something attacks the player. I'm still on V9 of Foundry and got Version 0.3.4 of World Scripter (As it said it is compatible with Foundry V9 and 10 yet when I downloaded it I DID get a warning that it has no "set compatible version) - Must I have a specific version of World Scripter for V9 that is not Version 0.3.4? Or is that macro not functional for V9 and intended for V10 perhaps?
Should this not give Magic Resistance (spell saving throw advantage) or am i just missing something here?
There are 4 ways I can think off.
-
DAE with a special duration of ZeroHP and a
macro.executewhich will roll an Item (or a pseudo Item example but not to be uses as is #1010273821401555087 message). -
DAE with a flag for
onUpdateTargetchecking HP and when the newHpValue is 0, execute macro. -
Effect Macro with a trigger
on combatant marked defeated -
World script monitoring hp of actors
You are missing the proper Change Mode.
Should be Custom (or Override) and not Add
Assume 1 to set the effect "true"
Better share the actual link of the macro π€·
1 or true does it yes
thanks
Also quick Question did anyone ever make the Adamantine Armors work? The make crits just hits?
https://github.com/chrisk123999/foundry-macros/blob/main/Spells/Armor Of Agathys/Chris-ArmorOfAgathysWorld.js Sorry bout that, this is the one in question
flags.midi-qol.fail.critical.all: (applies when targeted - attacker can't do a critical attack - think adamantine armor)
I would suggest going through MidiQOL's readme once π
https://gitlab.com/tposney/midi-qol/-/tree/v10#flagsmidi-qol for flags
oh yeah im in the process of setting things still up
The linked one is NOT v9 compatible
im currently converting everything from tabletop simulator and a ton of DND beyond homebrew things
well I have to say, make what you need currently and not everything at once
π
It will ensure you don't lose your sanity !
was never sane in the first place, but i have 3 weeks of vacation from this sunday onwards so i know what im spending my time on xD
#1010273821401555087 message There is this one too apparently which by reading the Chat logg: Chris seems to refer to as a now "Older" version but yeah, I aint go no clue how to just look at a script and tell "Yep, that is / isnt compatible with V9"
if you see in the macro references to system, it should be 99% a v10 macro.
Ahhh, well - Now that I have learned that I am less likely to bugg you lot here AS MUCH in the future ^^'
Change the relevant lines to js let attackType = workflow.item.data.data.actionType; , js let targetEffect = targetActor.effects.find(eff => eff.data.label === 'Armor of Agathys'); and ```js
let tempHP = targetActor.data.data.attributes.hp.temp;
Hmm, even after changing that nothing seem to happen - Now it does not even apply the "effect" to the token anymore
There should be an error on the console
I don't get one of those flashy red ones at last - Not even a pop-up error kinda thing
Would changing it allow for non fast forward users to be able to use the optionalname macro key for save bonus?
Cause if it does fix that, then I think that kinda answers things as its always a positive to expand user experience
For context:
Hello, I am working on a macro for Thunderous Smite. I have used one I found online a base, it almost works...but the strSave gets rolled by the player for the target which is just a bit weird. Anyone have any idea how I can change that to have the GM do the save? Macro-polo redirected me here
I need an on use macro that just ends concentration if it exists on the actor. Anyone help?
await warpgate.mutate(token.document, {embedded: {ActiveEffect: {Concentration: warpgate.CONST.DELETE}}}, {}, {permanent:true})
If the item has the action type "Healing" is the fifth line still suppose to say damage?
Also, is there a missing [period] in line 2?
const item = token.actor.items.getName("Healing Spirit Heal")
const {castLevel} = effect.flags["midi-qol"].castData;
if (castLevel > 3) {
let newItem = duplicate(item.system)
newItem.damage.parts[0][0] = `(${castLevel} - 1)d6`
await item.update({'system.damage.parts': newItem.damage.parts})
}
i'll answer after i give a protip
when in doubt about paths, put/create the item in the sidebar as desired, open the console and type game.items.getName('name of item').toObject()
that will dump out data in the exact format used in update
if you were to do that, you would see that a healing formula still uses the system.damage.parts entry, just with healing as the damage type π
no, that is "map-style accessing", compared to "object-style accessing"
phew, was gonna have to update a bunch of things lol
i.e. object.with.parts == object['with']['parts']
Thanks!
Is there a way to link dropping of concentration when an item uses its last charge?
not inherently, but an item macro checking for remaining uses and killing conc could work
ok so its likely item.system.uses.value
You will need to use the MidiQOL function ```js
await MidiQOL.socket().executeAsUser(handler,userId,...args)
const usesLeft = item.system.uses.value
if (usesLeft === 0) {await warpgate.mutate(token.document, {embedded: {ActiveEffect: {Concentration: warpgate.CONST.DELETE}}}, {}, {permanent:true})
}```
Would this do it? On use macro?
Need a () around that
I'm shocked thats the only part lol
if (usesLeft === 0)
isn't it a capital I?
Is there an attribute key to run "on combat turn start" macro?
Like run a macro? Could be done with effect macros.
there is a dae one, but I find that effect macro has better flags and you can jump into #macro-polo for help with EM
okai thanx
Yeah but I wanted to know if there was a way to do it with this
Just to clarify above, my above macro is going to delete concentration on the actor who is using the item right? if its charges hit 0? What happens if it destroys the item at 0?
I believe any of the macro.'s could theoretically run wth the duration tab macro thing for dae?
Pretty sure it should hit 0 then and then delete, I think you'll be fine.
Actually scratch my previous answer... You are targeting self, so the hitTargetUuids will be, you guessed it, the attacker's π
Use game.user.targets.first() instead
I'm actually shocked I pieced all that together and it is ok lol
Personally I would just use the midi function to delete the effect, but warpgate is fine too.
Badger beat you guys to it ;p
its a self delete fwiw
if it were a delete on unowned, I'd probably have to utilize midi right?
exact same syntax, that's half the point of warpgate π
Also for keeping it MidiQOL related, ```js
const usesLeft = item.system.uses.value;
if (usesLeft === 0) {
await MidiQOL.socket().executeAsGM('removeEffects', {'actorUuid': item.actor.uuid, 'effects': item.actor.effects.filter(eff=>eff.label === "Concentrating").map(eff=>eff.id) });
}
are you on the right tab?
Anyone knows how to make a Monster Trait give magic immunity, due to me currently needing a solve for "immunity to magic third level or lower" and as Tiamat wasnt a import option to look at i am confused, first why she isnt in the importable content and also me not being able to copycat it and change numbers xD
Named creatures are always copyrighted i believe
wow, what version of dnd5e, midiqol, dae, and foundry are you on?
Did you just edit that macro you sly Bugbear you @violet meadow
foundry 10.291, dnd5e 2.1.4
Do you expect Concentration to be active on the actor when you run this macro?
yes, for context, I'm using it for the createitem of the holy weapon BOMB, so when the caster chooses to bomb with it, it should end his concentration killing the effect on actor B and actor A.
I'm also using it for healing spirit which creates a temp item on the caster as well. Killing conc when it empties
It should be fine
If you care for it Moto, I have a holy weapon setup.
what happens to a duration effect when the item originating from it is deleted?
Did you mutate an existing item?
Yep
I've had bad luck in the past so I was afraid to do it again, the shilleliegh in midi srd ruined an item on me once. So I've been afraid to do it again. I did this instead:
the purpose of showing the warpgate answer was to give a line that will work under any condition -- owned/unowned, concentrating or not
I use a warpgate mutate, it can't break the weapon
100% was not a warpgate mutate if it destroyed the weaponn
shilleliegh does an item update IIRC
Yeah I think the shileleigh macro was just an edit of the item with args on/off
and cause of weirdness it broke the original item
Update line 1 in the effect macro to use your own compendium pack key
And the json file is the explode feature that needs to be in the compendium
Thanks for the info. I am trying to work out how I would have a socket message identify an actor to do a str saving throw. It seems like it would require me probably write a new function unless there is one somewhere I dont know about?
why does it need a pack name?
oh is it a macro.createitem?
Because it's adding the explode effect as a feature, similar to how a macro.CreateItem does.
But it warpgate mutates it onto them
oooh ok
so that second entry is an actual item I import gotcha now its making sense
the holy weapon effect macro goes on a simple empty holy weapon effect?
yeah 1 hour, I was letting dae handle that from the details tab
should be good with that
oh hold on
the burst item macro needs a slight change
I didn't include my helper function in it lol
Let me know when it is updated
Updated
By the way, is the Auras tab due to a module that adds it or is it due to a foundry update?
const roll = await MidiQOL.socket().executeAsUser("rollAbility", game.users.find(i=>i.name==="Peter").id, {request:"save",targetUuid:game.users.find(i=>i.name==="Peter").character.uuid,ability:"str"})
Get the user.id some way
If you ever want to cut out a bunch of duplicated code from my macros, you can this script into your world scripter folder:
https://github.com/chrisk123999/foundry-macros/blob/main/Macros/Utility/Helper Functions/Chris-HelperFunctions.js
Then you can cut out the whole let chris = whatever function from top top of any of my shared macros.
Active Auras module, if you mean a new tab in the DAE config window
why doesn't he have the macro repeat field? is that a bug in 2.1.4?
or does it only show up if the item has a macro key?
Active Auras and Effect macro are pretty rock solid required modules for most of the premade stuff you can yoink here into your own world btw. And we mostly use Em for repeating macro stuff
Install Times up
wow never knew that was a times up feature, that is strange lol.
macro repeat feild is times up not dae.
How do I have an item roll a template and deal only damage to enemies?
My thought is to use this macro as an on use?
game.user.updateTokenTargets(args[0].targets.filter(tok=>tok.disposition !== canvas.tokens.get(args[0].tokenId).document.disposition).map(i=>i.id))
but when should this macro be called?
args[0].targets.filter(t=>t.disposition === -1)
should this be a 1 line on use macro?
ok so mine is the good one?
After targeting complete
preambleComplete
will it cause all their spells or only THAT spell? I want it just for THAT spell
Item onUse, not Actor onUse and you fine
Thanks for the fix. Just applied it to my macro, although I rearranged where the function was kept.
Didn't realize that function was deprecated, this is what I get for having the yellow warnings in my console turned off.
Looking much better.
@vast bane something that can help in some situations and I keep forgetting π ```js
const concentationEffect = MidiQOL.getConcentrationEffect(actor)
oh god where is this suppose to go lol
Wherever you want to define or check for the existence of a Concentration effect on the actor
Do you want a tip? Open console.
Type MidiQOL. and go through the auto completion entries! Heaven
DAE. too
I've moved on to automating Wither and Bloom, I've already decided I'm changing the spell, its too dumb to cost a spell slot and hit dice. So my version is just aoe damage and then pick a target in the same template to heal
How many targets?
just one?
1 target
Do you wanna try mine?
If you got one I'll take it lol
Clicking on it in console and looking at the code to figure out how it functions lol
None of these functions are documented at all lol
It's a bit too much π
https://github.com/thatlonelybugbear/FoundryMacros/blob/main/Healing_sliders/healing_sliders_3_targets_withMidiQOL.js
Heals 3 friendlies in 30ft radius, up to a total of damage dealt in principle
sliders ftw
Hey, Tim! No I still am not getting the whole macro to work as there don't appear to be Dex saves or damage applied to the bystanders.
Could you show us the macro you're using?
Disable ASE module
This one here.
Hi there. I am currently trying to program the potion of giant size, and I am having trouble with its function for tripling damage. Is there a way via midi qol to multiply a weapon's damage output by 3? The attribute key + mode I have been using does not work for such function, and I don't know if there is a better method to solve my issue. Any help is much appreciated
Aww, but it's so cool looking. I'll give it a try though.
You are using a v9 module that is known to create issues with lots of stuff (until its updated to v10)
ASE is currently buggy at the moment on v10
Do you use Activation Conditions in general?
Ah nah scratch that
I have a potion of giant size automation available. Requires a little bit of setup however.
Actor on Use, setDamageRoll 3*roll probably π€
https://github.com/chrisk123999/foundry-macros/tree/main/Items/Potions/Potion of Giant Size
First js is the item macro, second is an on use, and the 3rd is an effect macro to revert the extra HP.
Let me know if you run into trouble with the setup
You could consolidate all in one ItemMacro
If you give the potion to someone else I don't think it can reference the item macro on them?
I guess the whole thing could just be a hotbar macro and be one macro.
The AE icon is supposed to be visible to the tokens around Sefris, right? I don't know where in which channel should I ask this question about this module
If it's an AA, not always. You can look on the effects tab on the other nearby creatures to verify it's working.
not seem
where is the item macro stored?
If done as an item macro, on the item in the actor inventory.
The on use feature needs to work for everyone. So that should be saved in a folder.
was trying to puzzle out if bugbear was correct
flags.midi-qol.onUseMacroName CUSTOM ItemMacro.whatever will be looking for the item on the character. And they won't have it.
but...im a bit out of my depth on the workflow here, so nevermind me π
go to the first tab and FORCE SHOW = 1
Also just an fyi, midi hates suspended effects, don't use dnd5e's srd compendium for any spells/features that suspend effects. Bugbears profile has his github link, get midi srd from there it solves that problem. If you are trying to make the paladin aura, its already in midi sample items in your compendium tab
so the auras module doesn't work if i use midi?
it does
there are nuances you have to deal with for some things when midi and aa are running
but if you explain what you are trying to do we can help you better
I just wanted to make an aura of say 20ft that would give resistance to all damage
the default setting for active auras is combat only, so you prolly aren't seeing a dang thing if combat isn't active
Tried deactivating Advanced Spell Effects module, but macro is still not fully working.
its probably really wonky midi settings
I don't see merge card, I don't see check hits, I don't see check save
do you have require targets on at all?
how bout target with templates?
You can do flags.midi-qol.onUseMacroName CUSTOM ItemMacro.Item.uuid, macroPass
the damage multiplier works (thank you!), but I am not getting the item macro to apply, likely due to me not completing a certain step. How do I get the item macro script to activate?
Any errors in console?
Oh, good to know.
And also ItemMacro.compendium.macro.uuid
the same thing
Is the item macro setup on the item. As in when you scroll down on details it has ItemMacro set in the on use field.
And that the SD card icon at the top has the item macro pasted into it.
show me the first tab of the active effect on the item on the actor who has it
and show us the effect key you are using for the active aura
Theres many things you could have wrong here.
- You could be using the DR key instead of dr key for damage resistance(very common mistake with new midi users)
- You could have no value in the keys effect value field
- You could actually have a functional aura, but its not displaying the ae
- You didn't roll the item and its set to roll.
- You forgot to link the actor and its not on the canvas actor.
- You could have the wrong version of active auras installed.
@last loom β¬οΈ
commons.js:1703 Error: You are accessing the ChatMessage#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly.
I changed some setting and got Auto saves, but only by the targeted token, not the ones next to it.
thats probably your midi target settings at the top of the workflow buttons workflow tab
I've got Walls Block, Ignore Defeated for both targeting settings.
I sent you my settings. Check if it works with mine
Did that fix it? Also depending when you copied I noticed there was a small miscalculation on the heal in the item macro that has since been fixed.
okay, but the idea is that the effect is applied to the nearby tokens, even though it is not that effect, it is not being applied to the surrounding tokens
@last loom Pro tip on figuring out DR and dr:
Damage resistance key is a system key with a lowercase .dr
Damage reduction is a midi key with a capital .DR
resistance halves
reduction reduces(or adds) to the value based on what you put in the field.
(and for nuanced advanced points, the dr.all key is a dae key I believe technically that parades as a system key)
yeah, the item macro was enlarging the token by a lot for some reason. the hp did not change when it was activated
Fixed now, still not applying to nearby
damage the actor whose not showing it
i was using the atl attribute keys to enlarge the token's size
idk if that has to do with it
Very likely, my item macro is hardcoded to change one of the keys.
legend. Thanks bugbear, amazing as usual
system.attributes.hp.max must be the 4th item down on the DAE.
if it still doesn't work after testing damage dealt to the actor, show us every tab of the active effect.
and the items details tab
ok, ill modify the order of things. should i have the atl size keys on the effect, like what was shown on the screenshot?
Midi does not work with:
Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e
Advanced Spell Effects module is in beta in v10 and often the culprit of things..
is that Wire guys?
Only if you want the token to actually change size.
aight
Well, I don't know why the bonuses are not applied to Zanna
I can tell you the line to change in the macro if you want to setup your effect keys differently.
do you have any of the above modules installed?
what module is doing the red message
Also do you have proper grid for distances etc? You never know π
health monitor, it only shows the life that is subtracted from a token either manually or by midi
show us every tab of the active effect ON the item on the actor that is the aura, then show us the details tab of that item
my grid config
Also what version of active auras are you on
I wouldn't doubt it if kandashi's modules got hit by the version package thing thats hitting a bunch right now
0.5.6
k then show us the 3 tabs of the items effect, and the details tab of the item
4 tabs
we wanna see the aura tab too
@scarlet gale changing the order did fix that issue, and the Max HP has been multiplied properly, but the current hp of the user did not increase to be proportional to the new value
Just so we're not assuming, those are all starter heroes right?
It should just double your current HP.
It is just an AE that is applied manually, there is no item in between
What did it do for you?
I...I don't think you can do an active aura as a ce...
I've never tried it now you got me curious
I'm pretty sure thats impossible
I think you can.
yes and there are two bears below
right click and edit the CE, show us all 4 tabs
right click it in that menu on the left side of your video
It increased the maximum hp, but did not raise the token's current hp to be proportional
idk if the token being slightly hurt messed with the function
do not modify current HP with an AE
can't believe I never thought to try a ce as an active aura lol
(if that is what is being attempted)
It's not.
Screenshot your AE for me just to verify.
Starter heroes are yellow by default
The item macro is applying a heal for the current HP after the max HP is being set.
the AE on the item
not after it's been applied
should be 0, the item macro will update that field
whoops, sorry bout that
i had the current and item effect open, sent the wrong one
does the chat log show a midi damage update?
yes
I got them from here
can you edit the convenient effect in the dfreds CE window and show us all four tabs of that effect?
Could you screenshot it?
your problem is 99% likely to be in those four tabs and you have yet to show us
CE is the action effect "Test"?
there should be a dialog box showing the token getting healed
Looks like this
oh
the healing prompt is right there, but it did not apply given i did not approve it
the macro works
im sorry about that
all good
give me a minute let me try to replicate this, but a dfreds CE as an active aura is...unique
okai
Good to know that the midi apply damage function still prompts you
Instead of just doing it
yeah, glad it does. thank you again for this setup; the end effect macro works to make the temp hp, so everything is good to go
in the aura tab, remove the ft in radius
If you edited the CE, then you need to reapply it for it to update on the actor, and dfreds CE can infact be auras /impressed
still not working π¦
you probably haven't reapplied it?
I literally just replicated your setup and its working
export the Item and someone can take a look
show us your active auras settings
yes i did
its not an item
is it just the CE?
its literally just a CE
works fine for me
lol
show us your aa settings
disable all modules except libwrapper, socketlib, Dynamic Effects using Active Effects, Active Auras, and Advanced Macros
and test again
and dfreds?
oh yep and dfreds
although if its on him it would work lol as a regular ae
I haven't this Advanced Macros
its only required for template auras anyway you should be fine
xdddd....
go to the compendium tab
DELETE the aura of protection thats ON the paladin
drag aura of protection out onto the paladin starter hero
I put a paladin on the field then?
yeah
in which folder is that aura?
What version numbers do you have for:
Foundry
Dnd5e
midiqol
dae
dfreds CE
pretty sure compendium tab doesn't have folders
unless you installed compendium folders
@violet meadow you were testing with 2.1.4 right?
oh there is a folder active auras
honestly its a bad test cause that active auras compendium is a disaster
I give up, if someone else wants to go through it all again with you fine but at this point, It has to be something between you and the computer
either user error or the pc is screwy
what operating system is that?
windows 11
Does it apply to you things to nearby tokens just like I had?
I have to be away for a second, I'll read everything you answer and when I get back
nah I'm givin up, nothing makes sense from what you've shown us, so you must have an issue with your foundry install or what we assume you are doing is not what you are actually doing.
Also FYI, while you CAN do dfreds CE with active auras, its not wise to. When you toggle off the aura, all of the tokens retain the aura effect
Heyo, trying to figure out how to untarget a token during an On-Use macro's workflow. Got as far as copying to workflow to edit it, and I know which token in the array I want to untarget, but I don't know what to write to remove it from the list of targets
I'm basically just trying to remove the actor using the item from the list of hit targets, even if they're targeted
don't want them to hit themselves with it :P
One thing occurred to me, what if you export me an Item with a CE that has an Active Aura that works for you so I can put it on myself and see if it works for me?
figured something out
const params = args[0];
const workflow = MidiQOL.Workflow.getWorkflow(params.uuid);
const sourceToken = canvas.tokens.get(params.tokenId);
let targets = canvas.tokens.placeables.filter((target) => {
return target?.actor?.system?.attributes?.hp?.value > 0 && canvas.grid.measureDistance(sourceToken, target) <= 15 && target.document.disposition !== -1 && target !== sourceToken;
});
await game.user.updateTokenTargets(targets.map(t => t.id))
workflow.targets = Array.from(game.user.targets).map(t => t.id)
if anyone's curious
one thing to note -- canvas.grid.measureDistance (singular) will not follow your current grid rules (5/5/5 vs 5/10/5).
you may want to look at the script i put here -- #macro-polo message
using measureDistances (plural) and the second option argumennt
that function will return the "actual" grid-based distance between two tokens
Midi also has a function for this as well
where can I find that?
Trying to find the function, I'm on mobile
One of the functions that pops up should be one to measure I think
MidiQOL.findNearby
Maybe I'm crazy, I swear there is another
* @param {number|null} disposition. same(1), opposite(-1), neutral(0), ignore(null) token disposition
* @param {Token} token The token to search around
* @param {number} distance in game units to consider near
Is the docs for that function
MidiQOL.getDistance?
That sounds right
There is checkNearby as well
Both have good uses
working like a charm
why would I use findNearby or checkNearby instead?
let targets = MidiQOL.findNearby(1, sourceToken, 15).filter((target) => {
return target?.actor?.system?.attributes?.hp?.value > 0;
});
Say you want to find all tokens around a specific one
This (should) also do the same thing
I'm liking how much cleaner that is, thanks
I'm still trying to understand what spell/effect you are trying to emulate in the first place π€
from the Solar
Oh.. You don't need a macro for that π
I've had many homebrew creatures with explosions centered on self
please elaborate lmao
Range special
Just set the target like this
Of course range whatever the range of it is
So 5 -> 15
What is range special doing there?
It makes it target everything except the creature itself
If instead you set it to any it would also hit itself, iirc
what's the difference in choosing creature/enemy/ally/radius?
Radius makes it a template
The rest is just disposition based
So creature = any disposition, enemy = opposite (/neutral) disposition, ally = same disposition
hm, I have it set to 'Enemy,' but it's not targeted anything around it
neither neutral nor opposite disposition
screenshot your setup?
Hmm, what is your settings for ranged set to in MIDI?
You want this one set
(To anything except None)
aaaaaaaaaaaaaah
that was it
thanks guys, was too lost in the macro sauce to think of a way to do this simply lol
I've seen it a couple of times, the setting is not super obvious what it does, and it was even less obvious before the help text below got added π
This feels like a really dumb question at this point, but is there some simple setting to both
a) Allow automated rolls, late targeting etc.
b) Still allow items to roll and output to chat even if no targets are selected?
I feel like I had that working at some point, but as of now the only way I can get attacks, etc. to output to chat is if I select a valid target
There is a setting to allow no targeting outside of combat
and presumably no targeting at all
check your midi settings
Hmm I'm somehow now more confused, I already have that set to never
not a rush, but just checking, was there supposed to have been an update recently pushed for DAE/midi? Thought Moto mentioned it a couple/few days ago
Just to see if I could figure it out, I tried moving the radio to the left where it should be and also added an event listener so you can click anywhere on the row to select (not just the tiny radio dot)... here's the code if you're interested:
// Update dialog table
let trs = document.querySelector('.dialog-content').getElementsByTagName('tr');
for (let t of trs) {
t.style.display = "flex";
t.style.flexFlow = "row-reverse";
t.style.alignItems = "center";
t.style.justifyContent = "flex-end";
t.addEventListener("click", function () {t.getElementsByTagName("input")[0].checked = true});
}
let ths = document.querySelector('.dialog-content').getElementsByTagName('th');
for (let t of ths) {
t.style.width = "auto";
t.style.textAlign = "left";
}
let tds = document.querySelector('.dialog-content').getElementsByTagName('td');
for (let t of tds) {
t.style.width = "50px";
t.style.textAlign = "center";
t.style.paddingRight = "5px";
}
Neat
learning js is way more fun when you're cleaving π
Legit surprised you did this lol
This function can be copied and pasted into the magical inspiration dialogue btw. It uses the same helper function.
yeah @dark canopy will come through with a WG update and make it irrelevant but I like this kind of problem solving
Awesome, I've accidentally helped myself then... will whack it on our bard
Your for loops don't need a ; at the end by the way.
thanks β I know they're optional in some cases so always use them out of paranoia
Time get a proper code editor π
I'm using Sublime... what should I be using?
Mine actually yells at me when I have unnecessary semi-colons
I've been using vs code
And I have another module in foundry that gives it a somewhat proper editor
Is that Whistler's one? I should get into that
not sure
I need to double check the name, it does get a bit confused about using await outside of an async function
Since it doesn't appear to know it's already running async
Monaco π
I'll give Improved a go
Just just needs to ping the token when you click on the image.
OK lemme see about that... I've simplified a bit btw
that image border is bothering me anyway
I was thinking the same thing
Let me know if you need help with the function to ping the token
the new warpgate notice function might be useful here
thats what the paladin aura was. You got something wrong on your end.
one question, i try to use the Protection from evil and good spell macro from https://github.com/chrisk123999/foundry-macros/blob/main/Spells/Protection From Evil And Good/Chris-ProtectionfromEvilandGood.js (how should I use it? no instructions... I have tried ItemMacro, but it doesn't seem to apply DA against undead, fiend, .....)
ahh ok, I don't have that module installed :D, no wonder it didn't work.
if you go that route make sure to look at how the module functions
what exactly does this module do?
you drop the macro into it's compendium
then reload your page
It allows you to do worldscripts without messing with your world files
Radius I believe counts from the center of the creature, and the other doesn't count the creatures space, think size of spiritguardians vs size of fireball circle. Enemy/ally/creature is choosing dispositions. if you have to use radius, I have a macro above here today that I put in so that friendlies would be ignored.
But can't be used for stuff that requires an earlier hook
its probably likely that you can change midi to off temporarily if you wanted. Its a clientside setting so anyone could toggle it for a sequence where you needed to run without targetting.
I think my own version took a mulligan and used advantage reminder
I couldn't use it, I use fast foward π
Whatever you wind up using, make sure it doesn't apply dfreds CE, as I believe he has one for it.
I changed my midi settings to use DAE effects over CE ones to avoid those kind of issues
depending on if you actually apply an ae with your premade, theres a chance that dfreds still fires, like if its all in an item macro
I embed all my effects
Yeah if one uses macros a lot, DAE prioritization will solve lots of headaches
I only use CE for conditions
does dfreds/midi know if the ae is in the item macro?
No
I use my module for conditions π
But an item macro would have to go out of it's way to apply a CE
if the item rolls, and it has no dae attached, wouldn't midi think dfreds should apply?
then yes
Then that is what I was getting at 8)
Midi has an option to use DAE first, then CE if there isn't a DAE
yeah, but if your automation doesn't preplant the ae on the item as its rolling, I think midi would accidentally think the dfreds is needed
Either way I'm super paranoid and check the boxes anyway in all mine
I suppose so, but I can't think of a single spell where I wanted no DAE but CE has one with the same name.
Enlarge reduce
oh interesting
Was there faerie fire too or I misremember?
Yea that one has one
I dunno but I use midi srd's faerie fire
I use the ddb importer as a base and it takes care of the basic spells like those
its also an easy way to recreate the ATE wildcard bug
faerie fire and enlarge/reduce in dfreds
Could you (if it's not too much trouble) make me a video recording of what the passive would look like at work granting the bonuses to those nearby? To know if I'm doing something, or if I'm missing something to configure.
I can't share you an item because I'm not beta testing 2.1.4
okai
if someone on 2.1.4 wants to give them the aura of protection they have they could try it again, but they already couldn't use the active auras compendium item either
(but the active auras compendium is kinda broken so that was a bad test)
I also couldn't suggest midi sample items because only spirit guardians works for auras, the pally one is broken
Oh...
also like I said before, you do not want to use dfreds CE's for active auras, the toggling off causes the aura to persist on the tokens as they no longer have an origin point to know they have left the range.
Generally speaking I think its wise to attach all ae's to a source item, ae's without an item/origin seem sloppy to me, but thats probably an aesthetic thing.
i think the only thing i'd suggest is to slap this into the render callback for menu π
That'd be cool if you get the ping to work pre selection, then we won't have to reference token names in the dialog anymore
I'm a fan of not force spoiling names
is that directed at me?
actuall Chris and Lukas but both are hard to ping lol
It already is π
oh, excellent π§ , i think the use of document rather than the passed in html is what threw me
I know how to use the Anonymous API to not spoil but I'm not a CUB user
That would be better, in the extreme case someone has two dialogs up
Hi All, I have a question that also involves Active Aura and DAE.
It seems when I place the spell template with a effect (Silence).
The effect is actually applied twice? Did I mess up somewhere?
you need to check activation checkbox on item details and put the world false in activation condition
the problem in this case is that midi should not be used at all, and to pull that off, you cause a false activation
you want active auras thing to fire not midi's
otherwise everyone becomes an aura
(You also need advanced macros installed, but we believe purely because nobody has rewritten the aa helpers item macro to ignore it)
Sorry newbie question, how do I "put the world false in activation condition" ? Is it in the config?
Never mind I am just very blind. It is in the item card
@scarlet gale
this is working:
// Update dialog table
let trs = document.querySelector('.dialog-content').getElementsByTagName('tr');
for (let t of trs) {
t.style.display = "flex";
t.style.flexFlow = "row-reverse";
t.style.alignItems = "center";
t.style.justifyContent = "flex-end";
t.addEventListener("click", function () {t.getElementsByTagName("input")[0].checked = true});
}
let ths = document.querySelector('.dialog-content').getElementsByTagName('th');
for (let t of ths) {
t.style.width = "auto";
t.style.textAlign = "left";
}
let tds = document.querySelector('.dialog-content').getElementsByTagName('td');
for (let t of tds) {
t.style.width = "50px";
t.style.textAlign = "center";
t.style.paddingRight = "5px";
}
let imgs = document.querySelector('.dialog-content').getElementsByTagName('img');
for (let i of imgs) {
i.style.border = "none";
i.addEventListener("click", async function () {
await canvas.ping(canvas.tokens.get(i.getAttribute("id")).document.object.center);
});
i.addEventListener("mouseover", function () {
token = canvas.tokens.get(i.getAttribute("id"));
token.hover = true;
token.refresh();
});
i.addEventListener("mouseout", function () {
token = canvas.tokens.get(i.getAttribute("id"));
token.hover = false;
token.refresh();
});
}
I added an id to the image in the menu options so it pings the right token:
let html = `<img src="` + texture + `" id="`+ i.id +`" style="width:40px;height:40px;vertical-align:middle;"><span> ` + name + `</span>`;
@dark canopy I wasn't sure how to ditch the document for html β tried a couple of variations but they didn't take
looks a lot better without the image border
does it ping the token before choosing?
It pings when you click on the token image above βοΈ
I don't see how you can ping before choosing
so if they click the image it pings?
yeah I guess so you can tell which one on the canvas it is without having to cross reference
ping might be a bit obnoxious β putting the token in the hover state might be better (like when you hover a combat tracker row)... but that's what Chris wanted
I'll mess with converting it to a warpgate alert when I'm home.
Plus do the html thing that was mentioned
Hi I have a question I am even a bit embarrassed to ask: Where is the elusive Midiqol Macro Compendium located? (I just want some examples)
Pretty sure you just need to pass in the html variable.
We've been told we can't have a sticky for it but here ya go:
Midi SRD fork that is v10 compliant:
https://github.com/thatlonelybugbear/midi-srd/blob/master/module.json
Chris' github full of his premades:
https://github.com/chrisk123999/foundry-macros
Mr.Primates github macros and more:
https://github.com/MrPrimate/ddb-importer/tree/main/macros
You can also search this discord for various things names and likely find a midiqol premade for it.
And finally ask if you can't find what you are looking for.
Oh one more:
https://foundryvtt.com/packages/more-automated-spells-items-and-feats
Have updated the above so it highlights token when you mouseover and pings on click... if you do update your macro you'll need to add that id to the img and yeah pass in the html if you want
Did you see where I moved your function to in my last revision that included your stuff?
It doesn't need to be all the way up in the main function.
By Azuth you are amazing! I will see what I can find in this dragon's hoard
My stuff in there is lacking good documentation, but ping me if you have a question how something is setup.
When in doubt ask us, theres a bunch of modules that are required for some premades that nobody really talks about mainly cause its a faux pas to suggest modules before one needs them
Yeah I just checked that out β now I see what you're doing with the chris functions
It's like that because on my own setup it's buried away in a world script.
yeah that's smart, making reusable components
thats basically the premise of midi srd isn't it?
in a way same idea as dfreds CE too, centralizing the moving part so that its just one place you need to tweak
except that we're discovering with midi srd that theres still the isssue where the items sometimes need to be patched with new settings hehe
I mostly make non srd stuff so that will never happen
has anyone come up with a use case for the offhand checkbox?
but then it'd be permenantly offhand
wouldn't it just be wiser to versatile them since a versatile weapon usually can't be dual wielded?
I'd trust a player to check that box then know how to fix a damage roll
I already replaced the empty versatiles with the offhand formulas for the light weapons hehe
Pretty sure my players don't know the details tab exists
My players do cause they abuse the heck out of melvins and make new images for all their items lol
though thats not necessarily the details tab
My players only commented: I like this better then roll20, why didn't we use this from the beginning?
More obscure and not officially partnered with wotc
and the DM must enjoy DnD and Javascript at the same time
Only for high automation
That is true. But for sure it saves me a lot of time
lol, "enjoy" javascript. One of my least favorite languages
My least favorite language is Thieves Cant
Anyone ever used Druidic?
I'm using it on the fifth floor of ||dotmm||
Youβve been on level 5 for months!
nope
they haven't even gotten there yet
I dunno about other folks running that module, but my group is in real time 24/7 in session and its taking FOREVER. Its about 4-5 six hour sessions per floor
they just arrived on floor 4 via the portal on 2
I am using the companion+homebrew+published book so theres alot of RP sidetracking
I was a player at the time
2 sessions ago was 4 hours of shopping
We got sidetracked with Demon Queen Awakens and now weβre totally sidetracked with new characters for A House Dividedβ¦ still messing in Skullport in our original campaign, which weβll go back to in a year or so
I really want the faction window from house divided π¦
Once you get a taste for native Foundry adventures itβs hard to look back π
I'm lovin the supplemmental content for the published stuff, I think the dotmm companion is the best book i've ever purchased
Seems like the kind of mini module Xaukael would have whipped up in a jiffy
I dunno if its possible since its in a paid module
I really like how RSR shows the actual dice number on the right of the totalβ¦ wonder if this can be shoehorned into the midi merged card somehow π€
Dice So Nice 0_0
Post an issue to midi, I'm sure he'd take a look, even easier if you can PR it
wait, this might actually be already in it
can you pull it off with the tooltip settings?
I don't a functional tooltip with the tooltip setting lol, so either I don't know what a tooltip is or I got a module conflict
Is there a way to roll attacks when no tokens are on the board (theater of the mind)?
I've tried so many settings but nothing is having an attack show up
Don't require targets setup, and also I think this setting matters:
You could also turn off roll automation temporarily but its a client side setting
Isolated the issue, seems checking the "roll a separate attack per target" box means that when you have zero targets, it rolls zero attacks
(Context for those who didn't see, MIDI setting should have been letting rolls be made without targets, but nothing was actually being rolled)
This fixed it
Oh lol @ivory iris I didn't even realize you were asking about this too
Lmao. Thank you tho! Have a TOTM fight planned for session 1 tmw so this helped a ton
I was having this issue last week and was trying to fix it today
No problem haha, gonna go submit an actual issue report now
if you wanted to get real clever -- create multiple crosshairs with locked positions using a different fill color, then use that same color in the dialog π
Hey guys, is it possible with midi to have a weapon, in this instance it's a Charge attack my player has, that when it hits causes a Monk's Token Bar contested Ath/Acro check and have the loser have the DF Convenient effects prone?
Item On use, requires dfreds, MTB, maybe advanced macros. Also its technically shield bash so it offers either prone or move 5 ft.
I think bugbear has a better version, I'm lazy at updating things
I got this when I tried to use it
can you DM me the item and I'll have a look.
If you apply the potion to someone else the itemMacro should still fire correctly.
did you leave in the discord codes at the top and bottom?
Ah I did not know those bits aren't a part of this, sort of clueless with macros
```js at line 1 remove
``` at the bottom remove, sorry i don't know how to make a clean text link
You also need to make sure that the setting for "players can request" is turned on in Monks tokenbar
oh duh, it also requires warpgate
(and jb2a animations)
Yep! That fixed it, luckily I also already have that one enabled
prolly free is fine
oh and sequencer, wow our premades always require alot of modules lol
Already got that one too π₯² my module list is monstrous
One last thing, I have a shield that applies +3 to AC to some allies as well as giving the wielder 25 temp hit-points. Problem is, when I click the item it auto-applies that effect I configured to the wielder who shouldn't get the AC boost
When I click the "healing" button that is, not when I click the item
you will have to do that with a macro
though I wonder if you have abnormal midi settings or are using two rollers just from what you said
If I was forced to make that item, I'd make it two items and have one item rol lthe second one with late targetting turned on
it's these settings that seem to be causing me grief, because it's easy to just have it manual but that breaks a bunch of other automated items
or make it just the shield ac item, and then an on use macro that updates the source actors temphp on item use
why would you have a healing button in chat?
thats the abnormal thing to me
but lets stop beating around the bush:
Midi does not work with:
Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e
Advanced Spell Effects module is in beta in v10 and often the culprit of things...
I don't have any of those
then you didn't have a target when you rolled the item?
Putting this in the item gives me the Healing button in chat
It's set to self
for the target
is a healing item an attack roll guys?
I'm confused π should it not be configured that way
You must have the top checkbox unchecked, which is fine, just weird:
I'm not a fan of fast forward, but I atleast auto roll lol
Oh I and my players prefer it off so that they can add anything circumstantial that i haven't spent time automating
We run with a decent whack of homebrew so it's hard to go about configuring each little thing
I would make the item the ac buff instead, and then get an on use macro to heal the source actor for the temp hp
auto roll attack is not fast forward, its getting rid of the really redundant card with the buttons in it in chat
if one rolls the item, tthey don't need to confirm rolling the item again in chat imo. Thats why virtually every roller module adds this feature in.
Ooooh i was unaware of that, I just turned it off on install and never thought about it
I interpreted what that did wrong my bad
its ok, was just pointing it out
I don't know how to write your macro for you though, and #macro-polo won't' want to help with a midi on use, I can say if you change it to an effect macro you might be able to sneak it into #macro-polo
I'm guessing you'd have to use the origin or source code from effect macros api to pull the source actor and update its temphp
its not about sneaking π© we just have no idea what any of the args and workflow calls mean
For Item Macro you'd have to define the args of the source actor and then update its temp hp
the macro would be basically
Define the actors temp hp data path
Add 25 temp hp to it.
Since its always going to be an owned token, you can sneak this in as an effect macro
(I'm being silly with the sneaking badger)
hehe, and not wrong -- if you know where to get the root data, #macro-polo knows the api inside out to get that data to where it should be
that's usually the main issue, getting that root data
(for anyone, not just midi users)
I think you might be able to plagerize stuff already made, the first thing that comes to mind is one of chris' lifetap macros like vampiric touch I think
Iβm just imagining the midi family of modules sneaking into #macro-polo in a big trenchcoat
Bugbear, Chris, and Fotoply in a trenchcoat?
Now I gotta find a photoshop for this...
oh duh, an item that macros in temp hp, I just made this
let damage = 25;
if (damage != 0) {
let sourceToken = args[0].workflow.token.document;
await MidiQOL.applyTokenDamage([{damage: damage, type: 'temphp' }], damage, new Set([sourceToken]), null, null);
}
Theyβll be keeping a sharp eye out for the long furry arms
only on bugbears turn
anyone want to check my macro?
oh wait we don't want to check targets
get rid of line 1
could he just use line 3 and 4?
and instead of let have it be const?
also its worth pointing out since you had really abnormal settings, I'm not sure if applyTokenDamage will work if you have damage off
one of the gurus will chime in and correct me eventually i bet
Well I put that in to the item as an on use after active effects and it seems to work?
it should put a midi whispered damage dialog in chat adding the temp hp
It does indeed
so depending on your settings it could be that only you see it. I have a asetting on that shows the players a public version of that card too, but the Dm can't see that card, you only know its on if you look at workflow button/workflow tab/damage and see the first drop down setting to yes/no + damage card
(or log a player in along side yourself and watch their chat
I believe mine is set so that only i can see it currently
Where would be the best place to learn to write my own macros should I want to?
I just kind aplagerize and learned by doing
#macro-polo could give you advice on learning js, but you have to kinda learn the api's of all the various modules, item macro, midi, effect macro, dfreds ce, warpgate
but honestly copying already existing stuff gets you pretty far, I'm a total newb and came up with your macro for you
Can I use Advanced macros on a player account to execute a macro as another player?
The macro i want it to do is simply "Roll your hit dice and heal yourself"
this might be me just completely dropping the ball, but I can't seem to get a spell effect to actually apply, I'm trying to get pass without trace to apply an effect when the spell is used on the person who used it (and hopefully aura if I can just get it working for the one person), the effect just... doesn't activate when the spell is used, even when I click the apply effect button in chat
nevermind it's me completely dropping the ball i'm so sorry
I actually don't think that spell is an aura but its your call if you want to call it that, either way if you don't go the aura route, if its an instant pulse buff, then you can just make a blank pass without a trace spell that targets All allies within range, and then left midi+defreds handle it since dfred also doesn't call it an aura and has it already made.
If you go the aura route, just drag dfreds ce for it onto the spell the druid/ranger has, so it adds to the item as an effect. Then use active auras(you might be able to babonus this)
man, been playing for 3 years and this is the first time I realize it isn't actually an aura, world shattered
I think its loose enough in wording that either way could be interpreted
(but a pulse is easier to automate in foundry hehe)
it is a roll mod, so I bet you someone with babonus will chime in saying how to set it up, I have yet to figure out how to get babonus to work with midi automation
@violet meadow
Animate Dead in midi srd is misbehaving pretty weirdly. it also throws errors due to having sanity enabled and you are pulling from a locked compendium. Might I suggest if you do revisit this, just doing a simple warpgate summons like spiritual weapon, and don't try to pull from a compendium?
Oh did that get patched in 2.1.x?
Nice!
its only a side problem though, the main issue with midi srds animate dead is that the token has no image and its called "MidiSRD" lol
but the sheet is very definitely the zombie from dnd5e's compendium
I just created my own:
const [spawn] = await warpgate.spawn("Zombie");
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
In my world skeletons don't exist -_-
oooh but I see a good lookin dialogue that I might steal
No skeletons? Everyone is ooze?
Its my way of saying I can't do warpgate dialogs lol so everyone gets zombies
Hmm, maybe two versions of the spell would be easier than a dialog
But that dragon's breath I was wrestling with was an example of a warpgate dialog
I think I'm using chris or mr primates dragon breath
https://github.com/trioderegion/warpgate/wiki/Basic-Menu a decent template
Man I'm having a devil of a time converting the dialog from midi srd to work with my simple zombie spawn macro
const buttonData = {
buttons: [{
label: 'Zombie',
value: {
actor: { name: "Zombie" },
}
}, {
label: 'Skeleton',
value: {
actor: { name: "Skeleton" },
}
}
], title: 'Which type of Undead?'
};
let dialog = await warpgate.buttonDialog(buttonData);
const [spawn] = await warpgate.spawn(buttonData);
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
Hows this?