#MidiQOL
1 messages Β· Page 27 of 1
As in, is that a feature?
Cause it does that by default IIRC.
I can get it to take off effects
but when I cast create bonfire for example
I pass the time and it does not go away
I can't seem to find any settings that I've turned off that would make it not happen but it definitely doesn't delete it
It doesn't delete the template after the time of the spell ends?
As long as you have the required modules, it should be based on the game time.
Do you have About Time installed?
I do not. I think I was told Times Up was a better alternative
Or is it Times Up π€
do they do different things?
They have different functions
ok let me get about time real quick
ok yeah I don't have that box. safe to assume getting about time will give me that option
Unrelated, new spike growth template macro:
Requires 0.0.5 of template macros and midi-qol.
ok so that gave me the box and it's clicked but still doesn't work :/
what version of foundry you on?
My god, those are some short macros for a complicated spell. π π π
when you say game paused, you do actually have the clock ticking right? in Simple Calendar?
the clock is ticking yes. I have it set so 5 irl seconds is 1 in game second but I'm just forcibly advancing the duration of the spell
the spell or the game time?
game time. the spell duration is 1 minuted. I click to advance 1 minute on simple calendar and nothing happens
Have you re-cast the spell after adding the required modules
yes
Have you tried with just the required modules and midi-qol?
Make sure no other modules are messing things up
Keep times up, about time, simple calendar, along with midi-qol and it's requirements
Then try
still nothign
Looks right
@molten solar Good news, the cell function works on hex grids as expected.
Given that I expected it to not work, this is technically bad news.
It's not the biggest deal just wish I knew why it wasn't working :/ Not like there will be that many templates that I can't just delete them on my own
It's the same algorithm, it's just finding cells along the line. Since it's just the method that the ruler uses for highlighting, it makes sense it works on both types of grids.
Unexpectedly it doesn't blow up the console on gridless. It just gets far too many points however.
If I have "autoRollDamage" off but want to add it to one item in ItemMacro how should i phrase it and when to trigger the itemmacro?
setProperty(workflow, 'rollOptions.autoRollDamage', true);
something like that?
I think just having it return an empty array is what I'm gonna go with for gridless scenes.
Moto moto was doing something like that
I FIGURED IT OUT
If you haven't rolled damage for the spell, it won't delete the template
oh interesting
Makes sense
I think the foundry function that returns the grid is just returning the same location you put in
Because it does make an array of cells it thinks exist
Moved 20 feet, got 6 cells however lol
doesn't work sadly :/
IIRC it needs to be an item macro that runs on the first event
mhm
called before the the item is rolled
make that an item macro
ItemMacro in that box
then edit the item macro in that box to have what Moto Moto posted in that message
Could you screenshot the same box from before?
fastForward?
That's the workflow property midi uses
from before what? π
wait - I think I'm an idiot - I'm don't need fastForward
i need
Auto Roll Damage
that's not the same thing
should still change the workflow as desired
foundry.utils.setProperty(this,'rollOptions.autoRollDamage',true);
ok this still doesn't work π
rip
Item with an AE transferred to a target with a unique statusId.
The Item has a disabled babonus on it, doing extra damage on weapon attacks against a target with the specific statusId effect applied.
Workflow. Source Attacks target and effect is transferred on a successful hit.
Effect Macro on creation. ```js
const [babId] = game.modules.get("babonus").api.getBonusIds(origin)
for (let ally of canvas.scene.tokens.filter(i=>i.disposition===1).filter(i=>i.actor!==origin.parent)) {
await game.modules.get("babonus").api.copyBonus(origin,ally.actor,babId)
await game.modules.get("babonus").api.toggleBonus(ally.actor, babId, true)
}
The babonus is transferred to allies of the attacker to grant them extra damage.
Now if only I could make it have a "special duration" of 1 damage roll and then auto delete, would be great... so as I don't have to create an AE with an actual special expiry and attach the babonus on it π
Effect Macro has a "damage roll" trigger
Is it "in" the (dnd5e) on attack rolls?
I was wondering about that, as it was "missing" from the list
That's what I was wondering π
Anyways it wouldn't do me much good in this case, as the Effect is only on the initial target, not the allies with the babonuses
Except if there is a case of damage applied trigger
The plural of babonus is babinese
Ok, I think I've got it in a good spot now. Spike growth with template macros that works on any grid type and scale (as long as it's feet).
Doing a basic distance calculation for gridless scenes.
Nobody is crazy enough to have grids that are smaller than 5 feet right?
Like 2.5 feet per grid
10ft vertical, 11ft horizontal
I think MIDI on spell casting is not going through all the macroPass entries... docs say that ALL is a special macroPass that fires on each, and I get the preItem macroPass and no others. Elsewhere in the docs it states that if a macroPass returns false the workflow aborts, so that seems to be happening which leads me to ask why is preItem returning false? The spell casting renders a spell config dialog ("consume spell slot", "use a template") so I am thinking that is interfering. Is that possible?
Hmmm, do you have a specific macro that is not being executed?
And when you say preItem is that what you use?
Cause that macroPass doesn't exist afaik
I am trying to get any macro to fire on spell casting and the only way I can get them to fire is to set MIDI onUse to preItemRoll or All which starts with preItemRoll
I just verified and effectively the effect to delete the template is only added when the roll is finished (workflow state ROLLFINISHED). If you donβt auto roll damage, then the workflow is stopped at a previous state until the damage is rolled.
I'll check again but the macro doesn't fire when set to AfterActiveEffects either. One sec and I'll verify
What's your macro?
Don't suppose you accidently have item macro's sheet hooks checked?
the macro is js console.log("I fired") simply to verify it is kicking off. I can I get. that to show then I'll add actual code
Don't think so but I'll check that too
It needs to be NOT checked or stuff breaks
Item Macro's`sheet hook' is unchecked
Make sure that you have spelled ItemMacro as is case sensitive
Doesn't fire. on AfterActiveEffects and it does fire using preItemRoll and All so name is correct
Could you screenshot your details tab of the item?
If you open the console, does it have any red errors after you roll the item?
No errors in browser console
The real bug is the CSS.
What version of MidiQOL are you on between?
What kind of item is this and what action type?
I ask because if you are not auto rolling attack and or damage, the workflow waits until the button has been clicked so it will not trigger the after active effects until the previous states have been executed.
@gilded yacht it seems there is some CSS issue (user is on 10.0.18)
I am using a smaller Font size (4) than normal in core settings and I hadn't encountered that one π
I think that Font size 6 will break it
Well I ll be damned... π core bug
I get that... I click on the spell (to start dice roll) it prompts the spell dialog (consume slot, use template) that is clicked and the normal spell chat card shows up as expected but no macro. fired. I set it to All and used console.log(args[0]?.tag, args[0]?.macroPass) to see which of the macroPasses it was reaching.. only preItemRoll logged. To me that means preItemRoll is returning false and aborting workflow if I am understand All correctly.
Seems to me like it's waiting for the other stuff to finish
Do you place the template?
Could be, but not sure what as all dialogs are acknowledged and template placed
Can you screenshot the rest of the item you're using? Does it apply an effect to targets?
Do you have a button displayed for Apply Effects?
workflow.targets.forEach(target => {
if(!target.data.actorLink) {
let effects = target.data.actorData.effects;
//let tactor = game.actors.get(workflow.actor.id);
let minion = effects.find(e => e.label ==="Minion")
if(minion) {
console.log("new", workflow);
if (workflow.damageTotal > 0) {
const values = Array.from(workflow.failedSaves.values());
const targetFailed = values.find(val => val.id === target.id)
const targetDmg = workflow.damageList.find(dmg => dmg.tokenId === target.id);
if (workflow.attackRollCount || workflow.item.name === "Overkill" || (workflow.saveResults?.length && targetFailed && workflow.damageTotal > 0)) {
target.actor.update({"system.attributes.hp.value":0})
if ((workflow.attackRollCount || workflow.item.name === "Overkill") && workflow.damageTotal > target.actor.system.attributes.hp.max) {
console.log("workflow.item.name")
const item = workflow.actor.items.getName("Overkill")
item.update({"data.damage.parts": [[workflow.damageTotal - target.actor.system.attributes.hp.max, workflow.damageDetail[0].type]]});
dnd5e.documents.macro.rollItem("Overkill");
}
} else if (targetDmg.hpDamage < target.actor.system.attributes.hp.max){
target.actor.update({"system.attributes.hp.value":target.actor.system.attributes.hp.max})
}
}
}
}
})
});``` - my updated Minion macro. You need to create "Overkill" skill on your PCs, but then they can slash
minion left and right
i can't get my "Overkill" skill to auto roll damage thou :/
Make the function async and use some awaits for the updates
also can you format it as js to help with readability?
It is the default SRD "Detect Magic" spell... only additions is the Item Macro mentioned above (console logging tag and marcoPass) and the screenshot details from above
Do you want to send me your MidiQOL settings export to try to replicate? It's probably something in your workflow settings, as it is working as intended for me.
Yeah I can do that.. my next thing to try is 'Find the culprit' to see if another module is interfering
sent
dnd5e.documents.macro.rollItem("Overkill");
Why do you use this?
so my player rolls his item called Overkill - then he can chose next target with this itemRoll
and apply the damage - if the damage > targethp - he can do it again and again
You don't want to use that in a macro.
I would like to add an ItemMacro for "Overkill" to autoRoll damage (I don't play with autoRoll damage in Midi-on) but I can't get it to work
Change that to await MidiQOL.completeItemRoll(item)
Bugs, you are needed in #macro-polo π
Hmm but be ready for a CTRL+F5... cause it might have adverse effects...
MidiQOL.completeItemRoll(item); - ok that works. Maybe I can add something here so that Item will roll with autoRoll damage?
yes take a look at the midi readme. it has the options it can take
But still you are not awaiting anything and it might have an issue when you update the item and then immediately try to roll it
Hooks.on("midi-qol.RollComplete", async function (workflow) {
oh you have a forEach. oh well async that function π
Got to run. I have some babonus unfinished business!
MidiQOL.completeItemRoll(item, autoRollDamage) hmm that doesn't work either :/
await MidiQOL.completeItemRoll(item, {workflowOptions: {autoRollDamage:"onHit"}}) //takes a string value of always, onHit or none.
small edit
@violet meadow and others... I used Find The Culprit and found it was likely the module Ready Set Roll for DnD5e that was interfering with MIDI π¦
oh that is a big no-no.
Do not mix and match Roll altering modules
1 more thing - If I would like to add something like that to my item via ItemMacro - how would you write it?
You mean a proper ItemMacro executed as a hotbar macro?
If I want a specific Item to autoRoll damage?
Or through MidiQOL's workflow (item onUse etc)?
You will need on the preItemRoll macro to create a Hook.once("preItemUse", {}) and pass it the autoRollDamage options you want
This maybe? I cannot test it now```js
Hooks.once("dnd5e.preUseItem", (item,config,options) =>{
foundry.utils.setProperty(options,"workflowOptions.autoRollDamage","onHit"); //still doesn't work hmmm
})
@gilded yacht MidiQOL v10.0.19
Yeah, noticed that this morning. Fix later tonight
Thank goodness for that - what I know about css is extremely limited.
Speaking of, next time you're in DAE... if you wrap the new descriptions you added in <p class="notes">...</p> it'll style them the same way as the descriptions in Settings. Don't mean to be rude or anything, I just find that screen a bit hard to parse sorry π³
PS equipped runs πββοΈ
Is there an automated circlet of blasting in v9, My only thought is to do the createitem thing in v10, otherwise just cast the spell 3 times and uncheck the box yeah?
Also does anybody know if theres a way to move the magic items spells to the top of the spellbook instead of the bottom in magic items module?
That would be great... you could make a feature suggestion
I think my main problem is cause Argon Combat Hud does not work well with Magic Items module, I think I'm gonna have to move the players to TAH instead
I love Argon, its got lots of info for the user, but there is literally no way to cast magic item module spells with it
Oh really, have you let Ripper know? Magic Item is pretty popular afaik
We find TAH and Monk's Hotbar Expansion enough (looking forward to v10 where MHE is fixed)
Just now realzing that magic items module doesn't even work for me
I only installed it cause I thought it'd be faster for constructing the items but its basic function does not seem to work, when you cast an item from it, it does not expend the resource, no resource window pops up, what is the point of even using the module then?
Does anyone know of a way to make it so that an effect can cause you to deal additional damage when you deal damage of a certain type?
So like, whenever you deal fire damage, you deal +3 damage, or something similar.
For reference, the Imbued Wood Rod (ERLW) would do something similar.
Iβll give it a try in v10 and see if itβs still not doing that
Either way Items with Spells module is available in v10
I gave that a go, it wonβt let you edit items on a character and it seemed a bit busted on tidy sheet, but it does seem promising if itβs being updated frequently
i don't know macros, so the best i could do would be using this to prompt the user and let them click it when it's the appropriate type of damage https://gitlab.com/tposney/midi-qol#optional-bonus-effects (problem is it'll probably become annoying)
Babonus does that easily with no macros involved
@river urchin so what are the 3 categories?
a. tiny, small, medium disadvantage on saves
b. large something else
c. gargantuan something else?
Huge is missing
You can combine all of them in one loop of the targets
huge does normal save (that's why it's not there), gargantuan auto succeeds (but since there is no flag for auto succeed, add big bonus)
i think the problem might be that i use midi flags for a. and b. but not for c.
Try this. Does it do it? ```js
for (let target of args[0].targets) {
let key;
let value = 1;
let mode = CONST.ACTIVE_EFFECT_MODES.CUSTOM;
const size = target.actor.system.traits.size;
//if (!size || ["huge"].includes(size)) continue;
if (["tiny","sm","med"].includes(size)) key = "flags.midi-qol.fail.ability.save.all";
else if (["lg"].includes(size)) key = "flags.midi-qol.disadvantage.ability.save.all";
else if (["grg"].includes(size)) {
key = "system.bonuses.abilities.save";
value = +99;
mode = CONST.ACTIVE_EFFECT_MODES.ADD;
}
else continue;
const effectData = {
"changes":[{ "key": key, "mode": mode, "value": value, "priority": "20" }],
"duration": {"startTime": game.time.worldTime},
"icon": "icons/magic/control/debuff-energy-hold-yellow.webp",
"label": "Save manipulation - size dependant",
"flags": {"dae": {"specialDuration": [ "isSave" ]}}
}
await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
}
@river urchin π
omw
Hunt that missing )
it's in the "lg" conditional. edited
Not sure if the flag is success tbh
damn, i read your message just after finding it xD
i've searched for it, and i don't think there is a midi flag for success
i'll try that one, though
it's not applying auto fail
nor disadvantage
Will check on Foundry in a bit
thanks
hmm i think i screwed something, i pasted it again and now it's applying disadvantage
and autofail
It should be working. Only issue might be with the success
yup, that one doesn't work
my idea was to make it give the target a huge buff to its next save, but for some reason it did that after the current save is made
Will change it in two
oke, thanks! you're very kind
Get the edited one and try once more!
@gilded yacht Was debugging of the cover left on by accident with the new levels auto cover integration?
it adds the effect... but after the save
system flags seem to be slower than midi ones or something
now that someone pinged tposney... suggestion for a midi auto success flag, please flags.midi-qol.success.ability.save.all
It works for me π€
I am auto-rolling saves for NPCs.
Do you use some other save prompt? Like Monks Tokenbar or LMRTFY?
npcs auto roll saves for me
this itemMacro is set to onUse after active effects, if that's relevant
Oh how does it even work in the previous ones then π€ ?
Make it After Targeting complete
idk, but i need it to do it after AE (the active effect adds a visual aid to a vortex warp like ability)
You maybe had it already on the targets from previous rolls!
You can do both. 1sec
nope, i make sure to make a manual save before to get rid of the effect
Change to ItemMacro | All and ```js
if (args[0].macroPass === "preambleComplete") {
for (let target of args[0].targets) {
let key;
let value = 1;
let mode = CONST.ACTIVE_EFFECT_MODES.CUSTOM;
const size = target.actor.system.traits.size;
//if (!size || ["huge"].includes(size)) continue;
if (["tiny","sm","med"].includes(size)) key = "flags.midi-qol.fail.ability.save.all";
else if (["lg"].includes(size)) key = "flags.midi-qol.disadvantage.ability.save.all";
else if (["grg"].includes(size)) {
key = "system.bonuses.abilities.save";
value = +99;
mode = CONST.ACTIVE_EFFECT_MODES.ADD;
}
else continue;
const effectData = {
"changes":[{ "key": key, "mode": mode, "value": value, "priority": "20" }],
"duration": {"startTime": game.time.worldTime},
"icon": "icons/magic/control/debuff-energy-hold-yellow.webp",
"label": "Save manipulation - size dependant",
"flags": {"dae": {"specialDuration": [ "isSave" ]}}
}
await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: target.actor.uuid, effects: [effectData] });
}
}
if (args[0].macroPass === "postActiveEffects") {
for (let target of args[0].failedSaves) {
//put the Visual Aid in here
}
}
btw if i do that it first continues with the rest of the macro and then it makes the save
Yes because you run the macro as soon as the Targeting is complete. I didn't know that you had more to that macro π
aah gotcha
oh, then i'd have to write down the visual aid as part of the macro instead of having it as an AE?
I thought you were creating a Sequence for that visual aid.
Now I am confused
What is that AE and when is it applied? If the save fails?
idk, but i need it to do it after AE (the active effect adds a visual aid to a vortex warp like ability)
It's doing a couple of things
the AE does nothing but allow me to display an Automated Animation
I found a work around that works for me
I made a macro called tooBig wich has the grg part of the code (as well as the rest of the things that allow it to be applied), and i make it to trigger after targeting complete, and then i have the other macro with the rest of the filters trigger afer active effects
and yes, the AE is applied if the save fails
With your code and my arguably cheap work around i'm fine, so thanks for your help!
Good to hearthat it works for you, but I still fail to understand how can the After Active Effects application of the midi flags in the macro, affect an already, by that time, rolled save!
I fear that you have the effect already on the target. Make a quick check. Go to the target (which should not be huge or gargantuan) and check its effects tab on the character sheet. Does it have any effects there? I named it Save manipulation - size dependant.
Or any other remnants of effects affecting saves?
If yes delete them and try the macro again. Does it still work?
yep, i check the effects on the target after every test, and that's the thing: the effect is there after the item with the macro completes its thing, then i remove it, then i trigger the macro again, it fails to make the grg target suceed, and after that the buff to one save is back on the target
I also have no idea how active effects are triggering essentially between the steps of the macro xD
why would a console error say see the console for the error 8)?
Workflow steps.
Item rolls.
Get targets.
When targets are set, macro fires giving bonuses or success etc.
Save is rolled.
Macro set AE Save manipulation - size dependant is deleted.
Then workflow continues to the rest of the steps. Damage application etc.
After Active Effects is last.
So you need to use After targeting complete, or macroPass === "preambleComplete inside of a macro for the macro to know which targets you want to affect.
thing is, it just works for me now. I need the two macros, but it does exactly what i want it to do in the order i want it
So thanks for your help, but I think I prefer to keep it that way rather than continue meddling with things I just barely understand xD
Understood and it's a valid point. If you find at some point that it breaks your workflow hit me up and we can take another look. Happy rolling π
i love midiQL but when it doesnt work it messes the whole game up xD
best you can do is record the error message in a snippet and paste it here and tell us what its doin and we might be able to help.
hmm I have a small problem with my macro - it's updating token hp. after hit, but It doesn't work for my players( cause they lack permision to update that token)
it is ticked as "Execute Macro As GM" but still doesn't work for my players
execute as GM is rarely, rarely the switch you are looking for
so is it even possible to trigger a macro by a player to update a token he/she does not own?
what kind of modules?
oh, this is midi thread, not macro polo -- midi has "run as GM" functionality
Uninstall Advanced Macros /s
"Advanced Macros No longer required/used" ?
Why do we know this. π
hmm I can't find that function
cause midi got a ton of documentation that is easily searched! π
why are you reading the midi documentation
I have multiple macros that use advanced macros exxecute as GM fwiw but I'm on v9 so maybe things are different
I treat modules like I treat homebrew mechanics. Do the rules/documentation fit on a single page? No? Yeet.
I have manually included a new socketlib register in MidiQOL code to do an updateActor as a GM too π
Let me check what is available anyways
Hello, is there a place I can see what goes into the config item in the MidiQOL.completeItemUse(item, config, options); function. I have been digging through the changelog and I can't seem to really find any info on it.
args[0].isCritical ? 2: 1; in Sneak Attack (from Midi Sample) this makes crits for sneak to roll additinoal dice. Can I change it o max damage (max critical die)?
I see plenty of info on the options item in the readme, but nothing calling out what goes into the config. That said just leaving the config item empty is working great so I am not too worried about it. Thank you
Hi all I have a Wizard who has a Shield Guardian and trying to give him the Bound ability. thatlonelybugbear suggested using Warding Bond, which seems like it would be ideal, but it doesnt seem to transfer the damage the Wizard is receiving while having the Warding Bond up, is that something it should be doing automatically ?
On a side note Macro.ItemMacro is blank in DAE, shouldnt it have a macro name in it ?
definitely not a name, since itemmacro is the name of the macro on the item.
Ok I found the issue, Convenient Effects version was kicking in but it has a double line for resistance in DAE rather than the itemmacro like the DAE/Midi version has and was overriding it. It seems to work now, but it does throw an error in the console, but doesn't seem to adversely effect the ability
What's the error?
can you tell me how to do it?
It seems that you are using a Midi SRD Warding Bond and not the one bundled in MidiQOL Sample Items Compendium named warding bond 10.0.13
Or at least that error points to the Midi SRD warding bond spell
I am still on Version9 of Foundry using version 0.9.62 of Midi QoL
Ohh that is quite the old version! All bets are off at this point π€·
Any reason why you at least haven't updated to the last available v9 MidiQOL version? .88 or .83 dont remember now!
My MidiQOL Sample Items does not include Warding Bond(im guessing since its older)
It's a stable build atm. I am waiting on a few Modules to be taken to Version 10 before I move from this build if that makes sense.
But it works, the error message doesn't seem to bother the outcome so its a win for me π Thank you for the help I truly appreciate it.
Well in that case my advice will not stand (for the warding bond) π
Yes but it will not stick after a MidiQOL potential update.
well It's probably my only option right now
Bugbear is full of bad ideas.
||Edit the GMAction.js in /midi-qol/src
Add alongside the rest of the export functions one like ```js
export async function updateActorAsGMBAD(data) {
const actor = MQfromActorUuid(data.actorUuid);
await actor.update(data.updates);
}
Inside the `export let setupSocket = () => {}` on line 57 add a new entry:```js
socketlibSocket.register("updateActorAsGMBAD", updateActorAsGMBAD);
To use it afterwards, structure a call similar to ```js
await MidiQOL.socket().executeAsGM("updateActorAsGMBAD", {"actorUuid":token.actor.uuid, "updates":{"system.attributes.hp.value":65}})
ok - thanks
please add this as a world script instead!
modifying a module's source is a bad idea!
writing macro like that is waaaay beyond my capability
Try this. You would need to get the Roll formula using the new CONFIG.Dice.DamageRoll.
So do something like js const baseDice = Math.ceil(rogueLevels/2); let rollFormula = `${baseDice}d6`; if (args[0].isCritical) rollFormula = new CONFIG.Dice.DamageRoll(rollFormula,"",{critical:true,multiplyNumeric:false,powerfulCritical:true}).formula and then when you return the damageRoll ```js
return {damageRoll: rollFormula, flavor: "Sneak Attack"};
`powerfulCritical:true` maximizes the crit dice, `multiplyNumeric:true` would multiply any modifiers, but I just put it in there for future reference, as in this case it will be false.
If you were using any modifiers like `@mod`, `@prof` etc, you would need to provide the rollData too, so it would need to be changed slightly: ```js
new CONFIG.Dice.DamageRoll(rollFormula, actor.getRollData(), {critical:true,multiplyNumeric:false,powerfulCritical:true}).formula
Doesnβt DAE already got one for its own updateActor flag?
Do you mean the DAE macro.updateActor?
You would need to create an AE instead but yeah π€·
I asked Tim to maybe include something like that call. It might make sense
yeah I thought about a workaround with AE
Hey folks is there an attribute key for the new v10 darkvision that I can put in a custom DFreds CE?
"value": @targetUuid number "0" system.attributes.hp.value, - going with macro.updateActor almost works - however how a world script could find target token Uuid so it could enter it in the "value"?
You already use workflow.targets.forEach to go through all workflow target.
Just use target.actor.uuid
doesn't work like that :/
Use ```js
"value": target.actor.uuid
"value": target.actor.uuid "number "0" system.attributes.hp.value"?
You would need some commas too iirc
hello there friends, I am trying to create this DAE
this is the formula, but when I click on it, nothing happens what am I making wrong?
nvm
does the ability targets "self"
"value": target.actor.uuid "number "0" system.attributes.hp.value" - so this should work?
"value": target.actor.uuid "number" "0" "system.attributes.hp.value"
"nvalid arguments passed on Scene.sN9JkclFV1fehWM9.Token.Lg036YzQ1j6S1i0w number 0 system.attributes.hp.value "
Yeah I confusing you now. Check the readme.
so it took the right token
can you paste the previous formula? It was almost right - I think i can get there from it
"value": `${target.actor.uuid}` number "0" "system.attributes.hp.value"
no, the previous with $ - that one doesn't load at all
I can check in a bit.
Hey folks is there an attribute key for the new v10 darkvision that I can put in a custom DFreds CE?
system.attributes.senses.darkvision doesn't seem to work?
`${target.actor.uuid}` "number"
"*0" "system.attributes.hp.value"
"Unexpected string" :/ but ${target.actor.uuid} definetly works
You would need to update the token.document to give it darkvision.
So DFreds with an Active Effect will not cut it.
You would either need ATE module to target a change in token.document.sight.visionMode
or Effect Macro on creation to update the token with a Macro (or DAE with if (args[0]==="on"){})
use +4
omg im so dumb, thanks
It should work though
"value": `${target.actor.uuid}`, - just this gets the scene and tokeuuid right. But the rest of the value crashes and block the whole script from loading
What is the Armor Calculation method you use?
still isnt working tho
no commas?
when I toggle it manually it works
this doesn't load
the red squiggles are syntax errors
~~oh its on the effect. Maybe ```js
"value": ${target.actor.uuid} "number" "*0" "system.attributes.hp.value"
you're trying to do something like "Shield" spell - Add x AC for 1 round? Or 1 attack?
no no, are we making a concatenated string? or an array of strings?
exactly like shield imo since it is a reaction and it should only last one round
thats why I used the default midi shield
Do you have it to target Self in the 3rd box in the item's details tab?
the description says only one attack tho but humm
still doesn't load
Now I do but still nothing happens
are we making a concatenated string? or an array of strings?
@dark canopy you need this
You overdid it with the checkboxes there π
don't make it a suspended and transferable
roger
"value": `\"${target.actor.uuid}\" \"number\"
\"*0\" \"system.attributes.hp.value\"`
freaking escaping yes... 
now its like this
quotes inside of quotes inside of quotes π
but now it doesnt even apply the effect on the character
Just use apply to Self when item is rolled
awwww yeah many thanks for your patience!
ill follow the tutorials now so it only applies until the attack misses
with a comma after the end, for proper Object syntax, yes
in the future, you can get this kind of syntax by creating the AE on the item/actor as desired
then dumping the actor/item to the console with ...toObject()
you can then see/copy the exact internal data used
oh - nice to know
one last question regarding this, sorry to be annoying. Where should I type the 1attack?
Special duration. Left screenshot bottom click on +
No need.
is this possible my friends?
dont edit aes on owned items
Im sorry, what does that mean?
basically I want to add theint modifier to a lot of stuff (attacks, saving throws) and I was wondering if the @ is well typed
move the item to the sidebar, edit, then move back onto the character
ah!!!!
and you can test these effects easily by creating them directly on the character in its effects tab
yhh "macro.actorUpdate" still blocks players with "lack permission to update the token"
so it's not a workaround :/
Does anyone know, offhand, if midiqol considers a spell area attack (a spell with a template, say, fireball) to be a ranged spell attack or not?
I am looking for a way to set a full cover effect that would allow the token with full cover to ignore melee and ranged attacks, but still be vulnerable to an area-of-attack spell.
Is there a way to check if the character made a saving throw before activating a macro?
succeeded*
You can check if the token.document.id is included in the args[0].saves
I think a fireball will be of actionType:save not rsak
Also check the latest MidiQol release notea in #package-releases
<#package-releases message>
There is a mention about cover towards the end so you could take a look behind the scenes in midi
Dos anyone have a magic missile macro i could use? for v10
Has anyone come up with a good way to expire rage if the user doesn't attack or get hit? It doesn't come up super often so I'm pretty forgetful about it and would like it automated. I have a couple ideas about how to pull it off using a secondary AE and special durations but I was wondering if anyone has a working solution
I just verified and it seems that this does not support executing it as a GM, the only flags that I think would allow that is macro.execute.GM or macro.itemMacro.GM
But I this cas you would have to write the update actor yourself in a macro
Sounds like you're on the right track... a recurring AE that toggles rage off, that has a special expiry on hitting or being hit
hello all-- been playing around with midi and cover modules (levels auto cover and Simbul's... but I have somehow managed to show line-of-sight lines and can't turn them off! happens with both modules, so I suspect there's a midi setting? @gilded yacht ? Getting this:
Debugging lines were accidentally left on as far as I can tell. We'll just need to wait for an update.
check the cover module's options
ok.
I couldn't find a debug option to turn off for cover
try game.settings.set('simbuls-module-key','debugDrawing', false)
not a registered game setting
ah, yes, well, that would do it!
ex. dnd5e-helpers for my version
I think it's midi doing it actually, because the levels version of cover is also doing it.
.
maybe, but most of the lines drawn in that above image are 100% from helper's
controlled by its settings (which should be identical apart from namespace in simbul's versions)
yeah, that's because helpers is currently active. When I swap it with levels, it's green sight lines
swapping out with levels gives me this, so yeah, looks like debug was left on.
have you tried setting that debug option?
game.settings.set('simbuls-cover-calculator','debugDrawing', false)
hummm this is weird, my feature to add int modifier to ac works for all npcs but some 4 I have on a folder, any idea of why?
could it be because they are recently created and the ones were done before?
with very little context nor understanding, my first assumption when I hear someones ac bonus isn't working is I tell them to check to see if the actors ac formula is set to Flat as any flat formula will ignore ae's with bonuses.ac in them.
now I have tried with bonus to STs as well
and it works
but when I try to a new NPC I have created nothing happens
hover over the ac shield in the image on the new actors, what does it say, snippet if you can
funnily enough with just custom, it doesnt work on neither
let me try custom and the one you posted
k undo that but use my above code for effect value
confirmed, with custom and the one before, nothing happens
lemme try with just add
same result on the one that works
but sadly it doesnt work on the new one
I find it really weird that it works on some npcs but not on the newer ones I have just created
drag out a starter hero and see what it does to that actor
on the feature itself, show me the first tab of the effects settings
one with all the checkboxes and icon path
what does st stand for?
how are you making the saving throw
and are you actually making a save or expecting a mod on the sheet?
the second one worked with the previous I had before, just add and no []
my main issue here is that the feat is working on pretty much every single npcs BUT the new ones I am creating
try with all modules off? I dunno, I feel like there are critical details I'm missing
yuck, I have like 90+ installed haha
how do you perform a saving throw, what do you click
it even shows on the sheet
find the culprit is 5 seconds out of your time and simple to turn back on your modules after using it fyi
if you do find the culprit leave dae on, as dae is the only module that will let this work
roger, lemme install it
Most likely this is due to the "when" of saving throws being evaluated π€ Effect values don't all have the same timing
that seems to be the case because this is the warning I get sent
also I tried installing Find the Culprit and it doesnt appear on my module list wtf
I just find it REALLY weird that it works on characters I had before, both with ADD and CUSTOM but it doesnt work on the 4 new npcs I'm creating
This for a class feature? Or an item or spell?
Have you checked that the effect isn't disabled?
a class feature
when on a current npc I have on the battlefield (or a starter hero) it works just fine
foundry build and dnd5e system versions as well as midi/dae versions?
lets clear the obvious problems
specially since they are saying find the culprit isn't showing up
Yea that's odd too
here you go friend
lets clear the first hurdles
Effects tab on the sheet
though you have v10 keys so thats a good sign
here you go my friend
midi/dae versions?
If you roll the save is it adding it in the formula?
yeah sometimes attribute mods in bonus fields don't show on sheets but show in the roll
specially custom sheets
Still would like to check
it is taking it into account
Just means the sheet isn't showing it
yeah, I think its just a weird interaction with your sheet module, I'm guessing thats dndbeyonds?
should I report that with Tidy?
oh thats tidy heh
what does the effect value on the effect ON THE ACTOR have for stuff, snippet that
not the effect settings on the feature, but the actual thing on the actor
if its done right, it should just be integers there I think
on the actor it says the same
I think we've narrowed it down to being a visual bug
Since the roll works fine
If you reopen foundry and look at the sheet
Does that fix it?
Certain things with AEs don't show up on character sheets
yeah I just wanna test the armor now, MANY thanks btw, I can deal easily with the visual bug by just ignoring it heh
but should I report it to tidy? lemme reopen foundry first tho
But if you use hit detection and things like that, you'll see things like rolled 15, hits 17
or something like that
Might just be a sheet refresh isn't being done
nope, not showing, but still tracking the increase in saves
humm, armor is not being tracked tho
You see this issue all the time in v9 with active auras pally aura fyi, I've just learned to live with the weirdness
maybe try rolling the feature even though it doesn't do anthing?
yeah, its not the end of the world, weird stuff that I wanted to report tho so it helps the devs
my baby is complete and it is working, it doesnt matter if it doesnt display T_T
For levels auto cover I left the debug true in midi - I'm going to release a patch release to fix that. For simbuls cover calculator there's a setting to debug line of sight, make sure it is disabled
yes it was - fix today
It looks like midi is timing out the save and so rolling for you. Can you dm me your midi settings and the actor that is having the problem?
I've done this several times in the past and honestly I'm getting tired of the hack. It requires inlining data/effects/macro json into the item macro and it just gets really complicated. I opened an issue to make this trivially doable.
Maybe I can find some time to PR DAE with a solution but honestly Mr. Posney is above my level as a Foundry dev π
Sneak attack really needs to be updated to use the new dnd5e hooks, so it can properly do critical damage.
I ended up solving the issue, I'm not quite sure what was going wrong in that stage, I meddled with so many settings. It's fine now, thanks for your worries!
Are you using DFreds CE? I feel like you could achieve this with pretty much a one-line macro if so
I am but I know very little about using it for automation, I was a CUB-er for a long time and only switched recently
What API does it have that would support early removal of an AE under special conditions?
I'm no coder but game.dfreds.effectInterface.removeEffect({ effectName: 'Rage', uuid }); β if you have a Rage AE that applies a second AE every round that tries to do this but is shut down by Special Durations that should do the trick? It's still a bit hacky but not super complicated
(you could make the second AE in CE also and invoke it with an OverTime macro call, or Effect Macro would be simpler)
what are you trying to do with the rage? Divine fury?
theres already an automated divine fury in v9
Nah just have the rage auto expire if the barb doesnβt hit or get hit
I actually amend this rule and have it where they just need to see an enemy to maintain rage.
I think cheesy javelin throws are metagamey and dumb so I just let them keep the rage up and play more realistically.
Yeah that sounds reasonable. Even harder to automate though⦠(but no doubt it could be done with some advanced macro using detection modes etc lol)
It wouldn't be too hard to keep track of a token making an attack or getting hit
I don't automate it, I use the best processor at the table, our brains
I don't think it's worth automating however
however I do use an automated divine fury cause bugbear was kind to share me one so I figured I'd use it
My goal with automation is to avoid ever having to make manual rolls
beyond clicking a button to roll the d20
but I also have a special event that happens alot where the zealot barb gets to divine fury each attack sometimes so I use advantage reminder to make it work all the time when thats up
Yeah you can set it up with a second AE that expires on 1 attack or isDamaged, you check if that's on the actor at the end of the barbarian's turn and if it is you remove Rage effect, if it isn't you reapply it.
(regarding the rage expiration when you don't attack or getting damaged in a round)
Thereβs actually something neat about the interplay of these two AEs in this setup. One keeps creating its killer, who only gets to act if theyβre not distracted.
@glacial burrowAre you on v10? Easiest way to do it, would be by using the new DAE macro.createItem
Create the Item as you want it on the sidebar (you can put it in a compendium so as not to delete it by mistake).
Create a feature that will be adding the Item on the actor when used.
Make sure to define Target as: | | Self in the 3rd box if it is to be applied on the caster.
Create a DAE on the feature with a macro.createItem | Custom | and drag the created Item from the sidebar directly on the effect value field (if you put it in a compendium after you create it, drag it from the compendium instead).
This way it will automatically fill in the Item's uuid.
On the DAE duration tab, give it the duration you want, e.g. 2 rounds 1 turn for deletion after 2 rounds when the caster's turn ends (iirc)
If set up correctly, using the feature will create the Item automatically on the actor and delete it when the duration expires.
yes v10 very good information I will try that thanks
@violet meadow Hey buddy ol' pal. I have this wishlist concept that I have no clue how to do, its not even really midi related I don't think. I want a way to efficiently track the spell Contingency and Oil of Sharpness choices. My thought was to have an item macro that rolls when the items are rolled that create an active effect on the targets. Heres the hard part: I want an open dialogue box for the user to write anything they want in there. And then that dialogue prompt would be used to enter into the "Force display on token" field on the active effect. Either that field or the actual name of the effect field but I suspect there is a character limit for name field. Wouldn't even need to create the whole active effect, just edit the one I have on contingency and oil of sharpness. Would this be possible?
obviously v9
onUse macro on the Item ```js
content = <form> <div class="form-group"> <label>Label to be added: </label> <div class="form-fields"> <input name="fillMe" type="string"> </div> </div> </form>;
new Dialog({
title: "User Input",
content,
buttons: {
ok: {
label: "OK",
callback: async (html) => {
const userInput = html.find("[name=fillMe]").val();
const effectData = {
label: args[0].item.name,
icon: args[0].item.img,
flags: {core: {statusId: userInput}}
}
await token.actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
}
}
}
}).render(true)
Does this work?
edited: missing }
Seems to work perfectly for me, If I wanted it to replace the name what would I change?
probably the label: line?
Change the label to whatever you please
If its a string put it in ""
I mean if I wanted the userinput in the name instead of force imag box
Ah yes change it to label: userInput
duration: args[0].item.duration?
You will need to be explicit when you define the duration. duration: {seconds:3600} for instance
let me double check that
ok wasn't sure if we could pull the duration from the item
its ok if I have to set it in the macro that way, I really only see using it for two things
yeah but I could just set it in there like you wrote, its only 2 items they wont' change
And this on the Effect
So you will need to make the conversion or let DAE do it (it does it automatically when you add an effect through DAE)
When you create it in a macro you need to structure it properly
does it matter where you put them in the list there, as long as its with label/icon/flags in some order?
like I'm trying to insert duration in there somewhere with the 3 existing ones
Yes its fine. Create an Effect, and log it in console to check the structure
Easiest way, grab Developer Tools module and then a small >_ will be shown on the title bar of all documents. Clicking on it, it will log it on the console.
Or do in console with the token selected _token.actor.effects.find(eff=>eff.data.label==="Name of the effect") hit enter and it will log it
What if I wanted the input appended onto the end of something like "Oil of Sharpness: userInput" is this where I'd use that dollar sign code?
label: args[0].item.name +": "+ userInput
Perfect, thanks a ton bud!
I also edited the prompt so instead of duration, it says "Which Weapon", and for contingency it says "What is your contingency event"
Oh yeah forgot it 
Wizard hasn't hit level 5 yet, but oil of sharpness is in the party's inventory so thats gettin used for sure
For future reference this also does it: ```js
label: ${args[0].item.name}: ${userInput},
@rugged sequoia
Its a two party setup. Step 1, make an item macro on use macro with this for its contents(take note of the unique name used in this code for future reference:
game.macros.getName("AutoBash").execute(args[0]);
Here is the tricky part. You need to make a folder macro named "AutoBash" that is Execute as GM(probably requires advanced macros). I have a few useless lines in this macro cause I use it for a ton of things:
let results;
const attacker = canvas.tokens.get(args[0].tokenId);
const {object: target} = await fromUuid(args[0].hitTargetUuids[0]);
const skilltoberolled = target.actor.data.data.skills.ath.total < target.actor.data.data.skills.acr.total ? "acr" : "ath";
results = await game.MonksTokenBar.requestContestedRoll({
token:attacker,
request:'skill:ath'
},{
token: target,
request: `skill:${skilltoberolled}`
},{
silent:true,
fastForward:false,
flavor: `${target.name} tries to resist ${attacker.name}'s shove attempt`,
callback: async () => {
const attackerTotal = results.getFlag("monks-tokenbar", `token${attacker.id}`).total;
const targetTotal = results.getFlag("monks-tokenbar", `token${target.id}`).total;
if (attackerTotal >= targetTotal) {
if(!game.dfreds.effectInterface.hasEffectApplied('Prone', target.actor.uuid)) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Prone', uuid: target.actor.uuid});
ui.notifications.info(`${attacker.name} shoves ${target.name} to the ground`)
}
}
else ui.notifications.info(`${target.name} resists the shove attempt from ${attacker.name}`)
}
});
if you want it to be hide, just change AutoBash to "Hide" and change the name of this second folder macro to Hide. Thought players like to drag shit to their hotbar so probably wise to make your macros like these named different than abilities.
one thing you will need to fix is that my macro is using backticks around the target's skill attribute cause of weird js shit. So when you edit that to just be prc surround it with the usual ' and not backticks.
Also you will need to change the target of the active effect to self instead of target and on top of that you may need to create an active effect in dfreds for it. If you use cub I got nothin for ya, I dunno how to make stuff for that module. @rugged sequoia
also if you are on v10, replace all data.data with system
and if it doesn't work, come back here and someone can troubleshoot the v10 issues
you will need to enable players ability to use monks requests in the mtb settings
the backticks can stay -- they define a "string literal" and are very very useful
oh I thought they only were needed if the red dollar sign codes were gettin used my bad
Template Literal/String, my bad on the jargon: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
I like the flavor text. I bet you could create a small array for some additional flavor text. Your players probably wouldn't notice it. I mean they might if you put in some really funny stuff.
Is it possible to change the DC of the item after using the item? For example I'm using a spell with DC 12 and I want the game to ask me "Raise - yes/no" If I click yes it goes to 15, if no, then it stays as is?
the last flavor never displays I have no clue why
I even stopped changing it in all my iterations of the setup lol
When you call a macro from Monk's Token Bar should it be Macro Execute or Macro Execute GM (*)? With the appropriate permissions granted to to the Macro folder of course.
you don't use an ae for that
are you trying to replicate the other thing someone showed you, or my thing?
the really short macro is an item macro, set to on use on the actual hide action(or whatevers on the character sheet, hide, bash, shove, taunt whatever)
then the word usewd in that macro is the NAME of the folder macro of that second long macro I shared to you, thats a folder macro, which is accessed by the lil folder icon to the left of the hotbars
I started simple and created a macro from Monk's Token bar and saved it. I was then attempting to call it using an Active Effect on a Active Ability.
yeah you can't really use mtb's stuff
Gotcha
you could if all you wanted to do was the skill challenge
but if you want to also give the hidden active effect on success, then you need my setup
oh if you have midi, you should install item macro
item macro makes midi alot easier to manage macros like mtb's macros
instead of making an ae, you'd put the macro IN item macro on the item, and then at the bottom of details theres a lil + where you setup an on use macro and call it ItemMacro
Installing now. And you are correct. I was looking to have the player character have a hidden active effect on success.
my examples above you just need to make compliant with v10, follow instructions carefully, and adjust the two attributes called in the longer macro, and obviously adjust the name accordingly since the example I gave you is for shove/bash
the first macro calls the second macros name so when you save the folder macro remember its name
oh shit man, I just realized something, you don't need to do two macros
your buff is on self, the whole point of execute as GM is to get around permissions
you have permissions to your own token, so take the second macro I gave you, and make THAT the item macro on use
however, you still need to make it compliant with v10, and you need to change dfreds lines so that its applying to SELF and not the TARGET.
everyone always says its just changing datas to system, but there could be another thing in there, just share it in macro polo if it doesn't work in v10 still after that. You actually don't need to skilltoberolled stuff cause you are just doing prc vs ste
Thanks a lot @vast bane MotoMoto. I will take a look at this later. Killing time between meetings. Off to a demo of Cisco Intersight.
Not sure what I am doing wrong.... I have a MAT tile that is triggering an attack.. I have the attack setup for midi-qol to integrate in the tile... but it doesn't auto roll any of it? is it a midi issue or a MAT issue? The attack happens, got that figured out, It just doesn't automate the attack.
huh... apparently something didn't stick when I tried to save, its working now
but there is a very long delay in the results
like 30 seconds
that might be a setting though so let me check
probably the player has a reaction
Yeah
or you don't have a save module installed so midi is timing out the chat message and rolling the save?
but I need to prompt for reaction >_>
I had it set to 30 seconds for reaction but didnt prompt
derp
can you change the DC of an item after using the item?
If you go before save, probably you are OK. I haven't tried it. What's the case?
I'm doing multiattack (for my minions ofc :D). And I want to make a dropdown list for when my minion attack to chose how many of them are attacking at once - and add 1 attack bonus, 1 DC and multiply DMG for every minion attacking
Add an AE for the DC before the save to the sum of the minions attacking.
Sounds suspiciously like MCDM rules, which I know somebody in here was working on a macro for, don't remember who
the problem with this is that monster don't always use their DC - sometimes their skills have const DC
Wasp probably?
same with damge - I can't multiply damage with AE
Looks like it yeah
You are going to create different ones based on the attack Type
Yeah damage will need a hook, take a look at what bugbear just linked
the I would have to create them for every monster I create :/
I meant in the macro you already use. I am not sure about your workflow, so I am just guessing π π€·
Isn't that the same for every monster?
for example Giant Spider has Spell DC10, but to avoid his Web you need to make STR Saving throw of DC12
and it's a const DC on that particular skill
so I would like to make a macro that whenever a Minion attacks with a skill that needs a saving throw (so far I know how) THEN I can chose to increase DC of that spell
I thought that I can change it with setProperty(workflow...
but It does not cooperate
Do you want to have a Dialog to input the spellDC or will it be predefined based on Items used?
I want a dropdown list with options 1/2/3/4 - 1 does nothing, 2 ups the DC by 1, 3 by 2 and 4 by 3
"how many minions are atacking"
"each gives +1 to item DC"
Try this in an ItemMacro | Before Save to see how it works (works as a GM) ```js
const options = ["1", "2", "3", "4"].reduce((acc, a) => acc += <option value="${a}">${a}</option>, ``);
const content = <form> <div class="form-group"> <label for="minionNumber">Choose 1 to 4</label> <div class="form-fields"> <select id="minionNumber">${options}</select> </div> </div> </form>;
const dialog = new Promise((resolve, reject) => {
new Dialog({
title: "How many minions attack?",
content,
buttons: {
ok: {
label: "OK",
callback: async (html) => {
const userInput = html[0].querySelector("#minionNumber").value;
if (userInput > 1) {
const value = userInput == 2 ? "-1" : (userInput == 3 ? "-2" : "-3");
const effectData = {
label: "Minions' manipulation of target's save and AC"
icon: "",
flags: {dae: {specialDuration: ["isSave", "isHit"]}},
duration: {rounds: 1},
changes: [
{"key": "system.bonuses.abilities.save", "value": value, "mode": CONST.ACTIVE_EFFECT_MODES.ADD, "priority": 20},
{"key": "system.attributes.ac.bonus", "value": value, "mode": CONST.ACTIVE_EFFECT_MODES.ADD, "priority": 20}
]
}
await args[0].targets[0].actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
}
resolve(true);
}
}
}
}).render(true);
})
const manipulateTarget = await dialog;
Yes, but it lowers the saving throw of the target π
oh
yes it does!
I can do attack hit same way (-AC)! Now just need to multiply damage for every minion - proably with Damage bonus macros
Yes it sounds quite plausible!
In the same Dialog you can create the AC reduction as a second change, but also include another special Duration of isAttacked iirc.
You could give them vulnerability
hmmm
but you can't give vulnerability x3
there was an option to change the multiplier
at least i think you can't
let me check
Hmm its in the Midi settings, so a universal change but hmmm π€
Yeah you will need to use the linked macro from tposney for multiplying the damage
yeah writing it now - thanks
Change the AE created to have a ```js
flags: {dae: {specialDuration: ['isHit', 'isSave'] } },
yeah but when to trigger it
After targeting complete π€·
ok there is one bug
no matter what i choose
he always creates an effect with -3
Oh yes. Edited it
one less =
OK now it should have everything included, except for the damage part
yeah doing damage now
Hey @vast bane I hate to be a bother. I attempted to recreate your method without altering the macro except for that data part. I created a new item, Autobash and assigned the short Call Macro and told it to Run As GM. Then created a folder in Macros called Autobash and created the longer macro with the same name. When ever I run the macro I get
let results;
const attacker = canvas.tokens.get(args[0].tokenId);
const {object: target} = await fromUuid(args[0].hitTargetUuids[0]);
const skilltoberolled = target.actor.system.skills.ath.total < target.actor.system.skills.acr.total ? "acr" : "ath";
results = await game.MonksTokenBar.requestContestedRoll({
token:attacker,
request:'skill:ath'
},{
token: target,
request: `skill:${skilltoberolled}`
},{
silent:true,
fastForward:false,
flavor: `${target.name} tries to resist ${attacker.name}'s shove attempt`,
callback: async () => {
const attackerTotal = results.getFlag("monks-tokenbar", `token${attacker.id}`).total;
const targetTotal = results.getFlag("monks-tokenbar", `token${target.id}`).total;
if (attackerTotal >= targetTotal) {
if(!game.dfreds.effectInterface.hasEffectApplied('Prone', target.actor.uuid)) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Prone', uuid: target.actor.uuid});
ui.notifications.info(`${attacker.name} shoves ${target.name} to the ground`)
}
}
else ui.notifications.info(`${target.name} resists the shove attempt from ${attacker.name}`)
}
});
Even just running the macro from the folder give me the undefined error message.
You are supposed to run the initial (shorter) macro as a MidiQOL item onUse macro
And the longer macro you attached, needs to be execute as GM.
This section?
Click the + on the side of On use macros
Type ItemMacro (case sensitive) and choose After Active Effects
You then paste the small macro in the Item Macro that you can see in the title bar of the Item in the screenshot
Like so?
This one not Execute As GM
Gotcha. This one.
Yes
if I want my const inputDamage = userInput inputDamage to be userInput - 1 ? how do I write it?
const inputDamage = userInput - 1;
```?
(the semicolon does not do anything)
yes but without it my macro spills errors
Does it? Or is it just your editor? It does nothing except make code more legible unless you aren't using linebreaks.
Does data.attributes.init.bonus only roll once in v9 of Foundry? Setting up a gift of alacrity and it appears to always have the same number roll unless I re-apply the effect.
The field only takes integers, so that's not unexpected.
oh bleh
Guess I'll just make it an effect macro and have it re-apply itself at the end of combat.
Personally I have circumvented the entire initiative system
and I just stash initiative bonuses in flags.world.initBonuses
makes sense
Macro on the repo using Requestor for this if interested.
I'll take a look at it, thanks
I have it set that the effect goes away when the actor starts its next turn. token data is not linked but all the actors lose the effect when one of them starts its turn
What's the macro you're using?
Is that an Aura?
also for some reason one of the dummies saved with a -30?
it's just a module that highlights whose turn it is
No I mean the Effect. Is it an Aura effect?
oh no. the effect doesn't actually do anything aside from create a chat message with the first macro
and it gets applied to (or is supposed to) any target that fails the saving throw
Can you export the Item and send it to me? Much faster to troubleshoot
I changed it from the macro to a special duration and it still deletes them all. yeah let me do that
ok so to contain it to 1 macro
I wrote a line to update "other" damage on the attack
my minions wont have any "other" damage on their own (cause they're minions)
sadly my "killing Minions" macro needed other workarounds to let my players update enemy tokens (The macro creates CE with Effect Macro that updates the HP and deletes the Effect)
but yeah - my minions are finally ready to play
You have a duration on the Item's details of Instantaneous.
Either change it to empty or put something like 2 rounds to be safe
I would have never caught that lmao
thank you!
2 spells completed this day. a slow one unfortunately :/
If you want that macro to create an AE on the enemy tokens as a player, you will need to use the MidiQOL socket to execute as GM the createEmbeddedDocuments
can an AE created with macro can have EM?
Yes, its just a flag
Create an AE on an actor as you want the final product to be, with the EM and DAE and whatnot, grab the effect in console effectData = _token.actor.effects.find(eff=>eff.label==="Name you used").toObject()
and you have the effect structure ready
MidiQOL.socket().executeAsGM - and then use this to create it right?
await MidiQOL.socket().executeAsGM("createEffects", { actorUuid: actor.uuid, effects: [effectData] });
In the Dialog macro we created, replace the createEmbeddedDocuments with this one and players will be able to create on non owned tokens the DAE
Mind the actorUuid that needs to be the target's one
awesome - but tposney said that "macro.actorUpdate" will work from players in next DAE version - so then I can restructure it so it won't need a EM
Oh I missed that. Good to know
ill still need executeASGM to create an effect with macro.actorUpdate - but then it will be a simple effect with an update on hp
Do you mean that a DAE with macro.actorUpdate that is transferred to a target actor that the player has no permissions on, will be able able to affect that target?
if you'll add it to an item that creates that AE on a token
And do you have no issues with the forEach loop not being asynchronous? You are using a lot of async functions in there and especially the item.update for the Item that you immediately use in the completeItemRoll π€
Why don't you do a for loop that is easier to handle?
You could even make the forEach "async" too, but that would need another function and a callback
Thanks @violet meadow and @vast bane. I made some modifications and was able to get it working. You are correct @vast bane. I was able to add the main macro to the item since I am applying the buff to self or hider in this case.
const hider = canvas.tokens.get(args[0].tokenId);
const {object: target} = await fromUuid(args[0].hitTargetUuids[0]);
const skilltoberolled = target.actor.system.skills.ste.total < target.actor.system.skills.prc.total ? "ste" : "prc";
results = await game.MonksTokenBar.requestContestedRoll({
token: hider,
request:`skill:${skilltoberolled}`
},{
token: target,
request:'skill:prc'
},{
silent:true,
fastForward:false,
flavor: `${hider.name} attempt to hide from ${target.name} `,
callback: async () => {
const hiderTotal = results.getFlag("monks-tokenbar", `token${hider.id}`).total;
const targetTotal = results.getFlag("monks-tokenbar", `token${target.id}`).total;
if (hiderTotal >= targetTotal) {
if(!game.dfreds.effectInterface.hasEffectApplied('Hidden', hider.actor.uuid)) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Hidden', uuid: hider.actor.uuid});
ui.notifications.info(`${hider.name} Successfully hides from ${target.name}`)
}
}
else ui.notifications.info(`${target.name} has keen eyes and ${hider.name} was unsuccessful in hiding`)
}
});
I created a Convenient Effect called Hidden. It applies advantage and use Token Magic Distortion effect.
Curious why do I need this constant?
Why can't I just specify stealth here
request:`skill:${skilltoberolled}`
For example
token: hider,
request:`skill:ste`
So the original was checking if athletics or acrobatics was higher and then would go on using that one.
For you there is no reason to do that.
Now you are checking if stealth or perception is higher and then use...
So I can lose that line.
Yeah it makes no sense in your case
I left that line in even in my other setups that use it just cause I suck at making macros and don't want to lose any useful code. I just edited the skill: entry and left the const line in lol.
I'm attempting to use MidiQOL.TrapWorkflow to handle the cold damage from the Ice Knife spell, but when the template location is included...
let loc = target.center;
new MidiQOL.TrapWorkflow(tActor, tItem, [token], loc);
I get an error that TemplateClass.fromItem(...).toObject is not a function
You declare more than once the loc variable
You could post the whole macro if you don't find a solution
If you don't mind someone else already doing the work for you, the DDB importer has a pretty good Ice Knife item macro already: https://github.com/MrPrimate/ddb-importer/blob/main/macros/spells/iceKnife.js
ugh - why did I not know this existed - thanks!
what is the simplest way to delete active effect via "Effect Macro"?
@gilded yacht Would it be possible to add an option in createitem dae that we can set to have the item remain permenant if the ae is removed?
My use case is to create an unidentified item template. I have a generic Unidentified Item with the createitem ae set to apply on attune/equip. Once its attuned the new item appears in inventory and I'll use effectmacro to delete the original item/ae, but this also removes the newly created identified magical item. Is there anyway to make this work with createitem ?
It kinda defeats the purpose, does it not?
Use warpgate instead π
But I see how it would make things easier π π
won't warpgate create a permenant dismiss on the item?
plus warpgate is a macro, createitem is insanely easy to setup
it would trully make the unidentified item aspect of dnd alot simpler honestly
isn't it also like one of dnd5e's top issues/feature requests?
i might pull in a v2 feature of warpgate into v1 that would allow a GM to add a mutation that is "invisible" to the player
I love warpgate, but this createitem thing is just so easy to use, no macro work, its just drag and drop, so it has so much potential.
sure, but for non-midi users it could be helpful
or midi if it was wrapped into midi's api
today's my dabble day with v10 so fiddlin with some things. Figured I'd get that feature request in while I'm fiddlin around
i would be sure to log it as a feature request so its recorded
Can someone help me convert this to v9? Is it just the system parts that change back to data.data?
#1010273821401555087 message
Yes just data.data instead of system
actually it seems the system line isn't even needed
that const is kinda pointless for the macro, hehe
Ah yes π―
the target is not working right in v9, I suspect I have to revert to the old macros entry there for the const
just try quickly const target = await fromUuid(args[0].hitTargetUuids[0]);
this is the error I get before trying your thing:
let results;
const hider = canvas.tokens.get(args[0].tokenId);
const {object: target} = await fromUuid(args[0].hitTargetUuids[0]);
results = await game.MonksTokenBar.requestContestedRoll({
token: hider,
request:'skill:ste'
},{
token: target,
request:'skill:prc'
},{
silent:true,
fastForward:false,
flavor: `${hider.name} attempt to hide from ${target.name} `,
callback: async () => {
const hiderTotal = results.getFlag("monks-tokenbar", `token${hider.id}`).total;
const targetTotal = results.getFlag("monks-tokenbar", `token${target.id}`).total;
if (hiderTotal >= targetTotal) {
if(!game.dfreds.effectInterface.hasEffectApplied('Hidden', hider.actor.uuid)) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Hidden', uuid: hider.actor.uuid});
ui.notifications.info(`${hider.name} Successfully hides from ${target.name}`)
}
}
else ui.notifications.info(`${target.name} has keen eyes and ${hider.name} was unsuccessful in hiding`)
}
});
I'm going down my old macro checking for some sort of syntax issue
in v9 I think that await fromUuid(args[0].hitTargetUuids[0]); was giving you the Token5e. In v10 it grabs the TokenDocument5e so you are going up to the Token5e by grabbing the TokenDocument5e.object
with your change above
of course... edited. Lose the {} around target...
I think Monks v9 needed a Token5e π€·
dont remember now
works perfectly now thank you
ok I've removed CE dependency - so the macro creates both effects (and using EM removes them). I have no idea how to rework it to make it async, but it works (for both player and DM) in the current form
Are you executing this as an onUse on an attack ?
no - it's a World Macro that is triggered via World Scripter Macros
loads on Foundry startup
Hooks.on("midi-qol.RollComplete", async function (workflow) {
for (let target of workflow.targets) {
Just watch out for timing issues with async hooks.
"prorioty": "20" π
XD still works π
Yeah it can be left out entirely
ok so I guess (and hope) - the final version
I mean if it was working no need to change anything!
It's still working π
item.update({"data.damage.parts": [[workflow.damageTotal - target.actor.system.attributes.hp.max, workflow.damageDetail[0].type]]});
Change the data.damage.parts to system.damage.parts
you are on v10 after all π
Is it possible to have a set of features globally added to every sheet that will ever exist in a session on creation?
probably not a midi question lol
I want to add my custom shove, taunt, and hide actions to every sheet but I got alot of shit and I make actors practically weekly and don't want to have to remember to do this.
world script
would the world script work with the module worldscripter or is it one of those odd hooks that don't?
anything after 'ready' is fair game
well, ready is fair game, you just dont wrap that one in a hook, cause they are all run on 'ready'
module
whatever macro you throw inside that compendium start when Foundry table launches
so you can create a macro that checks if your PC have itemXYZ -> if not -> create
I suppose I could also run a macro that adds it to all actors currently created, and then just have a starter template actor in my sidebar for all new guys too
Semi automationβ¦ I wish someone would fix Zhellβs famous Font of Magic so it works with pact slots, as it should π
GTFO
I bet itβs v10 only thoβ¦ goes off to look
That is awesome, thanks. Iβll see if I can retrofit it into my vintage v9 game
Hopefully itβll only be a couple of weeks before v10. Itβs all coming together now we have Simbulβs, and AA is limping along
I am surprisingly quite content. Currently dealing with some backend table work atm, little annoyed at why foundry decided to include the add button in the scroll section of tables...really annoying but living with the inconvenience.
so once you are making a large table and need to add more options onto the table you have to constantly scroll to the top to hit the add button, feel like the scroll doesn't need to, or shouldn't, scroll the top column. I feel like its actually a typo in their code.
just drop the document in the table
Its text that I'm adding atm
thats an already made one
am i crazy to think that usually the master row stays stationary in tables like these?
Just seems like a flawed ui
I know once I'm done with the data entry this won't matter to me anymore but still...its quite annoying while doing text tables
@violet meadow is Spirit Guardians working properly in v10 with AA now? I havenβt tested it
Ah that's a nice idea. On it
I blame Moto for not giving me something to do and I went on testing stuff I shouldn't be doing π
How bout a macro, or item that when you roll it, it turns the next attack you make into an attack that removes the attribute mod from the damage portion of the attack, to mimic two weapon fighting penalty for the bonus action?
nah this is too stupid of an automation, it'd be a waste of time
I got a macro for that. It should be a module but I got bored
And still am...
I genuinely don't really have anything thats top on my list, everything works for my party they are all freshly 9, their 10's look easy
Spirit Guardians MidiQOL version correct? Testing in v10
Yikes Iβd better v10 test the Twilight Sanctuary you made for me too
I was going through Monks API to see why the callback is not working for players
I would not automate Twilight sanctuary at my table cause I want them to suffer as much as I would with that feature lol
Its pretty straightforward if you just prioritize Frightened removal, then Charmed, then HP
It doesn't even need to pop a Dialog for you to choose from
Now if the players want all the options on their fingertips, they can do it manually
Iβd prefer they didnβt
the arcane deflection ability wouldn't work for me in v9 fyi, but the user that has it, has df manual rolls so we're using that as the stopgap to make the reaction on saves work.
I couldn't get the optional.name.macro thing to work against saving throw attacks
oh wait, I could against the save, but on v9 the ac option is not available, THAT was what caused me to stop.
Ah is it not v9?
its not that its v9 only, its that its Fast Forward only.
Seems fine with v4.0.23 of Mr Primates Active Auras
the ac optional is fast forward only
Ah yes we had discussed that again iirc
Who's Dave?
so I had a choice of setting up 2 features, 1 that uses the optional for save defense, and one that is basically a clone of shield, and having both use the same resource, OR just give up, and thats what I did lol
Steve's nemesis
@violet meadow did you end up making a Cloud Rune?
combined deflection with save
Oh shit. Where's that let me check. The target someone else correct?
I didn't like how the full name cut off in the window so I trimmed the optional name down
Was curious how it would work, the GM has often already rolled damage before you get to use it π€
I thought about making cutting words a 30 ft aura that adds a cutting words reaction to all allies sheets, that way it would trigger on attacks, but then I lost it affterr looking at all the other things cutting words can be used on and just said fuck it, and it'll stay manual lol
suppose I could put an advantage reminder on enemies in the aura to reduce damage by a bardic too, that would cover on damage, but saving throws would be hard, probably same advantage reminder solution.
@violet meadow We often use Cloud Rune to redirect crits to our pally who is wearing adamantine and is immune to them. Itβs a tricky one!
Hell, I could probably just make it all an active aura advantage reminder
Yeah all these would work as Moto says. Aura that warpgates the Reaction feature on allies. They trigger reaction, without using theirs but applying the reaction used DFreds effect on you
in v9, I'd uswe createitem in v10
yeap
But still it needs the changing targets to be handled a bit better in MidiQOL as a reaction
I wonder how unruly a 30ft hostile aura would be, while always on
That would be allies only
I'd honestly probably just make it 100% hostile since I don't fast forward and use advaantage reminder, I could just put all the debuffs as reminders on attack/damage/saves
then if they say they are using cutting words, I will just reroll with the button pressed in the reminder
Unruly? AA? Neverβ¦
or press it if they say it in time
I imagine pally aura is probably the worst it gets cause you aren't walking around a ton of hostile creatures outside of combat
Babonus Auras for paladins is the way to go
No reason for creating an AE on targets
Yeah I think Iβll cave in and do this, even though itβs invisible
if I ever go to v10 sure, but I'd probably still do advantage reminder just cause I know it
People do like some visual feedback when theyβre in the aura
I will use active auras before babonus for the same reason I would use dfreds over cub, sure they are equal and great in their own rights, but active auras comes with tons of premades and midi synergy.
That's all it needs
I use it for my paladin. Full MidiQOL compatible no worries there
And no hiccups
Active Auras for stuff that need macros
That comparison gets me⦠just why
but why have both installed if one can do it all
Needs a filter π that's the easiest one π
But why does it need a filter?
Because AA is resource intensive if you need it most of the time for the Paladin's aura of protection only!
Babonus is like a breeze (not even) compared
AA interacts with the DB
not gonna lie, this one kinda has me pondering to try it out in v10, but it definitely needs a visual cue otherwise thats a no go for my table.
BAB does not
if you have a choice of equal functionality, pick the one that does not hammer the DB
db in this case is database?
yes
or dave and busters?
you can always create a Token Auras on the Paladin.
I dunno, in my v10 build, with the momvement animation off, aa runs pretty damn slick
pally aura I mean atleast
in a live game it will be heavier, regardless, AA is at least an order of magnitude more intensive than BAB
they need to make that an option in core foundry cause that improves so much on performance if you remove movement animation
it is very likely your laggy token movement is due to your active modules
But I love Token Ease
The movement animation?
I've yet to see a downside to it
active as in "does things when things move"
Think about a token moving with a light source and an Active Aura which affects creatures in its path 
It makes sense that it is lighter with no animation
my guys come from roll20 so this was actually not that big of a deal to change to
I got a guy that plays via a phone 50% of the time and another guy that plays on a 2006 gtx 220 graphics card so anything I can do to improve performance is amazing
dropping AA would be one
Our GM uses Starlink now and if his connection lags a bit, all hell breaks loose with AA π
Now... to use Template Macro with Token Attacher to emulate an Active Auras solution π
EM, Babonus, TM. All you need. π
DM obvs
Oh you can create/attach Doors all around the edge of the aura to make something happen when they cross the threshold, just to put that in there too!
How long before we get Tile Macro and Zhell takes down the Monk monopoly?
That's... that's in TM already.
I know but...
facepalm now we are back to AA computation/updates on move!
Note Macro
my biggest lag impact is probably my map sizes, and DSN more than active auras I think
is this legit, cuase I really wish we had one π¦
but I like a proof of concept and then yeet it