#MidiQOL

1 messages · Page 81 of 1

dark canopy
#

and you may need to modify the mutation name if you are mutating multiple times on the same actor

broken wolf
#

Yeah, Pistol and Musket. It gives me a warpgate duplicate name error though, yellow not red

dark canopy
#

yea, indicating the mutation wasn't applied

#

as i use the name as a unique id (for better or worse)

broken wolf
#

Would it be the “boom gun” name towards the end of the macro that I need to change?

#

Only thing in both items that is the same when I look

dark canopy
broken wolf
#

Okay looks like I can do something generic like “small boom gun” from what one seeing

dark canopy
#

use the item name/id as part of the mutation name

broken wolf
#

Oh that’s a better idea

scarlet gale
violet meadow
#

Can you delete the second entry for actionType?

scarlet gale
#

Apparently setDamageRoll doesn't change the chat card on the uncombined card

violet meadow
#

Should only be the abil one

nimble gull
#

hello.

#

Does anyone know how to get Midi-SRD installed? I keep getting an error message about a metadata file failing validation...

violet meadow
#

Almost done

nimble gull
#

Okay. Thank you for the work that you do ❤️ (I'm also super glad I'm not doing something wrong. XD)

violet meadow
#

Nah it's not yet compatible with v10. I have a working fork but there will be quite a few changes from that one, so you would be better served if you waited a tiny bit more 😁

violet meadow
#

Also is there a reason that you don't return a bonus instead of altering the original roll?

#

These items are more or less the reason why the damageBonusMacro exists 😅

#

@quiet solar I think you use MidiQOL correct?
It has a function already for distance checking.
MidiQOL.getDistance in console

quiet solar
violet meadow
#

Yeah I just happened to see your question and that was the easiest answer

#

There are quite a few shared examples in macro polo for distance checking with rays etc if you still need it though

#

I would suggest typing MidiQOL. in console and going through the auto complete options for the exposed functions

#

Same with DAE.

scarlet gale
#

A lot less work to do when I know it's all just in the damage roll

violet meadow
#

I am trying to pin down a routine on how to deal with multiple onUseMacroName triggers, on the same event on the same actor.

It's not easy to pass the damage List correctly if for instance you have the Retribution feature and a Fire Shield doing damage at the same time 😁

scarlet gale
#

That's why I setup a priority queue for mine. And started looking at the damage roll instead of damage details when I'm looking for a specific type of damage

#

Updating the roll doesn't update the damage details right away

violet meadow
#

I close my eyes and remember my days playing StarCraft with the amount of things I have been using warpgate for, the last couple of days

dark canopy
#

there is a reason its named what it is

#

For Adun!

scarlet gale
#

Out of curiosity, what is this doing?

#

Is it just for mutations?

dark canopy
#

shakes head, its a method that will queue arbitrary functions to be run sequentially

#

at the moment, there is no way to wait for the queue to complete -- so treat it as "the final step" for your operations, which are race condition dependent

scarlet gale
#

ah

#

If it could do priority too, I would swap out mine with this

dark canopy
#

"go do this update, safely, at some point in the future -- i wont be back to check your work"

dark canopy
#

currently, its a FIFO queue

scarlet gale
#

yea, so not as much use for me then

#

But good to know it's there if I need something like this

dark canopy
scarlet gale
#

My use-case is multiple on use macros all firing at the same time for reasons and I need to make sure some wait for others to complete first

#

It comes up for me when I have class features that require damage rolls to have a certain damage type

dark canopy
#

ew

#

lol

scarlet gale
#

and other class features adding potentially different damage types to the roll

#

Midi just has all on use macros for the same workflow state run at the same time

#

¯_(ツ)_/¯

#

It also prevents me from getting multiple pop-up dialogs overlapping each other when multiple class features with dialogs happen

dark canopy
#

makes sense, given the environment i guess

scarlet gale
#

I've asked tposney about it before. I'm abusing midi on use macros more than was expected when it was developed

dark canopy
#

it is a bit tricky to manage sequential macro execution

scarlet gale
#

Yea, I wound up just finding a javascript implementation of a priority queue and making a system around it

#

Any of my macros that need to go in a specific order just wind up sleeping while waiting for their turn in the queue

#

and times out after 5 minutes

broken wolf
#

Once I get the duplicate name thing solved I’d like to add in the proficiency thing we attempted earlier and the chat message cause that’s just cool lol

violet meadow
violet meadow
#

I think I will at some point create a reload/misfire function and integrate it into my Loadout macro 🤔

scarlet gale
#

I have a pretty crappy one that I was using

#

All this discussion about it makes me want to remake it

broken wolf
#

I did have a follow up though. So the musket and pistol are both one shot and then you have to load, so I want to use the consumable drop down and force the action to load the weapon again. That make sense?

tepid dock
#

Anyone able to help with an ItemMacro script for a homebrew ability? I am stuck with making a workflow for rounds compared to RL time.

kind cape
tepid dock
# kind cape What is it you are trying to do?

Its for a custom resource, but this is the description:
Spend 1 to 6 Holy Power - A divine blade descends down on your target, after an amount of rounds equal to the amount Holy Power spent, the blade strikes your foe.
1 Holy Power: 1 round, 3d4+2
2 Holy Power: 2 rounds, 3d6+4
3 Holy Power: 3 rounds, 3d8+6
4 Holy Power: 4 rounds, 3d10+8
5 Holy Power: 5 rounds, 3d12+10
6 Holy Power: 6 rounds, 3d20+12

tepid dock
# kind cape What is it you are trying to do?
// Prompt the user to select the amount of Holy Power to use
const options = Array.fromRange(actor.system.resources.tertiary.value, 1).reduce((acc, n) => {
  return acc + `<option value="${n}">${n} Holy Power</option>`;
}, "");

const content = `
<form class="dnd5e">
  <div class="form-group">
    <label>Amount of Holy Power to use:</label>
    <div class="form-fields">
      <select>${options}</select>
    </div>
  </div>
</form>`;

const holyPowerSpent = await Dialog.prompt({
    title: "Consume Holy Power",
    rejectClose: false,
    content,
    label: "Consume!",
    callback: (html) => html[0].querySelector("select").value
});

if (!holyPowerSpent) return;

const target = game.user.targets.values().next().value;

if (!target) {
    ui.notifications.warn("You must have a target selected to use Execution Sentence.");
    return;
}

const dice = [
    {count: 3, sides: 4, modifier: 2},
    {count: 3, sides: 6, modifier: 4},
    {count: 3, sides: 8, modifier: 6},
    {count: 3, sides: 10, modifier: 8},
    {count: 3, sides: 12, modifier: 10},
    {count: 3, sides: 20, modifier: 12},
];

const {count, sides, modifier} = dice[holyPowerSpent - 1];

// Update Holy Power resource
await actor.update({[`data.resources.tertiary.value`]: actor.data.data.resources.tertiary.value - holyPowerSpent});

// Execute the delayed damage
setTimeout(async () => {
    const damageRoll = await new Roll(`${count}d${sides} + ${modifier}`).roll();
    new MidiQOL.DamageOnlyWorkflow(actor, token, damageRoll.total, "radiant", target ? [target] : [], damageRoll, {flavor: `Execution Sentence Damage Roll (${holyPowerSpent} Holy Power)`})
}, holyPowerSpent * 6000);```

And the macro itself what I have so far. It works, just works off real time rather than round combat. So if its used, even during combat it just happens after X amount of real life seconds have elapsed.
dark canopy
#

actor.data.data.resources.tertiary.value -- this v10? data.data -> system

tepid dock
tepid dock
dark canopy
#

and be careful about using actor -- for unlinked tokens, it refers to its sidebar actor

kind cape
#

@dark canopy You had a convenient method for turning a function into a string object or was that Zhell? 🤔

dark canopy
#

maybe zhell, i try not to serialize functions

#

nor do i encourage it 😅

tepid dock
kind cape
dark canopy
scarlet gale
kind cape
#

Oh I see 🤔

scarlet gale
#

It's weird but it works

kind cape
#

Yeah I see it now, it makes it into a function wrapped in () with a () after it 😂

scarlet gale
#

Zhell showed me it

dark canopy
scarlet gale
#

I use it when I need to embed an effect macro in an item macro

dark canopy
#

resources is a system specific field facepalmpicard

kind cape
kind cape
#

👍

#

Just another moment

tepid dock
# kind cape 👍

No worries, also if you needed access to my campaign let me know I wouldn't mind doing that either. Or just... ya know hiring you for a while? 😬

kind cape
#

Don't worry, its a fun little project 😛

tepid dock
inner mulch
#

so i have asked this i think a number of different ways but never specifically. using active effects and active auras am i able to make an aura effect that forces anyone that starts their turn in the aura to make a con save, then if failed apply a condition? i keep trying different things and not getting that effect.

solid mountain
#

How can I add an existing attribute on the effect value?

#

Like system.attributes.movement.walk/2

vast bane
#

replace system with @

#

you might have to use an inline roll for it I forget

kind cape
#

Alright, had to make sure it worked as intended, can you try this macro @tepid dock

// Prompt the user to select the amount of Holy Power to use
const options = Array.fromRange(actor.system.resources.tertiary.value, 1).reduce((acc, n) => {
  return acc + `<option value="${n}">${n} Holy Power</option>`;
}, "");

const content = `
<form class="dnd5e">
  <div class="form-group">
    <label>Amount of Holy Power to use:</label>
    <div class="form-fields">
      <select>${options}</select>
    </div>
  </div>
</form>`;

const holyPowerSpent = await Dialog.prompt({
    title: "Consume Holy Power",
    rejectClose: false,
    content,
    label: "Consume!",
    callback: (html) => html[0].querySelector("select").value
});

if (!holyPowerSpent) return;

const target = game.user.targets.values().next().value;

if (!target) {
    ui.notifications.warn("You must have a target selected to use Execution Sentence.");
    return;
}

const dice = [
    {count: 3, sides: 4, modifier: 2},
    {count: 3, sides: 6, modifier: 4},
    {count: 3, sides: 8, modifier: 6},
    {count: 3, sides: 10, modifier: 8},
    {count: 3, sides: 12, modifier: 10},
    {count: 3, sides: 20, modifier: 12},
];

const {count, sides, modifier} = dice[holyPowerSpent - 1];

// Update Holy Power resource
await actor.update({[`system.resources.tertiary.value`]: actor.system.resources.tertiary.value - holyPowerSpent});

async function damageTrigger(count, sides, modifier, uuid, holyPowerSpent) {
    // Execute the delayed damage
    let actorD = await fromUuid(uuid);
    const damageRoll = await new Roll(`${count}d${sides} + ${modifier}`).roll();
    new MidiQOL.DamageOnlyWorkflow(actorD, actorD.getActiveTokens()[0], damageRoll.total, "radiant", token ? [token] : [], damageRoll, {flavor: `Execution Sentence Damage Roll (${holyPowerSpent} Holy Power)`})
}

const effectData = {
    "changes": [],
    "disabled": false,
    "origin": null,
    "tint": null,
    "transfer": true,
    "duration": {
        "rounds": holyPowerSpent,
    },
    "icon": "icons/magic/holy/projectiles-blades-salvo-yellow.webp",
    "label": "Execution Incomming",
    "flags": {
        "core": {
            "statusId": "true"
        },
        "effectmacro": {
            "onDelete": {
                "script": `(${damageTrigger.toString()})(${count}, ${sides}, ${modifier}, "${actor.uuid}", ${holyPowerSpent})`
            }
        }
    }
}


MidiQOL.socket().executeAsGM("createEffects",{'actorUuid':target.actor.uuid, effects:[effectData]});
tepid dock
inner mulch
#

could anyone tell me why this is not triggering at the start of the turn? it is set as an aura at 10 ft. i can make it actually do the correct effect if i click on the feature manually. but i would like it to do it itself.

#

it seems like the aura portion is not working but i cannot tell

spice kraken
#

Well if they save and it is removed (cause saveRemove defaults to true) there is nothing to do at the start of the turn

inner mulch
#

there is no save it is set to go away at the start of their next turn

spice kraken
#

You not putting it there is the same as putting saveRemove=true,

inner mulch
#

they dont roll a save though? does it not show them rolling a save for that?

#

let me add it to see if it changes

spice kraken
#

Well what the general flow of all this

inner mulch
#

Each creature that starts its turn within 10 feet of the corpse flower or one of its zombies must make a DC 14 Constitution saving throw, unless the creature is a Construct or an Undead. On a failed save, the creature is poisoned until the start of its next turn. On a successful save, the creature is immune to the Stench of Death of all corpse flowers for 24 hours.

spice kraken
#

No

#

Like how is the aura made, are you sure it's applying, what the turn order is, etc

inner mulch
#

for the aura i have this

#

been reading through documentation and walkthroughs for days now and none of it seems consistent or to make much sense to me sadly.

spice kraken
#

Hard to tell in the picture but the Check creature type did you type that out?
Also are you in combat?
And check the Apply AE button

inner mulch
#

it is in combat, i left check creature type alone, the text is default greyed text not an entry, and do you mean the apply active effect icon to affected tokens button? as otherwise im not seeing the apply ae button

#

also thank you for the help

spice kraken
inner mulch
#

toggled that one and no change there. added another character to the combat to see if it changed, it seems like the aura settings arent doing anything

#

when i trigger it manually it only hits if im targeting a actor

spice kraken
#

Ooh, do this, uncheck that second last one

#

Applying only on their turn

inner mulch
#

no change there either

spice kraken
#

Hmm

#

Let me see

#

Is this a normal monster or a homebrew one

inner mulch
#

an altered corpse flower. but i added it myself so homebrew i suppose

spice kraken
#

From Tome of Foes?

#

Imma try and re-create it

inner mulch
#

i believe so

spice kraken
#

Give me a few to get back to my pc and test

inner mulch
#

ok thanks again for the help'

tepid dock
spice kraken
# inner mulch ok thanks again for the help'

Np
I do wanna add one thing. I personally wouldn't use this as an aura cause of this part of the description

On a successful save, the creature is immune to the stench of all corpse flowers for 24 hours.

#

Cause if they do save, and the aura is setup right, the AE is gonna get applied to them again and they'd have to save, over and over again

#

So with that info, do you want me to still try and configure the aura or do you wanna handle this like a targeted attack/save

inner mulch
#

i would like to still get it working as i have another that does similar but does not have that immunity

spice kraken
#

Alright, give me a few

inner mulch
#

thanks again

spice kraken
#

It's been a minute since I used auras but I got it working but not right

#

I could only get it to work if I applied to self here

#

But that's not good cause then the plant itself also gets hit with it

inner mulch
#

yea i got that to where it applied to itself

spice kraken
#

Ahhhhh

#

Got it

#

Don't make it on the feat

#

Make it as a passive effect on the creature

inner mulch
#

trying it now

spice kraken
#

Just remember, if they succeed on the save, leave the aura, and come back, it will reapply

inner mulch
#

so for him i can leave it as is on the feat. but for the summoned zombie i can make it on him and it will work properly

#

that helps a ton for figuring out what i was doing wrong with this

gilded yacht
#

Custom attempts to evaluate to true/false and to allow expressions attempts to Roll.safeEval the formula, not sure why -3 returns an error, but in any event if you want a numeric value there put in override/upgrade/add instead of custom

solid mountain
#

I wonder if this could be automated?
While you are on the ground, the ground within 15 feet of you is difficult terrain for your enemies.

gilded yacht
#

It's a midi bug - will be fixed in 10.0.34

scarlet gale
gilded yacht
#

fixed in 10.0.34

solid mountain
scarlet gale
#

active aura to reduce the walk speed of those around you

#

it'll look weird

#

personally, I just wouldn't bother with it

mighty pier
scarlet gale
#

just put like a visual aura with automated animations and call it a day

solid mountain
#

That sounds like it could cause a lot wierdness with walking in and out and such.

scarlet gale
#

oh for sure

stray bison
#

I've been catching up and noticed this question and figured I'd answer with what I've done. I figured that the triggering event was so broad (any successful d20 roll within 60 feet, basically) that it would be annoying for the player to get a reaction prompt every single time it happened, so I made it "reaction manual" and will make sure the player knows they'll have to mention when they're using it. Then I figured that it would be easy enough to manually reroll whichever roll they wanted to interrupt, and I made an effect that gave the target advantage on all saves and attack roles - I'll tell my player to target the person they want to receive the benefit when they cast the spell.

gilded yacht
scarlet gale
#

Silvery barbs is a tough one to do since you'll wind up having to prompt on every single attack and that'll slow down combat

#

I just have my players roll a d20 after they do a manual reaction for it

#

and hit the undo button if it changes the outcome

stray bison
#

Yeah, that's what I'm going to do.

flat gazelle
#

Is there a way to differentiate between voluntary movement and forced movement 😅 ? One of my players has repelling blast and another one has booming blade... 😅

solid mountain
#

The bug where midi applying dfred is not applying nested effects is odd. I really should make a git for it.

#

I wonder if it is midi or dfred.

violet meadow
gilded yacht
solid mountain
gilded yacht
#

Create it in midi since dfreds does not have visibility of the midi shenanigans

broken wolf
broken wolf
#

maybe im just not seeing it, but is there not an option to see the dice rolls for saving throws? looked through the settings like 5 times now and im just not seeing it, just the result in chat, but id like the dice to be rolled on screen if possible

violet meadow
#

How is the save triggered?

vast bane
#

prolly has the two settings for DM's set wrong in DSN

#

If you want the dm's stuff to roll 3d dice you want these settings in DSN set this way:

broken wolf
#

i love how your initial response is that i always have something set wrong lol, havent even touched DSN settings lol

#

settings when i open DSN

vast bane
#

If something is not working then something is wrong /shrug

#

is the save on the item or in a macro

broken wolf
#

so ill see the result on the chat, but i want them to see their rolls for it

violet meadow
#

Can you share the final macro you're using right now?

#

```js
code here
```

broken wolf
#

yeah one second, was about to message you about the proficiency thing we were trying to add cause that part isnt working correctly

#

code

const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if (!actor || !item || !tokenUuid ) return;
let misfireScore = 1;
if ( !item.system.proficient ) misfireScore += 1;
const tokenDoc = fromUuidSync(tokenUuid)
if (!!d20AttackRoll && d20AttackRoll <= misfireScore) {
  Hooks.once("midi-qol.RollComplete", async () => {
    const updates = {
      embedded:{
        Item: {
          [item.name]: {
            name: item.name + " (destroyed)",
            flags: {"midi-qol":{onUseMacroName:"[postActiveEffects]ItemMacro"}},
            system: {
              ability:"int",
              actionType:"abil",
              target: {type:"self"},
              actionType: "other",
              damage: {parts:[],versatile:""},
              formula:"",
              save: {ability:"dex",dc:8 + Number(misfireScore),scaling:"flat"}
            }
          }
        }
      }
    }
    await warpgate.mutate(tokenDoc ,updates,{},{name:"pistol"}); 
  })
}
if(!d20AttackRoll && this.saves.size > 0) await warpgate.revert(tokenDoc,"pistol")```
violet meadow
#
actionType:"abil",
target: {type:"self"},
actionType: "other",
#

Delete the ```js
actionType: "other",

#

and you should be fine

broken wolf
#

fine for the dice rolling on screen? (didnt) or the proficiency thing

#

the function works, we just dont see dice when we do the roll to try and fix, just the end results in chat

vast bane
#

how are you rolling it?

#

does the user rolling it have other dice rolling?

broken wolf
#

yup, everything but the saving throw

#

wait hold up, one sec

violet meadow
#

You have the MidiQOL setttings for save to Auto right?

#

ohhhh

broken wolf
#

im using whatever settings you had me import yesterday during our tests

#

i did just see the saving throw roll box pop up like 40 seconds after i did the actual roll, seeing if theres something there

violet meadow
#

You will need to change the setting in MidiQOL settings, Workflow Settings, Workflow

#

The bottom 2 are Auto for you, correct?

broken wolf
#

yeah

violet meadow
#

Auto will not show the DSN

broken wolf
#

gotcha

violet meadow
#

Make it either Chat Message or something else using the other modules (if you have them). MOnks tokenbar and Let Me Roll That For You

#

If it's chat message, a message will appear saying, you need to make this roll and wait for you to roll it

#

Until the timeout (Delay before rolling for players setting) passes at least and then auto rolls

broken wolf
#

okay now its not rolling anything at all for saves when before id at least see the result, when we click the item again to do the roll, how we set it up, just the gm message appears now, before i at least saw the results lol

#

the system now just waits for the auto roll to go off, lol

violet meadow
#

Just open the character sheet and roll manually

#

it will pick it up

#

Or use Monks Tokenbar module, which will pop a nice message to click to roll

soft haven
#

worked well, thanks a bundle

hoary wagon
#

Hello, I'm having an issue with Concentrator, it's not removing the concentration on a failed save

#

Also, I can't remove the concentration status from the token, I need to remove it on the effects tab on the sheet

#

OK, it seems I need to select save automation, and then Monks Token Bar to allow the player to roll

delicate yacht
#

Hello, fin Adventurers !

I'm sorry to beg in this manner but I'm desperate at this point...

I'm trying to setup spells automations and I can't figure out how to do it :

  • Web : features of entering the web with the save asked and the effect restrained apply
  • Sleep : I don't know where to begin with...
  • Maelstrom : I want to know if it's possible to move automatically a token or if I have to move them manually (not a problem at this point) and if this overtime effect is good : turn=start, saveAbility=str, saveDC=@attributes.spelldc, rollType=save, saveDamage=fulldamage, damageRoll=6d6, damageType=bludgeoning

For the next ones :

  • Wall of fire (Circle and Line)
  • Control winds (Gust and Downdraft only, updraft I will only apply a zone and it will not be automated)
  • Wrath of nature (Grasses and Undergrowth : enemies move macro ?/Trees/Roots and Vines/Rocks)

I want to create multiple items (those between parentheses) with the automation and all but with this maccro :

const actorD = game.actors.get(token.actor.id);
const berry = game.items.getName("Goodberry").toObject();
berry.data.quantity = 10;
await actorD.createEmbeddedDocuments("Item", [berry]);

How do I do it and are these possible or do I search to much ?

Thank you for your time and if you want, you can DM me if it's more practical.

Have a nice evening/day and may the gods be with you !

scarlet gale
#

There are a ton of already made sleep automations around. The DDB importer has a good one, as well as Crimic. Web can be done with AA templates, may already be one around somewhere?

short aurora
#

I'm spying Web in midi srd that's rumored to get an update soon, so I'd peek at that when the update hits.

For difficult terrain stuff, I think you'd need to macro that yourself using other modules too, unless I missed some development? Terrain Ruler + Enhanced Terrain Layer + Drag Ruler...?

worthy wraith
#

Midi QOL has just started automatically rolling every attack with advantage. It started after I wildshaped a player, but hasn't stopped. Any ideas please?

short aurora
worthy wraith
#

all players ddb importer

#

infact all players and npcs

short aurora
#

Okay, my idea was a stuck "pack tactics" or something similar automated feature, but if it's everyone, then that sounds unlikely. Does this happen only with Midi and dependencies on?

worthy wraith
#

yes

#

as soon as i turn midi off it goes away

#

i get a funny warning in the console

#

sec

short aurora
#

I just realized I have a similar issue. What version of midi do you have?

#

sidenote for comedy, looked up that line in the script and it has this lovely comment above it

worthy wraith
#

10.0.34

short aurora
#

Ditto. In a new world, I also roll with advantage everywhere, but mine says due to "hidden", so not quite the same as yours... Are you attacking different targets in your tests?

worthy wraith
#

yeah lots of different targets, player vs npc and visa versa

#

Its just stopped doing it!

short aurora
#

._.

worthy wraith
#

I haven't made any changes since talking to you, earlier I shut down foundry, came back and it was still doing it

short aurora
#

WELP, praise be, if it works, it works

worthy wraith
#

actually it is still doing it. Its very odd.

short aurora
worthy wraith
#

It wasn't for some tokens vs other tokens then it started again

short aurora
#

the new version did touch on some grants flags which your console is talking about

#

you can try downloading the older version if you need something in the meanwhile, but no guarantee that wont bork things

worthy wraith
#

yeah

worthy wraith
#

I think I've sussed it out. I had an active effect on one of the enemies, and it seemed midi transferred that to anything that hit it. I've completely cleared the canvas and added everything back and its stopped.

scarlet gale
#

If it was after a wild shape the actor probably didn't have vision setup right

worthy wraith
short aurora
violet meadow
#

The advantage due to being hidden, indicates some times that vision is not setup correctly on the tokens involved

#

If you have that option in MidiQol settings (under Rules tab) enabled, you NEED to make sure that all tokens have vision set up.

rigid kindle
vast bane
#

Just love it when I see a feature request of mine utilized, I feel heard hehe

#

Added rollMode to overtime effects settings. You can specify gmroll, blindroll, publicroll, selfroll and the rollmode will be applied to the overtime item roll

#

Now things like regeneration will not be spoiled by a public roll

violet meadow
#

Do you ever do attacks against multiple targets (with that ability)?

rigid kindle
compact spade
#

So im new to coding things in MidiQOL and i have a question im hoping someone can point me in the right direction. I would like to create the defender role in 5e as an aura? The goal is to create an aura that targets any ally within 5ft of the token. Any enemy targeting the ally will have disadvantage imposed on any attacks against that target Any ideas how to start?

rigid kindle
wheat marten
#

Autodamage in Midi is throwing this error, anyone know what it might be related to?

vast bane
# compact spade So im new to coding things in MidiQOL and i have a question im hoping someone ca...

all that has changed I think with the newest midi, theres now two new hooks to stop attacks. But generally third party reactions are janky at best. You use an active aura, that gives the allies an item via the key macro.createItem that is a reaction that uses 0 reactions and the players ask each other if they are using the reaction or not. I personally think this is a good idea cause it helps the players remember they have them.

#

you will need to wait for the guru's to dive into the new hooks to see how to kill a workfow or change one to disadvantage with the changes in 34 though

short aurora
violet meadow
# rigid kindle I based this on a MrPrimate macro. Would the current version not roll for other ...

Also if you do something like js const roll = await new Roll('1d6[acid]').evaluate({async:true}) await game.dice3d?.showForRoll(roll, game.user, true); //creates a promise and you await it to resolve await ChatMessage.create({ content: "You did it again! Message created" }); it will the message will be created only after the DSN has finished rolling, compared to ```js
const roll = await new Roll('1d6[acid]').evaluate({async:true})
game.dice3d?.showForRoll(roll, game.user, true); //creates a promise but you don't await it to resolve
await ChatMessage.create({ content: "You did it again! Message created" });

delicate yacht
#

Hello again, fine Adventurers !

I found how to do Maelstrom and Sleep but the other spells continue to escape my grasp :

  • Web : all the spell
  • Wall of fire (Circle and Line)
  • Control winds (Gust and Downdraft only, updraft I will only apply a zone and it will not be automated)
  • Wrath of nature (Grasses and Undergrowth : enemies move macro ?/Trees/Roots and Vines/Rocks)

I want to create multiple items (those between parentheses) with the automation and all but with this maccro :

const actorD = game.actors.get(token.actor.id);
const berry = game.items.getName("Goodberry").toObject();
berry.data.quantity = 10;
await actorD.createEmbeddedDocuments("Item", [berry]);

Is the macro good or do I need to change some things? (like the berry at the third and fourth lines? what does it mean ?)

Thanks again for your advises @scarlet gale and @short aurora

violet meadow
vast bane
violet meadow
#

Ah is it not an always on thingy?

vast bane
#

they said defender, I assume thats either steel defender or defender sidekicks

#

which have use reaction to impose disadvantage on an attack targetting an ally within 5ft of defender

#

could also do that active aura but have it shutoff whenever their reaction used effect is on them

#

but then you are manually handling reactions still, imo the item creation is best cleanest janky way to do a third party reaction

short aurora
#

If the aura is just a range indicator, I would not make an aura beyond maybe visually

vast bane
#

can have the reaction gifted by the defender also apply the reaction used to the defender on use, and link the aura to their reaction

compact spade
#

I was thinking aura since its can be applied to whjoever is 5ft from the character with this feat

vast bane
#

I found that even just putting blank items in to prompt the reaction was just as good cause then everyone remembers the reactions exist

rigid kindle
violet meadow
#

The Aura should then create a Reaction Item on valid targets (allies within 5ft)

vast bane
#

When I first handled protective bond, a similar reaction setup, the players NEVER remembered it existed. The second I added the created item to them that prompted for reactions, they suddenly were using it all the time

short aurora
#

It's that whole "react on another token's thing that should be reacted to", is there a proper way to automate this now?

violet meadow
#

Not yet

#

Easier to do some things though

vast bane
#

the newest midi seems to have made editing the workflow easier not sure if that changes things

#

right now that reaction doesn't work pre 34 does it?

violet meadow
#

ok let me try to make something

vast bane
#

you can't impose disadvantage after the workflows started

short aurora
#

let him cook™

vast bane
#

didn't he add a reaction in 33 or 34 for targetting?

#

right now we only have Reaction, and Reaction Damaged

#

which happen after the attack and after the damage?

violet meadow
#

.33 yes. Pre Atac

#

Yeah it works fine 😄

#
  1. Create a Reaction Pre Attack Roll feature or whatever in the sidebar and Target empty | empty | Self
  • A DAE with special duration: 1 Reaction and an AE flags.midi-qol.grants.disadvantage.attack.all | Custom | 1
  • an ItemMacro | After Active Effects with a macro: ```js
    const actorUuid = "" //put here the Steel Defender's token.document.uuid
    const effect = duplicate(game.dfreds.effects._reaction)
    await MidiQOL.socket().executeAsGM("createEffects", {actorUuid, effects:[effect]});
2. Feature with Aura affecting allies 5ft around not affecting self. 
- The aura feature with apply a DAE `macro.createItem | Custom | ItemId from the sidebar`
vast bane
#

so that used to be macro only, but now we can do impose disadvantage as a reaction so that makes life easier

#

is there a way to have the aura actor drop their aura while they have the reaction used AE on them?

#

What if we used a uniform naming mechanism for third party reaction auras, where our reaction used ae could seek out any "third party reactions" aura's and disable them until next combat turn?

quiet solar
wheat marten
violet meadow
vast bane
#

yeah I have tagger installed for other stuff

kind cape
dark canopy
short aurora
#

At that point, it seems like you need to track every tokens action/b action/reaction, which I suppose some modules do

kind cape
dark canopy
#

(and ive hacked the dnd5e system to pieces, so a personal curiosity as well)

kind cape
#

The main thing would be about it being part of the system instead of being a separate system, the whole "17 standards" syndrome and just people not being as willing to add new dependencies

#

So I haven't given too many thoughts to the actual contents of it tbh

dark canopy
#

i mean, midi itself could add things like this -- im sure a MR would accelerate greatly

#

yes, others would need to use those features, but "legacy" scripts are a bit ubiquitous round these parts

wheat marten
vast bane
#

I'm pulling a double header this weekend for my games so I did not elect to touch the new dae/midi, I'll be on them on monday

mellow lynx
#

Is there a feature to send a chat message on a failed saving throw?

vast bane
#

Not sure what you are asking for, my guess is you are using auto or chat message option instead of Monks Tokenbar or LMRTFY?

mellow lynx
#

I have an attack that when they fail the save, they are on fire and continue to take damage every round (I'm not going to bother automating that part). I just want an automatic message saying "YOU ARE ON FIRE!" if they fail the save.

vast bane
#

Flavor field on the attack

#

You could also just put a generic active effect on them

#

or better yet automate it, thats actually a really easy automation

#

simple overtime effect

mellow lynx
#
  1. I don't know how to do an overtime effect.
  2. By putting it in the flavor field, it comes up on the chat card before the roll.
vast bane
#

Standby I gotchu

mellow lynx
#

I'm not even sure if this is a MIDIqol thing or if I should hop over to #macro-polo. But I figured I'd start here

vast bane
#

you can change the damage in the overtime to whatever you want

#

I assumed action save cause thats what most onfires are

#

make sure the attack has an attack roll and save setup on the attack, and chck the box for activation true that I show in one of my images above.

#

You add the ae to the actual attack

#

This assumes you are using midi for effect transfer

mellow lynx
#

I'm not running the newest version but it still works. Thank you!

covert mason
#

Has anyone managed to automate Produce Flame?

mellow lynx
mellow lynx
vast bane
mellow lynx
#

ok, let me rephrase....i've taken a TMFX and changed it slightly, so it is no longer in the TMFX compendium.....I'm using macro.execute, but stopping the effect doesn't stop the edited TMFX

vast bane
#

either use effect macro with the two macros for on deletion/oncreation OR install mass edit module and edit your own tmfx, and save it as a preset, then it shows up with the DAE key macro.tokenMagic

#

New ones will show up at the bottom of the drop down in DAE:

#

the editor of TMFX filters is a macro you drag to the hotbar from a compendium that comes with Mass Edit

#

you can also make custom ones in tmfx alone but it involves macros and I hate macros

mellow lynx
#

Alright. Thank you for your help. I really appreciate it

mellow lynx
dark canopy
violet meadow
#

It's SRD too. I will include it in MidiSRD update ✍️

mellow lynx
#

I wish i knew javascript so I could be the one helping instead of the one needing the help

dark canopy
#

stay around and ask questions and try to work out simple requests yourself, even if you dont post 🙂 so that when the answer/help does come in, you can compare notes and find out if/where you went wrong 🧠

#

i like playing the game of "why did the 'fixed' script work when the original didnt?"

mellow lynx
#

I like watching the game of "it works on my end, why doesn't it work on yours?"

dark canopy
#

triage is its own very important, yet generally underdeveloped skill

mellow lynx
#

turns out it was a lack of a comma or they used a ` instead of a '

dark canopy
#

and then you follow that train of thought -- how did javascript interpret it the first time? and what were the effects of it?

#

trying to figure out what a compiler does in the face of an unintended command is big brain stuff

mellow lynx
#

dear god, i don't even want to jump into that rabbit hole

vast bane
#

@scarlet gale Does Chris Premades have a hard requirement of midi 34 yet?

dark canopy
#

haha, that usually comes later when trying to figure out "how did this ever work?", but im going off-topic -- in summation: keep at it, tons of now-module-devs started exactly where you are 🙂

scarlet gale
#

Nah

vast bane
#

not willing to update dae/midi for the game session in an hour but am willing to update your module and fiddle with the new bits

scarlet gale
#

I recently added the version numbers I develop around on my readme

mellow lynx
#

I'd love a single module that does everything that my current 116 modules do

dark canopy
vast bane
#

honestly I kinda don't like how some authors split their stuff up

#

trying to keep my mod count below 65 and Simbuls/monks little details are really makin that hard

violet meadow
#

Mod count is like a peer imposed taboo 😄

vast bane
#

nah I felt it man

violet meadow
#

I have 140 and feel fine

vast bane
#

I had almost 80 and my server is kinda poor hardware and we suffered a session then I chopped off a ton and now my server is like a speedboat

#

though I honestly think alot of my performance hit was Levels

dark canopy
#

ping times and server power will affect some of that, but its mostly client side mods

#

as mods are transferred on load

vast bane
#

that and simbuls cover till he fixes the log

kind cape
#

I'm only at 136, but I have ~5 more I am going to add when I finally update

violet meadow
vast bane
#

I bet I could see huge improvements if I dropped DSN and the animation modules

violet meadow
#

animation yes

vast bane
violet meadow
#

DSN auto sets settings based on Foundry performance setting now

dark canopy
#

in general: mod count is just a canary

#

if something goes wrong, with a ton of modules, its likely modules

vast bane
violet meadow
#

but... performance 😅

scarlet gale
#

Just force the setting with monks or something

violet meadow
#

that too

vast bane
scarlet gale
#

I personally have a strong dislike for client settings

vast bane
scarlet gale
#

Module count is meaningless. If anything you should count the number of hooks they use

vast bane
#

is there a way to override dsn settings vs the core setting for performance?

#

I had a really really awesome server performance last week so I'm utterly petrified to hit any update buttons

scarlet gale
#

The server really doesn't do much other than distribute files and handle connections

dark canopy
#

(save for constant compendium access, that will kill servers)

vast bane
#

I've slowly started to move away from compendiums

scarlet gale
#

It's a cost trade off

#

Not in compendium means more initial load time

vast bane
#

Chris the readme is a 404 error in the manage modules for your module

scarlet gale
#

That's odd

vast bane
#

its not a link to your git, its a link to my drive but it doesn't include the full folder path

violet meadow
#

I have been needing to access the compendium(s) for the MidiSRD stuff constantly and boy oh boy

scarlet gale
vast bane
#

I think you need to make your readme entry that url instead of what it is currently, it sends me to a dead link that is local

scarlet gale
#

I likely flubbed the url

#

I'll fix it when I'm home

dark canopy
scarlet gale
violet meadow
#

I am testing macros being called from compendium Items

scarlet gale
#

I looked at the example midi item that did that and decided against it

violet meadow
scarlet gale
#

The macro was in an item macro (on an item) in a compendium

dark canopy
#

overall, the ideal solution would be to parameterize "families" of spell functions

#

then flag your items with the parameters for their specific needs

#

allowing modification, but also faster data lookups as you can request the compendium index to include your flag data, then cache that locally for future uses in that session

#

so, spike growth, would be something like aoe({...neededBaseData, lifetime: '1 minute', onStartWithin: {...parameters for the "moving through" or "starting in"})

#

something along those lines -- abstracting the "work" from the "data"

#

as currently, midi macros are too intertwined (in general)

violet meadow
#

hmm, that there is some food for thought

dark canopy
#

very long term thing that should be architected and prototyped, but "data driven" code has served me extremely well in foundry

scarlet gale
#

I know I want to eventually just ask for a way to directly call a function as a macro instead of having to go through a item macro or world macro

violet meadow
dark canopy
#

(i feel like that concept doesnt make sense entirely...but i sorta get what you mean)

vast bane
#

Confirming with some more testing but I'm pretty certain that Circle of Mortality and Beacon of Hope are healing over the max of the hp of targets @scarlet gale

#

mismatch on the numbers but you said thats a known issue so disregard that

violet meadow
#

not so trivial for more than one targets, such as for spells like Mass Cure Wounds.
I have one solution to be included in the MidiSRD too'

vast bane
#

I'm not on that version or I would have already switched it out atleast for beacon of hope, circle of mortality would probably require the unconscious and dead conditions to have a version of the grant key that evaluates if the caster has the feature circle of mortality

scarlet gale
#

I didn't realize it would let me. I'll fix in next release by clamping to max hp.

scarlet gale
#

Without doing max healing for everyone like the grants flag would

#

Just didn't take into account an upper limit

vast bane
#

To be fair Circle of Mortality typically can't hit the max lol I was testing on a giant rat, then again it is a low level feature

violet meadow
#

I just untarget the ones with 0 and applyTokenDamage to them.

vast bane
#

yeah its a level 1 feature so it would be possible to hit a player past their max

violet meadow
#

Depending on the settings they might not be targeted already for aoe

#

But are there AOEs for healing 🤔

scarlet gale
#

It's easily fixed

vast bane
#

Mass healing word, mass cure wounds, 2 players in a healing spirit

#

prayer of healing

violet meadow
#

They are targeted individually though

vast bane
#

true

vast bane
#

healing spirit also doesn't happen at the same time

scarlet gale
#

Probably a better way to do it then looking at the roll terms

#

But this will catch something that has healing and damage at the same time

violet meadow
#

Oh well

scarlet gale
#

It'll show up in the damage card for gms

#

My magical inspiration macro does something similar

#

Since it applies to only one target in an aoe spell

violet meadow
#

So many things to do, so little time ahhhhhh

#

btw, .34 has an issue with the vitality thingy.

#

I just saw that they posted an issue in gitlab

digital lagoon
#

Quick inspiration tangent question, Chris- have you looked at making an automation for the “mote of potential” inspiration feature for the creation bard subclass?

scarlet gale
#

It's one of been meaning to do

#

Looking it over, looks simple enough

#

It will have to be combined with the other bardic inspiration feature

digital lagoon
#

I’ll keep an eye out for it - thanks! It’s been one of those things that my bard player is pretty good at tracking but everyone else forgets they have it/all its uses when he gives it to them so it’ll be a super helpful one.

swift kettle
strange prairie
#

Hey guys, is there a way to add a effect on a token when a specific actor deals a killing blow to it?

scarlet gale
#

Activation condition probably

#

Or a macro

kind cape
#

If I understand it correctly: A hits B, which kills B. B then applies an effect to A, due to a feature of B.

In that case: Macro

strange prairie
#

something like: A kills B which triggers an effect on B(visual effect) but if C kills B nothing triggers

kind cape
#

So its actually just if A kills anything it triggers?

#

(Still a macro though)

strange prairie
#

ok thank you 🙂

worthy wraith
#

I've just installed Item Piles. I've grabbed the macro's from the readme, which work as far as functionality however visually nothing is changing. In the console there is an error related to midi qol which I think is where that is putting the 'dead' overlay on and its conflicting. Any ideas how I fix that error and make the macro change the token into an item pile visually? Thank you.

worthy wraith
scarlet gale
#

warning, not an error. But something is going wrong

worthy wraith
#

Sorry I meant a warning

kind cape
#

Kinda surprised that is showing up as an warning, pretty sure its actually an error 🤔

scarlet gale
#

Generally a warning shouldn't break anything. But I think that's a function that's trying to patch something. So maybe it's in a try catch?

kind cape
#

I would check where patching.js is from, that would be the module that is the culprit most likely

scarlet gale
#

That's midi-qol using libwrapper

#
libWrapper.register("midi-qol", `game.${game.system.id}.canvas.AbilityTemplate.prototype.refresh`, midiATRefresh, "WRAPPER");```
worthy wraith
#

It happens every time I use the macro from the item piles readme

#

Did you want the macro I'm using?

scarlet gale
#

Not sure it would mean much

#

@vast bane Your reported issue with going over max healing should be fixed now. Let me know if it's working weirdly. I don't have players that use that spell.

rigid kindle
#

Late targetting seems to be working a bit weird. It works for a single use per item/spell but then won't work again until I refresh the browser

vast bane
#

midi works fine for all of us so best to rule out modules and then versions of everything before we dive into midi settings

#

The simplest way to target things is to hover over the target and press the T key, I will never understand why modules exist to make this any easier than it already was in core, you likely have a bad targetting module

violet meadow
#

Not sure that this should have been closed as an issue by the author though

rigid kindle
vast bane
#

honestly ditch the target modules I don't get why people use them, how much easier does it get than hover and press T

rigid kindle
vast bane
#

if you think its that then you need to report your foundry version, dnd5e version, midi, dae, and socketlib/libwrapper to us cause we need to confirm for you

#

What is your late targetting settings too so we can test it

rigid kindle
#

With all modules disabled other than midi it works so almost certainly a conflict i'm just not sure what could be causing it.
Full list of modules is attached.
Foundry v10.291
DnD 53 v2.1.5

Late targetting is set to always on.

vast bane
#

Delete DAE SRD

rigid kindle
#

Worst case I can just enable modules one by one. Just wondered if it was a known issue

vast bane
#

delete either VAE or Dfreds Efffect panel

#

they are redundant together

#

personally I'd keep vAE

#

Delete ASE, its likely what is your problem

#

Delete MTB or LMRTFY having both is redundant

#

Yeah I'm gonna pin all my hopes on you having ASE installed in v10

#

I think thats your target problem

#

install find the culprit, disable all but libwrapper, socketlib, dae, and midiqol and test your targetting

rigid kindle
#

Made those changes but still no luck. Will try find the culprit and go from there

rigid kindle
vast bane
#

also I didn't check but you should have all your v9 compatibility warnings turned off unless they are pure content modules like compendiums of maps/items/animations/yada yada

rigid kindle
vast bane
#

what version of foundry, dnd5e are you on?

#

and what are your 3 late targetting settings set to

rigid kindle
#

Foundry v10.291
DnD 5e v2.1.5

vast bane
#

I have the exact same versions as you and cannot replicate your issue late targetting works just fine for me

#

after sharing your settings you may want to create a video of your issue as maybe its a matter of not conveying your issue to us in a way we understand

rigid kindle
#

Only finding two options for late targetting not 3. Potentially that's the issue

vast bane
#

all three must be set to the same for late targetting to function

#

I have never had an issue so far with any combination to have to reload my browser

#

Coincidentally it is really uncanny that my late targetting window is always off in a corner while everyone elses snippets of late targetting is in the center of the screen

rigid kindle
vast bane
#

wow I assumed it was in player too heh

#

what are your two settings set to then?

rigid kindle
#

I guess i can bypass the issue by export settings, change setting, import settings.
Odd that it's not in player though

#

Both GM and client side are always display

vast bane
#

I have those settings and have no issues so could you make a video of your issue for us to see?

#

maybe its some kind of user error?

#

HOLD UP

#

I just replicated it, there is indeed a problem with late targetting

#

it works once then stops working

rigid kindle
#

once per item/spell etc

vast bane
#

your gonna have to learn to play without it for 2 weeks it would seem

#

Tposney posted the patch for 35 and stated hes on vaca for 2 weeks so I'll report the issue to the gitlab but you likely won't see a fix for more than 2 weeks on this

#

There is no errors in the console either really strange

rigid kindle
#

Okay no worries. Think it was working a couple of days ago

vast bane
#

you could try downgrading fwiw, but let me find my copy paste for the mirky waters of downgrading since we're just freshly post dnd5e 2.1.x and fresh off the dfreds rework...

#

If you are on dnd5e 2.1.x update to 2.1.5 and you can run the newest midi/dae/dfreds ce

Dfreds CE 4.0 requires midi 32+ and dae 22+.

#

I'd have to do some digging to confirm how far back you can go and stay on dnd 2.1

#

You definitely can't go back as far as dae 14/midi 24 as those are the stable versions for dnd5e 2.0.3. and I'd say half the versions between those and now are buggy at best so I'd only try 32/33/34/35

rigid kindle
#

The strange thing is I swear this was working previously and it didn't seem to break on an update. Just wasn't working one time

rigid kindle
#

Bug exists for all listed versions. Interestingly if you attack multiple targets, the bug does not occur

violet meadow
#

Quick recap of the issue? Late Targeting as a player works only for the 1st time?

vast bane
#

for anybody

#

it only works the first time then you have to reload your browser for that window to ever pop again

rigid kindle
#

Done some debugging. Can provide much more info in a moment

violet meadow
#

I will take a look later too

rigid kindle
#

10.0.33 is the breaking change.
I thought I had tested 10.0.32 earlier but the current 10.0.32 zip is actually the 10.0.33 zip - it was accidentally updated in the 10.0.33 commit.
10.0.32 does not have the bug.

The bug requires "Roll a separate attack per target" to be enabled, and only occurs on targetting a single target.
i'm fairly confident the cause is the following change in itemhandling.ts:

#

Current workarounds:

  • rollback to 10.0.32 (which must be done by manually grabbing the zip from the 10.0.32 commit)
  • disable "Roll a separate attack per target"
  • disable late targetting
violet meadow
#

tposney will be away though for some time.

hoary wagon
#

Is there a way to automatize saving throws but still show the button to roll the save on the ability card?

#

If I cast a spell and don't target any creature, it hides the save button

hoary wagon
#

Hm, ok

vast bane
#

and you must target someone, entangle is also automated in midi srd fyi

#

you can't use spells without targets or the automation will fail regardless

hoary wagon
#

Entangle was just an example. You could cast firewall without targets inside it and then a creature walks into it later

#

But the button won't show up there

vast bane
#

don't remove buttons

#

its a setting in player and dm tabs

hoary wagon
#

It's Off for both the GM and the players, but there is no option for saves, only for attacks

vast bane
#

You could probably do that with ready set roll or core but midi expects automation, banking the save to reuse later just isn't feasable

#

also I don't think entangle works that way

#

instant save, difficult terrrain thereafter

#

I think an example of persistant saves would be spirit guardians but thats already premade

#

it would help if you told us what item you are trying to automate

#

if you don't remove damage/attack buttons those work fine including saves for damage, but saves that just apply effects unfortunately I cannot find a way to reuse the save button

#

if you turn off midi automation for saves fully you can get the button but at that point you might as well just uninstall midi

hoary wagon
#

I don't need them to apply any effects automatically, I just want the save button to show up while still making the concentrator work

#

It's dumb that I can't have the concentrator without auto save roll

vast bane
delicate yacht
#

Hi strangers,

I'm coming back to you to check if what I created is right.
This macro is used in flads midi-qol.OverTime for the effect of the spell heroism :

turn=start,
damageRoll=@attributes.spellmod,
damageType=temphp,
condition=@attributes.hp.temp > 0 && @digital lagoontributes.hp.temp < @digital lagoontributes.spellmod

The system.traits.ci.value to immunise against frightened is active but the temporary hp doesn't apply.
What did I do wrong ?

vast bane
#

or use Wire, or use Ready Set Roll, or use Effective Transferral+ CN

vast bane
delicate yacht
#

How did you have that ? I just have MidiQOL Sample Items...

vast bane
# delicate yacht How did you have that ? I just have MidiQOL Sample Items...

Sources of premade stuff for Midiqol:

Midi Sample Items Compendium(comes with the module)

Midi SRD's compendiums(this is the manual install link)
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json

More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats

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

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

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

Activation condition examples by ThatLonelyBugbear
https://github.com/thatlonelybugbear/FoundryMacros/wiki/MidiQOL-activation-conditions-examples

delicate yacht
#

@vast bane My good fellow, you are one of a kind soul !

Thank you very much I will go right this instant look at all of this !

vast bane
#

but fwiw, midi srd is about 75% workable in the fork form

keen remnant
#

How do i level scale a spell based on PC level?
This example lv 5 +1 dice
lv 11 +2 damage dice
lv 17 +3 damage dice

delicate yacht
vast bane
#

wait...

#

thats cantrip

#

thats the scaling of cantrips isn't it?

hoary wagon
keen remnant
vast bane
#

set the scaling on the spell to cantrip even if its not a cantrip that should solve it?

#

if theres 0dX at level 1-4, put a 0dx in the equation maybe

#

kinda like GFB

keen remnant
#

then it scales with level by base on the lv 5 +1 lv 11+2 and 17+3?

vast bane
#

depends on how you use the scale setting

#

show me the spell you are trying to make

keen remnant
#

Death Touch.

You can focus your deadly touch against your foes. As an action, make one unarmed strike. On a hit, the target takes an additional 1d10 necrotic damage. This damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).

scarlet gale
#

I would just do cantrip scaling like moto said

keen remnant
#

Its Part of a character advancement

Umbrakin wings

Proficiency = charges/LR, bonus action to use

Casts shadows in a 30 ft sphere and dowses unprotected lightsources

Granting a flight speed equals to your walking speed. For one hour per charge used after each the wings disappear.

+1 Umbrakin Character Creation Option
Cling to Life.

When you make a death saving throw and roll 16 or higher, you regain 1 hit point.

Death Touch
You can focus your deadly touch against your foes. As an action, make one unarmed strike. On a hit, the target takes an additional 1d10 necrotic damage. This damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).

**Revenance.
**
You retain your creature type, yet you register as undead to spells and other effects that detect the presence of the undead creature type.

#

So its a bigger picture just working it off step by step

hazy stream
#

My MidiQOL is not applying damage anymore... Is this a known issue?

vast bane
scarlet gale
#

Have you tried the one that just came out?

vast bane
hazy stream
#

10.0.34

#

I just saw there's an upgrade, checking it now

vast bane
#

I personally am a huge cynical person when it comes to new releases so I will always suggest downgrading on very very new releases till they are properly vetted by the brave folks

vast bane
#

yeah that looks good to me

hazy stream
#

@vast bane well, I had the issue "in session". So trying to fix it post

vast bane
#

for the record you can use @mod instead of @abilities.str.mod

#

in that specific case cause the drop down is set to Strength just above

#

If that doesn't work, then you need to use the really long version of cantrip scaling that I never remember, but always yoink out of roll20 lol cause they don't have the shorthand version they do them all the long way

#

unless some brave fella remembers the cantrip scale formula

hazy stream
#

@vast bane .35 did the trick

scarlet gale
#

I figured it would

#

My module will require.35 whenever I update it next. Tposney implemented my request

vast bane
#

you keep your previous ones up too just incase right?

scarlet gale
#

Yep

vast bane
#

35 is a lil too new to go all in on atm lol

scarlet gale
#

I'll be able to technically cut item macros from my dependencies now

kind cape
vast bane
#

technically you don't require it right....we don't have to put anything in them do we? its like midi srd/midiqol, its only required if we want to edit them

vast bane
#

Fotoply beat me lol

kind cape
#

I am speed 🚤

vast bane
#

You must run faster Barry Allen(for the uninitiated)!

scarlet gale
#

Also means my macros folder that is created with my module can be deleted after I switch everything over to the new function method

vast bane
#

I absolutely love the button on the top bar that thing makes life alot easier when updating your module

violet meadow
#

I have to remake the MidiSRD ones too.

scarlet gale
#

If you haven't been keeping up, ddb importer can mass update to my automations

keen remnant
#

Cling to Life.

When you make a death saving throw and roll 16 or higher, you regain 1 hit point.

A Clue how to get started on that?
Im Close making an action to make a save and on success to just heal one on 16+ xD
Unless there is a way to make it in a different way

violet meadow
#

Though I fail to trigger an onUseMacroName for preTargetSave 🤔

scarlet gale
#

Could be an oversight

violet meadow
#

Yeah both new triggers are not included

violet meadow
keen remnant
scarlet gale
#

That actually cool

molten solar
#

Just give the actor a bonus of 3 to critical death saves

#

and by 3 I mean 4 because math is hard

keen remnant
#

i do not even know how the current foundry handles deathsaves currently

molten solar
#

It just reads the d20 and if it's a 20, you gain 1 hp

#

babonus swoops in and lowers that 20 if you want it to

keen remnant
molten solar
#

Build-a-Bonus

scarlet gale
#

His module

molten solar
#

My module

kind cape
#

But that would also make them succeed on a 7 on a death save

molten solar
#

Target value and critical threshold

kind cape
#

Oh, I see

keen remnant
#

Build-a-Bonus how is that modified in the game?

molten solar
#

Check the module page 🙂

keen remnant
#

probably right?

vast bane
#

does the baboni data save with an exported json?

#

like a macro saves in an item

molten solar
#

Yes, it's in the flags.

vast bane
#

Awesomesauce

keen remnant
#

So how do i get that interaction going between babonus and the specific item?

#

is it part of the midi flags now?

vast bane
#

no its a badger icon on the top of items and active effects

#

I'd personally put it on the feature

keen remnant
#

ahhh

#

found the sneaky bugger

vast bane
#

Sorry I keep mixing up if its a badger or an otter or a weasel lol

keen remnant
#

and then saves?

#

Oh wow

#

text

#

i immediately despise every bit of it and i love it

#

soooo

kind cape
#

*Zhell aggresively emotes*

molten solar
#

You want the 'Throw Types' filter

#

and a '4' in death save critical

vast bane
#

In his UI, tooltips are your greatest ally

keen remnant
#

Death Critical +4 then?

molten solar
#

No need for a leading plus, but yes

keen remnant
#

is that all?

molten solar
#

A name and a description, then you're a cool kid

vast bane
#

can it be on the feature or does it need to be on a blank ae attached to said feature

#

is it always on?

keen remnant
vast bane
#

or is it only active during X time

molten solar
#

Doesnt matter where it is

keen remnant
#

Its AE Passive on my side now

vast bane
#

k

#

actually think it could be on the feature then and save yourself a needless ae, I feel thats one of the greatest parts of baboni is shaving off ae management

#

Aside from the adorable Otters that is

keen remnant
#

áhh no its a custom item i add to the character gaining the benefits

#

because its no part of any class

#

its a variant magic item thing

molten solar
#

Whether the babonus is on the item or on an effect, babonus don't care.

keen remnant
#

basically part of my players progression is not you get cooler shit, you get cooler

#

how do i refference another item in a items description

#

just to make things cleaner

#

is it @itemid.[itemid] ?

vast bane
#

Drag the item to the description

keen remnant
#

that works?

#

LOL

#

thanks

vast bane
#

if you want it rollable in description, install inline roll commands. and do [[/rollItem NAMEOFITEM]]

keen remnant
#

nah

#

im good

#

stuff is already complicated and thats just another step into the door of hellfire headaches i do not need xD

#

a description is more then enough

quiet solar
flat gazelle
#

My warding bond suddenly does not "share" the Damage anymore 🤔

vast bane
#

Midi/dae had a rough patch the past like 15 versions due to v10+dnd5e 2.1.x so he hasn't really had time to retouch stuff and nboody has really submitted any fixes for them yet. If you know what to do to fix it, you can put an issue on his gitlab

broken wolf
#

so looking at Chris's premade macros, i can see how they wrote the Spike Growth to get it to work per 5ft taken by token, but how would i do the following for a spell? thats where im a bit stuck atm

"Creatures within the area must make a dexterity saving throw, taking 1d10 piercing damage on a failed save and half as much damage on a successful save. When a creature enters the area for the first time on a turn or starts its turn in the area, it must make the dexterity saving throw, taking the same damage."

i know where its supposed to go "When Entered" "When Staying", but not what to put into the macro itself to trigger the above

flat gazelle
vast bane
broken wolf
#

oh that spell does fit better for sure

#

oh theres a premade for that, lemme see what i can do

vast bane
#

theres a bunch of them

#

Theres an active auras version, a midi sample item, a ddb importer one, and CPRU has one

halcyon shore
#

is there a way to use mass edit to change settings of tiles without resetting all of their rotations?

vast bane
#

I'd probably ping Aedif for that one. Though you are in midi's channel, you might wanna ping him in module troubleshooting

halcyon shore
#

wups wrong channel

broken wolf
#

okay so all i really need is the secondary effect of spirit guardians, not the animations or all that stuff

broken wolf
#

have a few how to tweaks for some of the spells im adding:

  • giving creature advantage on specific saving throws in the spell builder
  • giving a creature dmg resistance until end of turn
  • is there a way to have a spell be made available as both an action and a reaction? the dropdown only gives me one or the other in spell details
dark canopy
#

that last one would need a duplicate of the spell

violet meadow
broken wolf
#

got a few like this

violet meadow
#

You cannot trigger Reaction on other player's turn

#

You need to "create" that reaction item on the valid targets, via Active Auras probably, and they can afterwards use it when needed, asking the original player to "use" its reaction

#

It's a bit messy but can be done. I shared on such combo yesterday

broken wolf
#

ill need to modify the spell then (hombrew from gmbinder) since cant use reaction on another players turn?

violet meadow
#

You can use it, but not automate it easily 😅

broken wolf
#

ahh

violet meadow
#

declare to the GM that hey the roll happened, but I want to use my reaction for this and that and resolve what happens after

#

🤷

broken wolf
#

yeah maybe not have the reaction automated, might be too much for them lol, just the action i think should be enough

#

how would i do the grant ability check when casting the spell?

vast bane
vast bane
# broken wolf

A reaction that can never be used on a devotion paladin or anyone within its aura lol

broken wolf
#

its a good thing nobody is using a paladin this campaign lol

broken wolf
vast bane
#

third party reactions are wonky and get worse the larger the active aura has to be fwiw

#

yoiu could also just bypass the aura and give all players that feature/reaction and have them talk amongst themselves whenever they get prompted for it

broken wolf
#

i see, so that would be the only way to do it, an aura?

#

was hoping it would be something simple in the spell details 😦

vast bane
#

oh wow, actually that reaction is complicated as hell

#

it'd be a reaction on the enemies lol

broken wolf
#

oh really? damn

vast bane
#

I'd probably handle that exactly how the help action works

broken wolf
#

here i am thinking it could just be like a little buff on the player

vast bane
#

yeah it can be, but it can't be automated

#

the player would use their reaction to buff the pklayer at the start of their turn

broken wolf
#

how would i do it without automation? thats where im stuck

#

oh huh, there isnt anything in details that can give advantage to player, or im not seeing it, thats frustrating

broken wolf
#

thats what ill do actually, forget about making a macro for it lol

#

is there a way to let players click on a spell in the chat and it opens up the spell description? setting in 5e config is unchecked so they should be able to click and open things up now if im understanding right (was suggested midi might be interfering somehow)

dark canopy
#

may be an old image, but something like that

broken wolf
#

there we go

#

thanks!

#

makes it easier, skip the macros for weird things and they can just see/scroll up in chat when needed

violet meadow
#

. probably coming in MidiQOL 10.0.42

quiet solar
#

if I am attempting to intercept multiple points in the workflow (eg "called before targeting is resolved", "called before the item is rolled", and "before damage application") to do different things...
like:
assign multiple 'impacts' per target
chose how many charges to use of a wand instead of the default of 1
run my existing working macro

How do I best set that up? is this a case for flags.midi-qol.onUseMacroName with 3 different entries in the Effect? (currently using the OnUse ItemMacro in the details tab)?

#

I think I could probably do this by adding additional dialog boxes instead of reusing the existing and confine the macro to "Before Damage Application" but then there are somewhat redundant dialog boxes (up to 4 for a simple spell) and that seems at odds with automating

scarlet gale
#

You can do all then check the pass with args[0].macroPass

quiet solar
#

oh

scarlet gale
#

What are you trying to setup?

quiet solar
#

this is still magic missile 😄

scarlet gale
#

Ah

quiet solar
#

the horse isn't dead yet

#

but I learned how to set up a shared class in my module, so that is kinda sweet

scarlet gale
#

Crimic has a good one. I think the public version is for v9 so needs a few small fixes to fix the token images.

#

I'd go with doing a damageonlyworkflow and a dialog for magic missile if you want to make your own.

quiet solar
#

I think I based mine off of a Sequencer tutorial - I do need to find that for proper attribution

#

I have a fully functional wand and spell, but I can't yet:

  • choose how many missiles are applied to each target (it just assigns in order until it runs out)
  • choose how many charges to use from the wand - the current default dialog only allows for 1 charge
#

I will try using 'All' and switching off of args[0].macroPass - that sounds doable

scarlet gale
#

Make a dialog and have it handle the target selection and number of dice.

quiet solar
#

that's a good idea - there's no reason it has to be split into different dialogs

scarlet gale
#

(requires warpgate)

quiet solar
#

I use warpgate, but I'm not sure I want it as a module requirement. regardless, I'll take a look at your dialog, thank you!

scarlet gale
#

Well it uses the warpgate API for the dialog lol

quiet solar
#

ah... ok. maybe 🙂

scarlet gale
#

There are probably other examples of dialogs around here and #macro-polo

#

That don't use warpgate

quiet solar
#

dialogs seem like they would be easy but I think that's probably because I haven't done anything with them yet... everything I touch in foundry is a reminder of how little I know

scarlet gale
#

Regular javascript dialogs confuse me to no end.

quiet solar
#

lol

#

this is the first javascript I've touched in ?? 20 years? it has grown up a bit

#

thank's again - more fun to be had.

scarlet gale
#

I should really make my own magic missile automation.

#

This is from my preserve life macro, would be simple to reuse the same setup for number of missiles

quiet solar
#

come on man... give me a chance! 😄

#

yes - it would

scarlet gale
#

Low priority for me however, the crimic one works pretty much the same

quiet solar
#

I need to make an initial commit to my "module" (which is like 3 spells, 1 feat, and a one-liner change of one of the midi-qol samples, so far)

digital lagoon
scarlet gale
#

Scorching ray is a weird one. I just have my players click it again and uncheck use spell slot.

#

Since I let them see the damage to the target before having to setup for their next one

#

so you don't get wasted beams

digital lagoon
# scarlet gale Scorching ray is a weird one. I just have my players click it again and uncheck...

I found the ASE one works if I don’t require targeting but the spell then fires once with no target as its clicked, THEN the dialogue to choose targets pops and it proceeds with the player’s choices and resolves. You make a good point about wasted beams though. I wonder if someone who knows how to make things work could make a version where if a ray targets a token that has hit 0 it moves to the next target 🤔

scarlet gale
#

That's not the worst idea

#

have it fire one ray at a time

#

then ask for your next target...

quiet solar
digital lagoon
#

Might not be as visually spectacular as the multi-ray blast but definitely very practical

quiet solar
#

or take multiple targets up front

scarlet gale
#

Having you select the number of beams per target up front would be easy

#

I suppose I could have it check damage after each then give you a new dialog at the end for unused beams

quiet solar
#

I meant with the fallthrough of "that one's dead"

digital lagoon
scarlet gale
#

Might just be better to have it give you a limited use feature with the number of beams

#

instead of a dialogue

quiet solar
tawdry frost
#

Is there a way to make difficult terrain half a person's speed automatically?

scarlet gale
#

Depends on the modules you're using. Enhanced terrain layer can do it.
Technically you could apply a half speed reduction with an effect too, but that will act weird over long distance moves

tawdry frost
#

It's an effect surrounding a stationary monster.

#

I don't have enhanced terrain

#

How could I do it with an effect?

scarlet gale
#

You would set their speed to be half essentially

#

but I don't recommend it

tawdry frost
#

Their wouldn't be any long distance moves.

scarlet gale
#

This may act weird

#

Just a heads up

tawdry frost
#

I will be mindful of your warning and kill it with fire if it becomes problematic.

scarlet gale
#

If they have other effects that add movement it'll be weird

tawdry frost
#

Understood

vast bane
#

Had an amazing session but found out that the sample item for emboldening bond is no longer functional in midiqol, need to tweak it somehow

#

not only does it break but it really destroys performance while its breaking

scarlet gale
#

That's not good

vast bane
#

@crimson junco

crimson junco
#

thank you!!!

violet meadow
vast bane
#

the macro has the wrong keys they are missing the tail end new key additions to them so they throw deprecation errors

crimson junco
#

I'm trying the different settings there to hide the rolls but they don't do anything, when I set my chat as public, players see everything no matter the setting in midiQoL

short aurora
#

They will always see a message of some kind when chat as public, but those settings should censor or remove parts of it, you're not seeing a change in the messages at all?

#

As a player, I mean, the GM still sees everything

crimson junco
#

No, they still see all the roll numbers, I only want them to see name, icon and description, but it shows evrything

#

I'm using a second pc to check from player's PoV

violet meadow
#

Or open the ItemMacro and add .all to the keys, plus one more for .skill.all if that's needed

crimson junco
#

Okay so i've managed to hide everything but the saving throw DC number, I guess I can work with that

#

I can't see a way to hide it

violet meadow
#

share some screenshots of the end result

vast bane
#

save dc is hideable in the save subsection in the workflow tab of workflow button

#

oh not hideable if you are using the sub modules MTB/LMRTFY I don't think

#

tbf theres alot about those two modules we wish were better. They also spoil names.

violet meadow
#

It is hideable for Merged card only. And yeah MTB/LMRTFY is another story

crimson junco
#

Tried it and it doesnt hide the DC number, still displays a clickable button in chat with the DC number

vast bane
#

are you using midiqol with another roller?

#

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

The following modules have template settings that step on midi:
Spell Template Manager

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

Midi requires Item Macro to have its "Character sheet hooks" feature set to unchecked in order for on use macros to work right.

When editing owned items(items on actors) active effects beware of duplicating active effects that interfere. Always check the actors effect tab for rogue ae's.

If you are on dnd5e 2.1.x update to 2.1.5 and you can run the newest midi/dae/dfreds ce

Dfreds CE 4.0 requires midi 32+ and dae 22+.

Midi now requires sight to be setup on all monsters or the players will get unseen attacker advantage.

crimson junco
#

what would be another roller? the only roll realted modules I have are dice so nice and dice tray

#

i dont have any of those

vast bane
#

I have never seen a save dc button in chat

#

you are probably using abnormal settings, likely turned off one of the core pillars of midiqol

#

or its the LMRTFY window cause I don't use that module, but requests will prompt the player and I think atleast in MTB's case theres no way to control it spoiling things

short aurora
vast bane
#

I think they have the very first setting in the save section to off

crimson junco
#

this is what the player sees now, if they click on save DC while their token is selectd, the save is rolled, it was always there I dont think i installed a module for it and if I did, it was MidiQoL I think

vast bane
#

ok that is very sus

#

unless midi 35 really changed the roller, that is something new

short aurora
#

The button is midi qol but the rest I don't recognize

vast bane
#

the button is core

crimson junco
#

I've had this for half a year

violet meadow
#

And is this with only MidiQOL active?

crimson junco
#

or more, honestly I think it was like that since the beggining

vast bane
#

that button is the core saving throw cause the user has the first thing in the save section off

crimson junco
#

huh

vast bane
#

although its worth pointing out the players have a right to know the DC of everything

#

that is the whole point of a DC

crimson junco
#

You're right there, that's why I said I can work this this right now

vast bane
#

but the button showing in chat means you have save automation off

short aurora
#

Much disagree but #tabletop-discussion for that one, Domaik do you see the same message if you only have Midi and it's dependencies on? Those two last rows smell of another module

crimson junco
#

I don't have full automation on, I can't remember what settings I back when I set it up but players asked to at least be able to click and roll some things so it's not just sitting there watching the machine do all

#

thank you anyway

#

oh

#

I can disable and try

vast bane
#

My prefered save setup is to turn on save automation cause then you get the cool stuff like proper effect transfer and then to prevent auto rolling, I use MTB as the request process

crimson junco
#

this is player's view without MidiQoL

short aurora
#

You kinda inverted that one on me

#

We want Midi QoL and it's dependencies only :p

crimson junco
#

funny enough, it displays the description that I want them to actually read

#

but with midiQoL description is hidden lmao

vast bane
#

also I think those addon roll messages are multi attack...in the list

crimson junco
#

with no other modules active and only Midi QoL active it looks the same as no modules active...I must be doing something wrong

short aurora
#

Misc -> "Show Item details in chat card" and then you can edit which and what there, some options require merged cards

vast bane
crimson junco
#

do you mean auto check saves?

violet meadow
#

Is this Off for you?

crimson junco
#

yes, I changed it and it hides the DC click button but shows other messages depending on target tokens chosen or not

#

I might keep it off though, depends what the players prefer, some of them like clicking rolls instead of having everything super automated

#

thank you a lot for all the help

short aurora
#

If you want the player POV to be something like this, you disable a lot of automation

#

No save checking, no auto rolling damage (I could not get Midi to stop showing that the GM had auto rolled damage for the player pov?)

vast bane
#

personally I'm a fan of MTB but maybe LMRTFY lets you hide the DC's so maybe a user can confirm if theres some feature there

crimson junco
#

thank you. I think I got it set to show what I want, the only thing not working well now is that the actual 3d dice rolled do show the numbers, but they do fade...I did check the box that says to show ghost rolls if i'm using dice so nice

#

but all midi-qol managed rolls don't show the ghost dice, the rest from my macros do show them hidden

vast bane
#

I can't help you there I've never been that secretive about rolling, I dunno whats up with it but its a common complaint about DSN.

sudden crane
violet meadow
#

But all the new triggers open up so many possibilities.
I started writing a small module to handle transferring reactions to other players.
I will test it during the week.

broken wolf
#

is there a simple way to apply poison status to an item or would it be simpler to just apply it to the token itself via gm control? scratch that, so much easier to do myself

sudden crane
#

I rewrote my Flames of Phlegethos without an active aura, just the new trigger isDamaged and it work perfectly

violet meadow
#

Rune Knight's Cloud Rune is my jam 🤣

violet meadow
#

One small issue with how you end up passing the item's itemData in a new DamageOnlyWorkflow.
You might end up targeting self if the initial spell is target Self. 😄

#

(based on Retribution sample Item)

#

I end up fetching another item with some changes to pass along

#

And secondary issue, if you go by the same example, and you have multiple similar effects on isDamaged eg, Retribution and Fire Shield at the same time, the auto damage card will get a bit confused.
In this case an automatic application of damage via applyTokenDamage instead, should be better.

#

Actually as the DamageOnlyWorkflow ends up calling the applyTokenDamage anyways, a parameter to forceApply:true in that one too, would make much sense!

dark canopy
#

my v9 module dependent on warpgate (squadron) worked perfectly in v10 with no upgrades because I based it heavily on warpgate 😎

tepid dock
#

Is there any way to get a reaction to be prompted when its not your turn in combat?

tepid dock
#

And if its hard what does that entail?

violet meadow
inner mulch
#

i think im going insane, i could swear that an hour ago i saw a command to give player option to make a saving throw as an action. now i cant find it. am i just crazy?

inner mulch
#

nope found it i am crazy

hot flower
#

is there a way to query the workflow for the TYPE of attack before it hits? Like, I'm specifically thinking of counterspell, which would only trigger as a reaction if it was an incoming spell attack.

sudden crane
broken wolf
#

so this error is happening when testing the summon spiritual badger for warpgate macro

sudden crane
#

But for now, there is no way to specify a condition which to allow a Reaction to be useable or not

dark canopy
hot flower
#

hm. so, this is the set up i have right now.

#

At the moment, the ItemMacro on counter spell does nothing more than console.log("workflow:", args[0])

#

but it's not printing that to the console.

#

so, the macro doesn't seem to be triggering.

tepid dock
broken wolf
#

@dark canopy got it, downloaded Arbrons and this one is a bit easier for me (has like a step by step guide lol)

#

just need to tweak the hp

hot flower
sudden crane
hot flower
#

it is indeed set to transer

sudden crane
#

It could also be a bug… these triggers are pretty new and some of them have problems

#

Like the preApplyTargetDamage

hot flower
#

not seeing any midi setting that might be useful...

violet meadow
#

It won't work with an ItemMacro.Counterspell afaik. You will need to reference a macro from your world folder, or the ItemMacro on an Item on the sideabar, via ItemMacro.Item.id or ItemMacro.Compendium.Item.UUID

violet meadow
sudden crane
violet meadow
dark canopy
#

can also open the token config, and right click on the sidebarcompendiumpacks icon

#

which copies the UUID to your clipboard

hot flower
#

ok. I set the onUseMacroName to: Override | ItemMacro.CounterspellMacro,isAttacked and created the macro called CounterspellMacro in my macro directory. Macro text is simple: ```js
console.log("Workflow:", args[0])

tepid dock
violet meadow
hot flower
#

it's still not triggering

violet meadow
#

but so much better

sudden crane
violet meadow
#

as in the macro

tepid dock
#

Im just trying to wrap my head around the concept

violet meadow
# tepid dock Im just trying to wrap my head around the concept
  1. Active Auras creates an AE on allies.
  2. That AE is a macro.createItem which will create the linked Item on the Actor.
  3. The linked Item is a Reaction of the type you want.
  4. Attacker attacks Actor, Reactions are evaluated.
  5. Player owner of Actor which is attacked, asks the player source of the Active Aura, "is it OK to use your reaction in this case"?
    5a. If yes, clicks on reaction and the secondary macro will make sure that a DFreds reaction used AE is placed on the source Actor.
    5b. If no, you don't click on the reaction and go on with your merry ( or not depending on the damage ) life 😄
tepid dock
#

Ok awesome, so the initial effect of what I want it to do goes in place of the flags.midi-qol.disadvantage.attack.all ?

violet meadow
#

Yes, that is on the Reaction Item

tepid dock
violet meadow
hot flower
#

i think this might more more of a worldscript. Check all attacks before they're rolled. If it's a spell, and the target has the item Counterspell, pause the workflow, roll the target's Counterspell item (which has its own macro that will adjudicate the counterspell mechanics) and then continue the workflow or not, depending on the adjudication.

Is such a thing possible? Or is it just too gnarly?

violet meadow
# hot flower i think this might more more of a worldscript. Check all attacks before they're ...

yeah. This is an incomplete version of one I had made and the only I can find right now ```js
Hooks.on("midi-qol.preambleComplete", async (workflow) => {
console.log(workflow)
// if(!game.user.isGM) return;
if(!workflow.item.type.includes("spell")) return;
const spellLevel = workflow.itemLevel;
const sourceToken = fromUuidSync(workflow.tokenUuid)
//check targets within 60ft, maybe of different disposition so as to trigger counterspell...
//MidiQOL.findNearby ƒ findNearby(disposition, token, distance, maxSize = undefined)
const isInRadius = MidiQOL.findNearby(null, sourceToken, 60) //need to check for walls blocking or testVisibility, but I think it is included in .findNearby that calls upon MidiQOL.getDistance ƒ getDistanceSimple(t1, t2, includeCover, wallBlocking = false) { return getDistance(t1, t2, includeCover, wallBlocking).distance; }
let canCounterTokens = [];

for (let t of isInRadius) {
    const uuid = t.actor.uuid;
    const hasEffectApplied = game.dfreds.effectInterface.hasEffectApplied('Reaction', uuid);
    if (t.actor.items.getName("Counterspell") && !hasEffectApplied) canCounterTokens.push(t);
}

// missing logic etc

short aurora
#

Oh god, that logic is preparing for a not too unlikely result of multiple people being able to counterspell the same spell