#MidiQOL

1 messages Β· Page 60 of 1

coral dove
#

I'll work on setting the damage type on the flag later

#

Don't understand the qol is not defined error tho, am I now allowed to call on midiqol inside the onUpdateTarget hook?

kind cape
#

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)

molten solar
#

if( !target.flags?.["midi-qol"]?.elementalBane) return;

kind cape
coral dove
#

That is sensible

molten solar
#

You had one too few πŸ™‚

kind cape
#

Right, I am tired.. Of JS πŸ˜‚

dark canopy
#

shakes head not me, i just grab proto data and change what im told

barren flume
#

So they are friendly between each other now, and the enemy is neutral that they're attack but they're still not getting flanking

vast bane
#

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

dark canopy
#

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

vast bane
#

red should target green/blue, and green/blue should target red. Yellow, I'm pretty sure, is ignored

vast bane
barren flume
vast bane
#

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?

molten solar
#

There's a naughty lack of refactoring is what there is

vast bane
#

I got it a very very very long time ago lol

#

am I right that the underscore is not suppose to be used?

molten solar
#

in _id?

vast bane
#

yeah isn't that a console only thing

molten solar
#

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.

vast bane
#

I really like these kinds of dialogs, if they are actually dialogs, where the choices are all presented and you one click it

molten solar
#

im gonna rewrite it for shits and giggles

vast bane
#

I got it from macro polo waaaay back over a year ago I think, so its either you, flix, or freeze lol

coral dove
#

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)}```
vast bane
#

log out args 1

coral dove
#

The target is there or I wouldn't get the flags

#

Should I get the token instead of the actor?

vast bane
#

yeah...cause its unlinked usually for targets

coral dove
#

Righto

vast bane
#

maybe this is an unlinked thing?

coral dove
#

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)

molten solar
# molten solar im gonna rewrite it for shits and giggles
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);
coral dove
#

I might share it if I manage to make it work and anyone's interested

barren flume
vast bane
#

@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

robust vault
#

yes, but that's the problem hahaha, I have a rogue with 2 weapons (one off-hand)

vast bane
#

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

robust vault
#

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

vast bane
#

you are not using the right things

#

there is absolutely no reason to add mwak/rwak stuff

robust vault
#

melee weapon attack, and ranged weapon attack

vast bane
#

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

robust vault
#

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)

vast bane
#

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

robust vault
#

So what was happening to me is a DAE bug?

vast bane
robust vault
#

Or maybe I should have separated it into 2 different effects? one for mwak and another for rwak

vast bane
#

the dae bug is for users who install 10.0.15 or later dae

robust vault
vast bane
#

nope cause I'm on 14 and never see it

robust vault
#

By the way, have you updated to 2.1.4 yet? or you still in 2.0.3

vast bane
#

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

robust vault
#

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

robust vault
#

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

vast bane
#

yeah thats why I'm not going anywhere

robust vault
#

I think you can update without problem to 10.0.24

vast bane
#

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

coral dove
#

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

scarlet gale
#

Then update the effect with that

#

If it's on a unowned token you'll need to use a midi run as gm function

stuck eagle
#

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.

vast bane
#

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

stuck eagle
#

Ooh, Cleave does sound similar.

vast bane
#

but if you say what the rules as written are for the item, that'd be easier to figure things out with

scarlet gale
#

My macro can easily be edited to include a dex save

vast bane
#

cause you could be describing Green Flame Blade too

#

Or Ice Knife

#

is it a melee attack that splashes to all nearby creatures?

stuck eagle
#

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.

vast bane
#

I think this is more of a case of cloaning Ice Knife imo

stuck eagle
#

I forgot about the pushing target part. lol. This is so overkill.

#

I was thinking Ice knife also.

vast bane
#

Only change it to melee, but the question is, does the sword damage the user

stuck eagle
#

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.

vast bane
#

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

stuck eagle
#

Again, I think that part could be replaced with a new small roll instead of necessarily be related to the original damage roll.

vast bane
#

If you dont mind them being new rolls, then you could very easily edit ice knifes macro to work easier

stuck eagle
#

Where can I find that?

vast bane
#

however, does it damage the sword wielder?

stuck eagle
#

It shouldn't.

vast bane
#

will take some work cause ice knife is a spell though

stuck eagle
#

Thanks!

#

Where do I find automation of the critical hit damage option?

vast bane
#

there is a flag for it

scarlet gale
#

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

stuck eagle
#

If the roll was a crit.

#

As in an overall Midi QOL (or other module?) setting, not for a particular item.

scarlet gale
#

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

stuck eagle
#

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.

slim summit
#

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

scarlet gale
#

just an fyi, you have some data.data in there

slim summit
#

yeah, I'm not good with programming, but with copy and paste I get things done

#

πŸ˜„

scarlet gale
#

if it's data.data chagnge it to system
if it's just .data yeet it

slim summit
#

hmm

timber horizon
#

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

scarlet gale
#

Is this for ray of enfeeblement?

timber horizon
#

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.

scarlet gale
#

ah ha

#

I knew I did something like this before

timber horizon
#

My hero

#

I'll check this out now

violet meadow
#

@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.

stuck eagle
#

Wow, cool!

violet meadow
#

Will proof read it in a bit cause no way I haven't messed something up πŸ˜„

stuck eagle
#

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. πŸ˜›

stuck eagle
#

Oh, ItemMacro is a new button at the top. I see.

wind pecan
#

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"?

scarlet gale
#

effect value field needs a 1

wind pecan
#

Ah.. empty is null then. ok

spring dove
#

Hey all. Is this part of Midi, or DnD5e module?

scarlet gale
violet meadow
#

Should it target only enemies?

wind pecan
coarse mesa
spring dove
#

Well shit. My Rest Recovery settings page is blank.

coarse mesa
stuck eagle
violet meadow
# stuck eagle 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

stuck eagle
#

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.

vast bane
#

it sounded like you were pasting the macro into the on use field which is bad.

violet meadow
#

You just need this in the main weapon as either an ItemMacro | After Active Effects or macro name | After Active Effects

vast bane
#

they will need to install item macro and if its a fresh install, go in and turn off character sheet hooks in item macro

stuck eagle
#

I've got ItemMacro installed, yeah. I pasted it into the ItemMacro and set ItemMacro as the text.

vast bane
stuck eagle
#

Oh, looks like the issue was that it wasn't equipped after I had dragged it from my items.

#

To the actor.

wind pecan
#

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)

stuck eagle
#

I don't know why Windows has decided to turn everything bright white when snipping now, lol.

hot flower
vast bane
# stuck eagle

I'm pretty sure you have two roller modules installed?

#

unless bugbear meant for the macro to repeat itself?

vast bane
# stuck eagle

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...

violet meadow
wind pecan
#

Is it necessary to give effects different priorities if you have multiple effects coming from the same spell/item/whatever?

stuck eagle
vast bane
#

You cannot mix rollers

violet meadow
stuck eagle
#

Now I've getting this

#

I don't see a roll for dex save or damage applying to nearby tokens.

scarlet gale
#

That still doesn't look like the midi chat card

violet meadow
#

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

stuck eagle
#

I joined one of the voice channels if someone wants to get on with me.

scarlet gale
#

Scroll down on the item

#

then screenshot it

stuck eagle
violet meadow
violet meadow
#

πŸ‘€

stuck eagle
#

Oh, maybe that happened after I deleted ll the empty things that were created when pasting in the wrong place.

dark canopy
#

(a player is mutating unowned tokens and pinging them to just the owner -- the gm observing, in this case)

violet meadow
stuck eagle
#

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?

vast bane
vast bane
#

dae's buttons and midi, sometimes don't update the UI when you click the + key

stuck eagle
#

It's to do with using proficiency dice instead of static proficiency bonus. I know, it doesn't make a lot of sense.

vast bane
#

you have to close and reopen and then suddenly you have 20 blank effects or 20 blank on use fields

vast bane
#

Does dnd5e really do that?

scarlet gale
#

I swear there is a setting for that somewhere

dark canopy
#

yes

vast bane
#

I know you can change to prof dice in dnd5e's settings, had no idea they did it...janky like that

stuck eagle
#

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.

vast bane
#

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

scarlet gale
scarlet gale
#

@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.

vast bane
scarlet gale
#

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

violet meadow
#

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

scarlet gale
#

oh

#

that looks super messy

coarse mesa
scarlet gale
#

Wanted to avoid doing that

#

Setup as an on use macro on the actor that's run after active effects.

coarse mesa
#

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

scarlet gale
#

I looked at the render thing and decided I'll just be lazy and clip the name to 24 characters

#

Β―_(ツ)_/Β―

coarse mesa
#

Be neat if there was a way to add inline CSS to warpgate dialogs

scarlet gale
#

the text takes html

#

But the dialog is made with a table and I didn't see any obvious way to customize that

violet meadow
coarse mesa
scarlet gale
violet meadow
dark canopy
coarse mesa
# dark canopy you can pass a render callback similar to regular dialogs, but at the moment, i ...

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";
gilded yacht
#

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 sidebarsettings It should be a configuration option (this might be hard/tedious to do)

gilded yacht
coarse mesa
coarse mesa
dark canopy
#

its because you are calling it immediately πŸ˜‰

#

render: chris.funcName

#

no parens, that evaluates the function

coarse mesa
sudden crane
#

@scarlet gale you should update your macro to MidiQOL.completeItemUse

robust vault
fluid cradle
#

Is there a problem with midiqol? I have the lastest 10.0.27 version and the workflow settings just dont save

violet meadow
#

Strange. I haven't encountered something similar

fluid cradle
#

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 :/

molten solar
robust vault
molten solar
#

Well then.

robust vault
#

So far it seems that both modules work fine. Even with automated apply dmg from midi

timber horizon
#

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?

sleek bone
#

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?

keen remnant
#

Should this not give Magic Resistance (spell saving throw advantage) or am i just missing something here?

violet meadow
violet meadow
keen remnant
#

Assume 1 to set the effect "true"

violet meadow
violet meadow
keen remnant
#

Also quick Question did anyone ever make the Adamantine Armors work? The make crits just hits?

violet meadow
keen remnant
#

oh yeah im in the process of setting things still up

violet meadow
keen remnant
violet meadow
#

It will ensure you don't lose your sanity !

keen remnant
sleek bone
violet meadow
sleek bone
#

Ahhh, well - Now that I have learned that I am less likely to bugg you lot here AS MUCH in the future ^^'

violet meadow
#

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;

sleek bone
#

Hmm, even after changing that nothing seem to happen - Now it does not even apply the "effect" to the token anymore

violet meadow
sleek bone
vast bane
#

Cause if it does fix that, then I think that kinda answers things as its always a positive to expand user experience

#

For context:

late fractal
#

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

vast bane
#

I need an on use macro that just ends concentration if it exists on the actor. Anyone help?

dark canopy
#

await warpgate.mutate(token.document, {embedded: {ActiveEffect: {Concentration: warpgate.CONST.DELETE}}}, {}, {permanent:true})

vast bane
#

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})
}
dark canopy
#

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 πŸ™‚

vast bane
#

Am I right in catching a missing period too?

#

after flags?

dark canopy
#

no, that is "map-style accessing", compared to "object-style accessing"

vast bane
#

phew, was gonna have to update a bunch of things lol

dark canopy
#

i.e. object.with.parts == object['with']['parts']

vast bane
#

Is there a way to link dropping of concentration when an item uses its last charge?

dark canopy
#

not inherently, but an item macro checking for remaining uses and killing conc could work

vast bane
#

ok so its likely item.system.uses.value

violet meadow
vast bane
#
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?
scarlet gale
#

Need a () around that

vast bane
#

I'm shocked thats the only part lol

scarlet gale
#

if (usesLeft === 0)

vast bane
#

isn't it a capital I?

last loom
#

Is there an attribute key to run "on combat turn start" macro?

scarlet gale
vast bane
last loom
#

okai thanx

last loom
vast bane
#

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?

vast bane
scarlet gale
vast bane
violet meadow
#

Use game.user.targets.first() instead

vast bane
scarlet gale
#

Personally I would just use the midi function to delete the effect, but warpgate is fine too.

vast bane
#

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?

dark canopy
#

exact same syntax, that's half the point of warpgate πŸ˜…

violet meadow
last loom
vast bane
keen remnant
#

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

last loom
vast bane
#

Named creatures are always copyrighted i believe

vast bane
# last loom

wow, what version of dnd5e, midiqol, dae, and foundry are you on?

#

Did you just edit that macro you sly Bugbear you @violet meadow

last loom
#

foundry 10.291, dnd5e 2.1.4

violet meadow
vast bane
violet meadow
#

It should be fine

scarlet gale
#

If you care for it Moto, I have a holy weapon setup.

vast bane
#

what happens to a duration effect when the item originating from it is deleted?

vast bane
scarlet gale
#

Yep

vast bane
#

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:

dark canopy
#

the purpose of showing the warpgate answer was to give a line that will work under any condition -- owned/unowned, concentrating or not

scarlet gale
#

I use a warpgate mutate, it can't break the weapon

dark canopy
scarlet gale
#

shilleliegh does an item update IIRC

vast bane
#

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

scarlet gale
#

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

late fractal
vast bane
#

oh is it a macro.createitem?

scarlet gale
#

Because it's adding the explode effect as a feature, similar to how a macro.CreateItem does.

#

But it warpgate mutates it onto them

vast bane
#

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?

scarlet gale
#

yep

#

just make sure the duration is correct in the spell

vast bane
#

yeah 1 hour, I was letting dae handle that from the details tab

scarlet gale
#

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

vast bane
#

Let me know when it is updated

scarlet gale
#

Updated

last loom
violet meadow
#

Get the user.id some way

scarlet gale
violet meadow
vast bane
#

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

vast bane
#

wow never knew that was a times up feature, that is strange lol.

vast bane
#

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?

violet meadow
#

args[0].targets.filter(t=>t.disposition === -1)

vast bane
#

ok so mine is the good one?

violet meadow
#

preambleComplete

vast bane
#

will it cause all their spells or only THAT spell? I want it just for THAT spell

violet meadow
scarlet gale
scarlet gale
#

Looking much better.

violet meadow
#

@vast bane something that can help in some situations and I keep forgetting πŸ˜„ ```js
const concentationEffect = MidiQOL.getConcentrationEffect(actor)

vast bane
violet meadow
#

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

vast bane
#

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

violet meadow
#

How many targets?

violet meadow
#

just one?

vast bane
#

1 target

violet meadow
vast bane
#

If you got one I'll take it lol

scarlet gale
# dark canopy

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

violet meadow
#

oh yeah

#

DAE.createToken
DAE.teleportToToken
DAE.blindToken

#

MidiQOL.canSense

violet meadow
#

sliders ftw

stuck eagle
scarlet gale
tranquil island
#

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

stuck eagle
violet meadow
#

You are using a v9 module that is known to create issues with lots of stuff (until its updated to v10)

scarlet gale
#

ASE is currently buggy at the moment on v10

violet meadow
#

Ah nah scratch that

scarlet gale
#

I have a potion of giant size automation available. Requires a little bit of setup however.

violet meadow
#

Actor on Use, setDamageRoll 3*roll probably πŸ€”

scarlet gale
tranquil island
#

great, ill try that out

#

thank you

scarlet gale
#

Let me know if you run into trouble with the setup

violet meadow
#

You could consolidate all in one ItemMacro

scarlet gale
#

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.

last loom
#

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

scarlet gale
last loom
#

not seem

dark canopy
scarlet gale
#

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.

dark canopy
#

was trying to puzzle out if bugbear was correct

scarlet gale
#

flags.midi-qol.onUseMacroName CUSTOM ItemMacro.whatever will be looking for the item on the character. And they won't have it.

dark canopy
#

but...im a bit out of my depth on the workflow here, so nevermind me πŸ˜…

vast bane
vast bane
# last loom not seem

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

last loom
#

so the auras module doesn't work if i use midi?

vast bane
#

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

last loom
#

I just wanted to make an aura of say 20ft that would give resistance to all damage

vast bane
stuck eagle
#

Tried deactivating Advanced Spell Effects module, but macro is still not fully working.

vast bane
#

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?

violet meadow
tranquil island
violet meadow
violet meadow
#

And also ItemMacro.compendium.macro.uuid

scarlet gale
#

And that the SD card icon at the top has the item macro pasted into it.

vast bane
#

and show us the effect key you are using for the active aura

scarlet gale
tranquil island
#

let me try that out

vast bane
#

Theres many things you could have wrong here.

  1. You could be using the DR key instead of dr key for damage resistance(very common mistake with new midi users)
  2. You could have no value in the keys effect value field
  3. You could actually have a functional aura, but its not displaying the ae
  4. You didn't roll the item and its set to roll.
  5. You forgot to link the actor and its not on the canvas actor.
  6. You could have the wrong version of active auras installed.
#

@last loom ⬆️

stuck eagle
# violet meadow Any errors in console?

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.

violet meadow
#

Don't worry about that

#

Look for red ones

stuck eagle
#

I changed some setting and got Auto saves, but only by the targeted token, not the ones next to it.

vast bane
#

thats probably your midi target settings at the top of the workflow buttons workflow tab

stuck eagle
violet meadow
#

That is Damage Reduction

#

not damage resistance. Moto got it πŸ˜„

stuck eagle
violet meadow
#

I sent you my settings. Check if it works with mine

scarlet gale
last loom
#

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

vast bane
#

@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)

tranquil island
last loom
#

Fixed now, still not applying to nearby

vast bane
tranquil island
#

i was using the atl attribute keys to enlarge the token's size

#

idk if that has to do with it

scarlet gale
late fractal
scarlet gale
#

system.attributes.hp.max must be the 4th item down on the DAE.

vast bane
#

and the items details tab

last loom
#

zanna does not have dr, and sefris, yes

tranquil island
# scarlet gale

ok, ill modify the order of things. should i have the atl size keys on the effect, like what was shown on the screenshot?

vast bane
# last loom

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?

scarlet gale
tranquil island
#

aight

last loom
#

Well, I don't know why the bonuses are not applied to Zanna

scarlet gale
#

I can tell you the line to change in the macro if you want to setup your effect keys differently.

vast bane
#

what module is doing the red message

violet meadow
last loom
#

health monitor, it only shows the life that is subtracted from a token either manually or by midi

vast bane
#

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

vast bane
#

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

last loom
#

0.5.6

vast bane
# last loom 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

tranquil island
#

@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

vast bane
#

Just so we're not assuming, those are all starter heroes right?

scarlet gale
last loom
scarlet gale
#

What did it do for you?

vast bane
#

I've never tried it now you got me curious

#

I'm pretty sure thats impossible

scarlet gale
#

I think you can.

last loom
vast bane
#

right click and edit the CE, show us all 4 tabs

#

right click it in that menu on the left side of your video

tranquil island
#

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

dark canopy
#

do not modify current HP with an AE

vast bane
#

can't believe I never thought to try a ce as an active aura lol

dark canopy
#

(if that is what is being attempted)

scarlet gale
#

Screenshot your AE for me just to verify.

vast bane
#

Starter heroes are yellow by default

tranquil island
scarlet gale
#

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

tranquil island
#

whoops, sorry bout that

#

i had the current and item effect open, sent the wrong one

scarlet gale
#

does the chat log show a midi damage update?

tranquil island
#

yes

last loom
#

I got them from here

vast bane
scarlet gale
vast bane
#

your problem is 99% likely to be in those four tabs and you have yet to show us

last loom
#

CE is the action effect "Test"?

tranquil island
#

by midi damage update, you mean the dice increase correct?

#

or am i mistaken

scarlet gale
#

there should be a dialog box showing the token getting healed

last loom
tranquil island
#

Oh, shit

#

i found the issue

scarlet gale
tranquil island
#

that is on me

#

i have it so damage/healing is not auto applied

scarlet gale
#

oh

tranquil island
#

the healing prompt is right there, but it did not apply given i did not approve it

#

the macro works

#

im sorry about that

scarlet gale
#

all good

vast bane
# last loom

give me a minute let me try to replicate this, but a dfreds CE as an active aura is...unique

last loom
#

okai

scarlet gale
#

Good to know that the midi apply damage function still prompts you

#

Instead of just doing it

tranquil island
#

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

vast bane
#

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

last loom
#

still not working 😦

vast bane
#

I literally just replicated your setup and its working

violet meadow
#

export the Item and someone can take a look

vast bane
#

show us your active auras settings

last loom
vast bane
violet meadow
#

is it just the CE?

last loom
violet meadow
vast bane
#

its literally just a CE

violet meadow
#

works fine for me

vast bane
#

ok guys I got it

last loom
#

lol

vast bane
last loom
vast bane
#

disable all modules except libwrapper, socketlib, Dynamic Effects using Active Effects, Active Auras, and Advanced Macros

#

and test again

last loom
#

and dfreds?

vast bane
#

although if its on him it would work lol as a regular ae

last loom
#

I haven't this Advanced Macros

vast bane
last loom
#

oki

#

still not working

last loom
#

xdddd....

vast bane
#

go to the compendium tab

#

DELETE the aura of protection thats ON the paladin
drag aura of protection out onto the paladin starter hero

last loom
#

I put a paladin on the field then?

vast bane
#

yeah

last loom
#

in which folder is that aura?

vast bane
#

What version numbers do you have for:

Foundry
Dnd5e
midiqol
dae
dfreds CE

vast bane
last loom
vast bane
#

unless you installed compendium folders

#

@violet meadow you were testing with 2.1.4 right?

last loom
#

oh there is a folder active auras

vast bane
#

honestly its a bad test cause that active auras compendium is a disaster

last loom
#

I put this and there is no change in the sheets

#

oh

vast bane
#

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?

last loom
#

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

vast bane
#

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

vague relic
#

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

last loom
# last loom still not working

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?

vague relic
#

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

dark canopy
#

that function will return the "actual" grid-based distance between two tokens

scarlet gale
#

Midi also has a function for this as well

vague relic
scarlet gale
#

Trying to find the function, I'm on mobile

kind cape
#

MidiQOL.findNearby

scarlet gale
#

Maybe I'm crazy, I swear there is another

kind cape
#
* @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

vague relic
#

MidiQOL.getDistance?

scarlet gale
#

That sounds right

kind cape
#

There is checkNearby as well

scarlet gale
#

Both have good uses

vague relic
vague relic
kind cape
#
let targets = MidiQOL.findNearby(1, sourceToken, 15).filter((target) => {
    return target?.actor?.system?.attributes?.hp?.value > 0;
});
scarlet gale
#

Say you want to find all tokens around a specific one

kind cape
#

This (should) also do the same thing

vague relic
kind cape
#

I'm still trying to understand what spell/effect you are trying to emulate in the first place πŸ€”

vague relic
#

from the Solar

kind cape
#

Oh.. You don't need a macro for that πŸ˜…

vague relic
#

I've had many homebrew creatures with explosions centered on self

vague relic
scarlet gale
#

Range special

kind cape
#

Just set the target like this

#

Of course range whatever the range of it is

#

So 5 -> 15

vague relic
#

What is range special doing there?

kind cape
#

It makes it target everything except the creature itself

#

If instead you set it to any it would also hit itself, iirc

vague relic
#

what's the difference in choosing creature/enemy/ally/radius?

kind cape
#

Radius makes it a template
The rest is just disposition based

#

So creature = any disposition, enemy = opposite (/neutral) disposition, ally = same disposition

vague relic
#

hm, I have it set to 'Enemy,' but it's not targeted anything around it

#

neither neutral nor opposite disposition

scarlet gale
#

screenshot your setup?

kind cape
#

Hmm, what is your settings for ranged set to in MIDI?

#

You want this one set

#

(To anything except None)

vague relic
#

aaaaaaaaaaaaaah

#

that was it

#

thanks guys, was too lost in the macro sauce to think of a way to do this simply lol

kind cape
#

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 πŸ˜…

crude aspen
#

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

scarlet gale
#

There is a setting to allow no targeting outside of combat

#

and presumably no targeting at all

#

check your midi settings

crude aspen
#

Hmm I'm somehow now more confused, I already have that set to never

young owl
#

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

coarse mesa
# scarlet gale Looking much better.

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";
}
coarse mesa
#

learning js is way more fun when you're cleaving πŸ˜…

scarlet gale
#

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.

coarse mesa
#

yeah @dark canopy will come through with a WG update and make it irrelevant but I like this kind of problem solving

coarse mesa
scarlet gale
coarse mesa
scarlet gale
#

Time get a proper code editor πŸ˜‰

coarse mesa
scarlet gale
#

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

coarse mesa
#

Is that Whistler's one? I should get into that

scarlet gale
#

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

coarse mesa
violet meadow
#

Monaco 😭

scarlet gale
#

Using Ace

#

I tried another one but the theme of it was bothering me too much

coarse mesa
#

I'll give Improved a go

scarlet gale
#

Just just needs to ping the token when you click on the image.

coarse mesa
#

that image border is bothering me anyway

scarlet gale
#

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

vast bane
robust vault
#

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, .....)

GitHub

Contribute to chrisk123999/foundry-macros development by creating an account on GitHub.

scarlet gale
#

It's a worldscript

#

I recommend using the worldscripter module.

robust vault
#

ahh ok, I don't have that module installed :D, no wonder it didn't work.

scarlet gale
#

if you go that route make sure to look at how the module functions

robust vault
#

what exactly does this module do?

scarlet gale
#

you drop the macro into it's compendium

#

then reload your page

#

It allows you to do worldscripts without messing with your world files

vast bane
# vague relic what's the difference in choosing creature/enemy/ally/radius?

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.

scarlet gale
#

But can't be used for stuff that requires an earlier hook

vast bane
vast bane
robust vault
vast bane
#

Whatever you wind up using, make sure it doesn't apply dfreds CE, as I believe he has one for it.

scarlet gale
#

I changed my midi settings to use DAE effects over CE ones to avoid those kind of issues

robust vault
# vast bane

the only part I could not use is the advantage reminder.

vast bane
scarlet gale
#

I embed all my effects

violet meadow
#

Yeah if one uses macros a lot, DAE prioritization will solve lots of headaches

scarlet gale
#

I only use CE for conditions

vast bane
#

does dfreds/midi know if the ae is in the item macro?

scarlet gale
#

No

violet meadow
#

I use my module for conditions 😁

scarlet gale
#

But an item macro would have to go out of it's way to apply a CE

vast bane
#

if the item rolls, and it has no dae attached, wouldn't midi think dfreds should apply?

scarlet gale
#

then yes

vast bane
#

Then that is what I was getting at 8)

scarlet gale
#

Midi has an option to use DAE first, then CE if there isn't a DAE

vast bane
#

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

scarlet gale
#

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.

violet meadow
#

Enlarge reduce

scarlet gale
#

oh interesting

violet meadow
#

Was there faerie fire too or I misremember?

scarlet gale
#

Yea that one has one

vast bane
#

I dunno but I use midi srd's faerie fire

scarlet gale
#

I use the ddb importer as a base and it takes care of the basic spells like those

vast bane
#

its also an easy way to recreate the ATE wildcard bug

#

faerie fire and enlarge/reduce in dfreds

last loom
vast bane
#

I can't share you an item because I'm not beta testing 2.1.4

last loom
#

okai

vast bane
#

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

last loom
#

Oh...

vast bane
#

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.

dark canopy
vast bane
#

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

dark canopy
#

is that directed at me?

vast bane
#

actuall Chris and Lukas but both are hard to ping lol

dark canopy
coarse mesa
coarse mesa
frosty veldt
#

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?

vast bane
#

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)

frosty veldt
#

Never mind I am just very blind. It is in the item card

coarse mesa
#

@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

vast bane
coarse mesa
#

I don't see how you can ping before choosing

vast bane
#

so if they click the image it pings?

coarse mesa
#

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

scarlet gale
#

I'll mess with converting it to a warpgate alert when I'm home.

#

Plus do the html thing that was mentioned

frosty veldt
#

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)

scarlet gale
vast bane
# frosty veldt Hi I have a question I am even a bit embarrassed to ask: Where is the elusive Mi...

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

coarse mesa
scarlet gale
#

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.

frosty veldt
scarlet gale
vast bane
#

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

coarse mesa
scarlet gale
#

It's like that because on my own setup it's buried away in a world script.

coarse mesa
#

yeah that's smart, making reusable components

vast bane
#

thats basically the premise of midi srd isn't it?

scarlet gale
#

It does the same thing essentially

#

If my stuff was a module I'd do the same

vast bane
#

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

scarlet gale
#

I mostly make non srd stuff so that will never happen

vast bane
#

has anyone come up with a use case for the offhand checkbox?

scarlet gale
#

For when you swap weapon hands

#

And don't want to mess with the damage

vast bane
#

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?

scarlet gale
#

I'd trust a player to check that box then know how to fix a damage roll

vast bane
#

I already replaced the empty versatiles with the offhand formulas for the light weapons hehe

scarlet gale
#

Pretty sure my players don't know the details tab exists

vast bane
#

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

frosty veldt
#

My players only commented: I like this better then roll20, why didn't we use this from the beginning?

scarlet gale
#

More obscure and not officially partnered with wotc

frosty veldt
#

and the DM must enjoy DnD and Javascript at the same time

scarlet gale
#

Only for high automation

frosty veldt
#

That is true. But for sure it saves me a lot of time

scarlet gale
#

I started on foundry not knowing any JavaScript

#

Only messed with Lua before this

royal dragon
#

lol, "enjoy" javascript. One of my least favorite languages

vast bane
#

My least favorite language is Thieves Cant

coarse mesa
vast bane
coarse mesa
#

You’ve been on level 5 for months!

vast bane
#

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

scarlet gale
#

Wish my dotmm game sidetracked that much

#

Would make prep a breeze for the gm

vast bane
#

the key is to overprep the floor lol

#

are you running the companion?

scarlet gale
#

I was a player at the time

vast bane
#

2 sessions ago was 4 hours of shopping

coarse mesa
#

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

vast bane
#

I really want the faction window from house divided 😦

coarse mesa
#

Once you get a taste for native Foundry adventures it’s hard to look back πŸ˜…

vast bane
#

I'm lovin the supplemmental content for the published stuff, I think the dotmm companion is the best book i've ever purchased

coarse mesa
vast bane
#

I dunno if its possible since its in a paid module

coarse mesa
#

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 πŸ€”

vast bane
#

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

ivory iris
#

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

vast bane
#

You could also turn off roll automation temporarily but its a client side setting

crude aspen
#

(Context for those who didn't see, MIDI setting should have been letting rolls be made without targets, but nothing was actually being rolled)

crude aspen
#

Oh lol @ivory iris I didn't even realize you were asking about this too

ivory iris
#

Lmao. Thank you tho! Have a TOTM fight planned for session 1 tmw so this helped a ton

crude aspen
#

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

dark canopy
subtle whale
#

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?

vast bane
#

I think bugbear has a better version, I'm lazy at updating things

subtle whale
#

What's MTB?

#

Oh

#

Nvm

subtle whale
gilded yacht
gilded yacht
vast bane
subtle whale
#

Ah I did not know those bits aren't a part of this, sort of clueless with macros

vast bane
#

```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)

subtle whale
#

Yep! That fixed it, luckily I also already have that one enabled

vast bane
#

prolly free is fine

#

oh and sequencer, wow our premades always require alot of modules lol

subtle whale
#

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

vast bane
#

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

subtle whale
#

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

vast bane
#

or make it just the shield ac item, and then an on use macro that updates the source actors temphp on item use

vast bane
#

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...

subtle whale
#

I don't have any of those

vast bane
#

then you didn't have a target when you rolled the item?

subtle whale
#

Putting this in the item gives me the Healing button in chat

#

It's set to self

#

for the target

vast bane
#

is a healing item an attack roll guys?

subtle whale
#

I'm confused πŸ˜… should it not be configured that way

vast bane
#

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

subtle whale
#

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

vast bane
#

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

vast bane
#

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.

subtle whale
#

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

vast bane
#

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

dark canopy
#

its not about sneaking 😩 we just have no idea what any of the args and workflow calls mean

vast bane
#

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)

dark canopy
#

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)

vast bane
#

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

coarse mesa
vast bane
#

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);
}
coarse mesa
vast bane
#

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

subtle whale
#

Well I put that in to the item as an on use after active effects and it seems to work?

vast bane
#

it should put a midi whispered damage dialog in chat adding the temp hp

subtle whale
#

It does indeed

vast bane
#

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

subtle whale
#

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?

vast bane
#

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"

white turtle
#

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

vast bane
#

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)

white turtle
#

man, been playing for 3 years and this is the first time I realize it isn't actually an aura, world shattered

vast bane
#

I think its loose enough in wording that either way could be interpreted

#

(but a pulse is easier to automate in foundry hehe)

white turtle
#

haha

#

thank you, I'll try it out

vast bane
#

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

vast bane
#

@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?

dark canopy
#

that is a dnd5e 2.0.x bug

#

the updating a locked compendium

vast bane
#

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 -_-

dark canopy
#

so its not getting proper token data

vast bane
#

oooh but I see a good lookin dialogue that I might steal

royal dragon
#

No skeletons? Everyone is ooze?

vast bane
#

Its my way of saying I can't do warpgate dialogs lol so everyone gets zombies

royal dragon
#

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

vast bane
#

I think I'm using chris or mr primates dragon breath

dark canopy
vast bane
#

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?