#MidiQOL

1 messages · Page 26 of 1

covert mason
#

Aye, it is

kind cape
#

The macro manually handles crit with the default rules, so would have to update that part of it

molten solar
#

new CONFIG.Dice.DamageRoll

#

that gives you all the handling you need

#

psa: stop constructing dice rolls manually

violet meadow
#

You can either do that or hook in the dnd5e preDamageRoll and construct the roll update the damageParts there, as this will then apply crit rules automatically

molten solar
#

wat

kind cape
#

Seems highly overkill to use a hook here 😂

violet meadow
#

You pass the roll in the MidiQOL workflow and then knows what to do

#

This is more of a general note. There are things that can be done like so.
Check a post from tposney mentioning Wasp

molten solar
#

i'd just update the item tbh

violet meadow
#

And yes it's the damageParts update

#

Let me edit that

covert mason
#
    const diceMult = args[0].isCritical ? `${baseDice * baseDice + baseDice}`: 1;
    const baseDice = Math.ceil(rogueLevels/2);
...
    return {damageRoll: `${diceMult * baseDice}d6`, flavor: "Sneak Attack"};

pepega_kekw

#

I've very likely done this wrong, and there's probably an easier way to do this

#

But heyho, y'don't learn by not trying stuff!

kind cape
#

Btw you are using baseDice, which is not yet defined, when defining diceMult.

#

With that being said, the formula is also wrong 😛

river urchin
#

tried this with dndbeyond importer's Spirit guardians (which is quite similar, but still): I changed the fields removing anything mentioning saves (just as here), copying the rest of the configuration and i run into the same issue: damage at the start of the turn does apply, but not when entering the aura

covert mason
#

Trying to big-brain this, but I can't into coding much goodly.

sturdy folio
#

Hello, i'm having a problem when i enable midi qol , it remove info of ability when used in the chat idk where is option to show it again like normal if that make sense i want to see the top version while using midi qol https://i.imgur.com/AGlglJk.png

kind cape
#

Something like this should work, but not tested:

    const baseDice = Math.ceil(rogueLevels/2);
    let formula = `${baseDice}d6`;
    if(args[0].isCritical) {
        formula = new CONFIG.Dice.DamageRoll(formula, {}, {critical:true})._formula;
    }    
...
    return {damageRoll: formula, flavor: "Sneak Attack"};
#

(I don't think MIDI damage bonus supports returning pre-prepared damage rolls, hence extracting the formula)

covert mason
#

Thank you so much

naive zenith
sturdy folio
vast bane
#

@latent quiver you can't use two different roller modules together, if you want effect transfers on rolls, you can't use ready set roll

#

you can try effect transferral, its likely not compatible with ready set roll, roll groups maybe definitely not midi

molten solar
#

I must laugh at even the thought that ET an RG could be incompatible 😃

#

Flix and I, making incompatible modules? Pff!

vast bane
sudden crane
# covert mason Ayyy, works perfectly now!

I had something similar for planar warrior:


  // Use same roll options as the one from the damageRoll
  const rollOptions = macroData.damageRoll?.options ?? { critical: macroData.isCritical };
  // Construct a DamageRoll to compute critical damage using the appropriate defined method and use the resulting formula
  const damageBonusResult = new CONFIG.Dice.DamageRoll(
    `@scale.horizon-walker.planar-warrior[${newDamageType}]`,
    macroData.rollData,
    rollOptions
  );

  return { damageRoll: damageBonusResult.formula, flavor: `${macroData.item.name} Damage` };
narrow saddle
#

Hey there if you are around, is VAE supposed to pulsate when you hover over it?

#

I have Dfreds module disabled.

molten solar
#

pulsate?

narrow saddle
molten solar
#

Pulsate? Throb? Gyrate? 🤔

narrow saddle
#

Sorry, just done a refresh and the gyrating has stopped.

molten solar
#

and which of Dfreds modules do you mean?

narrow saddle
#

That was a bit weird.

#

The one that basically does the same job, erm, Effects Panel

molten solar
#

Why do you have both?

narrow saddle
#

I have just discovered VAE and was comparing.

molten solar
#

Sure. Just don't have them both enabled at the same time.

river urchin
#

even though i have the attack and damage buttons, if i miss the attack i cannot click the damage one to deal it anyway

vast bane
#

you have auto roll damage on

#

the 6 is the damage

#

if you are trying to auto apply damage, thats the chaser card, you must not have it on, or its right below where this snippet cuts off

river urchin
#

i have auto apply damage on

vast bane
vast bane
#

ok so you missed so it won't auto apply, click the checkmark right below that image

river urchin
#

auto apply works when you hit then click damage

#

there is no checkmark

vast bane
#

if it worked when you missed...it wouldn't be a very good setting would it lol

#

thats not auto apply bud

#

you do not have that on

#

unless thats the players view

river urchin
vast bane
#

there ya go

river urchin
#

yes but hear me out

#

If i fail and still wanna treat it as if i had hit, clicking the "Damage" button doesn't make the blue thing below appear

vast bane
#

thats not what that button is for

river urchin
#

clicking the damage button when failing does nothing, it doesn't bring the check thingy

vast bane
#

right click the 7 and you can apply damage to selected tokens

#

the damage button, is for doing a second attack/damage workflow

#

if you want to apply damage when missing, you have to do the core method

#

select the person who should be damaged, right click the damage number(7 above) and choose apply damage accordingly

vast bane
#

you have one of the two mod settings to cards on, that ok...

#

in the main midi settings, not the workflow butt, outside in main midi, there is a drop down setting for adding damage buttons to the cards

#

if you use either of the two card overrides(merge and something else) then the only way to manually apply damage is by setting the buttons on in the main midi settings

river urchin
#

hmm it's easier to just spamm the attack button till it hits xD

vast bane
river urchin
vast bane
#

no actually it'd be easier to click the damage button lol

#

mouse over the 7 and you will see the buttons

#

the dorp down setting is outside midi's workflow button in the main settings view

river urchin
#

alright, thanks!

#

i still think i prefer the other way around, i prefer to reduce visual noise

#

also, i don't like it to be for selected tokens instead of for targeted

vast bane
#

I'm of the opinion you don't throw the dice unless you are sure hehe, so a miss should be a miss and a hit is a hit. And those rare times they aren't, easily remedied in a core fashion

jagged cairn
#

Is there a way to give an item uses based on character proficency?

vast bane
#

item uses max field accepts that and attributes too I think

jagged cairn
#

@merry ferry.attributes.prof ?

sharp knoll
#

A-A accepts the database paths as well

vast sierra
#

@prof

vast bane
sharp knoll
#

Nah, you can use both. It sends whatever to Sequencer just like you would a macro

vast bane
#

k

sharp knoll
#

A-A is just a UI for Sequencer really

summer frost
#

Can someone please confirm they have the same behavior using the attached minimal implementation of the Aid spell? I just want to confirm that this "isn't just me".
Drag spell to actor. Target self.
1st casting: you SHOULD end up with 5 temp hp.
2nd casting (just re-cast the same spell on yourself w/o removing the effect of the original casting): you SHOULD end up with 5 temp hp...but I end up with 0.
If you have the same experience I do, that pattern of works/doesn't will repeat through more recastings.

dark canopy
#

could you post the macro being used?

summer frost
#

It is embedded in the item I posted as an ItemMacro.

vast sierra
#

If you click the item macro button, at the top of the spell, it will open up the macro being used. Can copy that then, to here

summer frost
#

Sorry. I wasn't trying to avoid posting it. I thought you guys felt the macro was missing. Here's what's embedded in the json I posted above.

#
// It is basically the minimal amount needed to recreate the problem.

const lastArg = args[args.length - 1];
let tactor;
if (lastArg.tokenId) tactor = canvas.tokens.get(lastArg.tokenId).actor;
else tactor = game.actors.get(lastArg.actorId);
const target = canvas.tokens.get(lastArg.tokenId)

let buf = (parseInt(args[1])-1) * 5;

if (args[0] === "on") {
    await tactor.update({"system.attributes.hp.temp": buf})
} else {
    await tactor.update({"system.attributes.hp.temp": 0})
}```
#

(I'm FVTT 10.288, dnd2.0.3, dae 10.0.11, midi 10.0.18. Those, plus socketlib and libWrapper, are the minimal recreation environment)

#

(FWIW: just looking for confirmation that it fails for others in the same way. I DO have a working version so don't need a solution...just confirmation that this most basic implementation SHOULD have worked as expected. If it fails for all, then I think there may be a low-level bug here.)

vast sierra
#

Ill let @dark canopy or one of the other coders confirm, but reading that ... it checks if has temp hps, if does not it adds 5, if it does, it sets to 0.. it's like a toggle.. but im not a coder, so let one of them confirm that 😛

dark canopy
#

await the updates

summer frost
#

Crud. While what I posted is missing those, I DID use await before each update. Could I ask you to insert the awaits and try one more time to recreate the REAL test?

dark canopy
#

i dont use the modules involved here

summer frost
#

(I have so many test versions floating around I grabbed the wrong one to post)

#

Got it. I'll repost and await (no pun intended) someone who can hopefully try in the target environment.

dark canopy
#

how about simply removing the portion that sets to 0?

summer frost
#

Hmm. This is one of those cases where I'm scratching my head because everything I THOUGHT I tried wasn't working as expected...but when I add those awaits in the posted ItemMacro (which I'M SO CERTAIN I ALREADY TESTED)...it works. So it calls my entire process into question. head banging repeatedly on desk

hot brook
#

I need someone wisdom !!!!

#

can someone help me

coarse mesa
#

Yeah that would be neat. Can maybe see how A-A is achieving that. We kinda need that for all ranged spells tbh. Someone should make a module for that 🙂

static sparrow
#

Can anyone explain how the Hunter's Mark sample item is supposed to work? I've cast it, and there's an active effect on the caster and the target, but the extra damage isn't being added.

violet meadow
static sparrow
#

That's right, the attack proceeds as normal without the extra d6 to damage.

violet meadow
#

What version of Foundry and MidiQol are you on?

static sparrow
#

v9 build 280, midi 0.9.83.

violet meadow
#

Change the name of the feature to Hunter's Mark then

#

There is a note in the description of the imported item iirc

static sparrow
#

Ah yeah, I missed that; however, renaming it doesn't change what happens 😔

violet meadow
#

Recast the spell after

static sparrow
#

Yeah, I did.

violet meadow
#

Did you change it on the item in the sidebar?

static sparrow
#

Oh, do you think I need to, like, import it and rename it BEFORE adding to the character sheet?

violet meadow
#

Or the actor,s character sheet?

static sparrow
#

I just changed the name on the sheet, yeah.

violet meadow
#

Just to be safe, rename it on the sidebar and then add it again

static sparrow
#

Damn, still nothing :/

violet meadow
#

Are you auto rolling damage?

static sparrow
#

Nope.

violet meadow
#

Try with auto damage quickly to check if that is the reason.

violet meadow
# hot brook can someone help me

In general it's better to just ask the question directly instead of asking if it's okay! Easier for someone passing by to read it and have an idea, than saying yes, replying etc etc.
If it's not relevant you might get redirected, but no harm there

static sparrow
glacial burrow
#

I want to make an effect that last for 1d4 turns is this the correct way to do this? It seams is not working.

dense rune
#

I would try:

  • 1d4
  • 1d4 * 6 (Place spaces between expressions)
  • 1d4 x 6
#

Hey everyone! One question... I'm trying to create a Feature Action that places a template and I would like that template to be removed next turn as it happens with the Fire Ball. I've checked the Fire Ball spell and it has nothing, no macros no effects... Nothing but it still adds an effect to the caster to delete the template. Why this happens? How can I replicate it?

kind cape
dense rune
#

But it's not a spell, it's a Feature Action

kind cape
#

Not sure its possible then 🤔

dense rune
#

World script then hehe

#

thx @kind cape

glacial burrow
dense rune
#

is that core foundry or is it a module? I can check the code

glacial burrow
#

probably a module

dense rune
#

which one? 🙂

glacial burrow
naive zenith
#

try "1d4 * 6"

glacial burrow
#

so is Dynamic effects using Active Effects

violet meadow
#

Never used that field and now I am confused!

glacial burrow
#

is DAE yes

violet meadow
# dense rune World script then hehe

It’s internal midi function, the addition of the template AE.
But you could replicate with an onUse macro to add an AE with a duration of end of turn or start of next turn, with the templateUuid as a dae deleteUuid flag.

violet meadow
glacial burrow
violet meadow
#

What are you trying to do? An effect to expire after a randomly decided duration?

glacial burrow
#

yes

violet meadow
#

I would use a small macro for that, updating the effect duration after creation.
I am not at my PC right now, but will be later and will take a look at that field

static sparrow
violet meadow
#

Use debugger

static sparrow
#

I may need a bit more context, I'm not sure what that means XD

violet meadow
#

It will pause execution and you can check in console sources tab

covert mason
#

I've heard there may be a Mirror Image macro around here somewhere? blobwavepeek
#dnd5e message

static sparrow
vast bane
violet meadow
#

Also the linked one was a reply to Moto 🙂

vast bane
#

It didn't work for me, it also doesn't handle truesight/blindsight/tremorsense

jagged cairn
#

Is there a way to re-roll specific roll values?

#

Lets say halfling lucky or great weapon master

vast bane
#

I think you mean great weapon fighting, and those are handled with roll expressions and special traits

#

Halfling Luck can be found here:

#

great weapon fighting is just a roll expression option built into foundry I forget the codes

covert mason
jagged cairn
vast bane
#

(and veteran ones)

#

not my work, thats a zhell project lol

covert mason
# violet meadow Oh are you v10?

I'm on v9. The reason I'm trying to automate all these spells is the lack of a v10 ASE that's keeping me on v9. Trying to make all these spells with macros instead of relying on ASE so I can finally make the move to v10

violet meadow
#

Gotcha, I haven’t used it.

jagged cairn
#

damage*

violet meadow
#

I don’t have a v9 instance, but I might take a look tomorrow 🤷

covert mason
#

I could probably just bite the bullet and move to v10 sadcowboy

vast bane
#

I'm not gonna till I see some midi srd esque content for it. why put in all the work for little change

violet meadow
#

There is no right or wrong way! It’s up to what you feel comfortable with and keeping in mind that development of modules will be v10 driven mostly

molten solar
acoustic jasper
#

how to get here from a macro? So I can check "if" X in workflow then "Y"

vast bane
#

args[0]?

violet meadow
acoustic jasper
#

if I don't want to insert item uuid - but check last item?

#

last args?

violet meadow
#

what are you trying to do?

#

Workflows are client specific

#

So you cannot "easily" get one from another client

acoustic jasper
#

still minion thing 😉 I have a world script that triggers when something finishes roll on a monster with "minion" skill

scarlet gale
#

Are you working from the midi-qol hooks?

#

Or just a foundry hook

acoustic jasper
#

midi

violet meadow
#

If its a MidiQOL hook, you just define workflow in the function creation and reference it later, e.g. ```js
Hooks.on("midi-qol.updateActor", (workflow) => {
console.log(workflow)
})

acoustic jasper
#

got it

acoustic jasper
#

ok great I'm close - so one more thing - how to update token health via macro?

#

so I can change hp to 0

static sparrow
violet meadow
acoustic jasper
#

nice

#

in this case it will probably be "target.actor"

violet meadow
static sparrow
#

Hunter's mark; but I specifically mean the bit that says "make sure that is enabled in the midi settings."

violet meadow
#

Ah yes.

#

In the effect that is transferred to actor on item equip, which is the 1st one with the downwards arrow indicating the Mode.

vast bane
#

A couple of the options in that macro feature are not available in v9 fwiw, I had to scrap arcane deflection because the ac setting doesn't work in v9

#

oh wait my issue was with the optional.macros not that one

acoustic jasper
#
    let target = workflow.targets.values().next().value;
    if(!target.data.actorLink) {
        let effects = target.data.actorData.effects;
        let minion = effects.find(e => e.label ==="Minion")
        if(minion) {
            console.log("new", workflow);
            console.log(workflow.attackRollCount,workflow.failedSaves.size ,workflow.saveResults?.length, workflow.damageTotal)
            if (workflow.attackRollCount || (workflow.failedSaves.size && workflow.saveResults?.length && workflow.damageTotal > 0)) {
                target.actor.update({"system.attributes.hp.value":0})
            }
        }
    }
});``` finally - got the first part right (ignore consloe.logs 😛 )
#

now I need to do the second part

gilded yacht
#

Someone asked if there is a central place to store/share midi-qol items that people want to contribute - which there is not, but I think that sounds like a good idea. First thought was to add a contributed compendium to midi-qol where such items will be included. I'm looking to gauge reaction to such an idea. I'd probably require some help vetting such items, depending on how many there are.

acoustic jasper
#

That would be gerat - I'll gladly contribute to such compendium

coarse mesa
violet meadow
vast bane
coarse mesa
gilded yacht
#

I guess Midi SRD is the other option - but I'm not sure how much work kandashi is putting into it, or if he is accepting contributions.

violet meadow
#

MidiSRD needs some rework as MidiQOL has advanced quite a bit

vast bane
#

a bunch of v10 changes to midi make things very interesting where some want to revisit how we've done some stuff before

narrow saddle
vast bane
#

the new createitem ae feature in dae makes a bunch of stuff itneresting now

#

I dunno how much work a compendium module is, but we could just constantly upload the exported items here, just make sure you remove the descriptions.

Uploading to foundry's discord would be bad actually, folks would get in trouble for a few reasons.

coarse mesa
#

When compendium folders are core (v11) could combine it with midi sample items too, so everything is in one handy place

violet meadow
#

There should be a centralized repository for such an endeavour and add as a compendium module I think

vast bane
#

A nifty method I like thats done elsewhere is Otigon's auto recog channel on jb2a's server

#

but the module itself makes that method easy, as its a file we import into his module

coarse mesa
#

I like sample compendiums because of Quick Insert

#

Would also be good if there was a standard for listing dependencies in the item description (eg warp gate, AA etc)

#

(babonus)

acoustic jasper
#
    let target = workflow.targets.values().next().value;
    if(!target.data.actorLink) {
        let effects = target.data.actorData.effects;
        let minion = effects.find(e => e.label ==="Minion")
        if(minion) {
            console.log("new", workflow);
            if (workflow.damageTotal > 0) {
                if (workflow.attackRollCount || (workflow.failedSaves.size && workflow.saveResults?.length && workflow.damageTotal > 0)) {
                    target.actor.update({"system.attributes.hp.value":0})
                } else if (workflow.damageTotal < target.actor.system.attributes.hp.max){
                    target.actor.update({"system.attributes.hp.value":target.actor.system.attributes.hp.max})
                }
            }
        }
    }
});``` - whole minion macro works now. Just one problem - when there are more then 1 targets (which is quite important in minion waves) it only applies to the first target :/
violet meadow
acoustic jasper
#

crap :/

#

so there is no way if I want to check those who saved and kill those who didn't

#

?

dark canopy
violet meadow
#

workflow.failedSaves

#

@acoustic jasper you should find the ones that failed in there.
But you currently are updating only the target defined as workflow.targets.values().next().value;
Do a ```js
for (let failedSaveTarget of workflow.failedSaves) {
// kill
}

molten solar
violet meadow
#

Yeah as badger suggested, a module structured as the MidiSRD makes more sense

molten solar
#

So... the midi srd? 🤔

violet meadow
#

The tech savvy will still be able to dig through, and having a way to update/change stuff without the need to re-import items would be good

coarse mesa
#

Ideally it wouldn't be limited to SRD items (as long as copyrighted descriptions etc aren't involved)

gilded yacht
violet meadow
#

In other news @gilded yacht is this working 🤔
flags.midi-qol.optional.NAME.criticalDamage

acoustic jasper
#

const targetFailed = values.find(val => val.actor.id = target.actor.id) how to change actor.id for token uuid?

#

just "token.uuid"?

#

(cause all "Goblins" have the same id)

molten solar
#

token.document.uuid

gilded yacht
violet meadow
molten solar
#

you can do that in a core prehook.

gilded yacht
molten solar
#

eh, I mean you probably have a way to calculate all that you need before the hook

#

then you just pass it along as options

acoustic jasper
#
     workflow.targets.forEach(target => {
    if(!target.data.actorLink) {
        let effects = target.data.actorData.effects;
        let minion = effects.find(e => e.label ==="Minion")
        if(minion) {
            console.log("new", workflow);
            if (workflow.damageTotal > 0) {
                const values = Array.from(workflow.failedSaves.values());
                const targetFailed = values.find(val => val.id === target.id)
                const targetDmg = workflow.damageList.find(dmg => dmg.tokenId === target.id);
                if (workflow.attackRollCount || (workflow.saveResults?.length && targetFailed && workflow.damageTotal > 0)) {
                    target.actor.update({"system.attributes.hp.value":0})
                } else if (targetDmg.hpDamage < target.actor.system.attributes.hp.max){
                    target.actor.update({"system.attributes.hp.value":target.actor.system.attributes.hp.max})
                }
            }
        }
    }
     })
});``` - finally 100% working minion macro! Tommorow I'll try to make Overkill macro to complement this, but I've already used minions in my games in 5e and they are dope 😉
violet meadow
#

So the midi hook you use is async, is it not?
Wouldn't it be a good idea to make the function async and await the updates in the forEach loop?

molten solar
#

I don't actually think it matters.

#

Plus it's the forEach that would have to be async

violet meadow
molten solar
#

Does not matter at all

violet meadow
#

Ok noted

molten solar
#

The returned value isn't used immediately after so no biggie

violet meadow
acoustic jasper
#

And btw. It's hard to rely on any kind of community Midi-SRD if Active Auras may not be updated (I know there is a workaround, I'm using one right now)

#

:/

violet meadow
#

Yeah Mr Primate/kaelad fork for v10 is working fine tbh, from what I ve seen!
Between that, Babonus Auras (and template macro ⌛ ) there are so many good options.

molten solar
#

speaking of

#

Have you been testing it?

violet meadow
#

Only a tiny bit, didn't have time yet. Needed to actually prep for some sessions instead of playing around adding stuff which probably my players will never use 😭

molten solar
#

ah ok. I figured I might release it soon

white ridge
#

Hi all, I am trying to setup a little automation for the Aura of Conquest. the damage it does is half of the paladins level in psychic damage. so i am using DAE and midi-qol's overtime effects so that it does the damage at the start of the creatures turn. But when i use the Expression: "damageRoll=@classes.paladin.levels\2" it errors out.
i have also tried "damageRoll=@classes.paladin.levels*.5" but get a similar error

violet meadow
white ridge
#

Uncaught (in promise) Error: Unresolved StringTerm 2label=Aura Of Conquest requested for evaluation
[Detected 2 packages: system:dnd5e, midi-qol]

violet meadow
#

Can you screenshot the whole overtime effect?
Just drag the field to open up so it can be seen whole

white ridge
violet meadow
#

Missing a comma after the /2

white ridge
#

that was certainly a problem but it is doing the incorrect ammoutn of damage

#

it is doing 11 dmg instead of 4

#

it's weird though

#

it displays the math correctly, but the actual damage it does is 11

violet meadow
#

Do you have another rolling module alongside MidiQOL?

white ridge
#

not that i'm aware of, any big ones that i would have heard of?

molten solar
#

Ready Set Roll
Roll Groups
Faster Rolling By Default
(Better Rolls, which has been dead since v9)
(Minimal Rolling Enhancements, dead since v10)

white ridge
#

i have none of those

violet meadow
#

Foundry version and midi DAE dnd5e?

white ridge
#

everything should be newest versions:
FVV 10 build 288
dnd5e: 2.0.3
midi: 10.0.18

violet meadow
#

I would try quickly with only MidiQOL/DAE/socketlib,libwrapper active to see if it still does it

#

Find the culprit module would help

molten solar
#

and a new actor.

violet meadow
#

Yeah it sounds kinda strange 🤔

coarse mesa
#

It's adding the 9 and 2 instead of dividing

#

Try *0.5?

white ridge
#

have tried that aswell, does not work

coarse mesa
#

I wonder if brackets would help?

violet meadow
#

Maybe use () to wrap the @classes...

white ridge
#

hey! the () worked!

#

thanks ALL for your help!

violet meadow
#

The overtime effect used is a couple of messages above and the missing comma added.

white ridge
#

for completion:

scarlet gale
#

Speaking of template macros, @molten solar
I think I have a pretty solid way to count grids moved through now. At least for tokens that are only 1 grid wide.

#

Seems to be working as expected now with this for my counting grids.

#

Still need to test what happens with larger tokens however

#

As best as I can tell

#

it's a Bresenham's line algorithm

#

This way also lets me get every single grid the token went through exactly

#

Doesn't really have that much of a use

#

but I wound up having to do that since the algorithm can return the same grid spot sometimes so I had to count unique spots

molten solar
#

Oh boy 🙂

scarlet gale
#

Same macro for on enter, leave, and stay

#

I could probably cut out the checking if inside template part for the stay, but I don't think it can't hurt either.

#

I should probably also add some more checks for running on non-grid scenes

coarse mesa
#

My AA spike growth is running amok in v10 so am keen to try this, thank you!

scarlet gale
#

@molten solar Is it intended for the template macro to trigger multiple times for larger tokens?

#

Because it's 100% firing the same number of times that a token takes up space on a grid.

molten solar
#

No. 😃

scarlet gale
#

No not intended, or no as in it's a bug?

molten solar
#

No, a bug

#

I think I know why

scarlet gale
#

The hook firing multiple times for larger tokens right?

molten solar
#

Yeah

#

cus findContainers is looking at each grid cell individually, I bet

#

Possibly easy fix, just making the array of found templates a set

#

Yeeeeh that does it

scarlet gale
#

Now I'm stuck trying to think how on earth I can get this macro to work for larger tokens

molten solar
#

Seems to work fine, using your spike growth from before

scarlet gale
#

the one I just made?

molten solar
#

No, from a few days ago

scarlet gale
#

that one rounds dumb

#

If you only ever move one grid at a time it'll work fine

#

Diagonals over the whole template mess it up.

molten solar
#

Yeah moving through, but never triggering enter/leave

scarlet gale
#

Oh no, I meant if you into a template but over nearly the full distance of the template the math gets bad

#

and normally adds an extra grid distance

#

especially if it's a diagonal line

#

The one I just posted fixes that issue

#

at the cost of being much more complicated

#

The find grids function in the previous macro currently checks every grid you move through if it's in the template then adds it to the set

#

It could be changed to check what template you're in

#

(if any)

molten solar
#

ok so

#

given that it's 6 am here

#

could you write something up, function declaration, what-have-you,

#

and I'll see about howto add it in?

scarlet gale
#

I can try, this has mostly just been me fumbling around. I'll rewrite the function to find what template's you pass through

gilded yacht
scarlet gale
# molten solar could you write something up, function declaration, what-have-you,
function findGrids(ray, template) {
    let gridSize = canvas.scene.grid.size;
    let gridCenter = gridSize / 2;
    let locations = new Set();
    const distance = ray.distance;
    if ( distance === 0 ) return;
    const spacer = canvas.scene.grid.type === CONST.GRID_TYPES.SQUARE ? 1.41 : 1;
    const nMax = Math.max(Math.floor(ray.distance / (spacer * Math.min(canvas.grid.w, canvas.grid.h))), 1);
    const tMax = Array.fromRange(nMax+1).map(t => t / nMax);
    let prior = null;
    for ( let [i, t] of tMax.entries() ) {
        let {x, y} = ray.project(t);
        let [r0, c0] = (i === 0) ? [null, null] : prior;
        let [r1, c1] = canvas.grid.grid.getGridPositionFromPixels(x, y);
        if ( r0 === r1 && c0 === c1 ) continue;
        let [x1, y1] = canvas.grid.grid.getPixelsFromGridPosition(r1, c1);
        let contained = template.shape.contains(x1 + gridCenter - template.center.x, y1 + gridCenter - template.center.y);   //Replace with checking what template(s) x1,y1 are in here.
        if (contained) locations.add({x: x1, y: y1});
        prior = [r1, c1];
        if (i === 0 ) continue;
        if (!canvas.grid.isNeighbor(r0, c0, r1, c1) ) {
            let th = tMax[i - 1] + (0.5 / nMax);
            let {x, y} = ray.project(th);
            let [rh, ch] = canvas.grid.grid.getGridPositionFromPixels(x, y);
            let [xh, yh] = canvas.grid.grid.getPixelsFromGridPosition(rh, ch);
            let contained2 = template.shape.contains(xh + gridCenter - template.center.x, yh + gridCenter - template.center.y);  //Replace with checking what template(s) xh,yh are in here.
            if (contained2) locations.add({x: xh, y: yh});
        }
    }
    return locations;
}```
Pretty much you just swap out the two commented lines with a function to check if the points are in a template.
molten solar
scarlet gale
#

Yep. It's the same method the ruler for foundry uses

#

To highlight spaces

#

You could remove the template part and have it check if the coordinates are in any template

molten solar
#

How does it work for large tokens?

scarlet gale
#

I'm not sure, it should just be based on the center of the token.

#

You could make a ray for each grid a token takes up

#

So pass the token size in then make a new ray for each grid it takes up.

#

I'm actually curious how the foundry ruler handles it

#

Since it needs to calculate terrain cost based on where you move through

#

Does core foundry handle showing a wider ruler?

molten solar
#

Not to my knowledge. It uses the cell of the token you grab

scarlet gale
#

Or is that drag ruler enhancing it

molten solar
#

I'm trying to see if it's possible to not use canvas and just relying on scene (template.parent)

scarlet gale
#

My thought was to just grab the list of cells you pass through then check each one for templates that overlap that spot

molten solar
#

Doable, for sure

scarlet gale
#

Routinglib looks like it has a function that returns the grids you pass through.

#

Bit silly for just a line however

molten solar
#

I seem to have broken it 👌

molten solar
scarlet gale
#

Nice

glass lynx
#

Drag Ruler has quite a lot of code that's necessary for all the ruler-unsapping and highlighting-large-togkens magic

molten solar
#

added to the templatemacro api, this is all the code needed to show the cells you will be passing through:

const templateDoc = canvas.scene.templates.get("Yjz4KFP3eWjytVzS");
const A = canvas.scene.tokens.get("tFoAcCZczdfbPtjr").object.center;
const B = canvas.scene.notes.get("7DgQ9dqRciOfDksJ").object.center;
const ray = new Ray(A,B);
const coords = game.modules.get("templatemacro").api.findGrids(ray, templateDoc);
coords.map(c => {
  const [x,y] = canvas.grid.getCenter(c.x, c.y);
  canvas.ping({x,y});
});
glass lynx
#

In fact, Foundry cannot handle the combination of rulers and large tokens properly at all. You can easily glitch through walls as player by moving a token close to a wall (so that part of it already sticks through), then ctrl+measure the side that has already moved on the other side, press spacebar and you've moved through the wall

scarlet gale
#

Interesting

#

I've always wondered how my players managed to do that

molten solar
#

could be solved by having the walls off-grid, supposedly

#

or double-walling...

scarlet gale
#

Or just trust the players not to do it lol

molten solar
#

👢

violet meadow
#

Double terrain walls, to get the nice walls art showing too 😄

molten solar
#

I'm wondering if the best approach is just a separate macro type, "moved through"

thorny palm
#

hi guys, can somebody tell me where i can deactivate the "distance" check?

scarlet gale
molten solar
#

Yes

scarlet gale
#

That would be nice

molten solar
#

I'll toss this into this as well:

 const through = tokenDoc.parent.templates.map(templateDoc => {
    return findGrids(previousCoords, coords, templateDoc);
  });

or something to that effect. So you can find, for each template, what cells you moved through (and how many)

violet meadow
molten solar
scarlet gale
#

I'm super ready to start making other spells that use templates in weird ways

molten solar
#

I mean just adding to this

scarlet gale
#

Oh sure

#

Api method or this, either way is fine. This would make sense in the cases of already having that info on hand so you're not doubling up on calculations you don't need to be doing

molten solar
#

Yeah so this will have this

#

and findGrids(A,B,templateDoc) is an api method

molten solar
# scarlet gale Oh sure

It's not entirely accurate. Some cells seem offset when you move on a diagonal. But good enough I say

scarlet gale
#

Are start and end cells exact center of grid?

#

If it's the same ish code from before

molten solar
#

same ish yeah

#

Ah - no, I swapped them for the previous/current token position, oopsie

pine marsh
#

Trying to figure out exactly how the Sneak Attack sample item works. When I add it to a character, I can get it to prompt for Sneak Attack damage on a hit if the target has an enemy next to it, but not if I roll with advantage but there is no enemy next to the target. Is that a scenario the sample item doesn't cover?

scarlet gale
molten solar
#

did I? 🤔

vast bane
pine marsh
vast bane
#

no ready set roll, no better rolls, no roll groups, no fast rolls by default, no minimal roll enhancements

molten solar
#

(to be fair, RG is so lightweight, it won't break Midi, but Midi will break RG)

vast bane
pine marsh
mint wraith
#

Sup guys
Anyone have some handy video or manual?
I'm lerning QOL now and trying to make uncanny dodge working
I know the formula that they mentioned on their site, but have no clue how to implement it correctly
flags.midi-qol.uncanny-dodge

vast bane
#

Did tim take any action on a new midi srd or whatever its gonna be from yesterdays posts?

scarlet gale
molten solar
scarlet gale
#

Nice

molten solar
#

The method itself converts to centers inbetween

#

Less to think about for the user I reckon

scarlet gale
#

Yea

molten solar
#

updated the release

#

try this hook in the console

Hooks.on("updateToken", async (tokenDoc, update, context, userId) => {
  await CanvasAnimation.getAnimation(tokenDoc.object.animationName)?.promise;
  const coords = context.templatemacro.through.flatMap(t => t.cells);
  coords.map(c => canvas.ping({x: c.x + canvas.grid.size/2, y: c.y + canvas.grid.size/2}))
});
scarlet gale
#

I'll update my spike growth macro with it later. It's 9 am and I should have gone to bed hours ago

molten solar
#

lmao

scarlet gale
#

Wonder what happens on a no grid scene

molten solar
#

let's not go there

#

aw fuck what about hex grids

scarlet gale
#

No grid actually easy

#

You just measure distance and round

scarlet gale
#

It might be the same depending on how those grid from pixels function work.

pine marsh
# vast bane did the actor have advantage AND disadvantage and it was cancelled out? Otherwi...

So, still working on the elusive Sneak Attack with Advantage.

When I roll, it does roll with advantage consistently and accurately, but the Sneak Attack dialog doesn't appear. There is a "testing: advantage/disadvantage" warning in the console every single time I make a roll. (This warning appears whether a hostile creature is next to the target, and whether or not the roll has advantage, disadvantage, or otherwise.) I'm not clever enough to know exactly what's going on in that dialog or if the warning is part of why midi isn't picking up that the roll is made with advantage.

vast bane
#

are you in combat?

pine marsh
# vast bane are you in combat?

Did not already sneak attack. This happens in and out of combat, by the way. And as soon as I move a hostile token next to the target, it reliably starts prompting for sneak attack damage again.

vast bane
#

does this behavior persist with just the minimum modules active?

#

what are your foundry/dnd5e/midi/dae versions?

pine marsh
# vast bane what are your foundry/dnd5e/midi/dae versions?

Yeah, it does happen even without most modules installed. Foundry version 10.288, d&d53 2.0.3, midi 10.0.18, dae 10.0.11.

I'm going to build a completely blank world from scratch to see if I can get it working there with a bare-bones setup.

vast bane
#

can you show me the active effects listed on the rogue?

#

and what compendium did you get the sneak attack from?

vast sierra
#

(isnt it based on the token disposition, so if you have enemy tokens, but in the config they are set as *friendly * or neutral , then it would trigger the macro?) dont use it, just offering

pine marsh
#

The only active effect on the rogue is the passive Sneak Attack, which came from the "MidiQOL Sample Items" compendium, originally called Sneak Attack 10.0.13, but I renamed it to just "Sneak Attack" per the note on the description tab

vast bane
#

its also suppose to sneak attack when you have advantage

#

I don't have an active v10 build if someone wants to check, I'm just asuming the sample item works in v10, it works in v9 for sure

#

is the weapon nonstandard?

pine marsh
#

It's just a totally normal dagger

vast bane
#

from where though

#

is it an imported dagger or a dnd5e compendium dagger?

#

assume nothing

pine marsh
#

Sorry. Items (SRD) compendium was the dagger source

pine marsh
vast bane
#

k

#

did you have an older sneak attack on the actor?

#

oh heres a good one

#

drag out the starter hero thats a rogue, and try it on him

#

delete the sneak attack on him before you bring over midis

#

and can someone with a v10 build try the same to confirm if the sneak attack is broke? I'm elbows deep in mapping in v9 atm

pine marsh
vast bane
#

oh I know it works in v9, I have a rogue part time player who utilizes it

pine marsh
#

Sorry. I meant I'll try on v9 but with everything I have set up the way it is here and see if it's something in my setup messing things up

vast bane
#

if a rogue shoots a bow from a distance and the creature is alone, then sneak attack should also fire then, regardless of allies

#

and thats what is failing

#

his allies part of the automation is working fine

#

well it should only fire in a ranged situation if they had advantage

dark canopy
#

with advantage* that shot would proc

vast bane
#

yeah forgot to add that hehe

vast sierra
#

I swore they said it fires when enemies are next to the PC.. but leave ya to it 😉

vast bane
#

yeah he words it weirdly, kinda assuming his issue is advantage though, maybe he can clarify which part is failing

#

sneak attack on a standard rogue is possible if there is an ally of the rogue adjacent to the target creature who is also an enemy(not neutral). It is also possible if the rogue has advantage on any finesse weapon using dex or a ranged weapon using dex as long as there is no disadvantage as well.

pine marsh
#

Sneak attack against a hostile target with a friendly token next to it: sneak attack fires every time, whether rolling with advantage or not. Just tested, and it fires even if rogue has disadvantage (which it should not)

Sneak attack against a hostile target without a friendly token next to it: sneak attack never fires when rolling with advantage

#

I hope that's unambigious!

vast bane
#

that sounds like a roller problem

pine marsh
#

It does!

#

I should have tested it earlier.

#

But for now at least, I'm not sure what's getting in the way ...

vast bane
#

I think at this point you ned someone to test it in their setups to see if theres a v10 problem with sneak attack

pine marsh
#

Sounds like it. Here's hoping someone comes along and does!

vast bane
#

someone should just drag the midi sample item out onto the starter rogue and try it out!

vast bane
pine marsh
#

No errors

pine marsh
#

Thanks for all the help, by the way!

glossy mulch
#

i'm having a problem with automation. I'm basically doing several changes on 5e, mostly on classes to work on the premise of my table.
Last night i made a class feature that should heal 5 x character level.
I didn't find a way do refer to character total level, so i put the class level, if anyone know how to refer to character total level i will be glad.
But the real problem is, when i activate the ability, it show on chat the roll with the correct result (ex: 5 x 20 = 100) but only healing the token for 5 + 20.
I believe the module that do the automatic healing/damage is the MidiQOL but i'm not totally sure a this point.
Anyone know a way to solve it? Also, if it's the wrong channel, please tell me, i'm new on all the foundry stuff.

vast bane
#

you have to decide whether you want midi to automate damage application or not, it looks like you currently have it set to off

#

or you have another roller running

dark canopy
#

they do

#

disable all other modules

vast bane
#

yeah that does look sketchy

#

midi usually puts the details of the item at the bottom

#

go to your module settings, search for the world Roll

dark canopy
#

(better yet, just disable all but midi requirements)

vast bane
#

It is very naughty to run multiple rollers together generally, They are Midi qol, Better Rolls for 5e, Minimal Rolle Enhancements, Roll Groups, Ready Set Roll, Faster Rolls by default(works with roll groups), and ?modify roller? or something like that.

glossy mulch
#

if i disable the modeles, all configurations will return when i activate it again? I take some time to made everything to work and really don't want lose what i already did.

dark canopy
#

yes

vast bane
#

which roller are you running with midi, cause one of them leaves behind stuff that messes up midi even when its disabled

vast sierra
#

And didnt say disable all modules, highly suggested if wanting automation, to turn off any of the ones mentioned by the Badger

#

(except Midi, that's the automation module/ roller for dnd5e)

glossy mulch
molten solar
#

Just disable every single module that is not relevant to what you are currently trying to accomplish.

vast bane
#

personally I'd ask him whether he wants midi or not first, he kinda sounds like he's unaware of the right click/manual application stuff, he could totally rock the roller he has instead if thats acceptable

#

then the answers as simple as uninstall midi

dark canopy
#

no other roller im aware of handles application of damage, which appeared to be the basis of the question

molten solar
#

Are we allowed to say that in this thread? Won't we get banned?

vast bane
#

but his problem was solved in the other channel wasn't it? theres nothing wrong in the screenshot, he can right click the 100 and apply to selected

#

I don't know what language it is, but is that preserve life?

glossy mulch
molten solar
#

What do you use Midi for? 🤔

vast bane
#

k then for now disable all modules except for Dynamic Effects using Active effects, Midi qol, socketlib, and libwrapper

#

then try rerolling it

#

Its Italian

acoustic jasper
#

There was a module called "Mob Attack" but it wasn't compatibile with Midi. Is there anything similar (a module where you can attack with many tokens at once if they share the same attack-item)

vast bane
#

I just use the mob conversion rules manually and make the token actor

molten solar
#

I have a macro for that

dark canopy
#

same

kind cape
#

I just click the button many times, works for me 😂

dark canopy
vast bane
#

midi friendly?

dark canopy
#

you tell me 😆

molten solar
glossy mulch
# vast bane k then for now disable all modules except for Dynamic Effects using Active effec...

Strange... i try disable every other module but end up making the ability stop healing completely.
I will keep in the way it has before. Even if this heal don't go automatically most of the other things that i need on the midi qol are working just fine.

The ability is some homebrew thing that i did. language is Português Brasileiro and the ability name is something like "veterinarian"

Thanks for the help and time of you all.

vast bane
#

ok, but you really should find which roller is conflicting, a bunch of stuff is going to misbehave in your session till you reduce down to 1 roller

#

anyone spot which one it was?

glossy mulch
#

I will try to activate the modules one be one and see if something change

#

if i find some relevant information i return here to let you guys know.

vast bane
#

Midi qol requires the bare minimum of Socketlib and Libwrapper to work mostly, its suggested you also enable DAE too.

#

what language are you localized to?

glossy mulch
#

Yap, i let only those enable has you say before.

#

If you ask the language of my foundry, i put it on English to make easier to search for things on web.

vast bane
#

with just those 3 modules installed activated, can you show us the heal in chat to see what it looks like?

glossy mulch
#

Looks like i did a mistake previews, it's actually healing 25, but still didn't heal the 100 that it should.

molten solar
#

Were they missing exactly 25 hp? 🤔

glossy mulch
#

Nope. I notice that the heal will heal only missing health, so i set the target max HP to something like 1k, and reduce current life to 1 to test.

molten solar
#

What if you removed the [healing]

vast bane
#

thats midi doing that

#

I think this is a midi problem

vast sierra
#

is it possible the healing forumla needs some () ? like 5 * (@details.level) ? or something similair? it's treating the * as a + for some reason....

vast bane
#

yeah I think it does

molten solar
#

I was about to ask that

#

If you do 6*20, does it heal 26?

vast bane
#

is the * even needed if theres parenthesis?

#

the thing that just kinda botheres me though, is how theres two cards there

violet meadow
#

There was/is an issue flagged by tposney. Always use ()

vast bane
#

I think theres a healing button in the first card, and when they press that, they get the new card right?

#

and they must have the setting on to remove buttons

molten solar
#

Core behavior (well, not the removal of a button)

glossy mulch
vast bane
#

what part do they have to wrap?

violet meadow
#

Use (@details.level)

molten solar
#

Does 2 * 2 work? /s

vast bane
#

There may not be a roller conflict now, the odd looking card I now understand from before, and I know its not a conflicting module so they should be fine.

glossy mulch
#

I try do the formula with ( ) and some variations, but without * it's just don't roll, and with ( ) it have the normal resulta no matter what.

molten solar
#

5 * (@details.level)?

violet meadow
#

Is this v10 between?

dark canopy
#

(5 * @details.level)d1 😏

glossy mulch
glossy mulch
vast bane
#

or they could do level+level+level+level+level

molten solar
#

or a scale value

vast bane
#

poor guys google translating our comments lol we're sorry for the confusion

glossy mulch
dark canopy
#

badger grease: apply directly to the formula!

glossy mulch
#

Nah, i can actually understand english fairly well. I just slow to response

violet meadow
#

The d1 saves the day

vast bane
#

thats some voodoo magic

violet meadow
molten solar
#

excuse me. That's trademarked.

vast bane
#

thats what the mayonnaise from the alchemy jug is for

glossy mulch
#

With this solution, maybe the problem is that the midqol somehow can't calculate a multiplication formula without dice(?)

dark canopy
vast bane
#

were you cropping the healing card out of all of these? how is it applying the heal to the token? are you viewing as a player?

#

Normally theres a chaser card when applying automatically:

glossy mulch
vast bane
#

does it stil heal automatically when you do?

#

or do you have to right click and apply the heal with that menu?

glossy mulch
#

the heal and damage is working just fine. The only problem i have with it has been this one with this formula, but after the d1 that's working just fine too.

#

just for reference, that's my midi qol configuration. I didn't change anything on any other section of the menu.

#

But well. I guess my problem is solved now. Thanks again for all you guys help. Hope i can also help someday.

coarse mesa
#

Look at all those beautiful settings @molten solar. That’s about half of them

vast bane
#

Imagine if it still had the entries for better rolls!

#

I wanna see what Otigon did for AA in midi. He added a macro that creates a button in the hotbar for the auto recognition button in settings. Midi needs one for the workflow button lol.

#

so does dice so nice 8)

coarse mesa
#

I rarely need to go into midi settings, but DSN definitely. There’s probably a way to do it with a macro… or at least summon that welcome card

#

I guess you’re in midi settings on the regular doing screen grabs for helping folks

molten solar
#

That's one setting with more options in it than I have in all my modules combined, no wonder you need three discord servers and an entire thread to figure it out lmao

pine marsh
#

Another mystery I'm facing: Ctrl and Alt do fine to skip the dialog and go right to rolling with disadvantage or advantage, but Shift does nothing. The dialog to choose always appears. I thought it was meant to assume a normal roll?

molten solar
#

You are describing core behaviour, yes.

dark canopy
#

Shift will fast forward core attack/damage buttons

#

Or... Should. At least

pine marsh
#

OK, that seems to work, but it doesn't seem to work with the attack/damage buttons midi adds to the inventory list

vast bane
pine marsh
#

Oh is it?

vast bane
#

also if you have DSN installed, and the setting to avoid spoiling, then you have to hold the keys down longer

#

T will do the opposite of whatever your fast forward button is set to

pine marsh
#

I didn't know that! Thank you

vast bane
#

I think you might be pressing the wrong shift for why you can't get normal to work

pine marsh
#

T seems to be doing what I expected shift to do. I really had no idea!

vast bane
#

Oh yeah it is midi messing with shift

#

Midi uses shift for versatile

#

F is technically just fast forward and doing normal most of the time. T technically also toggles the auto roll off/on as well as fast forward for a single attack.

pine marsh
#

Got it. I didn't stumble on this in any documentation I was poring over

#

Very helpful

vast bane
#

configure controls can show you more indepth

pine marsh
#

There it is!

honest osprey
#

i'm trying to get midi to do the reaction when used on a turn but when your turn actually comes up the reaction effect is still on the character and doesn't go away when your turn comes up any ideas what i'm doing wrong?

violet meadow
#

Or is the reaction icon not going away at the start of your next round?

honest osprey
#

sorry i'm not sure how to word it haha it'd be so much easier to just show it on discord and screen share but essentially I have Midi-Qol set up and when I start combat everything works fine. but lets say I have 1 enemie and 1 character regardless of who it is. if they attack not on their turn midi places the reaction effect on them. PERFECT exactly what I want it to do. But when the player or enemie or whoever's turn it is currently is their turn in the round. The reaction effect is still on them, it doesn't disappear or reset if you know what I mean. I have to manually get rid of it. with DFred's Effects. regardless if it's that monster or player's turn the effect doesn't disappear when it's the start of their turn.

#

does that make sense? I hope haha

#

I can stream it in one of the Foundry VTT Voice Chat's it'd be easier to show than just type it out I'm awful at describing things haha.

brittle glen
#

And I bet the icon indicates that the effect has expired?

#

I had this problem too, on all the effects with a duration, they didn't want to disappear but still displayed as expired

carmine mountain
#

When casting spells with a saving throw it prompts Monks Token Bar, but when all rolls are done the results will also appear in the card of the spell which makes it redundant. How can I stop the Saving Throws from appearing in the spell card too?

brittle glen
#

Like this

honest osprey
# brittle glen

no i don't even have that i don't even know where you get that

vast sierra
#

(do you have Times Up installed? It controls when/ if buffs expire)

brittle glen
#

Yes

honest osprey
#

@brittle glen @vast sierra yup i'm a fucking idiot lmfao it was times up sigh* thanks guy's sorry

violet meadow
honest osprey
#

haha i can't believe that ugh lmfao i just spent like 2 hours messing with that

#

uuugghhhhhhhh

violet meadow
#

Oh more messages in between! 😅

vast sierra
#

But that could be Jinashi's problem 😄

violet meadow
#

Indeed!

brittle glen
#

I had to end the current encounter and then restart the "time" in Simple calendar for it to automatically remove some of the effects

violet meadow
violet meadow
river urchin
#

@coarse mesa i've been experimenting with the vortex warp macro, but i have a problem:

  • if i trigger it through On Use Macro, it doesn't care the target has made their save
  • if i trigger it through active effects (macro.itemMacro), it activates twice (but the 2nd time without animation)
#

btw, about the displaying range thing you mentioned, Lukas, i found a workaround:

  1. make an active effect and set it to "apply to self when item applies target effects"
  2. give the active effect an automated animation set as aura with the range of whatever you're doing. Go into the folders and find one with simple things, such as this modules/JB2A_DnD5e/Library/TMFX/Border/
  3. at the end of your item macro (or adding an on use macro with this sole purpose), write this (changing CHANGE_ME to the name of the active effect you created for this):
    await warpgate.mutate(game.user.targets.first().document, {embedded: {ActiveEffect: { 'CHANGE_ME': warpgate.CONST.DELETE}}}, {}, {permanent: true, comparisonKeys: {ActiveEffect: 'label'}})
    (thanks good people at #macro-polo : honeybadger, zhell and flix)

That way once you're done with your spell or whatever, the range visualization will dissipate

high dome
#

Anyone know how to automate "Flash of Genius" reaction?
I've managed to create the effect so that the Artificer can target other tokens (including himself) and give them +INT on checks and saving throws, but I can't figure out how to have it prompt on his screen as a reaction whenever he has to do a saving throw.

coarse mesa
dark canopy
wary bridge
#

I am trying to execute a macro when Detect Magic is cast. Using DAE and MIDI-QOL with Item Macro on Foundry 10 - I set up the effect in DAE to kick off the item macro with macro.itemMacro.GM but when cast, the effect does NOT get applied nor does the macro execute.... I set the effect to "apply to self when item applies target effects" ... what am I missing?
I tried a different method of straight MIDI-QOL using on use macros pointing to macro when only called once a template applied and the macro doesnt kick off then either. In both cases, the macro is simply console logging as I wanted to ensure it would fire before moving into coding the macro fully.

coarse mesa
wary bridge
#

Still working out the OverTime part of the effect but overall it works

coarse mesa
#

Applying AEs on failed saves is bread and butter for midi, but I don't think I've tried doing onUse just on failed saves

acoustic jasper
dark canopy
#

midi is likely expecting some additional information for displayCard

unique cape
#

Hello there. I am with another question - is there a quick (or just a known) way to set up "ignore poison resistance" of Poisoner feat?

coarse mesa
#

Here you go @vast bane – two hotbar macros (tested in v9):

DSN:

//Macro for opening a module's custom settings menu
const menu = game.settings.menus.get('dice-so-nice.dice-so-nice'); //use your module's setting path
const app = new menu.type();
app.render(true);

Midi:

//Macro for opening a module's custom settings menu
const menu = game.settings.menus.get('midi-qol.midi-qol'); //use your module's setting path
const app = new menu.type();
app.render(true);
#

(thanks @dark canopy )

river urchin
river urchin
coarse mesa
river urchin
#

still, yeah, the problem is the prompt spam

coarse mesa
#

I think HB has the right idea, just set up an item that the artificer can use to drop a bonus on an ally (if they're paying attention)

river urchin
#

if there was a way to edit a roll and rewind midi's workflow

coarse mesa
#

hm true, it's likely too late if the roll dialog is already open

#

@river urchin I use Situational Shortcuts to add these preset modifiers to my roll dialog:

#

You can put in whatever you want, so could have it for Flash of Genius. Or use Advantage Reminder (although it would be reminding the target to remind the artificer lol)

narrow saddle
#

Hey there,

I have got Show Ghost dice for hidden rolls ticked in dice so nice and in Midi I have the option ticked under hide GM rolls to use ghost dice, yet nothing has changed for the player? Anyone have an idea what I might be doing wrong?

🙂

river urchin
violet meadow
coarse mesa
#

@river urchin 👆

coarse mesa
narrow saddle
#

Hey there,

Is there a way to stop the GM seeing damage card for PCs. NPC one is great. But I just don't need to see the PC one.

🙂

violet meadow
river urchin
river urchin
#

Oke, thanks!

lament raptor
#

hello there friends, what am I doing wrong here?

night quartz
#

Is there something that can be entered into the Activation Condition area to get an ability to only affect creatures that already have a specific condition on them?

#

such as grappled or frightened?

coarse mesa
lament raptor
coarse mesa
lament raptor
coarse mesa
#

I assume this is a passive you want on all the time? Tick the transfer to actor on item equip box

lament raptor
#

yesss that worked

#

many thanks!!!

#

now to give it a good icon and add the wisdom

#

and of course add it to my compendium so it doesnt get lost

violet meadow
# night quartz Is there something that can be entered into the Activation Condition area to get...

v9 or v10?
For v10 ```js
Array.from(workflow.hitTargets)[0].actor.effects.find(eff=>eff.label==="Charmed") //v9 (eff=>eff.data.label==="Charmed")

I am not sure what exactly happens if you target more than 1 creatures with the same attack, so better use it for single target items.


edit: you can use it fine for Attack Rolls against Multiple creatures. You need to turn on the one attack per target.
There is a bug though.
night quartz
#

Yes, it's for v10, and trying to automate Aura of Conquest in this particular case, which will affect any Frightened creature within a 10 ft radius, so it could potentially affect multiple creatures.

#

And thank you for that, will test it against multiple targets, and go from there.

violet meadow
# night quartz Yes, it's for v10, and trying to automate Aura of Conquest in this particular ca...

Hmm might need @gilded yacht input 👆

~~I am not sure how to write the activation condition for an effect to apply, when targeting multiple creatures.

Actually I was testing the 1 attack per target and had some strange results. I will investigate some more~~

Edit: Array.from(workflow.hitTargets)[0].actor.effects.find(eff=>eff.label==="Charmed") works fine when attacking multiple creatures and it rolls one attack per creature respecting activation condition!

👉 A bug though in v10.0.18 at least. If the 1st attack is a natural 1, all the rest of the attacks against other creatures are cancelled! 👈

celest bluff
#

Another thing too, I don't have any active Conquest Paladins. I do in my main campaign, but we've been playing my side campaign since August 😅

#

actually this is super easy to write with Active Auras

violet meadow
#

Actually yes, it should be

celest bluff
#

or go old school and have a binding detecting distance

violet meadow
#

I was playing only with Activation Conditions cause I like hitting my head against a wall

night quartz
#

yeah AA is what I was planning to use, just needed to know how to limit it to Frightened targets only

celest bluff
#

let the macro handle that

violet meadow
#

You can filter application in the macro

celest bluff
#

You'll also want to know who the source is

#

technically if the someone else frightens the creature, it doesn't count

#

If a creature is frightened of you

#

Supposed to wombo combo it with Conquering Presence

night quartz
#

correct

celest bluff
night quartz
#

That would be great

celest bluff
#

Aura of Conquest was easy to write after all. Am almost done with it

violet meadow
#

Activation conditions work for attacks against multiple opponents pretty good (for both extra damage and effects application), with the small caveat that if the 1st attack is a Nat 1, all the rest are aborted 😅

vast bane
coarse mesa
vast bane
#

I did, bookmarking it for the next time I'm in session thanks!

#

I wonder though if its for v10 or v9

coarse mesa
#

I'm def gonna add the DSN one to the player's hotbars.. they can change dice when they're rolling bad lol

gilded yacht
novel gale
#

@gilded yacht you do get dex save modifiers due to cover but spell sniper only applies to ranged spell attacks and sharpshooter only applies to ranged weapon attacks. So they don't apply to any templates

#

And they don't apply to saving throws at all

coarse mesa
#

One full 5Es dumbest rules is you get better Dex saves with partial cover than full cover, and fireball spreads around corners lol

#

@gilded yacht thanks for integrating Simbul’s so quickly!

violet meadow
manic tendon
#

Could anyone help me with an effect? I'm trying to have it so that creatures with the effect have disadvantage on concentration checks when within 5 ft of a hostile creature. (v10)

violet meadow
#

How do you set it up?

manic tendon
#

I did a search in #package-releases but was unable to find it even after going through 2 pages of the search looking for both "Concentration" and from tposney 😅
Would you mind linking me to it? Perhaps my search-fu simply isn't up to par

violet meadow
manic tendon
#

Thank you
How does it differentiate between hostile and friendly targets? In case I want to apply it to an enemy

violet meadow
#

In the findNearby the -1 gets the Hostile creatures (I think it filters the ones that have the opposite alignment compared to the source)

manic tendon
#

So for enemies I should put 1 instead of -1?

violet meadow
manic tendon
#

Ah, understood, thanks for the help 🙂

river urchin
#

is there any way to make a target auto-fail a save if their size is medium or smaller?

violet meadow
river urchin
manic tendon
violet meadow
# river urchin yup, against a specific item

Use this as an ItemMacro | After Targeting complete ```js
for (let target of args[0].targets) {
if (!["tiny","sm","med"].some(s=>target.actor.getRollData().traits.size.includes(s))) continue;
const effectData = {
"changes":[
{ "key": "flags.midi-qol.fail.ability.save.all", "mode": CONST.ACTIVE_EFFECT_MODES.CUSTOM, "value": "1", "priority": "20" }
],
"disabled": false,
"duration": {
"startTime": game.time.worldTime,
},
"icon": "icons/magic/control/debuff-energy-hold-yellow.webp",
"label": "Fail save - size dependant",
"tint": "",
"transfer": false,
"flags": {
"core": { "statusId": "" },
"dae": { "specialDuration": [ "isSave" ] }
}
}
await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
}

violet meadow
manic tendon
#

Using ternary operators, is it possible to create an effect that applies if a creature doesn't have proficiency to a specific save?

#

(Is there a variable that returns a 0/1 if a given save has proficiency added to it?)

violet meadow
#

What exactly do you want to do? Do you have a shareble item description?

manic tendon
#

Sure, it's for a camping/rest rules that I created that give minor buffs if PCs do well on certain checks and so on.
This is what the ability is supposed to do:

Balance Diet
You can create a number of vitality-boosting supplements for yourself and up to two other creatures. You and the chosen creatures gain a bonus on Strength, Dexterity, and Constitution saving throws equal to one-half your proficiency bonus, as long as that creature is not proficient with the given saving throw already.

#

(Lasts until they finish their next long rest)

#

So I want it to check if they have proficiency in each of those saves, and add 1/2 prof if they don't.

manic tendon
#

Oh, I think I might know how to do it
@abilities.con.proficient > 0 ? "+0" : "+floor(@pb / 2)"
Something like that

#

Hrmm, that's not working...
This is what I have right now: system.abilities.str.bonuses.save | Add | @abilities.str.proficient > 0 ? "+0" : "+floor(@attributes.prof / 2)"
Where did I get my syntax wrong? 🤔

inner ether
#

Been trying to get, what I'm assuming are some older macros working on a players conquest paladin (lvl 20 1-shot) with little success.

About all I can do macro wise, is make sure the macros are named correctly, and check the macro text to double check name references lol

violet meadow
manic tendon
#

So I should create 3 features, one for each of the saves affected?

violet meadow
manic tendon
#

Gotcha, thanks 👍

river urchin
#

is there any way to trigger an On Use Macro BEFORE targeting? Right now "Called before the item is rolled (*)" happens after targeting

gilded yacht
gilded yacht
gilded yacht
gilded yacht
gilded yacht
river urchin
#

I already have a way of displaying range

#

Through an active effect with an automated animation

#

That effect is activated by a feature which I could trigger through a simple macro (like the ones created when you drag something to the toolbar

#

I'd like to activate said simple macro when i click a spell before selecting my targets

gilded yacht
coarse mesa
coarse mesa
#

(maybe an Actor onUse that picks up anything you use that has a range 😮)

river urchin
# coarse mesa (maybe an Actor onUse that picks up anything you use that has a range 😮)

with my limited knowledge of how to write macros, my current solution (assuming pre-targeting onUse macro gets implemented) is:

  1. Create a feature for every range category, let's call it feature-range-XX (XX being each range). Self, self; as their range.

  2. Create an AE on each each feature-range-XX called effect-range-XX (XX being each range). Just in case make it apply to self when item has targets.

  3. Put the needed feature-ranges into each ranged character. Create a macro to trigger each of them individually, trigger-range-XX to quickly remember it.

  4. For each effect-range, create an A-A automatic recognision animation (see picture). Points 1 and 2 are required. Point 3 is to get the same simple circle A-A teleport uses (which is subtle but visible enough), choose its colour through 5; if you want all of them to be the same, you just have to duplicate this effect and adjust the range (keep in mind 1=5). The circle is this one, it's the only visual effect A-A uses that doesn't depend on jb2a modules/autoanimations/animationPNG/teleportCircle.png

  5. Create another macro for each range: remove-range-effect-XX, the macro having this (edit effect-range-XX for every case):
    await warpgate.mutate(token.document, {embedded: {ActiveEffect: { 'effect-range-XX': warpgate.CONST.DELETE}}}, {}, {permanent: true, comparisonKeys: {ActiveEffect: 'label'}})

  6. On each actual ranged item/spell/feature, set 2 onUse macros:

    1. Pre-targeting (currently non-existent): trigger-range-XX
    1. Before targeting (already existent): remove-range XX

(note that my limited knowledge might need to create a ton of items, effects, macro-trigger and macro-remove, and there is maybe a lighter way to do this)

novel gale
acoustic jasper
#

how to create a macro that lets a player select a target and deal damage? For example I have a script that checks if my player attacked an undead and if YES then he can select another target and deal him 1d6 (or any) damage?

#

I know how to check for undead and deal damage, but don't know to give a player an option to select a target for that damage

coarse mesa
# river urchin with my limited knowledge of how to write macros, my current solution (assuming ...

This is promising! I think it would be much easier just to use Sequencer directly in the macro and feed it the range from the item. A little out of my area of expertise but sounds doable. Then hopefully you could apply the same idea to an actor onUse macro so that it covers all ranged item rolls without having to set up each item individually. It would still be cool for ranged weapons etc too

vast bane
#

Drow poison, and the hooked spear come to mind for weapon attacks.

river urchin
dark canopy
#

once you start chaining together...i dunno, more than 2 forms of roll/macro execution into a single "thing", I would consider stopping and searching for other approaches.

river urchin
novel gale
molten solar
#

A completely transparent circular MeasuredTemplate created with each dnd5e.useItem

#

Sounds easy tbh. Two lines of code? 🤔

dark canopy
molten solar
#

Could one be created locally, and sync?

dark canopy
#

not natively, though at some point i do want to implement "remote crosshairs"

#

i figured it would be similar to the template previews

#

(i.e. only locally drawn)

molten solar
#

Guess some pixi magic is needed.

river urchin
#

I mean if this gets implemented in any module it would be sweet

dark canopy
molten solar
#

preUseItem is before the AbilityUseDialog even pops

river urchin
#

it's a quality of life improvement for badly space oriented people (like me xd)

dark canopy
molten solar
#

You just want everyone to use warpgate

dark canopy
#

iff it makes things easier 🙂

molten solar
#

Though this is the module dependency channel. It's in the name.

river urchin
river urchin
molten solar
#

iff? It means "if and only if"

river urchin
#

aaah logic

molten solar
#

a implies b and b implies a

river urchin
#

ye, ye

river urchin
# violet meadow Use this as an `ItemMacro | After Targeting complete` ```js for (let target of a...
for (let target of args[0].targets) {
    if (!["large"].some(s=>target.actor.getRollData().traits.size.includes(s))) continue;
    const effectData = {
        "changes":[
            { "key": "flags.midi-qol.disadvantage.ability.save.all", "mode": CONST.ACTIVE_EFFECT_MODES.CUSTOM, "value": "1", "priority": "20" }
        ],
        "disabled": false,
        "duration": {
            "startTime": game.time.worldTime,
        },
        "icon": "icons/magic/control/debuff-energy-hold-yellow.webp",
        "label": "Disadvantage on save - size dependant",
        "tint": "",
        "transfer": false,
        "flags": {
            "core": { "statusId": "" },
            "dae": { "specialDuration": [ "isSave" ] }
        }
    }
    await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
}

//js code

trying to use this to make large creatures have disadvantage on the save, but i guess there's something i'm missing

violet meadow
#

Log the token.actor in the console to check how large is defined. Might not be large and I don't remember now

molten solar
#

"lg"

#

The left-hand side keys are what you use.

river urchin
#

alright, thanks

#

still doesn't work though idk why

molten solar
#

toss in a console log and make sure you actually get past that first check

river urchin
#

a console log of what?

#

the spell use?

violet meadow
#

Also have you changed size of the token or on the character sheet?

violet meadow
#

Nope to which one 😅? This macro will check the character sheets size

river urchin
#

huh weird

#

now it works

#

i was gonna send you the console log but then i see it making the save with disadvantage

#

i changed literally nothing xd

molten solar
#

You can simplify a bit.

const effects = [{
  changes: [{
    key: "flags.midi-qol.disadvantage.ability.save.all",
    mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
    value: "1"
  }],
  icon: "icons/magic/control/debuff-energy-hold-yellow.webp",
  label: "Disadvantage on save - size dependant",
  flags: { dae: { specialDuration: [ "isSave" ] } }
}];
[...args[0].targets].filter(t => {
  return t.actor.system.traits.size === "lg";
}).map(target => {
  const actorUuid = target.actor.uuid;
  return MidiQOL.socket().executeAsGM("createEffects", { actorUuid, effects });
});
river urchin
#

oh

#

would that also work for the fail save one?

molten solar
#

is that what "isSave" does?

violet meadow
#

Nope

molten solar
#

I just removed the default values.

violet meadow
#

That is for 1 save duration of the AE

violet meadow
#

But you are giving dis to saves

#

Ah ok

#

Yes

river urchin
#

hold on, if outside a macro i create an AE with flags.midi-qol.disadvantage.ability.save.all; custom; 1; it will only apply disadvantage to 1 save?

violet meadow
#

Nope to all

river urchin
violet meadow
#

So the way these macros work is: you get the relevant targets after targeting is complete and before actually rolling for a save. Then you create an AE on them with a special duration of 1Save, the saving is affected by it as you see fit and the AE gets deleted immediately after.

river urchin
#

and the difference between yours and zhell's?

molten solar
#

Mine? It's yours. 🤔 I didn't change anything.

violet meadow
#

Not needed fields removed. I have one as a template and change what's needed on it and, most of the time, has stuff not needed 😅

celest bluff
river urchin
river urchin
#

I can collage already existing macros with different degrees of success

#

I am one of those people who just wait, pray and ask nicely for features and macros to be published for free xD

celest bluff
#

You would hook into preitemRoll or preamble in midi. Badger has some examples of crosshairs, I do too but I am busy with work atm. You can look at his pull10ft macro, it'll show you a working of example in action.

#

The problem though is how do you want this executable. Is this something happens when they click on the spell it minimizes and gives them a crosshair preview of the spell and let's them place the mock template?

#

I could see perhaps having something that gave helpful images of the template in the item details would be cool

#

So you can't have players going, oh I didn't know it was like that..

river urchin
#

oh, no, you're right

#

the template is previewed after the spend spell slot dialog

#

but i wasn't thinking about aoe, i was thinking more about ranged single target (or multi-target) stuff, which do ask you to target something before the spend slot dialog

dark canopy
#

more or less the same idea -- preItemRoll would be the hook to use

celest bluff
#

Think a spell preview module would be a cool idea

dark canopy
#

create the crosshairs (or your range finder of choice) to the size of the spell's range

celest bluff
#

They can inspect the spell and add some preview button at the top

#

Or somewhere

coarse mesa
dark canopy
coarse mesa
#

Why not both?

dark canopy
#

feedback overkill/duplication, imo

river urchin
vast bane
#

that would probably fail in a 3d environment with elevation though

river urchin
# dark canopy there is also this approach

2 questions:
why does it stick to lines and squares instead of just squares in the grid?
if the triangle signals out of range, why the vortex warp macro i'm using (#macro-polo message) always shows the triangle when trying to tp a creature? (i guess because the macro itself has no range indicators)

dark canopy
#

(assuming 5/5/5)

dark canopy
river urchin
#

makes sense

#

is crosshairs a module?

dark canopy
dark canopy
river urchin
#

(but that's just personal)

coarse mesa
#

Ideally you’d want the ring attached to your token so it moves with you if you move before finishing targeting

vast bane
#

doesn't ripper have a patreon module that does rangefinding?

dark canopy
#

definitely not worth a paywall, the idea is maybe....30 lines of code?

molten solar
#

casually gestures towards exposed apis in Template Macro and babonus

molten solar
dark canopy
#

i guess my mention of line count wasn't quite the point, more that "we have basically solved it here"

molten solar
#

I'm prepared to go full Hemingway if I would get paid by lines of code.

river urchin
#

flags.midi-qol.fail.ability.save.all
if this is the flag to auto-fail, what's the one for auto-succeed?

river urchin
wintry bridge
#

Hello. After updating to the tenth version, damage is not automatically applied from templates. Can you please tell me which setting is responsible for this?

vast bane
#

disable all but the minimum for midi and test again

wintry bridge
#

I just want to understand which of the buttons is responsible for automatic dmg from templates. 🥲

vast bane
#

are the templates targetting the targets?

wintry bridge
#

Yes

vast bane
#

what is your save method?

#

Spoiler alert, my next question is going to be, does it happen with just socketlib, libwrapper, and midi qol enabled?

#

there is a module called find the culprit that makes this question a matter of seconds to find out and doesn't mess up your configuration at all fyi

wary bridge
#

I think I worked out the spell activation issue (I can get macro to be called) - I removed the DAE and went straight MIDI onUse however it only activates if I use All or Called before item is rolled which means it doesn't wait for ack of consume spell slot or application of template (which is what I'd prefer) - any ideas on how I can make it wait for template placement?

coarse mesa
river urchin
# molten solar You can simplify a bit. ```js const effects = [{ changes: [{ key: "flags.m...

for some reason, this one isn't working for me, while the other one is. Now, issue might be i'm trying to set multiple of these "size filters" for a macro, and I've realised that's not possible because this macro bit already triggers the saving throw, so only the 1st one works properly (while the rest do apply the effect, but it remains on the creature because the save has already been made). Still, the other one works (but just for the 1st filter). The idea would be: tiny, small, medium autofail; large has disadvantage; huge does regular roll; and gargantuan auto-succeeds (or add high str save bonus, since it's a strength save)

coarse mesa
river urchin
#

I'm feeling that cheap else if made from barely knowing code keywords isn't gonna work...

for (let target of args[0].targets) {
    if (!["lg"].some(s=>target.actor.getRollData().traits.size.includes(s))) continue;
    const effectData = {
        "changes":[
            { "key": "flags.midi-qol.disadvantage.ability.save.all", "mode": CONST.ACTIVE_EFFECT_MODES.CUSTOM, "value": "1", "priority": "20" }
        ],
        "disabled": false,
        "duration": {
            "startTime": game.time.worldTime,
        },
        "icon": "icons/magic/control/debuff-energy-hold-yellow.webp",
        "label": "Disadvantage on save - size dependant",
        "tint": "",
        "transfer": false,
        "flags": {
            "core": { "statusId": "" },
            "dae": { "specialDuration": [ "isSave" ] }
        }
    }
    await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });

    else if (!["tiny","sm","med"].some(s=>target.actor.getRollData().traits.size.includes(s))) continue;
    const effectData = {
        "changes":[
            { "key": "flags.midi-qol.fail.ability.save.all", "mode": CONST.ACTIVE_EFFECT_MODES.CUSTOM, "value": "1", "priority": "20" }
        ],
        "disabled": false,
        "duration": {
            "startTime": game.time.worldTime,
        },
        "icon": "icons/magic/control/debuff-energy-hold-yellow.webp",
        "label": "Fail save - size dependant",
        "tint": "",
        "transfer": false,
        "flags": {
            "core": { "statusId": "" },
            "dae": { "specialDuration": [ "isSave" ] }
        }
    }
    await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
}
dark canopy
#

``` at the end, not //jscode 🙂

#

but no, that is incorrect syntax

river urchin
river urchin
#

problem is, i guess, i don't actually know where the proper conditions and statements should start/work

violet meadow
#

This ```js
if (!["lg"].some(s=>target.actor.getRollData().traits.size.includes(s))) continue;

So it will never reach the `else if` statenement
river urchin
#

hmm oooh i think i'm getting it

river urchin
#

so i remove continue and it would work?

#

otherwise i could do something like this example, listing the sizes and then writing ifs for each one

dark canopy
#

#macro-polo is the place for help with scripting outside of MIDI-specific API 🙂

#

that said, that expression is overly complex
if (!target.actor.system.traits.size.includes('lg')) continue;
is much more clear

dark canopy
#

all good, just pointing to the best resource

celest bluff
molten solar
#

@violet meadow, out of curiosity, what have you accomplished with the babonus api?

pine marsh
#

When I try to use "@target.details.type.value".includes("dragon") as an activation condition, I'm getting a TypeError Cannot use 'in' operator to search for value in Dragon." This is in V9. Any thoughts what I'm doing wrong?

manic tendon
#

Stumbled on this conversation, and that's been my experience. I loaded BAB in, and had a lot of trouble doing anything I wanted to. I think an in-depth guide with a ton of examples would help a lot. As it was, I couldn't make heads or tails of how to make the module work well.

molten solar
manic tendon
#

I'll give an example of something I tried to do recently; I wanted creatures with an effect to add 1/2 their PB if they didn't already add their PB to str, dex, and con saves.

molten solar
#

I assume it was the status id that threw you off

manic tendon
#

Like I said, I gave BAB a spin, and I have no clue how to make it work 😕

#

I ended up uninstalling it since I couldn't make heads or tails of it, but I can give it another try

molten solar
#

🤷 If it was a while ago, the even-more-in-your-face tooltips I added might help.
I think a lot of people missed that there were titles when you hovered with the cursor.

manic tendon
#

It might be good for people who understand the code within the game, but as someone who's mostly an end-user who knows very little about the workings of the game, it felt very obtuse to me, which is why I think a repository of examples showing how to build various bonuses would go a long way

#

If they included things that would otherwise be complex or are incredibly interesting, I think it could raise a lot more enthusiasm for the module 🙂

#

But if I just want to add +1 to attack rolls, saving throws, AC, or otherwise, I find it easier just to create an item that applies an effect, or just an effect that does that.

molten solar
#

Well yeah, you don't use Build-a-Bonus as a replacement for system.bonuses.mwak.attack or some such

manic tendon
#

Right; giving examples of what it can do, and how to do it, would be extremely helpful IMO

#

I saw the documentation had a bunch of examples on the right of things that were already made, but I'd have no idea on how to even start reproducing those

molten solar
#

But I am not going to disagree.

vagrant wharf
#

how would I program in an auto heal over time (every turn)

#

I have a ghetto version from reverse engineering the overtime flag from phantasmal killer, but despite setting savingthrow=false it still waits for a save

#

I also turned on damagebeforesave (for this I set the "damage type" to healing)

dark canopy
#

helpers/simbul's creature aid has regeneration automation you could use

vagrant wharf
#

thats a module?

dark canopy
#

5e helpers on v9, and simbul's on v10

vagrant wharf
#

is there no way to do that as a recurring "damage" via midi?

molten solar
#

actor.applyDamage(-10),
slap that into Effect Macro

vagrant wharf
gilded yacht
# vagrant wharf effect macro?

For midi you can use overtime effects or more easily use the module effect macro to attach a macro to the active effect. Effect macro does not provide the workflow context or allow arguments to be passed, but is very easy to use.

vagrant wharf
#

I'm not good with coding, I guess I'll just have them use the saving throw every turn

#

and set the DC to 99

molten solar
#

(That is the entire macro, that one line of code, fyi.)

gilded yacht
#

Overtime effects don't require coding (but the coding required is literally what Zhell posted). For a midi overtime effect you want
flags.midi-qol.overTime OVERRIDE turn=start, removeCondition=false, damageRoll=10

vagrant wharf
#

turn=start, saveDC=99, saveMagic=false, damageRoll=1d4, damageType=healing, savingThrow=false, damageBeforeSave=true

#

I took that from your spell

gilded yacht
#

If you just want to do damage each turn you can skip most of the fields, turn=start, removeCondition=false, damageRoll=2d10 should be enough. I think if the damage type is healing it will heal rather than damage

vagrant wharf
manic tendon
gilded yacht
#

Probably correct, I tend to put it in as a reminder that there is no save on purpose.

coarse mesa
#

Where is this advantage notification coming from in v10? 😲 I love it!

#

I remember talking to Tim about it with regard to midi+AR synergy back in v9... has it come to pass?

molten solar
#

Well it ain't core, I can tell you that much

chrome gale
#

I have this ability on a character, and I'm trying to put it as a passive effect. Is it possible? I can do it for 'all wisdom saves' but im not sure how (if possible) to do the magic check

You have advantage on all Wisdom and Charisma saves against magic.

scarlet gale
#

99% of the time it'll be magic.

chrome gale
coarse mesa
scarlet gale
#

I think in v10 version of midi you can check the workflow in the custom box

#

So it might be possible

chrome gale
#

I'm not on v10 yet, wont be upgrading until after the next game, but maybe

scarlet gale
#

@molten solar The find grids fix isn't in the currently released version of template macros right?

molten solar
#

Should be?

scarlet gale
#

0.0.5 has the initial version I think

#

then you did a fix right after IIRC

#

I see the fix commit

molten solar
#

Yeah, I replaced the files in the release.

scarlet gale
#

ah

molten solar
#

check the api, see if its there

chrome gale
#

This seem correct?

scarlet gale
#

I don't think it should be max

#

For the 2nd box

chrome gale
#

yeh that was a typo, they're now both advantage.ability

scarlet gale
#

then should be good

#

There is likely more complicated ways to get it to check for magical abilities, but it's unlikely to be worth the effort.

chrome gale
#

I think most things that target charisma or wisdom are magical anyway

#

if it was dex or con I'd be more concerned

scarlet gale
#

What feature is this for? I'd say Gnome cunning, but you don't have int there as well.

chrome gale
#

It's mildly homebrew, a 'wildling' race

scarlet gale
#

Ah cool

chrome gale
#

So yeh it's mostly gnome-based