#MidiQOL
1 messages · Page 82 of 1
that sounds lovely to code
Is there a way to access the usage configuration dialog (eg for a wand) programmatically? or is this outside the scope of midi-qol?
args[0].macroPass = 'preItemRoll' and I have an args[0].workflow.displayId but I'm not seeing anything else related to the dialog window
thanks, @violet meadow ... i'll see if i can't flesh that out, thank you.
oh that data shows its age
What is it from the configuration dialog you're trying to look for? The args[0] is pretty comprehensive
I want to change it from a simple checkbox to a more interactive dialog
That sounds like extending an application
how would i input this variation of multiattack for summon spirit?
The spirit makes a number of attacks equal to half this spell’s level (rounded down).
when you create the Spirit, update the Multiattack description to the correct number of attacks
so manual and just keep track of it as the spell levels?
were you replying to me? If so, I assume that is somewhat non trivial?
It all depends on how you create the Summoned Spirit
i used Arbrons module
Either that, or can't you suppress the normal item rolling and just create a macro for it instead with a dialog? I just can't recall how with midi
Kinda depends if it's just 1 wand or all wands
you hook on the preItemRoll and pass configureDialog:false
that would also work (probably even better)
interesting - ok
or an amalgam of options to make sure that no spell slots/etc are consumed
I have it on a Staff of striking I shared. let me check
I'd defo do the example bugbear posted 'lest you want to change all wands
Working on a macro, but I can't get it to work for both NPCs and PCs.
The macro is a simple one that deals damage to the PC, intended for use at end of turn. This part works.
When I put it on an NPC though, it stops working, as the actor is undefined. I found out that this is because the method I'm using to get the actor returns a TokenDocument5e rather than an Actor5e.
How would I go about making sure I'm using the correct class here? I can't seem to check the type to confirm which one, but I'm not familiar with JS like I am with CS so I'm not sure how to check.
Current version for reference:
if (args[0] === "each") {
const effectActor = GetActor(fromUuidSync(args.at(-1).actorUuid));
// . . . Do stuff with actor
}
function GetActor(actor)
{
if ("actorData" in actor) // Current iteration is trying to check if the variable actorData exists, to no avail.
{
return actor.actorData;
}
else
{
return actor;
}
}
I'm going to be encapsulating this in a central class that can be called from all wands, but first the simple macro 🙂
One last question... the setup as you have above, does it still allow the owner of the feature to self cast the reaction on themselves?
use the synthetic token actor -- someTokenDoc.actor
If you allow the Active Aura to affect the source too, yes
Or if the source has it the reaction already on
yeah as the badger says, always imo it's better to go through
const effectActor = fromUuidSync(args.at(-1).tokenUuid)?.actor
In my example the feature is a paladin casting a shield on anyone they can see that takes damage. As that reaction, they can give them totally immunity to everything for a round, but renders the paladin inert until their following round.
That works, thanks! Never knew you could use ? like that lol (makes sense when I think about it though)
for reference
extremely useful, especially when combined with https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
things like const value = token?.actor?.getFlag('core', 'name') ?? 'default name' can make for really safe code
"if there is no token, or no token.actor or an undefined flag, use my default"
I don't automate counterspell at all because that is the one reaction NOBODY forgets about when I so much as speak the word spell and its too hard to automate anyway.
There is a bug with the active aura janky reaction that I don't think Mr.Primate has fixed yet, you can't stop the source actor from benefitting from the reaction also and getting the item. I posted it to him and he never got back to me on it in kandashi's discord
this matters in the case of a third party reaction like the Steel Defender as he can't disadvantage an attack against himself
same with one of the fighting style reactions
I just use an effect macro of every turn to delete the reaction item on the source actor
on turn start cause thats when the reaction comes back and the aura reactivates
I dont get the Item on the source if I tick the relevant box 🤔
Ah nvm me wrong thing in mind
@dull heath I created the macro in my bar and referenced it as an on use macro in the item. Ignore literally everything else on the item except Activation Cost, you need one to have this field pop out. I just re-used an existing feature
You mentioned an effect; if you have an effect launching the macro, it will launch on both application and un...application... there's a real word for that somewhere... unless you edit the macro to check for that.
ahh, that makes sense.
The check iiiis js if (args[0] == "on") { /* do the thing in here */ }
yeah check out the convo with me and Mr. Primate in kandashi's AA channel. It doesn't make any sense why its doing what its doing.
Hey I assume I give 1 actor both of these features? Because I am testing it, and it doesn't fire a reaction pop up.
is the item a reaction?
thats the part in his post that is more implied than explained
you drag the first item that is a reaction into the effect value of the active aura so that it gives the item to everyone in range
🤷
This appears to work; thank you, I thought I'd had to use an effect.
however for counterspell I would just give every player the counterspell feature reaction and to not bother with an active aura at all
I got another question, not sure it's better posed here or in #macro-polo; is it possible to make the user use up 15 ft. of movement as part of this feature?
DnD5e doesn't really track movement, so it depends on what module you got with that
It's just a number to reference
ahhh, gotcha
I really don't think you need to do this with counterspell, its the one reaction that the WHOLE party never forgets cause nobody likes being targeted by spells and everyone constantly begs the counterspeller to counterspell in my table.
I forgot the item. Thanks Moto
personally I feel the janky third party reaction active aura is best used not for its janky automation, but for its ability to prompt/remind the party the reaction exists
and in the case of counterspell I personally think that makes it pointless since nobody forgets about that reaction
Its great on the fighting style reactions and its great on protective bond from peace cleric
Effect is really useful for on/off/each stages (macro that is supposed to do something each turn) or if you need to reference the owner of the effect rather than the user of the item, else onUse can be your go to
This look right?
const actorUuid = "ACIEwW6fJuDaoDnL" //put here the Steel Defender's token.document.uuid
const effect = duplicate(game.dfreds.effects._reaction)
await MidiQOL.socket().executeAsGM("createEffects", {actorUuid, effects:[effect]});```
nope
actorUuid shoud be something for this particulat case, 'Scene.2mTNdZV2chwguKLn.Token.vzP1TTSVTsWvlRrw'
select the token you want, open console, type _token.document.uuid
paste that in there
isn't it also right click the button on the top bar instead of left click?
So will this change for every scene and combat encounter?
test it for now
you can populate that automatically via the macro
it's just to make it work
Right click for uuid, left click for id
but make sure that you don;t have multiple Linked tokens of the same actor on the same scene
if you do we're allowed to slap you just an fyi
or dont. it will just place it on all anyways
its in our contract
should this be checked?
On either
you want the reaction item to have NOTHINg checked on thtat tab
But the Aura item should have it checked?
on the aura...
If its always on yes for the Aura
you got me thinking of a good idea for the aura
nah you don't want the aura item always checked cause then it will work for multi attack during the round when itshould only work for 1 reaction
Can I change the special duration to
That Item was only proof of concept.
I feel like you are getting confused on the whole point of this
Just share what you want to do
no you should not change that duration it should be after the reaction and you should be using a reaction item
I got to run. will take a look later
the aura can only exist while the source actor has a reaction avaialbe it can't be used for all attacks
When you or an ally you can see within 60 feet take damage, you can use your reaction to cast Divine Shield. You expend 5 Holy Power to cover the target in a divine barrier. The shield stops any incomming attacks including the triggering attack, and lasts until the end of the paladin's next turn. While shielding a target, the paladin cannot make any actions until the end of their next turn when the barrier dissolves.
Thats the ability
that is 1 attack, not all attacks till their next turn
shit
sorry wasn't looking at chat till you typed that
ok sure the special duration can change, we assumed you were doing counterspell or a different reaction
wow that reaction is awful
You think? Not balanced enough?
my pally player would never touch that
players want to do things in combat, to forfeit your whole turn is rough in a 1-4 round combat
True, but its a last ditch total immunity kind of effect.
I see your point though... potentially will re balance it
Home brew 🤷
Yea
how do you gain holy power and does it reset when combat ends?
It resets on an LR or SR, and you can gain 1-3 points per round depending on whats done. Max of 6
But this what I have so far on the reaction portion.
DR.all flag should be 999 not 1
Still doesn't even show a reaction pop up though
do you have reaction management on in foundry?
Through Midi
you don't have active auras installed
I do also
whats it setup with then
not that ae, the aura ae
your victim probably doesn't get an aura
You want this?
ok now I'm convinced you have not done it at all like he instructed
there are 2 items in his setup you know this right?
Yep, I have 1 reaction item, and 1 aura item
the reaction item, and the item with the aura, show me the auras effect settings in the aura tab
not the settings of active auras
Regarding this reaction would it be possible to use findNearby to do this instead of an aura? I'm attempting this for my group's Steel Defender, applying the reaction on the Steel Defender works great. It doesn't seem to care about how far away the Steel Defender is however.
active auras is just the simplest way to pull this all off and imo is only good if the aura is tiny, 60ft auras are a nightmare to think about for this janky reaction setup
No arguments here, simpler the better 🙂
also because alot of the times the reactions require the range of source to attacker not source to victim and is often going to be impossible to really use
you probably aren't seeing the reaction prompt because the victim is not getting the aura
the guy who has the reaction feature on them, is not going to get the prompt, the victim is, then the victim verbally asks the source of the aura, if they can use their reaction, if yes, they click the reaction prompt button, if no, they close it
that is the gist of the janky third party reaction
I suspect your problem is in the macro.createItem key
or its drop down, or its effect value
and I have a gif to easily show you the part of all of this you aren't doing I think:
So I did do that, but its out of the sidebar directory, not the compendium
that is fine if you store it somewhere safe, badger has stated low end servers do not handle compendium diving well
so having items in a folder in the sidebar for macro.createitem might be wiser on lower end machines
do you have reaction prompting on?
In midi?
yes
I should, ive seen plenty of other reactions, but ill double check.
you have a setting wrong somewhere, the only thing I see different with yours is that you don't set range to self too
I always do self/self for my self roll effect transfers
none in dnd5e 2.1.x is...new and possibly confusing midi
does the third party actor have the acutal temporary item in their inventory?
that could point to where your problem is
if they dont have the item, then your aura is wrong
i they do have the item, then your reaction is wrong
also what is damaging them?
omg I think I know the mistkae here
isn't there 2 people here trying to do a reaction?
bugbear and I crossed the streams here
hahaha
@tepid dock you want reaction damaged not reaction preattack roll
Should the Aura effect add the reaction effect to the character sheet?
if you are dealing purely damage to the guy then your reaction will never prompt cause it only prompts on an attack
I saw that in Midi and just changed it. lol
god this is so painful
I honestly stopped explaining macro.createItems here cause its always like a dentist visit
there is no easy way to show someone how to set these up
the active aura puts an effect on actor B, but its not the reaction ae
its the aura with the createitem key. The actor B should have the reaction ITEM in their inventory to prompt
when they walk out of the aura it poofs
the item also imo should be recharge 1 so it stops prompting for other attacks after the first use
I think I got it
its ok if its suppose to last a while cause the effect is set to end at a longer time anyway
I think my issue was that I was attacking the wrong target 😂
But clearly there were still several errors I had
I also noticed other features of 'Reaction' occur before 'Reaction Damage' or 'Reaction Manual'
Its a tough thing to learn but its a cool key to utilize
wait till you figure out how to do it with magic item identification 8)
ooooooh noice
Sounds intriguing.
The odd thing is I dont see an icon for the effect buff... but I see it on other things. Is that normal?
Drag your magic item to a fresh copy of this items' red circled empty field.
But then how does one identify it?
they attune to it
per rules as written
oh forgot the effect macro
also btw, you add ,permenant after the drag and drop of the red circle
console.log(origin);
if(origin instanceof Item) origin.delete();
On effect toggle(On) effect macro
I intend on requesting that the permenant flag be allowed to be first in the effect value so that this prefab mystery item doesn't require manually adding it on the end
when the player attunes to the mystery item, the true magic item appears in their inventory, the effect macro deletes the mystery item, and if you forgot the permenant flag, the magic item dissappears, so don't forget that step lol
the reason this is cool imo, is cause you only need to make this singular item
it can be repurposed/copied and added a new magic item to it with very little extra work constantly
hey, @scarlet gale is divine smite not working atm? It's throwing up the menu for spell slots used, and creating a chat card, but there's no damage being applied.
no errors in the console, either
I did discover one annoyance, it does not play well with the loot system of Item Piles and MEJ so you have to keep the item in the sidebar
the duplicated item, not the magic item
How long does Attunement take in the system?
rules as written you can only attune to an item during a short or long rest
Does the player manually change that field?
if you identify an item instead to learn its properties, just have the player attune to it /shrug
yeah
Ok
which is easier in tidy5e fwiw
this is great for cursed items
but to really sell the cursed item mystery, you gotta sell it by making all items this way
otherwise they can get 100 safe items then suddenly they get a question mark cursed item lol...kinda sus
I showed you it cause you seemed to have tackled the main concept of macro.createItem so figured I'd share what I felt was the coolest thing to do with it
you can also do things like scorching ray and magic missile with macro.createitem
these are the spells I've done with macro.createitem so far:
And for the effect macro do I need to put that as a separate macro, or in the ItemMacro portion?
The animal friendship and knock are for items, I probably should have just used items with spell module but I was on a tear with setting things up
Effect Macro Module by Zhell
in the first tab of the effect you will start to see an effect macro module button
console entry is redundant it was when I was testing and got lazy and never deleted it
hahahaha ok, ill remove the console.log
make sure you do it on the right item, also remember that this all hinges on requiring attunement or else midi will apply the effect to the item when its equipped instead and that should not be how it works
Keep the item saved in your sidebar never use the original, duplicate it to use it
Sure, I set it up exactly as your images show
Ok cool
you can use it in compendiums, but I use MEJ and MEJ's loot gets really uppity with me if I have a weird midi item in its data
it seems to hate when I have a macro.createItem in a compendium so I just get around it by keeping that specific prefab item in a sidebar folder instead
its got somethign to do with how MEJ stores the item data in the journal
I easily could have accidently broke it in the last update. I'll go double check.
I never bothered to bug report it cause its so niche
also you can ditch Magic Items Module and use Items with Spells for its namesake, and if you have an item that has features instead...instead of falling back to Magic Items Module for that....use macro.createItem:
So it should look like this on the duplicated item? Item.8gI5uFEI8Pyif2JC, permanent
yep, but I honestly think the space after the comma is just cause we're all trained to do that, I don't think the space is required
wait
we might be mispelling permenant?
google it lol
happens to us all 🫂
heres another magic item setup with two temp created items:
You might want to make your base item a weapon type instead of trinket cause technically an unidentified magic weapon can be equipped and used without its magical properties
Very niche case I doublt it'll ever happen but its technically possible
I seem to be having trouble setting up Chris' Blade Flourish automations.
My first issue being I don't know how to set up a "scale" for bardic inspiration (which i've bypassed by importing a bard from ddb but would still like to understand).
And the second of which being that none of the automation seems to be triggering
Also if anyones super curious, it is infact possible to create a paradox with macro.createitem....don't do it.
I'm pretty certain ddb's bard class import has that scale value
Downgrade to 0.0.90 and try again
of my module
yep, which is how I've sorted it. Was wondering if there was a way to do it without ddb though 🙂
bard is in dnd5e compendium as well
It looks like the on use macros aren't being called async or something
since divine smite is working except for the fact that it's not being waited on
could it be related to his changes to on use in 34/35?
is there a way to note when the hard requirement starts for 34/35 in your module package page?
Already has it
gotcha
Don't update past 0.0.90 until this is sorted
Scale doesn't seem to work on this. Gonna re-import the ddb bard and try from there
Is there a way of an aura dealing damage once per turn? I am trying to make Investiture of Flame working and it is hurting my brain and I fear I have to somehow try and learn how crhis made his spirits guiardians and try and somehow adapt that
double check your identifiers, the srd class has it configured (re: bard scale values)
Reverted your module back to 0.0.90 and still doesn't seem to be triggering
Are you using DDB?
And did you do a fresh import with the replaced features?
Just tried with a fresh import of a character from ddb and replacing the features yeah
Bardic inspiration one works perfectly and I can manually trigger the blade flourish movement. But otherwise nothing
follow Chris' instructions
Any errors in console when you attack?
Also, if you have the movement effect on the character, you won't get the prompt
since it's limited to once per turn
Only triggered the movement effect manually as a test afterwards. Tried multiple attacks first with no prompt
console errors?
No errors. I'll try disable all other modules and try again too
I have automation for that checking range and changing attack accordingly consuming charges
One of the first macros I had made!
I am actually looking for an answer to that too. I have figured out way to do that damage on templates, but I doubt there is a good way to do it for auras. It's probably simpler to do it with a visual aura. Especially since it says: Any creature that moves within 5 feet of you for the first time on a turn or ends its turn there takes 1d10 fire damage.
That means it would trigger twice if they stay?
yes
Would anyone quickly be able to spot what's going wrong here?
https://gitlab.com/tposney/midi-qol/-/blob/a24c162cd57e6719a9a1cda646780a727abeb09f/src/module/workflow.ts#L1651
It doesn't appear to be running the macro async for some reason
Check where the callMacro is being called
line 1741 - const fn = Function("{speaker
I am on a tablet now so cannot check anything easily
should it be a lowercase F?
it does run async if it's not a function macro (just added in the last update)
no
Add await in your call
Function should be AsyncFunction
Is not wrapped in async?
This is the only part that got changed in the update
foundry's implementation:
// Attempt script execution
const AsyncFunction = (async function(){}).constructor;
// eslint-disable-next-line no-new-func
const fn = new AsyncFunction("speaker", "actor", "token", "character", this.command);
try {
return fn.call(this, speaker, actor, token, character);
} catch(err) {
ui.notifications.error("There was an error in your macro syntax. See the console (F12) for details");
}
Hey @vast bane is it not possible for the reaction prompt to be directed at the origin player?
Not sure but I would try await Chris.pre-made.blablabla
thats the point of the item macro right?
I don't use bugbears setup, but what the usecase for targetting a third party person?
Like any ally gets hit, I wanted the paladin to get prompted with the reaction to use the ability
...
that is the whole point of the janky active aura
there is no way to do a third party reaction
you have to gift the victim the third party's reaction via macro.createitem
Janky my aura !!!
the two players are suppose to use their vocal chords to coordinate whether they use the reaction or not
Yes yes, I didn’t mean to cause you a headache, I knew this. Guess I was just brainstorming why it couldn’t work the other way.
Not sure what you mean, it should be midi-qol calling it async right?
Trying to program Ear for Deceit, and I found a macro by crymic, but can't seem to get it to work.
(I was going to post it here, but seemed long so here is the link)
https://gitlab.com/crymic/foundry-vtt-macros/-/blob/8.x/5e/Classes/Rogue/Inquisitive/Ear for Deceit.js
I am also working on Insightful Fighting. Damn pc chose a Inquisitive lol.
its cause only the victim gets the reaction prompt, I don't know the nuts and bolts of why, but so far theres been no inkling of progress on making third party reactions a thing in midi. And you are fine, no headache here, was just kinda funny is all.
Yeeee! Alright thanks. So the macro pulls the origin tokens reaction
8.x is a lil sus are you sure its not really old?
oh it is 2 years old lol
correct, and I think this also assumes you are using dfreds CE for the reaction
Yea it does, and I am
Item macro works fine, function version doesn't
macros are exactly the same otherwise
Try function.await Chris…
It replaces the function. with "" and then passes it as a call no?
//line 1738
const body = `return (async () => {
${macroCommand}
})()`;
the actuall call is not being returned
function.(await chris....) may work
based on how midi is parsing that value and stripping function. off the front
That fixed it
also sigh
I need to go edit literally every item again to slap an await in there
effectively, heh, that value can have whatever script you want after function.
PLEASE DO NOT DO THIS
It should really be a fix on midi's side I'd think
Well thats a great idea for a future macro!
but I don't think Tposney is going to be around any time soon
yep, the correct code is pasted above, from foundry.js
it'll break as soon as this parsing/function construction is properly implemented
Shhh, let me dream!
Is it a bad idea to do a find and replace all in the db file here?....
In Tim’s defence he did say that this snuck in at the last moment due to another issue needing a fix
Yea, makes sense
function.chrisPremades to function.await chrisPremades as a find and replace should only touch this
yes
How can I make a area effect (around self) targeting all creatures but not self?
Range special
this one has enemy, but you can just set it to creature
Thanks!
is there a way to delete an item by id? (implementing the "roll a D20. On a 1, the wand crumbles into ashes and is destroyed.")
as an item macro with midi?
yeah
actually - misspoke (typed) - part of an onUseMacro, but I have the item
and I am going to back up my work before i test this one...
what's the context? or paste what you have already
Let me get it working - one sec
if it's an actor on use, it would delete whatever the player just rolled
if it's an item on use, it should delete only that item
yep
you need to have your targetting settings right for chris' example fyi
and levels module is gonna have an amazing stroke with those items
I have a free updated version on my patreon
Ah cool. I don't think it's easily searchable so the old v9 one comes up
Need to figure out the use case for the new macro.createitem key, I just need a sample item to understand it I think
for me the effect macro seems simpler just cause I know how to use it
y'all trying to take away my fun with yer fancy pre-builds...
Is there a way to set disadvantage on incoming ranged attacks?
Like as an effect?
Look at the disadvantage grants flags
Yes various ways but this a distance reason? Or an effect?
Yes. Ranged weapon attacks made against you have disadvantage on the attack roll.
Reference list here for them flags https://docs.google.com/spreadsheets/d/1Vze_sJhhMwLZDj1IKI5w1pvfuynUO8wxE2j8AwNbnHE/edit#gid=1601509273
There's a midi flag for it
flags.midi-qol.grants.disadvantage.attack.rwak
yup
if you also need spell ones, you need to add another with rsak doesn't look like they come in one package
Thanks, but only ranged attacks on this spell.
I am doing my monday morning bug hunting after my weekend sessions. I noticed that the wizard player's reaction shield failed to report the ac properly on the attack it was triggered on. I just now tried to replicate it and am not seeing the issue. I cannot see any differences in the spells, I suppose I could try to smack him incase its some sort of actor issue...
Left is the test npc's shield, right is his shield. Could this be a case of just user latency during live play?
Does the actor for some reason have flat ac?
and my test npc has mage armor
I have issues with magic items module and shield spell. Half the times it doesn't apply correctly
hm. @scarlet gale , the update button has vanished in the latest update.
I will ask him though if at that moment he was trying to use his spell scroll of it
oh, nvm. It's just not there on the char sheet. It's there on the item sheet
could lag throw the order of operations off in a reaction prompt you think?
Version?
huh, weird. I have the 0.9, which seems to have been a downgrade.
Yea, update again
I had this issue a few times. Thought it was user error but maybe not. Manually using the manifest worked for me though
ok. the new manifest is downloading 0..0.90
ok. just grabbed 0.1.2 from https://github.com/chrisk123999/chris-premades/releases/latest/download/module.json
I have discovered why the shield spell was messing up on the actor. It was not the shield spell.
I don't fast forward, so I can't use reactions that affect save bonus
So I did a weird janky Arcane Deflection setup that auto casts the save bonus on the caster when they use a cantrip
if they ever use their reaction, the arcane deflection fades immediately
this had a weird interaction where the sheets ac briefly reported both ae's effects but midi knew that arcane deflection was gone
thanks for fixing divine smite, @scarlet gale
Any ideas to automate this?
When you take damage of one of those types, you can use your reaction to gain immunity to that type of damage, including against the triggering damage. If you do so, the resistances end, and you have the immunity until the end of your next turn, at which time the spell ends.
I'm thinking of adding an item (a feature) with 1 reaction. This in turn triggers a nested DF.
Was actually literally every macro
simple reaction with the keys for every single damage type it uses
have it be a Midi damage reduction flag and put a value of ADD and 999
I'm getting 'item does not have a delete()" -- paraphrased. I am trying to do from within a class that just has direct access to args[0], i'm not trying to run it from the macro in-line
Yeah with a reaction macro getting data from a chat card.
Since workflows are isolated per user
If have the item object it should be there
Need the context to find the issue
Another method would be a Dae effect syncing the token if damage is taken. Then triggering the effect
Uncaught (in promise) TypeError: onUseArgs.item.delete is not a function
[Detected 2 packages: w15ps-compendia, midi-qol]
at #destroyOnLastCharge (wand.js:29:36)
at Wand.use (wand.js:24:38)
...
class Wand {
static async use(onUseArgs) {
const charges = onUseArgs.item.system.uses.value;
const content = `<center>How many charges would you like to use? <i>(${charges} available)</i></center><br/>`
async function dialogAsync(){
return await new Promise(async (resolve) => {
new Dialog({
title : `${onUseArgs.item.name}` ,
content,
buttons: Array.fromRange(charges+1).map(i=>({label: i.toString(), callback: (html) => {
resolve(i);
}}))
}).render(true);
})
}
const castLevel = await dialogAsync();
if(!castLevel) return {};
onUseArgs.castData.castLevel = castLevel;
await onUseArgs.actor.items.getName(onUseArgs.item.name).update({"system.uses.value": charges - castLevel});
if (charges - castLevel === 0) {
console.log(onUseArgs);
this.#destroyOnLastCharge(onUseArgs)
}
}
static async #destroyOnLastCharge(onUseArgs) {
await onUseArgs.item.delete() // <= THIS LINE
console.log(onUseArgsitem.name + " goes BOOM!!!");
}
}
I'd just do a simple reaction and immune all damage types that apply and manually apply for the round if theres a situation where a different damage type happens that shouldn't be shielded off
You have resistance to acid, cold, fire, lightning, and thunder damage for the spell's duration.
When you take damage of one of those types, you can use your reaction to gain immunity to that type of damage, including against the triggering damage. If you do so, the resistances end, and you have the immunity until the end of your next turn, at which time the spell ends.
So, current idea.
- Use a standard effect to add the DRs
- Use createItem to add a feature with "Reaction Damage". I can try to find a way to read the damage that was taken with this some how. Or force a Dfred nested to pop up where the users chooses.
aren't the nestedds broken in midi atm with dfreds, that is a good idea though eventually when its all fixed
Yeah they are.
I SHOULD be a good boy and make the git for that that I promised.
Could you do a js console.log(onUseArgs.item)
And screenshot it?
actually, this works:
await onUseArgs.items.getName(onUseArgs.item.name).delete()
Does this still work?
which seems weird... and there's no lookup by id
I feel like that means your onUseArgs is pulling in weird data
it's just args[0] passed in
then it should just be js await args[0].item.delete()
Unless args[0] doesn't have the item
but clearly it does
Or it's had a toObject() done on it or something
it does, it just complains that item has no delete() method
Just so you know
getName will get the first one
you should get the id
and just do actor.items.get(item.id)
screenshot your onUseArgs and expand the bottom arrow part
that should help figure out why it's not just letting you directly use the item from the args
install the Stealthy Module, its just so amazing lol
oh wtf
that has a toObject done on it
just get it from the workflow instead
await args[0].workflow.item.delete();```
¯_(ツ)_/¯
I think I've run into this before - there's likely a better pattern here, but workflow works
For what it's worth, workflow has all the same data plus more. However some things are a set instead of an array
only thing it doesn't have is the macroPass if you're using it
switching off of macroPass in the macro... so no issue there
Is midi known (not) to work with saving throw requests timeouts using monk's tokenbar?
When I use LMRTFY and a timeout, the rolls happen after the timeout; with tokenbar, nothing happens.
I think thats a midi 33 bug?
ah, am I not up to date?
I believe its fixed in later versions but 34 is buggy, use 35, 35 is very new no guarentee there aren't breakages there
I'm on 33 and have had no issues with MTB requests on saves
I've used LMRTFY so far and am doing a new campaign/trying to reduce module weight so I'm considering it
The only issue I tend to have, is that MTB requests in bulk, if its all players, if they all roll at the same time...ish, one of them inevitably breaks and I have to use the manual grabber for them
Hey, not sure if this is the right channel but I'm trying to use DAE and MIDI QOL to add advantage on saving throws against poison as per the Belt of Dwarven kind and not having any luck, anyone got any advice?
tangential question: is it supposed to spit out two things?
yes cause its two modules
Noted
Midi and monk's IIRC
if you ever have a request break and not show its result, you can have the user reroll, or set monks tokenbar not to delete the saving throws after the fact, and regrab it with that Hand button there in your image
set the setting to "chat message"
then the system will complete the task when the target user makes the right roll
MTB/LMRTFY are just...easier to do the task
Yeah, it's less elegant since it's just a text message
LMRTFY shows the DC though, or I haven't found how to disable that
I personally like MTB cause it kills multiple birds with 1 stone
i don't really like PCs always knowing what they're rolling against
MTB shows the DC somethings wrong with your setup
I haven't checked if MTB does tbf
I just used LMRTFY for the longest time without knowing it does 😅
I don't think this is achieved without world scripts and macros, there's nothing in the game defining effects as "poison", so it'd be a worldscript that looks at items and see if they do poison damage, "go back" and give advantage in the roll, etc. Pretty complex
Same as with save against magic which I think is only feasible against overtime effects but I hope to be wrong on that one
Something is not working for me with that(module conflicts), can't figure it out so trying other things. Thanks for answering.
I figured that may be the case, and that is way above my capability, the PC will just have to remember for once
you could ask them to make the save before rolling the item, then roll the item, and use the GRABBER hand button in MTB
fwiw Advantage Reminder is a great module for, well, reminding them they have advantage :p
OR, use another method of requesting saves, MTB spoils a bunch of stuff, I've asked to have those issues addressed /shrug
ah 😔
Ah brilliant, I'll install that!
this can be done with an evaluation on the con save
its a simple task, I think CPR does it already
I don't think he does it the easy way though since hes got world scripts
when you set a flag in midi that is 1 or 0, most of the time it can also take an evaluation like we have for activation conditions
so its just a matter of finding out what to plug into the effect value on the midi flag for advantage on con saves
I don't know what it would be, but I bet you Bugbear knows
and probably already put it on protection from poison in midi srd
the version hes currently working on that is set to release soon™️
Can't quite be done with an evaluation
How would it be an evaluation on the con save? If it's a poison feature without poison damage, how would CPR do it? Search the item description?
oh ok nm chris came
if the workflow description has poison?
My module searches the effect for macro.ce and checks for a flag on the actor to see if they have resistance to it
I'm pretty sure bugbear showed us one for dwarven resilience a long time ago
the evaluation thing won't work since the source actor is the one with the workflow, not the target
I've got vested interest 'cause my player got this feat and I haven't found a clean way to automate it
I was slow at typing, that was supposed to be... like 4-5 messages ago
If you're using my module, it's just a matter of adding the right flag as a passive effect to that feature.
otherwise the worldscript I linked above is standalone
and should catch most things assuming your automations use macro.ce to apply conditions
I do prefer macro.ce but I got so many DAE wrench ones that are just dae's
Once midi gets a pre-save macro call I can change it up to not need a hook
Yep
correct, and imo I dunno how any of you fast forward if you aren't bugbear or chris lol. 90% of the time the fast forward choice is wrong and players never pay full attention and mess it up
As long as you don't fast forward it's not the worst way to go about it
what I really enjoy about the popout prompts is that you can help the players remember their sheet features
I don't think I've got my monster features set up to use CE, but that world script is a tempting advocate for it...
never have I seen so many history checks using stone cunning till I started using advantage reminder module
technically, it's easy enough to make some small changes to pick up the effect name instead of using the macro.ce flag
It was originally designed around my own game where I know I always use macro.ce
any popout
he even has grant messages and if you pair advantage reminder with inline roll commands it gets even cooler, MaxPat has a nice setup for sanctuary thats pretty cool
doesn't stonecunning technically double proficiency, though? 😆
or does the module remind of that, too?
ahh, you gotta add them manually
I thought it'd pull the word advantage out of features
Not for at least two weeks based on the last update message
Indeed. But I have it working locally
😄
The isSave trigger is already there, but is just being called too late
is there a / which midi setting causes the trash can icon (= to delete chat messages) only appear on the upmost message of its respective type, or is it a different issue entirely?
It's always been a little weird to me, I assume it's a settings interaction I fail to understand
I think that is some other module's fault
ah 🤔
that is another modules fault and I know what it is
DF chat enhancements maybe?
I actually installed that to see if it'd change it, assuming it might be a default problem; it's not DF chat enhancements, since it persists without it.
(disabled for now)
would you mind letting me know?
I dm'ed you
you can tell its a specific chat enhancement module due to the weird lines at the top of the others
its a feature that tries to save on space by not reusing the header
and it kills the trashcan cause its hiding the header
It tries to only utilize the header of cards when theres a change in whose typing
Yeah that looks much better and like yours now
Pretty much anyway
I'm missing the dotted line/highlight around the name of the actor
but I assume that's yet another setting 😄
That is Anonymous module actually
Indicates that the name is altered for player's viewing
oh, the name of the module is Anonymous, innit
I wound up going back to CUB cause of an issue with Token Mold that I already forgot what it was
so I stopped using anon
CUB seemed extremely old tech to me a few months ago
in that it broke a lot of things/seemed not to receive updates anymore
maybe that has changed
I only use hp rolling of npcs and name hiding in cub, everything else is off
Tokenmold...god I can't remember what was breaking with it in midi
Is there like a common "beware of this" with condensed cards? I swear I used to have it, but now that you showed a picture I realize it's off
OH it breaks TVA
oh yeah, I remember name hiding was a good one; by default, players can see who's in the initiative as soon as they've taken a turn, right?
tokenmold and TVA don't work together anymore
or maybe even before that
so TVA was more important so I switched back to CUB
I run all three, I was about to say my TVA and TokenMold works fine, but maybe CUB is the bandaid holding it together
TVA?
Hmm nothing pops to mind. There was something, but cannot remember now. But never had any issues
And to be honest Merged cards are the most well tested ones with MidiQOL, as I think tposney uses them too 😄
What breaks in TVA with tokenmold, is wildcards
Token Variant Art https://foundryvtt.com/packages/token-variants
if you set a default image for your wildcards in TVA, if you have tokenmold enabled, that setting in TVA breaks
non merged cards don't handle macros that use setDamageRoll
Found that out recently
Yeah, I got merged, just not condensed. 🤔 Will toggle on as a fun surprise between games and see if my players notice
or if my computer bursts into flames
Token Mold (similar in a way to ATE), reverts anything other modules might have done in the preCreateToken hook to the token data. If your module happens to execute preCreateToken after Token Mold, you're golden. If not then bye bye your changes.
Hey, Im trying to set up a Feature where my pc can change Token when activating this ability. I set it up like I did with my Lycan Bloodhunter but it doesnt work. I think it is because I used the "rage" template for the Bloodhunter.
How would I have to rewrite the Macro to change the spring token to the fall token? #Eladrin stuff
recently I also had this feature break let me revisit that actually...
@fallen token
the only thing that breaks on this ae/item is the ATL key does not change to the image
I get it twice, that error
Actually I get it three times
got almost the same
initi roll right?
That happens when you try to roll initiative with a swashbuckler rogue, war mage wizard, or battlemaster right?
no, I created the Feature "Fall" and put the item macro on it. It is a sorcerer and no roll necessary
you have an empty damage formula on the fall item or not a number in the formula
i copied it from my Hybrid transformation. 🤔 let me take a look
I don't know what that is nor what its from
Its my "become a werewolf" button. Do I have to set up an effect?
nothing in that item should generate the error
does hybrid transformation transform you like polymorph/wildshape?
or is it just a token image change?
The only way I know how to properly toggle an image change of tokens is via ATL module and its broken currently in my world
it gives me a mofified version of the "rage" from a barbarian. for resistances and stuff and the item macro changed the image for me
click the item macro on the top bar and paste it in here by wrapping it in :
```js
paste here
```
Can confirm that ATL.applyCustom isn't defined. Looking at the second screenshot though, the one ATL key is using Override and not Custom. There's probably another AE that's using an ATL with the Custom change mode causing it. If you can find it, change it to something else like Override as a workaround
should that key be override?
this should be upgrade?
If you care for it, I have a fully automated setup for the order of the Order of the Lycan bloodhunter.
In this case, the most accurate would be Upgrade
wow this actually makes another issue make complete sense
I had to add see invisible to her during the session and I never connected the dots here
Thanks Kaelad, and the reason why its firing when she changed forms was cause of this key on the potion buff on her thats already active
In the context of this, they're just trying to change the token image after using the feature?
could this be why the texture key failed to change?
const ragingTokenDoc = fromUuidSync(args.at(-1).tokenUuid)
if (args[0] === "on") await ragingTokenDoc.update({"texture.src":"Players/Faena/Kopf%20Herbst%20(2).png"})
if (args[0] === "off") await ragingTokenDoc.update({"texture.src":"Players/Faena/Fr%C3%BChling%20K%C3%B6pfe%20(1).png"})
yes
Likely. The error could have stopped processing active effects and not applied the other one that changes the image
it doesnt have to be an effect. Just a fast way to change the token because she has to roll what season she is each day
Is it just the image, or are you changing out features and stuff too?
only the token image
I would check that you have the token document and not the object
Might be trying to do the update on the wrong thing
Or just use warpgate to mutate the token's image
Yep, confirmed, after fixing the truesight buff on her, now she can change images again thanks a bunch!
how would I do that. Is there a way to have a drop down like with the "Blade flourish" so she can select what season she is today?
you can also use my image above if you have active token effects module installed
keep in mind that DAE does not auto complete the new ATE key like my image shows
actually it probably does just my item is older than the DAE fix for auto complete on ATE
nope, looks like tposney missed the texture.src key in his attempt to update them
You using my module? or do you need me to include the helper functions?
the reason I like the atl key for changing image is cause ae's are smoother in toggling things than macros are, I've had plenty of times where somehow a macro gets misaligned and I'm stuck manually changing its toggle
When I use your Blade flourish OR the Crimson rite macro, there is a dropdown menu (I think its warpgate) that lets me chose weapons or which flourish I want to use. Thought maybe that is easy to set up for swapping to a token image representing the season she chose
Yea
I just wanted to make sure I could reference my own stuff
Makes the dialog super easy to make lol
I mean it doesnt have to be that complicated. I could still have 4 different macros. one for each season and be happy with it. But the way I did it with the bloodhunter doesnt work here. Maybe because of the "rage" part of the macro? I don't know I have no clue about java stuff
midiqol says I should be using Automated Animations, but I dont see it in the list of modules in foundry. Do we have to go to a different site to find it?
Automated animations is not a hard requirement for midiqol, however there are settings in AA that say that you need midi for them fwiw
Automated Animation sis purely a cosmetic module
its also officially published so you spelled it wrong when you searched for it
the author is Otigan
i'll look again
let autumn = 'imageUrl.png';
let winter = 'imageUrl.png';
let spring = 'imageUrl.png';
let summer = 'imageUrl.png';
let selection = await chrisPremades.helpers.dialog('What season?', [['Autumn', autumn], ['Winter', winter], ['Spring', spring], ['Summer', summer]]);
if (!selection) return;
let updates = {
'token': {
'texture': {
'src': selection
}
}
};
let options = {
'permanent': true,
'name': 'Season',
'description': 'Season'
};
await warpgate.mutate(this.token.document, updates, {}, options);```
Give this a spin.
https://foundryvtt.com/packages/autoanimations
*Otigon, I keep spelling their name wrong lol
Automated Animations, an Add-on Module for Foundry Virtual Tabletop
untested, may need a fix or something
thank you
boy, that was fast
I copied and pasted 90% of it from stuff I already have
it helps when I know you're using my module
Since I can just call on my helper functions
Keep in mind they need to have a token on the scene for it to work (this is a warpgate limitation)
Do I need to create a macro before hand or just paste it into item macro?
Can be an item macro
Would need to be changed to update the prototype token. it won't stick between scenes
yea she stays like that until a long rest
but I am not getting it to work anyways right now. I think i fail the basics haha
the first 4 lines need you to set the image path
for each season
then just paste into an item macro on the feature
click on details on change seasons
and show me the bottom part
where it says on use macro
in details set on use macro and use ItemMacro
Making a quick update to that script to make it stick around between scenes
and have an effect
Woooah, Eladrin season change? Chris is that something in your module or did you just whip that up?
Just whipped it up
he did that in like 2 minutes xD
That would be an awesome inclusion in the module. It’s not the most demanded thing in the world but what a cool little functionality for immersion
im THAT close to create a deity in Chris's honor and let all mayor cities praise him. haha
I'll add it to my list
I would also have it add each season's feature as part of the mutation as well
I feel like you should start doing a donation fee per request between this and mote of potential. 😂
he has a kofi!
I should use that kofi again. he helps me so much
Noted! Gonna virtually caffeinate this man
let autumn = 'imageUrl.png';
let winter = 'imageUrl.png';
let spring = 'imageUrl.png';
let summer = 'imageUrl.png';
let selection = await chrisPremades.helpers.dialog('What season?', [['Autumn', autumn], ['Winter', winter], ['Spring', spring], ['Summer', summer]]);
if (!selection) return;
async function effectMacro () {
await warpgate.revert(token.document, 'Season Change');
}
let effectData = {
'label': this.item.name,
'icon': this.item.img,
'disabled': false,
'duration': {
'seconds': 604800
},
'origin': this.item.uuid,
'flags': {
'dae': {
'selfTarget': true,
'selfTargetAlways': false,
'stackable': 'none',
'durationExpression': '',
'macroRepeat': 'none',
'specialDuration': [
'longRest'
]
},
'effectmacro': {
'onDelete': {
'script': chrisPremades.helpers.functionToString(effectMacro)
}
}
}
}
let updates = {
'embedded': {
'ActiveEffect': {
[effectData.label]: effectData
}
},
'token': {
'texture': {
'src': selection
}
}
};
let options = {
'permanent': false,
'name': 'Season Change',
'description': 'Season Change'
};
await warpgate.mutate(this.token.document, updates, {}, options);```
Try this
Not tested
changed it to a temp mutation that should auto remove itself on long rest
removed after LR, worked
hmm
the little icon will stay there for the day right? We cant hide that right?
I need to rethink it
placing the token back down doesn't keep the mutated image
so I guess I need to set the prototype token image
Change: js 'icon': this.item.img, to
'icon': '',``` to have no effect image show up.
@dark canopy Am I able to mutate a token's prototype token, in this case for the purposes of changing the image?
You could also wrap this all in dae and have it remove itself afterwards. You can define it by the item name.
yea, should be able to update it via the actor's data
(if you can update it with a normal update call, you can do it via mutations, rarely the other way around)
I'm using effect macros effect deleted to unmutate
let autumn = 'imageUrl.png';
let winter = 'imageUrl.png';
let spring = 'imageUrl.png';
let summer = 'imageUrl.png';
let selection = await chrisPremades.helpers.dialog('What season?', [['Autumn', autumn], ['Winter', winter], ['Spring', spring], ['Summer', summer]]);
if (!selection) return;
async function effectMacro () {
await warpgate.revert(token.document, 'Season Change');
}
let effectData = {
'label': this.item.name,
'icon': this.item.img,
'disabled': false,
'duration': {
'seconds': 604800
},
'origin': this.item.uuid,
'flags': {
'dae': {
'selfTarget': true,
'selfTargetAlways': false,
'stackable': 'none',
'durationExpression': '',
'macroRepeat': 'none',
'specialDuration': [
'longRest'
]
},
'effectmacro': {
'onDelete': {
'script': chrisPremades.helpers.functionToString(effectMacro)
}
}
}
}
let updates = {
'embedded': {
'ActiveEffect': {
[effectData.label]: effectData
}
},
'actor': {
'prototypeToken': {
'texture': {
'src': selection
}
}
},
'token': {
'texture': {
'src': selection
}
}
};
let options = {
'permanent': false,
'name': 'Season Change',
'description': 'Season Change'
};
await warpgate.mutate(this.token.document, updates, {}, options);```
Here ya go. This mutates the prototype token too.
this.item.img on line 13 can be changed to '' to have no effect image, therefore foundry doesn't show it on the token.
Walking the dog. Right now. I'll check in 5. You are great
I'm about to head out myself, but from a quick local test it appears to be working right
Knowing that it works on the actor, could even have it change the image too if you have one.
and since it's a warpgate mutation, it's not destructive
delete the effect or hit revert and it's back to how you had it
I do have images for that
@scarlet gale before you go would you drop your ko-fi or where we can find it so those of us whose games you’re improving can show some love?
Next year I’m just putting the community devs on my Xmas gift list.
It's on my module page github
works great.
Is there an easy way to automate something like saving throw advantage against being stunned or paralyzed?
There was a discussion about that earlier today in here
A few options were given
@scarlet gale I was investigating the .toObject() issue that you raised earlier and there doesn't seem to be any difference in a direct access of args[0] in an OnUseMacro than what I was seeing when passed into my static Class methods. Could you point me to an example where that isn't the case? For that matter, what class is args[0] supposed to be?
Could just be a case of the args bringing it in differently on midi's end
Similar to how targets is an array in args, but set in the workflow
You can probably find it in the midi source code where it generates the args
When I get back I can actually look at it to see what's up
it's not super important - I was just curious mainly because javascript is not my strongest language but I haven't been able to find anything that suggests that method parameters lose their type and that's all I could think of
I'll confirm when I'm home in a few minutes. But it's likely just midi doing it
Ok yea, just confirmed it. Midi is bringing it in as an object in args, but as an item in workflow.
You can see this for yourself by doing js console.log(args[0].item); console.log(this.item);
And if you were to do:
console.log(this.item.toObject()):```
It would look the same as ```js
console.log(args[0].item);```
ok - I see this (I'll be here all week)
Question for the larger midi-qol group. Why use args[0] instead of this? because most of the examples I see are using args[0]
this only became an option back in v9 of midi. Most people don't know you can use it to directly access the workflow
I pretty exclusively use this instead of args as I find it's structure to be more useful
this is a Workflow. this.workflow is undefined, so I may just continue using args[0] || args[0].workflow
but they seem to be synonymous
anyway - thanks for the walk down pedantry lane - I learned something
obviously this.workflow isn't anything
to you...
this is already the workflow
I just tried passing this into my existing static methods and that didn't go so well 🙂
but it makes perfect sense now
not everything will be a perfect match if you swap over to it
you'll still need args for DAE on and off stuff I think?
As well as macroPass
since those aren't in the workflow
yeah, I noticed macroPass was missing
I'm not sure why I wouldn't just dive into args[0].workflow once I've gotten beyond that initial parsing though
I will try that and undoubtably learn
I will also say that applying NaN as damage has some unpredictable effects - damn near kills adult red dragons ;P
I've done that before
Just started with midi qol. Got the extra animation library from JB2A. I can add new animations, for a fireball, for instance on the A-A tab. How do I get the old animation to not play at the same time?
Like animations from token magic fx on the template?
Because the animation library one should replace your AA stuff with it's own
I'm getting both animations when I add the AA stuff
turn off the token magic template effects
assuming that's what you're talking about
should be in it's settings
I'm not sure where the original animations come from, I'll see if it's token magic
thank you
A screenshot could confirm
Turning off the token magic for fire templates did the trick. Thank you
@fringe crag Just updated my module with a bit more of a polished version of the Eladrin macro.
Next up will be mote of potential. I just need to figure out an elegant way to detect that the effect was deleted from rolling a save...
Thanks. I'll check it out 🙏
what Do I have to replace with the icons? And is there still a way to remove the little icon from the token?
in the value field paste in the image path for each season avatar and token
and no, but I can send you a modified macro if you want the effect icon gone
@digital lagoon I think you were interested in Mote of potential right? I have everything except for the temp healing on save working.
Assuming you mean mote of potential yes, that was me! 🙂
I need to think really hard how to detect midi has used the bardic inspiration for a save.
It’s for a game I’m a player in so I’ll have to pass the instructions off to the DM and we play tonight, so no rush on it. 🙂
I got the other two features working however
Incidentally, the same game has an eladrin player and we are geeked about the change seasons too. As the resident game artist I’m making him custom token borders now 😂
Eladrin one of my favorite races to play
You’re the best. We probably won’t be able to use it tonight but I can’t wait to see the finished product and honestly even just two out of three automated is a huge improvement. It’s a feature no one else remembers works differently from regular inspiration
I never have before but I really like painting seasonal portrait variants so now I’m thinking I might roll one next time I play instead of DMing
I ended up just shoving it into my bardic inspiration macro and detecting it based on the effect name.
@violet meadow How would you go about detecting that a bardic inspiration was used to make a save in a midi-environment? Using any and all hooks needed. Part of me thinks I might be stuck parsing a chat message for this.
Both pre-save and save fired long before the optional bonus dialog was used.
Is this something that an optional bonus in Babonus might handle? Like if they make a save with the mote item it pops a dialogue that lets them optionally expend it for the save bonus + healing?
It’s possible this is a silly question since I don’t understand really anything that goes on under the hood, but it seems like a sort of similar application to Zhell’s suggestion it could be used to optionally apply a die of poison damage to an attack by consuming an item with a dialogue.
There was an issue where Midi gave me dozens of notifications every time a measured template was being placed, about every dead/defeated target that the template hovered over being incapacitated. This issue was previously fixable by setting Midi not to update targets when hp = 0, but it looks like it's broken again as of the latest update regardless of this setting. Am I the only one still experiencing this issue?
I believe there’s a setting to ignore dead/defeated tokens when placing templates for targeting - let me check real quick to confirm - but that should solve it
That's
Yeah, so the setting used to fix it and now it doesn't. 🙂
Unless you mean a different one
If the setting is "Auto target on template draw," I have that set to ignore defeated
That’s what mine is at too but I haven’t tested current midi release yet.
What are your other targeting settings set to?
Blue UI is SW5E but the problem is the same in both systems.
Hmm. Under rules, do you have anything under the vitality pool? This is a shot in the dark but I know it was causing some weirdness in dead token interactions
Nope
Put a 0 in that field, save and see if it persists
Do I need to actually enable the optional rules?
Nope, that field just needs something in it
Otherwise the token’s dead status gets all wobbly. Which is absolutely not the technical term but is my lay understanding of it
No dice
Well criminy. Okay my other recollection is that some kind of weird interaction was going on with midi and nested convenient effects I believe
Do you use CE to manage conditions etc?
Well, CE doesn't work for SW5E so I use CUB there. I use DFreds for vanilla, though.
Problem is the same in both.
Alright this may be above my pay grade. Which should not alarm you because my pay grade with this stuff is extremely low and people who are great at this will be around shortly most likely. If there are any other modules you’ve added or updated recently that may be interacting with stuff make a note of that, otherwise it may be a current midi issue and tposney is out of town for a bit so reverting to .34 might be your option?
No new modules in my vanilla game
I'll try reverting for now, was curious if it was a me problem or an us problem in .35
Well never thought about that tbh.
I imagine you can get into the Actor flags at some point before the save is made and check for the existence of the Bardic Inspiration optional flag.
Then after the save finished workflow state, recheck for the existence of said flag.
how did you set it?
@queen raptor yes it seems it's new (10.0.33+) and probably a bit overzealous notification messages (in case of templates).
I think tposney will readjust this in a future version. Make an issue for that if you could.
For the time being, if you are OK with modifying module files, you could comment out in utils.js:1536 ```js
if (actor?.system.attributes?.hp?.value <= 0) {
log(minor-qol | ${actor.name} is incapacitated);
//ui.notifications?.warn(${actor.name} is incapacitated); <=change: Add // in front
return true;
}
Build a bonus module
You see the conversation right above
Fantastic! This saved me a whole lot of trouble. Much appreciated
Will open an issue when I have a moment
Hi I am trying to get the sneak attack feature from midi-qol to work, but no luck. As far as I understand it, the itemMacro of the sneak attack feature from midi-qol should be called for every weapon hit and determine in the macro itself if sneak attack damage should be added. But the itemMacro isn't called at all? Do I miss any midi-qol setting? or set
I'm trying to add a damage component to this formula. It works fine with this part for CR 1 or less monsters right now:
{
"key": "system.bonuses.All-Damage",
"mode": 2,
"value": minions.length,
"priority": 20
}
What I' trying to do, is add another variable that is equal to minions.length multiplied by the floor of the first selected actor's CR (to scale higher CR minion damage). I would then use the value of this variable as an integer for the value field above. Any help?
So you want to modify the damage bonus or you want to add an additional damage bonus on top of the existing one? 🤔
the base attack deals 0 damage; this effect expresses the (static) final damage for the minion group attack
it works fine for CR 1 or less Minions right now - they deal minions.length damage with the attack
I would like to multiply that value for the floor of the attacker's CR - so that a CR 2 minion group attack would deal minions.length times 2 damage
I've tried "value": (minions.length * (floor(@details.cr))) but it errors out as non numeric
Alright, so the actual damage for a minion attack you want is:
max(n, n*floor(cr))
Where n is the amount of minions. Just to put it in math terms
yeah
Try this instead of minions.length:
Math.max(minions.length, minions.length*Math.floor(minions[0].system.details?.cr ?? 1)),
Actually, thats not gonna work, minions is tokens
Math.max(minions.length, minions.length*Math.floor(attacker.system.details?.cr ?? 1)),
This instead
so should I put this as the value for another variable and then add the variable to the value field? Or should I just use this as the value itself?
Either should work
awesome, it works as the value directly 🙂
another question if you don't mind @kind cape ...right now the Grouped attack effect is not removed after the attack; and the value stacks each time I make a new attack (cause the effect is added multiple times). I've found a working solution - adding a second On Use Macro to the Attack Item itself that runs this await actor.effects.find(eff=>eff.label.includes("Grouped"))?.delete(). Not sure why the effect doesn't disappear after 1 attack though, or why they stack
Hmm, do you have Times Up installed?
I believe I added a special expiration in the original that was "1 Attack"
yeah, and it shows up in the effect, but it doesn't trigger even after multiple attacks. Time's up is...up
Huh, thats decidedly odd, I wonder if thats a bug in midi/times-up.. If you only do a single attack per creature per round you can set "turns": null, to "turns": 1,, that should expire it after their turn. But it doesn't work for multi-attack
that's fine, minions don't have multiattacks afaik
Just tested it here locally on my .24 midi, and it does expire when I expect it to 🤔
ok must be something else going on then...
Is it possible to set a flag to gain immunity to charm and/or sleep?
For charm you should just be able to use the condition immunities on the sheet, AFAIK
Yeah, condition immunity worked for charm. But sleep is not a condition, but a dfred (unless I make it a condition I guess)
Does it work if you just put it in the custom box at the bottom of the immunities dialog?
I'll try!
Create new ones is ez 😄
when doing the effects for over time, is it possible to make the effect trigger at the start of another actors turn? in this case, i have a creature using engulf to swallow a pc character, it applies blind and restrain to them. at the start of the monsters turn, the player would need to do a con save or take 2d8. it is all working except currently its triggering on the players turn instead of the monsters.
This OverTime won't help with that exact case.
What you could do is use a macro to force that OverTime on another creature.
Create the OverTime as an effect applied to the creature that swallows the player.
Delete the turn=start from that OT.
Add another entry for a macro.itemMacro below the OT one.
Go to the Duration Tab and choose a macro repeat at start of each turn.
In the ItemMacro of the Engulf Item copy paste this. ```js
if (args[0] === "each") {
const targets = canvas.scene.tokens.contents.filter(t=>t.actor.effects.find(eff=>eff.label === "Engulf")).map(t=>t.actor)
for (const target of targets) await MidiQOL.doOverTimeEffect(target,args.at(-1).efData))
}
Let me know if that works 😄
Engulf Item will have two DAE effectively.
-
Engulf as the screenshot, but change the OT you have there, to the roll that the player needs to make in order to free themselves (make it an
actionType:true, with no turn so as to only do something if the player rolls the ability needed). -
The second will be an Engulf (Self) which will need:
2a. In the Details tab of the DAE, apply to self when Item is rolled.
2b. In the Duration tab of the DAE, macro repeat, start of the turn.
2c. In the Effects tab ot the DAE:
2c.i: A key for overTime effect,saveAbility=con,saveDC=14,damageRoll=2d8,damageType=acid
2c.ii: A key formacro.itemMacro | CUSTOM |
2d. ItemMacro of the Engulf Item with the macro from above.
Thanks i will try. My next task is to learn macros
Hello hello! Running into an issue with Spiritual Weapon macro from Sample Items compendium, I've thrown spiritual weapon onto the character, and created the Spiritual Weapon actor with the attack appropriately named, however, i'm getting this error when attempting to use the spell:
I believe the sample items compendium is not updated for V10 - are you using the old one?
There is a V10 MIDI-SRD being worked on by bugbear that should function.
Here is the manifest link to install the current working version:
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json
Much Appreciated!
Hopefully that’s your fix - at any rate if you were still using the old midiQOL sample items compendium this one will give you working versions of what was there plus much more stuff. And I believe bugbear is planning to do a full release in the near future.
If you continue to have problems setting up the new one some of the midi wizards here will definitely be able to help.
o7, installing atm, will do some more testing
The MidiSRD is still being worked upon. I really wanted to have it out by now, but some IRL issues delayed the plans and now I ended up reworking more stuff...
Testing various thingies 😅
the example Spiritual Weapon worked fine for me on V10 (even back on midi 10.0.23?)
@fathom dock do you have all the requirements?
warpgate
an actor named Spiritual Weapon with the right attack set up?
Yep!
it wasn't from midi-srd though, it was an example in midi-qol
Yeah they both have one
I think that’s the one he was initially having trouble with so you’ll probably be able to get it sorted 🙂
now I am testing retroactively changing the msak of this kind of spells, in case the caster becomes blessed or something while the Spiritual Weapon is active
slap an item macro in the slash attack that grabs the controlling actor's rolldata and substitutes it for its own?
https://i.imgur.com/LzUp74W.png interesting
Or use a synthetic item to roll the attack
Disable ItemMacro hooks in its settings
But that's also the midiSRD one, no? The one in midi qol only uses Warpgate
my setup is pretty manual - it definitely would not handle any temp effect on the caster (and requires manually updating the actor if the caster's spell modifier changes)
The midi sample item one places the effect so you can dismiss it/has auto expiry
sorry - I meant like "bless"
Ok, so Disabling the hook lets it deploy properly!
It's in the Readme
just sneak in a forceful game.settings override
save yourself the heartache
I have no idea why but that statement without punctuation just absolutely sent me 😂
I am an idiot, that is all 🙃
ive been noodling on potential system agnostic methods to retrieve another actor's roll data without having to patch functions
I have had a system in place with MidiQOL/DAE flags that would auto update, but something has changed in the meantime. Trying to figure this out now.
If it isn;t solved in the next 20mins, then ItemMacro or a synthetic Item it is
i can potentially do it without any flag data, that's the goal, at least
just letting you know -- if you find any approaches, i would be interested in seeing how they work out
I was testing the event system but this is for another day
Hrm, should the Spiritual Weapon's slash have a specific formula in it's damage field?
MidiQOL hooks on updateToken, searching for updates based on a filter you provide and makes relevant changes if there is a diff
I know with the sample items, it states that it should pull the damage formula automatically, but don't know if that's the case as well with the new one I'm using from Midi SRD
is there something wrong with the result?
I would wait before using MidiSRD for a bit.
Having said that, SPiritual Weapon was fixed IIRC
roger roger, i'm actually bouncing to go to a doctor's appointment, but I'll be back in a bit to do more testing on my end!
Generally speaking everyone in this channel, if you ever see Itemacro in an error, you are midiqol'ing wrong.
Hey all! Is there a midi flag for rolling hit dice at advantage? (During a short rest)
99% sure that there is not
Mostly because Midi does not really have any mechanics for short/long rests, mostly
make a feature that rolls 2dXkh1 + @abilities.con.mod
if you have multiclassers, RIP.
I may just be lazy and alter the items ability XD. I appreciate it though!
world script territory sadly for any hd rolling shennanigans unless you make it a feature on the player that they roll
cause the dnd5e system decided to make the hit dice a drop down that can't be edited on the class feature 😦
mechancially speaking, does this descrption make sense?
Each stimulant comes loaded into an injector and ready for use. The stimulants are used as a part of a short rest, and allows the recipient to add an additional bonus to any hit dice they choose to expend. The bonus is equal to the size of the creature's hit die.
However, when a stimulant is used, the recipient receives one level of exhaustion. The stimulants allow for additional healing, but they put a great deal of strain on the body when active
(essentially you roll 1 hit dice but only spend one- this is achieved via foundry by adding a situational bonus = to the hit dice spent)
Is this an appropriate venue to ask about Dynamic active effects? (DAE)
I had my 'apply active effects' working earlier but now pushing that button does nothing when the item is rolled 😢
No updates, or changes as far as I'm aware.
The modules are made by the same person and often inextricably linked, so I figure it's fair game. Can you take a screenshot of your item's setup? (the item itself and the effects window), is it spitting errors out at you?
what is your effect transfer module?
No errors, but here are some screenshots. its a bit frustrating since I KNOW this was working before (probably a month or so) Come in to do some last minute prep for Friday & check everything.. and now its not working XD.
clicking these does nothing
did you disable midiqol?
DAE does not do effect transfer
Nope, I use that far too much
you either have no target, or you had no target when you rolled the item
Checkbox for apply to self is toggled, tho
oh that'll do it
thats wrong
uncheck that first tab box
instead on the item itself for range/target set it to self/self
those checkboxes in the first tab are for abnormal effect transfers
think of a weapon that requires a target, but applies a self ae
thats what your checkbox was for
For those not aware, this is one of those moments where we get to see our brethren in sw5e system lol
the other midiqol system
so i DONT want to apply it to myself?
you do, just that tooltip for that checkbox is misleading
to apply a self buff, you need the items details target/range to say self/self
the checkboxes in the first tab of the ae are for special occasions and not for yours
standard effect transfer should have none of those boxes checked
hmm well its working, but i DO need to target myself first. otherwise it wont
unless ofcourse the item you are using is a target item that applies a self buff too, then you check that box, for us dnd5e fellas, that would be like a weapon that hits a bad guy but also buffs the wielder
I don't know what the details look like on a sw5e item details tab, but in dnd5e its this...
sorry my system is abnormally slow right now
midi follows the effect transfer guidelines of the target/range fields in dnd5e, pretty sure something similar exists in your item details
ah. let me check that part
self only
i suppose someone could inject someone else but for that i would just have them use the item
for the stim thing you probably don't want it to be an ae
I just want it for the timing mostly so they know when it wears off
I dunno how much sw5e shares with dnd5e but modding hp with an ae is usually bad
yeah im not putting any flags in it. just a timer for the icon
not to mention, this is v9 foundry with sw5e forked from who knows when
yes, v10 doesnt play nice with it yet
yeah I was suspecting a v9 build due to the missing checkboxes in the dae
so im not going to risk my whole campaign XD
Always nice to see a sw5e fella around these parts hope we hooked you up well
yessire, ty kindly
I was 5e before this, so im switching it up. next will probably be pathfinder 2e
it works here cause even though we're a dnd5e thread, midi itself is sw5e and dnd5e
indeed
unofficially ofcourse
I know of a certain badger who still rocks v9 for their campaign ;p
and?
maybe for the glowrod i just need to change the item type as right now it doesnt allow a target since its considered "loot". may need to make it into a consumable
I was just bein silly
its odd to me that as long as whoever is using the glowrod targets SOMETHING, it works on THEM. not the target
Foundry can be jarring with all its changes especially on the players, DM's see more of the backend and can adjust
which is what we want- its just weird for me to understand why its doing that
that is because you have that box checked I think
same deal if it is unchecked
hmmmm whats the item details look like
thats what i mean, "loot" doesnt have a details tab. so i probably need to change the item type
OH
this happens in dnd5e too
that is a funny dae interaction
loot is suppose to be like literaly the dumbest item type with nothing to it, but somehow the dae wrench lets you put dae's on it
you should probably change its item type
loot really shouldn't have dae's on it hehe
fair enough. i shall make the appropriate adjustments!
Final question- does anyone happen to know if there is a way to send a message to chat when a timer expires? / an effect wears off
i can try to adapt it
I do it with effect macro, I know its v9 compatible, but I don't know if zhell made it work with sw5e
ChatMessage.create({content:`The command must be followed now.`})
This is my on deletion effect macro for Command
I suppose also we need to know if ChatMessage.create is a function in sw5e
And I set a special duration in the duration tab, pretty sure you have this access:
pretty sure the combat centric special durations are DAE, you might need times up
This should work, thank you!