#MidiQOL

1 messages Β· Page 100 of 1

vast bane
#

then again I could make my own wiki and you could pull from it right?

violet meadow
#

Probably. I haven't used it at all, didn't have time. I will take another look

vast bane
#

If you want to back burner it on your end, I'll try to give the wiki a run with a list of spells and what modules have automations for them.

violet meadow
#

Having at least a shareable file with linked content to git repos would be a good start

vast bane
#

I was gonna do a table format document with columns for midi srd, midiqol, cpr, w15, crymic(pending permission), MrPrimate(pending permission) and then just put an checkmark if they have content for said spell

#

Kinda assuming if you published your module that that is permission to reference it thats why I'm not asking for permission from tposney/you/chris/w15 lol

#

If I'm mistaken I can get permission for those too heh

echo shoal
#

Well, I fixed the issue I have. Basically with the dbd importer fixed everything, specially with the auto macros.

covert mason
#
let actorToken = canvas.tokens.controlled[0];
let magmasteelAxe = actorToken.actor.items.find(i => i.name === "Magmasteel Axe");

if (!magmasteelAxe) {
  ui.notifications.warn("Magmasteel Axe not found in inventory.");
  return;
}

let effectData = {
  label: "Unstable Overheating",
  icon: "icons/svg/fire.svg",
  changes: [
    {
      key: `system.damage.parts`,
      mode: 0,
      value: [["1d8", "slashing"], ["1d4", "fire"]]
    }
  ],
  flags: {
    "macro.executeAlways": true,
    "macro.autoCheck": true
  },
  origin: actorToken.uuid,
  disabled: false,
  changesDuration: null
};

actorToken.actor.createEmbeddedDocuments("ActiveEffect", [effectData]);

ChatMessage.create({
  content: `
    <div class="dnd5e chat-card item-card">
      <header class="card-header flexrow">
        <img src="${actorToken.actor.img}" title="${actorToken.actor.name}" width="36" height="36" />
        <h3 class="item-name">${actorToken.actor.name}</h3>
      </header>
      <div class="card-content">
        <p>Magmasteel Axe gains 1d4 fire damage</p>
      </div>
    </div>
  `
});

effectData.changes.push({
  key: `system.damage.parts`,
  mode: 1,
  value: [["1d8", "slashing"]]
});

let effect = actorToken.actor.effects.find(e => e.system.label === "Unstable Overheating");

if (!effect) {
  ui.notifications.warn("Active Effect not found.");
  return;
}
await actorToken.actor.deleteEmbeddedDocuments("ActiveEffect", effect.id);```
Appears to be giving me this error.
covert mason
# covert mason ```js let actorToken = canvas.tokens.controlled[0]; let magmasteelAxe = actorTok...

I'm trying to create this item:

Magmasteel Axe
Weapon (battleaxe), uncommon

This axe has 4 charges and regains 1d4 expended charges daily at dawn.

Unstable Overheating. As a bonus action while holding this axe, you can expend 1 charge to ignite it, causing veins of searing magma to light up across its blade. While ignited, this axe sheds dim light in a 5-foot radius and deals an extra 1d4 fire damage to each target it hits. When you roll a 4 on this extra damage, the axe erupts violently, and each creature within 10 feet of the axe must make a DC 13 Dexterity saving throw, taking 2d4 fire damage on a failed save, or half as much damage on a successful one. After the axe erupts, it’s no longer ignited.```

by creating a custom feature that allows the user to "ignite" the axe by creating an active effect on the user, which edits the axe to add an extra 1d4 fire damage. Once the 2d4 fire damage happens, I'm looking to delete the extra fire damage on the axe and remove the active effect. Here's what I have so far.
violet meadow
#

Well this seems to me sus ```js
let effectData = {
label: "Unstable Overheating",
icon: "icons/svg/fire.svg",
changes: [
{
key: system.damage.parts,
mode: 0,
value: [["1d8", "slashing"], ["1d4", "fire"]]
}
],
flags: {
"macro.executeAlways": true,
"macro.autoCheck": true
},
origin: actorToken.uuid,
disabled: false,
changesDuration: null
};

#

You need to update the Item

#

Warpgate mutate the embedded Item, to have an extra 1d4 of fire damage when the AE is added.
Give the AE a special duration of 1attack
Warpgate revert the embedded item to original state when the AE gets deleted

#

Ah I reread the description and its a bit different, but still doable.

vast bane
#

yeah you are trying to put damage parts in an ae not an item

#

there has to be atleast 1 example on the warpgate wiki for this

violet meadow
#

Also the flags and the changesDuration are strange

vast bane
#

isn't e.system.label suppose to be e.label?

#

that was a data that probably needed to be yeeted

violet meadow
#

that too

vast bane
#

is this macro a hotbar macro?

#

cause relying on controlled and not a hotbar, can be..problematic

covert mason
#
const mutation = {embedded: {Item: {magmasteelAxe: {'system.damage.parts': ["1d8", "slashing"], ["1d4", "fire"]]}}}

await warpgate.mutate(token.document, mutation, {}, {name: 'Unstable Overheating'})```

Perhaps something akin to this?

It's an ItemMacro
short aurora
#

That error in particular is because you're using embeddedDocuments but not feeding it an array, I think Moto mentioned it

vast bane
#

yeah you gotta put a combo of brackets

short aurora
#

actorToken.actor.createEmbeddedDocuments("ActiveEffect", [effectData]);

vast bane
#

I wanna say its [{}] around the stuff following it

short aurora
#

I just wrote in another language where arrays were different brackets, js are the square brackets right

violet meadow
#

Missing a [ but yeah

vast bane
#

for your latest blurb, is item defined?

violet meadow
vast bane
#

I think the second line there needs a const in front

#

actually that second line feels like a paradox

short aurora
#

It looks like Janner is getting the damage parts (which are arrays) and are trying to set an element in that array to... the entire damageParts array again?

#

damageParts are arrays of arrays but I'd just update the entire thing instead

violet meadow
#
const mutation = {embedded: {Item: {"Magmasteel Axe": {'system.damage.parts': [["1d8", "slashing"], ["1d4", "fire"]]}}}}

await warpgate.mutate(token.document, mutation, {}, {name: 'Unstable Overheating'})
vast bane
#

can that be a dae item macro so that args on it mutates, and args off it dismisses the mutation?

#

or an effect macro, on creation and then on deletion heh

violet meadow
#

Need the correct Item Name too

#

Is this how it's called? magmasteelAxe

covert mason
#

Magmasteel Axe

#

Aye, error evaluating the macro. Was intending for this to be an ItemMacro for use in an "Unstable Overheating" feature

violet meadow
#

Get it again. One more } needed

covert mason
#

oop-

violet meadow
#

Though you are missing out the +@mod that way

#

Add it for the slashing damage probably?

covert mason
#

Yup, that works!

violet meadow
#

You can add a macro onUse too, to make it auto revert when a 4 is rolled in the fire damage

covert mason
#

Here's how I've set it up so far:
Turns out EffectMacro could be of some use here.

violet meadow
#

@gilded yacht have you checked at all the onUpdateTarget and onUpdateSource flags?
They don't seem to function for the last couple of DAE updates. I am on 10.0.25 currently

covert mason
#

And then maybe if I put the feature in the Magic Item tab-
I can combine them both without having to take up more inventory space.

violet meadow
#

Sounds like a plan πŸ˜„

vast bane
#

do we really need to step down to 23 again?

violet meadow
#

Nah I would wait for the update tposney mentioned. I am just waiting for it to test some MidiSRD Items

violet meadow
covert mason
#

I recall there being a method to use a directory feature via macro, and I used it for when a Astral Visage monk's arms appear. The radial force damage item would be used from the directory when the effect macro detects that the active effect for it has been created. I can't find it at the moment, but would it be possible to do the same, but for the effect deletion? And maybe have something detect when the axe rolls a 4 on its fire damage, and delete the effect when it does?

vast bane
#

I think detecting a 4 would be world script territory or an activation condition/on use macro

#

is it the only d4 rolled?

covert mason
#

Yup.

#

Ah, here it is:

const item = game.items.getName("Eruption");
const data = game.items.fromCompendium(item);
const fake = new Item.implementation(data, {parent: actor});
return fake.use({}, {"flags.dnd5e.itemData": data});
#

I could use something like that.

vast bane
#

With MrPrimates Ice Knife macro, there are times when players use it on a large or larger creature where it seems to pick only 1 square to target of the creature and only people within 5ft of that square are affected. Is there a way to fix it so that it does all the squares around a large+ creature?

#

I dunno if thats even raw actually let me double check

#

is IT in this statement referring to target or shard?

Hit or miss, the shard then explodes. The target and each creature within 5 feet of it must succeed on a Dexterity saving throw or take 2d6 cold damage.

molten solar
#

With that wording, I would actually say the radius increases with the size of the targeted creature.

#

The spell does not target a point, but a creature.

vast bane
#

sometimes the automation works and it prompts everyone, other times it seems like it picks the top left square of a large or larger creature

molten solar
#

The top left is the 'default', and then it's up to modules to "gather all the actual occupied grids"

#

ask me how I know

vast bane
#
// Midi-qol "on use"
const lastArg = args[args.length - 1];
const tokenOrActor = await fromUuid(lastArg.actorUuid);
const casterActor = tokenOrActor.actor ? tokenOrActor.actor : tokenOrActor;
const casterToken = await fromUuid(lastArg.tokenUuid);

if (lastArg.targets.length > 0) {
  let areaSpellData = duplicate(lastArg.item);
  const damageDice = 1 + lastArg.spellLevel;
  delete(areaSpellData.effects);
  delete(areaSpellData.id);
  delete(areaSpellData.flags["midi-qol"].onUseMacroName);
  delete(areaSpellData.flags["midi-qol"].onUseMacroParts);
  delete(areaSpellData.flags.itemacro);
  areaSpellData.name = "Ice Knife: Explosion";
  areaSpellData.system.damage.parts = [[`${damageDice}d6[cold]`, "cold"]];
  areaSpellData.system.actionType = "save";
  areaSpellData.system.save.ability = "dex";
  areaSpellData.system.scaling = { mode: "level", formula: "1d6" };
  areaSpellData.system.preparation.mode ="atwill";
  const areaSpell = new CONFIG.Item.documentClass(areaSpellData, { parent: casterActor });
  const target = canvas.tokens.get(lastArg.targets[0].id);
  const aoeTargets = await canvas.tokens.placeables.filter((placeable) =>
    canvas.grid.measureDistance(target, placeable) <= 9.5 &&
    !canvas.walls.checkCollision(new Ray(target.center, placeable.center), {mode: "any", type: "light"})
  ).map((placeable) => placeable.document.uuid);

  const options = {
    showFullCard: false,
    createWorkflow: true,
    targetUuids: aoeTargets,
    configureDialog: false,
    versatile: false,
    consumeResource: false,
    consumeSlot: false,
  };

  await MidiQOL.completeItemRoll(areaSpell, options);
} else {
  ui.notifications.error("Ice Knife: No target selected: unable to automate burst effect.");
}
molten solar
#

Yeah, canvas.grid.measureDistance written like that just uses one point, and you're using the top left.

vast bane
#

k, now let me make sure I'm using MrPrimates version now

molten solar
#

You could use target.center

#

and then scale up when appropriate

vast bane
#

I wonder if a find nearby can't be used

molten solar
#

Probably. Got a function in babonus too

vast bane
#

yeah this is ice knife from MrPrimates github

violet meadow
#

Just use MidiQOL.findNearby

#

no need to overcomplicate it. That always returns the correct distance no matter size

#
const aoeTargets = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);
covert mason
#

Still having a bit of trouble with the Magma Axe

I've got this set up here.

Here's the On Creation macro:

const mutation = {embedded: {Item: {"Magmasteel Axe": {'system.damage.parts': [["1d8 + @mod", "slashing"], ["1d4", "fire"]]}}}}

await warpgate.mutate(token.document, mutation, {}, {name: 'Unstable Overheating'})

const itemData = game.items.getName("Eruption").toObject();
return effect.setFlag("effectmacro", "itemData", itemData);```

Here's the On Deletion macro:

```js
const itemData = effect.getFlag("effectmacro", "itemData");
return new Item.implementation(itemData, {parent: actor}).use({}, {flags: {dnd5e: {itemData}}});

if(mutation) {
    return await warpgate.revert(token.document, "Unstable Overheating");  ```

The only trouble is that it doesn't revert the mutation or use the feature.
#

It mutates the Magmasteel Axe just fine, though.

violet meadow
#

Yeah you don't define mutation in the OnDeletion so never happens

#

Also you return before that πŸ˜„

covert mason
violet meadow
#

For the on deletion just use the warpgate.revert line

covert mason
#
const itemData = effect.getFlag("effectmacro", "itemData");
return new Item.implementation(itemData, {parent: actor}).use({}, {flags: {dnd5e: {itemData}}});

return await warpgate.revert(token.document, "Unstable Overheating");  ```
#

Oop-

The Eruption works now

violet meadow
#

I am a bit lost on what you're trying to do, but surely if you return you bail out of the rest of the macro

#

So get rid of the first one of the two returns

covert mason
vast bane
#

after I test it

violet meadow
#

Otherwise will need to fix that

covert mason
violet meadow
#

yes. You can add an onUse macro as a flag in the initial mutation. After all it is a flag

#

And then it can get called as a regular onUse macro on the mutated Item whenever it's used

vast bane
#

Hmmm, I don't think I can include Crymics repo till he submits his own list to me since I can't see his whole setup

#

Is DDB's automated stuff specfically only in that macro link I keep sharing? Does he keep things anywhere else?

scarlet gale
#

Honestly linking just the macros isn't super helpful. Most of his stuff the module sets up

vast bane
#

it requires some leg work but I've managed to pull off alot of his

covert mason
#

Here's an attempt at that OnUse macro

// Check if the Magmasteel Axe is being used and rolled a 4 on its extra fire damage
if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
  if (args[0].terms[0].results[0].result === 4) {

    // Get the Unstable Overheating effect and delete it
    let effect = actor.effects.find(e => e.label === "Unstable Overheating");
    if (effect) effect.delete();
  }
}```
vast bane
#

like ice knife above

scarlet gale
#

Why are you getting the item like that?

#

That will always be true

grizzled widget
#

I have this flag on a character token in DAE, but perhaps I'm missing how to activate it.

scarlet gale
#

Since you're searching the inventory

covert mason
violet meadow
#

Nope. You will need to log the args[0] on your macro and check how the args[0].damageList lists the specific rolls

You are kind of shooting blindly up to this point.

Log the args[0] and go through them.

scarlet gale
#

This an actor on use?

#

Or just the item

violet meadow
#

Both of these 2 make no sense πŸ˜„ ```js
args[0]?.damageTotal === "1d4 + 4") {
if (args[0].terms[0].results[0].result === 4) {

#

Just the Item

covert mason
#

It's just the item the actor uses

violet meadow
#

If its critical you would need to go into the damageRoll results and check the terms of the fire damage to have at least one 4

scarlet gale
#

Damage total will never be a string

violet meadow
#

Yeah and it won't give you any information usable for the check you need

#

Always start by logging the args[0] on the macroPass you want to check what's up.
Then you can structure your conditions properly.

covert mason
#
// Check if the Magmasteel Axe is being used and rolled a 4 on its extra fire damage

console.log(args[0]);
console.log(effect);

if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
  if (args[0].terms[0].results[0].result === 4) {

    // Get the Unstable Overheating effect and delete it
    let effect = actor.effects.find(e => e.label === "Unstable Overheating");
    if (effect) effect.delete();
  }
}```
vast bane
covert mason
#

Yeah

vast bane
#

in a live session its just awful to keep on

covert mason
vast bane
#

I do wish for it to update and fix that issue but till then its probably best midi users not run it with it

scarlet gale
#

That module needs to add a null check on it's logic it seems

#

If it's not protected for null IDs

vast bane
#

yeah, basically if you so much as sneeze with it enabled with midi, you get hundreds of those long red errors

#

MTB also adds to it

scarlet gale
#

Sounds like the module would get this error with more than just midi

vast bane
#

yeah, its on any token update, MTB handles the token health in my world so thats why it gets lumped in

scarlet gale
#

It's expecting data that isn't always there in that hook

vast bane
#

the second you shut off heartbeat then all the red spam goes away, I was gonna write an issue to them but its hard to sus out what module deserves the issue as a newb code junky like myself

scarlet gale
#

It's heartbeat I think

violet meadow
#

effect is not predefined by MidiQOL so it will error out

vast bane
#

isn't he defining it in the line right above?

#

oh you mean effects

violet meadow
#

Goes the other way around. It's defined later

vast bane
#

oooh so move the console.log down

covert mason
#

Turned off Heartbeat. Just getting this now.

if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
  if (args[0].terms[0].results[0].result === 4) {

    // Get the Unstable Overheating effect and delete it
    let effect = actor.effects.find(e => e.label === "Unstable Overheating");
    if (effect) effect.delete();
  }
}

console.log(args);
console.log(effect);```
vast bane
#

Is there an Unstable Overheating on the actor?

covert mason
#

Yup

scarlet gale
#

Not the issue here

#

It's never reaching the definition of effect

covert mason
#

I think it was said the issue was the damage bit, which isn't a function. I just don't know what the proper function or way to do this is sad_cat

violet meadow
#

Scope πŸ˜„

#

Use ONLY this in your macro ```js
console.log(args[0]);

#

Check where all the relevant info you need is

#

Then create the conditionals

vast bane
#

Chat GPT suggested to me yesterday to put an additional layer in so that warnings wouldn't error out with undefineds: So I added the top line here into my searches.

let effectNameFallBack = "Dual Wielder" // Define the name of Dual Wielder 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
  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
}
scarlet gale
#

Not helpful here

vast bane
#

Sorry

scarlet gale
#

The issue is that effect only gets defined in the if statement

covert mason
#

Admittedly, I've been trying to use ChatGPT for coding help as well. Just goes to show you that AI really isn't all that advanced for coding yet.

scarlet gale
#

But it's not reaching that

violet meadow
#

Yeah and is not needed at all at this point

vast bane
#

I found that if I fed it the advice here from the smart folks, it could translate the parts I didn't understand from them well lol

scarlet gale
#

If you delete the console.log(effect) you'll technically fix it

#

But the condition check just be to be fixed up m. Log out args and dig into the damage terms

covert mason
#

Aye, I've got this, and I'm trying to look through the logs to find where the d4 for the fire damage is

if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
  if (args[0].terms[0].results[0].result === 4) {

    // Get the Unstable Overheating effect and delete it
    let effect = actor.effects.find(e => e.label === "Unstable Overheating");
    if (effect) effect.delete();
  }
}

console.log(args[0]);```
vast bane
#

Chat GPT is also on like a 14 month delay on foundry vtt code too, if you tell it its wrong it will rewrite it with the v10 code though:

covert mason
#

Here, perhaps?

vast bane
#

Wow this table checklist idea is tedious

vast bane
#

I think I'm scrubbing the table checklist idea for premades cause honestly, if you are this into the weeds with midiqol, you really should have midi srd and CPR. Thats all you need. in 3 months from now CPR should have all the non srd stuff and Midi SRD's about to drop a massive update anyway.

#

If anyones curious, this is as far as I got lol

violet meadow
#

Interesting though πŸ˜„

vast bane
#

I was tempted to do an image and use a good editor instead to speed it up but an image is not searchable

#

I dunno, I think I will keep at it, but I need a break from it, and maybe readjust to a different format cause I do not like the github editor at all

calm hemlock
#

Ok, word of warning, I'm a bit new to foundry. I'm trying to get midi qol to work. I've installed it and enbaled it for my world along with its dependensies. To my knowledge I should now be able to select a character and target a character/npc and roll against its ac and damage it and all etc.... Both characters here have a sheet and everything but its not working. Am I targeting wrong or not installing something correctly? I'm lost ;(.

violet meadow
#

I think that it would make sense for MidiQOL to introduce a companion module for Items automation setup, like what WIRE does.

We could all contribute to that one following some guidelines πŸ€”

scarlet gale
#

We all have very different ways of doing things

#

I dislike DAE pass stuff for example

#

And just use effect macro instead

violet meadow
#

That is an issue of course πŸ€”

violet meadow
calm hemlock
#

I didn't touch workflow, I assume thats where?

vast sierra
calm hemlock
#

ok! ty!

vast sierra
# calm hemlock ok! ty!

After picking one, and testing some, come back with questions/ problems and the wizards here can help sort them out πŸ™‚

inland vortex
#

if i want to effect weapon attacks do mwak and rwak stand for melee and ranged weapon attacks?

static sparrow
#

Yep!

inland vortex
#

Thank you!

vast bane
# calm hemlock ok! ty!

once you fiddle with things feel free to ask questions here about any settings or anything you don't like or don't understand, quick settings is a great setting to use when starting out. But try to ask about this stuff just in this thread, this discord doesn't really like midi taking up other channels spaces.

covert mason
#
const imgToken = "/Player_Tokens/Grunka/Grunka_Topdown_Large.webp";
const imgActor = "/Player_Tokens/Grunka/Grunka%20Enlarged%20Solo.webp"
const item = game.items.getName("Primordial Eruption");
const itemData = game.items.fromCompendium(item);
const fake = new Item.implementation(data, {parent: actor});

const data = {
  token: {
    height: 1,
    width: 1,
    scale: 1.3,
    texture: { src: imgToken },
    light: {
      color: "#ff9c33",
      dim: 20,
      bright: 10,
      alpha: 0.5,
      animation: { type: "torch", speed: 3, intensity: 1 }
    }
  },
  actor: {
    img: imgActor,
  }
};
await warpgate.mutate(token.document, data, {}, {name: "Primordial Form"});

return fake.use({}, {"flags.dnd5e.itemData": itemData});
ui.notifications.info("Fiery Fists added to your inventory");```

Is there something I'm doing wrong here?
vast bane
#

with renewed morale and a pep talk from a few I've actually resumed the new wiki entry for a table checklist of where to find stuff

static sparrow
#

Is it something you’re working on live, or are you compiling it offline and only publishing when it’s done?

#

I for one think the checklist would be super useful.

vast bane
#

I honestly feel that ultimately midi srd+cpr will cover it all given a few more months time and then this checklist will be obsolete

#

it can however have uses beyond the users, the authors can scan it and see what stuff has little representation and possibly focus on covering the gaps

#

I'm shocked animated objects has no premade yet so far in my run of it

#

its shadow banned at my table so I never bothered to look lol

static sparrow
#

In a macro, within midi's workflow, how would I target whatever creature aside from the one that rolled the item who's in the space of the creature who rolled the item? Like, I'd like, when the item is rolled, for whoever else is in roller's space to be auto-targeted so the player can click the damage roll in the chat card without worrying about targeting.

vast bane
#

water/air/fire elemental feature?

covert mason
# covert mason Here, perhaps?

@violet meadow

I'm still a little confused as to how to put this into code. How do I detect if the result of dice 1 is 4?

vast bane
#

replace enemy with creature if it hits allies

static sparrow
#

That's not in a macro πŸ˜„

vast bane
#

I kinda assumed, poorly, that you were only trying a macro cause you didn't know about that

static sparrow
#

No I'm wanting it in a macro because I want the targeting to be automatic.

vast bane
#

ok but just to be clear, mine is here for the item itself

static sparrow
#

Not sure what you mean by that?

vast bane
#

when my cleric rolls their turn undead with it set this way, it auto targets the undead that are in the same square as him and does the whole items effects to just that token on top of him

#

this type of item range/target requires a specific midi setting to be set right then you will auto target and apply shit to them

static sparrow
#

What setting is that?

vast bane
#

this setting has issues on levels maps I believe so beware of that

#

I think it needs levels auto cover to function right with elevations

#

or the elevation distance checker on in the optional rules in midi(but will still not know tiles block in levels)

static sparrow
#

What does that setting really do? I definitely don't want all ranged attacks suddenly auto targeting. I don't even know what that would mean.

vast bane
#

honestly it literally makes what I just shared work, otherwise it does nothing when the targets set that way

static sparrow
#

That setting is very confusingly named, then. I don't really see any relationship between the setting and the behavior you're describing XD

vast bane
#

it makes aura like instant effects work with midiqol

#

examples:

turn undead, sword burst, word of radiance, thunderclap

static sparrow
#

I'll give it a try, thanks!

#

Would I need "Ally" instead of "creature" to omit the caster itself?

vast bane
#

The bottom checkmark here will make it look at height of tokens in the same square as it:

#

the special in range is what blocks the caster

#

If you set it to creature or ally, a range of special just for some reason with midi, is a flag to ignore the caster

#

I do special in turn undead cause My old turn undead still auto targetted non undead, CPR's version fixxes it for me and I never fixed it lol

static sparrow
#

Gotta be careful if the cleric is undead themselves then O:

violet meadow
vast bane
#
await MidiQOL.applyTokenDamage([{
    damage: 1d6,
    type: 'psychic'
}], damage, new Set(token), null, null);

Trying to do a hotbar macro to damage selected token?

#

do I really have to define token? Or is this a side effect of advanced macros?

dark canopy
#

Neither, damage is not defined

vast bane
#

isn't it 1d6?

dark canopy
#

No. It's undefined

#

You never defined damage

vast bane
#

I guess I don't know how to use this then

tardy root
#

Hey all! Could somebody walk me through setting a macro to repeat at the start/end of a turn?

vast bane
#

cause theres multiple ways to do things that could be described that way

#

more context would save us all time

tardy root
#

Ah okay, my bad! I'm utilizing this macro (thank you @short aurora!) and was wondering how I set a macro to repeat, I have it as an ItemMacro stuck onto Rage right now. #1010273821401555087 message

vast bane
#

if its really divine fury, just use CPR's if you want my version of it I can give you that too

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

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

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

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

replace your midi sample item rages item macro with this one

tardy root
raven holly
vast bane
#

also for the WIP version that you have there, I haven't done the pass for w15ps's module as I don't use it

#

and CPR probably will update 100 times before thats finished lol

#

I already submited the overtime cheat sheet to bugbear for the official wiki

raven holly
#

yea, I dont use any of them, but I have all the class features on an old spreadsheet, so it's pretty easy for me to create the md tables at least

raven holly
vast bane
raven holly
#

excel baybee

vast bane
#

I take it theres a paste as markdown or something?

#

Gonna snag this for my work then, but I started on spells so I guess I should finish that first, its the biggest of them I think

#

500ish spells

raven holly
#

nah, I just built in the md formatting like the pipes and stuff, then just copy + paste right into the github editor (ctrl + shift + s, otherwise it also tries to embed an image of the spreadsheet for some reason)

#

This is just over 1000 items, class features and "choices" like invocations, maneuvers, etc πŸ˜‰

vast bane
raven holly
#

yea, that's why I made it for you haha

vast bane
#

God that is a life saver I been building it manually row by row

raven holly
#

I will be removing it from my git when you take it, so dont get used to the link like you did with the ATL keys πŸ˜†

#

There's gotta be some spreadsheet out there for spells too

vast bane
#

in my defense, the kaelad link I can never find lol

#

keep it up there for like 3 more hours I can't get to my desktop till then

#

I'll ping you or dm you when I got it

scarlet gale
#

I'm sure someone out there has made a way to convert from excel to GitHub table markdown

#

First few results on Google look promising

#

If it helps you moto, I have all my stuff listed on my GitHub readme

vast bane
#

my current count was like 508, but I don't think I have the two newest books

raven holly
#

yea this looks like it's just phb, scag, and xgte πŸ˜”

#

Found one that at least goes up to Tasha's
Do you want it in Spell Level > Alphabetical order, or just pure alpha?

vast bane
#

I went pure alpha, cause I expect the users to just want to ctrl F or scroll by name

#

unless you can think of a purpose for spel level or school break downs I just don't see a need for them though

raven holly
#

I did a quick ctrl+f for anything with an apostrophe and just left the first initial, so Tasha's Hideous Laughter is just T's Hideous Laughter

vast bane
#

I'm gonna put all the proper nouns in a paragraph at the top warning people not to search with them included and then use the standard naming scheme from the SRD in the list

#

prolly gonna use what Mr Primate does, he basically replaces any proper noun with arcane

short aurora
#

tbh I think that's what wizard does as well, bigby is arcane hand for instance

hot flower
#

could someone help me out with a strange macro issue. I"ve got a Yank attack, which pulls an enemy up to 15 feet closer to the caster and puts a custom effect Dizzy on the target. It is working fine, in that it pulls the target up to 15 closer and applies the AE. But when the AE falls off, it tries to run the itemMacro again. Here's the macro:

#

and here's how I have the effect set up:

#

they have to fail a saving throw to trigger the macro and the effect.
should it be two AEs?

#

i can upload the json for the item if that helps.

violet meadow
# vast bane ```js await MidiQOL.applyTokenDamage([{ damage: 1d6, type: 'psychic' }],...

You need to first create the roll and evaluate it and then pass the MidiQOL function the total

const damage = await new Roll("1d6").evaluate({async:true})
const msg = await damage.toMessage({flavor:"This is the message for the damage roll"})
await game.dice3d?.waitFor3DAnimationByMessageID(msg.id)
await MidiQOL.applyTokenDamage([{damage:damage.total, type:'psychic'}], damage.total, new Set([token]), null, new Set(), {});
violet meadow
#

That means it will run when the AE is created.

#

Now it runs both when the AE is created (on) and when it's removed (off).

hot flower
#

do I need to create an "off" conditional, too

violet meadow
#

No need if nothing special happens during the off

#

If it's reverting when the AE is removed though, you can add it in the off.

hot flower
#

well, hell. that just solved all my problems. LOL

#

thank yoU!

#

that was driving me mad

violet meadow
#

Yeah any DAE macro.itemMacro or macro.execute etc will run once when the AE is created and again once when it is deleted.

hot flower
#

well, that is excellent to know. TIL

modern badger
#

Is there a way to set the 'damaged' special duration to a specific damage type?

#

I want a feature that dissapears after a creature takes fire damage.
edit: I am dumbass it's right there.

pastel sedge
#

This flag is not giving my player advantage to his attack rolls. What am I missing?

vast bane
#

So the reason its not happening is cause theres no true statement in the effect value or no 1(its empty)

#

but you also very likely are using the wrong advantage key

#

unless you really do intend to give everyone who hits them advantage

pastel sedge
vast bane
#

also that effect will apply after the attack so you need to either have a macro apply it pre item roll or have two items, one that applies the ae to self, and then the attack after

modern badger
#

lol I'm dumbass what I asked is built in.

vast bane
pastel sedge
vast bane
violet meadow
#

Oh that is coming along nicely! πŸ‘

raven holly
vast bane
raven holly
#

Moto, how good are you with excel/gsheets?
I could set up a page for you that sets the appropriate field to Y/N, but the Spell/Feature names would have to match πŸ€”

static sparrow
#

In an overTime effect, is there a way to do variable damage dice, like this, damageRoll=(@item.level)d6[piercing], in a way that displays on the damage card as just xd6 instead of (x)d6?

vast bane
static sparrow
#

It doesn't cause any problems and it'll bother me if the text is inconsistent for this one use case (same reason I'm asking about the parentheses, haha).

spice kraken
#

damageType=piercing is what you want

proper robin
#

uh, this is midiqol

spice kraken
#

Look, it's been a long day πŸ˜‚

peak spade
#

midi srd is back?

#

finally!

pallid estuary
#

Hey ive been trying for a while to setup a feature when activated gives the user an aura that last 3 rounds and has the following effects

  • Enemies within the aura must make a wisdom at the start of their turn
  • If the enemy fails the wisdom save they roll on a table

I was able to create an effect that uses midi.Overtime to get enemies to make a wisdom save and then activate a macro that rolls a table but when I try to make a feature that applies the effect when the feature is activated then everything breaks. I also seemingly randomly have an issue where the aura will never run out of duration.

Does anyone know what i might be doing wrong?

pallid estuary
#

ill just screenshot what i think is the correct setup

vast bane
#

midi doesn't offer aura features, so is it template macro, CPR, or active auras?

pallid estuary
#

active auras

#

im not sure this is related to Midi but the module troubleshooting guy said to ask here

vast bane
#

the persistence past the duration is probably caused by you using midi to transfer the aura to everyone

pallid estuary
#

im not sure how im doing that

vast bane
#

when the item is rolled is it self/self?

pallid estuary
#

or why it would just not apply the affect to me when i use the effect via a feature

#

let me just screenshot stuff

#

make it easier for everyone

#

This is the setup for my current workaround, the player can toggle on the effect and it will work as intended and then he can toggle it off and it will stop as intended

raven holly
vast bane
#

you have me double checking to make sure I'm in midi lol

pallid estuary
#

This is what I would imagine the setup should look like, but when i click the feature and activate the affect it does not do anything

#

@vast bane because the player activates it by enabling it for now, when i enable it then it works as intended in terms of making enemies make a wisdom saving throw and roll on a table

#

i just bypassed putting it on the feature and made it an effect directly for now but thats not how i would like it to work forever

vast bane
#

in manage modules does ASE have a yellow 9?

#

Either way test your setup with ASE disabled and see if it works

pallid estuary
#

yes but i downloaded ASE a couple days ago and have been dealing with this issue for two weeks

#

but ill test it again with ASE disabled

vast bane
#

and the beta version should be shut off in any test that involves broken midi operations although, honestly you are using aa in a way I've never seen it work

#

I think you need to have the macro check against the actor name and have it not fire for the caster

pallid estuary
#

alright i turned off ase

#

the toggle effect workaround works as intended

#

the feature that im hoping will apply the effect still does nothing

vast bane
#

I dunno how to activate an active aura that ignores self

pallid estuary
#

i can turn off that checkbox

#

i just turned it on for troubleshooting

vast bane
#

that won't matter

#

look at spirit guardians in active auras premades though its out of date it might glean knowledge on how to setup an ignore self aura in active auras

pallid estuary
#

I looked at it when I was setting up the skill and it assisted me with getting the base fuctionality for rolling the wisdom save working but did not help with the rest unfortunitly

vast bane
#

I think its cause active auras doesn't play well with midi

#

miidi expects an item roll to apply the effect

#

so the normal active aura approach is to just enable its effect I think

#

@raven holly Did you do columns or rows? Like are you working through each module or are you just going down the spell list and you don't have the last 3?

raven holly
#

vlookup and a simple macro to rip the items out of compendiums, I'll send you the info in a DM

#

yea I didnt do the last 3, I dont think this method would be helpful for DDB since you import everything not just the ones with fancy macros, and CE is not items so no clue on that one

vast bane
#

ddb I can't do ingame cause I don't own all content on ddb, I was just gonna go down his macro folders in github, w15 is probably only like 5 things, dfreds CE is going to be all ce's not in compendiums. I assume thats why those 3 haven't been parsed?

scarlet gale
#

Ddb is literally everything, whether it's automated or not

vast bane
#

Example: Bless?

#

Cause that'd be automated imo if he does have his bless as temporary

scarlet gale
#

A lot of it gets auto generated to be automated

#

Anything with a condition or save generally

vast bane
#

yeah, I'm gonna solve this tomorrow for sure, I'll just bite the bullet and get the importer in my world

#

Then again I technically have a session tomorrow night. I'm on vacation starting saturday and won't be able to host for 9 days so my players are so badly in need of a session before the vacation lol.

static sparrow
short aurora
sleek bone
#

There would not happen to be someone here who has cooked up a setup for Wall of Fire to be easily thrown out? Adjustable templates and all that stuff included? If not I'll just be a lazyboi and give my Wizard one for a Ring and one for a Line and take it from there

short aurora
#

Be lazy.

Musing aside as to how one could be made for when I want a project to make me yearn for death; stealing the same method Walled Templates and their spread function works, use Warp Gate for some crosshairs and plot the field with small templates that fuse into one. πŸ€”

violet meadow
violet meadow
#

Oh Wall of Fire cannot be blocks, can it?

delicate yacht
violet meadow
#

Anyway I will add that Wall of Fire too then πŸ˜„ ✍️ at some point

delicate yacht
#

Good luck, My druid is really looking toward the moment I finally can let him use it

short aurora
#

Just says wall, right?

violet meadow
#

up to 60ft length, 20ft height, 1ft thick

delicate yacht
#

You create a wall of fire on a solid surface within range. You can make the wall up to 60 feet long, 20 feet high, and 1 foot thick, or a ringed wall up to 20 feet in diameter, 20 feet high, and 1 foot thick. The wall is opaque and lasts for the duration.

short aurora
#

I'd still say that just means it's a line, but making an automation that lets you "draw" that line seems baller, but also hard.

edit: jcrawford disagrees fwiw.

delicate yacht
#

If I knew how to do it : I would have created a spell that just draw the zone (simple) and adding Items "spells" at will that let the caster choose target to either dex save or take damage ; based on this :

When the wall appears, each creature within its area must make a Dexterity saving throw. On a failed save, a creature takes 5d8 fire damage, or half as much damage on a successful save.

One side of the wall, selected by you when you cast this spell, deals 5d8 fire damage to each creature that ends its turn within 10 feet of that side or inside the wall. A creature takes the same damage when it enters the wall for the first time on a turn or ends its turn there. The other side of the wall deals no damage.

spice kraken
#

That kinda thing I feel gets to be a pain to automate. I just pop out the damage card (cause I don't remove buttons) and just use that when necessary

delicate yacht
#

The problem is that I don't know how to add multiple items in the "ItemMacro" use and I'm not sure they will scale up to the level of use...

violet meadow
#

@gilded yacht macro.createItemRunMacro question.
How is it supposed to be used?
If I understand it correctly, when the linked item is created, its ItemMacro will be executed.

I don't see any arguments passed to the macro.execute though, at the point of creation πŸ€”

solid mountain
#

Thought, would it be possible to change the icon of an active effect on an actor through a macro?

short aurora
vast bane
molten solar
violet meadow
#

Updated Fire Storm for MidiQOL (will be in MidiSRD).
Needs Warpgate (and ItemMacro optional but suggested).
MidiQOL item onUse ItemMacro | Only called once a template is placed
Use the Fire Storm item from the Spells (SRD) compendium, with the addition of the onUse macro call.```js
if (!args[0]) return ui.notifications.error("Fire Storm error: If using ItemMacro make sure that Character Sheet Hooks option is NOT selected or make sure that you are executing this macro via MidiQOL item onUse methods.");
const { workflow:{item}, templateUuid, macroPass } = args[0];
if (macroPass === "templatePlaced") {
const templateinitial = fromUuidSync(args[0].templateUuid);
const templateData = templateinitial.toObject();
let targets = MidiQOL.selectTargetsForTemplate(templateinitial.object);
const getTargetsIds = await nameMe();
game.user.updateTokenTargets(getTargetsIds);

async function nameMe() {
for (let i=1; i<10; i++) {
const result = await Dialog.confirm({
title: "Fire Storm templates placement",
content: Do you want to place template number ${i+1} out of 10?,
rejectClose:false
});
if (!result) break;
const config = {label:"Fire Storm templates", icon:item.img, lockSize:true, size:2, rememberControlled:true, interval:1};
const {x,y,cancelled} = await warpgate.crosshairs.show(config);
if (cancelled) break;
templateData.x = x - canvas.grid.size;
templateData.y = y - canvas.grid.size;
if (!templateData) break;
const [template] = await canvas.scene.createEmbeddedDocuments("MeasuredTemplate", [templateData]);
targets = targets.concat(MidiQOL.selectTargetsForTemplate(template.object));
}
return targets.map(i=>i.id);
}
}

atomic badge
#

So I'm trying to automate Aura of Conquest and I was wondering if this is correctly written for its condition?
applyCondition=Frightened
(The rest)

vast bane
#

I actually think that that specific aura is not really an aura

#

I think that how you automate that aura is you take all of that paladin's fear abilities and do a check for if they are within 10ft(30ft at lvl 18) and apply a custom condition to reduce their speed to zero and apply psychic damage.

weak quest
#

This works if the GM does it, however, players "lack permissions to create ActiveEffect in parent Actor". Is there a way to replicate the spell's behavior in a way that players can use it?

atomic badge
#

Hmm, that's one way to do it for sure.

vast bane
violet meadow
weak quest
violet meadow
#

I know, I have changed that in the yet to be released version πŸ˜…

vast bane
violet meadow
#

I am diggin myself in a hole...

vast bane
#

So Maxpat did midi srd/midiqol/CPR for the table checklist and I decided to take on DDBI. Holy shit is there a ton of stuff that are not caught. MrPrimate automates a ton of stuff for midi users that are not listed in his github lol.

#

the worst part of it is I have to manually confirm them

#

cause you can't check if bless is setup right in it, which is technically automated

#

you have to go in, edit the item, and look

#

Even acid splash is actually done right in DDBI and not dnd5e srd

violet meadow
#

Bless, Bane will be in MidiSRD too without DFreds CE

vast bane
#

what I really wanna know is wtf is midi srd and ddbi doing with alter self lol I'm afraid to test it in my world but for some reason they got complex automation setup on a spell that is arguably subjective lol

violet meadow
vast bane
#

Dfreds and DDBI are the hard ones

#

I'm also grading the checkmarks on whether the item is specially modified to work with midiqol, so thats why Acid Splash gets a checkmark in DDBI, he purposely added 2 targets to the target setting

#

Acid arrow has an overtime, not caught in parsing his github, so thats another example of why I have to purposefully look at the ddbi items

#

I actually think that all the premade makers need to consider the fact that upcasting certain spells expands the target count so those spells really should have no target counts. Example: Hold Person

#

Either that or maybe tposney needs to work the ignoring of target count into an upcast and add it as a checkbox at the bottom of the item

#

bless/bane suffer this as well

#

I think its purely a byproduct of all of you using the base items from dnd5e srd or ddbi

violet meadow
vast bane
#

I'm also missing the books for dragonlance and spelljammer so I can't confirm ddbi's spells for those books

violet meadow
#

Actually let me know if it works cause I grabbed an Item and didnt check, as I had to "export" the MidiSRD functions

atomic badge
#

Does anyone know where I can find the info required to make something scale based on class levels? Trying to figure out how to make it scale with half X class level.

#

Been trying to find it in Midi's documentation but no luck there, is it a basic Foundry functionality?

weak quest
atomic badge
#

Thanks!

atomic badge
#

Appreciated. o7

weak quest
violet meadow
#

@vast bane is the Acid Arrow's splash damage (the one when you miss the ranged attack) supposed to be scaled up by spellLevel?

vast bane
#

theres a few that don't do the full workup on an automation but do enough to count

#

Some premades I've qualified could use activation conditions but I'm just letting them go and counting them

#

(I'm only directly looking at DDBI) yours and CPR's I'm just parsing the compendiums and checking if they exist

boreal maple
#

Is there a way for an attack in D&D 5e to trigger a DC check if the attack crits? For instance I have given my players a Feat called Mace specialised that if the crit an enemy the enemy has to make a DC 15 con save of be stunned for 1 turn as part of the attack. Right now I am doing it as a seperate saving throw check which the player presses when he crits an enemy. But would love to have it all in one attack since we sometimes forget about the additional benefit.

pulsar cypress
#

Hey friends! Is there a way to create ammunition in Foundry that will not apply damage to the target when loaded and shot?

violet meadow
violet meadow
boreal maple
pulsar cypress
violet meadow
# boreal maple Indeed, automation is what I was looking for πŸ˜‰

You will need to create an on Use macro on the Item.
ItemMacro | After active effect and copy paste this in the Item Macro. ```js
const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const condition = CONFIG.DND5E.conditionTypes.stunned;
const aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === condition));
aeData.flags.dae.specialDuration = ['turnEnd'];
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}

#

Oh hmm let me check something should be good

violet meadow
boreal maple
boreal maple
# violet meadow is it a critical hit?

Yeah I have lowered the crit threshhold to a 5 for testing. It does kick in an a con save now. But the damage is nullified for the attack when it crits. And no stun status effect came on

violet meadow
#

Would it make sense for me to suggest warpgate the Item, preItemRoll, if the ammunition selected is named like the special bullet?

violet meadow
boreal maple
# violet meadow Check for errors in console, if any

685294:11 Uncaught (in promise) TypeError: undefined. Cannot set properties of undefined (setting 'specialDuration')
[Detected 1 package: midi-qol]
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:11:34)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:465:6)
at async Workflow.next (workflow.js:262:10)
at async Item5e.doAttackRoll (itemhandling.js:520:2)
at async Workflow._next (workflow.js:416:6)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)

violet meadow
boreal maple
static sparrow
violet meadow
# boreal maple I do

type in console ```js
condition = CONFIG.DND5E.conditionTypes.stunned;
aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === condition));

boreal maple
violet meadow
#

Oh hmm ok CUB is a black box for me nowadays. Try this now ```js
aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === "Stunned"));

boreal maple
boreal maple
violet meadow
boreal maple
violet meadow
short aurora
violet meadow
#

You could create a DAE for the Stunned condition using the DAE config and adding a CUB Stunned condition. Then add in the durations tab of the DAE the special duration that suits you.
Give it a unique name.
Select the token with that AE on, open console and type ```js
condition = duplicate(_token.actor.effects.find(e=>e.label === "Unique name you used"))

#

@boreal maple πŸ‘†

pulsar cypress
vast bane
boreal maple
vast bane
#

are you trying to remove the core automation of blinded/invisible?

#

or retain it with cub/dfreds?

static sparrow
boreal maple
vast bane
#

dfreds should not affect that, its probably cub that is your problem with that, and you shuldn't have both managing ae's

violet meadow
boreal maple
boreal maple
manic tendon
#

Does anyone have an automated Create Bonfire item by any chance?

boreal maple
# violet meadow if the AE has a name of `My super duper cond` you will need to use ```js conditi...

Sorry the error message is different my bad. Its now 982807:1 Uncaught (in promise) SyntaxError: undefined. "undefined" is not valid JSON
[Detected 1 package: midi-qol]
at JSON.parse (<anonymous>)
at duplicate (commons.js:1897:17)
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:10:28)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:465:6)
at async Workflow.next (workflow.js:262:10)
at async Item5e.doAttackRoll (itemhandling.js:520:2)
at async Workflow._next (workflow.js:416:6)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
d

violet meadow
#

That error means that the name of the Effect and the one that you input in the macro searching the label is NOT the exact same

#

OK I see what's going on with the macro though. Split sec to edit it

violet meadow
#

Make it After Active Effect too and check again if it's still not working

boreal maple
# violet meadow Make it After Active Effect too and check again if it's still not working

I tried both ways. With After Active Effect the damage is coming through even on a failed con save now. But its still not applying the stun and a console error 1041896:1 Uncaught (in promise) SyntaxError: undefined. "undefined" is not valid JSON
[Detected 1 package: midi-qol]
at JSON.parse (<anonymous>)
at duplicate (commons.js:1897:17)
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:10:18)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:934:7)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
d

violet meadow
boreal maple
# violet meadow Can you share the macro you're using to be on the same page?

const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const condition = CONFIG.DND5E.conditionTypes.stunned;
const aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === condition));
aeData.flags.dae.specialDuration = ['turnEnd'];
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}

scarlet gale
#

If you're using CE, you can just use it's API to add the condition

#

But then would not have the special duration

violet meadow
#

Have you reloaded after you changed the settings of DFreds and CUB, if you changed anything/

boreal maple
violet meadow
boreal maple
#

in red

violet meadow
#

What about ```js
CONFIG.statusEffects.find(ae => ae.label === CONFIG.DND5E.conditionTypes.stunned)

violet meadow
boreal maple
#

ActiveEffect5eΒ {changes: Array(3), disabled: false, duration: {…}, #valid: true, #dispatchTokenStatusChange: Ζ’, …}

violet meadow
# boreal maple ActiveEffect5eΒ {changes: Array(3), disabled: false, duration: {…}, #valid: true,...

Try ```js
const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const aeData = duplicate(game.dfreds.effects._stunned);
aeData.flags.dae.specialDuration = ['turnEnd'];
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}

quasi needle
#

is there an easy way to cap current hp instead of max hp? i'd like the player's health bar to show the effect of a depressed hp maximum

dark canopy
#

Negative temp max hp will show that on the token bars

violet meadow
quasi needle
#

perfect. thanks

boreal maple
# violet meadow Try ```js const { isCritical, hitTargets } = args[0]; if (!isCritical || !hitTa...

When testing it with both after attack and after active effects it has the same error. 1215504:10 Uncaught (in promise) TypeError: undefined. Cannot set properties of undefined (setting 'specialDuration')
[Detected 1 package: midi-qol]
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:10:36)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:934:7)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
e

vast bane
#

Just as a funny aside, crazy negative max temp have no floor and even the token hud in core dnd5e fails to account for this, I already reported this glorious bug with pictures

dark canopy
dark canopy
#

So what are you looking for again?

violet meadow
#

I mean I havent found any mention πŸ˜…

#

To actually minimize it

dark canopy
#

Ohhh

#

Hmm, check the xhair config object

violet meadow
#

I will take another look yeah

dark canopy
#

If it's not there, I don't have a switch for it, but it's a one line command

#

Actor.sheet.maximize()

#

Or minimize

violet meadow
#

OK no worries, just trying to see if I was missing something. Thanks!

vast bane
dark canopy
#

Lower case a. Sry for the confusion

#

I.e. a specific actor

vast bane
#

oh so defined in the macro gotcha

#

or selected/assigned if not?

dark canopy
#

Yea, whatever actor you choose

#

However you do it

vast bane
#

interesting, ploppin this into my revisit queue for later, I can see a use for it on my dm'ing hotbar

violet meadow
# boreal maple When testing it with both after attack and after active effects it has the same ...
const { isCritical, hitTargets } = args[0]; 
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
  const aeData = duplicate(game.dfreds.effects._stunned);
  foundry.utils.setProperty(aeData.flags,'dae.specialDuration',  ['turnEnd']);
  if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}
violet meadow
#

That was a trip πŸ˜„

boreal maple
vast bane
hasty jackal
#

I wonder if you can make an effect for healing spirit

#

Its probably hard to do since its an area that heals

vast bane
#

and badger medic is written as a midi/warpgate example

#

it does not account for more than one creature in the space however

#

which I think might be able to be dealt with when you make the actor

#

Just change its target settings to 2.5|feet|ally

#

and set the second drop down in workflow tab at the top to always, ignored defeated

hasty jackal
#

Hmm

vast bane
#

just copy the whole badger medic code and replace the parts that reference Badger medic with Healing spirit or keep it as a badger medic

#

make sure the macro matches the name of the actor you make

inland vortex
#

I'm using the CPR Hex spell. It does everything we want except actually damage the target when hex would. It's easy to work around, but I'm wondering if the CPR version usually does the damage and something is wrong?

scarlet chasm
#

Hey is it possible to change an image of a token with DAE effects. If so what do i type in to make it happen?

vast bane
scarlet chasm
vast bane
#

you can also do it via warpgate too

scarlet chasm
vast bane
#

ATL to me just seems simpler cause its just entering a key and a folder path

scarlet chasm
vast bane
#

first key

#

theres a chance ATL.texture.src still doesn't auto complete in DAE beware, its not a problem, it just means kaelad and tposney haven't updated dae's library of keys for the new updates to ATL

scarlet chasm
#

Ah i wasnt aware of this! Why thank you it saves me making dupes of the same character with a differing image then.

vast bane
#

I dunno if you have to use the replacements for spaces like I did, but /shrug I just used the filebrowsers version of the filepath and pasted it

scarlet chasm
#

oh btw? Advantage reminder? is that a module?

vast bane
#

yeah just look at the first key, the rest of that is for my druids character, advantage reminder is a module that only works if you don't fast forward in midi

scarlet chasm
#

oh

vast bane
#

its rare to see it in use in this channel, I'm a rare breed

scarlet chasm
#

Well moto you are a one of a kind for sure

vast bane
#

The fourth key is cause the druid is high enough level that when shes in symbiotic it upgrades her reactoin feature to a template version so I made it a createitem key

scarlet chasm
#

Hmmm okay i do see the macro create item. Guessing you work with macro yourself too? Ive been looking how to do those things but honestly idk where to start.

#

Thats an another subject at an another time.

#

Thanks again! Moto

vast bane
#

macro.createItem is always hard to explain the process of, but its designed to be user friendly oddly enough.

#

make a compendium or a sidebar folder for storage and then whenever you use a macro.createitem key do this with the stored item:

#

if its meant to only be on the actor while the ae is on them, just do exactly the gif, if its meant to be permenant after the dae is applied, put ,permanent after the drop data

#

if its an item that needs to be attuned/equipped thats going to involve some headaches in macros as the created item comes unequipped/unattuned

#

he made a new key runMacro for it but it runs the wrong items macro imo so I just still use effect macro for equipping/attuning

scarlet chasm
#

oh okay

#

wow that is simple. Glad module devs are making it easier for us DMs.

hot flower
hot flower
#

nope. no errors on players side

#

and none on DM side either. but it is throwing up (on DM's side) a warning that now target is selected. Not doing so on the player side, which does have a target selected.

short aurora
#

... does that have two item macros?

violet meadow
#

Nah just one for v9 and one for v10 πŸ˜„

#

There is a data more in one of the two, so you can keep on using it for both versions as a side effect!

hot flower
#

yeah, this is weird. when i triggerit on the players side, the DM gets a warning that no target is selected, even if a target is selected on the players side.

violet meadow
#

Do you run it as a GM or something with Advanced macros maybe?

hot flower
#

nope. and I can't access the itemmacro as a player.

violet meadow
#

yeah that is some permissions thingy from Item Macro.

hot flower
#

hm. other than whispering private messages, players have all the permissions.

#

everything on item macro is unchecked except Player Access

#

other item macros are firing correctly for this player.

violet meadow
#

Try ```js
const { tokenUuid } = args.at(-1);
const them = fromUuidSync(tokenUuid).object;
const me = canvas.scene.tokens.find(t=>!!t.actor.items.getName("Longbow of Bows (Yank Attack)")).object;

#

@hot flower πŸ‘†

hot flower
#

put that in the item macro?

violet meadow
#

these lines instead of ```js
const me = canvas.tokens.get(token.id);
const them = game.user.targets.values().next().value;

hot flower
#

hmm. nope. But it's throwing the crosshairs up on my DM window instead of the player window.

violet meadow
hot flower
#

and I can't access the item macro even though I clicked the player access on the item macro config sheet

violet meadow
#

If you want to make sure it happens on the players, use an Item onUse MidiQOL instead

hot flower
#

but the macro should only fire if they fail a saving throw

#

and I was hoping to avoid writing a saving throw into the macro

violet meadow
#

Just access args[0].failedSaves as an onUse and if (!!args[0].failedSaves.length) do what you need

#

DAEis tricky to get right some times

hot flower
#

ok. sorry i'm not following for some reason

#

does this need to be set to ItemMacro? like this?

violet meadow
#

Yes

#

And no if (args[0] === "on") in the macro.

lost estuary
#

how would i set an activation condition to trigger if the target alignment contains "Evil".

Have no idea how to look up those attributes. I see the RaceOrType in provided examples.

#

Is it as simple as "Alignment"

lost estuary
#

DAYUM!

#

This?details
:
alignment
:
"Chaotic Evil"

vast bane
#

if its target, preface it with target

violet meadow
#

target.details.alignment.toLocaleLowerCase().includes("evil")

lost estuary
#

Excellent. The contains was eluding me as well

#

and it works beautifully

hot flower
#

that got it working for me, @violet meadow , thank you, sir!

covert mason
violet meadow
violet meadow
#

I remember having made this one, but I cannot find it now.

coarse mesa
#

😳 Tim has rewritten DSN support for midi from the ground up for the next midi release. Sounds like a monumental effort, but the dice should work properly with optional bonuses now πŸ™Œ

#

(I wonder if it will also fix @scarlet gale’s Toll the Dead)

digital lagoon
#

Questions for my midi wizards. I’m currently using the midi sample items spiritual weapon in my game and it is working superbly for the first character who took the spell. But I now have a second character with a much different aesthetic who also wants a spiritual weapon. How do I ensure that one player can call his spiritual weapon (a scythe made of blood) and this new player will call his spiritual weapon (a spectral maul)?

scarlet gale
coarse mesa
violet meadow
#

What MidiSRD does, is having a default actor and mutating it to match what’s needed.
But, yeah creating a couple of unique actors for each player isn’t that bad

digital lagoon
coral axle
#

hey, finding an issue where midi isn't applying damage resistance properly if it is set to Non-Silvered Physical while using an Active Effect, don't know if that is a known issue or something that I'm doing wrong, would appreciate any help!

vast bane
#

(DDBI has create bonfire)

#

I should preface that the bar for automations for midiqol are very low in my wiki so it may not be what you want, but it technically is specifically tailored for midiqol

#

I haven't done the last 2 modules yet, and DDBI is only done A-F(DDBI is a slow one to confirm)

digital lagoon
vast bane
#

MaxPat contributed a ton to it as well, eventually its going to be on bugbears page but its not done yet so I just preshared its wip location

#

Obviously the real heroes are the module authors though

hard sedge
#

Any suggestions for setting an activation condition on an item to look for a target that is medium or smaller size (dnd 5e), and then request a saving throw/apply Prone if they fail? I can get the condition to activate if I only select one size type (i.e., target.traits.size === medium) **edit, not the effect condition (prone), just request the saving throw.

hard sedge
vast bane
#

Wow the wiki tables are gonna have the side benefit of showing DDBI users what stuff to throw in their override I think

#

If the override does what I think it does

hasty jackal
#

if i want an item to use "other formula" on a different range what activation condition should i use?

coarse mesa
#

I can’t answer that but it’s a cool idea

vast bane
#

midi and bab have functions I think you can pass in the activation conditions I think

#

I feel like he used to have an example for that in the activation conditions before he moved them to the wiki hmmm

#

I lost the original link though

hasty jackal
#

okay also can you make an automatic effect for war caster?advantage on concentration checks

vast bane
#

I'm not on my main pc so I can't look it up but midi has a flag for advantage on conc

hasty jackal
#

found it

violet meadow
#

flags.midi-qol.advantage.concentration | CUSTOM | 1

vast bane
#

also a really good way to sneakily find a ton of activation conditions is to search bugbears history for posts with the word in it

violet meadow
#

what about the distance?

vast bane
#

(Or ask him directly lol)

hasty jackal
#

doubt you can make it, its something like "When you use this weapon at a distance deals 2d6 thunder damage"

violet meadow
#

more than 5 ft away you mean?

hasty jackal
#

yeah

vast bane
#

thought for sure I'd seen you write one before but I think its not in dnd5e's channel. I know I had a macro made via bab that checks distance.

violet meadow
#

MidiQOL.getDistance(workflow.token,workflow.targets.first()) > 5

#

Nah that should do it

hasty jackal
#

that on activation condition?

violet meadow
#

yes

vast bane
#

make sure your roll other option is on in midi settings in the damage settings

#

I think you also need to check the box also roll other at the bottom too?

coarse mesa
#

@hot walrus there is a setting in midi so unseen attackers get advantage but I’m not in front of it now to check sorry

vast bane
#

shutting that off would ruin a bunch of other things, probably best to just install CPR and use its darkness spell

coarse mesa
#

I’m saying it should be on

#

But yeah that’s the easy option, although I’ve not tried it. Mark is very close though

vast bane
#

there are 3 or 4 midi flags that don't show up in actor effects tab that can only be detected if you have attribution turned on in midi

#

the yellow warning on every attack in the console is also the same as attribution I think just less user friendly

hot walrus
#

@coarse mesa @vast bane thanks

lost estuary
#

regarding the activation conditions, can you do multiple?

#

Say, Fiend, Abberations and undead?

#

["undead","Abberation","Fiend"].includes(raceOrType) Perhaps?

vast bane
#

good point that the activation condition page has no && example

#

one of the midi samples will have an exxample of undead/fiend

lost estuary
#

I promise, i did look to see if it was there.

#

ah

#

ill check for it

vast bane
#

mace of disruption

lost estuary
#

danke

#

i was actually pretty close!

charred bay
#

so, i have this set, but it is re-running when i delete the spell effect from the character

#

it was not doing this in v9

#

figured it out

marble schooner
#

Hello.. in the effect Attribute.key I have to add the attribute DAMAGE ONLY when a critical hit is performed. Have you got any hint to create that effect?

short aurora
vast bane
#

if you are trying to do brutal critical there is a special trait for it

hoary wagon
#

Hello, it seems like using AOE targeting sets the targets for all players, not just the one that created the effect. Is there a way to fix this?

vast bane
#

the only way you can set targets of others is to run macros as others

#

or use a module that does that

#

midi doesn't do that

hoary wagon
#

Using this setting, when one player puts a template on the battlefield, every player is targeting the creatures in the area, not just the owner of the effect

vast bane
#

is the template being placed in an abnormally way like via another module or via macros?

hoary wagon
#

I would need to test

hoary wagon
vast bane
#

power card?

#

are you in the right channel?

hoary wagon
#

Yes, the message of the power on the chat

static sparrow
#

Sounds like 4e πŸ€”

hoary wagon
#

I call that a power card... because it is what it is

vast bane
#

ok, first off there should never be a place measured template in chat with midi unless you have really abnormal settings

#

lets just rule out other modules, install find the culprit, enable just dae/midi/socketlib/libwrapper, run the test

hoary wagon
#

OK, I was wrong, it shows up when you cast the spell

#

Using this place measured template causes the issue

vast bane
#

show me what you believe tells you that all the players have targetted via the template, show me the map where the template is placed

#

preferrably the dm's viewpoint

#

I strongly feel that your issue is probably just shared cache

#

when you login as more than one account they should not use the same browser unless the second instance is in incognito mode

#

if you do see measured template buttons in chat that can often mean that you have one of these installed alongside midi:

hoary wagon
#

Well, it's working as it should right now, so I won't be able to provide more information. If that happens again in the future I'll return here.

proper siren
#

Hey yall, question on a midi overtime issue I'm having. I'm trying to implement a saving throw if a creature doesn't have a condition immunity for poisoned. the applyCondition arg doesn't seem to be working with the below though, any thoughts?

label=Asphyxiant Marble (Start of Turn),turn=start,applyCondition=!@traits.ci.value.has("poisoned"),saveDC=13,saveAbility=con,savingThrow=true,saveMagic=true,killAnim=true

vast bane
#

you also may want to just try to yoink the actual activation condition for effects out of the wiki instead

proper siren
vast bane
#

what is the overtime doing? Whats the description of the item?

#

from what I see here, you want it to only induce a save when you don't have the poisoned condition?

proper siren
#

Yep thats correct

static sparrow
#

They want the whole thing to only apply if the target doesn’t have poison immunity.

vast bane
#

what does it do in addition to the overtime? apply poisoned?

static sparrow
#

Yeah my first thought was β€œif it’s the poisoned condition, immunity should block it automatically,” but I imagine there’s maybe more to it.

vast bane
#

I think you can use removeCondition= to evaluate if it has CI poisoned

#

if your goal here is to stop the overtime for poisoned immune folks

proper siren
#

it just applies the marble effect, it's not poisoned technically it's like a custom condition

#

but it shouldn't apply if they have poison ci

vast bane
#

try removeCondition=, I think its either 1, 0, or an evaluation that equals true

proper siren
#

alright I'll give that a shot, I figured I'd run into the same issue with it not able to deal with the array

vast bane
#

I think you want the activation condition for effects in the wiki not that

#

oh wait no

#

hmmm

static sparrow
#

Maybe try .includes instead of .has?

vast bane
#

let me see if I can find this on my phone lol

proper siren
#

lol thanks, yeah I did try includes as well

#

both came back undefined I believe

vast bane
#

just do a search here for thatlonelybugbear and .includes

#

go through all the shared activation conditions that bugbear gave

proper siren
#

okay cool will do

static sparrow
#

Try @traits.ci.value.has("poisoned") == false instead of using !, maybe πŸ€”

#

I feel like it shouldn't matter but who knows.

proper siren
#

I should clarify too, I know the system.traits.ci.value.has("poisoned") call works, if you do it in a normal macro on an actor it returns true or false correctly, it's just not working in the overtime command

static sparrow
#

Yeah, I ran it in the console and it returned the correct value, which is why I thought maybe the not operator is just weird in the effect box there. But I really have no idea.

proper siren
#

thanks yeah I gave it a shot with == false as well, still no go.. Everytime I have some new item I'm like well automating will surely be easy this time lol

static sparrow
#

Are function calls like .has supported? Maybe it only supports comparison operators :/

proper siren
#

yeah that was my thought, seems odd since there are quite a few pieces that would require going through an array but that's my best guess

#

I could do this in an effect macro I guess right? something like this..

if (args[0] === "on" && midiQOL.combat.onTurnStart) {
  const sourceItem = await origin;
  const theActor = await actor;
  const ci = theActor.traits.ci.value.has("poisoned");

if(!ci)
{
  const itemData = mergeObject(
    duplicate(sourceItem.data),
    {
      type: "weapon",
      effects: [],
      flags: {
        "midi-qol": {
          noProvokeReaction: true, // no reactions triggered
          onUseMacroName: null, //
        },
      },
      data: {
        equipped: true,
        actionType: "save",
        save: { dc: 13, ability: "con", scaling: "flat" },
        "target.type": "self",
        components: { concentration: false, material: false, ritual: false, somatic: false, value: "", vocal: false },
        duration: { units: "inst", value: undefined },
        weaponType: "improv",
      },
    },
    { overwrite: true, inlace: true, insertKeys: true, insertValues: true }
  );
  itemData.system.target.type = "self";
  setProperty(itemData.flags, "autoanimations.killAnim", true);
  const item = new CONFIG.Item.documentClass(itemData, { parent: theActor });
  const options = { showFullCard: false, createWorkflow: true, versatile: false, configureDialog: false };
  await MidiQOL.completeItemRoll(item, options);
}}```
vast bane
#

could just have it remove it in a dae/item macro

#

I think thats what you are trying to do with this macro?

proper siren
#

yeah that is true, just do the normal overtime and then have an on combat start check if they have ci and remove it

#

that's probably the cleanest way at this point

#

Order of operations will the effect macro run after the midi overtime saving throw?

#

If em is set to on combat turn starting

vast bane
#

you are already there might as well just use it as a dae item macro and change the origin/actor references to the args versions

static sparrow
#

Couldn't you do it in OnEffectCreation?

vast bane
#

is the overtime start or end of turn?

proper siren
#

start of turn

vast bane
#

Just do it all in the effect macro would be the Zhell advice I feel lol

proper siren
#

lol, I did forget about the itemmacro path for a second there, alright I'm gunna give it a shot with em and an item macro, I should be able to get one of them to work, thanks for the ideas yall!

steady estuary
#

Hi, i'm looking for a way to make a spell/skill with a AoE effect only prompt a specific kind of enemy, like undead, for it's saving throw, damage, etc. Is it possible?

#

Like some kind of Channel Divinity which only targets the undead in a 30 ft radius.

vast bane
steady estuary
vast bane
vast bane
#

Sources of premade stuff for Midiqol:

Modules:
Midi Sample Items Compendium(comes with the module)

Midi SRD's compendiums
https://foundryvtt.com/packages/midi-srd

Chris' Module form of his macros:(CPR)
https://foundryvtt.com/packages/chris-premades

Dfred's Convenient Effects:
https://foundryvtt.com/packages/dfreds-convenient-effects

MrPrimate's D&D Beyond Importer:
https://foundryvtt.com/packages/ddb-importer

w15ps's Module
https://foundryvtt.com/packages/w15ps-srd

Macros:
Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros

Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros

Wiki:
Activation condition and other useful info:
https://github.com/thatlonelybugbear/FoundryMacros/wiki

steady estuary
#

Wow, ok, thanks. thxblob

vast bane
#

added a new one in there just now

steady estuary
#

That makes things a lot easier.

vast bane
#

CPR's stuff is kinda hard to find the nuts and bolts of so if your intention is to pick apart turn undead, you may want to see if midi srd has it instead as its easier to find the parts of

#

there may also be a midiqol sample item as well

proper siren
#

kinda followup question here, if I have a ce status effect added along with midi overtime, shouldn't the status effect only apply if the overtime saving throw is failed? Am I missing something here?

static sparrow
short aurora
#

What is killAnim for here?

static sparrow
#

applyCondition stuff aside, I guess.

short aurora
#

Beyond our shared fury for Anim, of course

static sparrow
steady estuary
proper siren
#

lol yeah it's just always included, literally no idea

vast bane
#

sorry for the reply meant to just answer it openly

#

killanim isn't really needed anymore

proper siren
vast bane
#

Spirit guardians was the only one that needed it I believe back then too due to how he implemented it

static sparrow
#

Real blast from the past then.

vast bane
#

It will kill an animation thats setup as an active effect in Automated animations still fwiw

#

but you could also just not set an aa for that named active effect now

jovial crater
#

Any ideia on why this is happening? This actor is always taking 22 damage from this specific attack

scarlet gale
#

Any negative DR or vulnerability?

jovial crater
#

No

#

Ah

#

hp increase from draconic resilience and hp increse from tough on a lvl 11 character, they give extra 22hp

#

Just added the "+" before the formula on each effect and it worked haha

vast bane
jovial crater
#

Oh. How should I be doing them?

vast bane
jovial crater
#

I did not know about that hahaha. Thanks!

proper siren
#

with MidiQOL.completeItemRoll, what would I call to check if the saving throw succeeded or failed?

short aurora
proper siren
vast bane
#

completeItemuse

proper siren
#
const ceid = "Actor." + theActor.id;
const saveDC = 13; // Replace this with the desired DC
const saveAbility = "con"; // Replace this with the desired ability
const ci = theActor.system.traits.ci.value.has("poisoned");

if(!ci)
{
const itemData = {
  name: "Saving Throw",
  type: "weapon",
  data: {
    actionType: "save",
    save: { dc: saveDC, ability: saveAbility, scaling: "flat" },
    "target.type": "self",
    components: { concentration: false, material: false, ritual: false, somatic: false, value: "", vocal: false },
    duration: { units: "inst", value: undefined },
    weaponType: "improv",
  },
  flags: {
    "midi-qol": {
      noProvokeReaction: true, // no reactions triggered
      onUseMacroName: null, //
    },
    "autoanimations.killAnim": true,
  },
};

const item = new CONFIG.Item.documentClass(itemData, { parent: theActor });
console.log(item);
const options = { showFullCard: false, createWorkflow: true, versatile: false, configureDialog: false };
console.log(options);
const result = await MidiQOL.completeItemUse(item, options);

if (result.result === "fail") {
  game.dfreds.effectInterface.addEffect({ effectName: 'Asphyxiated', ceid });
}
}```
#

That's what I used (after), I'm not getting any saving throw roll though

vast bane
#

might have a problem with dfreds applying ce's does dfreds allow unowned?

proper siren
#

I did it without the ce first actually, same result

#

was just including it in there for completeness

vast bane
#

does the item have a save setup on it?

short aurora
#

Do we actually use Midi for anything in this setup or do you just want a saving throw from actor(s) and if below saveDC, do something?

proper siren
#

It doesn't, the generating effect is a ce labeled Asphyxiant Fog, it's an aura effect with this macro setup as a on combat turn starting effect macro

#

just want a saving throw

vast bane
#

actionType wrong maybe?

short aurora
#

actor.rollAbilitySave("con") and then get the results from that

proper siren
vast bane
#

you could totally change MidiQOL.completeItemUse to "origin.use" and sneak it by Zhell

proper siren
short aurora
#

Save the results to a variable, check the .total and do the last "fail" if you got there as a comparison with that and your save DC instead, something like
edit: added the fastForward in options for the save, remove the , {...} if you don't want that

const saveDC = 13;
const saveThrow = await actor.rollAbilitySave("con", {fastForward: true});

if (saveDC > saveThrow.total){
// die
};```
proper siren
#

Awesome thanks, the following seems to work. Only thing I'd like to be able to do is use lmrtfy instead of the base but I guess I can do that down the line:

const ceid = "Actor." + theActor.id;
const saveDC = 13; // Replace this with the desired DC
const saveAbility = "con"; // Replace this with the desired ability
const ci = theActor.system.traits.ci.value.has("poisoned");

if(!ci) {
  const saveRoll = await theActor.rollAbilitySave(saveAbility, { fastForward: false, chatMessage: true, dc: saveDC });
  if (saveRoll.total < saveDC) {
    game.dfreds.effectInterface.addEffect({ effectName: 'Asphyxiated', ceid });
  }
}```
short aurora
#

I think LMRTFY specifically has a way for you to setup a request and then press a button to save it as a macro? Maybe you can dissect it from a similar setup "handcrafted" in there? Or the screenshot is outdated

vast bane
#

Does anyone know if theres a way to kill a banked pending MTB request thats issued by midiqol? I always handle this by rolling with a high situational bonus

#

I have an idea to allow for killing it, if midi can pickup a non integer bonus like "KillSave"

#

Nobody seems to have greater or lesser restorations automated.

Lesser Restoration
Item On Use macro, After Active Effects:
(Requires your conditions to be named like mine)

if(game.user.targets.size !== 1 ){
    ui.notifications.warn("You must have one token targeted.");
    return;
}

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

let [targetedToken] = game.user.targets.values();

let availableValidEffects = targetedToken.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);
proper siren
#

Finally got this macro working with one exception, the CE asphyxiated condition is not applying to enemy tokens. It applies it to the actor, but not the token. Player characters it applies correctly. Anyone know why that would be?

short aurora
proper siren
#

ah is that a value in the actor class?

short aurora
#

Value in every document, not at computer but scrap the joining of actor and its actor Id for that instead

#

Might just straight up be actor.uuid

proper siren
#

hm alrighty I'll give that a shot

proper siren
gaunt python
celest bluff
#

Should be on both gitlab and patreon. The patreon one is more up to date.

vast bane
#

My coveted Command automation I just realized could totally be used for Tasha's Mind Whip too lol.

vast bane
gaunt python
#

OOC: is the DDBI content accessible "free-of-charge" or does it come with the patreon?

edit: realising, ooc as shorthand for out of curiosity is not a good abbreviation in a discord full of roleplayers πŸ˜†

vast bane
#

Theres tons of stuff that are free but the books and what not are sussed out by what your campaign has available to you.

#

from what I saw of DDBI, its worth using purely to get all the suspended effects and wonky dnd5e srd compendium glitches out of midi's way

proper robin
#

^ also importing the monsters is helpful too cause the srd ones are pretty limited

vast bane
#

Monsters requires either the patreon or for you to be self hosting and setup his proxy server

proper robin
#

Yea thats true

#

Patreons like 4$ though, so just one and done it

vast bane
#

I do plan on going down that list again at a later date and XXXXX the ones that just aren't feasable to automate

#

The bar is very low for qualifying as having a premade for an item in my wiki page lol

gaunt python
#

sorry, maybe misphrased it. DDB, I know, has fees/costs applied. I was mainly curious if your wiki only references sources that come "free-of-charge" like the midi srd. Otherwise, I would gladly contribute, by scouring what Crymic has in his patreon, but what would not be accessible for free, and not everyone feels like "paying for macros" (which is totally fine).

vast bane
#

two of ddbi's are purely getting a check cause the tables were rollable from the item

vast bane
gaunt python
#

gotcha! πŸ‘

soft bane
#

How can I set up a magic item, so when activated, the user needs to make a DCX attribute check to get an effect, like +1 to damage/attack rolls?

#

I have for DAE & MidiQOL

vast bane
#

its a check to get a beneficial thing?

soft bane
#

For my campaign I gave out mainly weaker magic items but with multiple effects.

vast bane
soft bane
#

Alrighty

#

what about something like, whenever they do damage with the item, it gains a charge, and then whenever they deal damage and have at least 1 charge, can decide to spend all the charges to do one time extra damage? I suppose this is kinda like Absorb Elements

gaunt python
# soft bane Alrighty

The effect, does the weapon provide it or does it come from a different item feature?

soft bane
#

the weapon

vast bane
soft bane
#

While I'm searching, are there any incompatibilities with the "Magic Item" module with DAE/Midi?

vast bane
#

I've seen a few but Tim seems to be trying to hunt them down and patch them

#

reaction items sometimes fail to prompt, issues with templates, and generally the faux items have issues with a bunch of modules

gaunt python
#

iirc, magic item module is yet not 100% compatible with v10. not sure, though. last update was 7M ago.

vast bane
#

I think dnd5e 2.1 might be the biggest questionmark with it as the data validation thing got added then

soft bane
#

Hrm, but maybe it might be fine for just custom items?

vast bane
#

Do you know about Items with Spells module?

#

its basically the same thing only not broken, upcasting via charges is wonky

soft bane
#

Items with Spells module? I'll look!

soft bane
#

I'm looking at the Magic Weapon macro but its kiiiinda complicated, its doing a thing where it gives the user a prompt to select a weapon? I'd ideally like to skip this as this only applies due to the weapon providing the bonus

gaunt python
soft bane
#

The weapon is the magic item granting the bonus.

#

If it is in theory easier to split off the item I can consider that, but ideally the workflow is something like, "Player clicks the use item icon in their sheet/hotbar, then selects apply active effect(?), succeeds at a DC 13 CHA check, if successful, then the weapon gets +1 for the duration (10 minutes concentration)

#

although for now I'm fine with just +1 from activating the item and roll separately

#

I think I managed to strip down the macro to something like:

if (args[0] === "on") {
  const itemId = /* ??? */;
  const weaponItem = targetActor.items.get(itemId);
  let copyItem = duplicate(weaponItem);
  const spellLevel = Math.floor(args[1] / 2);
  const bonus = 1;
  const wpDamage = copyItem.system.damage.parts[0][0];
  const verDamage = copyItem.system.damage.versatile;
  DAE.setFlag(targetActor, "magicWeaponBonus", {
    damage: weaponItem.system.attackBonus,
    weapon: itemId,
    weaponDmg: wpDamage,
    verDmg: verDamage,
    mgc: copyItem.system.properties.mgc,
  });
  if (copyItem.system.attackBonus === "") copyItem.system.attackBonus = "0";
  copyItem.system.attackBonus = `${parseInt(copyItem.system.attackBonus) + bonus}`;
  copyItem.system.damage.parts[0][0] = wpDamage + " + " + bonus;
  copyItem.system.properties.mgc = true;
  if (verDamage !== "" && verDamage !== null) copyItem.system.damage.versatile = verDamage + " + " + bonus;
  targetActor.updateEmbeddedDocuments("Item", [copyItem]);
}

// Revert weapon and unset flag.
if (args[0] === "off") {
  const { damage, weapon, weaponDmg, verDmg, mgc } = DAE.getFlag(targetActor, "magicWeaponBonus");
  const weaponItem = targetActor.items.get(weapon);
  let copyItem = duplicate(weaponItem);
  copyItem.system.attackBonus = damage;
  copyItem.system.damage.parts[0][0] = weaponDmg;
  copyItem.system.properties.mgc = mgc;
  if (verDmg !== "" && verDmg !== null) copyItem.system.damage.versatile = verDmg;
  targetActor.updateEmbeddedDocuments("Item", [copyItem]);
  DAE.unsetFlag(targetActor, "magicWeaponBonus");
}
#

But I have no idea how to get itemID

vast bane
#

that should be filled in in ddbi's macro

#

where did you get that

#

is the item always going to be a specific same item or does the user get to pick from their inventory items?

soft bane
#

It's a sword

gaunt python
#

Not sure right now, is this button a core feature? πŸ˜…

soft bane
#

I copied from Magic Item that's in the D&D Beyond importer folder

#

If there's a MidiQOL compedium folder other than the Sample folder with Magic Weapon I don't see it.

scarlet gale
soft bane
#

But in anycase, it's a singular weapon, that when activated is supposed to give +1

gaunt python
#

If it is, then you can open the item and press the button to get the item id, which you can then paste in the macro

soft bane
#

I mean maybe, but, wouldn't it be better if the macro can just get the current item?

#

this way I could copy and paste and reuse that code for other similar effects without hardcoding the ID

#

I have the Item Macro module enabled, and it should be possible to just use "item"

#

as this gif demos

gaunt python
#

well, that depends. Are you using the "equipped" flag?

vast bane
#

yer not gonna wanna have that be on the weapon

#

have it be a feature that is rolled

#

and enhances the weapon

soft bane
#

I'll try that

#

I have "Feature Attack" Action Type set to "Ability Check" but I assume it isn't a Saving Throw that I want?

vast bane
#

you could also just manually handle this by putting the roll in the description and apply the ae when they succeed

#

cause this is gonna be involved to say the least

soft bane
#

Seems like

gaunt python
#

regarding the id, shouldn't const itemId = args[0].item._id be sufficient to get the id of the weapon item that rolled the attack. Given it is used as a ItemMacro

vast bane
#

weapons when rolled make attacks, so he needs to do a uuid

#

or define item as a getName

#

the feature will be doing the rolling and the args item would be the feature's id

soft bane
#

I made a Feature that when activated creates an effect, but why does the effect appear twice? One for the "Feature" and then one for the "Effect" provided by the feature?

vast bane
soft bane
#

Nope I made the item in the Item menu

#

I had made it here and then dragged it into the Player sheet

vast bane
#

those ae's are on an item by that name /shrug

#

your the one with the sheet you tell us 8)

soft bane
#

The feature appears along with the ae that's provided by the feature

#

you can tell by the different icons

#

bag vs glowy figure

vast bane
#

All I can tell you is you have two temp ae's applied from an item with the same name

soft bane
#

Ones called "Awakened"

#

the second word is the same, the first is not

vast bane
#

Source

#

they are both from the same item, or you have two items named that

soft bane
#

Hrm one sec

#

I notice the Feature in the Item menu doesnt have a passive effect so you're probably right

vast bane
#

is that forgotten odachi item type: Loot?

soft bane
#

"Loot" is just a folder

#

it's not in the folder

#

There we go that fixed it

#

You were right, I must've edited the Feature as an owned item.

vast bane
soft bane
#

Do I need the Inline Roll Commands module if I want to have the player be able to click text in the description to roll a Charisma check?

#

Or does Midi or something else provide that?

vast bane
#

that would make things easy if you used that module

#

what you need is for the feature to prompt an ability check and set the DC

soft bane
#

cries in module bloat

vast bane
#

have you not tried the ability check with a DC set and then check the box for activiation condition true for effect

#

at the bottom of the item

soft bane
#

1 sec, I havent seen it, me very new to using the full powers of midi

vast bane
#

there is a box towards the bottom that is something likeactivation condition true for effect activation or something

#

is it a straight ability check or a skill check?

#

cause thats the sucky part of ability checks on the item

soft bane
#

Yes if I add a "On Use Macro"

#

Charisma Ability Check

vast bane
#

you don't want to add an on use, magic weapon is a dae item macro not midi on use

soft bane
#

or maybe I'm blind and it was there before

#

Activation Condition true checkbox is there

vast bane
#

show me the whole details tab lol

soft bane
vast bane
#

set a dc

soft bane
#

I checked it true, now I just need to figure out how to die it to a check

#

For Saving Throw?

vast bane
#

its not really a saving throw I don't think

#

when you have it set to ability check I think it doesn't roll as a saving throw

#

if that doesn't work we just have to make an activation condition is all

#

probably `workflow.itemRoll > X

soft bane
#

Hey I think it worked

#

It does say "Save" when you hover over the ability but when you activate it it only applies the effect on a success

#

however I notice it "concentrates" regardless of success or failure though

vast bane
#

is it suppose to concentrate?

soft bane
#

yes

#

the idea is its like when samurai jack meditates and is able to more easily strike down evil creatures with his sword

#

in that one episode

#

so for 10 minutes the sword gets +1

vast bane
#

check conc at bottom?

soft bane
#

I checked it, but the concentration status for the feature still appears

#

and the pop up saying "the character began concentration on..."

#

are the two concentration check boxes in conflict?

#

I think so

vast bane
#

show me what it looks like in chat

#

do you have Combat utility belt or concentration notifier?

soft bane
#

Concentration notifier

vast bane
#

That'll do it

#

kinda proud of myself for sensing that one is there

soft bane
#

hehe

vast bane
#

use midi conc, not third party concs if you want conc to be automated

soft bane
#

Is that a module setting for midi?

vast bane
#

Can you clarify your question? What do you mean by That

soft bane
#

If I turn off concentration notifier module

#

how do I turn on midi to take over?

vast bane
#

I think it has its own tab in workflow button doesn't it? if not its at the bottom of one of them

soft bane
#

one sec

vast bane
soft bane
#

I think I actually have none of those others πŸ™‚

#

Okay well thats unfortunate, seems like turning off the concentration module, and turning on concentration automation has broken the "Activation Condition true required" setting

vast bane
#

show me the items details

soft bane
#

despite failing the check the +1 effect & concentration are applied now when before the +1 effect wouldn't apply with a failure

vast bane
#

lol

#

midiqol uses the activation condition field as an equation for like javascript or regex