#MidiQOL

1 messages · Page 82 of 1

violet meadow
#

then it would do through the tokens based on distance and ask for who wants to make a countespell attempt

short aurora
#

that sounds lovely to code

quiet solar
#

Is there a way to access the usage configuration dialog (eg for a wand) programmatically? or is this outside the scope of midi-qol?
args[0].macroPass = 'preItemRoll' and I have an args[0].workflow.displayId but I'm not seeing anything else related to the dialog window

hot flower
#

thanks, @violet meadow ... i'll see if i can't flesh that out, thank you.

violet meadow
#

oh that data shows its age

short aurora
quiet solar
violet meadow
#

That sounds like extending an application

broken wolf
#

how would i input this variation of multiattack for summon spirit?

The spirit makes a number of attacks equal to half this spell’s level (rounded down).

violet meadow
#

when you create the Spirit, update the Multiattack description to the correct number of attacks

broken wolf
quiet solar
violet meadow
broken wolf
#

i used Arbrons module

short aurora
#

Kinda depends if it's just 1 wand or all wands

violet meadow
quiet solar
quiet solar
violet meadow
#

or an amalgam of options to make sure that no spell slots/etc are consumed

#

I have it on a Staff of striking I shared. let me check

short aurora
#

I'd defo do the example bugbear posted 'lest you want to change all wands

pine maple
#

Working on a macro, but I can't get it to work for both NPCs and PCs.

The macro is a simple one that deals damage to the PC, intended for use at end of turn. This part works.

When I put it on an NPC though, it stops working, as the actor is undefined. I found out that this is because the method I'm using to get the actor returns a TokenDocument5e rather than an Actor5e.

How would I go about making sure I'm using the correct class here? I can't seem to check the type to confirm which one, but I'm not familiar with JS like I am with CS so I'm not sure how to check.

Current version for reference:

if (args[0] === "each") {
  const effectActor = GetActor(fromUuidSync(args.at(-1).actorUuid));
  
// . . . Do stuff with actor
}

function GetActor(actor)
{
  if ("actorData" in actor) // Current iteration is trying to check if the variable actorData exists, to no avail.
  {
    return actor.actorData; 
  }
  else
  {
    return actor;
  }
}

quiet solar
tepid dock
#

One last question... the setup as you have above, does it still allow the owner of the feature to self cast the reaction on themselves?

dark canopy
violet meadow
#

Or if the source has it the reaction already on

violet meadow
tepid dock
#

In my example the feature is a paladin casting a shield on anyone they can see that takes damage. As that reaction, they can give them totally immunity to everything for a round, but renders the paladin inert until their following round.

pine maple
dark canopy
#

for reference

#

things like const value = token?.actor?.getFlag('core', 'name') ?? 'default name' can make for really safe code

#

"if there is no token, or no token.actor or an undefined flag, use my default"

vast bane
#

I don't automate counterspell at all because that is the one reaction NOBODY forgets about when I so much as speak the word spell and its too hard to automate anyway.

#

There is a bug with the active aura janky reaction that I don't think Mr.Primate has fixed yet, you can't stop the source actor from benefitting from the reaction also and getting the item. I posted it to him and he never got back to me on it in kandashi's discord

#

this matters in the case of a third party reaction like the Steel Defender as he can't disadvantage an attack against himself

#

same with one of the fighting style reactions

#

I just use an effect macro of every turn to delete the reaction item on the source actor

#

on turn start cause thats when the reaction comes back and the aura reactivates

violet meadow
#

Ah nvm me wrong thing in mind

short aurora
#

@dull heath I created the macro in my bar and referenced it as an on use macro in the item. Ignore literally everything else on the item except Activation Cost, you need one to have this field pop out. I just re-used an existing feature

#

You mentioned an effect; if you have an effect launching the macro, it will launch on both application and un...application... there's a real word for that somewhere... unless you edit the macro to check for that.

short aurora
#

The check iiiis js if (args[0] == "on") { /* do the thing in here */ }

vast bane
tepid dock
#

Hey I assume I give 1 actor both of these features? Because I am testing it, and it doesn't fire a reaction pop up.

vast bane
#

thats the part in his post that is more implied than explained

#

you drag the first item that is a reaction into the effect value of the active aura so that it gives the item to everyone in range

violet meadow
dull heath
vast bane
#

however for counterspell I would just give every player the counterspell feature reaction and to not bother with an active aura at all

dull heath
#

I got another question, not sure it's better posed here or in #macro-polo; is it possible to make the user use up 15 ft. of movement as part of this feature?

short aurora
#

DnD5e doesn't really track movement, so it depends on what module you got with that

#

It's just a number to reference

dull heath
#

ahhh, gotcha

vast bane
#

I really don't think you need to do this with counterspell, its the one reaction that the WHOLE party never forgets cause nobody likes being targeted by spells and everyone constantly begs the counterspeller to counterspell in my table.

tepid dock
vast bane
#

personally I feel the janky third party reaction active aura is best used not for its janky automation, but for its ability to prompt/remind the party the reaction exists

#

and in the case of counterspell I personally think that makes it pointless since nobody forgets about that reaction

#

Its great on the fighting style reactions and its great on protective bond from peace cleric

short aurora
tepid dock
# violet meadow 🤷

This look right?

const actorUuid = "ACIEwW6fJuDaoDnL" //put here the Steel Defender's token.document.uuid
const effect = duplicate(game.dfreds.effects._reaction)
await MidiQOL.socket().executeAsGM("createEffects", {actorUuid, effects:[effect]});```
violet meadow
#

actorUuid shoud be something for this particulat case, 'Scene.2mTNdZV2chwguKLn.Token.vzP1TTSVTsWvlRrw'

#

select the token you want, open console, type _token.document.uuid

#

paste that in there

vast bane
#

isn't it also right click the button on the top bar instead of left click?

tepid dock
#

So will this change for every scene and combat encounter?

violet meadow
#

test it for now

#

you can populate that automatically via the macro

#

it's just to make it work

short aurora
#

Right click for uuid, left click for id

violet meadow
#

but make sure that you don;t have multiple Linked tokens of the same actor on the same scene

vast bane
violet meadow
#

or dont. it will just place it on all anyways

vast bane
#

its in our contract

tepid dock
vast bane
#

nope you want that

#

you want them getting that effect

#

oh wait on the reaction item?

tepid dock
#

On either

vast bane
#

you want the reaction item to have NOTHINg checked on thtat tab

tepid dock
#

But the Aura item should have it checked?

vast bane
#

on the aura...

violet meadow
#

If its always on yes for the Aura

vast bane
#

you got me thinking of a good idea for the aura

#

nah you don't want the aura item always checked cause then it will work for multi attack during the round when itshould only work for 1 reaction

tepid dock
#

Can I change the special duration to

violet meadow
#

That Item was only proof of concept.

vast bane
#

I feel like you are getting confused on the whole point of this

violet meadow
#

Just share what you want to do

vast bane
#

no you should not change that duration it should be after the reaction and you should be using a reaction item

violet meadow
#

I got to run. will take a look later

vast bane
#

the aura can only exist while the source actor has a reaction avaialbe it can't be used for all attacks

tepid dock
#

When you or an ally you can see within 60 feet take damage, you can use your reaction to cast Divine Shield. You expend 5 Holy Power to cover the target in a divine barrier. The shield stops any incomming attacks including the triggering attack, and lasts until the end of the paladin's next turn. While shielding a target, the paladin cannot make any actions until the end of their next turn when the barrier dissolves.

#

Thats the ability

vast bane
#

that is 1 attack, not all attacks till their next turn

#

shit

#

sorry wasn't looking at chat till you typed that

#

ok sure the special duration can change, we assumed you were doing counterspell or a different reaction

#

wow that reaction is awful

tepid dock
#

You think? Not balanced enough?

vast bane
#

my pally player would never touch that

#

players want to do things in combat, to forfeit your whole turn is rough in a 1-4 round combat

tepid dock
#

True, but its a last ditch total immunity kind of effect.

#

I see your point though... potentially will re balance it

vast bane
#

Home brew 🤷

tepid dock
#

Yea

vast bane
#

how do you gain holy power and does it reset when combat ends?

tepid dock
#

It resets on an LR or SR, and you can gain 1-3 points per round depending on whats done. Max of 6

#

But this what I have so far on the reaction portion.

vast bane
#

DR.all flag should be 999 not 1

tepid dock
vast bane
tepid dock
vast bane
#

you don't have active auras installed

tepid dock
#

I do also

vast bane
#

whats it setup with then

#

not that ae, the aura ae

#

your victim probably doesn't get an aura

tepid dock
vast bane
#

ok now I'm convinced you have not done it at all like he instructed

#

there are 2 items in his setup you know this right?

tepid dock
#

Yep, I have 1 reaction item, and 1 aura item

vast bane
#

the reaction item, and the item with the aura, show me the auras effect settings in the aura tab

#

not the settings of active auras

rigid slate
#

Regarding this reaction would it be possible to use findNearby to do this instead of an aura? I'm attempting this for my group's Steel Defender, applying the reaction on the Steel Defender works great. It doesn't seem to care about how far away the Steel Defender is however.

vast bane
rigid slate
vast bane
#

also because alot of the times the reactions require the range of source to attacker not source to victim and is often going to be impossible to really use

vast bane
#

the guy who has the reaction feature on them, is not going to get the prompt, the victim is, then the victim verbally asks the source of the aura, if they can use their reaction, if yes, they click the reaction prompt button, if no, they close it

#

that is the gist of the janky third party reaction

tepid dock
#

I renamed them for clarity

vast bane
#

I suspect your problem is in the macro.createItem key

#

or its drop down, or its effect value

#

and I have a gif to easily show you the part of all of this you aren't doing I think:

tepid dock
vast bane
#

that is fine if you store it somewhere safe, badger has stated low end servers do not handle compendium diving well

tepid dock
vast bane
#

so having items in a folder in the sidebar for macro.createitem might be wiser on lower end machines

#

do you have reaction prompting on?

tepid dock
#

In midi?

vast bane
#

yes

tepid dock
#

I should, ive seen plenty of other reactions, but ill double check.

tepid dock
vast bane
#

you have a setting wrong somewhere, the only thing I see different with yours is that you don't set range to self too

#

I always do self/self for my self roll effect transfers

#

none in dnd5e 2.1.x is...new and possibly confusing midi

#

does the third party actor have the acutal temporary item in their inventory?

#

that could point to where your problem is

#

if they dont have the item, then your aura is wrong

#

i they do have the item, then your reaction is wrong

#

also what is damaging them?

#

omg I think I know the mistkae here

#

isn't there 2 people here trying to do a reaction?

#

bugbear and I crossed the streams here

tepid dock
#

hahaha

vast bane
#

@tepid dock you want reaction damaged not reaction preattack roll

tepid dock
#

Should the Aura effect add the reaction effect to the character sheet?

vast bane
#

if you are dealing purely damage to the guy then your reaction will never prompt cause it only prompts on an attack

tepid dock
vast bane
#

god this is so painful

#

I honestly stopped explaining macro.createItems here cause its always like a dentist visit

#

there is no easy way to show someone how to set these up

vast bane
#

its the aura with the createitem key. The actor B should have the reaction ITEM in their inventory to prompt

#

when they walk out of the aura it poofs

#

the item also imo should be recharge 1 so it stops prompting for other attacks after the first use

tepid dock
#

I think I got it

vast bane
#

its ok if its suppose to last a while cause the effect is set to end at a longer time anyway

tepid dock
#

I think my issue was that I was attacking the wrong target 😂

vast bane
#

heh

#

also pre attack roll when targetting with sacred flame wouldn't trigger either

tepid dock
#

But clearly there were still several errors I had

tepid dock
vast bane
#

Its a tough thing to learn but its a cool key to utilize

#

wait till you figure out how to do it with magic item identification 8)

tepid dock
#

ooooooh noice

#

Sounds intriguing.

#

The odd thing is I dont see an icon for the effect buff... but I see it on other things. Is that normal?

vast bane
#

Drag your magic item to a fresh copy of this items' red circled empty field.

tepid dock
#

But then how does one identify it?

vast bane
#

they attune to it

#

per rules as written

#

oh forgot the effect macro

#

also btw, you add ,permenant after the drag and drop of the red circle

#
console.log(origin);
if(origin instanceof Item) origin.delete();

On effect toggle(On) effect macro

#

I intend on requesting that the permenant flag be allowed to be first in the effect value so that this prefab mystery item doesn't require manually adding it on the end

#

when the player attunes to the mystery item, the true magic item appears in their inventory, the effect macro deletes the mystery item, and if you forgot the permenant flag, the magic item dissappears, so don't forget that step lol

#

the reason this is cool imo, is cause you only need to make this singular item

#

it can be repurposed/copied and added a new magic item to it with very little extra work constantly

hot flower
#

hey, @scarlet gale is divine smite not working atm? It's throwing up the menu for spell slots used, and creating a chat card, but there's no damage being applied.

#

no errors in the console, either

vast bane
#

I did discover one annoyance, it does not play well with the loot system of Item Piles and MEJ so you have to keep the item in the sidebar

#

the duplicated item, not the magic item

tepid dock
vast bane
#

rules as written you can only attune to an item during a short or long rest

tepid dock
vast bane
#

if you identify an item instead to learn its properties, just have the player attune to it /shrug

#

yeah

tepid dock
#

Ok

vast bane
#

which is easier in tidy5e fwiw

#

this is great for cursed items

#

but to really sell the cursed item mystery, you gotta sell it by making all items this way

#

otherwise they can get 100 safe items then suddenly they get a question mark cursed item lol...kinda sus

#

I showed you it cause you seemed to have tackled the main concept of macro.createItem so figured I'd share what I felt was the coolest thing to do with it

#

you can also do things like scorching ray and magic missile with macro.createitem

#

these are the spells I've done with macro.createitem so far:

tepid dock
vast bane
#

The animal friendship and knock are for items, I probably should have just used items with spell module but I was on a tear with setting things up

vast bane
#

in the first tab of the effect you will start to see an effect macro module button

tepid dock
#
if(origin instanceof Item) origin.delete();```
#

just as is?

vast bane
#

console entry is redundant it was when I was testing and got lazy and never deleted it

tepid dock
#

hahahaha ok, ill remove the console.log

vast bane
#

make sure you do it on the right item, also remember that this all hinges on requiring attunement or else midi will apply the effect to the item when its equipped instead and that should not be how it works

#

Keep the item saved in your sidebar never use the original, duplicate it to use it

tepid dock
#

Sure, I set it up exactly as your images show

vast bane
#

you can use it in compendiums, but I use MEJ and MEJ's loot gets really uppity with me if I have a weird midi item in its data

#

it seems to hate when I have a macro.createItem in a compendium so I just get around it by keeping that specific prefab item in a sidebar folder instead

#

its got somethign to do with how MEJ stores the item data in the journal

scarlet gale
vast bane
#

I never bothered to bug report it cause its so niche

vast bane
# tepid dock Ok cool

also you can ditch Magic Items Module and use Items with Spells for its namesake, and if you have an item that has features instead...instead of falling back to Magic Items Module for that....use macro.createItem:

tepid dock
vast bane
#

wait

#

we might be mispelling permenant?

#

google it lol

tepid dock
#

yep

#

im dumb

vast bane
#

happens to us all 🫂

#

heres another magic item setup with two temp created items:

#

You might want to make your base item a weapon type instead of trinket cause technically an unidentified magic weapon can be equipped and used without its magical properties

#

Very niche case I doublt it'll ever happen but its technically possible

rigid kindle
#

I seem to be having trouble setting up Chris' Blade Flourish automations.
My first issue being I don't know how to set up a "scale" for bardic inspiration (which i've bypassed by importing a bard from ddb but would still like to understand).
And the second of which being that none of the automation seems to be triggering

vast bane
#

Also if anyones super curious, it is infact possible to create a paradox with macro.createitem....don't do it.

vast bane
scarlet gale
#

of my module

rigid kindle
vast bane
scarlet gale
#

It looks like the on use macros aren't being called async or something

#

since divine smite is working except for the fact that it's not being waited on

vast bane
scarlet gale
#

checking the source code right now

#

But I'm guessing so

vast bane
#

is there a way to note when the hard requirement starts for 34/35 in your module package page?

scarlet gale
#

Already has it

vast bane
#

gotcha

scarlet gale
#

Don't update past 0.0.90 until this is sorted

rigid kindle
flat gazelle
#

Is there a way of an aura dealing damage once per turn? I am trying to make Investiture of Flame working and it is hurting my brain and I fear I have to somehow try and learn how crhis made his spirits guiardians and try and somehow adapt that

dark canopy
#

double check your identifiers, the srd class has it configured (re: bard scale values)

rigid kindle
scarlet gale
#

And did you do a fresh import with the replaced features?

rigid kindle
#

Just tried with a fresh import of a character from ddb and replacing the features yeah

#

Bardic inspiration one works perfectly and I can manually trigger the blade flourish movement. But otherwise nothing

scarlet gale
#

Any errors in console when you attack?

#

Also, if you have the movement effect on the character, you won't get the prompt

#

since it's limited to once per turn

rigid kindle
scarlet gale
#

console errors?

rigid kindle
#

No errors. I'll try disable all other modules and try again too

scarlet gale
#

nah

#

disabling modules won't change anything

#

DM'ed you

violet meadow
#

One of the first macros I had made!

solid mountain
# flat gazelle Is there a way of an aura dealing damage once per turn? I am trying to make Inve...

I am actually looking for an answer to that too. I have figured out way to do that damage on templates, but I doubt there is a good way to do it for auras. It's probably simpler to do it with a visual aura. Especially since it says: Any creature that moves within 5 feet of you for the first time on a turn or ends its turn there takes 1d10 fire damage.

That means it would trigger twice if they stay?

dark canopy
#

yes

violet meadow
#

Overtime effects

#

And you can electively trigger it in a macro

scarlet gale
violet meadow
#

Check where the callMacro is being called

dark canopy
#

line 1741 - const fn = Function("{speaker

violet meadow
#

I am on a tablet now so cannot check anything easily

vast bane
#

should it be a lowercase F?

scarlet gale
#

it does run async if it's not a function macro (just added in the last update)

dark canopy
violet meadow
#

Add await in your call

dark canopy
#

Function should be AsyncFunction

violet meadow
#

Is not wrapped in async?

scarlet gale
#

This is the only part that got changed in the update

dark canopy
#

foundry's implementation:

    // Attempt script execution
    const AsyncFunction = (async function(){}).constructor;
    // eslint-disable-next-line no-new-func
    const fn = new AsyncFunction("speaker", "actor", "token", "character", this.command);
    try {
      return fn.call(this, speaker, actor, token, character);
    } catch(err) {
      ui.notifications.error("There was an error in your macro syntax. See the console (F12) for details");
    }
tepid dock
#

Hey @vast bane is it not possible for the reaction prompt to be directed at the origin player?

violet meadow
#

Not sure but I would try await Chris.pre-made.blablabla

vast bane
#

I don't use bugbears setup, but what the usecase for targetting a third party person?

tepid dock
#

Like any ally gets hit, I wanted the paladin to get prompted with the reaction to use the ability

vast bane
#

...

#

that is the whole point of the janky active aura

#

there is no way to do a third party reaction

#

you have to gift the victim the third party's reaction via macro.createitem

violet meadow
#

Janky my aura !!!

vast bane
#

the two players are suppose to use their vocal chords to coordinate whether they use the reaction or not

tepid dock
# vast bane ...

Yes yes, I didn’t mean to cause you a headache, I knew this. Guess I was just brainstorming why it couldn’t work the other way.

scarlet gale
toxic spruce
vast bane
tepid dock
#

Yeeee! Alright thanks. So the macro pulls the origin tokens reaction

vast bane
toxic spruce
#

oh it is 2 years old lol

vast bane
tepid dock
#

Yea it does, and I am

scarlet gale
#

Item macro works fine, function version doesn't

#

macros are exactly the same otherwise

violet meadow
#

It replaces the function. with "" and then passes it as a call no?

dark canopy
#
//line 1738  
    const body = `return (async () => {
        ${macroCommand}
      })()`;

the actuall call is not being returned

#

function.(await chris....) may work

#

based on how midi is parsing that value and stripping function. off the front

scarlet gale
#

also sigh

#

I need to go edit literally every item again to slap an await in there

dark canopy
#

effectively, heh, that value can have whatever script you want after function.

#

PLEASE DO NOT DO THIS

scarlet gale
#

It should really be a fix on midi's side I'd think

kind cape
scarlet gale
#

but I don't think Tposney is going to be around any time soon

dark canopy
dark canopy
kind cape
#

Shhh, let me dream!

scarlet gale
#

Is it a bad idea to do a find and replace all in the db file here?....

violet meadow
scarlet gale
#

function.chrisPremades to function.await chrisPremades as a find and replace should only touch this

solid mountain
#

How can I make a area effect (around self) targeting all creatures but not self?

scarlet gale
#

Range special

#

this one has enemy, but you can just set it to creature

solid mountain
#

Thanks!

quiet solar
#

is there a way to delete an item by id? (implementing the "roll a D20. On a 1, the wand crumbles into ashes and is destroyed.")

scarlet gale
#

as an item macro with midi?

quiet solar
#

yeah

scarlet gale
#
await this.item.delete()```
#

assuming that the item being rolled has the item macro

quiet solar
#

actually - misspoke (typed) - part of an onUseMacro, but I have the item

#

and I am going to back up my work before i test this one...

scarlet gale
#

what's the context? or paste what you have already

quiet solar
#

Let me get it working - one sec

scarlet gale
#

if it's an actor on use, it would delete whatever the player just rolled

#

if it's an item on use, it should delete only that item

quiet solar
#

yep

vast bane
#

and levels module is gonna have an amazing stroke with those items

celest bluff
#

I have a free updated version on my patreon

scarlet gale
#

Ah cool. I don't think it's easily searchable so the old v9 one comes up

vast bane
#

Need to figure out the use case for the new macro.createitem key, I just need a sample item to understand it I think

#

for me the effect macro seems simpler just cause I know how to use it

quiet solar
celest bluff
#

Well I wrap it in a json to make things "easier"

solid mountain
#

Is there a way to set disadvantage on incoming ranged attacks?

scarlet gale
#

Look at the disadvantage grants flags

celest bluff
#

Yes various ways but this a distance reason? Or an effect?

solid mountain
#

Yes. Ranged weapon attacks made against you have disadvantage on the attack roll.

short aurora
celest bluff
#

There's a midi flag for it

solid mountain
#

flags.midi-qol.grants.disadvantage.attack.rwak

short aurora
#

yup

#

if you also need spell ones, you need to add another with rsak doesn't look like they come in one package

solid mountain
#

Thanks, but only ranged attacks on this spell.

vast bane
#

I am doing my monday morning bug hunting after my weekend sessions. I noticed that the wizard player's reaction shield failed to report the ac properly on the attack it was triggered on. I just now tried to replicate it and am not seeing the issue. I cannot see any differences in the spells, I suppose I could try to smack him incase its some sort of actor issue...

Left is the test npc's shield, right is his shield. Could this be a case of just user latency during live play?

scarlet gale
#

Does the actor for some reason have flat ac?

vast bane
#

and my test npc has mage armor

celest bluff
#

I have issues with magic items module and shield spell. Half the times it doesn't apply correctly

vast bane
#

this one was definitely a spell shield he has no staff of defense...yet

#

hmmm....

hot flower
#

hm. @scarlet gale , the update button has vanished in the latest update.

vast bane
#

I will ask him though if at that moment he was trying to use his spell scroll of it

hot flower
#

oh, nvm. It's just not there on the char sheet. It's there on the item sheet

vast bane
#

could lag throw the order of operations off in a reaction prompt you think?

hot flower
#

huh, weird. I have the 0.9, which seems to have been a downgrade.

scarlet gale
#

Yea, update again

rigid kindle
hot flower
#

ok. the new manifest is downloading 0..0.90

scarlet gale
#

I had a version revert while I troubleshooted something

#

Oh

#

My bad

hot flower
scarlet gale
#

Yea, I linked the wrong one

#

Fixing

vast bane
#

I have discovered why the shield spell was messing up on the actor. It was not the shield spell.

#

I don't fast forward, so I can't use reactions that affect save bonus

#

So I did a weird janky Arcane Deflection setup that auto casts the save bonus on the caster when they use a cantrip

#

if they ever use their reaction, the arcane deflection fades immediately

#

this had a weird interaction where the sheets ac briefly reported both ae's effects but midi knew that arcane deflection was gone

hot flower
#

thanks for fixing divine smite, @scarlet gale

solid mountain
#

Any ideas to automate this?
When you take damage of one of those types, you can use your reaction to gain immunity to that type of damage, including against the triggering damage. If you do so, the resistances end, and you have the immunity until the end of your next turn, at which time the spell ends.

I'm thinking of adding an item (a feature) with 1 reaction. This in turn triggers a nested DF.

scarlet gale
vast bane
#

have it be a Midi damage reduction flag and put a value of ADD and 999

quiet solar
celest bluff
#

Since workflows are isolated per user

scarlet gale
#

Need the context to find the issue

celest bluff
quiet solar
# scarlet gale If have the item object it should be there
Uncaught (in promise) TypeError: onUseArgs.item.delete is not a function
[Detected 2 packages: w15ps-compendia, midi-qol]
    at #destroyOnLastCharge (wand.js:29:36)
    at Wand.use (wand.js:24:38)
...
class Wand {
    static async use(onUseArgs) {
        const charges = onUseArgs.item.system.uses.value;
        const content = `<center>How many charges would you like to use? <i>(${charges} available)</i></center><br/>`

        async function dialogAsync(){
            return await new Promise(async (resolve) => {
                new Dialog({
                    title : `${onUseArgs.item.name}` , 
                    content,
                    buttons: Array.fromRange(charges+1).map(i=>({label: i.toString(), callback: (html) => {
                        resolve(i);               
                    }}))
                }).render(true);
            })
        }
        const castLevel = await dialogAsync();
        if(!castLevel) return {};
        onUseArgs.castData.castLevel = castLevel;
        await onUseArgs.actor.items.getName(onUseArgs.item.name).update({"system.uses.value": charges - castLevel});

        if (charges - castLevel === 0) {
            console.log(onUseArgs);
            this.#destroyOnLastCharge(onUseArgs)
        }
    }   

    static async #destroyOnLastCharge(onUseArgs) {
        await onUseArgs.item.delete() // <= THIS LINE
        console.log(onUseArgsitem.name + " goes BOOM!!!");
    }
}
vast bane
#

I'd just do a simple reaction and immune all damage types that apply and manually apply for the round if theres a situation where a different damage type happens that shouldn't be shielded off

solid mountain
#

You have resistance to acid, cold, fire, lightning, and thunder damage for the spell's duration.

When you take damage of one of those types, you can use your reaction to gain immunity to that type of damage, including against the triggering damage. If you do so, the resistances end, and you have the immunity until the end of your next turn, at which time the spell ends.

So, current idea.

  1. Use a standard effect to add the DRs
  2. Use createItem to add a feature with "Reaction Damage". I can try to find a way to read the damage that was taken with this some how. Or force a Dfred nested to pop up where the users chooses.
vast bane
solid mountain
scarlet gale
quiet solar
#

actually, this works:

await onUseArgs.items.getName(onUseArgs.item.name).delete()
dark sandal
#

Does this still work?

quiet solar
#

which seems weird... and there's no lookup by id

scarlet gale
#

I feel like that means your onUseArgs is pulling in weird data

quiet solar
#

it's just args[0] passed in

scarlet gale
#

then it should just be js await args[0].item.delete()

#

Unless args[0] doesn't have the item

#

but clearly it does

#

Or it's had a toObject() done on it or something

quiet solar
#

it does, it just complains that item has no delete() method

scarlet gale
#

Just so you know

#

getName will get the first one

#

you should get the id

#

and just do actor.items.get(item.id)

#

screenshot your onUseArgs and expand the bottom arrow part

#

that should help figure out why it's not just letting you directly use the item from the args

vast bane
scarlet gale
#

that has a toObject done on it

#

just get it from the workflow instead

#
await args[0].workflow.item.delete();```
quiet solar
#

interesting

#

is it because I am accessing it from a static Class method? yes?

scarlet gale
#

¯_(ツ)_/¯

quiet solar
#

I think I've run into this before - there's likely a better pattern here, but workflow works

scarlet gale
#

For what it's worth, workflow has all the same data plus more. However some things are a set instead of an array

#

only thing it doesn't have is the macroPass if you're using it

quiet solar
#

switching off of macroPass in the macro... so no issue there

dull heath
#

Is midi known (not) to work with saving throw requests timeouts using monk's tokenbar?

When I use LMRTFY and a timeout, the rolls happen after the timeout; with tokenbar, nothing happens.

dull heath
#

ah, am I not up to date?

vast bane
#

I believe its fixed in later versions but 34 is buggy, use 35, 35 is very new no guarentee there aren't breakages there

dull heath
#

I'm on 35, actually

#

D:

vast bane
#

I'm on 33 and have had no issues with MTB requests on saves

dull heath
#

I've used LMRTFY so far and am doing a new campaign/trying to reduce module weight so I'm considering it

vast bane
#

The only issue I tend to have, is that MTB requests in bulk, if its all players, if they all roll at the same time...ish, one of them inevitably breaks and I have to use the manual grabber for them

magic ledge
#

Hey, not sure if this is the right channel but I'm trying to use DAE and MIDI QOL to add advantage on saving throws against poison as per the Belt of Dwarven kind and not having any luck, anyone got any advice?

dull heath
#

tangential question: is it supposed to spit out two things?

vast bane
dull heath
#

Noted

spice kraken
#

Midi and monk's IIRC

dull heath
#

Yeah but since midi can't request elegantly on its own 🤔

#

at least last I checked

vast bane
vast bane
#

then the system will complete the task when the target user makes the right roll

#

MTB/LMRTFY are just...easier to do the task

dull heath
#

Yeah, it's less elegant since it's just a text message

#

LMRTFY shows the DC though, or I haven't found how to disable that

vast bane
#

I personally like MTB cause it kills multiple birds with 1 stone

dull heath
#

i don't really like PCs always knowing what they're rolling against

vast bane
dull heath
#

I haven't checked if MTB does tbf

#

I just used LMRTFY for the longest time without knowing it does 😅

vast bane
short aurora
#

Same as with save against magic which I think is only feasible against overtime effects but I hope to be wrong on that one

dark sandal
magic ledge
vast bane
short aurora
vast bane
#

OR, use another method of requesting saves, MTB spoils a bunch of stuff, I've asked to have those issues addressed /shrug

dull heath
#

ah 😔

magic ledge
vast bane
#

its a simple task, I think CPR does it already

#

I don't think he does it the easy way though since hes got world scripts

#

when you set a flag in midi that is 1 or 0, most of the time it can also take an evaluation like we have for activation conditions

#

so its just a matter of finding out what to plug into the effect value on the midi flag for advantage on con saves

#

I don't know what it would be, but I bet you Bugbear knows

#

and probably already put it on protection from poison in midi srd

#

the version hes currently working on that is set to release soon™️

scarlet gale
#

Can't quite be done with an evaluation

short aurora
#

How would it be an evaluation on the con save? If it's a poison feature without poison damage, how would CPR do it? Search the item description?

#

oh ok nm chris came

vast bane
scarlet gale
#

My module searches the effect for macro.ce and checks for a flag on the actor to see if they have resistance to it

vast bane
#

I'm pretty sure bugbear showed us one for dwarven resilience a long time ago

scarlet gale
#

the evaluation thing won't work since the source actor is the one with the workflow, not the target

vast bane
#

hmmm

#

I personally use Advantage Reminder

vast bane
scarlet gale
#

If you want to see my non-module form of the setup.

#

(this is a world script macro)

short aurora
#

I've got vested interest 'cause my player got this feat and I haven't found a clean way to automate it

#

I was slow at typing, that was supposed to be... like 4-5 messages ago

scarlet gale
#

If you're using my module, it's just a matter of adding the right flag as a passive effect to that feature.

#

otherwise the worldscript I linked above is standalone

#

and should catch most things assuming your automations use macro.ce to apply conditions

vast bane
#

I do prefer macro.ce but I got so many DAE wrench ones that are just dae's

scarlet gale
#

Once midi gets a pre-save macro call I can change it up to not need a hook

dull heath
# vast bane

that's pretty cool, I assume it works only for non-fast-forwarded rolls?

vast bane
scarlet gale
#

As long as you don't fast forward it's not the worst way to go about it

vast bane
#

what I really enjoy about the popout prompts is that you can help the players remember their sheet features

short aurora
#

I don't think I've got my monster features set up to use CE, but that world script is a tempting advocate for it...

vast bane
#

never have I seen so many history checks using stone cunning till I started using advantage reminder module

scarlet gale
#

technically, it's easy enough to make some small changes to pick up the effect name instead of using the macro.ce flag

dull heath
#

does that work on saves, too?

#

Seems pretty cool

scarlet gale
#

It was originally designed around my own game where I know I always use macro.ce

vast bane
#

any popout

#

he even has grant messages and if you pair advantage reminder with inline roll commands it gets even cooler, MaxPat has a nice setup for sanctuary thats pretty cool

dull heath
#

or does the module remind of that, too?

dull heath
#

ahh, you gotta add them manually

#

I thought it'd pull the word advantage out of features

vast bane
#

I think its a premade in AR

#

he has like 10or so premades in a compendium

scarlet gale
#

Not for at least two weeks based on the last update message

violet meadow
#

Indeed. But I have it working locally

#

😄

#

The isSave trigger is already there, but is just being called too late

dull heath
#

is there a / which midi setting causes the trash can icon (= to delete chat messages) only appear on the upmost message of its respective type, or is it a different issue entirely?

#

It's always been a little weird to me, I assume it's a settings interaction I fail to understand

violet meadow
dull heath
#

ah 🤔

vast bane
violet meadow
#

DF chat enhancements maybe?

dull heath
#

I actually installed that to see if it'd change it, assuming it might be a default problem; it's not DF chat enhancements, since it persists without it.

#

(disabled for now)

dull heath
vast bane
#

I dm'ed you

#

you can tell its a specific chat enhancement module due to the weird lines at the top of the others

dull heath
#

Oh huh, I've never consciously noticed those

#

That's quite the observation

vast bane
#

its a feature that tries to save on space by not reusing the header

#

and it kills the trashcan cause its hiding the header

#

It tries to only utilize the header of cards when theres a change in whose typing

violet meadow
#

Just use Merge and condense cards from MidiQOl

#

So much better imho

dull heath
#

Yeah that looks much better and like yours now

#

Pretty much anyway

#

I'm missing the dotted line/highlight around the name of the actor

#

but I assume that's yet another setting 😄

violet meadow
#

That is Anonymous module actually

#

Indicates that the name is altered for player's viewing

dull heath
#

oh, the name of the module is Anonymous, innit

vast bane
#

I wound up going back to CUB cause of an issue with Token Mold that I already forgot what it was

#

so I stopped using anon

dull heath
#

CUB seemed extremely old tech to me a few months ago

#

in that it broke a lot of things/seemed not to receive updates anymore

#

maybe that has changed

vast bane
#

I only use hp rolling of npcs and name hiding in cub, everything else is off

#

Tokenmold...god I can't remember what was breaking with it in midi

short aurora
vast bane
#

OH it breaks TVA

dull heath
#

oh yeah, I remember name hiding was a good one; by default, players can see who's in the initiative as soon as they've taken a turn, right?

vast bane
#

tokenmold and TVA don't work together anymore

dull heath
#

or maybe even before that

vast bane
#

so TVA was more important so I switched back to CUB

short aurora
#

I run all three, I was about to say my TVA and TokenMold works fine, but maybe CUB is the bandaid holding it together

dull heath
#

TVA?

violet meadow
vast bane
#

What breaks in TVA with tokenmold, is wildcards

short aurora
vast bane
#

if you set a default image for your wildcards in TVA, if you have tokenmold enabled, that setting in TVA breaks

scarlet gale
#

non merged cards don't handle macros that use setDamageRoll

#

Found that out recently

short aurora
#

or if my computer bursts into flames

blissful panther
#

Token Mold (similar in a way to ATE), reverts anything other modules might have done in the preCreateToken hook to the token data. If your module happens to execute preCreateToken after Token Mold, you're golden. If not then bye bye your changes.

fringe crag
#

Hey, Im trying to set up a Feature where my pc can change Token when activating this ability. I set it up like I did with my Lycan Bloodhunter but it doesnt work. I think it is because I used the "rage" template for the Bloodhunter.
How would I have to rewrite the Macro to change the spring token to the fall token? #Eladrin stuff

vast bane
#

recently I also had this feature break let me revisit that actually...

#

@fallen token

#

the only thing that breaks on this ae/item is the ATL key does not change to the image

#

I get it twice, that error

fringe crag
vast bane
#

Actually I get it three times

fringe crag
#

got almost the same

vast bane
#

That happens when you try to roll initiative with a swashbuckler rogue, war mage wizard, or battlemaster right?

fringe crag
#

no, I created the Feature "Fall" and put the item macro on it. It is a sorcerer and no roll necessary

vast bane
#

you have an empty damage formula on the fall item or not a number in the formula

fringe crag
#

i copied it from my Hybrid transformation. 🤔 let me take a look

vast bane
fringe crag
#

Its my "become a werewolf" button. Do I have to set up an effect?

vast bane
#

does hybrid transformation transform you like polymorph/wildshape?

#

or is it just a token image change?

#

The only way I know how to properly toggle an image change of tokens is via ATL module and its broken currently in my world

fringe crag
#

it gives me a mofified version of the "rage" from a barbarian. for resistances and stuff and the item macro changed the image for me

vast bane
#

click the item macro on the top bar and paste it in here by wrapping it in :

```js
paste here
```

fallen token
# vast bane <@806776572488450058>

Can confirm that ATL.applyCustom isn't defined. Looking at the second screenshot though, the one ATL key is using Override and not Custom. There's probably another AE that's using an ATL with the Custom change mode causing it. If you can find it, change it to something else like Override as a workaround

vast bane
#

this should be upgrade?

scarlet gale
#

If you care for it, I have a fully automated setup for the order of the Order of the Lycan bloodhunter.

fallen token
#

In this case, the most accurate would be Upgrade

vast bane
#

wow this actually makes another issue make complete sense

#

I had to add see invisible to her during the session and I never connected the dots here

#

Thanks Kaelad, and the reason why its firing when she changed forms was cause of this key on the potion buff on her thats already active

scarlet gale
#

In the context of this, they're just trying to change the token image after using the feature?

vast bane
#

could this be why the texture key failed to change?

fringe crag
#
const ragingTokenDoc = fromUuidSync(args.at(-1).tokenUuid)
if (args[0] === "on") await ragingTokenDoc.update({"texture.src":"Players/Faena/Kopf%20Herbst%20(2).png"})
if (args[0] === "off") await ragingTokenDoc.update({"texture.src":"Players/Faena/Fr%C3%BChling%20K%C3%B6pfe%20(1).png"})
fallen token
fringe crag
#

it doesnt have to be an effect. Just a fast way to change the token because she has to roll what season she is each day

scarlet gale
#

Is it just the image, or are you changing out features and stuff too?

fringe crag
#

only the token image

scarlet gale
#

I would check that you have the token document and not the object

#

Might be trying to do the update on the wrong thing

#

Or just use warpgate to mutate the token's image

vast bane
fringe crag
vast bane
#

you can also use my image above if you have active token effects module installed

#

keep in mind that DAE does not auto complete the new ATE key like my image shows

#

actually it probably does just my item is older than the DAE fix for auto complete on ATE

#

nope, looks like tposney missed the texture.src key in his attempt to update them

scarlet gale
vast bane
#

the reason I like the atl key for changing image is cause ae's are smoother in toggling things than macros are, I've had plenty of times where somehow a macro gets misaligned and I'm stuck manually changing its toggle

fringe crag
scarlet gale
#

Yea

#

I just wanted to make sure I could reference my own stuff

#

Makes the dialog super easy to make lol

fringe crag
#

I mean it doesnt have to be that complicated. I could still have 4 different macros. one for each season and be happy with it. But the way I did it with the bloodhunter doesnt work here. Maybe because of the "rage" part of the macro? I don't know I have no clue about java stuff

inland vortex
#

midiqol says I should be using Automated Animations, but I dont see it in the list of modules in foundry. Do we have to go to a different site to find it?

vast bane
#

Automated Animation sis purely a cosmetic module

#

its also officially published so you spelled it wrong when you searched for it

#

the author is Otigan

inland vortex
#

i'll look again

scarlet gale
# fringe crag I mean it doesnt have to be that complicated. I could still have 4 different mac...
let autumn = 'imageUrl.png';
let winter = 'imageUrl.png';
let spring = 'imageUrl.png';
let summer = 'imageUrl.png';

let selection = await chrisPremades.helpers.dialog('What season?', [['Autumn', autumn], ['Winter', winter], ['Spring', spring], ['Summer', summer]]);
if (!selection) return;
let updates = {
    'token': {
        'texture': {
            'src': selection
        }
    }
};
let options = {
    'permanent': true,
    'name': 'Season',
    'description': 'Season'
};
await warpgate.mutate(this.token.document, updates, {}, options);```
#

Give this a spin.

vast bane
scarlet gale
#

untested, may need a fix or something

inland vortex
#

thank you

fringe crag
#

boy, that was fast

scarlet gale
#

I copied and pasted 90% of it from stuff I already have

#

it helps when I know you're using my module

#

Since I can just call on my helper functions

#

Keep in mind they need to have a token on the scene for it to work (this is a warpgate limitation)

fringe crag
#

Do I need to create a macro before hand or just paste it into item macro?

scarlet gale
#

Can be an item macro

#

Would need to be changed to update the prototype token. it won't stick between scenes

fringe crag
#

yea she stays like that until a long rest

#

but I am not getting it to work anyways right now. I think i fail the basics haha

scarlet gale
#

the first 4 lines need you to set the image path

#

for each season

#

then just paste into an item macro on the feature

fringe crag
scarlet gale
#

click on details on change seasons

#

and show me the bottom part

#

where it says on use macro

vast bane
#

in details set on use macro and use ItemMacro

fringe crag
#

I think the dot is wrong here?

vast bane
fringe crag
#

yea that was it

#

boy thats sleek. Biggest fan Chris 🤣

scarlet gale
#

Making a quick update to that script to make it stick around between scenes

#

and have an effect

digital lagoon
#

Woooah, Eladrin season change? Chris is that something in your module or did you just whip that up?

scarlet gale
#

Just whipped it up

fringe crag
#

he did that in like 2 minutes xD

scarlet gale
#

I can make a proper one

#

lots of control + C and control + V here

digital lagoon
#

That would be an awesome inclusion in the module. It’s not the most demanded thing in the world but what a cool little functionality for immersion

fringe crag
#

im THAT close to create a deity in Chris's honor and let all mayor cities praise him. haha

scarlet gale
#

I'll add it to my list

#

I would also have it add each season's feature as part of the mutation as well

digital lagoon
#

I feel like you should start doing a donation fee per request between this and mote of potential. 😂

vast bane
#

he has a kofi!

fringe crag
#

I should use that kofi again. he helps me so much

digital lagoon
scarlet gale
#
let autumn = 'imageUrl.png';
let winter = 'imageUrl.png';
let spring = 'imageUrl.png';
let summer = 'imageUrl.png';

let selection = await chrisPremades.helpers.dialog('What season?', [['Autumn', autumn], ['Winter', winter], ['Spring', spring], ['Summer', summer]]);
if (!selection) return;
async function effectMacro () {
    await warpgate.revert(token.document, 'Season Change');
}
let effectData = {
        'label': this.item.name,
        'icon': this.item.img,
        'disabled': false,
        'duration': {
            'seconds': 604800
        },
        'origin': this.item.uuid,
        'flags': {
            'dae': {
                'selfTarget': true,
                'selfTargetAlways': false,
                'stackable': 'none',
                'durationExpression': '',
                'macroRepeat': 'none',
                'specialDuration': [
                    'longRest'
                ]
            },
            'effectmacro': {
                'onDelete': {
                    'script': chrisPremades.helpers.functionToString(effectMacro)
                }
            }
        }
    }
let updates = {
    'embedded': {
        'ActiveEffect': {
            [effectData.label]: effectData
        }
    },
    'token': {
        'texture': {
            'src': selection
        }
    }
};
let options = {
    'permanent': false,
    'name': 'Season Change',
    'description': 'Season Change'
};
await warpgate.mutate(this.token.document, updates, {}, options);```
#

Try this

#

Not tested

#

changed it to a temp mutation that should auto remove itself on long rest

fringe crag
#

removed after LR, worked

scarlet gale
#

hmm

fringe crag
#

the little icon will stay there for the day right? We cant hide that right?

scarlet gale
#

I need to rethink it

#

placing the token back down doesn't keep the mutated image

#

so I guess I need to set the prototype token image

#

Change: js 'icon': this.item.img, to

'icon': '',``` to have no effect image show up.
#

@dark canopy Am I able to mutate a token's prototype token, in this case for the purposes of changing the image?

celest bluff
#

You could also wrap this all in dae and have it remove itself afterwards. You can define it by the item name.

dark canopy
#

yea, should be able to update it via the actor's data

#

(if you can update it with a normal update call, you can do it via mutations, rarely the other way around)

scarlet gale
scarlet gale
# fringe crag removed after LR, worked
let autumn = 'imageUrl.png';
let winter = 'imageUrl.png';
let spring = 'imageUrl.png';
let summer = 'imageUrl.png';

let selection = await chrisPremades.helpers.dialog('What season?', [['Autumn', autumn], ['Winter', winter], ['Spring', spring], ['Summer', summer]]);
if (!selection) return;
async function effectMacro () {
    await warpgate.revert(token.document, 'Season Change');
}
let effectData = {
        'label': this.item.name,
        'icon': this.item.img,
        'disabled': false,
        'duration': {
            'seconds': 604800
        },
        'origin': this.item.uuid,
        'flags': {
            'dae': {
                'selfTarget': true,
                'selfTargetAlways': false,
                'stackable': 'none',
                'durationExpression': '',
                'macroRepeat': 'none',
                'specialDuration': [
                    'longRest'
                ]
            },
            'effectmacro': {
                'onDelete': {
                    'script': chrisPremades.helpers.functionToString(effectMacro)
                }
            }
        }
    }
let updates = {
    'embedded': {
        'ActiveEffect': {
            [effectData.label]: effectData
        }
    },
    'actor': {
        'prototypeToken': {
            'texture': {
                'src': selection
            }
        }
    },
    'token': {
        'texture': {
            'src': selection
        }
    }
};
let options = {
    'permanent': false,
    'name': 'Season Change',
    'description': 'Season Change'
};
await warpgate.mutate(this.token.document, updates, {}, options);```
#

Here ya go. This mutates the prototype token too.

#

this.item.img on line 13 can be changed to '' to have no effect image, therefore foundry doesn't show it on the token.

fringe crag
#

Walking the dog. Right now. I'll check in 5. You are great

scarlet gale
#

I'm about to head out myself, but from a quick local test it appears to be working right

#

Knowing that it works on the actor, could even have it change the image too if you have one.

#

and since it's a warpgate mutation, it's not destructive

#

delete the effect or hit revert and it's back to how you had it

fringe crag
#

I do have images for that

digital lagoon
#

@scarlet gale before you go would you drop your ko-fi or where we can find it so those of us whose games you’re improving can show some love?

#

Next year I’m just putting the community devs on my Xmas gift list.

scarlet gale
#

It's on my module page github

past spade
#

Is there an easy way to automate something like saving throw advantage against being stunned or paralyzed?

scarlet gale
#

A few options were given

quiet solar
#

@scarlet gale I was investigating the .toObject() issue that you raised earlier and there doesn't seem to be any difference in a direct access of args[0] in an OnUseMacro than what I was seeing when passed into my static Class methods. Could you point me to an example where that isn't the case? For that matter, what class is args[0] supposed to be?

scarlet gale
#

Similar to how targets is an array in args, but set in the workflow

#

You can probably find it in the midi source code where it generates the args

#

When I get back I can actually look at it to see what's up

quiet solar
scarlet gale
#

I'll confirm when I'm home in a few minutes. But it's likely just midi doing it

#

Ok yea, just confirmed it. Midi is bringing it in as an object in args, but as an item in workflow.

scarlet gale
#

And if you were to do:

console.log(this.item.toObject()):```
It would look the same as ```js
console.log(args[0].item);```
quiet solar
#

ok - I see this (I'll be here all week)

Question for the larger midi-qol group. Why use args[0] instead of this? because most of the examples I see are using args[0]

scarlet gale
#

this only became an option back in v9 of midi. Most people don't know you can use it to directly access the workflow

#

I pretty exclusively use this instead of args as I find it's structure to be more useful

quiet solar
#

this is a Workflow. this.workflow is undefined, so I may just continue using args[0] || args[0].workflow

#

but they seem to be synonymous

#

anyway - thanks for the walk down pedantry lane - I learned something

scarlet gale
#

obviously this.workflow isn't anything

quiet solar
#

to you...

scarlet gale
#

this is already the workflow

quiet solar
#

I just tried passing this into my existing static methods and that didn't go so well 🙂

#

but it makes perfect sense now

scarlet gale
#

not everything will be a perfect match if you swap over to it

quiet solar
#

that's ok - I at least understand the structure better

#

really appreciate the help

scarlet gale
#

you'll still need args for DAE on and off stuff I think?

#

As well as macroPass

#

since those aren't in the workflow

quiet solar
#

yeah, I noticed macroPass was missing

#

I'm not sure why I wouldn't just dive into args[0].workflow once I've gotten beyond that initial parsing though

#

I will try that and undoubtably learn

quiet solar
#

I will also say that applying NaN as damage has some unpredictable effects - damn near kills adult red dragons ;P

scarlet gale
#

I've done that before

inland vortex
#

Just started with midi qol. Got the extra animation library from JB2A. I can add new animations, for a fireball, for instance on the A-A tab. How do I get the old animation to not play at the same time?

scarlet gale
#

Like animations from token magic fx on the template?

#

Because the animation library one should replace your AA stuff with it's own

inland vortex
#

I'm getting both animations when I add the AA stuff

scarlet gale
#

turn off the token magic template effects

#

assuming that's what you're talking about

#

should be in it's settings

inland vortex
#

I'm not sure where the original animations come from, I'll see if it's token magic

#

thank you

spice kraken
#

A screenshot could confirm

inland vortex
#

Turning off the token magic for fire templates did the trick. Thank you

scarlet gale
#

@fringe crag Just updated my module with a bit more of a polished version of the Eladrin macro.

#

Next up will be mote of potential. I just need to figure out an elegant way to detect that the effect was deleted from rolling a save...

fringe crag
fringe crag
scarlet gale
#

in the value field paste in the image path for each season avatar and token

#

and no, but I can send you a modified macro if you want the effect icon gone

scarlet gale
#

@digital lagoon I think you were interested in Mote of potential right? I have everything except for the temp healing on save working.

digital lagoon
scarlet gale
#

I need to think really hard how to detect midi has used the bardic inspiration for a save.

digital lagoon
#

It’s for a game I’m a player in so I’ll have to pass the instructions off to the DM and we play tonight, so no rush on it. 🙂

scarlet gale
#

I got the other two features working however

digital lagoon
#

Incidentally, the same game has an eladrin player and we are geeked about the change seasons too. As the resident game artist I’m making him custom token borders now 😂

scarlet gale
#

Eladrin one of my favorite races to play

digital lagoon
# scarlet gale I got the other two features working however

You’re the best. We probably won’t be able to use it tonight but I can’t wait to see the finished product and honestly even just two out of three automated is a huge improvement. It’s a feature no one else remembers works differently from regular inspiration

digital lagoon
scarlet gale
#

I ended up just shoving it into my bardic inspiration macro and detecting it based on the effect name.

#

@violet meadow How would you go about detecting that a bardic inspiration was used to make a save in a midi-environment? Using any and all hooks needed. Part of me thinks I might be stuck parsing a chat message for this.

#

Both pre-save and save fired long before the optional bonus dialog was used.

digital lagoon
#

Is this something that an optional bonus in Babonus might handle? Like if they make a save with the mote item it pops a dialogue that lets them optionally expend it for the save bonus + healing?

#

It’s possible this is a silly question since I don’t understand really anything that goes on under the hood, but it seems like a sort of similar application to Zhell’s suggestion it could be used to optionally apply a die of poison damage to an attack by consuming an item with a dialogue.

queen raptor
#

There was an issue where Midi gave me dozens of notifications every time a measured template was being placed, about every dead/defeated target that the template hovered over being incapacitated. This issue was previously fixable by setting Midi not to update targets when hp = 0, but it looks like it's broken again as of the latest update regardless of this setting. Am I the only one still experiencing this issue?

digital lagoon
#

I believe there’s a setting to ignore dead/defeated tokens when placing templates for targeting - let me check real quick to confirm - but that should solve it

queen raptor
#

That's

#

Yeah, so the setting used to fix it and now it doesn't. 🙂

#

Unless you mean a different one

#

If the setting is "Auto target on template draw," I have that set to ignore defeated

digital lagoon
#

That’s what mine is at too but I haven’t tested current midi release yet.

#

What are your other targeting settings set to?

queen raptor
#

Blue UI is SW5E but the problem is the same in both systems.

digital lagoon
#

Hmm. Under rules, do you have anything under the vitality pool? This is a shot in the dark but I know it was causing some weirdness in dead token interactions

queen raptor
digital lagoon
#

Put a 0 in that field, save and see if it persists

queen raptor
#

Do I need to actually enable the optional rules?

digital lagoon
#

Nope, that field just needs something in it

#

Otherwise the token’s dead status gets all wobbly. Which is absolutely not the technical term but is my lay understanding of it

queen raptor
#

No dice

digital lagoon
#

Well criminy. Okay my other recollection is that some kind of weird interaction was going on with midi and nested convenient effects I believe

#

Do you use CE to manage conditions etc?

queen raptor
#

Well, CE doesn't work for SW5E so I use CUB there. I use DFreds for vanilla, though.

#

Problem is the same in both.

digital lagoon
#

Alright this may be above my pay grade. Which should not alarm you because my pay grade with this stuff is extremely low and people who are great at this will be around shortly most likely. If there are any other modules you’ve added or updated recently that may be interacting with stuff make a note of that, otherwise it may be a current midi issue and tposney is out of town for a bit so reverting to .34 might be your option?

queen raptor
#

No new modules in my vanilla game

#

I'll try reverting for now, was curious if it was a me problem or an us problem in .35

violet meadow
pliant matrix
#

how did you set it?

violet meadow
#

@queen raptor yes it seems it's new (10.0.33+) and probably a bit overzealous notification messages (in case of templates).
I think tposney will readjust this in a future version. Make an issue for that if you could.

For the time being, if you are OK with modifying module files, you could comment out in utils.js:1536 ```js
if (actor?.system.attributes?.hp?.value <= 0) {
log(minor-qol | ${actor.name} is incapacitated);
//ui.notifications?.warn(${actor.name} is incapacitated); <=change: Add // in front
return true;
}

keen remnant
#

You see the conversation right above

queen raptor
#

Will open an issue when I have a moment

crisp needle
#

Hi I am trying to get the sneak attack feature from midi-qol to work, but no luck. As far as I understand it, the itemMacro of the sneak attack feature from midi-qol should be called for every weapon hit and determine in the macro itself if sneak attack damage should be added. But the itemMacro isn't called at all? Do I miss any midi-qol setting? or set

scarlet stump
#

I'm trying to add a damage component to this formula. It works fine with this part for CR 1 or less monsters right now:

{
  "key": "system.bonuses.All-Damage",
  "mode": 2,
  "value": minions.length,
  "priority": 20
            }

What I' trying to do, is add another variable that is equal to minions.length multiplied by the floor of the first selected actor's CR (to scale higher CR minion damage). I would then use the value of this variable as an integer for the value field above. Any help?

kind cape
scarlet stump
#

the base attack deals 0 damage; this effect expresses the (static) final damage for the minion group attack

#

it works fine for CR 1 or less Minions right now - they deal minions.length damage with the attack

#

I would like to multiply that value for the floor of the attacker's CR - so that a CR 2 minion group attack would deal minions.length times 2 damage

#

I've tried "value": (minions.length * (floor(@details.cr))) but it errors out as non numeric

kind cape
#

Alright, so the actual damage for a minion attack you want is:
max(n, n*floor(cr))
Where n is the amount of minions. Just to put it in math terms

scarlet stump
#

yeah

kind cape
#

Try this instead of minions.length:

Math.max(minions.length, minions.length*Math.floor(minions[0].system.details?.cr ?? 1)),
#

Actually, thats not gonna work, minions is tokens

#
Math.max(minions.length, minions.length*Math.floor(attacker.system.details?.cr ?? 1)),
#

This instead

scarlet stump
#

so should I put this as the value for another variable and then add the variable to the value field? Or should I just use this as the value itself?

kind cape
#

Either should work

scarlet stump
#

awesome, it works as the value directly 🙂

#

another question if you don't mind @kind cape ...right now the Grouped attack effect is not removed after the attack; and the value stacks each time I make a new attack (cause the effect is added multiple times). I've found a working solution - adding a second On Use Macro to the Attack Item itself that runs this await actor.effects.find(eff=>eff.label.includes("Grouped"))?.delete(). Not sure why the effect doesn't disappear after 1 attack though, or why they stack

kind cape
#

I believe I added a special expiration in the original that was "1 Attack"

scarlet stump
#

yeah, and it shows up in the effect, but it doesn't trigger even after multiple attacks. Time's up is...up

kind cape
#

Huh, thats decidedly odd, I wonder if thats a bug in midi/times-up.. If you only do a single attack per creature per round you can set "turns": null, to "turns": 1,, that should expire it after their turn. But it doesn't work for multi-attack

scarlet stump
#

that's fine, minions don't have multiattacks afaik

kind cape
#

Just tested it here locally on my .24 midi, and it does expire when I expect it to 🤔

scarlet stump
#

ok must be something else going on then...

solid mountain
#

Is it possible to set a flag to gain immunity to charm and/or sleep?

kind cape
solid mountain
#

Yeah, condition immunity worked for charm. But sleep is not a condition, but a dfred (unless I make it a condition I guess)

kind cape
solid mountain
#

I'll try!

violet meadow
#

Create new ones is ez 😄

inner mulch
#

when doing the effects for over time, is it possible to make the effect trigger at the start of another actors turn? in this case, i have a creature using engulf to swallow a pc character, it applies blind and restrain to them. at the start of the monsters turn, the player would need to do a con save or take 2d8. it is all working except currently its triggering on the players turn instead of the monsters.

violet meadow
# inner mulch when doing the effects for over time, is it possible to make the effect trigger ...

This OverTime won't help with that exact case.
What you could do is use a macro to force that OverTime on another creature.

Create the OverTime as an effect applied to the creature that swallows the player.
Delete the turn=start from that OT.
Add another entry for a macro.itemMacro below the OT one.
Go to the Duration Tab and choose a macro repeat at start of each turn.

In the ItemMacro of the Engulf Item copy paste this. ```js
if (args[0] === "each") {
const targets = canvas.scene.tokens.contents.filter(t=>t.actor.effects.find(eff=>eff.label === "Engulf")).map(t=>t.actor)
for (const target of targets) await MidiQOL.doOverTimeEffect(target,args.at(-1).efData))
}

#

Let me know if that works 😄

#

Engulf Item will have two DAE effectively.

  1. Engulf as the screenshot, but change the OT you have there, to the roll that the player needs to make in order to free themselves (make it an actionType:true, with no turn so as to only do something if the player rolls the ability needed).

  2. The second will be an Engulf (Self) which will need:
    2a. In the Details tab of the DAE, apply to self when Item is rolled.
    2b. In the Duration tab of the DAE, macro repeat, start of the turn.
    2c. In the Effects tab ot the DAE:
    2c.i: A key for overTime effect, saveAbility=con,saveDC=14,damageRoll=2d8,damageType=acid
    2c.ii: A key for macro.itemMacro | CUSTOM |
    2d. ItemMacro of the Engulf Item with the macro from above.

inner mulch
#

Thanks i will try. My next task is to learn macros

fathom dock
#

Hello hello! Running into an issue with Spiritual Weapon macro from Sample Items compendium, I've thrown spiritual weapon onto the character, and created the Spiritual Weapon actor with the attack appropriately named, however, i'm getting this error when attempting to use the spell:

digital lagoon
digital lagoon
#

Hopefully that’s your fix - at any rate if you were still using the old midiQOL sample items compendium this one will give you working versions of what was there plus much more stuff. And I believe bugbear is planning to do a full release in the near future.

#

If you continue to have problems setting up the new one some of the midi wizards here will definitely be able to help.

fathom dock
#

o7, installing atm, will do some more testing

violet meadow
#

The MidiSRD is still being worked upon. I really wanted to have it out by now, but some IRL issues delayed the plans and now I ended up reworking more stuff...
Testing various thingies 😅

quiet solar
#

the example Spiritual Weapon worked fine for me on V10 (even back on midi 10.0.23?)

#

@fathom dock do you have all the requirements?
warpgate
an actor named Spiritual Weapon with the right attack set up?

fathom dock
quiet solar
#

it wasn't from midi-srd though, it was an example in midi-qol

violet meadow
#

Yeah they both have one

digital lagoon
violet meadow
#

now I am testing retroactively changing the msak of this kind of spells, in case the caster becomes blessed or something while the Spiritual Weapon is active

dark canopy
#

slap an item macro in the slash attack that grabs the controlling actor's rolldata and substitutes it for its own?

fathom dock
scarlet gale
#

Or use a synthetic item to roll the attack

violet meadow
short aurora
#

But that's also the midiSRD one, no? The one in midi qol only uses Warpgate

violet meadow
#

oh lol that shoulds be there...

#

what the heck

#

let me check something

quiet solar
#

my setup is pretty manual - it definitely would not handle any temp effect on the caster (and requires manually updating the actor if the caster's spell modifier changes)

short aurora
#

The midi sample item one places the effect so you can dismiss it/has auto expiry

quiet solar
#

sorry - I meant like "bless"

fathom dock
#

Ok, so Disabling the hook lets it deploy properly!

violet meadow
#

It's in the Readme

short aurora
#

just sneak in a forceful game.settings override

violet meadow
#

I think it is 10 whole lines 🤣

#

I need to change that too

short aurora
#

save yourself the heartache

digital lagoon
fathom dock
dark canopy
violet meadow
#

I have had a system in place with MidiQOL/DAE flags that would auto update, but something has changed in the meantime. Trying to figure this out now.

#

If it isn;t solved in the next 20mins, then ItemMacro or a synthetic Item it is

dark canopy
#

i can potentially do it without any flag data, that's the goal, at least

#

just letting you know -- if you find any approaches, i would be interested in seeing how they work out

violet meadow
#

I was testing the event system but this is for another day

fathom dock
#

Hrm, should the Spiritual Weapon's slash have a specific formula in it's damage field?

violet meadow
fathom dock
#

I know with the sample items, it states that it should pull the damage formula automatically, but don't know if that's the case as well with the new one I'm using from Midi SRD

dark canopy
violet meadow
fathom dock
#

roger roger, i'm actually bouncing to go to a doctor's appointment, but I'll be back in a bit to do more testing on my end!

vast bane
#

Generally speaking everyone in this channel, if you ever see Itemacro in an error, you are midiqol'ing wrong.

snow quarry
#

Hey all! Is there a midi flag for rolling hit dice at advantage? (During a short rest)

kind cape
#

99% sure that there is not

#

Mostly because Midi does not really have any mechanics for short/long rests, mostly

vast bane
#

if you have multiclassers, RIP.

snow quarry
#

I may just be lazy and alter the items ability XD. I appreciate it though!

vast bane
#

world script territory sadly for any hd rolling shennanigans unless you make it a feature on the player that they roll

#

cause the dnd5e system decided to make the hit dice a drop down that can't be edited on the class feature 😦

snow quarry
#

mechancially speaking, does this descrption make sense?

Each stimulant comes loaded into an injector and ready for use. The stimulants are used as a part of a short rest, and allows the recipient to add an additional bonus to any hit dice they choose to expend. The bonus is equal to the size of the creature's hit die.

However, when a stimulant is used, the recipient receives one level of exhaustion. The stimulants allow for additional healing, but they put a great deal of strain on the body when active

(essentially you roll 1 hit dice but only spend one- this is achieved via foundry by adding a situational bonus = to the hit dice spent)

snow quarry
#

Is this an appropriate venue to ask about Dynamic active effects? (DAE)

I had my 'apply active effects' working earlier but now pushing that button does nothing when the item is rolled 😢

#

No updates, or changes as far as I'm aware.

short aurora
#

The modules are made by the same person and often inextricably linked, so I figure it's fair game. Can you take a screenshot of your item's setup? (the item itself and the effects window), is it spitting errors out at you?

vast bane
snow quarry
#

No errors, but here are some screenshots. its a bit frustrating since I KNOW this was working before (probably a month or so) Come in to do some last minute prep for Friday & check everything.. and now its not working XD.

#

clicking these does nothing

vast bane
#

DAE does not do effect transfer

snow quarry
vast bane
#

you either have no target, or you had no target when you rolled the item

short aurora
#

Checkbox for apply to self is toggled, tho

vast bane
#

oh that'll do it

#

thats wrong

#

uncheck that first tab box

#

instead on the item itself for range/target set it to self/self

#

those checkboxes in the first tab are for abnormal effect transfers

#

think of a weapon that requires a target, but applies a self ae

#

thats what your checkbox was for

#

For those not aware, this is one of those moments where we get to see our brethren in sw5e system lol

#

the other midiqol system

snow quarry
#

so i DONT want to apply it to myself?

vast bane
#

you do, just that tooltip for that checkbox is misleading

#

to apply a self buff, you need the items details target/range to say self/self

#

the checkboxes in the first tab of the ae are for special occasions and not for yours

#

standard effect transfer should have none of those boxes checked

snow quarry
#

hmm well its working, but i DO need to target myself first. otherwise it wont

vast bane
#

unless ofcourse the item you are using is a target item that applies a self buff too, then you check that box, for us dnd5e fellas, that would be like a weapon that hits a bad guy but also buffs the wielder

vast bane
#

sorry my system is abnormally slow right now

vast bane
#

midi follows the effect transfer guidelines of the target/range fields in dnd5e, pretty sure something similar exists in your item details

snow quarry
#

ah. let me check that part

vast bane
#

is your stim thing a self only buff?

#

or should it target others?

snow quarry
#

self only

#

i suppose someone could inject someone else but for that i would just have them use the item

vast bane
#

for the stim thing you probably don't want it to be an ae

snow quarry
#

I just want it for the timing mostly so they know when it wears off

vast bane
#

I dunno how much sw5e shares with dnd5e but modding hp with an ae is usually bad

snow quarry
#

yeah im not putting any flags in it. just a timer for the icon

vast bane
#

unless its an overtime

#

ok then you gucci

dark canopy
#

not to mention, this is v9 foundry with sw5e forked from who knows when

snow quarry
#

yes, v10 doesnt play nice with it yet

vast bane
#

yeah I was suspecting a v9 build due to the missing checkboxes in the dae

snow quarry
#

so im not going to risk my whole campaign XD

vast bane
#

Always nice to see a sw5e fella around these parts hope we hooked you up well

snow quarry
#

yessire, ty kindly

#

I was 5e before this, so im switching it up. next will probably be pathfinder 2e

vast bane
#

it works here cause even though we're a dnd5e thread, midi itself is sw5e and dnd5e

snow quarry
#

indeed

vast bane
#

unofficially ofcourse

dark canopy
#

sw5e has also moved on to 2.1.x

#

for v10

vast bane
#

I know of a certain badger who still rocks v9 for their campaign ;p

dark canopy
#

and?

snow quarry
#

maybe for the glowrod i just need to change the item type as right now it doesnt allow a target since its considered "loot". may need to make it into a consumable

vast bane
#

I was just bein silly

snow quarry
#

its odd to me that as long as whoever is using the glowrod targets SOMETHING, it works on THEM. not the target

vast bane
#

Foundry can be jarring with all its changes especially on the players, DM's see more of the backend and can adjust

snow quarry
#

which is what we want- its just weird for me to understand why its doing that

vast bane
snow quarry
#

same deal if it is unchecked

vast bane
#

hmmmm whats the item details look like

snow quarry
#

thats what i mean, "loot" doesnt have a details tab. so i probably need to change the item type

vast bane
#

OH

#

this happens in dnd5e too

#

that is a funny dae interaction

#

loot is suppose to be like literaly the dumbest item type with nothing to it, but somehow the dae wrench lets you put dae's on it

#

you should probably change its item type

#

loot really shouldn't have dae's on it hehe

snow quarry
#

fair enough. i shall make the appropriate adjustments!

Final question- does anyone happen to know if there is a way to send a message to chat when a timer expires? / an effect wears off

vast bane
#

yep I do precisely this for the command spell

#

oh shit, I dunno if you can do it

snow quarry
#

i can try to adapt it

vast bane
#

I do it with effect macro, I know its v9 compatible, but I don't know if zhell made it work with sw5e

#
ChatMessage.create({content:`The command must be followed now.`})

This is my on deletion effect macro for Command

#

I suppose also we need to know if ChatMessage.create is a function in sw5e

#

And I set a special duration in the duration tab, pretty sure you have this access:

#

pretty sure the combat centric special durations are DAE, you might need times up

snow quarry
#

This should work, thank you!