#MidiQOL

1 messages · Page 106 of 1

hasty jackal
#

let damageTotal = 0;
args[0].damageList.forEach((damagedToken) => {
damageTotal += damagedToken.appliedDamage;
});
if (damageTotal > 0) {
damageTotal = Math.floor(damageTotal/2);
await args[0].actor.applyTempHP(damageTotal);
};

vast bane
#

in the sidebar right click on it and export data and then DM it to me don't post it here

hasty jackal
#

oh okay

#

sorry

vast bane
#

do you mean introduced in 39, and fixed in 40?

gilded yacht
vast bane
#

only cause theres a chance this affects Araxiel in his current troubleshoot, do you think 40 is coming soon?

gilded yacht
#

If the macro above is all that is done, then I don't think it's relevant. Let me try and see

vast bane
#

I just tested his macro and it works in midi 37, he's getting the error above on I'm guessing 39, cause he said newest

#

but didn't confirm his actual version

gilded yacht
#

38/39 the same

vast bane
#

how is that item suppose to have a damage list?

#

Hint: It has nothing setup on it

#

your macro works 100% fine with an item that deals damage

#

oooh shit its an actor on use

hasty jackal
#

it needs to be a passive effect

vast bane
#

I have got some WEIRD stuff going on lol

#

is there a new midi multi attack setting or something?

#

what is the actual code for after active effects?

#

ok I dunno why it throws a warning for me, however the main problem with your macro is it violates the temp hp rule

#

you need to use midiqol functions if you want proper automation

hasty jackal
#

welp

vast bane
#

applyTempHP is not going to follow temp hp rules

#

Its also not going to use a midi workflow button

#

they just silently appear on the token and overwrite whatever amount was there before

#

midi's function would not apply if a higher value exists

vast bane
# hasty jackal welp

Heres that key without the warning happening so something about your setup is wrong:

short aurora
#

What rules does apply temp hp function not follow?

#

It checks for a greater value

vast bane
#

it replaces the old temp hp that was higher with the new

#

his macro isn't checking

#

I just watched it replace a 12 with 5

#

midi's function does check

hasty jackal
#

i dont remember who made that macro for me

vast bane
#

pretty sure they are using a core function

#

OH

#

you have ADD instead of custom

hasty jackal
#

same issue

vast bane
#

This works perfectly, but again, the temp hp replaces with a lower value, which is not raw, need to replace the core function with a midi one to get it to auto or calculate the math in the macro to account for an existing temp hp being higher.

#

prolly easier to just look up a midiQOL.applyTokenDamage example and replace your core one

celest bluff
vast bane
#

but the core function doesn't have an undo I don't think

hasty jackal
#

i just want a macro that doesnt bug my player´s character lol.....

vast bane
#

if you still have a problem then its midi 39 thats the problem, downgrade to 37, assuming you are attacking with a standard item

#

I just used a club from the acolyte

#

if you don't care about temp hp rules then keep the macro as is, otherwise try to addapt a midi version

#

I have no clue why damage is twice in that function or if both are the same call but /shrug someone will pick that up and run iwth it for you

gilded yacht
#

I just played with this and I think the problem is that for items without damage args[0].damageList is udefined.
Try

args[0].damageList?.forEach((damagedToken) => {
vast bane
#

Yeah I suspect when they dragged and dropped the item they rolled it by accident too, or rolled it when picking it up

#

since the item itself has no damage

hasty jackal
#

maybe if i swap it to armor and delete that line?

gilded yacht
#

Since it's an actor onuse macro it will get called for every item roll - so the check will be needed

vast bane
#

the item itself is oddly an item, not a feature so it has no damage parts setup on it, it probably should be a feature if we're being technical about it.

hasty jackal
#

i can make it a feature

vast bane
#

Your original error is probably just cause you or the player double clicked when trying to pickup and drag, alot of folks make that user error, and it wound up rolling the damageless item while they had that on use on them

gilded yacht
#

Does not really matter. The item that is passed to the macro is the item they just rolled (not the item where the macro is stored).

vast bane
#

it'll show up in their huds as a weapon which is why I'd lean towards making it a feature so its less available for a player to confuse over

hasty jackal
#

its an error that pop ups on the console when they try to use AA to teleport

#

thats the weird part

vast bane
#

whats your teleport item?

#

is it thunderstep?

#

well regardless, what tim actually told you will fix that error

gilded yacht
#

If an item is rolled (which can include a teleport spell) and you have the macro as an actor onusemacro, it will be called when the teleport item is used.

vast bane
#

yeah the question mark in his edit null proofs the on use

hasty jackal
#

so if i delete the line it will work?im testing it on a weapon and since the weapon deals damage

#

the error doesnt pop up

vast bane
#

no just replace it with his code

#

that specific line, I think its just adding a questionmark to a bit

#

99% of teleportation spells roll to chat but don't actually do anything in midi but the actor on use is gonna fire and throw a null error, if you replace the line that is similar to tposney's suggestion with his suggestion it should cancel out the error as its a null proofing fix

hasty jackal
#

yeah it worked

#

thanks

vast bane
#
let damageTotal = 0;
args[0].damageList?.forEach((damagedToken) => {
    damageTotal += damagedToken.appliedDamage;
});
if (damageTotal > 0) {
    damageTotal = Math.floor(damageTotal/2);
    await args[0].actor.applyTempHP(damageTotal);
};
hasty jackal
#

the ? fixed it

vast bane
#

if you want the temp hp to behave right thats gonna take some finesse as I suck at this

#

past the above code in and you shouldn't have issues when items that have no damage parts roll

#

Any guru feel like checking me?

await MidiQOL.applyTokenDamage([{damage: (damageTotal), type: 'temphp' }], damage, new Set(this.actor), null, null);
#
let damageTotal = 0;
args[0].damageList?.forEach((damagedToken) => {
    damageTotal += damagedToken.appliedDamage;
});
if (damageTotal > 0) {
    damageTotal = Math.floor(damageTotal / 2);
    await MidiQOL.applyTokenDamage([{damage: damageTotal, type: 'temphp' }], damageTotal, null, null, new Set(this.actor));
}
#

yeah I give up I dunno how to write it

#

your original function will work sorta, it will quietly overwrite the temp hp field ignoring temp hp rules

#

the goal is to get a midi function to do it instead so that you can see what it changed and I'm pretty sure midi will respect the rule and not update unless its more

hasty jackal
#

yeah at least is working for teleporting using AA

sudden crane
vast bane
#

I found better examples to work with so gonna try those

#

I think the problem is that this.actor is not the right thing

#

its an item that hits others and then self heals. this.actor is probably the targets right?

celest bluff
# vast bane

await MidiQOL.applyTokenDamage([{ damage: damageRoll.total, type: damageType }], damageRoll.total, new Set([target]), fullItem, new Set());

hasty jackal
#

remember that is a "passive item"

#

not a weapon

#

i think it would be better to became a feature?for easier implementation

cinder tapir
#

I believe that when there is a template spell, after the template is removed after the attack is used (right when they end there turn), which works like normal, it is ALSO removing concentration if they are concentrating on another spell, any way to fix?

#

The fix was changing it to only effects

short aurora
cinder tapir
#

It was fixed

#

Midi QOL concentration was checking for even templates from ALL spells

#

So now it will only check effects and clear concentration off that.

#

I have no templated concentration spells so I don't mind

short aurora
#

It should work even with that on, I have no issue juggling template spells (without concentration) and a concentration spell with it on

cinder tapir
#

I probably descripted it poorly

#

Though it works now so

#

My game is also like very different so that could be the problem as well!

#

Sadly I won't be able to describe the problem to you over chat, but regardless it works now so

vast bane
#

Truth probably just had two concentration items running and one ended when the other was cast

#

its a mechanic of 5e, you can only concentrate on one spell at a time

narrow saddle
#

I’m probably doing something incorrectly, I replaced all the aoe part and it still didn’t work. 🫤

vast bane
#

@violet meadow
When we replace the raytrace with find nearby we get this:

#
// 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 = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);

  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.");
}
#

could it be the incapacitated change in midi 37?

#

did he change and it was a breaking change?

#

I gotta find the changelog for midi now

#

when bugbear wrote the change it was before Tposney did something with find nearby and incapacitated

#

Breaking Addition to findNearby to allow inclusion of incapacitated actors, MidiQOL.findNearby(disposition, token, distance, {maxSize, includeIncapacitated}). Only breaking if you were including a maxSize before, you'll need to use {maxSize: size} instead.

#

should the function have a null inside with include?

#

yeah the macro runs with Mr.Primates code but the find nearby throws the startsWith error

#

oh shit its the last arg

scarlet gale
#

generally that specific error means you're trying to do a fromUuid on something that is undefined or isn't a uuid string

vast bane
#

I found the post by bugbear, if you look at the line right before find nearby, its calling target, and target is defined with the naughty last arg

#

This is the code we are trying to replace:

  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);
#

cause it doesn't account for large and above creatures

#

it will calculate from the top left square of creatures larger than medium

#

bugbear was trying to fix it for us by using findnearby instead

#

should target be target.uuid?

#

or should the ID in target be changed to uuid

scarlet gale
#
if (this.targets.size === 0) return;
let areaSpellData = duplicate(this.item);
const damageDice = 1 + this.castData.castLevel;
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: this.actor});
const target = this.targets.first();
const aoeTargets = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);
const uuids = [];
for (i of aoeTargets) {
    uuids.push(i.document.uuid);
}
const options = {
    showFullCard: false,
    createWorkflow: true,
    targetUuids: uuids,
    configureDialog: false,
    versatile: false,
    consumeResource: false,
    consumeSlot: false,
};
await MidiQOL.completeItemUse(areaSpell, {}, options);```
#

This appears to work.

#

Didn't actually test vs larger creatures

vast bane
#

I think the problem is its using the initial spells target

#

target setting

scarlet gale
#

not sure why that would matter

vast bane
scarlet gale
#

you get that from the one I just posted?

vast bane
#

yes

#

I got it on the secondary aoe

#

I'm gonna try clearing the items target count

scarlet gale
#

nah

#

that error is likely from there being no uuids

#

let me check

#

I should be testing vs a large creature?

vast bane
#

it works when I clear the target number out of the original spell

#

I think its some how using the original spells data if its not filled in already?

#

maybe cause you used this?

scarlet gale
#

no?

#

let me make one quick change

#

I bet that's midi enforcing max targets

vast bane
#

fwiw, its working if you set the ice knife to have no target limit

scarlet gale
#

yea, it gets duplicated and uses the original target limit

#

let me fix that

vast bane
#

I only thought of it cause I see that warning when my players try to upcast hold person and spells like that

#

and bane/bless cause the spells have a hard limit set in their targets and the upcast lets them go over so I have to manually edit them

scarlet gale
#
if (this.targets.size === 0) return;
let areaSpellData = duplicate(this.item);
const damageDice = 1 + this.castData.castLevel;
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";
areaSpellData.system.target.value = null;
const areaSpell = new CONFIG.Item.documentClass(areaSpellData, {parent: this.actor});
const target = this.targets.first();
const aoeTargets = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);
const uuids = [];
for (i of aoeTargets) {
    uuids.push(i.uuid);
}
const options = {
    showFullCard: false,
    createWorkflow: true,
    targetUuids: uuids,
    configureDialog: false,
    versatile: false,
    consumeResource: false,
    consumeSlot: false,
};
await MidiQOL.completeItemUse(areaSpell, {}, options);```
#

try this one

vast bane
scarlet gale
#

hold on

#

I accidently had a slight regression in it lol

#
if (this.targets.size === 0) return;
let areaSpellData = duplicate(this.item.toObject());
const damageDice = 1 + this.castData.castLevel;
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";
areaSpellData.system.target.value = null;
const areaSpell = new CONFIG.Item.documentClass(areaSpellData, {parent: this.actor});
const target = this.targets.first();
const aoeTargets = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);
const uuids = [];
for (i of aoeTargets) {
    uuids.push(i.document.uuid);
}
const options = {
    showFullCard: false,
    createWorkflow: true,
    targetUuids: uuids,
    configureDialog: false,
    versatile: false,
    consumeResource: false,
    consumeSlot: false,
};
await MidiQOL.completeItemUse(areaSpell, {}, options);```
#

There

vast bane
#

works perfectly

#

Now I need to remember who the other guy was lol

#

@narrow saddle⬆️

#

Do you wanna share it to Mr.Primate or shall I to replace his old code?

scarlet gale
#

Feel free to

vast bane
#

Just saw an edit 👀

scarlet gale
#

only a minor one

#

did a toObject() in the duplicate part

#

just to be safe

vast bane
#

edit also works perfectly gonna post it to his git now then

scarlet gale
#

I also removed the deprecated completeItemRoll and replaced it with completeItemUse

#

I'm betting this will fail with auto roll damage off

vast bane
#

I always auto roll damage cause I don't fast forward so I can just cancel in the popout

scarlet gale
#

but for people who don't

vast bane
#

personally that might be a wise lil trick for you if you get too many complaints about auto fast forward, just shut off fastforward on the damage

scarlet gale
#
if (this.targets.size === 0) return;
let areaSpellData = duplicate(this.item.toObject());
const damageDice = 1 + this.castData.castLevel;
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";
areaSpellData.system.target.value = null;
const areaSpell = new CONFIG.Item.documentClass(areaSpellData, {parent: this.actor});
const target = this.targets.first();
const aoeTargets = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);
const uuids = [];
for (let i of aoeTargets) {
    uuids.push(i.document.uuid);
}
const options = {
    showFullCard: false,
    createWorkflow: true,
    targetUuids: uuids,
    configureDialog: false,
    versatile: false,
    consumeResource: false,
    consumeSlot: false,
    workflowOptions: {
        'autoRollDamage': 'always'
    }
};
await MidiQOL.completeItemUse(areaSpell, {}, options);```
#

This should prevent the synthetic item from getting the item no longer exists error when auto roll damage is off

vast bane
#

this one works perfectly too

#

I need to keep your other one for myself though

scarlet gale
#

Why's that?

vast bane
#

she has a reminder that sometimes matters

#

I auto roll but I don't auto fast forward

scarlet gale
#

¯_(ツ)_/¯

#

hopefully that doesn't break it

vast bane
#

you technically just need auto roll

scarlet gale
#

I'll adjust that then

vast bane
#

Its just a nuanced thing cause they have a damage modifier they can add to spell damage

#

and I do ar messages when I'm lazy and don't want to automate them lol

vast bane
#

posted the issue for Mr.Primate to update his if he wants

scarlet gale
#

I pulled another ninja edit on you

vast bane
#

I was about to close out to go to my watch party lol whats the change?

scarlet gale
#

the for loop

#

didn't have a let

#

not the biggest deal

vast bane
#

just makin sure it doesn't break it, looks good pushing the change into the issue

narrow saddle
#

Crikey, above and beyond. Thank you.
I’m working now so struggling to follow. But big thanks.

vast bane
#

use the last one posted

violet meadow
wraith spade
#

Hi all, I have some questions regarding the automation of conditions in foundry and midi-qol. What is the preferred way of doing it? I know there are basically 3 approaches:

  1. Convenience Effects
  2. Combat Utility Belt
  3. Both together

As I understand, the easiest one is CE, as it maps condition names to effects provided by CE. The other one needs ?manual? setup because I would need to define the mapping between conditions and effects. Last one would be to use CE first and CUB second for special case handling. Am I right so far?
What are you using ind your game? Are there mapping issues for CE? Do I miss some conditions if I am going to replace the foundry conditions with CE?

I would appreciate it if you all can give me some information about how you are handling this. It is a little bit unclear what the ramifications of these options are for a new DM.
Thank you very much in advance...

vast bane
#

CE has more features and utilization in midiqol but cub can get the job done as well, both is a bad idea

wraith spade
#

But I think I read that CE has for example a different name for invisibility?

violet meadow
#

I use DFreds CE with the Replace conditions setting. No need to look any further if you use MidiQOL imho

peak helm
#

Yiu don't have a midi compatible mob attack macro do you bugbear? 😂 Just incase

#

Just cos I have. A feeling that Zhells macro will be interfered by it by midi

vast bane
#

the MCDM things?

#

didn't Wasp or someone make a midi version of those?

peak helm
#

No, I used to use Mob Attack tool, but its not v10 so throws and error stops the world working

short aurora
#

I don't inherently see anything midi should interfere with in zhells macro, have you tried it?

peak helm
#

Not yet

#

I'm just being preemptive 😂

vast bane
#

it won't roll in midi it will do a core roll

peak helm
#

Noice I'll test after crazy golf

#

My DM told me (on game night) that we need it and I'm like ffs 😂

wraith spade
#

Thank you all for your input, so I can still use CE and don't need to add CUB just for this.

celest coyote
#

Is anyone else having an issue with midi not disabling the ranged disadvantage by an ally (house rule). I have it set as 0, but now all ranged attack have disadvantage no matter what

violet meadow
#

Done

violet meadow
violet meadow
celest coyote
#

Ok ya it was a vision issue. Still getting used to v10 settings

#

Thanks

hot flower
#

what are people using for auto cover calculations? ATV, Level's? Siimbol's?

dark canopy
#

depends on what you want out of them, I believe

#

levels does a percentage cover check and supports its own height system. Simbul's implements cover as presented in the DMG, but has no concept of wall height

hot flower
#

and ATV? I'm primarily trying to get a cover solution that plays nicely with spell sniper and sharpshooter.

dark canopy
#

completely unfamiliar with ATV.

simbul's has that built in:

A special trait has been added to indicate if the actor should ignore certain levels of cover (e.g. Sharpshooter, Spell Sniper, Wand of the Warmage)

#

(actor special traits)

celest coyote
#

Also Im sure this is not the write place to ask, but is there another hashtag for other module questions and im missing it. Im using build a bonus a lot and cant find any info on how to use Arbitrary Comparison very well. Ive seen Zhell in here, but didnt know if he had a place for questions

dark canopy
#

#dnd5e works for non-midi dnd5e specific modules

violet meadow
#

@celest coyote what are you trying to do?

scarlet gale
dark canopy
#

(if you are ok with non-DMG based cover rules)

digital lagoon
#

I’ve tried all three and I find Simbul’s to be the least intrusive and easiest of the three. Levels cover calculator is great but I try to use levels only in cases of absolute need because it leaves a lot of room for mistakes in setup. ATV seemed like it should be lightweight and it may be but for the life of me I couldn’t get it to not be an absolute nightmare during combat. Right now I have simbul’s on and set to prompt to confirm level of cover when detected and it’s been the best compromise of performance and control. YMMV of course, just an input from someone who’s tried them all in the past couple months 😅

dark canopy
#

im very happy to see those points of feedback 🙂 the entire design intent of 5eHelpers (predecessor to Simbul's) was to simply help with common, rules defined operations without assuming much about how the user wants their game to play

scarlet gale
#

I've been pretty happy with midi and levels cover in API mode. My table just uses it as it calls it.

digital lagoon
hot flower
#

Thanks for everyone’s opinions. What I’m unclear on is how much of the spell sniper and sharpshooter is handled in core dnd5e (with the spell sniper check box on the special abilities) and how much needs to be handled with DAEs. And what module will provide the smoothest, least intrusive cover and dex save calcs

dark canopy
#

that option is from simbul's cover calc

#

not core

hot flower
#

I’ve got a wizard with spellsniper and a ranger with sharpshooter.

#

I’ve got the spellsniper check box even with Simbul’s disabled.

#

And it comes up as a core dnd5e flag when I examine an actor with DF flag inspector

violet meadow
#

Added support for spell sniper, flags.dnd5e.spellSniper.

hot flower
#

Yeah does it also handle the ignore cover for sharpshooters and range weapons?

dark canopy
covert mason
#

I'm trying to get this ItemMacro working. It should be dealing an extra 1d8 lightning damage against goblinoids.

if (args[0].hitTargets.length < 1) return {};
actor = await fromUuid(args[0].actorUuid);
let target = await fromUuid(args[0].hitTargetUuids[0]);
if (!actor || !target) return {};
let PC = target.actor.system.details?.race ?? null
let npc = target.actor.system.details.type?.value ?? null
let npcSubType = target.actor.system.details.type?.subtype.toLowerCase() ?? null;
const isSubType = ["goblinoid"].includes(npcSubType); // so you can add other subtypes.
if (isSubType) {
    const diceMult = args[0].isCritical ? '1d8 + ': '1d';
    const damageRoll = await (new Roll(`${diceMult}8`)).roll();
    new MidiQOL.DamageOnlyWorkflow(actor, token, damageRoll.total,"Slashing", [target], damageRoll, {flavor: "Extra damage against Goblinoids (Slashing)", damageList: args[0].damageList, itemCardId: args[0].itemCardId});
}```

What would be the proper function for this?
hot flower
dark canopy
covert mason
dark canopy
#

i see token at best, but the error is on actor, so check that

covert mason
#
if (args[0].hitTargets.length < 1) return {};
actor = await fromUuid(args[0].actorUuid);
let target = await fromUuid(args[0].hitTargetUuids[0]);
if (!actor || !target) return {};
let PC = target.actor.system.details?.race ?? null
let npc = target.actor.system.details.type?.value ?? null
let npcSubType = target.actor.system.details.type?.subtype.toLowerCase() ?? null;
const isSubType = ["goblinoid"].includes(npcSubType); // so you can add other subtypes.
if (isSubType) {
    const diceMult = args[0].isCritical ? '1d8 + ': '1d';
    const damageRoll = await (new Roll(`${diceMult}8`)).roll();
    new MidiQOL.DamageOnlyWorkflow(actor, token, damageRoll.total,"Slashing", [target], damageRoll, {flavor: "Extra damage against Goblinoids (Slashing)", damageList: args[0].damageList, itemCardId: args[0].itemCardId});
}

console.log(actor);
console.log(target);```

Aye, this is what it's giving me.
dark canopy
#

there ya go -- its not an actor, its a token, which doesnt have a getRollData function 🙂

covert mason
#

I can't seem to find that function in the macro. How do I fix this? Dunce

dark canopy
#

midi is calling it -- the actor variable you are sending is apparently a TokenDocument rather than an Actor, so, despite the nonsense naming this results in -- in the midi function, pass actor.actor instead of actor

covert mason
dark canopy
#

yea

covert mason
#

Works perfectly. Thank you ❤️

covert mason
#

Is there a way I can format an Activation Condition so it only applies to 'goblinoids' suptype?

#

For instance, the 'Fearsome Reputation' feature here.

toxic spruce
#

Is there a way to automatically remove an item that was thrown? (ie axe)

vast bane
wraith spade
vast bane
#

*for conditions

#

set dfreds to replace conditions and all the default conditions will have midi flags auto generated on them

#

you can then right click any ce's you like that already exist or any you make and choose to add them as new conditions

proper siren
proper siren
#

lol missed that

vast bane
#

I use CUB still for name hiding and hp rolling. But you have to turn off enhanced conditions in CUB if you run dfreds.

proper siren
#

yeah I have everything except name hiding turned off, wish there was a dedicated module that just did that though, I feel like there's unneccessary overhead with cub just to use that feature

vast bane
#

I only use CUB over anonymous cause its 2 birds and 1 stone.

proper siren
#

Awesome, I'll check that

vast bane
#

I can't use token mold for hp rolling cause token mold and TVA do not like existing together.

proper siren
#

level up hp rolling?

vast bane
#

Could probably just use a world script to auto roll hp on drop and then drop cub altogether

proper siren
#

my group just takes the average so I don't use that

vast bane
#

no monster auto drop hp rolling

proper siren
#

ahhh, I use tidy 5e's sheet roller, auto would be kinda nice but not a huge deal for me

spiral fern
#

I think this is a midiqol question, but I'm trying to automate the Rune of Fire from the Inventor homebrew class which adds damage on the first weapon hit on a turn. I've taken the Sneak Attack example in the MidiQOL Sample Items compendium and everything seems to be working.

The only question I have is how do I implement a damage type? Right now the part of the macro that determines damage looks like this: js const damageFormula = new CONFIG.Dice.DamageRoll(`${baseDice}d4[fire]`, {}, { critical: args[0].isCritical ?? false, powerfulCritical: game.settings.get("dnd5e", "criticalDamageMaxDice"), multiplyNumeric: game.settings.get("dnd5e", "criticalDamageModifiers") }).formula // How to check that we've already done one this turn? return {damageRoll: damageFormula, flavor: "Rune of Fire"};

#

I've tried setting flavor to fire as per the midiqol docs: Damage bonus macros can return an array of [{damageRoll: string, flavor: string}] which will be added to the damage of the attack. The damage roll is a roll expression and flavor should be a damage type, e.g. fire. Damage returned via the damage bonus will NOT be increased for critical hits. but all it seems to do is change the "title" for the damage in the chat card

violet meadow
spiral fern
violet meadow
#

Yeah thats the way it is handled currently. It probably could do with some CSS love

spiral fern
#

Eh, as long as it's working, I'm good. Thanks!

hot flower
inland vortex
#

I'm having a problem where no automations work, and I have to turn off most of the modules, including midi-qol, to even be able to run battles with no automation. But the problem is only on some scenes, I can go to another scene and most everything is working fine. On one of the other scenes things only worked once i put new actors on the scene, as the old actors prototype tokens had been removed to compendiums. So i tried deleting and replacing the tokens on the scene where our party is currently, but it didn't help. I tried using ctr-a delete in case there were hidden tokens - no help. I finally made a new scene by starting over and importing the dungeondraft map again into a fresh scene. Even with no lights or anything else on the map except the walls and the same actors that work fine in other scenes, the automations don't work! The original scene had no problems till last week's game. Any ideas?

dark canopy
vast bane
#

always spoils when I throw down an npc in the fog

wraith spade
vast bane
#

I think I rely on CE for one item total lol, freedom of movement

#

OH and I made parry for npcs cause like many npcs have parry

violet meadow
scarlet gale
#

CE first tends to break things more than it helps

vast bane
#

CE first was great before your module lol

#

now that we have a midi srd and cpr in v10 its less needed

wraith spade
#

so basically item effects first, then if absent CE

vast bane
#

yeah

violet meadow
#

If someone is dabbling with macros it's pretty much guaranteed to be better to prioritize item effects instead of CE

vast bane
#

tokenmold didn't but tokenmold and tva have a really bad problem together and tva is more important

wraith spade
#

thank you very much, I really appreciate it. Yeah, I thought so, I had item effects first because I implemented Tentacle of the Deeps for one of my players...

violet meadow
inland vortex
#

... ok, after a week of trying, it seems to be working now after disabling Simbul's cover calculator. Which i had done before, but not before some other adjustments. Is it possible that module can cause problems in maps with lots of walls?

vast bane
#

I find cover modules a huge performance hit personally

violet meadow
#

It depends on the actual error

vast bane
#

also simbuls doesn't play well with wall height/levels

inland vortex
#

ok

dark canopy
#

Just a note. Simbul's is only active when it's computing cover

inland vortex
#

and yet with it on melee rolls and a host of other things that shouldn't worry about cover don't work on certain maps, and they start working again when i turn it off 😕

hasty jackal
#

does someone has a macro for a life stealing weapon?

dark canopy
#

Melee rolls can still suffer from cover. It's rare but possible

inland vortex
#

it is a complex cave made with the cave wizard in dungeon draft - so hundreds of little wall sections. 5 actors. They don't appear to be near any walls on the map

hasty jackal
#

i think you can use a module that reduces the walls

dark canopy
#

If you can get a count, that would help

hasty jackal
#

it was called wall optimizer?i think

dark canopy
#

Anything under...2-3k walls should be fine.

#

After that you may start hitting computation lag

hasty jackal
#

yeah but i used the cave wizard on dungeondraft and is kind of a nightmare in terms of walls lol....

inland vortex
#

i recall that players were having a hard time on the map being told that a wall was blocking their action when they weren't near walls

hasty jackal
#

maybe the importer created a wall i had that issue once on a dungeon that i imported to foundry

#

it was a weird wall on the way

inland vortex
#

i haven't used that wizard in a long time, the players finally decided to explore the first cavbe i made that they'd avoided for 2 years

dark canopy
#

Sounds like it's just an overly heavy map. If you can get the wall count from the troubleshooting button, that would help

inland vortex
#

how do you get the wall count?

dark canopy
#

Troubleshooting or support button in the config sidebar

inland vortex
#

827 walls

hasty jackal
#

damn thats a lot of walls

inland vortex
#

yes, and i simplified it a lot back in DD before exporting!

violet meadow
#

First step to find out what's up, is on the map that has issues, open console by pressing F12 and check for errors when you roll an item or something.

vast bane
#

827 is not alot of walls

violet meadow
vast bane
#

is it a levels map?

#

levels on top of cover calculations = stress

#

combine that with midi requiring virtually everything to go through the DM client to spit out to everyone and thats some lag

#

I've had cover off for a while, I just have a hotbar buton to quickly apply the two covers in a pinch when they really matter.

dark canopy
inland vortex
vast bane
# inland vortex

there error happens to me too when I was testing your setup, its a problem with weather fx and fxmaster

#

that second one is new though

inland vortex
vast bane
#

if you are seeing a performance issue, the first thing I'd drop is fxmaster/weather lol. Thats a huge lag hit right there if you got rain going or something

#

or fog

inland vortex
#

There are no error messages with Simbul's off. I get all that with Simbul's on. The weather is off. Turning off the weather mod didn't help at all

dark canopy
#

reinstall simbul's and make sure its dependencies are installed and enabled

vast bane
#

those scene control errors are always there if weatherfx is installed

inland vortex
#

it's dependencies are there, but i will reinstall them all now

dark canopy
#

if that doesnt solve it, log an issue on their repo -- thats an internal module error

vast bane
#

yeah that error sounds like you don't have the dependency enabled

#

or its not the new version did you only update simbuls cover calc?

#

All of simbuls stuff uses a dependency called simbuls athenaum or something

hasty jackal
#

does CPR or any module have a lifestealing weapon?lol...

vast bane
inland vortex
#

the dependency is Simbul's Athenaeum, it was on before. I reinstalled them both. Same results - the game is fine without them on, won't work with them on

short aurora
#

Midi has a Longsword of Life Stealing in its' sample

vast bane
strong yew
#

What is VAE? I see it referenced everywhere but can't find something named that in modules

hasty jackal
#

kk gonna use that

strong yew
#

Thanks

vast bane
#

if its actual healing change temphp to healing

#

Lifesteal Example:

if (args[0].hitTargets.length != 1) return;
const damage = args[0].damageList[0].appliedDamage
if (damage != 0) {
    let sourceToken = args[0].workflow.token.document;
    await MidiQOL.applyTokenDamage([{
        damage: damage,
        type: 'temphp'
    }], damage, new Set([sourceToken]), null, null);
}
#

now we have an easier ctrl F

inland vortex
#

Where would I go to log an issue for Simbul's cover calc?

strong yew
#

Ah, so does it make Dfreds Effects Panel redundant?

#

VAE better for the time being I'm assuming?

vast bane
short aurora
#

Mostly different, really.

vast bane
#

CPR auto populates descriptions on effects in CPR vae

inland vortex
#

ty

vast bane
#

The only reason I am using VAE over DEP is the button hook that zhell packages up and gives to us, and CPR automates that even further

strong yew
#

Yeah, was just checking that out

#

Am adjusting a lot of my macros to work with chris's stuff

#

so will likely do the same for my Starry form buttons

errant yacht
#

can Active Auras work for this outside of combat though? my first thought was Danger Zone but I haven't actually used it yet

vast bane
#

I really don't think thats something you want to do, i know there are some dm's here who do things in real-time but that just sounds stress to me

#

have the trap trigger combat, its an encounter after all

#

then do an overtime effect.

#

I have a few traps that are persistent damage, and I just handle them outside combat by firing them again and again as the players try to resolve the trap encounter

errant yacht
#

Times up and simple calendar

keen remnant
#

I use SC it works great

vast bane
#

I only run in real time during combat if you can call it that

errant yacht
#

Hmm thats true. I guess I was thinking more of an exploration situation where its purely environmental

vast bane
#

I increment game time in splotches by hitting the minutes up 5 at a time and keeping time standing still

errant yacht
#

I usually wouldn't begin combat for that

keen remnant
#

I just let it run and skip fw on rests and long actions that require hours

vast bane
#

traps can and should be considered encounters, not all encounters are combat

#

a good fun puzzle trap should be dealt with as combat in rounds to make it interesting anyway

vast bane
keen remnant
#

Yikes

errant yacht
#

is there actually a setting to have time progress only in combats? to be honest I pretty much only use time for effect expiry or other automation requirements. having a ticking clock during combat sounds amusing for me though lol

vast bane
#

pretty sure its an SC setting

#

something about untethering SC pause from game pause

errant yacht
vast bane
#

you can play and pause the game all you want, the ingame time is frozen till you fiddle with sc's controls

errant yacht
#

cool. I'll check my settings when I'm off work

hasty jackal
#

btw if i want to reduce the healing of the macro to 1/2 what line should i swap?

vast bane
hasty jackal
#

kk

vast bane
#

I think you just add / 2 on the end of the const damage

#

let damage = Math.floor(args[0].damageTotal / 2);(change let to const in your example

#

wait damageTotal was wrong

#

don't use this example at all except to confirm you should just put it in parenthesis and end it with a ;

#
if (args[0].hitTargets.length != 1) return;
const damage = Math.floor(args[0].damageList[0].appliedDamage / 2);
if (damage != 0) {
    let sourceToken = args[0].workflow.token.document;
    await MidiQOL.applyTokenDamage([{
        damage: damage,
        type: 'temphp'
    }], damage, new Set([sourceToken]), null, null);
}```
#

@hasty jackal ⬆️

#

you don't want to use damageTotal like I showed cause we learned later on in the evolution of the macro that appliedDamage makes it so we don't have to worry about resistances and immunities.

hasty jackal
#

thanks

short aurora
#

Anyone know if Midi has an exposed function to check for total cover or an example of an item that does? I'm over automating Witch Bolt.
edit: computeCoverBonus seems a good bet, will do that.
edit2: this is broken or I am, logging an issue >_<

robust vault
#

I have 10.0.39 midi and I use FASTFOWARD ABILITY ROLLS, but I have noticed that since some previous versions, when rolling initiative does not make fastfoward, but it jumps the chat message DA, normal AD... has anyone noticed this?

wraith spade
#

Hi all, one question: I have created a weapon attack with a active effect which should be applied to the target on hit. I am struggling to find this button config (see screenshot). Where and Can this be configured to be not shown?

vast bane
#

init is its own thing cause of dnd5e dev reasons. I dunno why midi hasn't dealt with it yet but theres a standalone module that reverts it back to prior dnd5e methods of init.

vast bane
#

if 1 and 2 are not the case, number 3 would be probably Ready set roll, effective transferral, or wire installed

#

you also missed for the record, so it shouldn't apply...

wraith spade
#

i will check the first option....
it works and does apply the effect only on hit, but I don't want to confuse my players, so the button shouldn't be there

vast bane
#

you probably have leave button on or one of the modules above installed

#

its one of the drop down options in that specials first drop down

#

but effective transferral and ready set roll also leave the button up

#

and in midi it will show up if you don't have require target on and you make a roll with no target

#

since you missed a target, thats unlikely

wraith spade
#

ah, i think i have the option selected "apply effects and remove button" which does this. It will show the button in the miss case

vast bane
#

so you have one of the modules above

#

I have apply effects and remove button, I never see that button

#

You also don't have typical merge cards on so its easy to mistake midi for ready set roll with your setup

wraith spade
#

no, you have apply effects and do not show button

#

which is what i have selected now and it works as you say

vast bane
#

that is a midi 39 change?

wraith spade
#

Maybe, don't know?

vast bane
#

most of us aren't using midi 38 or 39 cause of breakages

#

Yep you are right, I didn't realize there were that many options in that drop down

#

now we know why it exists lol

#

for those "Oops that was suppose to hit" moments

wraith spade
#

Yeah

#

Sometimes the documentation is more trial and error with midi... 😅

#

For example under GM-> GM roll hiding --> there is an option which says Roll Formula but show DSN roll .
I totally don't know what DSN means and on trying the two options (Roll Formula and Roll Formula but show DSN roll) I could not see any difference...

short aurora
#

It's a module called Dice So Nice :p If you don't have the module, that does indeed not make much sense

violet meadow
#

Dice So Nice, a module for rolling dice on screen

robust vault
wraith spade
#

Aaaahhh, ok, good to know. Like I said, trial and error, as other config options check installed modules (cover calc for example)

#

I dont have fast forward activated

robust vault
vast bane
#

The devs for the system don't really like automation so when they added the advantage/normal/disadvantage for init, they made it its own thing and midi hasn't adapted it to midi yet. If you want it to work like it used to theres a module that reverts it

#

I guess its just a low priority thing in midi to not adjust it to work like the rest of the rolls in midi

#

I don't realy think anyones touched it yet, advantage reminder hasn't given us flags for reminders for init yet either

red pasture
#

Does anybody have any experience using midiqol and casting the spell “call Lightning” we’re having trouble getting that one to play nice

scarlet gale
#

My module has it, or otherwise there has been plenty of people who've shared their macros for it in here.

#

I want to say Midi SRD has it too?

red pasture
#

Here’s the issue: the next round of combat my player who cast it should be able to select who to target with the spell, it’s making him basically “recast” the spell

scarlet gale
#

Yep

#

There are a few implementations of that spell floating around. My module (Chris's Premades) handles it by giving the player a feature to use while the spell is active.

red pasture
#

Excellent, I’ll grab that later. Appreciate it 👍🏼

scarlet gale
#

Otherwise, search for Call Lightning in here and you'll find plenty of other examples of it.

#

My module has a lot of dependencies, so it's not for everyone.

vast bane
#

if I recall the only issue with midi srds version is the item itself is setup wrong

#

I think the save is left on the item and just needs to be cleared

random jolt
#

Does anyone know how to make this work?
flags.midi-qol.grants.disadvantage.attack.rwak

I am trying to give disadvantage to all ranged attacks... Weapon and Spells.

#

It looks like this line grants disadvantage to people trying to attack the token instead... 😦

#

I found it!... flags.midi-qol.disadvantage.attack.rwak

vast bane
#

grant flags typically transfer the effects to whomever is attacking something

tepid dock
#

I had heard some potential issues with Midi 10.0.38. Is .39 have any foreseeable issues?

gentle sluice
#

I tried turning on enforcement of bonus action and reactions and it works fine to start, but dosn't reset actions and bonus actions at the end of the round, you guys know how to fix this?

vast bane
#

midi 37 still here

#

don't fix what aint broke

vast bane
#

and is that Merchant sheet npc I see off to the left?? that module is so dead in v10

atomic badge
#

Does anyone know if I could by any chance automate this using a DAE?
Any temporary hit points applied by your inscriptions can stack up to an amount equal to three times your Artificer level + your Intelligence modifier (minimum of +1), but cannot exceed this amount.

Edited for the only relevant effect here.

#

Specifically emulating the maximum amount of temp HP.

molten solar
#

Basic math can do this.

#
const tempHP = /* some value you get somehow, idk */
const rollData = actor.getRollData();
const max = 3 * rollData.classes.artificer.levels + rollData.abilities.int.mod;
await actor.applyTempHP(Math.clamped(tempHP, 1, max));
violet meadow
#

So, does this ability just mean that you can add tempHp from multiple sources, up to the max amount?

#

How do your inscriptions apply the tempHp in general and can these apply tempHp to non-owned tokens as well?

vast bane
#

sounds like homebrew or paraphrased feature

oak mulch
#

Can someone help me setting up Supreme Sneak (One DnD) with AE. The feature provides advantage in stealth checks, but i'm not sure which attribute key + change mode + effect value should i go with 🤔

vast bane
#

if you have dae installed, the auto complete should get you there if you type advantage.ability

oak mulch
#

i was going with system.abilities.... -.-" Thank you once again! ❤️

gentle sluice
gentle sluice
#

yea i was answering both questions, i do NOT have mercahnt sheet active and i DO have DAE

vast bane
#

your spcial durations are not working then?

gentle sluice
#

well the problem is that for the bonus action and reaction it's just drop down toggle and it puts the effect on the creature without a duration, is there a way to configure the bonus action / reaction effects independent of that?

#

becasue it's not coming from an item or that would be easy it's sjut coming from the module with no config for it

gentle sluice
#

nope, i do not have that

vast bane
#

I thought the combat centric ones were just midi/DAE but I guess its times up that does them

#

install times up and you should start to see special durations

gentle sluice
#

that feels like kind of a big thing to not be standard in it, but yea i'll grab that module, also how did you edit the effect itself? of course you can do it for each indivitual creature after it's applied but i don't really want to do that

vast bane
#

I'm on an actor

gentle sluice
#

ah

vast bane
#

Its also a convenient effect:

#

you don't need dfreds though, midi will make it on its own if dfreds is absent

#

Its recommended though

gentle sluice
#

is that in the codex or under dfreds config?

vast bane
#

They aren't all required modules cause technically the modules still mostly function without those parts

#

dfreds menu in its main window, the jazz hand

gentle sluice
#

ahh, alright, effects pannel right?

vast bane
#

no dfreds convenieent effects

#

but all you need is times up

#

dfreds just lets you edit it

gentle sluice
#

ahh, alright

#

thank you much

vast bane
#

the flags are there on the efect but the modules absent so it fails to work till times up is enabled

gentle sluice
#

good to know, day by day i make my DnD more efficient

fringe brook
#

Ima gonna ask in here, cause it's automation related:
I have a NPC with cold regeneration. As long as he's not hit by fire, he regains 5hp at the start of his turn. He even regenerates from 0hp, if he didnt take fire damage last turn.
Now I have a regeneration effect: flags.midi-qol.OverTime.regenerate
How do i turn that off for 1 turn if fire damage was taken?

Second question: How can an unconscious/incapacitated/dead NPC (on 0hp) take a turn? Foundry won't let me

short aurora
fringe brook
#

alright, he takes turns again, even if he's dead, however the regeneration wont work:
label=Regenerate,turn=start,damageRoll=5,damageType=healing,condition=@attributes.hp.value < @digital lagoontributes.hp.max

vast bane
#

I don't think there is a way to automate it without going nuts

#

I just put a label on the overtime that says "cancel this if X damage was dealt."

fringe brook
#

can i not add an effect that "pauses" the regeneration effect if fire damage was taken?

vast bane
#

not that I'm aware of

fringe brook
#

'kay

#

i accept that. then i only want to be able to heal back from 0hp

vast bane
#

you could make the overtime have a special duration of is damaged by fire

fringe brook
#

if you can help me with that?

vast bane
#

and then have an effect macro secondary effect that fires the overtime back up at end of turn

vast bane
#

I dunno how to do the start back up part, thats more krigs department

#

special druation is prebuilt if you have times up/dae/midi

#

its just a really far down one

fringe brook
#

a

#

found the dropdown

short aurora
vast bane
fringe brook
vast bane
#

fire damage kills the overtime, then you need a secondary effect that rerolls the item back onto them at end of turn

short aurora
#

Ah, no regenerate

vast bane
#

an old flag but bad

fringe brook
#

i still get this popup too

fringe brook
vast bane
#

that flag is old and probably deprecated

short aurora
#

That's another issue Moto found, Midi restricts actions from incapacitated actors?

vast bane
#

no

short aurora
#

You just want flags.midi-qol.OverTime as the attribute key

vast bane
#

it doesn't if he uses overtime

#

oh shit

#

no the fix for overtime and incapacitated is in the broken midi's

#

if hes on 37, you can't run an overtime on an incapacitated actor

#

he just fixed that but 38 and 39 are kinda broken

fringe brook
#

uh

#

sooo update or not?

vast bane
#

when we do finally have a fixed one, its only fixed for the real overtime key, that regenerate one is ooooold

fringe brook
vast bane
#

oh jesus thats old

fringe brook
vast bane
#

well you can go to 37, but you'd have to manually update it

#

38 and 39 don't play well with CPR

fringe brook
#

can i go to 39 or will that break most of my stuff?

#

what's CPR?

vast bane
#

you can go to 39 if you don't mind midi breaking mid session and having to downgrade to 37, pick your poison

short aurora
#

it's that thing you do when you beat on someone's chest to the tune of stayin' alive

fringe brook
#

thanks, ill try to manually upgrade to 37... but the overtime still wont work?

vast bane
#

tim just released a new version I think

#

lol

#

I found out by going through the readme lol

#

forget what I said about 38/39 he just dropped the updates we've been waitin on

fringe brook
#

8 mins ago

#

😄

#

so i'll yolo update it to .40 then, yes?

#

let's see if everything broke

#

hm

#

didn't break, but the OverTime effect still doesn't seem to affect my dead npc

violet meadow
#

updating now to test

vast bane
violet meadow
#

Are OT effects supposed to affect dead NPCs? 🤔

vast bane
#

oh

#

is it dead or incapacitated?

fringe brook
#

uh both?

#

i mean he goes to 0hp and ... yea...?

vast bane
#

its a new overtime command

#

Additional option for overTime effects allowIncapacitated=true|false. If true overtime effect will still be processed for incapacitated actors. Useful for effects that allow a saving throw to remove a condition, e.g. power word stun.

#

its in midi 37+

#

looks like false is the default, will fix my cheat sheet accordingly

vast bane
#

heres a funny hack for creatures that regenerate at 0, give them condition immunity to dead

fringe brook
#

hm

#

will do

#

one sec

vast bane
#

They don't call me janky for nothin

fringe brook
#

😄

#

i am currently struggling to make a feature that gives him regeneration back

vast bane
#

omg I got an even funnier hack if you have dfreds

#

add an effect macro to dead in dfreds, on suspend, apply dfreds CE: "Dead?"

fringe brook
vast bane
#

when a condition is immune, it gets applied suspended

#

I highly doubt midi's suspension for immunities works with effect macros suspend flag though lol

fringe brook
#

eh

vast bane
#

simply clone dead, and add ? on the end of its name then make an effect macro on suspend for dead and call it dead?

#

I'm actually doing this, thats hilarious and kinda friday the 13th ish

#

the reason you have to do CI dead, is cause npcs get deaded, while pc's get unconscious

#

I wonder if its only checking for incapacitated

#

@violet meadow hows the undo button look?

fringe brook
#

didnt have to do any of that

#

the override when dead works

#

allowIncapacitated=true this

vast bane
#

I had a feeling he was checkin more than just that cause I think it was born from a complaint that regeneration wasn't firing

fringe brook
#

how do i now make it a feature of this npc, that i only have to click to reapply the regeneration? I made the "Cold Regeneration" into a convenient effect

#

i want the feature to apply the effect to himself

vast bane
#

as for how to automate if damage is taken, the main snag is you need to be able to reapply the overtime if it expires due to the special duration at end of turn. Set a second effect macro on the cold regeneration. On this blank ae, have it transfer on equip, and have it have an effect macro that is at end of combat turn: origin.use()

fringe brook
vast bane
#

make two ae's

#

see how theres already one?

#

add a second one

#

but have no keys on it

#

also make that existing one a standard item transfer, NOT transfer on equip

fringe brook
#

you're losing me here, sorry 😦

vast bane
#

do you want the overtime to cancel if they take fire damage?

fringe brook
#

so I have the convenient effect "cold regeneration". That one works and turns off (removes itself from the actor) if fire damage is taken.

#

Next step is the reapplying

vast bane
#

if you do, then it will kill the effect, then next round they can regen again, to get the regen to start back up you need a way to reapply the overtime at the end of the turn

fringe brook
#

do i edit the convenient effect? or a Feature of the actor?

vast bane
#

nm, if you are using dfreds none of this will work

#

the origin for dfreds is the secret sidebar item

fringe brook
#

so if i dont use a convenient effect ... ?

vast bane
#

Regeneration item has 2 ae's the first ae is transfer via standard effect transfer, this has your overtime on it and it has a special duration of isdamaged fire

#

aka no boxes checked in the first tab of the ae

#

the second one is where the magic happens, the second ae has no keys in it, its a transfer on equip active effect with an effect macro for turn end, that fires the macro origin.use()

#

make sure the regeneration item details are set to self/self

#

range and target

proper siren
#

Hey yall, question. I have a player who prefers to roll physical dice in my game. This becomes an issue with saving throws because they are prompted to make the save in foundry but don't want the dice roll. Is there anyway in midi to allow a user to essentially cancel a saving throw prompt?

vast bane
proper siren
#

hahaha... it's my wife

vast bane
#

DF manual rolls it is

#

or the couch

proper siren
#

ahhh I hadn't seen df manual rolls, that is cool

#

do you know if df works with lmrtfy? I'd assume probably not

vast bane
#

10d4x fails to df manual roll all explostions but initial rolls are manual, but since dnd5e does not do explosion dice options, its understandable tposney never accounted for it

fringe brook
vast bane
#

only other known conflict is df manual rolls does not like Maxwells Malicious Maladies with the midi roller.

fringe brook
#

here's the other windows

vast bane
#

clear the key oout of red one, have it just be empty

#

the red one should have no duration, neither of them should, the green one should have a special duration of is damaged by fire

fringe brook
#

I got that

#

do i have to actively use the feature to make it ... start?

vast bane
#

you don't

fringe brook
#

it doesn't seem to do anything other than post it into the chat

vast bane
#

did you make an effect macro on the red one?

fringe brook
#

well you see it in the first picture

vast bane
#

the red one gets the macro not the green one

fringe brook
#

the red one has the macro, i just didnt match the pics, wait

vast bane
#

are you sure?

fringe brook
vast bane
#

if its on the red one, then at the end of the first turn in combat it will fire the green overtime

#

this sorta assumes the creature starts combat at full health fwiw

#

hol up

#

problem solved, add another effect macro

#

on combat start 😉

proper siren
vast bane
#

so on end of turn and on combat start, origin.use()

#

to be clear you do not want on turn start

#

I mean literally on combat start, beginning of combat

fringe brook
#

yep

#

understood

vast bane
#

if you make the macro fire on turn starts, then it defeats the purpose cause overtime fires after it

fringe brook
#

but nothing is happening

vast bane
#

is it in combat?

fringe brook
#

I mean

#

I only have under "Effect Macro" "On Each Combat Turn"

vast bane
#

(is it damaged?)

fringe brook
#

there is no option on turn end 😦

vast bane
#

each combat turn will break it, you want on the actors turn at end

#

each turn means it will fire at the end of all turns in a round

fringe brook
#

nvm im blind, alright

#

ok

#

it fires the ... feature

vast bane
#

you want it to fire on just the end of the actors turn so it starts up AFTER overtime could have been triggered

fringe brook
#

which doesnt do anything but post to chat (doesnt add the green effect)

violet meadow
vast bane
# fringe brook

you do not have midi qol enabled, effect transfer on, or a token on the map

#

workflow button, workflow tab, first drop down of special section is set to off

#

(or you are using another roller)

fringe brook
vast bane
# fringe brook

delete the dfreds CE or rename it, or shut off CE transfer on the item, thats why you have 3 regeneration effects

#

ok you have the glitch, you edited an owned item

fringe brook
#

a

#

shouldnt have done that?

vast bane
#

its not a ce, you just have 3 ae's one is the broken editing an owned item bug

fringe brook
#

so, ill make a new item and copy the effects over?

vast bane
#

my guess is thetemporary one is the bugged one that needs to get yeeted

#

no you just need to get rid of whichever one of those is bad

fringe brook
#

oke

#

deleted the temporary one, will set it up again

vast bane
#

its more than likely the temp one

#

your dfreds CE setting in midi is the worst setting fyi

#

you have ce before ae

#

unless you literally rely on dfreds CE for everything, you usually want it the other way around

#

and the reason why its probably not working is cause you have a dfreds CE made in dfreds named the same as the item, and its rolling and applying that old one instead

fringe brook
#

alright, i removed the CE, i changed the midisetting, but it's still just posting to chat each turn ... twice

#

ah

#

it's happening on everyones turns TT

#

ok the red one's broken

#

seems like "on combat turn ending" is everones combat turns after all

#

lemme reload and restart combat

#

hm seems to be working now

#

it's refreshing itself every turn. Can i somehow prevent this? (it's just kinda spammy)

#

is there some kinda if () i can put into the on turn end Effect Macro around the origin.use()?

molten solar
#

Evening ladies, what fresh horrors are we conjuring with my modules?

molten solar
#

Oh neat-o. Yeah just slap an if( /* something that should stop the script */) return; into the EM

fringe brook
#

yes, would love that. just don't know how to get the current actors active effects :/

#

like literally 0 idea which keywords? variable names?

molten solar
#

Why is it triggering after each combatant's turn?

fringe brook
molten solar
#

What's the issue then?

fringe brook
#

the only issue is that it's reapplying every turn, so i would like to put the condition into the ... effect macro that reapplies it every turn

short aurora
#

actor.effects.find(e => e.label == "Name of Effect to Find"), I think EM supports those helper ... variables? Is that what you call them?

violet meadow
#

label

fringe brook
#

i would like it to not reapply if this actor has the "Cold Regeneration" effect active

short aurora
#

FUCK I wrote label to begin with

molten solar
#

Just actor. Though it's safe to assume there is a token.

violet meadow
molten solar
#
const hasColdRegen = actor.effects.some(e => e.label === "Cold Regeneration");
if(hasColdRegen) return;
// rest of the script here
fringe brook
#

yes

#

eh

#

no

#

it's totally gone

molten solar
#

there

fringe brook
#

doesn't seem to work 😦

if(hasColdRegen) return;
origin.use()
molten solar
#

edited

fringe brook
#

yea

#

same

#

x)

#

ugh

short aurora
fringe brook
#

thank you so much

vast bane
#

your problem was because you have CE before AE

fringe brook
#

it's all working now 🙂

vast bane
#

ok

fringe brook
#

thank you 😄

scarlet gale
#

Why was I credited in the DAE changelog?

fringe brook
#

is dfreds CE an issue generally? 😦

vast bane
#

also if it really needed to check, that means dfreds stacking is broken, which I've been saying forever btw

scarlet gale
#

Wasn't that @coarse mesa 's fix?

vast bane
#

I feel like stacking is broken in the new dfreds

fringe brook
#

now that the fun automation is done, time to actually prep the session

#

they might not even fight this guy 😄

vast bane
#

midi does

scarlet gale
#

@gilded yacht I think you got your wires crossed. I didn't do anything for DAE lol

short aurora
# vast bane I don't think the core roller checks temp hp values

It do;

async applyTempHP(amount=0) {
    amount = parseInt(amount);
    const hp = this.system.attributes.hp;

    // Update the actor if the new amount is greater than the current
    const tmp = parseInt(hp.temp) || 0;
    return amount > tmp ? this.update({"system.attributes.hp.temp": amount}) : this;
  }```
vast bane
#

Lukas did but it was in your server

scarlet gale
#

Ah

vast bane
violet meadow
#

applyTempHP will only update if the new amount is higher than the existing

short aurora
#

That's the function definition, Moto, from core dnd5e

#

Hence why it's an anomaly if the item you tested yesterday did not respect it and used applyTempHP

vast bane
#

then its a bug

molten solar
#

Shock and horror guys, the system function to apply temp hp applies temp hp the way the system is meant to

violet meadow
#

it aint asking though 😛

vast bane
#

last time we were doing this, we had to change to a midi function cause the temp hp was updating regardless of how much was already on them

scarlet gale
#

It shouldn't

molten solar
violet meadow
#

no slapping please 😦

vast bane
#

I don't even remember who it was, and it wasn't my own item, I do know that it was not applyTempHP

scarlet gale
#

I'd still change to the midi function for the undo damage button however

vast bane
#

it was applyTokenDamage

#

the undo button on temp hp is the closest we will have to rules as written temp hp

#

core temp hp is not raw

#

the player can take the new temp hp

scarlet gale
#

Pretty sure it checks

vast bane
#

not if you use applyTokenDamage

#

it was just silently replacing nonstop WAIT, I still have the item lol

#
let damageTotal = 0;
args[0].damageList?.forEach((damagedToken) => {
    damageTotal += damagedToken.appliedDamage;
});
if (damageTotal > 0) {
    damageTotal = Math.floor(damageTotal / 2);
    await MidiQOL.applyTokenDamage([{damage: (damageTotal), type: 'temphp' }], (damageTotal), null, null, new Set(this.actor));
}

have fun

#

this does not check for higher values

short aurora
#

Isn't it this item? #1010273821401555087 message The macro should respect it, which is why I think there's a bug report if that was not your experience.

let damageTotal = 0;
args[0].damageList.forEach((damagedToken) => {
    damageTotal += damagedToken.appliedDamage;
});
if (damageTotal > 0) {
    damageTotal = Math.floor(damageTotal/2);
    await args[0].actor.applyTempHP(damageTotal);
};```
vast bane
#

oh wait

#

I fixed it already damn it

#

replace it with the core one

#

I think we were just using applyTokenDamage?

#

we switched to midi purely because it was resetting the temp hp to lower values

molten solar
#

Nah it wasn't.

#

but I'm sure midi touched that too, so who knows what works the way it's supposed to. Disable all modules and try again.

soft ravine
#

Is it possible to macro having advantage on Saving Throws against a dmg type.?

short aurora
soft ravine
#

(apperently this is a midi - involved thing??? - i can never tell when im supposed to post here.

vast bane
#

it just replaced 12 with 6

#

that sure looks like applyTempHP to me lol

vast bane
#

CPR doesn't save against damage types, it saves against conditions right?

#

its literally Conditional resistance

#

and vulnerability

short aurora
vast bane
#

easiest way to test CPR 's conditional resistance is to cast poison spray on a dwarf

vast bane
#

its not going to work on just poison damage, it will only give the advantage if theres a save for macro.ce Poisoned

soft ravine
#

i FINNALLY UNDERSTAND WHAT THAT MODULE IS NOW

short aurora
#

sweats

scarlet gale
#

I treat the dwarf feature as being poorly worded

molten solar
soft ravine
vast bane
#

I can only think of one thing that does poison damage for a save that isn't poisoned condition also, and thats poison spray lol

scarlet gale
#

Literally all other racial resistance ones are for advantage on condition saves

soft ravine
vast bane
molten solar
#

Show me what applyTempHP looks like in your game.

soft ravine
molten solar
#

How wrapped is it...

vast bane
#

I am right that you have to swap to macro.ce right @scarlet gale or the CR/CV won't get picked up?

scarlet gale
#

Correct

violet meadow
molten solar
#

Just Moto doing something weird then. 👍

vast bane
# molten solar Show me what `applyTempHP` looks like in your game.
let damageTotal = 0;
args[0].damageList.forEach((damagedToken) => {
    damageTotal += damagedToken.appliedDamage;
});
if (damageTotal > 0) {
    damageTotal = Math.floor(damageTotal/2);
    await args[0].actor.applyTempHP(damageTotal);
};

It breaks when theres more than 1 target, I think its checking the first targets value of temp hp vs the new

molten solar
#

No it does not

vast bane
#

if you only hit one thing its fine, but if you hit 3, suddenly it starts replacing no matter what

#

the midi function that does the same thing, works so /shrug

#

I guess this is a lesson to always use midi

violet meadow
#

this function rings a bell 🤔

scarlet gale
vast bane
#

the item was meant to be an actor on use, so I guess midi touches it

violet meadow
#

different issues

scarlet gale
#

🤦‍♂️

vast bane
#

and the item I made, was to test his multi target feature of it so:

#

and he swings against 4 people including himself

#

hol up...including himself...

molten solar
#

canvas.tokens.controlled.forEach(t => t.actor.applyTempHP(1)); works as expected (did not lower any temp hp on any of the actors who all had more than 1 temphp)

vast bane
#

he's...damaging himself...

molten solar
#

Your shit's bugged. 👍

vast bane
#

not bugged

#

foundry was just smarter than me

#

the new value is not smaller

#

its just the new value minus the damage he took

molten solar
#

So when you said it was lowering the temp hp, what you meant was not in fact that it was lowering the temp hp

vast bane
#

I never put special in the range, so hes hitting himself

violet meadow
#

you are kind of racing foundry function vs Midi damage application

vast bane
#

yep thats precisely it

molten solar
#

Oh there we go

#

Race conditions.

vast bane
#

and why midi works better is cause it pauses for midi damage

#

to be fair, normally you don't hit yourself with your club

scarlet gale
#

Doesn't core only work on owned tokens?

vast bane
#

I only put the aoe in cause he wanted to know if the more than one target addition worked

molten solar
#

Of course. It's an update to an actor.

vast bane
violet meadow
scarlet gale
#

Was missing that context

vast bane
#

I didn't really think about hitting himself cause the actors ar all the same name

scarlet gale
#

Either way, Moto making an issue out of nothing

#

Working as intended

vast bane
#

bah

#

I didn't bring it up

violet meadow
vast bane
#

midi function is still better for undo button which was the whole reason I went that way instead anyway

molten solar
vast bane
#

it was for araxiel

#

the final code was:

if (args[0].hitTargets.length != 1) return;
const damage = Math.floor(args[0].damageList[0].appliedDamage / 2);
if (damage != 0) {
    let sourceToken = args[0].workflow.token.document;
    await MidiQOL.applyTokenDamage([{
        damage: damage,
        type: 'temphp'
    }], damage, new Set([sourceToken]), null, null);
}
violet meadow
vast bane
#

I bookmarked a lifesteal cause its asked for so much

#

but I already forgot what I put for keywords

#

Lifesteal Example:

#

I got sick of looking for it lol

fringe brook
#

How do I use
flags.midi-qol.DR.non-magical-physical
for a heavy armor master passive effect?

#

or is there an implementation i can just steal somewhere?

violet meadow
#

or the non magical physical flag

fringe brook
#

with change mode set to custom the character doesnt take dmg no more 😦

#

Uncaught (in promise) Error: undefined. Unresolved StringTerm true requested for evaluation
[Detected 1 package: midi-qol]

#

setting it to "Override" works

#

this heavy armor master effect seems to work

coarse mesa
vast bane
#

or was it absorption that changed

fringe brook
#

add seems to work too

#

eh

winter halo
#

Hey guys, I would love to do the feat Flames of Phlegethos. I have seen that @sudden crane did that sadly I didn't really understand how it was done as I am lacking in the knowledge department

fringe brook
#

i take that back

vast bane
winter halo
#

He writes about hooks and world scripter which I have no idea what that is 😄

fringe brook
#

add seems to ... add ... more? like idk how much more, the char always took 0 dmg

winter halo
#

Flames has no checked box in there

vast bane
#

yeah I swear I just saw this somewhere guess I'm mistaken

fringe brook
#

Heavy armour master is.
I freshly imported the chara with that feat from dndbeyond and still had to add the effect myself

violet meadow
#

@short aurora About the Issue you created for MidiQOL.computeCoverBonus.
Does the answer on the issue make sense?

vast bane
fringe brook
#

i do own the phb

vast bane
fringe brook
#

that's what I'm using

vast bane
#

you either imported just the feat, or you imported without the midi/dae checkbox in the character importer

fringe brook
#

a

#

there's an active effects tab, let's see

#

still didn't "import" the heavy armor master feat in a working manner

#

ah

#

had to freshly import

#

still seems kinda buggy, substracting 6 instead of 3

sudden crane
fringe brook
#

only works right with Override instead of Add

vast bane
#

mouse over the token icon

#

what does yours say in the tooltip

fringe brook
#

dr: non-magical:9

vast bane
#

9 seems wrong

#

are you editing owned items and getting the glitch?

#

check the actors effect tab

fringe brook
#

i made a fresh char and imported it from dndbeyond

vast bane
#

show me the effect tab of the actor cause you just mentioned changing the mode

fringe brook
#

isnt this the effect tab?

vast bane
#

show me the tooltip of the actor

fringe brook
vast bane
#

wrong actor

#

you aren't looking at the right actor

fringe brook
#

i am confuse

vast bane
#

you just showed us 2 different actors so either your actors unlinked or you have two actors named that

fringe brook
#

hm alright

#

now here's with 6

vast bane
#

the sheet has 38 hp, your token damage says 35

fringe brook
vast bane
fringe brook
#

.40

#

just updated earlier

vast bane
#

I dunno why anyone updates lol

fringe brook
#

like 10 mins after it came out

#

bro we went over this earlier, because otherwise i couldnt regenerate my dead actor

#

(or so you said)

vast bane
#

I never said update to the brand new, I even looked up what midi had it, and told you then

fringe brook
#

I was on .35 and didnt wanna bother to update manually

#

yes alright, so it's bugged in .40 then? :/

vast bane
#

I dunno, I was just here to clarify the checkmark was accurate, it is for me so its staying on in the wiki

#

disable modules test, or downgrade to 37 and test

fringe brook
#

gonna try with just midi

violet meadow
#

Please DO NOT USE Add for these flags.

#

CUSTOM works fine

fringe brook
#

custom throws an error for me, i gotta use override

violet meadow
#

What error?

fringe brook
#

threw*. seems to work now on the freshly imported char

#

twas something along the lines of

[Detected 1 package: midi-qol]
vast bane
#

No errors in midi 37 with custom in heavy armor master fyi

#

override leads me to believe they got issues with their actors if it only works with override

#

do you have that optional DR rule on?

violet meadow
fringe brook
#

found it

#

i have that checked

violet meadow
vast bane
#

I'm using add cause I'm on 37 lol

#

errr custom

#

mine works fine

short aurora
frail osprey
#

Hi, guys. I can't get the Flame Blade spell to create an item on my players' inventory. Tried Mr. Primate's and Midi SRD's versions, they create the effects fine, but not the item. Any idea why?

violet meadow
#

Mr Primate's probably gets it from MidiSRD. I will check Midi SRD. Any errors when you use it?

static sparrow
#

Is there any way to, in a macro (like in the preItemRoll macroPass), just abort the entire process?

frail osprey
#

just this

static sparrow
# violet meadow return false;

Sorry, to clarify, I mean abort the item, not just the macro (if returning false will do that, then great! but it feels weird so I wanted to make my question clear XD).

frail osprey
#

Yeah, both MidiSRD and Mr Primate's give this

violet meadow
violet meadow
frail osprey
violet meadow
#

I will take a look in a bit

frail osprey
#

Updated and it worked fine!
There is, however, a new angry red error in the console, though it doesn't stop the spell from working. nvm, it didn't show up again when I tried to replicate.

#

Thanks, @violet meadow , you're the best!

soft ravine
#

in CPR's Module is this what im supposed to replace