#MidiQOL

1 messages ยท Page 110 of 1

vast bane
#

lol so um Badger already answered this but I totally misunderstood what they said lol

#

I thought they were telling me to put that in the console to see the initials

violet meadow
#

Also its not an async function so don't await it

#

You need a number or the what I shared

vast bane
#

there are alot of "waits" in the macro this is in

violet meadow
#

you can check which function is async and which is not in the console quite easily ๐Ÿ˜‰

vast bane
#

Divine Sense

Midi Item On Use
Setup the item with charges
Clear target settings
After Active Effects

modern badger
#

u.u

green wolf
#

CPR?

vast bane
# green wolf CPR?

The module Chris' Premades. Its got a bunch of advanced automations for dnd5e and is one of the mainstays here for midi users.

green wolf
#

oh awesome i'll take a look thanks!

hasty jackal
#

it is possible to create this?i guess undead, construct and elemental doesnt count as "alive" for making it easier to do

vast bane
#

ATL detection mode key for one of the senses

hasty jackal
#

hmm good idea

#

i guess if you can create an item that only activates on some "races" you can make one that excludes "races"?

vast bane
#

living in dnd terms is anything with more than 0 hp that is a creature

hasty jackal
#

so is as easy as adding one special sense using ATL keys

frail osprey
#

is it possible to make a DAE delete itself if certain conditions aren't met?

#

I mean, through item macro

vast bane
#

don't describe foundry/midi terms, describe the actual item instead

short aurora
frail osprey
#

I have this effect that, if certain conditions are met, it creates stuff on an actor through args on and deletes them on args off. It's working fine, problem is, even if conditions for args on aren't present, the effect stays on the actor (doesn't create anything, but stays there).

#

conditions are: 2 other specific effects must be present

#

if I try deleting the effect through actor.deleteEmbeddedDocuments("Active Effect", [currenteffect]), the macro just goes args on and creates stuff

vast bane
#

are you making the thor premade items interactions?

frail osprey
#

thor?

short aurora
#

You can check for the conditions in args each (per turn), but deleting an active effect should not create one lol

vast bane
#

nm if you don't know it nm

short aurora
#

That sounds like some whack logic

#

(program logic not your logic)

vast bane
#

theres 3 magic items where one of them gets something special if you wear the other two, and alot of people make the mistake of not realizing they don't need to attune to the other two, just wear them, so if you had been making that, your approach was flawed because the other two don't need to be attuned therefore their ae's wouldn't be on the actor.

#

but you aren't making that so nm

frail osprey
#

nah, nothing to do with attunement, it's that same astral monk stuff I've been dealing with for the past week

#

it's not hard to do, but I've been doing and learning at the same time, hence the difficulty

#

I had no clue what "args" was until like 3 days ago, so... ๐Ÿ˜†

#

Right now, macro is like this:

//Check Arms of the Astral Self and Visage of the Astral Self
const hasArms = !!actor.effects.find(e => e.label === "Arms of the Astral Self");
const hasVisage = !!actor.effects.find(e => e.label === "Visage of the Astral Self");
const currentEffect = actor.effects.find(e => e.label === "Body of the Astral Self");

actor.deleteEmbeddedDocuments("ActiveEffect", [currentEffect])


//Define abilities
const empoweredData = await fromUuid('Compendium.world.monk.bZTGlfOBKpuDFQHC');
const deflectData = await fromUuid('Compendium.world.monk.uR3ou0xtetQ7TrlR');

//Check if actor already has abilities and creates them
if (args[0] === "on"){
  let hasEmpowered = !!actor.items.getName(empoweredData.name);
  if (!hasEmpowered){
    await actor.createEmbeddedDocuments("Item", [empoweredData]);
    ui.notifications.notify("Empowered Arms added to your abilities.")
  }

  let hasDeflect = !!actor.items.getName(deflectData.name);
  if (!hasDeflect){
    await actor.createEmbeddedDocuments("Item", [deflectData]);
    ui.notifications.notify("Deflect Energy added to your abilities.")
  }
}

/*When args off (effect is removed), it checks if feats exist and deletes them (this check is by item name, so, if you have other items with that same name, it won't work). Deletion can't be done using
empoweredData and deflectData because the ids are different than the ones created on the actor.*/
if (args[0] === "off"){
  actor.items.getName("Empowered Arms")?.delete();
  actor.items.getName("Deflect Energy")?.delete();
  ui.notifications.notify("Deflect Energy and Empowered Arms removed from your abilities.")
}

it stores the effect just fine on const currentEffect (used console.log to check), but, once it gets to the delete part, it goes nuts, doesn't delete anything and sends args on

#

actually, it's not args on, it sets true all the ifs inside args on

cinder tapir
#

AC was 16, and a 16 spell ranged attack misses?

#

Does midi fuck up sometimes?

vast bane
#

show the attack in chat?

frail osprey
#

any clues how to make this lil'guy terminate itself?

short aurora
#

Hmm, yeah I wonder if it can find itself when applied, not sure when that check happens

#

Let me play and I'll get back to you

vast bane
short aurora
#

@frail osprey Actually, double checking the logic here; in what cases do you expect this item to delete itself? Not programmatically, but like the logic while the player plays the game.

#

It seems strange to need an effect to self-annihilate

frail osprey
#

so, this ability (the one that generates this effect) can only be used if two other effects are present
Ability 1 + Ability 2 -> unlocks Ability 3 (this ability)

Ability 3 grants 2 other abilities (lets call them subab1 and subab2)

Now, the original version of this macro checks if effects 1 and 2 are present and, if not, terminates it with a return, BUT this doesn't delete the effect, so the player doesn't get subabs 1 and 2 as intended, but the effect stays on the actor.

#

not really gamebreaking or anything, but sorta sends a false information to the player

#

tl;dr: I don't want the effect to show up if certain conditions aren't met

short aurora
#

Gotcha. I don't think letting the effect "catch" itself is the right approach here, I think you should make this an on use macro instead and programmatically create the active effect. The macro will check for the other two(?) active effects and create the effect if appropriate. Since you've also already created the items of the features that it's adding, instead of using args for on/off, use macro.createItem. Functionally the same, just saves you some coding

vast bane
#

I think Krig should just look up the Astral Self monk

#

its the first 3 features of astral self

#

I looked it up, I didn't think it needed this complex of an automation personally

frail osprey
vast bane
#

Arms is a macro.createItem key
Visage is an ATL key, 2 advantage keys for the skills
Body is a macro.createItem key and an optional.name set of keys for once per turn bonus damage

If you really wanted to automate when they can use them, make arms give visage as a macro.create, then have visage give body as a macro.create.

short aurora
# frail osprey will try. I was having a problem that my effects created through macro didn't ca...

Try this;

const hasArms = !!actor.effects.find(e => e.label === "Arms of the Astral Self");
const hasVisage = !!actor.effects.find(e => e.label === "Visage of the Astral Self");

if (hasVisage == true && hasArms == true) {
    const effectData = {
        label: this.item.name,
        icon: this.item.img,
        changes: [
            {
                "key": "macro.createItem",
                "value": 'Compendium.world.monk.bZTGlfOBKpuDFQHC',
                "mode": 0,
                "priority": 20
            },
            {
                "key": "macro.createItem",
                "value": 'Compendium.world.monk.uR3ou0xtetQ7TrlR',
                "mode": 0,
                "priority": 20
            }
        ]
    }

    await this.actor.createEmbeddedDocuments("ActiveEffect", [effectData])
}```
#

It should also have a clause for not finding the effects to alert the player, but we can add that afterwards

frail osprey
#

ui.notifications.alert("YOU CLICKED THE WRONG ITEM MOFO")

short aurora
#

pretty much ye, or create bugbear's eula accept macro

#

as punishment

rotund mountain
#

I am home and have tried to apply the new effect to the item. Unfortunately it doesn't seem to be working ๐Ÿ˜ฆ

frail osprey
violet meadow
#

Any errors in console?

rotund mountain
#

let me check the version

frail osprey
#

btw, @short aurora , lemme know if you ever get around automating that fly thing I saw you talking about earlier

rotund mountain
violet meadow
#

nope just empty effect value

frail osprey
#

I have a homebrew ability (created before we moved to FoundryVTT) that allows the player to move double their move speed and then deals AoE damage based on moved distance, and I have NO IDEA on how to automate that

short aurora
#

@vast bane I just discovered a limitation of macro.createItem regarding consumables and quantities; it can't be removed after being applied, if it's being applied to an existing stack (e.g. create another arrow on top of your 99 arrows). I think you had your jank reactions set up like that? Just a heads up if they ever behave weird about removal

short aurora
#

also maybe they get the jolly out of putting in a big number if they like hasted themselves or something

frail osprey
#

like: "insert how many feet you walked"?

#

Forgot to mention it also gives the player fly speed

short aurora
#

Yeah, how far you travelled. Basically to automate it, you'd have to calculate based on start and end position of their turn, presumably, and that's a big can of worms

frail osprey
#

name of the ability is "swoop of the electrical phoenix", actor gets electrical wings and flies to a certain spot, then electricity explodes around them

short aurora
#

Grid based gameplay means that the shortest distance is not always the distance you travelled, after all

rotund mountain
# violet meadow nope just empty effect value

it still appears to not be working. I do appreciate all of the assistance so far though!
The effect doesn't change, nor does a new one get added
No console errors, and no console messages with it (tested with item added and removed)

short aurora
vast bane
vast bane
#

I changed the item type

#

its cause consumables can be stacked

short aurora
#

Then it's not so bad, midiQOL get distance before triggering the ability I guess

frail osprey
#

but the "max pickable point" should be double their speed

short aurora
#

if that doesn't calculate for the proper 5/5/5 or 5/10/5 grid based (it might, have not checked), then you need to do some shenanigans

dark canopy
#

search macro polo for "measureDistances" (plural) as a start

frail osprey
#

will do! Thanks for the tips, guys

#

btw, to have midi-qol autoapply damage through macro, I'd have to find a way to insert the damage in the workflow, right?

vast bane
#

one on turn, deal extra martial arts die damage with a melee attack

frail osprey
#

no, for this other ability I was describing, that deals damage based on distance. Since macro will calculate the distance (and therefore the damage too)

short aurora
#

Basically no evaluating of "does this hit you" if you're a target is a good usecase for a damageOnlyWorkflow, of course, you can also macro in the "does this hit you" but I tend to not do that personally, so midi can take care of that for me

#

the less logic already coded I have to code, the more sanity I have

frail osprey
#

so basically midi will check the hit and, if there is any, it'll get the damage from damageOnlyWorkflow?

short aurora
#

damageOnlyWorkflow is a function to damage someone, how we evaluate the target depends on the feature, but let's cross that bridge when you actually sit down to make it

#

lots of ifs and maybes here

frail osprey
#

you're right, unfortunately I have a lot of other more critical stuff to automate before that

short aurora
#

that just means you wont get bored!!!11

violet meadow
violet meadow
rotund mountain
inland tendon
#

I didn't see these in the midi docs - what do they do?

violet meadow
#

Theoretically these flags on an actor, grant disadvantage on attacks that are type util and other. Now if that holds any value ๐Ÿคทโ€โ™‚๏ธ

violet meadow
# rotund mountain yes

Share some screenshots of the DAE, item and the macro as you ve set them up to see if anything seems amiss.
Won't be at me pc till the morning in some 8 hours

frail osprey
#

@krig managed to get an effect to delete another effect on args off. Had to use effect.id

#

actor.deleteEmbeddedDocuments("ActiveEffect", effect.id)

short aurora
#

Ah yeah, I overlooked that in the original, you're right, need id for deleting embedded documents

frail osprey
#

weirdly enough, I didn't need to state the id when deleting stuff using actor on use Item Macros

#

just when macros were triggered by effects

violet meadow
honest wave
#

Yo, for these kinds of saves, (flags.midi-qol.advantage.ability.save.all) do I need to input an effect value to get it to work?

Or, rather I guess, how do I tell that its worked?

I've tried adding a +1 and it doesnt prompt or automated advantage on saves when rolling as a player with the effect

short aurora
#

Unless you fast forward though, all it does is highlight the advantage button for ya

honest wave
#

Should have known

frail osprey
#

not really midi related, but anyone here also had this issue at some point? I have an effect that gives 120ft darkvision, and the actor gets the darkvision, but the token doesn't

short aurora
#

Prototype token and sheet do not translate like that

honest wave
short aurora
#

No correlation as far as I am aware

frail osprey
#

I mean, there's no vision at all

honest wave
#

The advantage isn't highlighted in the saving throw pop up, or am I missing what that highlight is?

short aurora
honest wave
#

Its something that should be in the system, but isn't (yet)

frail osprey
#

I see. Thanks, Tom

honest wave
#

np.

short aurora
honest wave
short aurora
honest wave
#

Although it isnt on Motos list

static sparrow
#

@modern badger What's the normal damage and damage type of your weapon?

shadow kernel
#

Is there a way to setup a "damage absorption" that would absorb 10 points of damage / day? (similar to charges for an item that would recharge each day, but in this case it would be damage that would be absorbed)

celest bluff
#

You'd create a spell with the effect then drop that spell on to the item

#

You can assign cost, charges and how charges return

errant gull
#

So when using an item that drops a template that will target anything you drop it on, is there a way to get it to not select allies?

spice kraken
#

Don't think you can without a macro

rough willow
#

So I'm looking at the tab for the attribute key for Active Effect, and i see a bunch of "flags.midi-qol." in theat drop down. is there a list somewhere of what some of the less obvious "flags" are for? For example... what is "flags.midi-qol.inMotion" like, what does that mean? a lot of them make sense, but a few seem curious to me.

spice kraken
gilded yacht
#

Yeah, the default should be true (not false) for overtime effects

gilded yacht
pale magnet
#

Does Midi account for disadvantage when making a ranged attack with an enemy at 5ft? (5e)

spice kraken
#

It might be a setting but yes

modern badger
violet meadow
violet meadow
vast bane
molten moss
#

I'm playing dnd 5e and trying to use an effect similar to heavy armor master to reduce damage taken by an amount. I'm using the "flags.midi-qol.DR.bludgeoning" tag for example, then putting in a formula there for the amount. Is it possible to have damage reduced by an amount, but to a minimum of 1?

violet meadow
#

@pale magnet In MidiQOL settings => Workflow settings => Workflow tab, you can have a setting to automatically match a DFreds CE to the name of the used Item.
So if Rage is used, the Rage CE will be applied.
Apply Convenient Effects which is the one shown in the cropped screenshot.

molten moss
late briar
#

Is it fine to ask here a question just about DAE? Its regarding the system.attributes.ac.flat key.

vast bane
late briar
#

okay!

I noticed that in DAE the attribute system.attributes.ac.flat is deprecated but it seems to work fine if one just wants to reduce current armor by 2.
Even if one uses flat armor instead of a calculated one like natural or equipped. Why is it deprecated?

short aurora
#

I think specifically dnd5e deprecated that one in favor of bonus for adjusting armor?

vast bane
#

Its deprecated I think because calcs got added afterwards. That key will only do anything if the ac calc is set to flat

late briar
#

well it also works on non flat stuff

#

it tested it on monsters with flat, monsters with equipped, monsters with natural and also players.

vast bane
#

does it change the ac calc to flat though?

#

Krigs suggestion is the recommended key for what you want to do fwiw

short aurora
#

Not seeing a change with equipped armor for players personally, works if set to flat like Moto mentioned

vast bane
#

I think its overriding but not showing in your sheet/sheet module

short aurora
#

AC is 11 with leather armor and 0 dex mod

vast bane
#

I have an active effect that heavily uses a bunch of deprecated keys and the behavior of the sheet is really weird on them

gilded yacht
late briar
#

works on my paladin player with 23 AC from armor, shield and ring.
It even lists the modifications on the tooltip.

#

Maybe it only works with + and - symbol in front of it?

vast bane
#

I think the flat is how you set calcs actually

#

and since you didn't set it right its not doing anything right?

short aurora
#

Hmm, nope, I can't replicate yours, only seems to work with flat and natural

late briar
#

the flat one is just a left over from old tests.

vast bane
#

natural is actually like flat fwiw I found that out weirdly

late briar
#

How is this just working for me ๐Ÿคฃ

#

I mean its nice but... why

short aurora
#

oh that's value, not flat, it adds if you put it in flat?

vast bane
short aurora
#

your picture I mean

short aurora
#

value works fine, flat does nothing if not set to flat or natural

late briar
#

okay nvmd I am illiterate. I mean to ask about value, not flat ๐Ÿคฆ

vast bane
#

value is really wonky, but why aren't you using bonus instead?

short aurora
#

Aah, fair fair. I think it is just to follow dnd5e's change to bonus, I recall it being value before?

vast bane
#

its a much stronger key as long as you aren't using flat

late briar
vast bane
#

I think its usually advised to swap to natural

late briar
#

which my DM loves

vast bane
#

natural is basically flat but bonus works

late briar
#

yeah but my DM is too lasy to swap everything to natural I think.

#

well I could write him a macro...

#

and then just to be sure remove flat from the list of options too...

vast bane
#

I think theres a setting with most importers to swap to natural vs flat fwiw

late briar
#

all creatures we use are basically hand made ๐Ÿ˜‚

vast bane
#

oof

#

make a world script that defaults an actor to natural vs flat

short aurora
#

fwiw I can't think of something that breaks right now, despite it being deprecated, might just be a thing to consider for future or if AC starts doing shenanigans

vast bane
#

also fyi, I am pretty sure changing from flat to natural doesn't reset the value

#

cause both require a manual entry

late briar
#

which is neat

vast bane
#

yeah I recently ran into this exact situation, I was like...huh, whats the point of flat then?

late briar
#

thanks for the help. I think I need more coffee...

#

or less

vast bane
#

and deprecation is not always bad to use:

These ones work, but the sheet gets really weird in displaying them.

late briar
#

huh

#

why is the picture a cute kitty

vast bane
#

Then again I haven't looked at them since I dropped tidy so maybe the core sheet handles them

#

Its a "shocked" kitty

late briar
#

hmmm

#

yes

vast bane
#

Its used on especially difficult monsters

late briar
#

so for the world script I need to loop through all actors in the world... and then update the calculation.
All actors in the world means all in the sidebar and all unlinked tokens on all scenes as well?

vast bane
#

A macro could be made for doing existing things, I think a world script would be for making sure flat isn't the default on a created actor

#

hes electing to pick flat

#

maybe a world script or CSS to hide flat lol

#

default is "unarmored"

late briar
#

there is a CONFIG.DND5E entry for those things

#

so if I just delete that entry...

vast bane
#

You could tell them about natural maybe that will get them motivated to use it

late briar
#

yeah they just used the first one that did what they wanted to do lol

vast bane
#

I think it would be easier to get the DM to change than to go in and change so much stuff thats already using .bonuses

late briar
#

and then I just use the ac.bonus key, right?

vast bane
#

make sure before you give a macro that swaps flat and natural, that it passes the test of maintaining the value

#

you don't want to fire that macro on a compendium or scene and then have it turn a bunch of ac's to 0

vast bane
#

it could also send a bunch of actors into validation errors too

#

if it nulls the ac field

late briar
#

eww

vast bane
#

basically, test it on a small unimportant sample before you make it override the bestiary or a whole map hehe

late briar
#

yeah definitely. You don't know an easy way to get all actors in the entire world at once, right?

#

besides a loop over scenes

vast bane
#

I was thinkin something along the lines of all tokens on scene, all sidebar actors, and all actors in a compendium

late briar
#

the server makes a backup of all worlds every day at 0:00 and uploads it to a gitlab repository so that does not matter too much.

vast bane
#

but first make a macro that does selected token to make sure the actual macro method doesn't reset the ac

#

the UI method may keep the value because its left in the UI and then you hit save. A macro doesn't do that so I'd be worried about that

late briar
#

Migration completed without errors or wrong values ^^

#

World Script is also completed.

violet meadow
#

Went down the rabbit hole for that one.

Seems that next DAE will probably have some changes regarding this, making do not stack by name the default option more or less.

vast bane
#

oh cool, that would make the janky immune to custom ce's alot easier

#

the question though is, will that change existing aes?

#

will we have to delete and rebuild the dfreds CE item?

#

Fwiw, all you need is default behavior changed. The non custom ce's are typically not important for this as the conditions are all already handled with Conditional immunity

violet meadow
#

Up until now, if an AE didn't have a defined flags.dae.stackable, it would pretty much default to multi. In the future it will default to noneName.

Alongside this, the dropdown menu in the DFreds CE create effect dialog, should in the future default to the Do not stack by name instead of origin, so newly created CEs would have that as default.

Already placed AEs should not be affected

hot flower
#

is there a flag for "can't take reactions"?

narrow saddle
#

Does anyone know if there is a toggle anywhere to change initiative to fast forward/auto rolls?

I have not changed anything in a world apart from something in MTB that is totally unrelated and now the initiatives of PCs are being auto rolled. (I have changed the totally unrelated ting in MTB back just in case and initiative is still auto rolling)

narrow saddle
hot flower
#

oh, duh. I can just put a Dfred's reaction effect. I'm dumb.

#

sorry.

violet meadow
narrow saddle
#

Wait a minute, it could be Quick Combat, I installed it this week so that I can get combat sounds going when a combat starts.

Configured that for the Wednesday game but not Friday game. ha ha DOH!!

proper siren
#

Hey all, had a question on the let me roll that for you module. I'm using it with midi's prompt players to roll saves, but when the dialogue pops up they don't have the ability to select advantage or disadvantage. Is that just an inherent problem with lmrtfy? Should I just be using foundries standard dialogue box popup for that?

inland tendon
#

The reroll initiative feature is very fun, but a bummer that it messes up some effect expiry stuff. Does anyone know if there are plans in the works to get it working more smoothly?

vast bane
#

I don't use LMRTFY, I use MTB, I'm unsure if there is an issue with fast forward with that module or not.

proper siren
modern badger
#

u can use shift and control in the dialogue

proper siren
proper siren
modern badger
#

o3o

#

weird

#

when I click it with shift it does adv.

proper siren
#

huh, and that's on midi popups not just the general lmrtfy manual request?

#

ahhh, it looks like lmrtfy + query works

hot flower
#

I'm trying to automate Staggering Smite. Is there another spell that gives you a bonus damage and then asks you to roll a saving throw or have AE applied? I just want to look at the code and see how that is constructed.

vast bane
#

you should not need to use keyboard shortcuts to live with fast forward, it should be a setting you can shut off

#

fast forward has 3 setting locations

proper siren
vast bane
#

ability/saves is outside the workflow button, and then attacks/damage are inside the workflow button in player/dm tabs

proper siren
#

that gives you the lmrtfy dialogue box and when pressed then gives the diadv/standard/adv dialogue box

hot flower
#

basically i just need a macro that has a save function that i can look at.

vast bane
hot flower
#

i've just about got it. I just need to macro the save.

vast bane
#

theres a midi sample and a ddbi macro available for bonus action smites

hot flower
#

looks like Thunderous Smite is the model to work off.

umbral basin
#

@violet meadow Are you here today per chance?๐Ÿ‘€

violet meadow
umbral basin
#

@violet meadow
How one would do this?
Iv tried using the this.save/hit Moto suggested but Foundry does not like it xD I keep geting errors and it destroys the rest of the macro.

#

and im trying to put it into this.
@violet meadow

violet meadow
#

So if there is no hit, give something back?

#

Cause that one has no save, has it?

#

The macro I mean

umbral basin
#

No, if the attack hits or the target fails a save the creature that attacked should gain resources.

umbral basin
violet meadow
#

Ok I will need access to my PC to write this though so it will need to be later

#

How are you trying to update the resource? I might get away with some copy pasting of the code if you have it correctly doing that for now

#

Otherwise coding on mobile not good ๐Ÿ˜…

umbral basin
violet meadow
#

Oh yeah ๐Ÿ˜…

if (!args[0].hitTargets.length) return;
await args[0].actor.update({"system.resources.legres.value": args[0]. actor.system.resources.legres.value+1});
``` maybe going from memory.

If you log the actor and find the data path to the resources legres you can find the correct update
umbral basin
#

Log the actor?

#

@violet meadow

violet meadow
umbral basin
#

If I dont hit nothing happens

#

When I hit with that part of the macro added nothing changes from how the macro normally works. However im not sure what you mean with "find the data path to the resources legres you can find the correct update"

#

But when I use it alone it "works". It adds a resource no matter if it hits or misses xD

#

@violet meadow

violet meadow
#

Replace the line in your macro
if(args[0].hitTargets.length===0) return
with the one I shared above

umbral basin
#

I did in the original macro, it still adds a resource on both hit and miss

violet meadow
#

Share the macro then again to check it

umbral basin
#
async function wait(ms) {return new Promise(resolve => {setTimeout(resolve, ms);});}
if (!args[0].hitTargets.length) return args[0].actor.update({"system.resources.legres.value": args[0]. actor.system.resources.legres.value+1})
if (!args[0].hitTargets.length) return args[0].actor.update({"system.resources.legres.value": args[0]. actor.system.resources.legres.value+1})
let tokenD = canvas.tokens.get(args[0].tokenId);
let actorD = game.actors.get(args[0].actor._id);
let target  = canvas.tokens.get(args[0].hitTargets[0].id);
let itemD = args[0].item;
let gameRound = game.combat ? game.combat.round : 0;

const diceMult = args[0].isCritical ? 2: 1;
const numDice = 3 * diceMult;
args[0].isCritical ? numDice * 2 : numDice;
let damageRoll = await new Roll(`${numDice}d6`).roll();
await new MidiQOL.DamageOnlyWorkflow(actorD, tokenD, damageRoll.total, "necrotic", [target], damageRoll, {flavor: "Necrotic Bite - Damage Roll (Necrotic)", damageList: args[0].damageList, itemCardId: args[0].itemCardId });
await MidiQOL.applyTokenDamage([{damage: damageRoll.total, type: "healing"}], damageRoll.total, new Set([tokenD]), itemD, new Set());
const effectData = {
    label: "Drain",
    icon: "icons/skills/wounds/blood-drip-droplet-red.webp",
    origin: args[0].uuid,
    changes: [{
        "key": "system.attributes.hp.max",
        "value": `-${damageRoll.total}`,
        "mode": 2,
        "priority": 20
    }],
    disabled: false,
    duration: { seconds: 86400, startRound: gameRound, startTime: game.time.worldTime },
    flags: {
        dae: {
            specialDuration: ['longRest']
        }
    }
};
#
await MidiQOL.socket().executeAsGM("createEffects", {actorUuid: target.actor.uuid, effects: [effectData]});
//let hpNow = target.actor.system.attributes.hp.max;
//let updateHP = hpNow - damageRoll.total;
let updateHP = target.actor.system.attributes.hp.max;
let the_message = `<p>${tokenD.name} drains ${target.name} of ${damageRoll.total} pts from their maximum Hit Point value!</p><p>${target.name} now has Maximum Hit Point maximum of ${updateHP}.</p><br><p><b>If it reaches O, they die!!</b></p><br><p> ${tokenD.name} regains ${damageRoll.total} Hit Points back!</p>`;
await wait(600);
ChatMessage.create({
      user: game.user.id,
      speaker: ChatMessage.getSpeaker({actorD: actorD}),
      content: the_message,
      type: CONST.CHAT_MESSAGE_TYPES.EMOTE
    });
violet meadow
#

And how do you execute this macro?

#

Ps you got the same line twice in the beginning, but shouldnโ€™t matter in the grand scale of things anyways ๐Ÿ˜€

#

Item on Use , after active effects?

umbral basin
violet meadow
#

With which trigger?

umbral basin
#

After active effects

violet meadow
#

So what happens when you attack with that item? It adds legres and stops?

umbral basin
#

It adds a legres resource aswell as the other parts of the attack

#

So the only thing thats wrong is that it adds a resource on a miss

molten token
#

anyone had an issue where the auto target works for evryone except for one player?

opaque current
#

Is there a player side setting they've messed with?

violet meadow
violet meadow
umbral basin
# violet meadow Wait you want to add a resource on a hit!?!

XD I thought I said that hahaha xD Im sorry
Yes so basically the plan is to have it as a part of a Boss mechanic. I find Legendary Resistance to be quite boring on itself.

So my plan is that the BBEG can have 10 Legendary Resources.
If it manages to drain the players on blood it gains a charge, it can use 8 charges to use a powerful Attack but also 2 resources to use a Legendary resistance. So if the players use a lot of abilities they can prevent the powerful attack.

The boss has a few other ways to gain resources such as minions bringing stuff so the players will need to kill these minions before they boost the boss.

hot flower
#

how would I have an Activation Condition of having an ally within 5 feet of the actor?

#

I basically want to automate this: When a creature the thug gang boss can see targets it with an attack, the thug gang boss chooses an ally within 5 feet of it. The thug gang boss swaps places with the chosen ally, and the chosen ally becomes the target instead.

#

I just want to stop the workflow, swap the tokens and then let the player target the new token manually and roll the attack again.

celest bluff
#

that would be a reaction macro, which could be easily done findnearby, dialog and warpgate

hot flower
#

does "args" not return anything anymore?

umbral basin
crystal idol
#

I'm making this magic item
As an action, you can pull the hook on top of the Lantern of Souls to activate it, focusing on one creature within 30 feet. The target must make an Incapacitated Charisma saving throw until its concentration is broken or the Lantern is deactivated. You must continue using your actions to maintain concentration on the Lantern. If the target remains under the effect of the Soul Lantern after 3 turns, their soul leaves their body and is captured by the lantern, rendering them unconscious until the soul is recovered or the lantern is destroyed.
and I want a Midi-QOL macro to apply the incapacitated condition appropriately on the target. How do I do this?

#

Single target, on ST fail, for 3 turns

crystal idol
#

Figured out the incapacitated part. Still struggling with the overtime effect after 3 rounds to become unconcious

violet meadow
#

oh fml... wait nope

umbral basin
umbral basin
crystal idol
#

What if I do a Macro on effect Deletion? How do I write a macro so that the person with the effect gains the unconcious condition?

#

I'm sorry, I am very ignorant on this topic, but I'd love to have this item working

umbral basin
# violet meadow <@307506121361457152> get this one
async function wait(ms) {return new Promise(resolve => {setTimeout(resolve, ms);});}
if (args[0].failedSaves.length === 0 && (args[0].failedSaves[0].value.actor.system.attributes.hp.value >= args[0].failedSaves[0].value.actor.system.attributes.hp.max)) return {};

const tokenD = canvas.tokens.get(args[0].tokenId);
const actorD = game.actors.get(args[0].actor._id);
const target = canvas.tokens.get(args[0].failedSaves[0].id);
const itemD = args[0].item;
const gameRound = game.combat ? game.combat.round : 0;
const halfDamageHealing = Math.floor(args[0].damageTotal / 2);

await MidiQOL.applyTokenDamage([{damage: halfDamageHealing, type: "healing"}], halfDamageHealing, new Set([tokenD]), itemD, new Set());
const effectData = {
    label: "Call the Blood Drain",
    icon: "icons/skills/wounds/blood-drip-droplet-red.webp",
    origin: args[0].uuid,
    changes: [{
        "key": "system.attributes.hp.max",
        "value": `-${args[0].damageTotal}`,
        "mode": 2,
        "priority": 20
    }],
    disabled: false,
    duration: { seconds: 86400, startRound: gameRound, startTime: game.time.worldTime },
    flags: {
        dae: {
            specialDuration: ['longRest']
        }
    }
};

await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
const updateHP = target.actor.system.attributes.hp.max;
const the_message = `<p>${tokenD.name} drains ${target.name} of ${args[0].damageTotal} pts from their maximum Hit Point value!</p><p>${target.name} now has Maximum Hit Point maximum of ${updateHP}.</p><br><p><b>If it reaches O, they die!!</b></p><br><p> ${tokenD.name} regains ${args[0].damageTotal} Hit Points back!</p>`;
await wait(600);
ChatMessage.create({
    user: game.user.id,
    speaker: ChatMessage.getSpeaker({ actorD: actorD }),
    content: the_message,
    type: CONST.CHAT_MESSAGE_TYPES.EMOTE
});

I tried to add your changes to the previous macro to this one but im doing something wrong๐Ÿค”

celest bluff
#

shouldn't need a wait for creating a chat message

rotund mountain
celest bluff
#
const tokenD = canvas.tokens.get(args[0].tokenId);
const actorD = game.actors.get(args[0].actor._id);

can just be

const tokenD = canvas.tokens.get(args[0].tokenId);
const actorD = tokenD.actor;
#

also if you want the full name, should go off the actor's name. The token name is always the prototypes name. Unless you're not using token mold.

violet meadow
#

And make the changes Crumic suggested

#

I haven't gone through the whole macro. There are things that should be changed

umbral basin
violet meadow
#

I count two instances

celest bluff
#

I've also had args[0].uuid, fail on me. args[0].itemUuid is more dependable

umbral basin
#

Well those are removed now and the

const tokenD = canvas.tokens.get(args[0].tokenId);
const actorD = game.actors.get(args[0].actor._id);

has been changed to

const tokenD = canvas.tokens.get(args[0].tokenId);
const actorD = tokenD.actor;
celest bluff
#

or could do args[0].uuid || args[0].itemUuid

#

so if one is null, it'll fill in. it's the samething

violet meadow
#
const tokenD = args[0].workflow.token;
const actorD = args[0].actor;
const targetD = args[0].failedSaves[0]
hasty jackal
#

two questions, if i want to create an effect that absorbs a damage (for example if creature takes fire damage absorbs half of it) what i would need to do and if i want to add "reflects damage back to the attacker" like armor of agathys if is possible?

violet meadow
#

Absorbs meaning that is healed by that or resistant to the damage?

umbral basin
#

Do you mean to change

const tokenD = canvas.tokens.get(args[0].tokenId);
const actorD = tokenD.actor;
const target = canvas.tokens.get(args[0].failedSaves[0].id);

to

const tokenD = args[0].workflow.token;
const actorD = args[0].actor;
const targetD = args[0].failedSaves[0]

?

violet meadow
#

Yes

hasty jackal
#

healed by the damage

violet meadow
hasty jackal
#

okay

violet meadow
# rotund mountain These are my versions

Is it me or something off on the MidiQOL screenshot and the version is not shown?

Anyway I had made a macro for that, which I checked on the latest versions of MidiQOL and DAE

#

I can share later

violet meadow
#

Whatever you use later in the macro

umbral basin
#
async function wait(ms) {return new Promise(resolve => {setTimeout(resolve, ms);});}
if (args[0].failedSaves.length === 0 && (args[0].failedSaves[0].actor.system.attributes.hp.value >= args[0].failedSaves[0].actor.system.attributes.hp.max)) return {};

const tokenD = args[0].workflow.token;
const actorD = args[0].actor;
const targetD = args[0].failedSaves[0]
const itemD = args[0].item;
const gameRound = game.combat ? game.combat.round : 0;
const halfDamageHealing = Math.floor(args[0].damageTotal / 2);

await MidiQOL.applyTokenDamage([{damage: halfDamageHealing, type: "healing"}], halfDamageHealing, new Set([tokenD]), itemD, new Set());
const effectData = {
    label: "Call the Blood Drain",
    icon: "icons/skills/wounds/blood-drip-droplet-red.webp",
    origin: args[0].uuid,
    changes: [{
        "key": "system.attributes.hp.max",
        "value": `-${args[0].damageTotal}`,
        "mode": 2,
        "priority": 20
    }],
    disabled: false,
    duration: { seconds: 86400, startRound: gameRound, startTime: game.time.worldTime },
    flags: {
        dae: {
            specialDuration: ['longRest']
        }
    }
};

await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
const updateHP = target.actor.system.attributes.hp.max;
const the_message = `<p>${tokenD.name} drains ${target.name} of ${args[0].damageTotal} pts from their maximum Hit Point value!</p><p>${target.name} now has Maximum Hit Point maximum of ${updateHP}.</p><br><p><b>If it reaches O, they die!!</b></p><br><p> ${tokenD.name} regains ${args[0].damageTotal} Hit Points back!</p>`;
await wait(600);
ChatMessage.create({
    user: game.user.id,
    speaker: ChatMessage.getSpeaker({ actorD: actorD }),
    content: the_message,
    type: CONST.CHAT_MESSAGE_TYPES.EMOTE
});

I think I fixed what you said ^

await args[0].actor.update({"system.resources.legres.value": args[0]. actor.system.resources.legres.value+1})

^ Can I use this?

#

To make this macro also give resources ๐Ÿ˜‚

violet meadow
#

Yeah

umbral basin
#

Where would be the best to add it? I always seem to missplace it

violet meadow
#

The const item might be undefined though

#

What version of midi are you on?

#

And probably in the first conditional you probably need to use || instead of &&

umbral basin
#

Now it works ๐Ÿ˜„

#

Thank you

#

Ill check my Midi version

#

im on v 41ยจof Midi

violet meadow
#

Or however you want to call it

rotund mountain
vast bane
# molten token Nope

enable roll automation is off on the players client, not account, they have to confirm it on their end.

vast bane
rotund mountain
#

ah I will do this thanks ๐Ÿ™‚

violet meadow
# rotund mountain my Midi is 10.0.37 I'll keep my eyes open ๐Ÿ™‚

Take this for a test drive ```js
if(args[0] === "onUpdateActor") {
const {originItem, targetActor, options:{dhp}} = args[args.length -1] ?? {};
if (dhp <= "0") return;
else {
const effectData = {
changes: [
{key:'system.bonuses.abilities.save',value:'+1d4',mode:2},
{key:'system.bonuses.msak.attack',value:'+1d4',mode:2},
{key:'system.bonuses.mwak.attack',value:'+1d4',mode:2},
{key:'system.bonuses.rsak.attack',value:'+1d4',mode:2},
{key:'system.bonuses.rwak.attack',value:'+1d4',mode:2}
],
origin:originItem.uuid,
label:originItem.name,
icon:originItem.img,
duration:{seconds:8},
flags:{dae:{specialDuration:['turnEndSource'],stackable:'noneName'}}
}
await targetActor.createEmbeddedDocuments('ActiveEffect',[effectData]);
}
}
else {
const lastArg = args[args.length-1];
const sourceToken = canvas.tokens.get(lastArg.tokenId);
const sourceActor = sourceToken.actor;
const sourceItem = lastArg.efData.parent;
const flagValue = getProperty(actor, "flags.dae.onUpdateTarget") ?? [];
if (args[0] === "on") {
const onUpdateData = {
filter: "system.attributes.hp.value",
sourceTokenUuid: lastArg.tokenUuid,
sourceActorUuid: lastArg.actorUuid,
targetTokenUuid: lastArg.tokenUuid,
origin: sourceItem.uuid,
macroName: ItemMacro.${sourceItem.name},
flagName: ${sourceItem.name}
};
flagValue.push(onUpdateData)
await sourceActor.setFlag('dae','onUpdateTarget',flagValue);
}
if (args[0] === "off") {
const flagValue = (foundry.utils.getProperty(sourceActor, "flags.dae.onUpdateTarget") ?? []).filter(onUpdateData => onUpdateData.flagName !== ${item.name});
await sourceActor.setFlag("dae", "onUpdateTarget", flagValue);
}
}

#

Create a DAE on the Item, with transfer to actor on equip and an effect for macro.itemMacro | Custom |

#

Let me know, if you increase the HP of the actor twice in a row, what does happen?

static sparrow
#

@modern badger Version two, thanks to thatlonelybugbear. Put the following macro on the weapon, midi OnUse macro set to call ItemMacro for All passes; give it limited uses however you want that to be set up, 4 per day, charges with a recovery of 1d4, I don't remember. I think I changed like four things from thatlonelybugbear's example so really all the credit goes to them.

const {macroPass,isCritical,workflow} = args[0] ?? {};
    if (!macroPass || !item || !actor || !workflow) return ui.notifications.error("Error with item");
    if (macroPass === "preItemRoll") {  
        workflow.config.consumeUsage = false;
        workflow.config.needsConfiguration = false;
        workflow.options.configureDialog = false;
        return true;
    }
    else if (macroPass === "DamageBonus") {
        const charges = item.system.uses.value;
        if (!charges) return;
        const labels = ["None", "One", "Two", "Three", "Four"];
        const content = `<center>How many charges? Available: ${charges}</center>`

        async function dialogAsync(){
            return await new Promise(async (resolve) => {
                new Dialog({
                    title : "[[REPLACE ME WITH THE NAME OF THE FEATURE]]" , 
                    content,
                    buttons: Array.fromRange(Math.min(5,Number(charges)+1)).map(i=>({label:labels[i], callback: (html) => {
                           resolve(i);               
                    }}))
                }).render(true);
            })
        }
        let damageDice = await dialogAsync();
        if(!damageDice) return {};
        await item.update({"system.uses.value": charges - damageDice});
        const damageFormula = new CONFIG.Dice.DamageRoll(`${damageDice}d4[piercing]`, {}, {
            critical: args[0].isCritical ?? false, 
            powerfulCritical: game.settings.get("dnd5e", "criticalDamageMaxDice"),
            multiplyNumeric: game.settings.get("dnd5e",  "criticalDamageModifiers")
        }).formula
        return {damageRoll: damageFormula, flavor: "[[REPLACE ME WITH YOUR DESIRED FLAVOR TEXT]]"};
    }```
#

I'm sure someone else could pick it apart and tell me better ways to do everything but JS is not my native language and Foundry is not my native environment, haha.

#

Wait how do I make Discord do syntax highlighting?

vast bane
violet meadow
#

What is the description of this item?

static sparrow
#

I think they posted a li'l screenshot of it but I don't remember the exact text; the gist is that when you hit with the weapon, you can expend a number of charges to deal an extra 1d4 piercing damage per charge.

violet meadow
#

You can get away with no actual updates to the Item. Use instead a DamageBonus macro

static sparrow
violet meadow
#

no reason at that point. Remnant of older reused code

static sparrow
#

Gotcha, gotcha.

violet meadow
#

Although it needed a small change to define item properly. And with the newer MidiQOL you can also define it as args.item

modern badger
#

:ooo

#

thankye!

gaunt python
#

Hi folks. Once again in need of some help ๐Ÿ˜…
I am trying to automate a cursed item:

Curse. This item is cursed. When you hit a creature with an attack, you also take 2d10 necrotic damage and must succeed on a DC 15 Constitution saving throw or have disadvantage for 1 hour on any ability check or saving throw that uses Strength or Constitution. You are unwilling to part with the staff until the curse is broken with remove curse or similar magic.

So far, I have the cursed weapon and made the curse a separate feature item that I thought to roll via OnUse ItemMarco (checking if hitTargets.length > 0 and then do a item.roll).
I added a active effect to the curse item that handles all the disadvantages and gets applied on a failed save. So far, when testing, this part works.
What does not work is the 2d10 damage to self from the curse. If rolled for a save, midi handles the roll, but I have to manual roll the damage and it does not get applied to the actor. What am I missing?

Oh, and if anyone has a good idea how to handle the magic weapon that has been cursed, I'd appreciate it. So far I am using Magic Item module and added a spell item handling the charges, but I was considering to butcher some macros and go the OnUse route:

This staff has 3 charges and regains 1d3 expended charges daily at dawn.
The staff can be wielded as a magic quarterstaff. On a hit, it deals damage as a normal quarterstaff, and you can expend 1 charge to deal an extra 2d10 necrotic damage to the target. In addition, the target must succeed on a DC 15 Constitution saving throw or have disadvantage for 1 hour on any ability check or saving throw that uses Strength or Constitution.

vast bane
#

When I make cursed permenant items, I just put a trap item on my avatar to roll on the user the first time it matters cause the players almost immediately sus it out and I don't see a point in masking the permenant item. I put the description of the cursed item in the trap item on the avatar and copy/paste it after the "trap has sprung"

violet meadow
#

You also don't need a secondary 'cursed' Item. You can put all the logic in an onUse macro, triggered when using the original Staff

coarse mesa
#

Yeah I never considered putting the nasties in the itemmacro but itโ€™s perfect as the player wonโ€™t have a clue

vast bane
#

CPR's potion of poison is a great example of a hidden item

gaunt python
violet meadow
#

That is one mean item

#

and makes it a bit more convoluted

gaunt python
#

Yeah, I know... well, it came with a big "better not steal these ominous items from the dead dude who dabbled in dark stuff" warning, which my players totally ignored. The player who chose to use the item totally loves it, that it is cursed and really goes all in RPing the "not parting willingly" part while the rest of the party is not onto it being a cursed item. And as we enter a dungeon crawl, I thought to automate what originally was just meant to be a MacGuffin.

violet meadow
opaque current
#

Kind of offtopic but I am very curious how powerful the staff attacks are to warrant dealing 2d10 damage to self!

violet meadow
# gaunt python Hi folks. Once again in need of some help ๐Ÿ˜… I am trying to automate a cursed i...

For the Cursed Item. Add this as a MidiQOL item onUse ItemMacro | After Active Effects ```js
if (!args[0].hitTargets.length) return;
const itemData = duplicate(args.item);
delete(itemData.flags['midi-qol'].onUseMacroParts);
delete(itemData.flags['midi-qol'].onUseMacroName);
itemData.flags.midiProperties.fulldam = true;
itemData.system.target = {value: null, width: null, units: null, type: 'self'};
itemData.system.actionType = "other";
itemData.system.damage.parts = [['2d10','necrotic']];
itemData.system.save = {ability: 'con', dc: 15, scaling: 'flat'};
itemData.name = "Cursed "+args.item.name;
itemData.effects = [{
changes: [
{
"key": "flags.midi-qol.disadvantage.ability.save.con",
"value": "1",
"mode": 0,
"priority": 20
},
{
"key": "flags.midi-qol.disadvantage.ability.save.str",
"value": "1",
"mode": 0,
"priority": 20
},
{
"key": "flags.midi-qol.disadvantage.ability.check.con",
"value": "1",
"mode": 0,
"priority": 20
},
{
"key": "flags.midi-qol.disadvantage.ability.check.str",
"value": "1",
"mode": 0,
"priority": 20
}
],
label: "Curse - "+args.item.name,
duration: {seconds:3600},
icon: args.item.img,
origin: args.item.uuid,
flags: {dae: {stackable: 'noneName'}},
transfer: false
}];
const pseudoItem = new Item.implementation(itemData, { parent: args[0].actor });
await MidiQOL.completeItemUse(pseudoItem)

violet meadow
gaunt python
# opaque current Kind of offtopic but I am very curious how powerful the staff attacks are to war...

This staff has 3 charges and regains 1d3 expended charges daily at dawn.
The staff can be wielded as a magic quarterstaff. On a hit, it deals damage as a normal quarterstaff, and you can expend 1 charge to deal an extra 2d10 necrotic damage to the target. In addition, the target must succeed on a DC 15 Constitution saving throw or have disadvantage for 1 hour on any ability check or saving throw that uses Strength or Constitution.

It's from a community made side-quest supplement for my current campaign and I never intended it to be a serious item, just a plot device and something to teach the rookies in my group that there are cursed items, so better not to fiddle with everything you can get your hands on, if your cleric is not prepared to beg their goddess to save your sorry asses. So there was not much thought about how to balance it. It's only now that the Tabaxi Monk player deems that the staff is her new toy, because the old one got boring and it's really sweet to play out that I've been thinking about it. And I think I will take thatlonelybugbear his idea and modify the curse a bit.

Anyhow, thanks for the macro ๐Ÿ˜ Will study it to learn for futures use cases

violet meadow
#

No worries.
How do you deal with the charges? You can incorporate that in the same macro if you don't mind a dialog pop up when the player attacks, asking if you want to expand a charge (if one is available).

gaunt python
#

First thought was to use Magic Item module, but adding in to the macro seems smart. And now that you planted the idea in my head, I am really thinking of redesigning the curse and the workflow ๐Ÿ˜„
So it would be: roll attack > hit ? > CHA save for 1x (3x?) forced charge > apply weapon dmg to target > amplified dmg to target and self > CON save target/self for disadv AE ?

violet meadow
#

Hahaha yeah it can be done like that more or less.
I can work something out later when I have time ๐Ÿ˜‰

sour mica
#

Reposting my question here from #dnd5e:

Does anyone have any advice on automating the Path of the Totem Warrior's Wolf Totem Spirit (grant advantage for allies attacks against enemies adjacent to you) in Foundry?

I tried to set it up with MidiQOL + DAE + Active-Auras and have an aura that sets the midi-qol.grants.advantage.attack.mwak/swak fields for adjacent enemies. That works, but the issue is it applies advantage for everyone (including the barbarian). Is there another way I can approach this?

short aurora
vast bane
short aurora
#

Like the active effect is there, the effects don't seem to be

sour mica
#

If I try and make an attack with the triggering barbarian they still are listed as having advantage.

short aurora
#

Just passive

vast bane
#

if its transfer on equip, you can't stop it from applying to the source actor

short aurora
#

The active effect will show, but in my testing, does not give the actual effects

vast bane
#

what is the effect

#

on the source actor it doesn't show on the sheet but will show in the mods

sour mica
#

This checkbox does work, you're right. But what are the effects you have in this to make it give advantage only to enemies adjacent to the barbarian?

short aurora
#

Oh, only adjacent? I'd probably just give it a... what, 2.5 feet radius?

#

So it's just the squares next to them

sour mica
#

Wolf. While you're raging, your friends have advantage on melee attack rolls against any creature within 5 feet of you that is hostile to you. The spirit of the wolf makes you a leader of hunters.

#

This is the feature I'm trying to implement.

#

So any allies of the barbarian (regardless of distance) get advantage against enemies adjacent to the barbarian.

vast bane
#

have it set to hostile, and a grant advantage flag

sour mica
#

Yupp, that's what I did. But that gives advantage to the barbarian too. Once the grant advantage flag is set I don't think the "apply to self" is relevant any more.

vast bane
#

make it use an evaluation all allies not named bob

#

instead of 1 in effect value look up activation conditions

gaunt python
#

would something on the line of OnUse Before Attack roll > midiQoL.findNearby(target / distance 5ft ) > check result for barbarian > alter roll, grant advantage work? would have to add it to all allies, so nah, would not work ๐Ÿ˜…

vast bane
#

it'd be easier to just put an evaluation in the key since you gotta do a 1 there anyway

sour mica
vast bane
#

yep

violet meadow
#

Evaluation in flags

#

Frack my phone

sour mica
#

This should solve it, thanks everyone!

vast bane
#

if its a hostile effect though, you need to make sure that midi doesn't try to transfer the aura to everyone

violet meadow
#

No aura. Wait I should read this. Why an aura?

vast bane
#

nm its an aura not a template

#

Everyone within 5ft of the origin actor thats hostile should get a grant advantage flag with an evaluation to allies of the source actor that aren't named Bob(source actor)

#

I don't think 2.5 is gonna cut it cause diagonals are 5ft

sour mica
#

Yeah I had it set to 5 before and it seemed to apply the aura properly.

#

I was just missing the evaluation in the flag.

sour mica
vast bane
#

is the aura activated?

gaunt python
sour mica
#

This seems like it should be something easy to do but for the life of me I can't get it to work. I looked through the midi documentation and can't seem to find the answer either. How would I properly evaluate the attacking actors name in the flag? I've tried a few iterations of the attached image but can't get it to properly evaluate to false.

sour mica
#

I got it working. I wasn't aware that it was the rollData that was being used in the evaluation not the entire actor. Thanks again for all the help @vast bane

violet meadow
gaunt python
modern badger
gaunt python
modern badger
modern badger
#

ooooooooooh

#

there's a separate option for item sheets

#

๐Ÿ˜…

#

ye!

gaunt python
#

yeah.. there are a couple separate default sheets ๐Ÿ™‚

violet meadow
#

Oops wrong reply

#

Ah lol it was almost a correct reply ๐Ÿ˜„

violet meadow
# gaunt python yeah, let's make it less deadly for both ends of the stick ๐Ÿ˜…

Staff of Decay homebrew.

The staff can be wielded as a magic quarterstaff. On a hit, it deals damage as a normal quarterstaff, and you can expend 1 charge to deal an extra 2d10 necrotic damage to the target. In addition, the target must succeed on a DC 15 Constitution saving throw or have disadvantage for 1 hour on any ability check or saving throw that uses Strength or Constitution

Curse. This item is cursed. When you hit a creature with an attack, you are forced to spend a charge or try to fight it (CHA save DC15).
If you spend a charge willingly or fail the save, you also take 2d10 necrotic damage and must succeed on a DC 15 Constitution saving throw or have disadvantage for 1 hour on any ability check or saving throw that uses Strength or Constitution. You are unwilling to part with the staff until the curse is broken with remove curse or similar magic.

In the macro below you need to add a || !target in the check to return in the last macroPass for postActiveEffects.

#

The Staff should have its details page more or less like so

#

The 2d6[necrotic] secondary damage formula is there by mistake. No need to provide any extra damage info or save.
It will do 2d10[necrotic] when needed, doubled up for a crit hit as is right now.

Also check the Full Dam Save box in the bottom MidiQOL Item Properties

#

That was freaking fun ๐Ÿ˜„

gaunt python
violet meadow
#

Let me know if it works ok, as this might have some issues with different MidiQOL settings

gaunt python
#

Will do. Have to leave atm, but I sure will test it tonight.

sleek glacier
#

how do you do this? i copied the macro in the small On Use Macros Field under Midi qol Fields... but nothing seem to happen...

#

when i click on item Macro at the top of the spell (besides DAE) there's no entry, is that fine?

vast bane
#

I actually don't think the macro works after learning more about macros

#

I think that macro only works on owned tokens

sleek glacier
#

hmm

#

well then, i'll do it by hand for now ^^

vast bane
#

Needs a midiqol function to delete other tokens effects, or to run as GM via advanced macros

sleek glacier
#

not really worth the hassle i think

vast bane
#

put it in an effect macro on creation

#

then it will work

sleek glacier
#

just found your macro via the search option, so i thougt it was working ๐Ÿ˜„

vast bane
#

make the effect 6 second duration

#

change the definition of targetedToken to token

#

if you change the definition of targetedToken to token and put it in an effect macro that lesser restoration applies to a target token, then it should work

#

This lets you get past editing unowned tokens by leveraging midi's effect transfer to get to the token and then run it on the target actor, I think the dialog will pop up on the target owners screen though

sleek glacier
#

little fast for slow me ๐Ÿ˜„ but will try that...

vast bane
#

alternatively the e.delete function needs to be changed to MidiQOL.executeAsGM

#

Delete this line:
let [targetedToken] = game.user.targets.values();

The next line down change it to:
let availableValidEffects = token.actor.effects

This should be put in on creation Effect Macro(this is a module, Effect macro)

#

Lesser Restoration, Effect macro On creation.

let VALID_EFFECT_LABELS = ["Blinded", "Deafened", "Paralyzed", "Poisoned"];

let availableValidEffects = token.actor.effects
    .filter(e => VALID_EFFECT_LABELS.includes(e.label))

if(availableValidEffects.length < 1){
    ui.notifications.warn("No conditions exist on this creature which are removeable by Lesser Restoration.");
    return;
}

let dialogButtons = availableValidEffects
    .map(e => Object({
        label: e.label,
        callback: () => {e.delete();}
    }))

let dialog = new Dialog({
    title: "Lesser Resoration Condition Selection",
    content: ``,
    buttons: dialogButtons
})

dialog.render(true);

@sleek glacier

#

You can replicate this with greater restoration and Heal as well removing even more effects

sleek glacier
#

hmm have the module installed XD but not sure where to insert it ๐Ÿ˜„ edit the spell, right Effect section and add a temporary effect?

#

yeah i got it ๐Ÿ˜„
party... had to choose which effect too, thats really nice thyvm ๐Ÿ™‚

hot flower
#

ok. i'm a little bumfuzzled. I'm trying to automoate this: When a creature the thug gang boss can see targets it with an attack, the thug gang boss chooses an ally within 5 feet of it. The thug gang boss swaps places with the chosen ally, and the chosen ally becomes the target instead.

Would this be a plain old reaction with an ItemMacro? A DAE macro, onUse macro? how would I even start. Basically, I want it to interrupt the workflolw, swap tokens, retarget the new token, and continue the workflow. Just not sure where to call the reaction or the ItemMacro.

hot flower
#

i can see how @scarlet gale swapped tokens in his Bait and Switch automation. Just thought I might be able to adapt that.

vast bane
#

I really need to learn how to move tokens with a prompt. I got like 3 things I want to automate that way.

#

thorn hawip and a custom grappling hook weapon that pulls a target towards the attacker

spring dove
#

@molten solar You told me to check here for the macro?

gaunt python
spring dove
#

So, I need some help.

I have this macro @molten solar wrote for me. It checks if the attack roll was 10 or more over the target's AC, then adds an extra damage dice to the damage roll. I need to modify it so it checks if the attack roll was 5 or more over the target's AC, then roll an extra damage dice at the start of each of the victim's turn. This effect should end when the victim rolls a successful Constitution saving throw against the DC set in the weapon's details.

let workflow = args[0].workflow;
if (workflow.hitTargets.size != 1) return;
let targetToken = workflow.targets.first();
let targetActor = targetToken.actor;
let doExtraDamage = false;
if (workflow.attackTotal - 10 >= targetActor.system.attributes.ac.value) doExtraDamage = true;
if (workflow.isCritical) doExtraDamage = true;
if (!doExtraDamage) return;
let damageFormula = workflow.damageRoll._formula;
let diceNum = 1;
//if (workflow.isCritical) diceNum = 2;
let bonusRoll = ' + ' + diceNum + 'd' + workflow.damageRoll.terms[0].faces + '[' + workflow.damageRoll.terms[0].options.flavor + ']';
let roll =  await new Roll(damageFormula + bonusRoll).roll({async: true});
await workflow.setDamageRoll(roll);

The effect is called Wound. When a character attacks with a wound weapon and the attack roll is at least 5 higher than the target AC, the target takes an additional damage dice in damage at the start of its next turn. At the end of its turn, it can roll a Constitution saving throw against the source actor's Weapon DC, which is 8 + prof + STR/DEX. I can set that DC in the weapon's details.

spring dove
#

thanks

scarlet gale
spring dove
#

Can you help me with that

#

Actually, that wouldn't work, the condition damage is dependent on what item gave that condition to the target.

violet meadow
#

As Chris mentioned, this sounds like OT. Base it on the Life stealing item in the MidiQOL samples

coarse mesa
#

Iโ€™m just trying to process that Zhell wrote a midi macro

violet meadow
#

That seems like something Chris would write tbh ๐Ÿ˜„

coarse mesa
coarse mesa
violet meadow
#

all of the 3 last lines

violet meadow
gaunt python
vast bane
#

Someone pinged Zhell in midiqol, thats asking for some serious wrath.

#

That can't be a chris macro because it doesn't have excessive use of this

vast bane
#

holy cow, league swooping in and saving foriens unidentified items

coarse mesa
#

No response yet

vast bane
#

its a league revival so probably just manifest fixed

coarse mesa
#

Itโ€™s been with the league for a while yeah

vast bane
#

4535992 is the person who revived it

coarse mesa
#

I should be able to tell pretty quickly if itโ€™s been fixed. The issue we had was the window that you drag the masking item into would only work occasionally

short aurora
#

honeybadger is still teasing us with a little wait before their module that should handle a lot of the same usecases

#

archon was the codename unsure if that will be end name, for when you need to scour package-releases

coarse mesa
#

Super looking forward to that. I also really hope the system implements it though, then it might get used in official adventures

dark canopy
coarse mesa
molten solar
#

@empty fable here.

empty fable
#

test

#

now it works. gonna post again then:
A player of mine obtained a magic item from Griffon's Saddlebag and its ability feels rather complicated for me to automate.
So i want to ask if anyone can help me set it up so the feature of the weapon automatically gets rolled for etc.
Item for reference:
"You gain a +1 bonus to attack and damage rolls made with this magic weapon. When you hit a target with this weapon, you can choose to roll a second d20 before calculating the weapon's damage. If you roll an 11 or higher on the second d20, the blade magically seeks out and hits the weakest point of the target, turning the attack into a critical hit. On a roll of 10 or lower, the blade ricochets harmlessly off the original target and scores a critical hit against you, instead. When the axe hits you in this way, its damage ignores resitances and immunity."

I took the greataxe item from the compendium and modified it to be a magical +1 greataxe. so far so good but now i have no idea on how to implement the feature that comes with the item.

vast bane
#

I don't think any player would use that item past the first attack with it though so are you sure you want to automate it?

gaunt python
#

With reaction features, is there a way to use the activiation condition to check if the trigger was a ranged attack?

vast bane
#

search for isAttacked

empty fable
violet meadow
# gaunt python With reaction features, is there a way to use the activiation condition to check...

Not yet.
For now you will need a macro. Essentially you create an Item:
a. Reaction Manual,
b. Item onUse MidiQOL macro: ItemMacro | After Active Effects
and a DAE on the Item with:

  1. transfer to actor on item equip,
  2. Effect: flags.midi-qol.onUseMacroName | Custom | ItemMacro,isAttacked.
    Paste this macro in the Item Macro: ```js
    //Midi 10.0.41 verified

if (args[0].macroPass == "isAttacked") { // this will be executed when the actor with the onUseMacroName flag isAttacked.
const { [0]:{ workflow:{item:attackingItem} }, item:reactionItem } = args ?? {};
if (attackingItem.system.actionType == "rwak") {
const activation = duplicate(reactionItem.system.activation)
activation.type = "reactiondamage";
await reactionItem.update({"system.activation":activation});
return true;
}
else return true;
}
else { // this will be executed when the Reaction Item is used, After Active Effects.
const reactionItem = args.item;
const activation = duplicate(reactionItem.system.activation)
activation.type = "reactionmanual";
await reactionItem.update({"system.activation":activation});
}

#

Oh shite. Nope. Will need to change it
@gaunt python ๐Ÿ‘†

violet meadow
#

sneak edit

gaunt python
# empty fable i do have midiQOL and all i want to automate is a that a request is being sent a...
// MidiQoL Item OnUse Macro v1.0
const sourceActor = args[0].actor;
const sourceItem = args[0].workflow.item;

if (!args[0]) return ui.notifications.error("Notify GM: Deselect Item Hooks options in Item Macro module settings or use the macro as a MidiQOL Item onUse macro, with a trigger All");

async function dialogAsync() {
    return await new Promise(async (resolve) => {
        new Dialog({
                       title: `${sourceItem.name} feature request`,
                       content: `Dare to let the magic guide your swing?`,
                       buttons: {
                           1: {
                               label: "I dare!", callback: () => {
                                   resolve(1);
                               }
                           }, 2: {
                               label: "No, let's be save.", callback: () => {
                                   resolve(2);
                               }
                           }
                       },
                       close: () => {
                           resolve(0);
                       }
                   }).render(true);
    });
}
let choose = await dialogAsync();
if (!choose) return;
if (choose === 1) {
    const flavor = `Magic guide my hand`;
    let roll = await new Roll('1d20').roll();
    await game.dice3d?.showForRoll(roll,game.user,true)
    if (roll.total > 10) {
        ChatMessage.create({content: `${sourceActor.name}` + " chose to let the magic guide their strike. Their bravery is rewarded with a roll of " + `${roll.total}`});
    } else {
        ChatMessage.create({content: `${sourceActor.name}` + " chose to let the magic guide their strike. Their folly is punished with a roll of " + `${roll.total}`});
    }
}
if (choose === 2) {
    ChatMessage.create({content: `${sourceActor.name}` + " chose not to trust the fickle magic. We will never know if this was wisdom or cowardice."});
}

(Search terms: War's Wager, Griffon's Sattlebag)

violet meadow
#

Oh I like the repurposed macro ๐Ÿ˜„

gaunt python
#

Add it to the item and set the OnUse to "Before Attack Roll".
And thank bugbear for teaching me stuff xD

violet meadow
#

ps: no need to remove the line await game.dice3d?.showForRoll(roll); //remove this line, if no 3D dice are used.

#

Though needs to be ```js
await game.dice3d?.showForRoll(roll,game.user,true)

vast bane
#

Is it possible to make a world script that puts an active effect on players when they finish a long rest?

#

I'm trying to come up with a hands free no hassle way to track when they last benefitted from a long rest

#

right now I have to constantly check my session posts to remember the time of day it happened on

gaunt python
violet meadow
#
Hooks.on('dnd5e.restCompleted', (actor,result) => { 
    if (result.longRest) game.dfreds.effectInterface.addEffect({effectName:'long rest completed',uuid:actor.uuid})
})
vast bane
#

is that long rest completed or any rest?

violet meadow
#

edited

#

and for shortrest if(!result.longRest)

digital lagoon
digital lagoon
#

Aw

#

Is there something like it that will work?

#

I don't like having to redo the item description every time I use a flametongue greatsword for example

vast bane
#

what are you looking for?

#

Flametongue I deal with with a warpgate macro I believe

digital lagoon
vast bane
#

I think you need to fix your name here before you get yelled at btw

digital lagoon
#

I think it's funny

vast bane
#

They won't

digital lagoon
#

Fine

opaque current
#

Doesn't a flame tongue just deal regular damage plus some fire

vast bane
#

only when its ignited

digital lagoon
vast bane
#

oh, my flametongue I did lazy

#

I just have the bonus action feature that gives them a bonus to mwak damage

#

With advantage reminder

gaunt python
#

babonus territory perhabs?

opaque current
#

Fair enough. In the absence of roll groups, I would just make 2 swords. But the second is weightless and includes the fire damage.

vast bane
#

probably, I never know how to do babs, I just take ones given to me lol

digital lagoon
opaque current
#

Melee weapon attack

vast bane
#

I handle the flametongue this way:

#

The first main item is the weapon, it has a transfer on equip macro.createitem that gives the bonus action feature

#

Bonus action feature rolls to self and applies an ae that gives a light and adds the advantage reminder message to the actors mwak damage popouts. My setup only works if you don't fast forward and install advantage reminder.

#

I really need to add the VAE button for that item

#

I'm sure theres a more automated method

opaque current
#

An Optional BAB might be really good for this actually

vast bane
#

it'd probably be in the form of a dae item macro warpgate on the sword

#

optional bab is not compatible with midiqol fast forward

violet meadow
#

Just add an AE for the extra damage and enable disable it accordingly

opaque current
#

You said you arent fast forwarding

violet meadow
#

Ah strike that

vast bane
#

good point, I return to this statement however:

#

it'd still wind up being something I make on an ae, so since I already made it with AR, no sense in doing extra work

gaunt python
violet meadow
#

Put the damage on other formula . Activation condition false.
It will not roll it

opaque current
#

Do you ever actually use the sword with 2 hands? If not just set the damage as Versatile

violet meadow
#

Make it true and it will roll

opaque current
#

Piece of cake

empty fable
#

@gaunt python im also having trouble implementing your macro. i put it onto the item macro scrip section but when trying to execute the macro or test it out with the attack it does nothing. is there anything i have to change in the script?

opaque current
#

And with BAB:

opaque current
#

So many options and none require fiddling with macros for hours

empty fable
# vast bane console errors?

VM52656:4 Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'actor')
[Detected 1 package: itemacro]
at eval (eval at Item._executeScript (helper.js:82:18), <anonymous>:4:37)
at Macro.eval (eval at Item._executeScript (helper.js:82:18), <anonymous>:47:9)
at Item._executeScript (helper.js:88:12)
at Item.executeMacro (helper.js:60:23)
at ItemMacroConfig._onExecute (ItemMacroConfig.js:43:10)

vast bane
#

If the macro is sound, I'm pretty certain your issue is

#

hah

#

bam, mic drop

#

if you are a midiqol user, and you ever ever ever see an error in the console for itemacro you are midiqol'ing wrong.

narrow saddle
#

Hi there,

Might be a Macro Polo question however does anyone know what I can add to rage so that if the actor is concentrating on a spell the concentration auto goes down? When they rage.

vast bane
#

Midiqol hijacks the module Item Macro and turns it into a pure storage device and does NOT play well with its actual features

empty fable
#

so remove item macro?

vast bane
vast bane
empty fable
vast bane
#

Alternatively, janky solution, make rage require concentration.

narrow saddle
vast bane
#

nah that wouldn't work it'd make you roll and end rage early

#

a message to chat helps

#

I do this with a bunch of spells

#

like Command

opaque current
#

Although wouldnt you have to make it a spell

vast bane
#

I would actually not make rage use conc

opaque current
#

Or can you require Conc via AE

vast bane
#

I'd make it toggle conc

#

if you make it use concentration, then suddenly rage makes con saves and ends early if you fail

#

if you make it have a macro.ce custom concentration then it will toggle it offf I think

#

or worse casew, add the toggle macro to it

#

If it were my game, I'd put an effect macro on rage, on creation, that is simply a chat message to everyone: "Hey delete conc on this barb cause lawl"

#

rage already has a macro on it so you can just append on the end using the same already defined variables to pull off the toggle effect, make sure you await the toggle

gaunt python
vast bane
#

dfreds CE gives you a proper toggle bane effect in a compendium

vast bane
#

actually easier solution @narrow saddle if you have effect macro, do an on creation effect macro on rage to just delete conc

#

you already own the ae, so theres no point in leveraging midi or dfreds

#
let effectNameFallBack = "Shield Master" //Define the name of your shield master feat
let effectName = actor.effects.find(e => e.label === effectNameFallBack); // Find the effect with the specified name
if (effectName) { // Check if the effect was found
  await effectName.delete(); // Remove the effect
  ui.notifications.notify(`Removed ${effectNameFallBack} effect from ${actor.name}.`); // Show a notification with the name of the removed effect
} else {
  ui.notifications.warn(`${actor.name} does not have ${effectNameFallBack} effect.`); // Show a warning if the effect was not found
}
#

change Shield Master to concentration

narrow saddle
vast bane
#

Put this in rage's on creation field in effect macro, change the name

#

if you don't like the notifications umI think you can just delete them

#

to remove them take out all the ui lines and then after the effect.delete line follow up with a singular }

#

to close out the if statement

#

this will only work as an effect macro as I'm not defining actor, instead just leveraging an EM helper

gaunt python
dark canopy
#

HEADS UP

This thread's member limit has been reached - no additional users may join this thread.

If you are not active here, consider leaving the thread to make room for others in the short term.

This is the time to establish an official auxiliary server for Midi-QOL automation

I will pin links in this thread and the dnd5e thread for said server, please let me know.

#

@gilded yacht I want to alert you specifically, as your preferences/input are important here.

vast bane
#

Could just archive the thread and make another so that all the lost content is still searchable within dnd5e. That will more quickly remove the dormant users and make room.

dark canopy
#

i'd like to find a more permanent solution

vast bane
#

so with the removal of this thread, its not safe to talk about the module in the other 3 threads yes?

dark canopy
#

this thread hasn't been removed yet, and just as any other module, once domain specific knowledge is needed, we'll point to the appropriate aux server

violet meadow
#

It seems it's high time for this to be dealt with once and for all ๐Ÿ˜

vast bane
#

this was always a solution for the non midi users

violet meadow
#

Foundry Gearheads could be a solution, if tposney doesn't have the time to deal with it completely.

vast bane
#

it already exists, its not going to effectively divert traffic away from the other channels. this was a more effective method imo

dark canopy
#

just like every other large module

narrow saddle
#

We do really need a Midi server separate to Foundry so that folk who really really hate Midi can choose not to join it.

vast bane
#

every other large module is allowed to be talked about in the other channels

dark canopy
#

and midi is as well, then we point to this thread for the best help

#

just happens to be midi does so much, basically anything midi needs to go in a specific midi context

#

furthermore, when its contained within foundry's channels, we'll punt immediately

#

notice how DDB and any ripper module is handled? help is provided until stuff gets weird, then moved

narrow saddle
vast bane
#

I mean I'm here, so I won't ship them off to another discord, the whole reason for ddb and levels getting shipped is cause no one knows the solution

dark canopy
#

and you dont need to ๐Ÿ‘ moderators are here for redirecting

vast bane
#

maybe just give a role to the midi helpers so they can create a thread so it doesnt drown out the channels?

dark canopy
#

helpers can create threads already

opaque current
#

Honestly it's not gonna be particularly elegant. There are plenty of Midi users that will happily offer advice in #dnd5e or #513918036919713802, and that will generate a lot of posts which can drown out other queries. The question becomes do you ban talk of it altogether? Draw an arbitrary line somewhere?

vast bane
#

Id just archive this thread and make a new one, cause ultimately this was never about us, it was about the other users who didn't want us there

dark canopy
#

no one is banning talk ๐Ÿ˜ฉ all day every day, moderators see a convo drift, and nudge to a better location

opaque current
#

It's also an unusual case of telling a mod to get it's own discord, as opposed to the creator wanting to create one ๐Ÿค”

dark canopy
opaque current
#

A nudge is a polite way of saying, talk about that somewhere else

vast bane
raven holly
#

We are just recognizing that the level of support needed for this module has outgrown all of the considerations that we have reasonably made to accommodate it.
We aren't banning talking about midi, we aren't expecting everyone to move over, we are just saying that the needs of that community have outgrown what we can reasonably provide, in being consistent with how we handle all other modules here.

opaque current
#

Well I don't imagine the thread will go anywhere, but it's not that useful for new people

dark canopy
#

anyone anti-anything here will be (as has been) addressed

raven holly
vast bane
#

I'm all for this change, I'm just looking down the road at the obvious implications in #macro-polo #513918036919713802 #modules and #dnd5e when a broom can't be employed and I offer a solution to someone in them. I really don't think the usuals in those channels are going to like the uptick in midiqol conversations.

dark canopy
#

you can let the mod team worry about that ๐Ÿ‘

gaunt python
#

The way I see it, it would be the same as MATT or BW: Sure, you can ask in #dnd5e or #513918036919713802 , but you'll be directed to the appropriate servers pretty quickly. And knowing that the detailed help is more likely to be found there, the regulars will soon move over and the occasional midi question here won't cause too much trouble.

vast bane
#

Sure, but the difference there is that Ripper and monk don't have people like me hanging out on this server ๐Ÿ˜‰

woven fog
#

It's not even close to the first time modules and systems made their own servers to manage support of them.

vast bane
#

I genuinely am always lost with MATT so I never even try to help with those questions lol

raven holly
#

Where do you go when you need help with it though?

vast bane
violet meadow
#

For MATT?!

vast bane
#

If its a macro I'd probably ask chat gpt/macro polo.

#

I don't use matt

#

I use an avatar and fire my traps from that with the override key pressed

#

I don't really think I have many problems with midi itself atm, its almost always macro related now

violet meadow
#

One ... Function. MidiQOL.trapworkflow and Note Macro ๐Ÿ˜

gaunt python
#

there is a trapworkflow?? whaaat? ๐Ÿ˜ต

vast bane
#

I thought that was deprecated when trigger happy went bye bye lol

#

I use inline roll commands and an avatar actor with all my traps on them set as my assigned actor

#

this way I don't have to make a thousand macros and can just browse my avatar for a suitable trap to reuse

violet meadow
vast bane
#

if anyone does go my route, beware that inline roll commands does not like the tinyMCE editor so unassign yourself from your avatar during prep, and only assign yourself to the avatar in live sessions

#

when you try to edit a journal with an inline roll command on it, it will error out if you use TinyMCE.

gaunt python
vast bane
#

its due to how the image is made on the button

vast bane
#

I just filter my avatar, find the trap that fits and put the command in

#

but maybe it works for you and thats fine, I just felt that it was alot of work to do macros or matt compared to just using midi+an avatar

#

I also do not like real time movement in dungeons, I have players who do not behave well with real time movement

gaunt python
#

All good. Not gonna kink shame here ๐Ÿ˜‰
I am just a sucker for animated traps ๐Ÿคช

vast bane
#

Oh I have animations but they are triggered by me, not my players who then claim they didn't mean to move somewhere

gaunt python
#

Ah, I see. Yeah... My players learned the hard way "you wildly drag your token around and play video game? you better be ready to reap what you sow" xD
Anyway, BTT

keen remnant
#

I use monks active tile triggers for that

#

Player ran down a trapped corridor

#

Rolled 4 saves and went unconscious inside an armed trap, players did not get him and took a different path

gaunt python
#

@violet meadow Trying to learn more from your macro, is there a way to make the completeItemUse(pseudoItem) used for the curse a private roll?

celest bluff
#

You can add in a wait for 500 - 1000 on apply depending on server latency and it should see it fine

vast bane
#

more of a style choice, its easier to just manually delete after everything is confirmed than to have automations end thanks to misclicks

violet meadow
#

I have been using the automation of concentration removal since forever.
Using it with NO + Damage Card and for the most part no issues.

#

Some macros might throw the workflow off but let's see the next iteration of workflow undo, for which tposney has worked out the concentration kinks ๐Ÿ’ช

violet meadow
#

Or GM whisper?

#

You should be able to inject a change of rollType or something

#

I don't remember it off the top of my head, but can take a look when I am home

vast bane
#

I know overtime does rollType

gaunt python
#

GM whisper would be more appropriate. Was trying to see, how to hide the curse part from the other players, but could not find (or more likely, lets face it: did not understand) in the midi wiki

violet meadow
#

Not something that I remember using before tbh

#

But you could change the message type

#

Like the chat message drop-down

#

Check the function and the midi code. It should have some indication of the parameters you can pass to it

#

Or ask in macro polo for a parameter when using the item.use()

#

MidiQOL will pretty much respect that

gaunt python
#

okay. will do. Thanks!

hasty jackal
#

it is possible to create a macro or effect for automatic warding bond?

#

this is the spell

vast bane
#

I'd suggest the warding bond in midi samples but its kinda old and may not be functional anymore

hasty jackal
#

is it on the compendium?

vast bane
#

I actually messed up, I was thinking of abjuration ward, warding bond is probably totally functional

hasty jackal
#

okay gonna look at it

violet meadow
#

Yeah I think it was working fine last I checked.
I clopied for a MidiSRD version I was working on

covert mason
#

I'm trying to get this Item Macro to roll the 'Eruption' item whenever these fists roll an 8 on the bludgeoning damage. I can't seem to get it to do so.

const eruptionData = game.items.getName("Eruption").toObject();
const pseudoItem = new Item.implementation(eruptionData, {parent: actor});
const results = args[0].damageRoll?.dice?.find(d=>d.flavor?.toLocaleLowerCase()==="bludgeoning")?.results.map(r=>r.result);
const res = results.includes(8);
if (res) await pseudoItem.use();```
signal kettle
#

I've got a problem, where midi only automates attacks for self targeted rolls..

gaunt python
covert mason
#

Aye, they do

gaunt python
#

And I guess the Eruption is an effect the fists have on a max damage roll, yes?

violet meadow
#

Share a screenshot of the console log of the relevant roll

#

Does results get you what you need as it is defined?

covert mason
#

Nothin' in the console. I'll try log out the results

#

Nope, nothin' in the logs.

const eruptionData = game.items.getName("Eruption").toObject();
const pseudoItem = new Item.implementation(eruptionData, {parent: actor});
const results = args[0].damageRoll?.dice?.find(d=>d.flavor?.toLocaleLowerCase()==="bludgeoning")?.results.map(r=>r.result);
const res = results.includes(8);
if (res) await pseudoItem.use();

console.log(res);```
covert mason
# violet meadow Does `results` get you what you need as it is defined?

Not getting anything from this either.

console.log(results);

const eruptionData = game.items.getName("Eruption").toObject();
const pseudoItem = new Item.implementation(eruptionData, {parent: actor});
const targetRolls = [8];
const results = args[0].damageRoll?.dice?.find(d=>d.flavor?.toLocaleLowerCase()==="bludgeoning")?.results.map(r=>r.result);
const res = results?.some(r=>targetRolls.includes(r));
if (res) await pseudoItem.use();```
coarse mesa
#

@violet meadow @narrow saddle @strong yew care to test this for me? It now maps ammo types to weapons, I have added a dark mode boolean at the top โ€“ it should also be less annoying, if there's only one ammo left it will switch to it automatically and not present the dialog. Will leave the positioning thing for @short aurora's module since they can save window position in settings

gaunt python
violet meadow
#

Good point. You need to have the dice roll results in, before executing this macro

#

So After Damage Roll at least.

violet meadow
coarse mesa
narrow saddle
violet meadow
coarse mesa
gaunt python
#

@covert mason Try this and set the Evaluation to "After Active Effects":

console.log(args)
const hasMaxRoll = args[0].damageRoll?.dice?.find(d=>d.flavor?.toLocaleLowerCase()==="bludgeoning")?.results.map(r=>r.result).includes(8);
if(hasMaxRoll) {args[0].actor.items.getName("Eruption")?.roll()}

(quick'n'dirty. could be heavily sanitized, though ๐Ÿ˜… )

narrow saddle
covert mason
#

@gaunt python@violet meadow
So this is embarrassing. I hadn't even turned on the On-Use macro, let alone set it to "After Damage Rolls"
Brainlet

#

Pardon me while I sit in the Corner of Shame โ„ข๏ธ

violet meadow
#

Been there done that ๐Ÿ˜

covert mason
violet meadow
#

Look for Moto's initials under the bench ๐Ÿ˜‚

gaunt python
#

Which brings me to my question: I cut the roll Eruption part short and skipped the pseudoItem part to just do a item.roll(), assuming the actor owns the item.
I guess the other way is if the item does not exist?

covert mason
#

I'd intended to do it so the actor doesn't need the Eruption feature on their sheet.

#

I didn't want to clutter up the features.

gaunt python
#

Ah, I see.

hasty jackal
#

how can i make a keen sense that works? it gives advantage on perception checks

#

im trying midiqol-flag advantage per but it doesnt work

violet meadow
covert mason
#

It's incredibly useful!

violet meadow
#

That is performance

#

prc

hasty jackal
#

oooh that explains a lot

gaunt python
violet meadow
violet meadow
gaunt python
#

ah good to know. Gonna start checking my macros then, because I believe there are more than one that uses .roll() ๐Ÿ˜…

violet meadow
#

Also .evaluate() for Rolls instead of .roll()

violet meadow
#

CompleteItemUse will be better most of the cases as MidiQOL will take care to wait for all the workflow to finish before continuing

celest bluff
celest bluff
#

Since ranged weapons don't tend to have versatile damage

coarse mesa
violet meadow
#

I can send you the lib wrapper for the item use ammo selection.

celest bluff
#

It wouldn't mind. In the workflow under roll Options has the boolean for it

violet meadow
celest bluff
#

I also asked if we can hide roll cards with item roll but cannot. So guess just delete it

#

Since if you variable out the last promise, it gives you the final workflow

violet meadow
#

Yeah you could delete it by the args[0].itemCardId easily, as a GM though, or socket it through as a player

celest bluff
#

Players can delete chat cards they own

violet meadow
#

Ah then easier

celest bluff
#

So shouldn't be an issue.. At least in my game they have been able to

violet meadow
#

๐Ÿ˜…

celest bluff
#

We did find out out if you blank out the id, it will 100% override the item stats

#

I had issues where if the previous item had No damage roll, you couldn't add one afterwards

violet meadow
#

The id of the message?

celest bluff
#

Id of the item

#

_id = "" worked but gave an error. Think latest midi fixes the issue

#

Cause without that it would say damage roll is not possible with this item

short aurora
vast bane
#

Oh how I've grown?

coarse mesa
short aurora
#

GUI is the devil's work

coarse mesa
short aurora
rotund crag
#

Hello friends!
I want my "undead" enemies to take damage every time they are healed. How can I set it up?

gilded yacht
violet meadow
rotund crag
violet meadow
#

So if you target an undead with a cure light wounds for instance it gets damaged instead of healed.

That would probably need a world script hooking on the midi predamageroll and changing the healing damageType to another damaging one

inland vortex
#

I want to make a stackable effect that does one point of damage/rd and subtracts one from all attack/save/skill rolls. What are the codes/flags that are used for damage over time and roll penalties?

coarse mesa
rotund crag
vast bane
#

FoundryQOL

coarse mesa
#

TMI? Timโ€™s Module Imaginarium?

vast bane
#

lol

#

ASD, Automation Support Discord

#

can't you change server names?

inland vortex
#

FML - Foundry Miidi Limitless

violet meadow
vast bane
#

Automation by Tposney

vast bane
violet meadow
#

I mean I think not

vast bane
#

Better Automation for 5e

#

Ready Set Midi!

rotund crag
inland vortex
#

Foundry Unlimited Basic Automation Research (FUBAR)

coarse mesa
rotund crag
gilded yacht
vast bane
#

This gives me ideas

inland vortex
#

or Society of Notable Automations forFoundry Unlimited (SNAFU)

vast bane
#

instead of automators, automations

#

It'd probably look ugly in the dev post though

bold rockBOT
#
Community Dev/Creator Discord Servers

Foundry VTT's community is home to a number of awesome developers and creators, many of which have their own communities to offer support for their modules, systems, and content.

vast bane
#

Long names and all

#

I'd say Tposney's Modules is a nice safe conservative name, he does have other complicated modules like potentially a renewal of Trigger happy, and DAE

inland vortex
#
  • so, how do I make a stackable effect for one point of damage per round?
gilded yacht
#

I inclined to suggest anything that implies the server is about general foundry QOL or automation is not ideal. There are many great modules that enhance automation which are not midi and it would be presumptuous to have a name that implies to be all encompassing. It does seem that the standard is author/system and then modules.

violet meadow
#

I mean based on that list it should just be -- yeah that ๐Ÿ‘†

vast bane
#

Could also ask those other adjacent discords if you wanted to merge or something too

#

sorta how jb2a does things

coarse mesa
#

In most cases the actual server name doesnโ€™t correspond to that list

vast bane
#

The ones I joined in that list do lol

#

Whatever you decide on I'll support it though

#

in more ways than one

violet meadow
#

tposney's midi verse

vast bane
#

Midiqol Cinematic Universe

#

Should probably get buy in from a moderator here who can help you manage the channels well since the guys here are quite professional.

coarse mesa
gilded yacht
#

I've been yelled at in the past for having the effrontery to use the word midi in the module title when it does not have anything to do with music - I can see that causing issues when people are searching for a discord server.

coarse mesa
#

There is probably a lot of midi music software on the git sites lol

gilded yacht
#

The moderators here are very good, but I can't see them taking time to setup/suggest/administer another server - when they already have more than enough to do. However there are certainly openings available for those who want to volunteer to moderate/setup the midi-qol server.

vast bane
#

such a shame that you can't rename a server

gilded yacht
#

You can (fortunately)

violet meadow
#

ChatGPT answer to further prove what tposney said before.

Yes, I am familiar with the MidiQOL module for Foundry VTT. It is a third-party module that adds MIDI functionality to the Foundry Virtual Tabletop platform. This module allows users to play MIDI files within the platform, as well as trigger MIDI events using macros. The MidiQOL module provides a variety of options for configuring and customizing MIDI playback, including the ability to control volume, tempo, and instrument settings. It can be a useful tool for enhancing the atmosphere of a tabletop game or for providing musical cues during gameplay.

vast bane
#

oh then in that case, have you talked to the other midi adjacent discords to see if they'd be willing to take on the task? CPR seems to be the most popular, gearheads I left mainly due to inactivity.

short aurora
#

That sounds like just kicking the ball down the road, if those servers blossom bigger :p

vast bane
coarse mesa
#

Whoโ€™s in charge of gearheads? Put Tim on the board and call it a day? The traffic will ramp up if this is closed down

short aurora
#

Considering tposney is the dev and the qol originated from your game, maybe just posneyQOL or something?

gilded yacht
# violet meadow ChatGPT answer to further prove what tposney said before. Yes, I am familiar wi...

Chatgpt must be filtering to make me feel good - this is what I got
Overall, MIDI-QOL enhances the Foundry VTT experience by automating repetitive tasks, providing one-click actions, and offering convenient features that improve the flow and efficiency of gameplay. It has become a popular tool among Foundry users for its ability to enhance the quality of life during tabletop role-playing sessions.
But ChatGPT has been known to lie and make stuff up.

vast bane
#

Whatever you decide I'll help out just as I always have been but I'm not that great at discord shennanigans, I manage my own discord for my 5 players but I offload the managemnt to one of my players lol.

vast bane
short aurora
#

It does make sense for it to be a dev server, as Moto mentioned, DAE gets shooed here too

short aurora
#

tposneys poseysโ„ข

vast bane
#

If you are looking for themes or ideas on how to make it look, I really like CPR's discord, very solid setup

#

I wouldn't bother splitting your modules out, just a nice simple general discussion, and then give helpers the ability to make threads to help divert traffic into a quieter format to prevent too much spam.

coarse mesa
#

Gearheads is already pretty much the perfect setup for midi and dae

vast bane
#

I like CPR's github linkage and his issue tracker/feature request

coarse mesa
#

Ah true

vast bane
#

then again, tposney doesn't use github

short aurora
#

Not exclusive, can be both, but I do think it should be new

#

Let people "rejoin" a new server instead of absorbing whatever those users have set up for an existing server, and realistically tposney definitely should get official owner status

violet meadow
#

Yeah I was reading about that.

vast bane
#

then again, midi does kinda have about 200 issues outstanding so maybe not link its issue tracker hehe

#

or maybe do, then the helpers can help clear some

short aurora
#

I'm game for helping out with the Discord but have only a modicum of experience

#

Lead a guild discord of like 40 max in an mmo level

#

but I think Foundry started as that so y'know

violet meadow
#

need more hands

short aurora
#

just have more hands

static sparrow
#

๐Ÿ‘

#

(Casting Burning Hands at y'all.)

gilded yacht
#

I need to walk some dogs (before they eat the sofa), but will pick up on my return

vast bane
#

The only valuable thing I can supply is lots of time online and good knowledge of the module. If it wasn't for foot-in-mouth-itus, I'd probably fit as a good moderator.

vast bane
#

Of all the discords yours is by far the coolest looking and very functionally helpful.

#

Then again yours targets just one module

violet meadow
#

How do these look for roles?

vast bane
#

I'm good but what are each role exactly lol.

#

Tposney is top as dev, blue would be other mod devs, purple is moderator, orange is helpers, yellow and green are something else?

violet meadow
#

Owner sorcerer supreme
Guardian moderator
Sage developer
Adept helper
Patron supporter
Apprentice member

molten nexus
#

i think the roles are good names but that order seems odd

violet meadow
#

The order is off ... Discord failed me

molten nexus
#

as it does on mobile

#

im assuming it would be sorcerer supreme, guardian, adept, sage, apprentice, patron, based on the colors. Though i'd put sage above adept and patron above apprentice

static sparrow
#

Is there a midi Patreon?

vast bane
#

no I think its patron as in the actual term patron

static sparrow
#

That doesn't really clarify things for me, haha

vast bane
#

patron would be a user who contributes to the community vs a user who comes for help with it

#

I think I'd be a patron probably whereas Truth would be a member

static sparrow
#

That sounds like the proposed "Adept" role.

violet meadow
#

Patron would be maybe for supporters (Kofi and whatnot)

vast bane
#

Adept is more like what chris and bugbear and krig are

static sparrow
#

I mean, bugbear added little summaries, and Adept is "helper" while Patron is "supporter."

vast bane
#

I parade as a helper but I'm more like wildmagic sorcery, half the time I'm right and half the time I'm a potted plant

short aurora
#

tposney does have a kofi, but they should maybe add a patreon so we can (easier) moneyguilt him into developing

static sparrow
#

"Supporter" is like... giving tposney money.

vast bane
#

I'd call that role, room for potential but no immediate impact on the community setup

static sparrow
molten nexus
#

probably why his kofi is buried anyway lol

vast bane
#

the patron/patreon thing can be handled down the road we can just placeholder it for now. Roles look good, I think the ranking of roles is important so that the right color shows on the user though

molten nexus
#

my take on it:

๐Ÿ”ด Sorcerer Supreme - owner (red)
๐ŸŸ  Guardian - moderator (orange)
๐ŸŸก Sage - developers (is green, should be yellow)
๐ŸŸข Adept - someone that's contributed in some informational/helpful way, but doesn't qualify as an above role (is yellow, should be green)
๐Ÿ”ต Patron - some sort of monetary support, connected by whatever platform (is purple, should be blue)
๐ŸŸฃ Apprentice - regular member (is blue, should be purple)

vast bane
#

Why change the colors though? Its not like any other similar discord mirrors it.

molten nexus
#

rainbow

vast bane
#

hah ok now you sold me

#

at first I thought you were trying to match it to cpr

molten nexus
#

nah chris doesn't put that much thought into server role colors

#

i however, do

molten nexus
#

though, there might be a need for a distinct "admin" role, for the person(s) that would have actual control over the server, since they would have more permissions than a moderator. Would either be inserted between owner and moderator, or the sorcerer supreme role could be both owner and admin

spice kraken
# violet meadow How do these look for roles?

The downside of having names like that is that it won't be inherently obvious what all roles are. A potential workaround would be like an Index channel that would detail the purpose of each role (like my Destiny 2 clan has) but would be better (imo) if the names were more specific

#

For example, the only obvious role from that list would be the last one, the other names are bad

molten nexus
#

that's fair, the naming scheme should probably be brainstormed more, but in terms of what types of roles are needed

opaque current
#

Or it could go the simple route of having role names that indicate their purpose, as many servers including this one do ๐Ÿ˜„

molten nexus
#

psh

#

that's boring

opaque current
#

It's informative ๐Ÿง 

spice kraken
#

Short is simple. Simple is sweet

hot flower
#

Midi: Interactive Dungeon Interface, Midi: Inspired D&D Innovation

opaque current
#

Or tposneys Foundry modules ๐Ÿ˜„

limpid saffron
#

I was attempting to cast thundershock
But its not going away after casting
Using Midi QOL
Not sure why
And now the spell wont work at all with Midi QOL

#

Now im stuck with this icon

#

No damage application or saving throws

#

All AOE SPeels seem to break

narrow saddle
#

Regarding MidiQol and a stand alone discord server @gilded yacht
Keep it simple, keep it safe!
Nothing wrong with just simply -
MidiQol by TPosney
Keep it to invite only!
Also consider @scarlet gale method and keep members simple -

  1. Developer (gods)
  2. Testers/Helpers/Moderators
  3. Regular Bods
    Last thing make sure that folk in number 2 are spread out from around the world.
    Australia/US/Europe would cover it.

Iโ€™d be willing to help from the UK, Iโ€™m not the most knowledgeable but Iโ€™m pretty good at netiquette ๐Ÿ˜Ž and signposting ๐Ÿ‘€

limpid saffron
#

ANy help fixing AOE Spells?

scarlet gale
limpid saffron
#

I just managed to figure it out

#

Error in the Workflow section

#

:/

proper robin
gaunt python
#

Picking up where I stopped yesterday. I am looking to make the chat message of a CompleteItemUse a whisper to the player and the gm while the rest of the item macro can be public.
From what I found and understand, I have the result of the midi call and therefore the ItemCardId which I can then use to filter game.messages and make an update to it altering the whisper array.
Am I missing something, or is this the way?

gilded yacht
orchid hound
#

Do what you think is best and what works best for you to manage.

gilded yacht
gaunt python
gilded yacht
# scarlet gale Lmk if you want a hand

Absolutely happy (delighted) to have help. @violet meadow has kindly been helping, but I know nothing about discord and what best practice for setting up might be.

narrow saddle
gilded yacht
scenic lava
#

I am not sure if this is the right place to ask but I don't see any channel for DAE. I am having an issue with an OverTime effect that doesn't appear to be firing. Can anyone assist?