#MidiQOL
1 messages · Page 62 of 1
I gotta go pick my daughter up from school but I should be back in 30ish minutes
still new to all this so getting a grasp on the right thing to do to get it working
its probably the [additional] thats stopping the damage
it is very naughty to use custom flavors with midi
sure but I also can't talk for 30 mins
ill be here ... take care of what ya need to do mate
All up to newest, i usually update every time before i launch.
Probably the issue with DAE doubling up the active effects
Check if there are multiple similar effects on the actors
Idk man, does this every time
Also Checked "Friends Save" just to lessen probable chaos. But the core problem isnt fixed.
you really should always give us the version numbers, newest doesn't mean anything and right now midi kinda needs to be on not newest for not newest dnd5e
10.0.27 For Midi
10.0.18 DAE
2.1.4 5E
also midi has a ver very late build requirement now so you could be on 284 and then your newest midi is not the newest midi
afaik the only bug in dae duplicates equipped effects
SG is a transfer effect, so unsure if it adversely effects it
drag out midi sample item version of SG
pretty sure theres no way you are using it in your current example cause the sample item doesn't target self
OH
are you casting SG via an npc?
ye
that would do it
in v9 a fix was had long ago, I doubt it carried over to v10
don't use it on npcs till someone figures out how to fix it again
xD
so it seems i have the part to roll 3d8 total against giants fixed. now only other issue is throwing 2d8 when weapon is used at range. how many activation conditions can i have and customize the damage off of those ?
I would personally make a seperate item
ok.
Ha I thought that was fixed
I will test later if I don’t forget
it was in v9, I think you were the one that fixed it
but the v10 one is an all new macro so I dunno
when you have a magic item that has 2 other item features, you can use macro.createItem and link the other items in it(you can drag and drop items into the effect value)
I want that automated but just mulliganed and used AR
Advantage reminder is my answer for everything lol
Yeah the player version works great, but could i not make an itemcopy of the item and hand it to the NPCs that have the "wierd npc version" of the spell?
I vaguely remember the fix being a change to one of the tabs of the dae
like a stacking change or something or something in the aura effect
I doubt its the same issue cause the macros all new
that is ddb's sg
Player version, that works
thats not midi sample items unless you changed its icon
@vast bane is thare a tutorial on how to do that lol.. still learning the systems so no idea how to get that done
changed most icons
um macro.createItem is hard to share but the trickiest part I have a gif of...
its an active effect that when its active on an actor, the items appear in their inventory
and azuredge is requires attunement and a weapon, so ae's on it only appear if you equip/attune
sooo, copying that player based spell to npcs should fix it?
When you drag an item to the effect value, it needs to stay where it was dragged from
so make a special compendium:
and drag it from the compendium
this way the items never deleted
hmm ok will work it out .. thank you
@violet meadow ok its not the v9 bug, cause my spirit guardians works just fine
My guess is they are not using midi sample items(which is true cause their icons are different)
once you have the midi sample item, spirit guardians respects dispositions so if the DM is not doing them right then the wrong people get affected
A red border has cast it, only green and blue are affected by it
if a green/blue had cast it, only red are affected by it
I believe the problem in v9 was that it wasn't respecting dispositions
it was assuming only players casted it
the most common issue with dispositions is player controlled npcs cause the player setting overrides to green, but the disposition will still show as hostile
Welp why would the animation not work if it is recognized and active?
ctrl F5
wasn't there something about global recog with sg?
I swear there was something
I personally do NOT have a global recog for SG
and I know its in there by default, so something told me to delete it
How did you make it work
you also still don't have the sample item right
did you edit the ae?
why is your ae icon different?
either that, or did tposney change the icon in later versions of midiqol guys?
I'm on 10.0.24
DM me the first tab of that ae
can you show me the effect tab of the midi sample item in the midi sample items compendium?
Never seen the tab, probably being blind
unless you are editing the sample item, you still are not using midi sample items
Unless a later version of midi tim decided to change the active effects icon
I highly doubt in his busy life he decided to change it though lol
the reason why you want the sample item is because the sample item has an item macro
you can duplicate its active effect but its referencing an item macro
Not blue for me ;Z
that looks like the items sidebar
i can tell
cause filling your item sidebar with 10000 data items is quite the haul
compendiums are less of a drag on the server load
my 64 gig of ram can handle most
your players won't have that
delete the one on the actor, drag the spirit guardians from that compendium over
Delete the one referenced in the spell, and replace with midi?
also you should install midi srd via
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json
And find More Automated Spells, Items, and Features and install that too. These two modules are more automated stuff.
*delete the spell, drag out the sample item spell
Ahhh
you can rename it
well, rename it by removing the version, but you want it to stay the same if you want it to play the auto recog
howdy all-- i'm trying to automate Lighting Arrow, which has this description: The next time you make a ranged weapon attack during the spell’s duration, the weapon’s ammunition, or the weapon itself if it’s a thrown weapon, transforms into a bolt of lightning. Make the attack roll as normal. The target takes 4d8 lightning damage on a hit, or half as much damage on a miss, instead of the weapon’s normal damage.Whether you hit or miss, each creature within 10 feet of the target must make a Dexterity saving throw. Each of these creatures takes 2d8 lightning damage on a failed save, or half as much damage on a successful one.The piece of ammunition or weapon then returns to its normal form.
I
I would make a specific item/spell for that
And just steal the ice knife macro and change wherever it needs changing
in terms of damage
just have the spell create an item with the effect?
that sounds MUCH easier than what I was originally thinking. LOL
its basically the pally smites but for ranger
you could probably replicate it off the sample item
I think if I was automating it, I'd make the lightning arrow item, have it be a created item, and the spell places a self buff on the actor that is an advantage reminder for damage dealt by a ranged weapon. that has a macro document link to expend the created arrow, and have the arrow delete on empty.
I believe in you callbritton. You can automate it !
lol. thanks.
Pretty doable with a midi on use flag macro. Swap out the damage with setDamageRoll and do a findNearby to do an aoe save.
is there an examnple of that on use flag macro I might refer to?
cool thanks
not sure if thats what Chris is referring to though
cause your item swaps out the damage while branding smite just adds to it
You could just make the item, and the ranger can just not complete the attack workflow and fire the item if they hit(if you don't fast forward damage)
or rather auto roll damage
A lot of my items on my GitHub do this
This would be a good start for what you're doing. Drop the template stuff at and end and instead do a midi findNearby.
Also wouldn't need the multiple macro passes.
I know the Activation Condition field can be used to specify target creature types, can I use that to have a Template effect, where only creatures of the right type under the Template are affected, or does it only work for an ability that targets a specific creature?
In v10 Activation conditions should evaluate against each target individually, at least for arguments found in the actors rollData
So it should be fine
What are you trying to do.
i think i've just about got this working. But the spell level scaling is bedeviling me. It goes up by 1d8 for every spell level above 3rd, so the created item will have a higher damage if it's cast at 4th level.
I'm trying to create this in the embedded item. I have the spell level that it's cast at in item, but I can't seem to get the damage part embedded correctly.
damage: {
parts: [
[ `${item}+1` + "d8", "lightning" ] // ["Formula", "acid, bludgeoning, cold, fire, force, lightning, necrotic, piercing, poison, psychic, radiant, slashing, thunder, healing, temphp"]
],
that gives me 4+1d8 in the damage field of the created item. It should be 5d8
I have a spell that should apply an effect on a failed save from the target, but only vs Constructs
oh, wait. I guess I can just define damage die as let damageDie = item + 1 up higjh...
You can make the item normally then look at it's object in console to get the exact format
get the check from midi readme for race or type, change it for constructs and check the box apply effect only when activation condition is true
It should work
Cheers, the checkbox to only apply effects on activation was what I was missing! Follow-up question, is there a simple way to not force a saving-throw on all the non-constructs in the area, or would that require a much more complicated setup / item-macro?
ok. i'm not understanding why this is not adding the item macro to the created item:
it's exactly the same data structure as the json of the item I created, which works fine if it's just dragged to the char sheert
the item macro is wrapped in a flags section, just like in the json.
(also, fyi, i think the item macro key is misspelled. it's itemacro when maybe it should be itemmacro?)
ah, i think i figured it out. flags goes outside the system section.
Ah, sorry, last month has been killer on work so I haven't even been able to keep up with anything else
Did you get this solved?
I did eventually, yes. Just gave the Ranger Hunter's Mark as a non concentration spell.
Which, I suppose still works as intended.
Question regarding Midi QOL: if I am using a house rule that states crits are max base damage and then to roll crit damage (rapier + sneak attack +4 : 1d8+4+2d6 > 8+4+12+1d8+2d6), which critical damage option do I choose?
Would need a 3 lines macro
I will share when I am back at my desk
I think. It will be the other way around but still should be the same
Cheers, thought was it, the reddit thread I found only shows max crit dice, doesn't show the two options that have been split from it.
@vast bane I tried creating that item effect . and saddly failed got an error when using the item so for the time being i created a second item with the right properties my player will just have to switch to it with the combat hud to use it .
messed around a bit and modified damage buttons
That's quite sleek.
the changes to css are a bit hacky but they work so 😂
for activation condition - i want the other roll to activate when target is ranged ... how would i do this ?
what does it look with merge though
I really don't think you can do that
unless you want both to roll
hmm ok
I showed you how to make the second item what was the error?>
went by to quickly and i did not get a chance to check console before it crashed had to relaunch my world to access the character sheet lol
33
The process is quite simple,
- Create both items in the side bar
- Create the macro.createitem key on primary item set to apply on equip
- Move second item to special compendium
- Drag from compendium to the effect value of the macro.createitem key on the first item.
- Move the first item to an actor, equip and attune and tada two items.
and if all you want is to be able to use the ranged thing and don't care about the appearance/jankiness, then just drag both items to the sheet and call it a day
this is the weapon that is giving me the headache You gain a +3 bonus to attack and damage rolls made with this magic weapon. It has the thrown property with a normal range of 20 feet and a long range of 60 feet. When you hit with a ranged attack using this weapon, it deals an extra 1d8 damage or, if the target is a giant, 2d8 damage. Immediately after the attack, the weapon flies back to your hand. but ill try again
you can create the two seperate items very easily
all I'm offering is a way to link them so that the second item only shows up when the player has it equipped
Understandable .. I just made two weapons and let them know they will have to use the second one as regular thrown and the first one against ginats . unless i write a macro for it which im still learning as most macros are outdated vs the new midi heh
the giants thing is an activation condition you can put on both items
you don't want a macro on one item, players typically hate prompts in their martial attacks thats why RSR is so popular
if its one item they would likely constantly get prompted for "do you want to use X"
understandable
this is with merge, if you meant condense then probably it doesn't work at all since I didn't test it
ok. this is very weird. I'm still working on the lightning arrow macro (referenced above) and I'm getting this from my args ...
@gilded yacht Any chance you could make the "Magic Damage" midi-qol fields work with magical resistance when it's set on an item that's set as a feature?
this means that args[1] returns "[object"... I've never seen this kind of split array before. Can someone explain what's happening?
ok. found it was the way I was calling the item macro in DAE. I needed to call it as @item.level instead of just @item.
Just finished my own version of Lightning Arrow: https://github.com/chrisk123999/foundry-macros/tree/main/Spells/Lightning Arrow
Requires: Midi-Qol, Effect Macros, and Convenient Effects.
Place this as a on deletion effect macro in the DAE to handle removing concentration: https://github.com/chrisk123999/foundry-macros/blob/main/Spells/Lightning Arrow/Effect Macro - On Deletion.js
Edit line one of Chris-LightningArrow.js to have the key to a compendium that spell features are stored in.
secondly, is there an easier way to get the nearby AOE targets. This is the code I'm working atm: ```js
const aoeTargets = await canvas.tokens.placeables.filter((placeable) =>
canvas.grid.measureDistance(target, placeable) <= 14.5 &&
!canvas.walls.checkCollision(new Ray(target.center, placeable.center), {mode: "any", type: "light"})
).map((placeable) => placeable.document.uuid);
theres a findnearbytargets function for midi
Oh yea
edit line one of Chris-LightningArrow.js
to have your compendium key for storing spell features
May not need it anymore, but Midi has a handy exported function for that:
MidiQOL.findNearby(dispositionValue, tokenDoc, range);```
Getting a crit with this spell would actually be crazy
yeah, it's VERY high damage.
give me a second and I'll send you the git for mine.
Feel free to just plagiarize mine.
90% of it was just copying and pasting stuff from other stuff I've made
Not SRD spell, remove the description.
plus, i can use AA to drop some nifty lighting effects on the arrow... working on a sequence for the explosion... probbaly will recreate the chain lighting look
so, as written, it doesn't do the normal damage AND the lightning damage. so, you're adding an exta d8 onto the damage roll, @scarlet gale (if you're using a longbow, for example.)
I went with the ruling for the spell.
Easy enough to edit out if you don't want it.
But I'd handle it the same way shadow blade is handled.
yup yup.
I may adjust it slightly to make sure it can't roll a fumble
works nicely
since that winds up not doing the damage part
since midi just yeets the workflow after a fumble :/
Thankfully this spell was 90% copying other stuff I've done and 5% making some standardized functions I should have made before.
Just realized you weren't talking about the modifier.
It shouldn't be doing the normal damage.
It should just replace the whole damage roll with it's own.
yeah
do you have any other roller modules
just midi
screenshot the damage card?
The only thing that I can think is doing that would be another macro / worldscript that's also doing a setDamageRoll function after this.
All good
I always wind up doing that to myself when I use a ddb imported spell initially
ok, so sorry for more questions: on the midi findNearby, on the dispositionValue parameter, can I just put in null so it finds everyone?
yea
I wrapped that function with my own helper function in my own macros to make more sense for myself
ah, i see that now in line 41
In my own foundry setup I don't actually have the top section. I just have all my functions in a worldscript
Line 2-67 aren't needed when it's done that way.
nice.
You are a wizard I tell ya, a wizard!
Should the item be a generic item or what exactly should the item look like?
I get this with your Wither and Bloom macro. I assumed it was an Item Macro?
Strange, could you screenshot your item details for me?
oooooh hang on noticing I don't have the item macro set to after active effect
its working now
Before damage application
my item had an old macro that required preamblesomething
is the correct run time for the item macro
Change it to before damage application if you want allies to not get hurt by the spell
k yep that is solving that too
Just edited my original message to include that tidbit.
Any other spells you've been eyeballing?
I didn't have my game this week so I'm just killing time making spells here
Um, I just spent the night worldbuilding with my teachers pet player so I'm kinda elbow deep in the wrong stuff for checking that
Mass cure wounds could probably utilize your cool target choice menu
same with mass healing word
An elegant way to do Psi-Bolstered Knack for Psiblades would be super useful for us… not sure if remotely possible tho
The way I'm handling them right now is I just have them as direct heals and the players pick their targets
Mass Cure wounds is a template placement and then X targets in the template. For Mass Healing word its X targets within range
no they both are simaltaneous effects so should only be 1 roll
yeah thats what I'm doing
But it would be simple enough to do
Although I've have to make another dialog box for checkboxes instead
But that would be useful in more than one place
theres nuance in the mass cure wounds since the origin point is picked by the caster instead of like mass healing word where the caster is the origin
sounds fun
bonsu points that they are SRD spells too I believe
This is why I have the whole party see each other in MTB and they can Ctrl-click the portraits to select targets quickly
yep I have them all set too, some glitch with MTB lately where default is ignored in the token settings for mtb
all the druids wildshapes keep having to be overridden to show up
I feel the same way about warlocks lol
I only play warlocks when I get to to be a player
so where would i start looking when a spell is not ending .. i have an imported wizard and i cast her witch bolt and its like permenant i cant stop it lol
I love the warlock blocks in monsters of the multiverse
I love all the humanoids honestly I think thats one of the best books they have ever written
is it the animation thats not ending or the overtime effect?
If I recall, it only ends if they lose conc or move a distance and I don't think anyones made it that well?
theres no save in the overtime so it ends when the DM ends it
how would i end it as gm
end the casters concentration
or just end the ae on the target
aka delete it, I personally have a macro that I use to delete AE's on selected tokens
you can also do it with VAE/dfreds panel
Has anyone confirmed the new DAE fixes the duplicate effects?
i have dfreds installed not sure how to bring up the panel heh
two different modules
but midi meta we usually recommend Visual Active Effects instead due to some cool features it has that some of us do fancy things with
on v9 its dfreds Effect panel, v10 VAE
Zhell gives us a description editor that we can do fun stuff with
ok ill make the change
You can just delete the witchbolt effect out of the actor sheet effects tab.
You don't NEED VAE to do that
perhaps but VAE just made it way easier to disable it
I personally use https://foundryvtt.com/packages/temp-effects-as-statuses
Instead of VAE.
now to work out my world size template for fireball ...
If you want an alternative option
thanks will take a look so many options ...
the thing I like about vae is you can use enriched text in the descriptions
is ther a way to change the default size of spell templates ..... fireball is like a world ending size
Is your scale set on your scene?
Make a new scene with a proper scale set on the scene.
For anything non midi related you may wish to look at #core-how-to and #dnd5e
I genuinely had no idea there was a default landing page in foundry
ah so us with our old worlds don't get to see it gotcha
Yea
Do you ever find players trying to use mass cure wounds on a clump of more than 6 friendlies?
(ignoring enemies in the area for this question)
ItemMacro | After Targeting Complete ```js
const {targets} = args[0] ?? {};
const constructs = targets.filter(t => t.actor.system.details.race.toLowerCase().includes("construct") || t.actor.system.details.type.value.toLowerCase().includes("construct"))
game.user.updateTokenTargets(constructs.map(c=>c.id))
That's the plus to a roll ability skill when failed?
depends on the size of the party, my players party is 9 people atm. 5 players, 1 ridealong npc, a familiar, a steed, and a pet rat.
the steed is usually dead by noon each day, the familiar usually bites it once or twice a day, and I've allowed the rat to make death saves and hasn't been deleted yet
That’s the one, and you only spend the Psi point if the failure is turned into a success 😅
Remove any damage formula or scaling you have on the spell.
I don't think there's anything to do for mass healing word.
Having the dialogue would just take more time then actually selecting the targets in that one I think.
after active effects?
Seems to work fine with it set to after targeting complete
I also edited it cause our table has an exploding heals rule so I found the d8 entry and added an x after
Looks great though
fair
oh yea
that reminds me
async function getItemFromCompendium(key, name, ignoreNotFound) {
let gamePack = game.packs.get(key);
if (!gamePack) {
ui.notifications.warn('Invalid compendium specified!');
return false;
}
let packItems = await gamePack.getDocuments();
let itemData = packItems.find(item => item.name === name);
if (!itemData) {
if (!ignoreNotFound) ui.notifications.warn('Item not found in specified compendium! Check spelling?');
return false;
}
return itemData.toObject();
}```
Made this today.
Will return an item from a compendium similar to how macro.createItem does
you can do await fromUuid but this lets you search for it by name
bookmarking this to ask later, I gotta get of the pc for a bit now
I should just make you a function to get a spell from a compendium by name and warpgate it onto the target all in one go for you
So you stop doing those janky item.update to macro.createItem things
Ok I have something similar.
Now I want to share my Mass Cure Wounds too 😅
https://github.com/thatlonelybugbear/FoundryMacros/tree/main/MidiQOL_related/Spells/Mass Cure Wounds
Latest version of DAE is meant to fix the autocompletes
You mean that the target is not getting advantage on saving throws from the magical damage item?
use getIndex and then getDocument(id) for a much faster operation
Correct
its not an item though, its a feature right
just to make sure we're all on the same page with the term item
Yea
@violet meadow Rarity colors update fixed the sidebar issue thanks bud!
Line 14 of Midi sample items LOH
if (!consumeTarget || consumeTarget === "") consumeTarget = 'resources.primary.value';
would this need the fix they are talking about in dnd5e?
@violet meadow I just noticed that MASIF has a circle of mortality setup, which is the max heal thing. He seems to 0 out the heal roll and then take the roll and do max face*amount of dice+ modifier
he uses an actor on use for it
I wonder if I could somehow plagerize this circle of mortality, and replace the check on target for 0 hp, with a flag, like "yada yada beacon of hope" and then it will apply a max heal if anyone has beacon of hope on them
Would be pretty simple
I haven't actually checked if his works but all his stuff has been solid checking now
I have a have something like this already for a pact of the chain warlock
I think not, cause it doesn't update anything iirc. Just points to where it should look for the resource
I think MASIF is working, the problem is my exploding heals are confusing the hell out of it lol
What's that?
More Automated spells items and features, hes got a circle of mortality feature
its pretty dang slick
it takes the roll, and then adds the remainder so it always totals the max possible
4d4+5:
only issue is exploding dice get weird but I kinda like how weird it gets lol
I'd just reconstruct the roll
Well his method, rolls the dice so when you have exploding on, it adds the explosions on top
Interesting
so in a way it rewards my tables house rule even when the dice ar emaxed
I think I just need to change the trigger from the 0 hp to an effect called "Beacon of Hope"
Probably
I guess I actually need a check like this:
if (targetActor.system.attributes.hp.value != 0) return;
hes not checking if they have 0, hes checking if they don't have 0
so I need a check for if they Don't have an effec called Beacon of Hope
but then what happens if theres more than one target hmmm
eh I don't care
having a hard time finding an effect check macro
thoguht dfreds macros would have it but no beuno
You trying to find if the effect is on the target?
yeah
I know its like i_effect label but I can't find any examples, I really wish code was searchable here
but stuff in js code doesn't get parsed
let effect = targetActor.effects.find(eff => eff.label === 'name');
if (!effect) return;```
can effect be defined or is it like actor/token where its protected in v10?
it can
let effect = targetActor.effects.find(eff => eff.label === '"Beacon of Hope"');
Should it have quotes and single quotes?
No
I just use single quotes as a habit
Beacon of hope would be easier to do as a world script that modifies the damage details like I do in wither and bloom.
Ok so I have properly adapted the circle of mortality to apply to anyone with beacon of hope, my problem is that the cleric in the party also has literally "Circle of Mortality" so when he heals, it duplicates somehow...and I dont know why
the target wasn't at 0 hp so the circle of mortality actor on use should not have fired alongside it
What's your check for hp === 0?
This is my jerry rigged on for beacon of hope
if (args[0].macroPass === "postDamageRoll") {
const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);
let targetTokenUuid = args[0].hitTargetUuids[0];
let targetToken = await fromUuid(targetTokenUuid);
let targetActor = targetToken.actor;
let effect = targetActor.effects.find(eff => eff.label === 'Beacon of Hope');
// if Target HP > 0 return
//if (targetActor.system.attributes.hp.value != 0) return;
//If no Beacon of Hope
if (!effect) return;
// check to make sure only one target is selected
if ((args[0].targetUuids.length < 1) || (args[0].targetUuids.length > 1)) {
ui.notifications.error("You need to select a single target.");
return;
}
// compute maximum healing for the spell cast
let healingRollMax = 0;
for (let i = 0; i < workflow.damageRoll.terms.length; i++)
if (workflow.damageRoll.terms[i]?.faces) healingRollMax = healingRollMax + (workflow.damageRoll.terms[i].faces * workflow.damageRoll.terms[i].number);
else if (workflow.damageRoll.terms[i]?.number) healingRollMax = healingRollMax + workflow.damageRoll.terms[i].number;
let bonusHealing = (healingRollMax - workflow.damageRoll.total);
await setProperty(workflow, "BonusHealing", bonusHealing);
return;
} else if (args[0].tag === "DamageBonus") {
const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);
const actorUuid = workflow.tokenUuid;
const actorToken = canvas.tokens.get(workflow.tokenId);
let bonusHealing = await getProperty(workflow, "BonusHealing");
// Bonus Healing
if (bonusHealing > 0) {
await setProperty(workflow, "BonusHealing", 0);
return { damageRoll: `${bonusHealing}[healing]`, flavor: "Circle of Mortality Bonus Healing" };
} else return;
}
the circle of mortality is the same macro but with line 6 missing and the escaped line for hp check unescaped
You stop execution for when you are on 0 in the postDamageRoll hook, but not for the DamageBonus
So you will get 2 DamageBonuses
they are setup as actor on use, ALL
is there a way to stop them from firing the damage bonus?
is it as simple as adding the check again in the damage bonus entry
do I need to define the effect again in the damagebonus section?
since it looks like its all finished and wrapped
const workflow = MidiQOL.Workflow.getWorkflow(args[0].itemUuid);
const targetTokenUuid = args[0].hitTargetUuids[0];
const targetToken = await fromUuid(targetTokenUuid);
const targetActor = targetToken.actor;
const effect = targetActor.effects.find(eff => eff.label === 'Beacon of Hope');
if (args[0].macroPass === "postDamageRoll") {
//blablablabalb
}
else if (args[0].tag === "DamageBonus") {
//blueblueblue
}
You then can use effect in both conditionals
Do not redeclare the same variables inside the conditionals
I see what you are saying, so pull all the const outside the functions yeah?
hes got them all in their own
what about "let"
This should stay as is let healingRollMax = 0;
you're changing its value later on, that's why 😉
the rest are constants from a quick ckeck
let bonusHealing = (healingRollMax - workflow.damageRoll.total);
this one feels like it should stay
Break it down. Why should it?
my thought is cause its only called in that function?
I want to implement the effect of a "cloak if displacement":
While you wear this cloak, it projects an illusion that makes you appear to be standing in a place near your actual location, causing any creature to have disadvantage on attack rolls against you.
Any tips which midi-qol flag I need to put in the Active Effect?
I think I did something like this with displacer beasts
I've set it up and shared around here iirc.
What I did for it, was I used an effect macro and recharge
no not recharge, just it wears off after x things
That looks exactly like what I was looking for. Do you have the duration tab and such as well?
Displacement looks like bugbears
@vast bane I am not sure I understand all the stuff you are doing here?=
if its like the displacer beast it should wear off for the round after the first hit
once you are damaged you should lose the effect right? and you regain it at end of your turn?
yes
I have two effects on the feature/item
one is temporary that fires when the item is rolled
the other is passive and always on, and when the owners turn ends, it rolls the item automatically to set it
Yet I dont seem, to have some of your options. I am still on v9
Effect macro is v9 capable, not sure if the end of turn flag is in v9 though
I think you could also pull this off with an item macro and dae/times up
the "on combat turn ending" stuff does not exist for me
have the second passive ae reference macro.itemacro but I don't know the syntax to use the item in item macro, effect macro makes it real easy
install the module Effect macro
const lastArg = args.at(-1);
const uuid = lastArg.tokenUuid;
const hasEffectApplied = game.dfreds.effectInterface.hasEffectApplied('Displacement cloaking', uuid);
if (args[0]==="on" || args[0]==="each") {
if (hasEffectApplied) return;
else return await game.dfreds.effectInterface.addEffect({ effectName: 'Displacement cloaking', uuid });
}
else if (args[0]==="off") {
if (!hasEffectApplied) return;
else return await game.dfreds.effectInterface.removeEffect({ effectName: 'Displacement cloaking', uuid });
}
For an ItemMacro that adds once a DFreds Effect called Displacement cloaking
and then they could use times up feature right?
the thing in duration that runs a macro at turns end
Sorry guys you lost me there
exactly
I couldnt follow you guys down that rabbit hole tbh
ok if you haven't installed effect macro yet, do you have times up installed?
you need either module to automate your displacement effect
Read this through, step by step: <#1010273821401555087 message>
Follow a couple of messages below too
I think you are missing the special durations though
I do not have the "macro repeat option"
I have times up installed
Is it active?
yes
So do you have it then? The macro repeat?
Yes. I looked for it on the wrong tab
You know zhells gonna catch on that my macro is 8 characters and yours is a paragraph hehe
I dont have this:
you don't need that if you do it Bugbears way
they are two ways to skin the cat
Either all steps from the link above or you will need an extra module called Effect Macro for what Moto did
this is what I have right now
nope. 2 different effects.
Do you have DFreds Convenient effects?
is your dae up to the newest v9? or are we looking at the efect on the actor?
wasn't there atleast 1 of the self checkboxes in v9?
I have no idea, I didnt touch my updates in quite a while because I have a gigantic campaign going and some updates to levels for example exploded some maps in the past, so I didnt update anything
should probably make sure they have dfreds
I do not have dfreds because it has same nasty overlaps with CUB
are you using cub or dfreds to manage your aes?
oof a cub user
I'm sure cub has a macro too
at this point mines lookin alot simpler for him though lol
Well, when I set this game up, there was no dfreds and cub wasnt yet abandoned
This campaign has been running for almost 2 years with weekly play. You can imagine the scope
So I am confused: did I do something wrong? What do I need to change/adapt? What is missing?
I think bugbears fishing out the cub macro
However it means you need to go makd the displacement in cubs menu
Ohh damn.
the actual effect on the item is basically just going to be a macro.itemmacro key
So tell me: should I swap from cub to dfreds? I have basically no custom setup in cub, but I like the way I can assign status effects easily
mid campaign, no
oh if no custom setup in cub, then yes
dfreds and midi are like peanut butter and jelly man
but bugbears been typin for 5 minutes lets see what he has to say lol
I am not sure if any of the other modules like srd active effects rely on it though?
const lastArg = args.at(-1);
const uuid = lastArg.tokenUuid;
const tokenActor = (await fromUuid(uuid)).actor;
const hasEffectApplied = tokenActor.effects.find(eff=>eff.data.label === "Displacement Cloaking");
if (args[0]==="on" || args[0]==="each") {
if (hasEffectApplied) return;
else {
const effectData = {
changes: [
{key:"flags.midi-qol.grants.disadvantage.attack.all", mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM, value: 1},
{key: "macro.tokenMagic", mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM, calue: "distortion"}
],
label: "Displacement Cloaking",
icon: "icons/equipment/back/cloak-collared-blue-iron.webp",
duration: {startTime: game.time.worldTime},
flags: {
dae:{specialDuration:["isHit"]},
core:{statusId:"displacement"}
}
};
return await tokenActor.createEmbeddedDocuments("ActiveEffect", [effectData]);
}
}
else if (args[0]==="off") {
if (!hasEffectApplied) return;
else return await tokenActor.deleteEmbeddedDocuments("ActiveEffect", [hasEffectApplied.id]);
}
Just put that in the ItemMacro
I did is damaged, I dunno why
I did
yeah you have the right one, I dunno why I did damaged
What do I need to put in the effects?
Thank you so much!
You will need only this one
And in the Cloak of Displacement Item, put that macro in the ITemMacro
for the active effect on the actual item, I believe its macro.itemmacro and then make sure it has end of turn run macro in duration tab
the active effect should be apply on equip
macro.itemMacro
make sure you clear out the other stuff you had on it
you had 2 other keys in it
those are now handled in his macro
you also do NOT want any special durations set
hmmm does it even need an effect value?
I suppose it can't hurt to put its name in
I think the drop down is suppose to be end of turn, I don't have that item, I only have the actual displacer beast to go by
I set the start of turn because that is how it was in his link
Looks good
yep just now finding it in the dmg, you guys are right, the beast is end of turn, the item is start
So I gave my player the item
And it should create the effect
and they have the effect in dae, but it has no effect and no Icaon on the actor
just make sure they don't have any rogue loose ae's from editing owned items, in v9 it was relaly messy
thats cause bugbear used v10 paths
it also seems to work although the character is not attuned to the item, which is not too bad but I noticed that
I think thats a v9 issue
or a very old dae issue
pretty certain you aren't on the newest v9 dae cause I know there was a self roll checkbox. But you shouldn't update when running in legacy mode unless you are forced to
if no effect icon is shown, get an icon you like and change the icon: "..." to the one you want
👋
Anybody else getting this error for basically everything since the new midi's update? (midi: version 10.0.28, foundry: version 10, 5e: version 2.1.4)
Well... it doesnt seem to be working at all because the macro crashes once executed
does it happen when PV is disabled?
post errors and will check later
what's PV?
I posted the error above. thank you!
Perfect Vision
aka it could be a perfect vision fault not midi
most of it looks like Perfect Vision atleast
Get the macro I posted again.
I have edited it in the meantime
@solid walrus he edited the original macro reupdate it with the new set
It's not perfect vision's fault
I think maybe tim left a debugger on also in midi?
How do I rollback to the previous update?
do you need to rollback PV or midi?
midi
I would make sure thats not pv cause it looks mostly pv
Ohh thanks I missed that. It seems to work partially. Yet I get this error
Badgers gonna love that hehe
it's not pv, I've disabled the module and get this
dnd5ehelpers, we miss you so much
helpers is dead in v10
I also dont have the "Displacement cloaking" effect at all
you can roll back if you want, but can you check by resetting your cover calculator?
hes a v9 user
I don't have a cover calculator set up
god speed 🙏
I am on v9 in a 2 year old campaign with basically no way to upgrade without losing hundreds of hours
k if you want to rollback he has zips stored of all prior versions on his git, but if you want that version to get fixed, hes gonna need someone to troubleshoot/report it
I've send him a dm, I'll open an issue later right now I have to work on stuff so I needed a quick fix
Wow. My Ingame macro editor is so busted.. I cant even see which line I am editing
if I recall thats a setting in.....advanced macros?
we're all on later versions but I believe that was a bug with advanced macros theres a checkbox somewhere in its settings that would enhance it
Thanks! Disabled code highlighting and it works
or was it item macro....I can't remember now does anyone remember the funky macro graphics?
yeah that
So. Iassume the issue I am running into is with the distorted effect, right?
I might suggest updating dnd5ehelpers and tokenmagicfx
Where do I find those zip files? I can't seem to find them in the github page
do NOT hit update all
I think badger pinned that for us
yeah its the first pin here
latest version of Helpers is 4.2.0
@rancid tide make sure you download 10.0 and not 0.10
does this look correct @vast bane ?
Hes busy now but it looks good to me
you should start combat with that player and a monster
then hit him with the monster
test it out
advance through a few turns
My guess is the dnd5ehelpers error is cause you are in legacy mode for a ton of modules
Why? Aren't we on 10.0 ?
the pin has a list of modules and 0.10 comes up before 10.0. Just warning you incase you snag thw rong one
we're on the 10.0 branch
Ahh sorry I've misread
It seems to be working. I dont see any "effect" like distortion on the character but I dont care about that too much. It gives disadvantage and gets removed as planned. Thanks a lot!
if you download the wrong one it'll just yell at you and say you need a better version anyway
btw how do I install it from a zip? If I throw it inside my module's foulder won't all my config get overwritten?
pretty sure they are all zips of the folder and all
so if you go in and delete the module/midi folder(don't delete midi srd) then you can just go into the zip and ctrl C and ctrl V the folder and all right into modules
I guess you could also just ctrl c and ctrl v over the old one but I always just clear it
My only remaining, minor issue, is that it also works if the owner of the item is not attuned to it but I assume I can work around that manually
Okay but won't I lose the configs?
I think its because bugbear didn't put a duration in
Like the workflow options I've setup and all that
its fine its just a quiet buff
your data is stored elsewhere for settings and stuff
whenever you update a module it literally deletes the folder and reinstalls it anyway
you wouldn't be doing anything different
okay cool ty, just to make sure, I have to go to the user data's modules folder?
to be clear, I'm saying delete the midiqol folder in modules
if you back out to configuration tab in main menu it tells you where your data folder is locally
modules is usually right in Data
aka root
yes I see the module's folder
you should have 1-2 folders named midi, ones srd the others what you are looking for
@violet meadow We got sidetracked with helping others but just wanted to let you know that the help on the beacon of hope/circle of mortality worked perfectly thank you.
I actually think the beacon of hope should be a world script instead of an actor on use
but for now I'm putting it on all the players
Okay it worked, ty!
hi, @scarlet gale not sure if I've set something up wrong on the Lightning Arrow, but it's not applying the half damage on a miss. It just misses and that's it. All things stop. No error messages in console.
Is there a list of midi-qol flags I can look up somwhere?
Yes check the pinned messed in here at the top
Also I would toggle off and again on the effect on the actor for the displacement
Do you have token magic module?
I have token magic fx if thats what you mean
I don't remember how that was working on v9. For v10 the effect creation is linked to attunement 🤷♂️
As I said, I can probably live with that, my players will have "plenty of time" to attune to it once they get it
I think its their old dae, if you look at the first tab he has like the core wording instead of modern dae's wording for apply on equip
hes definitely not on the last stable of dae for v9
My memory of v9 fades more and more by the day 😁
yeah i was on it later than you I still got my memory
Is there a non-macro way to apply an active effect to a target of a spell?
if you used your own item, I think thats handled with the checkboxes at the bottom of the item
Chris probably has his item setup right and didn't share that in the config
the first 3 checkboxes I think deal with that
is that not an inherent part of midi?
if no boxes are checked in the first tab of the active effect on the item, then the item details range/target is where the active effect winds up going when it rolls
he put everything in the macro, I think, because he didn't know cub's api anymore nor v9 stuff so he went the saferoute
and put it all in a macro for you
Sorry I am a total noob on this
So I can give an action an active effect and that effect will be given to everyone hit, if I dont have any of the checkboxes set?
if you have this setting setup yes:
Its important to understand that that settings "item" refers to foundry's definition of item, not dnd5es' so it means any thing, spell, feature, item, trinket, tool
weapons
weapons have the aditional feature where they only apply if they hit
thanks!
and if a save is present on the item too then the effect usually only applies if the save is failed
An item with this setup will apply any ae's with no checkboxes in its first tab, to the actual user:
Its also worth pointing out that on v9 you also should have access to midi SRD and More automated spells, items, and features modules which are compendiums full of premade stuff. Also midi has its own sample items compendium as well.
I have that. This is why I didnt have to set up a lot of spells and effects so far, but the further the campaign progresses, the more nasty stuff shows up and therefore the srd stuff no longer does it
Is there an option in Midi, and if not in Midi elsewhere to stop the card appearing in the players chat window when an enemy rolls to hit/damage?
I have got close, as in making the rolls secret but the player gets a card still that just says Attack Rolled and Damage Rolled, which seems to be a waste of chat space. 🙂
can you show me the card?
the players chaser card is meant to show them if their damage applied fully or not
you can check a box to have it only show when theres a difference
thats not midi
Midi does not work with:
Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e
Advanced Spell Effects module is in beta in v10 and often the culprit of things...
Well it certainly isn't another module I am changing the settings in.
what are you trying to achieve, do you not want them to see something?
The only module I am using at the moment for testing is from the above list is Midi. Half of those I haven't heard of.
what about a normal midi attack are you trying to remove
You see my screenshot above, there is no info in it that is of any use, therefore there is no point in the card being there taking up room.
They can see my dice roll across the screen but the numbers are ?'s.
do you want them to see it?
Then when the attack does damage the card appears for them to take tick the box and take the damage.
like are you trying to fix your midi or are you trying to roll and tell them the results?
I do not want them to see the rolls, as if I am rolling behind a DMS.
The rolls have ?'s so they can't see the number.
It is for fun
Yeah, I don't want to hide every roll.
If it can't be done it is not a problem.
thats all I got for ya
And I appreciate your help 🙂
hey guys, is midiQOL playing nice with the newest dnd version now?
didn't update my modules since they released the major update for 5e as I was warned it might break things
until I see the dae fix for duplicating equipped effects, I'm not touching dnd5e 2.1.x
plus the newest midi seems to be a bust as well
2.0.3 dnd5e and 10.0.23 midi/10.0.14 dae sem to be the most stable
why is it a bust?
could it be why this lightning arrow is not applying half-damage on a miss?
is this new?
I spy with my little eye something beginning with A
(ASE?)
ah, ha. hmm.
Midi does not work with:
Ready Set Roll
Better Rolls for 5e
Roll Groups
Fast Rolling by Default
Fast Rolls or Quick Rolls
Dice Tooltips
Taragnor's Gm Paranoia
WIRE(Whistler's Item Rolls Extended)
Minimal Roll Enhancements
Retroactive Advantage/Disadvantage
Max Crit
Multiattack 5e
Advanced Spell Effects module is in beta in v10 and often the culprit of things...
speaking of WIRE, i wonder if it will take off. I'm SO invested in Midi...
If we learned anything from active auras/ate in v10, its that we should diversify our module choices
so that if tim ever goes on hiatus theres a wire to fall back to
I have this passive effect on my moonbeam using the flags.midi-qol.OverTime Attribute Key. 'turn=start, saveAbility=con, saveDC=@attributes.spelldc, saveDamage=halfdamage, rollType=save, saveMagic=true, damageBeforeSave=false, damageRoll=(@item.level)d10, damageType=radiant'
When the attribute is applied to the token effected by Moonbeam on the start of the turn it automatically rolls the damage. Is there a setting I am missing that can control this. I would like my player to roll the damage?
Does "Chat message flavour" accept any arguments? trying to get it to mention the target name
No and I'm very sad that they never added that
wait do you mean macro chat message or the chat message field on items?
misremembered the spell, yes its an overtime effect
I have it set to turn=start. So at the start of the turn it triggers if the creature is in the moonbeam
I don't think you can manually contro overtime rolls
Ok...I appreciate the response
Considering they also get hit by moonbeam if they enter the AoE when it's not their turn (forced movement) – having a button for damage in a VAE is the way
I don't do an overtime for it, I used a macro.createitem and they manage it manually
Yeah I'm starting to like this train of thought... more fun for the player if they get to roll the damage
I personally don't like that, but I couldn't get the forced movement to work so figured why bother
anytime the player rolls it adds to the rounds duration cause players half attentive
I am new and learning this so what did you mean by *having a button for damage in a VAE *?
we do advanced stuff where we create a temp item that shows up in their inventory when they cast the spell, then we set a document link to roll the item in another modules feature
this is a crude version of lukas' suggestion
then while the druid has moonbeam active they have a self buff on them that if they mouse over it in visual active effects, they can just click the damage button there
(they could just click the item in their sheet/token action hud too.)
Any examples of how to do this anywhere?
You'll want someone elses suggestion cause I do it ugly
I cast the spell, I get the temp item, then I drag the temp item to the macro bar, and then drag that button to chat to get the document link and then retrofit it into the description field of VAE for the self buff
Theres a much smarter way to do it but I suck at macros
Is VAE a module?
yeppers, Visual Active effects, you don't need it per se
you could just create the temp item on the moonbeam actor too
oh my moon beam is not NoTarget, thats a catch
This feels like a strong release of midi – Tim mopping up some remaining niggles... what's going to come along and blow everything up again now? v11?
I might actually upgrade to dnd5e 2.1.4 now 😱
someone already reported a bug with it
its DAE we're waiting on, least I am
the duplicate equipped ae's is what I'm waiting to be fixed
Oh I'm not aware of that... is that since the DAE that came out a day or so ago with the ATL keys?
that sounds major... we have tons of passive ae's on equipment
Did anyone manage to make the Death Ward effect work?
I think its on equipment not all items
I have an aura of life and death ward premade
v2.2.0 🙂
DAE 10.0.19
- Updated ATL.xxxx effects in the auto complete. Have not tested evereything. If someone who uses the module could test it I would be grateful. I based the settings on https://github.com/kandashi/Active-Token-Lighting/wiki/Key-Reference
- Fix for some instances of createItem duplicating effects
Not sure if that addresses the problem you mentioned or not
thats actually a fix for my bugreport for macro.createitem
I posted issues with duplicated created items
the top most issue on dae's git is what I speak of that hasn't been fixed yet I think
I'll go read it
Could you share that?
I have a homebrew orc-ish character with death ward so I'm gonna have to find a way to make just one of those trigger each time
Death ward is an effect macro:
On deletion:
if (actor.system.attributes.hp.value != 0) return;
actor.update({'system.attributes.hp.value': 1});
await game.dfreds.effectInterface.removeEffect(
{
'effectName': 'Prone',
'uuid': actor.uuid
}
);
(special duration is important)
Tried this
This might break concentration
It has the issues of setting character to 1 if the effect expires 'naturally'
Or you manually delete the effect
Somehow it always checks true
It seems like the macro executes before the damage is actually applied
await game.dfreds.effectInterface.removeEffect(
{
'effectName': 'Prone',
'uuid': actor.uuid
}
); ```
the one you just shared is not mine
Yes I know, I tried fiddling around because yours won't work on my instance
Idk if it's version issues
It executes before the damage actually applies it seems
Do you have EM...?
Yes
Does it have to have === instead of = zhell?
The EM script will run when the effect is deleted. No ifs, ands, or buts.
and the first line will cancel the effect
Yep. It's completely solid.
Only thing you could add is await before the update, but even so, you are applying damage before the effect is deleted. (Surely?)
If I put a console before return, it prints
did you set the special duration?
It feels like that's not happening
Not sure if it's a module option doing that
I did
show me what the attack looks like in chat
and you are sure its not an issue where you modified the sidebar actor and not the canvas actor?
you got something else setting the hp to non-zero faster than the effect can be deleted.
uninstall "DAE SRD"
I dunno
whats in the effect
do you have something in the effect?
show me the bottom of death wards details tab
of the item/spell
How many sheet modules do you have
I have players with different tastes
Humour me, will you
It's bound to happen in an 8-players party
The only thing left that it could be, is a dnd5e 2.1.x bug or you aren't casting the spell you setup with my stuff
I put the spell in the hotbar for quick attempts, could that read an incorrect version
(It's not that)
Your above screenshot is an effect on an item. What does the effect look like when it is actually transferred?
Actually I'm trying it now myself and it is indeed not working
it works when the first line is gone
That won't do
the hp check is causing it to not fire
Weird thing is, sometimes it doesn't roll the damage
Actor will always be updated before
Unless I click on chat message
we need to move it to an item macro and work with midi
Never did that before working this out
🍃
Looks like the same
I am getting ready for my session
I had the same issue when trying different stuff for the orcish whatever
I got nothing then. It's a module thing, cus EM is perfect.
Honestly, I'm jut gonna run without the first line till i can get it fixed, the likelihood that you expire a death ward the long way is so slim and its so obvious when it happens you can fix it
yeah we gotta have the macro in midi workflows so in an on use
You will need to cancel the pre update and do your stuff
yeah I bet you one of the guys has it setup right
if not chris/bugbear, Mr.primate has it
but if we just don't check hp it works
Will play later tonight!
Thanks for the support as always
yeah everything is fine if you remove the first line for now
This is Mr.Primates Aura of Life macro:
if (!game.combat) return;
const lastArg = args[args.length - 1];
if (args[0] === "each") {
const targetActor = lastArg.actor;
if (targetActor.system.attributes.hp.value === 0) {
await targetActor.update({ "system.attributes.hp.value": 1 });
ui.notifications.info(`${targetActor.name} has been revived to 1 HP.`);
ChatMessage.create({ content: `${targetActor.name} has been revived to 1 HP by Aura of Life.` });
}
}
so it's checking if hp is zero, rather than ignoring if hp is not zero
aura of life is different
it revives at start of turn I believe
whereas death ward revives when you drop to 0
but in theory it should be redundant in that death ward script anyway since the EM only fires if you're on 0 anyway right
its cause we aren't working within midi's workflow I believe, so if we can mirror the same thing but run it in the right spot during the workflow that knocks them out, then it will be fine
so we basically need one of bugbears args on/off macros where it modifies the workflow
kinda how aura of life is above
the code in effect macro was not utilizing midi
but it shouldn't matter, all it's doing is triggering when the actor hits zero hp – no matter what the cause... what if the GM is adjusting hp manually
better just to leave it as-is imo
let EM decide when it should run
pretty sure it'll still run with a manual
cause you can literally leave in the effect macro
or better wouldbe to just put a check in for manual hp
I personally probably won't bother, the only problem with it now is that if the effect lasts 8 hours and never pops, then the actor drops to 1 hp...not a big deal to me
oooh
I got an idea
what if we don't check hp, but instead check duration of ae
if duration isn't 0 return
if duration is >1 return 0
I wonder if changing it so it's checking if hp > 1 rather than != 0 would fix it
nah its cause the effect is killed before the token is updated
ah ok
I think I'm onto the right idea if we wanted to keep the effect macro route
check the duration not the hp values
You get it figured out?
The half damage isn't a checkbox on the item. It's part of the macro.
I give up. Even without the IF, sometimes it just won't work
i ran it a bunch it never failed to fire manually and with a workflow bringing them down
Yeah, not sure what is going on. I'll work with it more tomorrow. Gotta do real-world work right now.
I think we can automate it if we check the druation instead of hp
effect.duration.remaining isn't 0 on mine in the EM
I dunno why yours is spotty, but mine fires all the time when I drop to 0, what we want, is a check so it doesn't drop a full health person to 1 when it expires, so instead of checking hp, we can check the duration
if the duration is greater than 1, then return
I just don't know the syntax
no rush to get fixed, the likelihood that a death ward lasts 8 hours in an adventuring day is prety slim
Then it will never proceed as long as there is duration remaining... you'll never get the benefit
It would need to be if duration > 1, continue
(not return)... but yeah idk the syntax either... I think you use this to refer to the AE itself but I haven't dabbled in EM enough to know for sure
you want the check to stop if above 1
if above 1, return
I don't think theres a continue function like that, just cancels
no because it will never set your HP to 1 then if you have a duration
right but you are going the wrong way
the macro line is telling it to cancel not continue
If duration is more than 1, return aka stop
exactly your way will always kill it, you'll never get the hp update
no it won't
the macro will fire whenever the effect is deleted
the effect has a special duration for if they drop to 0 hp
we want the macro fire off only the special duration ending
it'll fire at 0, see if there's any duration (yep!) and not do anything
unless the AE being deleted means there is no duration... I'm not sure when that hook actually fires
if the duration is less than 1 return
it might have to be != 0
no I want it to be 0
! means not zero
or 0 or lower if lower means negative cause I know ae's can go negative
we want it to not fire when the duration expires naturally
if you want it to be 0 then why say > 1 lol
we only want the macro to fire when the speciald uration triggers
cause I'm on the end of my day and my brain is mush
so instead of checking hp, we check if the duration is at 0 or negative, if so, return
You have, of course, already done a console.log(actor.system.attributes.hp.value) to verify what the HP is at the time of EM execution. Right? RIGHT?
gtfo
I can do that actually
for the record, I'm desperately trying to cling to EM for this lol
I don't want to go args route
EM is perfect for this
Yes. Yes it is.
console.log(actor.system.attributes.hp.value)
actor.update({'system.attributes.hp.value': 1});
await game.dfreds.effectInterface.removeEffect(
{
'effectName': 'Prone',
'uuid': actor.uuid
}
);
?
I'd keep the if statement, but sure
I gotta go find it
I actually use console.error() now so I can see it easily lol
if(actor.system.attributes.hp.value > 0) return;
if (actor.system.attributes.hp.value != 0) return;
console.log(actor.system.attributes.hp.value)
actor.update({'system.attributes.hp.value': 1});
await game.dfreds.effectInterface.removeEffect(
{
'effectName': 'Prone',
'uuid': actor.uuid
}
);
there's a significant difference between > 0 and != 0
what is it I'm looking for in this console log
Put it before the if
then ensure the value that is logged is actually 0 or lower - on every occasion where you expect to have the hp set to 1
and vice versa
heyyy Moto, how do you get that fade 75% and bloodsplat on the token with monk little? what is the config?
what if we waited it?
EM is jumping the gun?
no the midi workflow and how it removes the ae is whats the problem
em is set to apply when the effect is deleted
the problem is times up's trigger and how midi handles things is out of order, it expects me to be using args and working within the workflow
oh I thought it was set to apply when creature hits zero hp... why not use that?
thats what its set to, but we're checking for hp count and cancelling the macro and its apparently not at 0 yet
when the effect is removed
so EM is set to apply when creature hits zero, but the creature is at 12?
my theory is to just test duration instead OR put a pause in
no EM isn't set to anything
EM runs the script after the effect is deleted.
the effect is set through times up to end when the npc has zero hp in the midi workflow
I say we just get a If duration 0 return line in there instead of checking hp
the macro works perfectly without any check, the problem and why we put the hp check in, was cause when the effect ends naturally it drops the guys health to 1 hp
Gotta say, this sounds oddly like a race condition. You got multiple things modifying the hp when they reach 0?
yeah the effect macro and the attack
yeah... why have it also set to expire on 0 with DAE? let EM do the work
I don't think EM has an expire if zero