#MidiQOL

1 messages · Page 61 of 1

dark canopy
#

try it, its close

royal dragon
#

Well after all that, mine is mostly honeybadger's since I don't have the spell compendium that Chris uses

vast bane
#
const buttonData = {
            buttons: [{
                label: 'Zombie',
                value: {
                    actor: { name: "Zombie" },
                }
            }, {
                label: 'Skeleton',
                value: {
                    actor: { name: "Skeleton" },
                }
            }
            ], title: 'Which type of Undead?'
        };
let dialog = await warpgate.buttonDialog(buttonData);
const [spawn] = await warpgate.spawn(dialog);
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
vast bane
#

I think he does that so he doesn't need to put the full synthetic item in the macro

royal dragon
#

I really need to clean up my compendiums...

vast bane
#

I've already done that, but my messy spot, is the folder macros and root directory of data, cause my players are soooo bad

royal dragon
#

I can barely get mine to write in their journals

vast bane
#

do I need to put in that weird line to precache the image since its a wildcard?

#

await Promise.all(imgs.map(i => loadTexture(i)));?

#

Or is it the name: that is wrong?

white turtle
#

is auras just broken that it sometimes just applies an effect twice when a spell is used? lol

royal dragon
#

Unless I'm reading it wrong, your original script just passed a string to spawn, and your dialog is passing an object

vast bane
#

when you are creating an aura out of a template with active auras, you need to use the aa helpers macro that you canf ind on any of the premades in the active auras compendium(don't use the macro compendium one), and set the activation condition to FALSE and check the box at the bottom of the item

white turtle
#

oooh thank you, I'll give that a try

vast bane
#

if you have not done anything with activation conditions yet:

#

at the very bottom of the workflow tab set these to my settings

#

the two drop downs at the very bottom

scarlet gale
vast bane
#

however you could do all of this and still get duplicate effects because dnd5e 2.1.x has a glitch with dae atm where dae duplicates effects

subtle whale
#

Would I use the Midi DR flag to add resistance on an effect or is there a different way?

vast bane
subtle whale
#

Resistance

scarlet gale
#

Resistance is a core flag

vast bane
#

Damage reduction would be stones endurance or heavy armor master
Damage resistance would be things like rage for bludgeoning/piercing/slashing

subtle whale
#

Ah yep! I found it, autofill didn't show me it i had to fill it in a little more mb

dark canopy
vast bane
#

is it the space before name in the macro?

#

wait a minute

#

its the name: isn't it

#

cause when I normally use warpgate I just call its name

#

cept that its not working still after testing I dunno prolly cause i deleted too much:

const buttonData = {
            buttons: [{
                label: 'Zombie',
                value: "Zombie"
            }, {
                label: 'Skeleton',
                value: "Skeleton"                }
            ], title: 'Which type of Undead?'
        };
let dialog = await warpgate.buttonDialog(buttonData);
console.log(dialog)
const [spawn] = await warpgate.spawn(dialog);
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
#

I removed spaces around it, was that wrong?

scarlet gale
#

One of these days you'll just start using warpgate dialogs. It's super simple to setup.

vast bane
vast bane
scarlet gale
#

Or use my helper function that dumbs it down even more

royal dragon
#

Why not just 'value: "Zombie"'

vast bane
#

actually before I do do that...was one of my issues that there was a rogue comma after both of them?

royal dragon
#

value: { actor: {"Zombie"}} should be value: "Zombie". Same for skelly

#

Not sure about the ,. In Rust that sort of thing is expected

vast bane
#

Ok now my problem is its only summoning one

scarlet gale
#

Anything comma separated doesn't need a comma after the last item

vast bane
#

do I need to await the sequences?

scarlet gale
#

Most code editors should yell at you about it

vast bane
#

its only summoning one zombie or skelly

#

even though theres two sequences

#

no errors

royal dragon
#

I just see one spawn and two misty step animations

vast bane
#

its called in the sequence

royal dragon
#

Oh...

vast bane
#

each sequence

#

My guess is I need to await them but I'm gonna go find my dancing lights macro and see if that solves it

#
const buttonData = {
            buttons: [{
                label: 'Zombie',
                value: "Zombie"
            }, {
                label: 'Skeleton',
                value: "Skeleton"                }
            ], title: 'Which type of Undead?'
        };
let dialog = await warpgate.buttonDialog(buttonData);
console.log(dialog)
const [spawn] = await warpgate.spawn(dialog, {}, {}, {duplicates: 2});
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()

However if I remember right, this won't do 2 crosshairs

#

Time to consult the wiki

royal dragon
#

Wouldn't that one get you 4?

stuck eagle
#

Cool! @violet meadow almost got it working with me privately. I'm at a convention this weekend so I won't have a much chances until Monday to test it on my system. I guess I could give you coDM privileges in my game though.

vast bane
#

good catch

#

I'd have to drop a sequence

#

I genuinely don't know whats wrong here then but I am just noticing theres an animate dead in the wiki

#

(which is the bad midi srd macro)

#

how would I scale this:

Level:amount

3:2
4:4
5:6
7:8

#

I find this impossible to scale

scarlet gale
#

In a macro?

#

With a switch statement

vast bane
#

yeah its the upcast for animate dead

#

it would be a value I pop into duplicates

scarlet gale
#

Steal from that line

vast bane
#

the warpgate wiki uses this equation but that seems wrong to me:
const number = (level - 3)*2 + 1;

#

wouldn't that be 1 at level 3?

#

pemdas tells me that parenthesis are done before multiplication unless its different in JS?

royal dragon
#

Yeah, that's not right

dark canopy
#

i have no idea what spell you are reading 😅

dark canopy
#

At Higher Levels: When you cast this spell using a spell slot of 4th level or higher, you animate or reassert control over two additional Undead creatures for each slot above 3rd. Each of the creatures must come from a different corpse or pile of bones.

#

This spell creates an undead servant. Choose a pile of bones or a corpse of a Medium or Small humanoid within range. Your spell imbues the target with a foul mimicry of life, raising it as an undead

vast bane
#

oh shit

#

I blame this on wall of text spells

#

Thank you for catching that HB

dark canopy
#

smh 😴 lol

vast bane
#

and that means the wiki's equation would be easier to run

#

just define it and plop it into the duplicates

#

although
const level = await warpgate.dnd5e.rollItem(item);

is that a v10 useable line?

royal dragon
#

What does duplicates 1 do? Make one or make 1 duplicate meaning 2?

vast bane
#

can't we get the level from like @item.level since its an on use macro?

#

or @spellLevel

vast bane
#

but 2 got me 2 fwiw

royal dragon
#

If this is an ItemMacro just set it to run after the spell level has been determined already

vast bane
#

yeah running it after active effects to be safest

#

pretty sure item macro lets me use @spellLevel

royal dragon
#

const spellLevel = this.castData.castLevel;

vast bane
#

nope
const level = (@spellLevel - 3)*2 + 1; is no bueno

#

I will just copy the macro lol

#
const buttonData = {
    buttons: [{
        label: "Skeleton", 
        value: { 
            token: {
                name: "Skeleton",
                //img: 'assets/tokens/withka_skeleton.webp'
            },
            actor: {
                name: "Skeleton",
                //img: 'assets/tokens/withka_skeleton.webp', 
            }
        }
    },{
        label: "Zombie",
        value: {
            token: {
                name: "Zombie",
                //img: 'assets/tokens/vithka_zombie.webp',   
            },
            actor: {
                name: "Zombie",
                //img: 'assets/tokens/vithka_zombie.webp',     
            }

        }
   
    }]
}

const level = await warpgate.dnd5e.rollItem(item);
const number = (level - 3)*2 + 1;

for(let i = 0; i < number; i++){
   buttonData.title = `Animating which type? (${i+1} of ${number})`;
   const choice = await warpgate.buttonDialog(buttonData);
   if (choice === true) return;
   const [spawn] = await warpgate.spawn(choice.actor.name, choice); 
}
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()

This causes an endless loop, I think I am about to just call it and say fuck it to using animations on this spell.

#

actually its not my animation causing the endless loop, I guess the warpgate wiki animate dead is not midi friendly

royal dragon
#

Get the spell levl with the code I linked above. That's from midi

vast bane
#

got it

#

Animate Dead

Midiqol
DAE
Warpgate
Sequencer
Item Macro

const buttonData = {
    buttons: [{
        label: "Skeleton", 
        value: { 
            token: {
                name: "Skeleton",
                //img: 'assets/tokens/withka_skeleton.webp'
            },
            actor: {
                name: "Skeleton",
                //img: 'assets/tokens/withka_skeleton.webp', 
            }
        }
    },{
        label: "Zombie",
        value: {
            token: {
                name: "Zombie",
                //img: 'assets/tokens/vithka_zombie.webp',   
            },
            actor: {
                name: "Zombie",
                //img: 'assets/tokens/vithka_zombie.webp',     
            }

        }
   
    }]
}

const level = args[0].spellLevel;
const number = (level - 3)*2 + 1;

for(let i = 0; i < number; i++){
   buttonData.title = `Animating which type? (${i+1} of ${number})`;
   const choice = await warpgate.buttonDialog(buttonData);
   if (!choice) return;
   const [spawn] = await warpgate.spawn(choice.actor.name, choice); 
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
}
#

Args saved the day

royal dragon
#

But your loop seems off. I'm not sure what choice === true is supposed to be doing. You'll just exit the whole macro. Then you are redfining a const i times

vast bane
#

I think it works as a button macro but when its in a midi on use shit hits the fan

#

some of the warpgate wiki is meant to be a button macro

scarlet gale
#

I feel like it should be if (!choice) return

#

Since that means the dialog was closed without a selection

royal dragon
#

also spawn should not even be accessible outside of that loop

vast bane
#

yeah I'm seeing the weird shit now I dunno why its working fine now

royal dragon
#

Ahh, If you want the misty step put it inside the loop

scarlet gale
#

The real question is why you aren't just using Arbron's Summoning or something

vast bane
#

I have edited it now and it has animation and looks to be fine

vast bane
#

if I have to make it a macro anyway for animation, why bother with arbron summoning

scarlet gale
#

fair enough

vast bane
#

automated evocations is not to my liking either, it does both but its not one click like a macro is

scarlet gale
#

This is the one I personally use for my summons if it's not something Crimic already has

vast bane
#

Most of the time, summons are pretty simple

#

I can usually pull them off as 1-2 lines unless they are scaling off the summoner

#

1 warpgate line, 1 sequencer

royal dragon
#

I haven't tackled summons yet. My players haven't picked spells that require it yet

vast bane
royal dragon
#

Running Sandy Petersen's Mythos for 5e, so one of my players is the cat familiar of another wizard player. Yes that gets weird

vast bane
#

again, I dunno why, but my games take soooo long ot progress through an adventuring day

scarlet gale
#

That's a good thing.

#

I'd love a game with more RP

vast bane
#

yeah the players are loving it so it isn't a bad thing generally but my gosh they will be level 20's facing the 9th floor at this pace

scarlet gale
#

Bit surprised you aren't doing milestone for that module

#

Since you can pretty much tie it to the floor

royal dragon
#

I like Lovecraftian stuff, but a few of my players couldn't handle your character will either die or go insane and become the villain, so this is the next best thing

vast bane
#

even if I did milestone, theres 24 floors, and they started at level 7 cause I dragged out dragonheist 2 extra levels

#

I'm doing just creature exp, and then they get a bonus each long rest based on their faction level(aka points) with halaster(using companion)

#

the party gained 2 points on 2nd and 3rd floors, but then they pissed him off with their shennanigans in skullport so they are back to 1

#

Its fun, I have them complete tasks for a different simalcrum personality of him for each floor and I have fun rp'ing the different versions. 2 was a gameshow host with a suit and tie, 3 was a ravaged strungout angry damage dsimulacrum, and 4 is a Catholic Priest looking Simulacrum lol.

#

I rp'ed the damaged one like the guy from Its always sunny in philly lol

scarlet gale
vast bane
#

This is some top quality stuff, so good Its almost worth using even if you don't do homebrew lol

coarse mesa
scarlet gale
vast bane
#

Its sooo smooth

coarse mesa
#

It would be super easy to make it Anonymous friendly… idk about CUB tho

scarlet gale
#

I already did for Moto

vast bane
#

Yeah I have it say Target instead

#

I love the ping and the mouse over, it looks like professionally done video game quality lol

scarlet gale
#

This might actually reveal hidden tokens, depending if midi includes them in a findNearby

vast bane
#

I honestly would rule its possible

scarlet gale
#

yea same

#

But I mean like GM hidden, not just invisible

vast bane
#

when you cleave, your swing is going through someone so if that invisible creature is in the arc, sucks to be them

#

I bet you "NoTarget" would be safe from it

#

most of my gm hidden stuff that stays hidden is NoTarget

#

actually I can test NoTarget lol

scarlet gale
#

Depends on how it works

#

the targets are shoved in in item roll

vast bane
#

yep, NoTarget Race type is ignored by cleave

scarlet gale
#

interesting

vast bane
#

Its a midi thing I believe

scarlet gale
#

That would make sense

#

what about regularly hidden tokens?

vast bane
#

Midi tells all its stuff to ignore NoTarget in race/creature type

#

it does target GM hidden, and invisible

#

but thats not an issue for me

scarlet gale
#

yea same

vast bane
#

the only dude who sits hidden in a combat encounter is my avatar who is a NoTarget

scarlet gale
#

Oh well, GMs should know better then to have a hidden token in the middle of combat

vast bane
#

I only put him on the map as a token cause i have dotmm stuff that I fire off him occasionally

#

I learned to put NoTarget on him cause one time he got caught in a cone of cold

#

was when I was freshly v10, the target settings were fubarred and set to go through walls and the padding wall

coarse mesa
brittle grove
#

I require some help, whenever I activate MidiQOL I can't alter MaxHP

mellow lynx
#

I have successfully made it so that a TMFX macro applies to a target when hit, but how can I make the TMFX automatically clear upon another trigger such as being attacked?

vast bane
vast bane
#

if you want a custom filter for it, use mass edit to make a new filter and save it as a preset so its an option in macro.tokenmagic

dark canopy
vast bane
#

for us, in midi, Aid is handled by a premade that doesn't use an active effect, its a macro that actually mods the actual max hp instead of tempmax oddly enough.

#

the main reason why its a macro is because aid also heals for the same amount so its just easier to do both in a macro I think

#

also if its things like tough or draconic origin, its better done manually just cause its always on.

dark canopy
#

right, yea, the current HP makes sense -- just pointing out that it is a valid option in come cases to modify max HP with an AE

#

(but often leads to this "locked field" confusion)

vast bane
#

I had an effect macro made to adjust hp

#

On Creation

const {value, max} = actor.system.attributes.hp;
const v = Math.round(value * 1.4);
const t = Math.round(max * 0.4);
await actor.update({"system.attributes.hp": {value: v, tempmax: t}});

On Deletion:

const revertMax = actor.system.attributes.hp.max
await actor.update({"system.attributes.hp": {value: revertMax, tempmax: 0}});
molten solar
#

Oh no I was thinking of something different

dark canopy
#

im a bit behind the times i guess -- i'd listen to zhell....as I see them spamming PRs and fixes on dnd5e repo 😉

molten solar
#

You really don't want to touch hp for max if you like your hp level up automation

molten solar
#

And something was grammatically incorrect and

#

huh... an effect modifying system.attributes.hp.max just plain ol' does not work

#

it disables the input field, but does nothing more than that

vast bane
#

I don't really know why Aid targets the max field instead of tempmax, its probably really easy to fix though

broken leaf
#

Is the "Midi SRD" module obsolete in v10 now?

royal dragon
#

There is a fork by thelonelybugbear for it that I use

broken leaf
stoic seal
#

Is it possible for someone to pin the midi srd for v10?

royal dragon
#

Its a code repository term. Means you took the base version and are working on your own version of it.

coarse mesa
sand agate
#

Give me an actual post you want pinned, and I can pin it. 🙂

dark canopy
#

i dunno how good of an idea it is to pin an unpublished module 🤔

sand agate
#

That's what's being asked?

dark canopy
#

an unofficial fork of a published module

sand agate
#

yeahhhhhh

coarse mesa
sand agate
#

I think we'll wait for that to be merged.

coarse mesa
#

Hang on that needs more explanation lol

#

Well, it’s been around for months and referred to incessantly

dark canopy
#

and should be officially submitted or the project transferred

coarse mesa
#

It’s about as official as we’re gonna get until K comes back

#

We’ll have to ask @violet meadow about that – I think he’s been in touch with Kandashi over it

dark canopy
#

soon as we can point to a foundry package listing, it'll be pinned

coarse mesa
#

Fair enough, folk must be getting tired of explaining about it… especially Moto. Although it does give him something to keep himself busy with

dark canopy
#

not hard to correct it 🙂 I hope you understand why we would not want to push non-foundry approved packages 🙏

coarse mesa
#

Yeah sure, although we all know bugbears credentials by now

#

Anyway, Mr Primate and Kaelad got the reins for a couple of K’s modules so I’m sure it’s possible

sand agate
#

Getting through to the package repo is an extra step of vetting that grants us comfort in the promotion.

coarse mesa
#

If bugbear can pull that off most of the issues will dissipate anyway, so yeah best course of action. He’ll just need to bite that bullet

vast bane
#

Mr.Primate can solve this without any issues I feel

#

No need to ask bugbear or the mods here, Bugbear just needs to chat with Mr.Primate I think.

#

Also hes only working on it out of the kindness to the community, its really tedious to fix that module I think

#

I'm slowly digging into it to give him fixes but I'm no where near complete on it.

#

Midi SRD is pretty huge

#

@dark canopy Pretty sure Mr.Primate has a direct communication with Kandashi so he can get it squared away.

#

Per stuff said on another discord

dark canopy
#

ah, mmk, doesnt really matter who. 🙂

vast bane
#

I can't speak for bugbear but I imagine he probably wants to put more work into midi srd, theres still quite a few blatant dead items in it, we can edit the midi file, but the individual items are pretty much at issue at this point.

covert mason
#

I'm attempting to recreate some functionality of the Gryphon's Saddlebag's Alchemist's flamethrower by creating an ability for it that, when used, deletes a single alchemist's fire from its wielder's inventory, and gives the flamethrower 50 charges, up to its maximum charges of 100.

Does anyone know how that'd work, if there are any examples I can use, or if there's an easier way to achieve this?

vast bane
#

I have an on use macro that fills another items charges if you want that

vast bane
#
const otherItem = actor.items.getName("(Snack Buff)Wolf Spleen Turnover");
const {value, max} = otherItem.getRollData().item.uses;
const {total} = await item.rollFormula();
const toAdd = Math.ceil(total/5);
await otherItem.update({"data.uses": {value: value + toAdd}});

Prolly just need first and last lines.

#

I think that data is needed in this macro, someone will correct me I think, I don't see a compatibility warning with this macro

covert mason
#

I'd just need some code that deletes one of a specific item.

vast bane
#

make alchemist fire have charges and destroy on empty

#

then you can use the above on it

#

hell you might even be able to pull off guessing what quantity is on an item, my first guess would be data.quantity lol

#

but you could also find the data in the console

covert mason
vast bane
#

did you forget to change the name of the item you are defining?

#

it very definitely does for me

#

in the first line, you need to define the other items name

covert mason
#
const otherItem = actor.items.getName("Alchemist's Flamethrower");
const {value, max} = otherItem.getRollData().item.uses;
const {total} = await item.rollFormula();
const toAdd = 50;
await otherItem.update({"data.uses": {value: value + toAdd}});```
vast bane
#

pretty sure you want line 1 and 5, and in 5 you put the 50 where toAdd is

#

My item rolls and takes the roll and does math

#

if your item doesn't roll a d20 thats probably the fail

#

I don't think you need to define toAdd cause yours is just an integer, mine was a math function so it needed to be defined

#

expanded whatever I'm not a js pro

#

also you probably want this macro twice

vast bane
#

you could fiddle with shit and find out what quantity is and update that instead on the alchemist fire but I dunno if zzero quantity deletes the item.

#

if you set alchemist fire to destroy on empty, that should.

#

wait we need to define value

#

that one I'm not sure of

#

gonna need to phone a guru here cause you need value to be useable by both items

#

or define itemOneValue and itemTwoValue

#

their defintions will be that second line I think

#

only replace otherItem with their values

modern badger
#

can someone help me set up adamantine armor?

#

the critical flags don't seem to work

vast bane
modern badger
#

in the midiqol it says flags.midi-qol.fail.critical.all

#

but this applies to attackers

#

which would bog down the server too much

vast bane
covert mason
#
const itemOne = actor.items.getName("Alchemist's Flamethrower");
const itemTwo = actor.items.getName("Alchemist's Fire");
const valueOne = itemOne.getRollData().item.uses;
const valueTwo = itemTwo.getRollData().item.uses;
await itemOne.update({"system.uses": {value: valueOne + 50}});
await itemTwo.update({"system.uses": {value: valueTwo - 1}});```
![HyperThinkRotate](https://cdn.discordapp.com/emojis/451544818481365012.webp?size=128 "HyperThinkRotate")
modern badger
#

Isn't there a simpler 'doesn't receive crits' option?

vast bane
#

why does a flag bog down your server?

#

thats not how flags work

#

Adamantine armor prevents criticals from working against the wearer, that is what that specific flag does

#

do you mean an adamantine weapon?

vast bane
# modern badger Isn't there a simpler 'doesn't receive crits' option?

oooh I bet you this is probably your issue really:

Midi does not work with:

Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e

Advanced Spell Effects module is in beta in v10 and often the culprit of things...

modern badger
#

oh I thought it was like elemental adepts

#

giving an AE to targets every time

#

it works fine without adding unnecessary AEs uvu

#

thank

vast bane
#

nope its a flag you put on the armor and then it prevents all attackers from clickign crit, for non fast forward users, they can still hit crit so beware of that

modern badger
#

dang

#

I wonder if someone has coded the Drakewarden's Drake Companion

#

to like, pick the damage type from a query or something

vast bane
#

draconic spirit is, cause its a spell, but the drake warden companion rolls hit dice

#

its best made to be a player character and give it the same amount of ranger levels as the player has and just level it up that way

#

you can do a simple warpgate/sequencer macro to spawn it, but I wouldn't use the scaling stuff on him since hes permenant

#

well, semi permenant

modern badger
#

oh I don't mean

#

that

#

I mean automating what type of damage is chosen for it

#

or have like a macro that switches all of them

vast bane
#

make 5 attacks on one actor and then use warpgate to delete the other 4 but thats going to be a dialog that gives me nightmares just thinking about

#

(or just leave the attacks)

#

make its reaction be a mirror of like magic missile where it deals straight damage with an other type roll

#

it can't automate anyway cause its a third party reaction

modern badger
#

I'm wondering about a more manual solution .3.

#

like a 'switch to fire type' macro

scarlet gale
#

Can probably copy how chromatic orb works

vast bane
#

My draconic spirit doesn't get more janky manual than anything lol

scarlet gale
#

Dialogue box that has you pick the damage type

tall flume
#

in regards to foundry forcing us to make attack rolls before damage rolls.. is there other settings than just this one?

modern badger
#

the problem with that is that the damage type also influences the dragon's and its owner's damage resistance

scarlet gale
#

Would be easy to adjust for your needs

vast bane
#

also needs to apply shared resistance

#

I gave janner that macro a while back, shared it in a DM

covert mason
#

Still trying to figure it out

scarlet gale
#

It looks like your item uses might not be an integer

vast bane
#
if (class === barbarian)
let classHeal = (args[0]spellLevel)d12

is this right?

covert mason
scarlet gale
vast bane
# scarlet gale Right for what?

for syntax, I'm trying to automate the heal in Wither and Bloom ignroing the hit dice cost cause I'm ruling the spell not rules as written for our group

scarlet gale
#

It's likely solved with a toInt

vast bane
#

I'm gonna do an if statement for each class

#

so I can get the right size heal

covert mason
scarlet gale
#

You can get the hit dice size from the classes object

vast bane
#

actor.system.class?

scarlet gale
scarlet gale
vast bane
#

does alchemist fire have a quanity?

#

if the use fields are blank then its null aka nan

covert mason
#

It has a quantity of 3. 1 charge each. Destroy on empty

vast bane
#

then I think your issue is you are defining the wrong thing in line 3 and 4

scarlet gale
#

@vast bane you're likely wanting to combine strings

vast bane
#

instead log out those items and get the acual path to the item uses

scarlet gale
#

Should be like 'string' + 'd12'

vast bane
#

you need that console command to call an item in the sidebar by its name to get its data in console

vast bane
scarlet gale
#

Find the data you need from that output

modern badger
#

can someone remind me where to find presets for Active Token Effects? .3. I know there were more than a few MidiQOL compatible ones

vast bane
covert mason
# scarlet gale Roll the item once with '`console.log(this)` at the top of the macro
console.log(valueOne)
console.log(valueTwo)
const itemOne = actor.items.getName("Alchemist's Flamethrower");
const itemTwo = actor.items.getName("Alchemist's Fire");
const valueOne = itemOne.getRollData().item.uses;
const valueTwo = itemTwo.getRollData().item.uses;
await itemOne.update({"system.uses": {value: valueOne + 50}});
await itemTwo.update({"system.uses": {value: valueTwo - 1}});```
vast bane
#

if you mean just the keys, the light keys should all work with DAE auto complete

modern badger
#

so no light, just vision o3o

vast bane
scarlet gale
vast bane
scarlet gale
#

Yep

vast bane
#

how do I get the actors data, I tried _token and I'm lost

#

its not what I usually see

scarlet gale
#

Although you'll need to loop over their classes

vast bane
# modern badger *bookmarks*

max and kaelad gonna slap me cause they have an official one thats updated better but I never update my bookmark lol

modern badger
#

ATL.sight.visionMode.darkvision?

vast bane
#

if it auto completes, its a bad key

modern badger
#

:0

vast bane
#

till tim and kaelad get together and flesh out the new vision keys in dae

#

if you have adequate vision, I think you don't even need to use ATL keys, just add the trait

modern badger
#

there's ATL brightsight and dimsight :1

vast bane
#

ATL.sight.range
ATL.sight.visionMode

modern badger
#

okie

vast bane
#

its cause the keys changed, and ATE is kandashi's module, he is on hiatus so theres weird issues getting updates dealt with specially onesbetween authors

modern badger
#

it just

#

changed the token into a mystery man

#

and gave it the things but

vast bane
#

welcome to ATE's wildcard bug

modern badger
#

how do I not change the token into a mystery man

#

ohgod

vast bane
#

you need to not use wildcards sadly

#

kealad is working on a solution to this but till then, you have to live with it

modern badger
#

that is ass

#

goddamn

#

:c

vast bane
#

TVA makes it less painful

covert mason
modern badger
#

but isn't token variant art broken now?

vast bane
#

um, I doubt aedif's modules are broken, but I'm on a stable build so /shrug

#

dnd5e 2.1.x /shrug

modern badger
#

there's no way to have this work alongside TVA?

#

.3.

vast bane
#

once it mystery mans, just reset the image with TVA

#

TVA is the workaround for this, caus eyou should see all the images in TVA's button to reset it

#

(or use adequate vision but its not going to solve all the other ATL keys)

modern badger
#

I'm using perfect vis. I think

violet meadow
vast bane
#

faerie fire and enlarge/reduce is always going to mystery man your wildcard tokens, but kaelad is working on this, its very definitely on his radar

modern badger
#

and ye I can reset it using the TVA interface

vast bane
#

if you are on kandashi's server kaelad is working on figuring out the mystery man bug

#

soon™️

modern badger
#

that's fine I'll just remove the variants from my PCs

#

none of them are usin' em rn

vast bane
#

or just utilize TVA to manually fix shrugs, either works

modern badger
#

does it still mystery man if u don't have a wildcard set?

vast bane
#

I actually kinda wish that Aedif could make the default wildcard flagged in the list

#

I might feature request that

covert mason
#
const itemOne = actor.items.getName("Alchemist's Flamethrower");
const itemTwo = actor.items.getName("Alchemist's Fire");
const valueOne = itemOne.getRollData().item.uses;
console.log(valueOne)
const valueTwo = itemTwo.getRollData().item.uses;
console.log(valueTwo)
await itemOne.update({"system.uses": {value: valueOne + 50}});
await itemTwo.update({"system.uses": {value: valueTwo - 1}});```

Okay, looks like it's struggling to find the charges of the flamethrower?
vast bane
#

does the flamethrower have charges?

covert mason
#

Ah, nevermind.

violet meadow
covert mason
violet meadow
#

So newValue.value

vast bane
#

is this a dnd5e 2.1 thing, am I really gonna have to go through this malarky with my macro which he started with?

modern badger
#

:c

vast bane
#

the darkvision feature I shared to you is on an actor, so it clearly does not cause mystery man...in 2.0.3 dnd5e.

#

my guess would be that you updated the proto token, and the existing canvas token did not update, pro tip, use mass edit for stuf like this cause mass edit lets you update all tokens

#

or you edited the canvas actors token, and ATL is weird it yoinks the sidebar actors data I think

#

so drag out a new sidebar actor and test

#

(with the proto token adjusted)

covert mason
#

So I'd need something like this?

const itemOne = actor.items.getName("Alchemist's Flamethrower");
const itemTwo = actor.items.getName("Alchemist's Fire");
const {valueOne, max} = itemOne.getRollData().item.uses;
const {valueTwo, max} = itemTwo.getRollData().item.uses;
await itemOne.update({"system.uses": {value: valueOne + 50}});
await itemTwo.update({"system.uses": {value: valueTwo - 1}});```
modern badger
vast bane
#

I think you are doing that wrong

#

you are defining Value twice

covert mason
#

Aye, just trying to figure that out now

vast bane
#

You need 3 and 4 to be different slightly and then 5 and 6 need updated value's

#

I feel like getRollData is not something you need to use, if you just logged out the items, you should know the path to their item.uses

#

in the above snippet, what were the 3-4 arrows you expanded to get to value on each item

#

what really confuses the hell out of me is that MY macro uses data in line 6 instead of system, and I get no shim warning

covert mason
#

Okay, I think I'm making some progress.

const itemOne = actor.items.getName("Alchemist's Flamethrower");
const itemTwo = actor.items.getName("Alchemist's Fire");
await itemOne.update({"system.uses": {value: + 50, max: 100}});
await itemTwo.update({"system.uses": {value: - 1, max: 1}});```

This sets the flamethrower charges to 50 instead of *adding* 50.
It also sets the charges of the alchemist's fire to 0, but doesn't delete any when emptied. I might have to find the quantity data and modify that instead.
vast bane
#

pretty sure update is basically the same as override

covert mason
#

Damnit

vast bane
#

so if you don't have originalvalue+50 then it will just be 50 after that macro fires

#

and the alchemist fire works cause the field can't be negative so it turns to 0 and then destroys itself

#

I don't think you want to set a max for alchemist fire

#

You just want to decrement its uses

#

(same with the flamethrower)

covert mason
#

Yeah

vast bane
#

you also need to remedy going over the limit for the flamethrower

#

if he reloads at 75 charges does it become 125/100?

#

I dunno if it fixes itself in that case

covert mason
vast bane
#

I feel like you had the solution in that snippet above you just didn't use it

#

when you expanded to find the values in that snippet, the prior 2 expansions were the things that you should have put in place of getRollData

#

then you'd have the values defined

#

it could be as simple as itemOne.system.uses.value

#
const itemOneValue = itemOne.system.uses.value
#

then itemOneValue + 50

#

repeat for item two as well

#

it may even be itemOne.uses.value

#

you'd know if you went back into the console with that snippet above for sure

scarlet gale
covert mason
#
const itemOne = actor.items.getName("Alchemist's Flamethrower");
const itemTwo = actor.items.getName("Alchemist's Fire");
const itemOneValue = itemOne.system.uses.value
const itemTwoValue = itemTwo.system.quantity
await itemOne.update({"system.uses": {value: Math.min(100, itemOneValue + 50)}});
await itemTwo.update({"system.quantity": itemTwoValue - 1});```
Okay, I think I have quantity reduction working, and also it now *adds* 50 charges.
Only trouble is deleting the last Alchhemist's Fire when the quantity reaches 1, and limiting the maximum charges on the flamethrower to 100. Maybe adding an error and notification when there's no Alchemist's Fire to reload with, and when an Alchemist's Fire is put into the Flamethhrower.
covert mason
vast bane
#

Ok my turn!

const item = token.actor.items.getName("Wither and Bloom Heal")
const {castLevel} = effect.flags["midi-qol"].castData;
const actorHD = actor._classes.system.hitDice.???
const actorCon = actor.system.abilities.con.mod
if (castLevel > 1) {
    let newItem = duplicate(item.system)
    newItem.damage.parts[0][0] = `(${castLevel}-1)d${actorHD} + ${actorCon} + 5`
    await item.update({'system.damage.parts': newItem.damage.parts})
}

What should line 3 have at the end?

#

also does line 3 have a naughty underscore?

#

this is an effect macro, so actor is defined as the owner of the effect

#

I'd take this to macro polo but it has midiqol in it

#

even though I feel its not utilizing any of it at all

scarlet gale
#

Could you scroll down more on the classes output?

#

There should be a hit dice left variable

#

Also don't use _classes

#

There is a .classes further down, you'll need to expand it

#

Bit dated macro however. There are some parts I would do differently now

violet meadow
#

@covert mason Math.min(100, itemOneValue + 50) to cap it to 100

vast bane
# scarlet gale There should be a hit dice left variable

yeah macro polo just squared me away.

My last wither and bloom issue is I need to roll an item by its name as an on use macro and I'm afraid to ask macro polo due to the fact I know they've told me in the past but I can't find when I used it.

#

the macro on use would literally be

Find item
Use Item

#

but I also need it to have a pause so like....

wait 200 useitem
scarlet gale
#

I can throw together a wither and bloom macro tonight

vast bane
#

I'm actually 99.9% done

covert mason
vast bane
#

I actually got it working I just don't have the two parter combined into 1 roll

#

I have wither and bloom setup as a self buff to give the heal item, and an aoe damage as well. The heal I need to have auto roll when the damage rolls, but I don't know how to put an item roll in item macro

#

well, I know the janky way, by dragging it to the hotbar, but that implies that the actor is selected or the assigned actor, I want to prevent any hiccups by using the legit item roll syntax

scarlet gale
#

item.roll() ?

vast bane
#

would the name of the item be in the parenthesis?

scarlet gale
#

Nope

vast bane
#

also wasn't roll deprecated in v10 for use?

scarlet gale
#

actor.items.getName('Item Name').roll()

#

Not for this one

#

You can do item.use() they both do the same thing

vast bane
#

bugbear uses some nifty things where he changes the setting for an item, like foundry utils or something. Is there a way to make an item use late targeting?

scarlet gale
#

Copy what they do I suppose

#

I've never messed with late targeting

#

Just easier to pass the targets

vast bane
#

man this spell would be 10x easier if I rewrote it to be that the heal target is the origin and then I can just use findnearby

scarlet gale
#

Line 172

#

This is for wither and bloom right?

#

Doesn't it use the targets hit dice?

vast bane
#

yeah but my wither and bloom our table agreed needed to change, it no longer expends hit dice, its a damage and heal for just a spell slot

#

otherwise the spells kinda shitty

scarlet gale
#

@vast bane Loop over the classes object and count the hit dice available.

vast bane
#

nah I gave up, its getting a straight heal

#

I have 1 multiclass player

#

badger showed me the drawbacks of calling the classes hd

#

I also make the mistake of using effect macros actor when I need to use args

scarlet gale
#
let hitDice = {
    'd6': 0,
    'd8': 0,
    'd10': 0,
    'd12': 0
};
let classes = actor.classes;
for (let [key, value] of Object.entries(classes)) {
    hitDice[value.system.hitDice] += value.system.levels - value.system.hitDiceUsed;
}```
#

This will get you all object with all the available hit dice

vast bane
#

I think I'm just gonna rewrite it to be a heal that is (level - 1)d10 + (@details.level / 2)

#

I'm walkin away from this one, I thought I was so close only to have it fail at the finish line

scarlet gale
#

I have 90% of the work done for you ¯_(ツ)_/¯

vast bane
#

Just had a really cool rewrite idea for Wither and Bloom but its still to complicated lol. I was thinking have it deal damage in a template and then take half that damage and apply it as a heal to all allies in the template

royal dragon
#

How do I write a macro that shocks the player(not the character) the third time they cast silvery barbs in under 10 minutes?

scarlet gale
#

Could have it increment a resource then roll damage on the 3rd time

royal dragon
#

The logic is fine, just delivering the shock over the internet to his mouse isn't working out

#

I should have known it was going to be a problem when he asked if I had banned the spell

scarlet gale
vast bane
#
const item = token.actor.items.getName("Wither and Bloom Heal")
const {castLevel} = effect.flags["midi-qol"].castData;
if (castLevel > 1) {
    let newItem = duplicate(item.system)
    newItem.damage.parts[0][0] = `(${castLevel}-1)d10 + 10`
    await item.update({'system.damage.parts': newItem.damage.parts})
}

This macro is failing to update the item, and I suspect its because my world is laggy right now and the item is created seconds later.

#

I don't see a spelling error do you?

#

is it the [0][0] thing thats failing it?

scarlet gale
#

Formatting is hard to tell on mobile

#

But I think you're doing too much in one line

#

Duplicate it

#

Then edit the duplicated part

#

Missing a ; I think

vast bane
#

I honestly dont know why its not working it works for my others

scarlet gale
#

On the newItem line

vast bane
#

oh those actualy matter lol?

#

I thought that was just styling choices

scarlet gale
#

🤦‍♂️

vast bane
#

I pulled this from the original, which is a bugbear macro:

game.user.updateTokenTargets()
canvas.templates.placeables.at(-1)?.document.delete()
let i = 0;
while (!token.actor.items.getName("Call Lightning attack") && i < 3000) {
    console.log("Waiting for Call Lighting attack item to be created, if needed!")
    await warpgate.wait(250)
    i += 250
}
const item = token.actor.items.getName("Call Lightning attack")
const {castLevel} = effect.flags["midi-qol"].castData;
if (castLevel > 3) {
    let newItem = duplicate(item.system)
    newItem.damage.parts[0][0] = `${castLevel}d10`
    await item.update({'system.damage.parts': newItem.damage.parts})
}
#

and it seems to work with every other item I've done with this bottom half

scarlet gale
#

Hard to tell on mobile

#

It puts new lines in that spot

#

To me it looks like it should have a ; there

vast bane
#

can macro.whatevers in DAE have an extra argument for macropass?

#

even if they aren't item macros?

scarlet gale
#

No clue

#

What are you trying to do?

vast bane
#

could I add the extra argument of preitemroll after the uuid on a createitem?

#

I know you can add , permenant to them

scarlet gale
#

Are you trying to store the cast level to the item?

vast bane
#

I'm trying to diagnose why its not updating for this item and my server is soooo laggy right now that I think its the timing

#

the item always appears really late and reallly slowly

scarlet gale
#

You're missing a ; almost guaranteed

vast bane
#

my mistake was leaving in the const lines that were broken, it wouldn't finish the rest of the macro

#

God this has broken like 10 items now realizing this

#

I don't even know how to fix all this shit, this drives me nuts

#

The only one of these items that works now is this one:

let i = 0
while (!token.actor.items.getName("Scorching Rays") && i < 3000) {
    console.log("Waiting for Scorching Rays item to be created, if needed!")
    await warpgate.wait(250)
    i += 250
}
const item = token.actor.items.getName("Scorching Rays")
const {castLevel} = effect.flags["midi-qol"].castData;
if (castLevel > 2) await item.update({'system.uses.value':castLevel+1,'system.uses.max':castLevel+1,'system.uses.per':'charges'})
#

this ones waiting so thats what I think the problem is

scarlet gale
#

First line is missing a ; as well in the original post

#

Among other things

vast bane
#

so of the 30ish macro.createitems I have done, none of them upcast and i've never caught this problem, and my macro I based them all off of is the culprit.

#

the only one that properly upcasts is this one cause it waits

scarlet gale
#
const item = token.actor.items.getName("Wither and Bloom Heal");
const {castLevel} = effect.flags["midi-qol"].castData;
if (castLevel > 1) {
    let newItem = duplicate(item.system);
    newItem.damage.parts[0][0] = `(${castLevel}-1)d10 + 10`;
    await item.update({'system.damage.parts': newItem.damage.parts});
}
#

Try that

#

If this an effect macro?

vast bane
#

it is an effect macro, my problem is that its killed 30 items so I'm going back through, I have to add that wait function in too

scarlet gale
#

I'm not sure if the effect will have the castData flag

vast bane
#

oh duh, edited the compendium item not the actor

mellow lynx
vast bane
#

I'm pretty sure it requires mass edit installed to run, but I dunno if its included with Token Variant Art module or Mass edit module or both /shrug

#

this is the easiest way to make a custom tokenmagic FX

#

otherwise you are stuck with whatever macro.tokenmagic gives you

mellow lynx
#

So I have to install Mass Edit. Then I can make this macro and use it to create a new TMFX?

vast bane
#

yeah but the macros user interface is a lil wonky

#

its not exactly tooltip and help ready

mellow lynx
#

Then it's a good thing I'm doing this in my test world

vast bane
#

I think you change what you want and then check every box and hit apply changes, and then it asks you if you want to make a preset

#

I don't think you want to just check the changed lines, you want all lines when saving a preset

mellow lynx
#

I'm unsure how having the custom TMFX will help in having it turn off when attacked though

#

That was my original question

vast bane
#

they dont toggle

#

only macro.tokenmagic toggles

#

when you use macro.execute it just fires the macro and leaves it

#

and macro.tokenmagic only gives you the basic defaults for all the tmfx animations

#

I assume your macro was customized and not a default

#

All of my custom ones are at the bottom of this list, made with mass edit(the macro I just shared)

mellow lynx
#

fascinating

vast bane
# scarlet gale I'm not sure if the effect will have the castData flag

Taking your changes and adding in the wait time has solved it, but I have to go through 30ish items and fix them all blegh.

let i = 0
while (!token.actor.items.getName("Healing Spirit Heal") && i < 3000) {
    console.log("Waiting for Healing Spirit Heal item to be created, if needed!")
    await warpgate.wait(250)
    i += 250
}
const item = token.actor.items.getName("Healing Spirit Heal");
const {castLevel} = effect.flags["midi-qol"].castData;
if (castLevel > 3) {
    let newItem = duplicate(item.system);
    newItem.damage.parts[0][0] = `(${castLevel} - 1)d6`;
    await item.update({'system.damage.parts': newItem.damage.parts});
}
#

this is what I get for not testing upcasting

scarlet gale
#

I would just warpgate the feature when it needs upcasting. Waiting for an item to be created just to edit it after is a bit janky

#

Can just add the item with the upcast stuff pre-adjusted

vast bane
#

I work with what is shown to me, plus macro.createitem is something I can understand fully

#

besides, I'd have to go through all this process again just with another modules api, I'm already up the mountain might as well stick with it

subtle whale
#

Is there a neat way to at least have the on crit force save part work? I'm not too fussed on automating the banish part

scarlet gale
#

Doable with an on use macro for sure

#

Maybe with an activation condition, but I'm not as familiar with those

subtle whale
#

Yeah I tried fiddling with activation conditions but i'm not entirely familiar with how that works or macros tbh

scarlet gale
#

Quick and dirty way would be to make a feature with those effects

vast bane
#

how do you download json's from github, specifically I'm trying to reget potion of poison from your github Chris and everytime I save as, it gives me a json that isn't working with foundry import

#

guess I could copy the raw and save as a json

#

weird, worked when I manually copied the data

scarlet gale
#

Click raw, then save as

vast bane
#

heh, I just clicked raw, copied it all to np++ and saved it there

scarlet gale
#

Make sure your computer isn't accidentally making it a text file

vast bane
#

funny thing though, when I did that and imported, I then found MY copy of it lol

#

I forgot I named it Potion of Healing(Poison) like you did lol

#

so when I searched for Potion of Poison and never found it, yeah...

scarlet gale
#

10/10

#

I did it that way to make it easy to remove the end of the name

vast bane
#

I think I will call it Potion of Poison in the compendium for now on lol

#

or maybe I will remember this time

scarlet gale
#

I could make an item macro that swaps out the item on use

#

Would mean all you do is add the macro name to "convert" it

vast bane
#

Is there a way to make an overtime effect only remove itself after 3 successful saves?

scarlet gale
#

The overtime thing accepts using a macro

#

Never used it however

#

I really just figure out how to do custom monks token bar requests with a macro

frosty veldt
#

Hi All. I have a newbie question. How do I deal damage with damage type?
All I can find is this...but in a way it deals true damage
targetActor.update({"data.attributes.hp.value" : targetActor.data.data.attributes.hp.value - damageRoll.result})

indigo axle
#

question- about items .. i have a Dwarven Thrower .. ive had to make a a copy of it for the ranged portion of the weapon. that is working fine i can throw it at range and roll 2d8 for damage . what i am having trouble with is that agaisnt giants it is supposed to do 3d8 .. but that part is not working .. how do i get it to do that damage agaisnt a giant creature when thrown ?

frosty veldt
#

Basically when the target is giant it add more weapon damage to it

indigo axle
#

cool so the easiest way to solve this is with a custom macro added to the weapon ?

frosty veldt
#

yeah I think put it on "on use"

indigo axle
#

still learning here .. so bear with me .how would i assign it on use just add the macro name ?

frosty veldt
#

Oh I am also new so I will try my best to help

#

I assume you have item macro module?

indigo axle
#

yes

#

no idea how to make use of it i was just told to get it as part of the setup i did lol

frosty veldt
#

okay on the item, top left corner, there should be a "item macro" button. open it

#

get your macro code in it

#

then go to detail tab, at the bottom, there should be a "On use macro" , and a "+"

indigo axle
#

ok so i pasted the giant slayer macro in it

frosty veldt
#

then go to detail tab, at the bottom, there should be a "On use macro" , and a "+"

#

click the plus

#

there should be a input field and a drop down

indigo axle
#

yes

frosty veldt
#

in the input type "ItemMacro" this should link the macro to your item

spice kraken
#

That's too much work

#

Use an activation condition

frosty veldt
#

oh yeah I have heard of that but not an expert

indigo axle
#

in activation condition it has this ["giant"].includes("@raceOrType") && @item.attunement !== 1

spice kraken
#

Why add the attunement part?

indigo axle
#

cause the weapon needs to be attuned to a dwarf

spice kraken
#

Yeah, so just don't give it to non-dwarves or if they do have it, remove the extra fields

#

Cause even if they aren't dwarven, nothing is gonna stop them from attuning to it (mechanically speaking)

indigo axle
#

ok

#

so would i add the item macro in the activation condition? heh

spice kraken
#

Just ["giant"].includes("@raceOrType")

#

And put the extra damage in the other formula field

#

I changed the eagle to giant for this

indigo axle
#

ok made the modifications . testing now 😄

#

ok so when i used the other roll 3d8[bludgeoning] + @mod + 3 it rolled 8d8 instead of 3d8 lol

spice kraken
#

Show a picture of the details tab of the item

#

I'll check back in a few, walking my dog

indigo axle
spice kraken
#

Other formula adds to the regular formula

#

So remove the +@mod + 3

indigo axle
#

ahhh nice .. thank you

#

think im gonna head to bed it is after 3 am here . Ill be around with more questions soon . thank you again for your help

vast bane
keen remnant
#

Does anyone knows how to apply the cant regain HP for X time/ What Attribute Key that would be? (Making the Weapon of Certain Death Currently work properly)

tender radish
#

Hello does anyone know how would I go about using Effect Macro to automatically roll an item upon that item being created with Macro.createItem? Essentially Id like the macro to roll the item as soon as it is created in the actors inventor.

vast bane
vast bane
#

cause if it doesn't that shits messy

#

what are you trying to make gamewise before you go down a rabbithole that doesn't fit you

tender radish
vast bane
#

Isn't that a player choice feature?

#

the bard can give them it but they choose whether they want to move or not

#

you should be able to pull that off just fine it doesn't require targets

keen remnant
vast bane
#

damage immunity can probably be found by typing .di in dae

keen remnant
vast bane
#

value and then a drop down appears thanks to dae

keen remnant
#

neat

#

OH YEAH

#

tyy

vast bane
#

yw

vast bane
#

actually you don't even need to get the name

keen remnant
#

👍🏻

vast bane
keen remnant
#

not my 1st language gonna have to spellcheck 100 things anyways

vast bane
#

grievous

#

means very severe or serious

tender radish
vast bane
#

Chris gave me the syntax to roll an item like 8 hours ago in here but its hard to search his history cause he is 1 of 30 chris's on this server

vast bane
#

might be wise to just auto run it

#

let me see if I can dig up chris syntax to roll an item

#

I think its item.roll()

tender radish
vast bane
#

that should work in an effect macro cause actor is defined as the owner of the effect

#

you might have to put a delay in

#

Roll an item after macro.createitem.

let i = 0
while (!token.actor.items.getName("Item Name") && i < 3000) {
    console.log("Waiting for Item Name item to be created, if needed!")
    await warpgate.wait(250)
    i += 250
}
actor.items.getName('Item Name').roll()
#

obviously swap out the blue for what you need

#

but you should put a delay in cause the item doesn't always appear right away

#

just put the linked code at the bottom of this outside the curly bracket

#

I'll edit it hang on

#

god I'm kinda scared I'm starting to catch on with this js stuff

tender radish
vast bane
#

so does misty step?

tender radish
# vast bane so does misty step?

I guess? I never used Warpgate. So I can automate Misty Step with Warpgate aswell? Make it so the player can like teleport within the spell template or something?

molten solar
#

Yes

#

(also EM isn't a midi module (it's mine), questions about it don't need to go here)

molten solar
vast bane
#

only midi is a midi module

#

the rest are like everything else in foundry modules that work well together

violet meadow
#

@vast bane did you solve the issue you had? I saw quite a few messages but didn't go through 😄

vast bane
violet meadow
vast bane
#

yeah somehow I lost the first half of the macro when making everything

#

wither and bloom is a pain in the ass item to automate

kind cape
#

It does not look that complicated looking at the description 🤔

kind cape
vast bane
#

I actually had an epiphany with it, what if the item does the heal, and then you do a template drop that has to include the heal target almost like a crosshair

#

either that or a target prompt after the fact like chris cleave

timber horizon
#

For some reason, the "legendary resistance" from the MidiQoL sample items is not working for me. I'm on v.9 still. I've tested with a few failed saving throws and nothing. Is there another module it depends on? Not sure what's up

#

Or if it's possibly an issue with my Midi workflow settings?

worthy viper
#

@violet meadow you got time to help me build the feature we talked about with Build-a-Bonus?

vast bane
molten solar
worthy viper
coral dove
#

Still trying to work out the Elemental Bane active effect. I set up the dialog for the damage type and the hooks for resetting the "applied" flag after every turn. I made custom CEs for each dmg type but I have to link the correct ItemMacro on the onUpdateTarget flag

#

I'm getting this

#

Could anyone tell me what I'm missing?

full shale
#

Hello all. I'm having some trouble with ItemMacro and I hope someone here can point me in the right direction. I have an ItemMacro setup on an item, with an OnUse = "ItemMacro" in item details, but when the ItemMacro executes, it's not getting any arguments, args.length = 0. Does anyone know what might cause this?

bright portal
#

I'm having some issues with MidiQOL.
I'm running v10.286, I did an update to all modules and now I'm getting this with Midi. This was working before I updated Midi.

full shale
polar dew
#

Anybody recognise this style of attack roll? trying to figure out why it's showing as this for players

bright portal
#

I got it working. I had to grab an older package of MidiQOL.

tender radish
#

Hello, how would I go about setting up an effect that transfers on an activation of a primary item onto an actor and than applies a condition (through CE or otherwise) on that actors next spell/weapon attack hit? I know the same thing is possible with damage with the flags.midi-qol.optional.NAME.damage flags but how would I replicate this with another effect (a condition)?

frosty veldt
# vast bane use a midi workflow

Hi I think I am have something like
The purpose is for DM to make players damage themself.
`const damage = await new Roll('1d8').evaluate({ async: true })
let actor = canvas.tokens.controlled[0].actor
let token = canvas.tokens.controlled[0].token

let target = canvas.tokens.controlled[0];

console.log(canvas.tokens.controlled[0].actor.name)
new MidiQOL.DamageOnlyWorkflow(actor, token, damage.total, ['psychic'], [target], damage, {
flavor: canvas.tokens.controlled[0].actor.name,
});`
But it seems the damage is not being applied.
I think I messed up something at the target part?

molten solar
#

Do you know what canvas.tokens.controlled is...?

#

and what does "make someone damage themselves" mean

scarlet gale
# frosty veldt Hi I think I am have something like The purpose is for DM to make players damag...
let selfDamageFormula = '1d8[psychic]';
let selfDamageRoll = await new Roll(selfDamageFormula).roll({async: true});
selfDamageRoll.toMessage({
    rollMode: 'roll',
    speaker: {alias: name},
    flavor: this.item.name
});
await MidiQOL.applyTokenDamage(
    [
        {
            damage: selfDamageRoll.total,
            type: 'psychic',
            flavor: this.item.name
        }
    ],
    selfDamageRoll.total,
    new Set([this.token]),
    null,
    null
);```

Change the damage type as needed.
#

Assuming this is an on use macro on an item / spell / feature.

frosty veldt
#

Follow up question: Can the damage be directly inflicted by DM and not going through ItemMacro?

scarlet gale
#

Will need a small change, but yes

#
let selfDamageFormula = '1d8[psychic]';
let selfDamageRoll = await new Roll(selfDamageFormula).roll({async: true});
selfDamageRoll.toMessage({
    rollMode: 'roll',
    speaker: {alias: name},
    flavor: ''
});
await MidiQOL.applyTokenDamage(
    [
        {
            damage: selfDamageRoll.total,
            type: 'psychic',
            flavor: ''
        }
    ],
    selfDamageRoll.total,
    new Set([token]),
    null,
    null
);```
#

Pretty sure that should do it as a hotbar macro

#

You'll need to have a token selected for that to work

frosty veldt
#

oh this is elegant

violet meadow
#

(without the _)

scarlet gale
violet meadow
#

console?

frosty veldt
#

Without I think just selected can deal damage

dark canopy
#

_token is last selected token, which may not be what you want

violet meadow
#

I saw that you changed it and stroke through mine 😅

dark canopy
#

token is currently selected (in a macro)

frosty veldt
#

ohh I see

scarlet gale
#

there

frosty veldt
#

The entire purpose of this is so I can damage players when they deviate from a Geas spell

#

Yeah thanks everyone

violet meadow
#

If you use that as a GM you don't need to hoop through the MidiQOL sockets to execute this.

Only reason to do that is to have the Reverse Damage Card from Midi pop up.

Otherwise a "simple" ```js
await token.actor.applyDamage((await new Roll('1d8[psychic]').toMessage()).rolls[0].total)

scarlet gale
#

Asked in this thread, figured they wanted the damage card.

#

¯_(ツ)_/¯

frosty veldt
#

Yeah a damage card is always nice. Thanks everyone

violet meadow
tulip hound
scarlet gale
tulip hound
#

Where is that fork, also thanks for the quick response.

tulip hound
#

Thank you for maintaining this one @violet meadow

coarse mesa
#

@violet meadow did you see our convo yesterday about midi-SRD? We’re not allowed to pin your fork in here until you publish it officially 😅

violet meadow
#

Ah nope, I haven't followed this.

covert mason
#

The dislogue is only popping up for me, the GM, whenever a player uses it. I don't know why.

dark canopy
#

wild guess, "execute as GM"

covert mason
#

Either way it appears to only be showing up for the GM

scarlet gale
#

It should pop up for whoever made the attack

#

I'm not sure how it would be showing up on the GM side

#

Could you screenshot your configuration of the feature?

dark canopy
scarlet gale
#

uncheck the first box

dark canopy
#

rarrrrrrrrrr

covert mason
#

Still showing up only for the GM

#

Maybe I need to restart the server

#

No errors in the console

scarlet gale
#

double check that the chexbox is actually staying unchecked

tender radish
#

Hello, is there a way to edit/fix the Misty Step Warpgate macro to only cast once upon activation? I know the repeated castings are caused by the incompatibility with Midi so that's why I am asking here.

scarlet gale
dark canopy
tender radish
tender radish
dark canopy
#

i dont write macros for midi, so you always have to translate

scarlet gale
#

Uses the usual midi stuff.

tender radish
scarlet gale
#

Like using old methods for doing things? Or just not updated to v10?

#

Because all the ddb spell macros should be v10 versions.

tender radish
scarlet gale
scarlet gale
#

Should probably be submit as a bug on the ddb importer Discord.

#

It'll still work, even if it says deprecated for what it's worth.

#

Configuration for the item macro for Wither and Bloom.

covert mason
scarlet gale
#

I'm honestly not sure how it's even showing up on the GM side. The workflow is all ran on the client.

#

If the GM is somehow running the macro, it should just have errors.

#

Unless you have another module that moves all rolls to be started by the GM.

#

If such a thing even exists.

covert mason
#

Imma Find-The-Culprit

vast bane
scarlet gale
#

We figured out the issue, Janner was running a very old version of my script.

coarse mesa
scarlet gale
#

Like a visual space?

coarse mesa
#

Yeah very minor detail 🤏 Just next time you’re updating maybe

scarlet gale
#

Oh sure

coarse mesa
#

Cool to see that getting some more uses ☺️

scarlet gale
#

That's the good thing about having it as a pretty standardized function

#

Can use it everywhere

tropic vine
#

So, I'd like to create a macro that automates a second strike when a weapon hits. So far, I have:

let hitTargets = args[0].hitTargets;

// if there are no targets, exit
if (!hitTargets.length) {
    return;
} else {
    const options = { showFullCard: true, createWorkflow: true, versatile: false, configureDialog: false };
    await MidiQOL.completeItemRoll(item, options);
}

Where would I add the counter so it works? Can I just add let counter = 0 at the beginning and counter = counter+1 in the loop and check for that?
Just thought about it and I can't use that as the initialization of the counter needs to be outside of the loop and then added to within the loop and checked before the loop.

scarlet gale
#

Then depending what value the flag reset it or do another attack

tropic vine
violet meadow
# tropic vine Haven't worked with flags before. Do you have a link to a quick info dump on how...

Untested ```js
// get the targets that were hit
const {itemId, hitTargets} = args[0] ?? {};
const item = args[0].actor.items.get(itemId);
// if there are no targets, exit
if (!hitTargets.length) {
return await item.unsetFlag("midi-qol","attacks-counter");
} else {
Hooks.once("midi-qol.RollComplete", async (workflow) => {
const counter = item.getFlag("midi-qol","attacks-counter");
if (!counter) {
await item.setFlag("midi-qol","attacks-counter",1);
const options = {showFullCard: true, createWorkflow: true, versatile: false, configureDialog: false};
//await MidiQOL.completeItemRoll(item, options);
await MidiQOL.completeItemUse(item, {}, options); //start using this one instead of the previous one, where the second argument inside the {} are the item.use() config ones.
}
else return await item.unsetFlag("midi-qol","attacks-counter");
});
}

wind pecan
#

Hey All - I'm fumbling about (admittedly) with creating a few macros. They are small and not overly complicated. I've lifted bits and pieces from here and there to serve my purposes. My current foe is this: a dialog box that displays when the item (a spell) is cast. The button is clicked, and on a fail the dialog box closes and the chat message is displayed. However on a success, the dialog box closes, the chat displays, then the dialog box re-opens. If I click the button a 2nd time a 2nd skill roll happens, and then the item card displays (spell is cast). I seem to be missing something to close the loop? Here is the macro:

#
    title: "Psionics Focus Check",
  content: "To use this ability you must succeed on a DC 15 Focus Check",
  label: "Roll Focus Check",
  callback: () => ChatMessage.create({content: `${token.actor.name} focuses on her inner Well and spawns a psychogenic effect!`})
});
const {total} = await actor.rollSkill("cus_0") ?? {};
if(total < 15) return ChatMessage.create({content: `${token.actor.name} tries to focus on her inner Well, but is too distracted.`});
await item.use();```
violet meadow
wind pecan
violet meadow
#

So Item onUse macro. You want the item to be rolled only of the skill check is successful?

#

Otherwise abort?

wind pecan
#

correct

violet meadow
#

ItemMacro | Called before the item is rolled. ```js

const results = await Dialog.prompt({
title: "Psionics Focus Check",
content: "To use this ability you must succeed on a DC 15 Focus Check",
label: "Roll Focus Check",
callback: () => ChatMessage.create({content: ${token.actor.name} focuses on her inner Well and spawns a psychogenic effect!})
});
const {total} = await actor.rollSkill("cus_0") ?? {};
if(total < 15) {
await ChatMessage.create({content: ${token.actor.name} tries to focus on her inner Well, but is too distracted.});
return false;
}

#

If you return false it will stop the Item from rolling.

#

Otherwise continue the MidiQOL workflow

#

You were using the item and when the skill was successful you were re-rolling it once more

#

or more... as this would be going on forever 😄

wind pecan
#

I see, so the return false is what I was missing. so I should put the macro itself as an item macro then point midi to that, instead of having it be a separate macro and call it by the name of the macro.

violet meadow
#

Can do both

#

Whatever is more convenient for you.
I tend to "store" Item specific macros as ItemMacros on said Item

wind pecan
#

Thank you! I was scratching my head and decided to just ask for help instead of fiddling about. If I want multiple items to use the same macro then just calling the name of the macro and having it be external to the item is ok?

violet meadow
#

Would be fine yes!

#

Though now that I re-read it, what do you want the result of the Dialog Prompt do?

wind pecan
#

The cast the spell - the dialog prompt displays (forces them to make a skill check) if the skill check fails, they get a chat message and nothing happens, if the skill check succeedsm they get a different chat message and the spell casts as normal

#

sort of like a successful proficiency check to be able to activate/engage the spell

#

I'm introducing Psionics into my homebrew

violet meadow
#
const results = await Dialog.prompt({
    title: "Psionics Focus Check",
    content: "To use this ability you must succeed on a DC 15 Focus Check",
    label: "Roll Focus Check",
    rejectClose: false,
    callback: async () => {
        await ChatMessage.create({content: `${token.actor.name} focuses on her inner Well and spawns a psychogenic effect!`})
        const {total} = await token.actor.rollSkill("cus_0") ?? {};
        if(total < 15) {
            await ChatMessage.create({content: `${token.actor.name} tries to focus on her inner Well, but is too distracted.`});
            return false;
        }
        else return true;
    }
});
if (!results) return false;
else return true;
#

If you reject the Dialog it should stop the item from rolling correct?

wind pecan
#

Uhm yes, if they just close the box

#

I hadn't thought about that actually happening

violet meadow
#

Should be ok now

wind pecan
#

people click anything clickable though

#

...sigh

violet meadow
#

the power of buttons!

wind pecan
#

Oh hmm, it didn't like something in there

#

haha i left in an extra letter c at the beginning

#

Ctrl_a I said!

violet meadow
#

A small edit. It should be fine too now, with everything in the callback.

wind pecan
#

I caught that. It seems to do everything (rolls dice, closes dialog box) but the item card doesn't get called on a success.. let me make sure I have your recent edit in there (Thank you so much for your time on this by the way!)

violet meadow
#

By Item card, you mean the Item's description that is about to be rolled?

wind pecan
#

correct. Looks like an uncaught referenceerror

violet meadow
#

oh ffs

#

typo if (!results) return false;

wind pecan
#

haha

#

It's super close (ok this isn't as simple as I thought so I'm not beating myself up so hard now)

violet meadow
#

Not easy to change it .

#

deleted

wind pecan
#

Oh that's fine about the message - I cna live with that. the spell still isn't casting though weirdle enough (on a success)

#

lemme try that

violet meadow
#

wrong hook

wind pecan
#

haha k np

#

yeah.. hmm. maybe I have something else going on. dialog box seems to be working, blue ui banner gone, but the spell still doesn't cast on a success

violet meadow
#

Yeah I just tried it too.

#

Oh well

wind pecan
#

Well I appreciate the attempt for sure! I'm closer than I was anyway 🙂

violet meadow
#

Yeah it's something small now, but too tired too see it.
Probably when the midi pre item roll hook and the dnd5e.preItemUse hook are getting called

errant cargo
#

Anybody else experienced lag at MidiQOL at calculating if an attack roll hit, rolling the damage and applying it? I find myself sometimes waiting after making the roll for the module to actually do anything at all

violet meadow
errant cargo
#

Oh, that's very likely

#

Honestly I just installed the module and I'm very lost haha

#

Quick settings doin' numbers tho

violet meadow
#

I misread your comment!!! 😭 💤

lost orbit
#

hey guys, i'm being unable to cast ice knife with an item macro that came with it

const tokenOrActor = await fromUuid(lastArg.actorUuid);```

these are the first two lines of the script, and the console is saying 
```Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'actorUuid')
[Detected 1 package: itemacro]```

The Midi Qol Fields section of the spell came pre-defined as this:
#

any hints? I never wrote any script in foundry so I'm not sure where to begin, but I am a programmer. How is lastArg supposed to be initialized?

violet meadow
violet meadow
lost orbit
violet meadow
#

What's the macro?

wind pecan
# violet meadow Can you copy paste once more? Might have changed something in between. Works for...
    title: "Psionics Focus Check",
    content: "To use this ability you must succeed on a DC 15 Focus Check",
    label: "Roll Focus Check",
    rejectClose: false,
    callback: async () => {
        await ChatMessage.create({content: `${token.actor.name} focuses on her inner Well and spawns a psychogenic effect!`})
        const {total} = await token.actor.rollSkill("cus_0") ?? {};
        if(total < 15) {
            await ChatMessage.create({content: `${token.actor.name} tries to focus on her inner Well, but is too distracted.`});
            Hooks.once("dnd5e.preUseItem", () => { return false });
        }
    }
});
if (!results) Hooks.once("dnd5e.preUseItem", () => { return false });```
lost orbit
# violet meadow What's the macro?
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";
  areaSpellData.system.target.value = 99;
  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.");
}```
violet meadow
wind pecan
lost orbit
#

yeah, sticking the macro into a temp effect did allow me to cast the spell, just didn't allow for the handling of the ice shard explosion part

#

i think it just ignored the macro entirely

violet meadow
#

Check your ItemMacro module settings

#

This should be OFF

lost orbit
#

oh

#

that was on

#

i'll see if that fixes it

edgy trellis
#

I am also trying to automate booming blade but seem to be stuck. What/where is the DDB script that you linked supposed to go?

wind pecan
#

checked the box and it works fine now

violet meadow
wind pecan
lost orbit
wind pecan
#

its working perfectly now - it does spam the chat with 3 different chat messages but its working great

violet meadow
#

You can create just one message saying YAY or NAY but 😅

coarse mesa
lost orbit
#

i don't see documentation on the itemmacro repo, nor am i able to find more info on that character sheek hook option.. are you able to give me a rundown on why that actually fixed it? i'd like to understand as I'm dipping my toes into scripting here

violet meadow
#

And I would make sure to read the MidiQOL readme at least once 😅

lost orbit
#

hahaha right, thanks so much!

coarse mesa
violet meadow
#

nope, master is still v9

coarse mesa
#

Is that deliberate do you think?

violet meadow
#

Yes, cause it would change the Git structure afaik

coarse mesa
#

Ok sweet. We’re almost at v11 👀

violet meadow
#

Up until v9 is no longer maintained at least, I wouldn't expect this to change 🤷

lost orbit
#

is there a way to get intelisense capabilities while writing midi qol macros?

coarse mesa
violet meadow
#

Maybe an issue would make sense to see what could be done

mighty pier
#

I'll ask a question that has been bothering me for a very long time: how to make two versions of the effect on one weapon? Honestly, I'm not sure exactly where to ask this, so let's try our luck here first.
What do I mean in general: let's take the good old Flame tongue, it damage like a regular sword, but if you switch the mode, it will cause different damage, I would do something similar through the effect, or I would create a second item with the name of type "Flame tongue - activated", which would already deal (regular sword damage)+2d6 fire damage, however, honestly, this clogs up the inventory a lot, considering that I give items to players more than once a year. How to make two weapon modes in one item?

scarlet gale
#

There are a few ways.

mighty pier
#

dnd 5e, foundry v9, as always, just in case if it's important

scarlet gale
#

Activation condition tied to having an effect would be one route

mighty pier
mighty pier
#

Oh, the activation condition, I understand. I never understood this thing, not even examples of items from MidiQoL

scarlet gale
#

Could set it to look for a specific effect to get the additional damage

mighty pier
scarlet gale
#

Then just have a feature that toggles the effect on and off

#

Something along the lines of "effects.find(ef=>ef.data.label === "Flame Tongue")"

#

Untested, I don't personally use activation conditions much.

coarse mesa
#

The most basic option would be to put the alternative damage in the Versatile or Other field

scarlet gale
#

That would work too

#

Hold shift when making the attack

#

For the bonus damage

mighty pier
#

I don't really understand how to make the alt damage roll if the condition is met. I see the line "Roll Other Damage has 3 options" in the document. As I understand it, this should be switched not in the subject, but in the module settings?

#

Found it

#

Okay, let's say I started to understand how to work with alt damage. Now, if the condition is met, both normal and alt damage are rolled. Is there a way to do that only the alternative is rolled if the condition is met?

violet meadow
#

Nope, not without a macro

violet meadow
violet meadow
#

@robust vault Great Weapon Master Toggle with a twist.

Instead of a static -5/+10, you can pick the boni you want, up to the character's proficiency bonus.

Set up as an ItemMacro | Called before the item is rolled on a feature called Great Weapon Master, targeting Self.

#

THIS ONE HAS A BUG. PLEASE CHANGE LINE

if (!args[0].item.system.properties.hvy || args[0].item.system.actionType !== "mwak" || !args[0].item.system.proficient) return;
``` to ```js
if (!args[0].item.system.properties?.hvy || args[0].item.system.actionType !== "mwak" || !args[0].item.system.proficient) return;

**PLS CHECK AND CHANGE THIS LINE 👆 in 👇 **

#

Use once to activate. Use once more to deactivate

#

It will apply only to heavy and mwak

robust vault
#

Nice, i will test this afternoon

violet meadow
#

(forgot a console.log in there)

#

Ah the character needs to be proficient too. Well the full check should be ```js
if (!args[0].item.system.properties?.hvy || args[0].item.system.actionType !== "mwak" || !args[0].item.system.proficient) return;

`if(args[0].macroPass === "preAttackRoll")`
`if(args[0].tag=== "DamageBonus")`
violet meadow
#

@next sun The Life Syphon
(Life Syphon) - If a creature attacks and causes damage to you this feature activates. [Causes 2d4+2 Magical Damage to the creature at the end of your turn as long as they are within 15 feet of you for 1 minute. Your character regains 1/2 of the damage in HP].
Set up as a Reaction Damaged feature with an ItemMacro | After Active Effects on the reaction Item, targeting Self and an ItemMacro ```js
const effectData = {
changes: [
{key: "flags.midi-qol.OverTime", mode: CONST.ACTIVE_EFFECT_MODES.OVERRIDE, value: "turn=end, macro=Life Syphon Macro"}],
duration: {startTime: game.time.worldTime, seconds:60},
flags: {
core:{statusId: "Life Syphon"},
world:{targetSyphon: this.workflowOptions.sourceActorUuid},
},
icon: "icons/magic/fire/barrier-wall-flame-ring-yellow.webp",
label: "Life Syphon"
}
await args[0].actor.createEmbeddedDocuments("ActiveEffect", [effectData]);

#

Then create a Script Macro in your macro folder named Life Syphon Macro and copy paste this ```js
const targetUuid = args[0].actor.effects.find(e => e.getFlag("core","statusId") === "Life Syphon").flags.world.targetSyphon;
const targetToken = fromUuidSync(targetUuid)?.token ? fromUuidSync(targetUuid).token : fromUuidSync(targetUuid)?.getActiveTokens()[0] ? fromUuidSync(targetUuid).getActiveTokens()[0] : fromUuidSync(targetUuid);
const sourceToken = args[0].actor.getActiveTokens()[0] ?? args[0].actor.token;
const distance = MidiQOL.getDistance(targetToken,sourceToken, {}, true);
if (distance <= 15) {
const damageRoll = await new Roll("2d4+2").evaluate();
await game.dice3d?.showForRoll(damageRoll,game.user,true);
const total = damageRoll.total;
const halfTotal = Math.floor(total/2);
await MidiQOL.applyTokenDamage([{damage: total, type: "none"}], total, new Set([targetToken]), args[0].item, new Set(), {forceApply:false});
await MidiQOL.applyTokenDamage([{damage: halfTotal, type: "healing"}], halfTotal, new Set([sourceToken]), args[0].item, new Set(), {forceApply: false});
}

violet meadow
#

Put up a Sequencer effect linking the 2 tokens and you're golden 😄

lost estuary
#

I am trying to get a weapon to do extra damage and roll with advantage against certain creature types, but it is not working for me. Any thoughts as to what i have done wrong here?

Here is the details and effects Pane:

#

looking to do the 1d10 force to those creature types specifically.

violet meadow
#

The other way around as per the MidiQOL readme. ['fiend', 'undead'].includes('@raceOrType')

lost estuary
#

Ah, i pulled straight from the MidiSample dragonslayer and it had it backwards then!

#

thanks

violet meadow
#

For 1 type of creature its fine. But for multiple it's not

lost estuary
#

and square brackets instead of the ()?

violet meadow
#

yes

lost estuary
#

the advantage is happening regardless of race or type still, though the damage is working.

violet meadow
#

Match the [ with ] not )

lost estuary
#

im missing a ( around race or type i think. So this:
["celestial","fey","monstrosity").includes('@raceOrType')]

#

actually this if im reading the readmy correctly:
["celestial","fey","monstrosity"].includes('@raceOrType')

#

Thanks!

indigo axle
#

Question - Why would midi be rolling the tother dice twice ?

violet meadow
# indigo axle Question - Why would midi be rolling the tother dice twice ?

A screenshot might be helpful.

If you don't have multiple rolling modules enabled, some sort of macro being applied twice might be the case.

If you are on DAE > 10.0.15, there is a bug that applies effects twice. So check if the actor has the same, maybe damageBonusMacro or other bonus effect twice

indigo axle
#

This is the weapon i am using only rolling mod i have is dice so nice... also have dice tray but disabled dice tray as a test and it still double rolls.

#

i currently have no macro attached to the weapon

keen remnant
#

Soo, to look into the rabbithole that is the janky spiritual guardian and all the aura type spells how do you use / fix them?

as for now i see two problems with them

1: The Spell if cast on the caster during AOE Placement also harms it and allies.
2: The Spell does not "Persist" and does not force new saves being made during the following turns and would need to be recast, jumping back to problemo 1.

So how did yall do it, because i do not fancy fixing all allies HP each turn for 100 Possible turns xD

#

Sleep also acts in sense of damage over status effects but i think i can do that fix myself.

raven delta
#

Is there a good way to quickly add an "in cover" status to tokens that works with the MidiQOL ecosystem?

keen remnant
#

They are working, just need to hand it out manually.

dark canopy
#

simbuls' cover calc would be my recommendation

#

midi integrates with it directly

scarlet gale
#

(As well as levels auto cover)

violet meadow
violet meadow
#

How does the chat Damage Card look like?
And do you roll the Other Formula via a shortcut keybind maybe?

#

When I said roller modules, I meant Better Rolls, Ready Set Roll and the likes

violet meadow
indigo axle
#

@violet meadow I roll it from the dialog dropdown when it comes up here is the most recent cards

dark canopy
#

(plus, simbul's is implemented RAW 😉 )

violet meadow
keen remnant
violet meadow
#

It should be working fine. Might have an issue with DAE version right now, but 🤷

#

What's your MidiQOL version, system etc?

indigo axle
#

@violet meadow

violet meadow
#

Just click Damage

#

What does it do?

indigo axle
#

no rolls just that output when i click the damage button

vast bane
# indigo axle

you likely have a bad character in your damage formula, if you can't find it share the details tab of the item

violet meadow
indigo axle
violet meadow
#

It seems to change the basic damage formula to the Other Formula one

vast bane
#

lots of wrong in that item details

violet meadow
#

I would recreate the Item. Is this a DDB import?

indigo axle
#

most of it was done with ddb importer

#

yes

vast bane
#

the bludgeoning in the damage formula is redundant(its required in the versatyle and other formulas)
and [additional] is naughty