#MidiQOL
1 messages Β· Page 100 of 1
Probably. I haven't used it at all, didn't have time. I will take another look
If you want to back burner it on your end, I'll try to give the wiki a run with a list of spells and what modules have automations for them.
Having at least a shareable file with linked content to git repos would be a good start
I was gonna do a table format document with columns for midi srd, midiqol, cpr, w15, crymic(pending permission), MrPrimate(pending permission) and then just put an checkmark if they have content for said spell
Kinda assuming if you published your module that that is permission to reference it thats why I'm not asking for permission from tposney/you/chris/w15 lol
If I'm mistaken I can get permission for those too heh
Well, I fixed the issue I have. Basically with the dbd importer fixed everything, specially with the auto macros.
let actorToken = canvas.tokens.controlled[0];
let magmasteelAxe = actorToken.actor.items.find(i => i.name === "Magmasteel Axe");
if (!magmasteelAxe) {
ui.notifications.warn("Magmasteel Axe not found in inventory.");
return;
}
let effectData = {
label: "Unstable Overheating",
icon: "icons/svg/fire.svg",
changes: [
{
key: `system.damage.parts`,
mode: 0,
value: [["1d8", "slashing"], ["1d4", "fire"]]
}
],
flags: {
"macro.executeAlways": true,
"macro.autoCheck": true
},
origin: actorToken.uuid,
disabled: false,
changesDuration: null
};
actorToken.actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
ChatMessage.create({
content: `
<div class="dnd5e chat-card item-card">
<header class="card-header flexrow">
<img src="${actorToken.actor.img}" title="${actorToken.actor.name}" width="36" height="36" />
<h3 class="item-name">${actorToken.actor.name}</h3>
</header>
<div class="card-content">
<p>Magmasteel Axe gains 1d4 fire damage</p>
</div>
</div>
`
});
effectData.changes.push({
key: `system.damage.parts`,
mode: 1,
value: [["1d8", "slashing"]]
});
let effect = actorToken.actor.effects.find(e => e.system.label === "Unstable Overheating");
if (!effect) {
ui.notifications.warn("Active Effect not found.");
return;
}
await actorToken.actor.deleteEmbeddedDocuments("ActiveEffect", effect.id);```
Appears to be giving me this error.
I'm trying to create this item:
Magmasteel Axe
Weapon (battleaxe), uncommon
This axe has 4 charges and regains 1d4 expended charges daily at dawn.
Unstable Overheating. As a bonus action while holding this axe, you can expend 1 charge to ignite it, causing veins of searing magma to light up across its blade. While ignited, this axe sheds dim light in a 5-foot radius and deals an extra 1d4 fire damage to each target it hits. When you roll a 4 on this extra damage, the axe erupts violently, and each creature within 10 feet of the axe must make a DC 13 Dexterity saving throw, taking 2d4 fire damage on a failed save, or half as much damage on a successful one. After the axe erupts, itβs no longer ignited.```
by creating a custom feature that allows the user to "ignite" the axe by creating an active effect on the user, which edits the axe to add an extra 1d4 fire damage. Once the 2d4 fire damage happens, I'm looking to delete the extra fire damage on the axe and remove the active effect. Here's what I have so far.
Well this seems to me sus ```js
let effectData = {
label: "Unstable Overheating",
icon: "icons/svg/fire.svg",
changes: [
{
key: system.damage.parts,
mode: 0,
value: [["1d8", "slashing"], ["1d4", "fire"]]
}
],
flags: {
"macro.executeAlways": true,
"macro.autoCheck": true
},
origin: actorToken.uuid,
disabled: false,
changesDuration: null
};
You need to update the Item
Warpgate mutate the embedded Item, to have an extra 1d4 of fire damage when the AE is added.
Give the AE a special duration of 1attack
Warpgate revert the embedded item to original state when the AE gets deleted
Ah I reread the description and its a bit different, but still doable.
yeah you are trying to put damage parts in an ae not an item
there has to be atleast 1 example on the warpgate wiki for this
Also the flags and the changesDuration are strange
isn't e.system.label suppose to be e.label?
that was a data that probably needed to be yeeted
that too
is this macro a hotbar macro?
cause relying on controlled and not a hotbar, can be..problematic
const mutation = {embedded: {Item: {magmasteelAxe: {'system.damage.parts': ["1d8", "slashing"], ["1d4", "fire"]]}}}
await warpgate.mutate(token.document, mutation, {}, {name: 'Unstable Overheating'})```
Perhaps something akin to this?
It's an ItemMacro
That error in particular is because you're using embeddedDocuments but not feeding it an array, I think Moto mentioned it
yeah you gotta put a combo of brackets
actorToken.actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
I wanna say its [{}] around the stuff following it
I just wrote in another language where arrays were different brackets, js are the square brackets right
Missing a [ but yeah
for your latest blurb, is item defined?
what is ```js
const damageParts = item.system.damage.parts
damageParts[0][0] = ${damageParts} + 1d4
I think the second line there needs a const in front
actually that second line feels like a paradox
It looks like Janner is getting the damage parts (which are arrays) and are trying to set an element in that array to... the entire damageParts array again?
damageParts are arrays of arrays but I'd just update the entire thing instead
const mutation = {embedded: {Item: {"Magmasteel Axe": {'system.damage.parts': [["1d8", "slashing"], ["1d4", "fire"]]}}}}
await warpgate.mutate(token.document, mutation, {}, {name: 'Unstable Overheating'})
can that be a dae item macro so that args on it mutates, and args off it dismisses the mutation?
or an effect macro, on creation and then on deletion heh
Magmasteel Axe
Aye, error evaluating the macro. Was intending for this to be an ItemMacro for use in an "Unstable Overheating" feature
Get it again. One more } needed
oop-
Though you are missing out the +@mod that way
Add it for the slashing damage probably?
Yup, that works!
You can add a macro onUse too, to make it auto revert when a 4 is rolled in the fire damage
Here's how I've set it up so far:
Turns out EffectMacro could be of some use here.
@gilded yacht have you checked at all the onUpdateTarget and onUpdateSource flags?
They don't seem to function for the last couple of DAE updates. I am on 10.0.25 currently
And then maybe if I put the feature in the Magic Item tab-
I can combine them both without having to take up more inventory space.
Sounds like a plan π
that could be the problem with hex/hexblade curse pike's currently tackling, I assumed he fixed those two flags
do we really need to step down to 23 again?
Nah I would wait for the update tposney mentioned. I am just waiting for it to test some MidiSRD Items
I saw that, but not sure how Chris sets up Hexblade curse. Might be the issue, but I think he was going another route and not using onUpdateTarget
I recall there being a method to use a directory feature via macro, and I used it for when a Astral Visage monk's arms appear. The radial force damage item would be used from the directory when the effect macro detects that the active effect for it has been created. I can't find it at the moment, but would it be possible to do the same, but for the effect deletion? And maybe have something detect when the axe rolls a 4 on its fire damage, and delete the effect when it does?
I think detecting a 4 would be world script territory or an activation condition/on use macro
is it the only d4 rolled?
Yup.
Ah, here it is:
const item = game.items.getName("Eruption");
const data = game.items.fromCompendium(item);
const fake = new Item.implementation(data, {parent: actor});
return fake.use({}, {"flags.dnd5e.itemData": data});
I could use something like that.
With MrPrimates Ice Knife macro, there are times when players use it on a large or larger creature where it seems to pick only 1 square to target of the creature and only people within 5ft of that square are affected. Is there a way to fix it so that it does all the squares around a large+ creature?
I dunno if thats even raw actually let me double check
is IT in this statement referring to target or shard?
Hit or miss, the shard then explodes. The target and each creature within 5 feet of it must succeed on a Dexterity saving throw or take 2d6 cold damage.
With that wording, I would actually say the radius increases with the size of the targeted creature.
The spell does not target a point, but a creature.
sometimes the automation works and it prompts everyone, other times it seems like it picks the top left square of a large or larger creature
The top left is the 'default', and then it's up to modules to "gather all the actual occupied grids"
ask me how I know
// Midi-qol "on use"
const lastArg = args[args.length - 1];
const tokenOrActor = await fromUuid(lastArg.actorUuid);
const casterActor = tokenOrActor.actor ? tokenOrActor.actor : tokenOrActor;
const casterToken = await fromUuid(lastArg.tokenUuid);
if (lastArg.targets.length > 0) {
let areaSpellData = duplicate(lastArg.item);
const damageDice = 1 + lastArg.spellLevel;
delete(areaSpellData.effects);
delete(areaSpellData.id);
delete(areaSpellData.flags["midi-qol"].onUseMacroName);
delete(areaSpellData.flags["midi-qol"].onUseMacroParts);
delete(areaSpellData.flags.itemacro);
areaSpellData.name = "Ice Knife: Explosion";
areaSpellData.system.damage.parts = [[`${damageDice}d6[cold]`, "cold"]];
areaSpellData.system.actionType = "save";
areaSpellData.system.save.ability = "dex";
areaSpellData.system.scaling = { mode: "level", formula: "1d6" };
areaSpellData.system.preparation.mode ="atwill";
const areaSpell = new CONFIG.Item.documentClass(areaSpellData, { parent: casterActor });
const target = canvas.tokens.get(lastArg.targets[0].id);
const aoeTargets = await canvas.tokens.placeables.filter((placeable) =>
canvas.grid.measureDistance(target, placeable) <= 9.5 &&
!canvas.walls.checkCollision(new Ray(target.center, placeable.center), {mode: "any", type: "light"})
).map((placeable) => placeable.document.uuid);
const options = {
showFullCard: false,
createWorkflow: true,
targetUuids: aoeTargets,
configureDialog: false,
versatile: false,
consumeResource: false,
consumeSlot: false,
};
await MidiQOL.completeItemRoll(areaSpell, options);
} else {
ui.notifications.error("Ice Knife: No target selected: unable to automate burst effect.");
}
Yeah, canvas.grid.measureDistance written like that just uses one point, and you're using the top left.
k, now let me make sure I'm using MrPrimates version now
I wonder if a find nearby can't be used
Probably. Got a function in babonus too
yeah this is ice knife from MrPrimates github
Just use MidiQOL.findNearby
no need to overcomplicate it. That always returns the correct distance no matter size
const aoeTargets = MidiQOL.findNearby(null,target,5,{includeIncapacitated:true}).concat(target);
Still having a bit of trouble with the Magma Axe
I've got this set up here.
Here's the On Creation macro:
const mutation = {embedded: {Item: {"Magmasteel Axe": {'system.damage.parts': [["1d8 + @mod", "slashing"], ["1d4", "fire"]]}}}}
await warpgate.mutate(token.document, mutation, {}, {name: 'Unstable Overheating'})
const itemData = game.items.getName("Eruption").toObject();
return effect.setFlag("effectmacro", "itemData", itemData);```
Here's the On Deletion macro:
```js
const itemData = effect.getFlag("effectmacro", "itemData");
return new Item.implementation(itemData, {parent: actor}).use({}, {flags: {dnd5e: {itemData}}});
if(mutation) {
return await warpgate.revert(token.document, "Unstable Overheating"); ```
The only trouble is that it doesn't revert the mutation or use the feature.
It mutates the Magmasteel Axe just fine, though.
Yeah you don't define mutation in the OnDeletion so never happens
Also you return before that π

For the on deletion just use the warpgate.revert line
const itemData = effect.getFlag("effectmacro", "itemData");
return new Item.implementation(itemData, {parent: actor}).use({}, {flags: {dnd5e: {itemData}}});
return await warpgate.revert(token.document, "Unstable Overheating"); ```
Oop-
The Eruption works now
I am a bit lost on what you're trying to do, but surely if you return you bail out of the rest of the macro
So get rid of the first one of the two returns
Ah, yup. That was it. 
await warpgate.revert(token.document, "Unstable Overheating");
const itemData = effect.getFlag("effectmacro", "itemData");
return new Item.implementation(itemData, {parent: actor}).use({}, {flags: {dnd5e: {itemData}}});```
is it ok if I put this in a github issue for MrPrimate to adjust his macro for future users?
after I test it
Yeah please test if walls block by default
Otherwise will need to fix that
Also, you mentioned about this before. Perhaps an OnUse macro or something on the axe that deletes the Unstable Overheating effect whenever it rolls a 4 on its extra fire damage?
yes. You can add an onUse macro as a flag in the initial mutation. After all it is a flag
And then it can get called as a regular onUse macro on the mutated Item whenever it's used
Hmmm, I don't think I can include Crymics repo till he submits his own list to me since I can't see his whole setup
Is DDB's automated stuff specfically only in that macro link I keep sharing? Does he keep things anywhere else?
Honestly linking just the macros isn't super helpful. Most of his stuff the module sets up
it requires some leg work but I've managed to pull off alot of his
Here's an attempt at that OnUse macro
// Check if the Magmasteel Axe is being used and rolled a 4 on its extra fire damage
if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
if (args[0].terms[0].results[0].result === 4) {
// Get the Unstable Overheating effect and delete it
let effect = actor.effects.find(e => e.label === "Unstable Overheating");
if (effect) effect.delete();
}
}```
like ice knife above
I have this flag on a character token in DAE, but perhaps I'm missing how to activate it.
Since you're searching the inventory
Nope. You will need to log the args[0] on your macro and check how the args[0].damageList lists the specific rolls
You are kind of shooting blindly up to this point.
Log the args[0] and go through them.
Both of these 2 make no sense π ```js
args[0]?.damageTotal === "1d4 + 4") {
if (args[0].terms[0].results[0].result === 4) {
Just the Item
It's just the item the actor uses
If its critical you would need to go into the damageRoll results and check the terms of the fire damage to have at least one 4
Damage total will never be a string
Yeah and it won't give you any information usable for the check you need
Always start by logging the args[0] on the macroPass you want to check what's up.
Then you can structure your conditions properly.
// Check if the Magmasteel Axe is being used and rolled a 4 on its extra fire damage
console.log(args[0]);
console.log(effect);
if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
if (args[0].terms[0].results[0].result === 4) {
// Get the Unstable Overheating effect and delete it
let effect = actor.effects.find(e => e.label === "Unstable Overheating");
if (effect) effect.delete();
}
}```
honestly I gave up on heartbeat, it just does not like midiqol
Yeah
in a live session its just awful to keep on

I do wish for it to update and fix that issue but till then its probably best midi users not run it with it
That module needs to add a null check on it's logic it seems
If it's not protected for null IDs
yeah, basically if you so much as sneeze with it enabled with midi, you get hundreds of those long red errors
MTB also adds to it
Sounds like the module would get this error with more than just midi
yeah, its on any token update, MTB handles the token health in my world so thats why it gets lumped in
It's expecting data that isn't always there in that hook
the second you shut off heartbeat then all the red spam goes away, I was gonna write an issue to them but its hard to sus out what module deserves the issue as a newb code junky like myself
It's heartbeat I think
effect is not predefined by MidiQOL so it will error out
Goes the other way around. It's defined later
oooh so move the console.log down
Turned off Heartbeat. Just getting this now.
if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
if (args[0].terms[0].results[0].result === 4) {
// Get the Unstable Overheating effect and delete it
let effect = actor.effects.find(e => e.label === "Unstable Overheating");
if (effect) effect.delete();
}
}
console.log(args);
console.log(effect);```
Is there an Unstable Overheating on the actor?
Yup
I think it was said the issue was the damage bit, which isn't a function. I just don't know what the proper function or way to do this is 
Scope π
Use ONLY this in your macro ```js
console.log(args[0]);
Check where all the relevant info you need is
Then create the conditionals
Chat GPT suggested to me yesterday to put an additional layer in so that warnings wouldn't error out with undefineds: So I added the top line here into my searches.
let effectNameFallBack = "Dual Wielder" // Define the name of Dual Wielder Feat
let effectName = actor.effects.find(e => e.label === effectNameFallBack); // Find the effect with the specified name
if (effectName) { // Check if the effect was found
effectName.delete(); // Remove the effect
ui.notifications.notify(`Removed ${effectNameFallBack} effect from ${actor.name}.`); // Show a notification with the name of the removed effect
} else {
ui.notifications.warn(`${actor.name} does not have ${effectNameFallBack} effect.`); // Show a warning if the effect was not found
}
Not helpful here
Sorry
The issue is that effect only gets defined in the if statement
Admittedly, I've been trying to use ChatGPT for coding help as well. Just goes to show you that AI really isn't all that advanced for coding yet.
But it's not reaching that
Yeah and is not needed at all at this point
I found that if I fed it the advice here from the smart folks, it could translate the parts I didn't understand from them well lol
If you delete the console.log(effect) you'll technically fix it
But the condition check just be to be fixed up m. Log out args and dig into the damage terms
Aye, I've got this, and I'm trying to look through the logs to find where the d4 for the fire damage is
if (args[0]?.isCritical && args[0]?.damageTotal === "1d4 + 4") {
if (args[0].terms[0].results[0].result === 4) {
// Get the Unstable Overheating effect and delete it
let effect = actor.effects.find(e => e.label === "Unstable Overheating");
if (effect) effect.delete();
}
}
console.log(args[0]);```
Chat GPT is also on like a 14 month delay on foundry vtt code too, if you tell it its wrong it will rewrite it with the v10 code though:
Here, perhaps?
Wow this table checklist idea is tedious
I think I'm scrubbing the table checklist idea for premades cause honestly, if you are this into the weeds with midiqol, you really should have midi srd and CPR. Thats all you need. in 3 months from now CPR should have all the non srd stuff and Midi SRD's about to drop a massive update anyway.
If anyones curious, this is as far as I got lol
Interesting though π
I was tempted to do an image and use a good editor instead to speed it up but an image is not searchable
I dunno, I think I will keep at it, but I need a break from it, and maybe readjust to a different format cause I do not like the github editor at all
Ok, word of warning, I'm a bit new to foundry. I'm trying to get midi qol to work. I've installed it and enbaled it for my world along with its dependensies. To my knowledge I should now be able to select a character and target a character/npc and roll against its ac and damage it and all etc.... Both characters here have a sheet and everything but its not working. Am I targeting wrong or not installing something correctly? I'm lost ;(.
I think that it would make sense for MidiQOL to introduce a companion module for Items automation setup, like what WIRE does.
We could all contribute to that one following some guidelines π€
We all have very different ways of doing things
I dislike DAE pass stuff for example
And just use effect macro instead
That is an issue of course π€
Have you turned on any automation in MidiQOL settings?
I didn't touch workflow, I assume thats where?
I'll let the experts help you, but a first step would be to go into the midi settings and workflow, and choose a quick setup pre-made, that best suits what you think you are going for (there are several options there).. then tweaking each of those tabs to fit the work flow that best suits your wants and needs
ok! ty!
After picking one, and testing some, come back with questions/ problems and the wizards here can help sort them out π
if i want to effect weapon attacks do mwak and rwak stand for melee and ranged weapon attacks?
Yep!
Thank you!
once you fiddle with things feel free to ask questions here about any settings or anything you don't like or don't understand, quick settings is a great setting to use when starting out. But try to ask about this stuff just in this thread, this discord doesn't really like midi taking up other channels spaces.
const imgToken = "/Player_Tokens/Grunka/Grunka_Topdown_Large.webp";
const imgActor = "/Player_Tokens/Grunka/Grunka%20Enlarged%20Solo.webp"
const item = game.items.getName("Primordial Eruption");
const itemData = game.items.fromCompendium(item);
const fake = new Item.implementation(data, {parent: actor});
const data = {
token: {
height: 1,
width: 1,
scale: 1.3,
texture: { src: imgToken },
light: {
color: "#ff9c33",
dim: 20,
bright: 10,
alpha: 0.5,
animation: { type: "torch", speed: 3, intensity: 1 }
}
},
actor: {
img: imgActor,
}
};
await warpgate.mutate(token.document, data, {}, {name: "Primordial Form"});
return fake.use({}, {"flags.dnd5e.itemData": itemData});
ui.notifications.info("Fiery Fists added to your inventory");```
Is there something I'm doing wrong here?
with renewed morale and a pep talk from a few I've actually resumed the new wiki entry for a table checklist of where to find stuff
Is it something youβre working on live, or are you compiling it offline and only publishing when itβs done?
I for one think the checklist would be super useful.
I plan on sending it to bugbear for them to copy it into the official wiki
I honestly feel that ultimately midi srd+cpr will cover it all given a few more months time and then this checklist will be obsolete
it can however have uses beyond the users, the authors can scan it and see what stuff has little representation and possibly focus on covering the gaps
I'm shocked animated objects has no premade yet so far in my run of it
its shadow banned at my table so I never bothered to look lol
In a macro, within midi's workflow, how would I target whatever creature aside from the one that rolled the item who's in the space of the creature who rolled the item? Like, I'd like, when the item is rolled, for whoever else is in roller's space to be auto-targeted so the player can click the damage roll in the chat card without worrying about targeting.
water/air/fire elemental feature?
@violet meadow
I'm still a little confused as to how to put this into code. How do I detect if the result of dice 1 is 4?
replace enemy with creature if it hits allies
That's not in a macro π
I kinda assumed, poorly, that you were only trying a macro cause you didn't know about that
No I'm wanting it in a macro because I want the targeting to be automatic.
ok but just to be clear, mine is here for the item itself
Not sure what you mean by that?
when my cleric rolls their turn undead with it set this way, it auto targets the undead that are in the same square as him and does the whole items effects to just that token on top of him
this type of item range/target requires a specific midi setting to be set right then you will auto target and apply shit to them
What setting is that?
this setting has issues on levels maps I believe so beware of that
I think it needs levels auto cover to function right with elevations
or the elevation distance checker on in the optional rules in midi(but will still not know tiles block in levels)
What does that setting really do? I definitely don't want all ranged attacks suddenly auto targeting. I don't even know what that would mean.
honestly it literally makes what I just shared work, otherwise it does nothing when the targets set that way
That setting is very confusingly named, then. I don't really see any relationship between the setting and the behavior you're describing XD
it makes aura like instant effects work with midiqol
examples:
turn undead, sword burst, word of radiance, thunderclap
I'll give it a try, thanks!
Would I need "Ally" instead of "creature" to omit the caster itself?
The bottom checkmark here will make it look at height of tokens in the same square as it:
the special in range is what blocks the caster
If you set it to creature or ally, a range of special just for some reason with midi, is a flag to ignore the caster
I do special in turn undead cause My old turn undead still auto targetted non undead, CPR's version fixxes it for me and I never fixed it lol
Gotta be careful if the cleric is undead themselves then O:
Not at my PC right now. I will pick it up when I am back π
await MidiQOL.applyTokenDamage([{
damage: 1d6,
type: 'psychic'
}], damage, new Set(token), null, null);
Trying to do a hotbar macro to damage selected token?
do I really have to define token? Or is this a side effect of advanced macros?
Neither, damage is not defined
isn't it 1d6?
I guess I don't know how to use this then
Hey all! Could somebody walk me through setting a macro to repeat at the start/end of a turn?
I think it might be wise for you to backup and say the description of the actual thing you are trying to make instead
cause theres multiple ways to do things that could be described that way
more context would save us all time
Ah okay, my bad! I'm utilizing this macro (thank you @short aurora!) and was wondering how I set a macro to repeat, I have it as an ItemMacro stuck onto Rage right now. #1010273821401555087 message
if its really divine fury, just use CPR's if you want my version of it I can give you that too
//Midi-QOL, DAE and times-up is the way to go and this is a DamageBonusMacro.
const levels = args[0].rollData.classes?.barbarian?.levels ?? 0;
//console.log(args[0]);
if (!levels) return {};
if (!args[0].item) return {};
const ttoken = args[0].tokenId;
//console.log(ttoken);
const tactor = canvas.tokens.get(args[0].tokenId).actor;
const titem = tactor.items.get(args[0].item._id);
const rollMod = titem.abilityMod;
if (rollMod !== "str") return {};
const bonusRage = levels < 9 ? "2" : (levels < 16 ? "3" : "4");
const bonusDivine = Math.floor(levels/2);
const diceMult = args[0].isCritical ? 2: 1;
if (game.combat) {
let combatTurnActor = game.combat.turn;
let combatTime = game.combat.round;
let CheckTokenId = game.combat.current.tokenId;
//console.log(CheckTokenId);
if (CheckTokenId === ttoken) {
let lastTime = getProperty(tactor.data.flags, "world.divineFuryTime");
if (combatTime === lastTime) {
return {damageRoll: bonusRage, flavor: "Rage Damage"};
}
if (combatTime !== lastTime) {
await tactor.setFlag('world', "divineFuryTime", combatTime)
return {damageRoll: `(${1*diceMult}d6 + ${bonusDivine})[radiant] + ${bonusRage}`, flavor: "Enraged Divine Fury Damage"};
}
}
if (CheckTokenId !== ttoken) {
return {damageRoll: bonusRage, flavor: "Rage Damage"};
}
}
if (!game.combat) {
return {damageRoll: `(${1*diceMult}d6 + ${bonusDivine})[radiant] + ${bonusRage}`, flavor: "Enraged Divine Fury Damage"};
//await unsetProperty(tactor.data.flags, "midi-qol.divineFuryTime");
await tactor.unsetFlag('world','divineFuryTime');
}
replace your midi sample item rages item macro with this one
Thank you for this! I did end up figuring out the repeat, didn't realize it was in the duration field with DAE
Plans for class features too? or just spells
I plan on doing every compendium in CPR/Midi srd lol. However this is tedious as hell.
also for the WIP version that you have there, I haven't done the pass for w15ps's module as I don't use it
and CPR probably will update 100 times before thats finished lol
I already submited the overtime cheat sheet to bugbear for the official wiki
yea, I dont use any of them, but I have all the class features on an old spreadsheet, so it's pretty easy for me to create the md tables at least
https://github.com/MaxPat931/Macros/blob/main/classFeatures.md Aught to get you started
I did this list a long time ago, and was focused on the DDB Importer's class features munch, so some things might be named a little funky, but at least most of it is done for ya
omg how did you build that so fast lol, this markdown editor in github is killin me
I take it theres a paste as markdown or something?
Gonna snag this for my work then, but I started on spells so I guess I should finish that first, its the biggest of them I think
500ish spells
nah, I just built in the md formatting like the pipes and stuff, then just copy + paste right into the github editor (ctrl + shift + s, otherwise it also tries to embed an image of the spreadsheet for some reason)
This is just over 1000 items, class features and "choices" like invocations, maneuvers, etc π
and I have the permission to use it for the midi wiki?
yea, that's why I made it for you haha
God that is a life saver I been building it manually row by row
I will be removing it from my git when you take it, so dont get used to the link like you did with the ATL keys π
There's gotta be some spreadsheet out there for spells too
in my defense, the kaelad link I can never find lol
keep it up there for like 3 more hours I can't get to my desktop till then
I'll ping you or dm you when I got it
I'm sure someone out there has made a way to convert from excel to GitHub table markdown
First few results on Google look promising
If it helps you moto, I have all my stuff listed on my GitHub readme
my current count was like 508, but I don't think I have the two newest books
yea this looks like it's just phb, scag, and xgte π
Found one that at least goes up to Tasha's
Do you want it in Spell Level > Alphabetical order, or just pure alpha?
I went pure alpha, cause I expect the users to just want to ctrl F or scroll by name
unless you can think of a purpose for spel level or school break downs I just don't see a need for them though
I did a quick ctrl+f for anything with an apostrophe and just left the first initial, so Tasha's Hideous Laughter is just T's Hideous Laughter
I'm gonna put all the proper nouns in a paragraph at the top warning people not to search with them included and then use the standard naming scheme from the SRD in the list
prolly gonna use what Mr Primate does, he basically replaces any proper noun with arcane
tbh I think that's what wizard does as well, bigby is arcane hand for instance
could someone help me out with a strange macro issue. I"ve got a Yank attack, which pulls an enemy up to 15 feet closer to the caster and puts a custom effect Dizzy on the target. It is working fine, in that it pulls the target up to 15 closer and applies the AE. But when the AE falls off, it tries to run the itemMacro again. Here's the macro:
and here's how I have the effect set up:
they have to fail a saving throw to trigger the macro and the effect.
should it be two AEs?
i can upload the json for the item if that helps.
You need to first create the roll and evaluate it and then pass the MidiQOL function the total
const damage = await new Roll("1d6").evaluate({async:true})
const msg = await damage.toMessage({flavor:"This is the message for the damage roll"})
await game.dice3d?.waitFor3DAnimationByMessageID(msg.id)
await MidiQOL.applyTokenDamage([{damage:damage.total, type:'psychic'}], damage.total, new Set([token]), null, new Set(), {});
Wrap the macro in a ```js
if (args[0] === "on") {}
That means it will run when the AE is created.
Now it runs both when the AE is created (on) and when it's removed (off).
do I need to create an "off" conditional, too
No need if nothing special happens during the off
If it's reverting when the AE is removed though, you can add it in the off.
well, hell. that just solved all my problems. LOL
thank yoU!
that was driving me mad
Yeah any DAE macro.itemMacro or macro.execute etc will run once when the AE is created and again once when it is deleted.
well, that is excellent to know. TIL
Is there a way to set the 'damaged' special duration to a specific damage type?
I want a feature that dissapears after a creature takes fire damage.
edit: I am dumbass it's right there.
This flag is not giving my player advantage to his attack rolls. What am I missing?
grant advantage means whoever has it on them, the people who attack them have advantage, not them. Also keys like that are an evaluation in the effect value, so either a statement that rings true, or 1 or 0(which is default off so don't do 0)
So the reason its not happening is cause theres no true statement in the effect value or no 1(its empty)
but you also very likely are using the wrong advantage key
unless you really do intend to give everyone who hits them advantage
Haha definitely not!...yet... Thanks i'll check it out
also that effect will apply after the attack so you need to either have a macro apply it pre item roll or have two items, one that applies the ae to self, and then the attack after
lol I'm dumbass what I asked is built in.
Class features I have ported to my wiki, looking for your other one now and thank you so much for this!
Advantage works now thank you so much. Yeah i'll mess around with that other stuff another time as we're playing pretty soon.
Spells have been ported over as well, you are most kind.
Oh that is coming along nicely! π
Happy to help, have fun! haha
Maxpat did the tables, I'm doing the data entry but I can't do it tonight, will do it in the morning
Moto, how good are you with excel/gsheets?
I could set up a page for you that sets the appropriate field to Y/N, but the Spell/Feature names would have to match π€
In an overTime effect, is there a way to do variable damage dice, like this, damageRoll=(@item.level)d6[piercing], in a way that displays on the damage card as just xd6 instead of (x)d6?
just want to point out you don't do the flavor in the damageRoll in overtimes
It doesn't cause any problems and it'll bother me if the text is inconsistent for this one use case (same reason I'm asking about the parentheses, haha).
uh, this is midiqol
Midi SRD, an Add-on Module for Foundry Virtual Tabletop
midi srd is back?
finally!
Hey ive been trying for a while to setup a feature when activated gives the user an aura that last 3 rounds and has the following effects
- Enemies within the aura must make a wisdom at the start of their turn
- If the enemy fails the wisdom save they roll on a table
I was able to create an effect that uses midi.Overtime to get enemies to make a wisdom save and then activate a macro that rolls a table but when I try to make a feature that applies the effect when the feature is activated then everything breaks. I also seemingly randomly have an issue where the aura will never run out of duration.
Does anyone know what i might be doing wrong?
how are you creating said aura?
ill just screenshot what i think is the correct setup
midi doesn't offer aura features, so is it template macro, CPR, or active auras?
active auras
im not sure this is related to Midi but the module troubleshooting guy said to ask here
the persistence past the duration is probably caused by you using midi to transfer the aura to everyone
im not sure how im doing that
when the item is rolled is it self/self?
or why it would just not apply the affect to me when i use the effect via a feature
let me just screenshot stuff
make it easier for everyone
This is the setup for my current workaround, the player can toggle on the effect and it will work as intended and then he can toggle it off and it will stop as intended
Take another look, made a quick update π
why is that suspended?
you have me double checking to make sure I'm in midi lol
This is what I would imagine the setup should look like, but when i click the feature and activate the affect it does not do anything
@vast bane because the player activates it by enabling it for now, when i enable it then it works as intended in terms of making enemies make a wisdom saving throw and roll on a table
i just bypassed putting it on the feature and made it an effect directly for now but thats not how i would like it to work forever
ASE
in manage modules does ASE have a yellow 9?
Either way test your setup with ASE disabled and see if it works
yes but i downloaded ASE a couple days ago and have been dealing with this issue for two weeks
but ill test it again with ASE disabled
and the beta version should be shut off in any test that involves broken midi operations although, honestly you are using aa in a way I've never seen it work
I think you need to have the macro check against the actor name and have it not fire for the caster
alright i turned off ase
the toggle effect workaround works as intended
the feature that im hoping will apply the effect still does nothing
I dunno how to activate an active aura that ignores self
that won't matter
look at spirit guardians in active auras premades though its out of date it might glean knowledge on how to setup an ignore self aura in active auras
I looked at it when I was setting up the skill and it assisted me with getting the base fuctionality for rolling the wisdom save working but did not help with the rest unfortunitly
good god, you did a ton lol
I think its cause active auras doesn't play well with midi
miidi expects an item roll to apply the effect
so the normal active aura approach is to just enable its effect I think
@raven holly Did you do columns or rows? Like are you working through each module or are you just going down the spell list and you don't have the last 3?
vlookup and a simple macro to rip the items out of compendiums, I'll send you the info in a DM
yea I didnt do the last 3, I dont think this method would be helpful for DDB since you import everything not just the ones with fancy macros, and CE is not items so no clue on that one
ddb I can't do ingame cause I don't own all content on ddb, I was just gonna go down his macro folders in github, w15 is probably only like 5 things, dfreds CE is going to be all ce's not in compendiums. I assume thats why those 3 haven't been parsed?
Ddb is literally everything, whether it's automated or not
I'm only including his automations though. Plus do his ae's look like dnd5e srd's where they are suspended?
Example: Bless?
Cause that'd be automated imo if he does have his bless as temporary
A lot of it gets auto generated to be automated
Anything with a condition or save generally
yeah, I'm gonna solve this tomorrow for sure, I'll just bite the bullet and get the importer in my world
Then again I technically have a session tomorrow night. I'm on vacation starting saturday and won't be able to host for 9 days so my players are so badly in need of a session before the vacation lol.
Yep, I have that, it just wasnβt relevant to my question; I didnβt see much point in posting the entire effect XD
Have you tried removing the parenthesis? :p I haven't checked the code for overtime but that can evaluate in regular expressions
There would not happen to be someone here who has cooked up a setup for Wall of Fire to be easily thrown out? Adjustable templates and all that stuff included? If not I'll just be a lazyboi and give my Wizard one for a Ring and one for a Line and take it from there
Be lazy.
Musing aside as to how one could be made for when I want a project to make me yearn for death; stealing the same method Walled Templates and their spread function works, use Warp Gate for some crosshairs and plot the field with small templates that fuse into one. π€
Not exactly Wall of Fire but it was a working example of similar spell.
I'll have a version of Fire Storm in the next MidiSRD, soooooon β’οΈ
Oh Wall of Fire cannot be blocks, can it?
Nope it's either a strait line or a circle
Anyway I will add that Wall of Fire too then π βοΈ at some point
Good luck, My druid is really looking toward the moment I finally can let him use it
Does it actually have to be a straight line or just a line?
Just says wall, right?
up to 60ft length, 20ft height, 1ft thick
You create a wall of fire on a solid surface within range. You can make the wall up to 60 feet long, 20 feet high, and 1 foot thick, or a ringed wall up to 20 feet in diameter, 20 feet high, and 1 foot thick. The wall is opaque and lasts for the duration.
I'd still say that just means it's a line, but making an automation that lets you "draw" that line seems baller, but also hard.
edit: jcrawford disagrees fwiw.
If I knew how to do it : I would have created a spell that just draw the zone (simple) and adding Items "spells" at will that let the caster choose target to either dex save or take damage ; based on this :
When the wall appears, each creature within its area must make a Dexterity saving throw. On a failed save, a creature takes 5d8 fire damage, or half as much damage on a successful save.
One side of the wall, selected by you when you cast this spell, deals 5d8 fire damage to each creature that ends its turn within 10 feet of that side or inside the wall. A creature takes the same damage when it enters the wall for the first time on a turn or ends its turn there. The other side of the wall deals no damage.
That kinda thing I feel gets to be a pain to automate. I just pop out the damage card (cause I don't remove buttons) and just use that when necessary
The problem is that I don't know how to add multiple items in the "ItemMacro" use and I'm not sure they will scale up to the level of use...
Clearly...
@gilded yacht macro.createItemRunMacro question.
How is it supposed to be used?
If I understand it correctly, when the linked item is created, its ItemMacro will be executed.
I don't see any arguments passed to the macro.execute though, at the point of creation π€
Thought, would it be possible to change the icon of an active effect on an actor through a macro?
Sure;
await token.actor.updateEmbeddedDocuments("ActiveEffect", [{_id: effect.id, icon: "path/to/image.jpeg"}]);```
I kinda wish it ran the item macro of the item with the ae instead of the created item
In the case of a single embedded document, you can just do effect.update
Updated Fire Storm for MidiQOL (will be in MidiSRD).
Needs Warpgate (and ItemMacro optional but suggested).
MidiQOL item onUse ItemMacro | Only called once a template is placed
Use the Fire Storm item from the Spells (SRD) compendium, with the addition of the onUse macro call.```js
if (!args[0]) return ui.notifications.error("Fire Storm error: If using ItemMacro make sure that Character Sheet Hooks option is NOT selected or make sure that you are executing this macro via MidiQOL item onUse methods.");
const { workflow:{item}, templateUuid, macroPass } = args[0];
if (macroPass === "templatePlaced") {
const templateinitial = fromUuidSync(args[0].templateUuid);
const templateData = templateinitial.toObject();
let targets = MidiQOL.selectTargetsForTemplate(templateinitial.object);
const getTargetsIds = await nameMe();
game.user.updateTokenTargets(getTargetsIds);
async function nameMe() {
for (let i=1; i<10; i++) {
const result = await Dialog.confirm({
title: "Fire Storm templates placement",
content: Do you want to place template number ${i+1} out of 10?,
rejectClose:false
});
if (!result) break;
const config = {label:"Fire Storm templates", icon:item.img, lockSize:true, size:2, rememberControlled:true, interval:1};
const {x,y,cancelled} = await warpgate.crosshairs.show(config);
if (cancelled) break;
templateData.x = x - canvas.grid.size;
templateData.y = y - canvas.grid.size;
if (!templateData) break;
const [template] = await canvas.scene.createEmbeddedDocuments("MeasuredTemplate", [templateData]);
targets = targets.concat(MidiQOL.selectTargetsForTemplate(template.object));
}
return targets.map(i=>i.id);
}
}
So I'm trying to automate Aura of Conquest and I was wondering if this is correctly written for its condition?
applyCondition=Frightened
(The rest)
I actually think that that specific aura is not really an aura
I think that how you automate that aura is you take all of that paladin's fear abilities and do a check for if they are within 10ft(30ft at lvl 18) and apply a custom condition to reduce their speed to zero and apply psychic damage.
This works if the GM does it, however, players "lack permissions to create ActiveEffect in parent Actor". Is there a way to replicate the spell's behavior in a way that players can use it?
Hmm, that's one way to do it for sure.
are you using dae without midiqol?
Strange! I always thought that DAE would execute this as GM π€
Anyways if you use warpgate I'll send the latest MidiSRD version
I use both, however I don't like Midi SRD's Aid because it changes the maxHP and not the tempMaxHP
I know, I have changed that in the yet to be released version π
oh ok π
You are hyping this release up 8)
I am diggin myself in a hole...
So Maxpat did midi srd/midiqol/CPR for the table checklist and I decided to take on DDBI. Holy shit is there a ton of stuff that are not caught. MrPrimate automates a ton of stuff for midi users that are not listed in his github lol.
the worst part of it is I have to manually confirm them
cause you can't check if bless is setup right in it, which is technically automated
you have to go in, edit the item, and look
Even acid splash is actually done right in DDBI and not dnd5e srd
Bless, Bane will be in MidiSRD too without DFreds CE
what I really wanna know is wtf is midi srd and ddbi doing with alter self lol I'm afraid to test it in my world but for some reason they got complex automation setup on a spell that is arguably subjective lol
your update will be easily passed in the table cause for CPR and Midi SRd Maxpat made a macro to pull and parse your compendiums
Dfreds and DDBI are the hard ones
I'm also grading the checkmarks on whether the item is specially modified to work with midiqol, so thats why Acid Splash gets a checkmark in DDBI, he purposely added 2 targets to the target setting
Acid arrow has an overtime, not caught in parsing his github, so thats another example of why I have to purposefully look at the ddbi items
I actually think that all the premade makers need to consider the fact that upcasting certain spells expands the target count so those spells really should have no target counts. Example: Hold Person
Either that or maybe tposney needs to work the ignoring of target count into an upcast and add it as a checkbox at the bottom of the item
bless/bane suffer this as well
I think its purely a byproduct of all of you using the base items from dnd5e srd or ddbi
@weak quest for now you can use this
I'm also missing the books for dragonlance and spelljammer so I can't confirm ddbi's spells for those books
Actually let me know if it works cause I grabbed an Item and didnt check, as I had to "export" the MidiSRD functions
Does anyone know where I can find the info required to make something scale based on class levels? Trying to figure out how to make it scale with half X class level.
Been trying to find it in Midi's documentation but no luck there, is it a basic Foundry functionality?
@classes.fighter.levels
@details.level for total level
Thanks!
coles post in the pins in #dnd5e
Appreciated. o7
it seems to be working perfectly β
@vast bane is the Acid Arrow's splash damage (the one when you miss the ranged attack) supposed to be scaled up by spellLevel?
I think so, I'm not qualifying the automation to be perfect, just if it has midi specific stuff on it
theres a few that don't do the full workup on an automation but do enough to count
Some premades I've qualified could use activation conditions but I'm just letting them go and counting them
(I'm only directly looking at DDBI) yours and CPR's I'm just parsing the compendiums and checking if they exist
Is there a way for an attack in D&D 5e to trigger a DC check if the attack crits? For instance I have given my players a Feat called Mace specialised that if the crit an enemy the enemy has to make a DC 15 con save of be stunned for 1 turn as part of the attack. Right now I am doing it as a seperate saving throw check which the player presses when he crits an enemy. But would love to have it all in one attack since we sometimes forget about the additional benefit.
Hey friends! Is there a way to create ammunition in Foundry that will not apply damage to the target when loaded and shot?
What are you trying to do? Can you use no damage for damageType?
Needs a macro. Would it be OK if when crit the target auto rolls the save?
Indeed, automation is what I was looking for π
I want to load a bullet that, when fired, applies a special effect but nullifies damage that the gun otherwise would cause.
You will need to create an on Use macro on the Item.
ItemMacro | After active effect and copy paste this in the Item Macro. ```js
const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const condition = CONFIG.DND5E.conditionTypes.stunned;
const aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === condition));
aeData.flags.dae.specialDuration = ['turnEnd'];
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}
Oh hmm let me check something should be good
OK so you use ammunition from the character sheet, correct?
Hmm its not kicking up an error and the attack and damage is going through fine. But its not kicking in a con save from the target
is it a critical hit?
Yeah I have lowered the crit threshhold to a 5 for testing. It does kick in an a con save now. But the damage is nullified for the attack when it crits. And no stun status effect came on
Yep!
will check in a bit.
How are you with macros?
Would it make sense for me to suggest warpgate the Item, preItemRoll, if the ammunition selected is named like the special bullet?
Check for errors in console, if any
685294:11 Uncaught (in promise) TypeError: undefined. Cannot set properties of undefined (setting 'specialDuration')
[Detected 1 package: midi-qol]
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:11:34)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:465:6)
at async Workflow.next (workflow.js:262:10)
at async Item5e.doAttackRoll (itemhandling.js:520:2)
at async Workflow._next (workflow.js:416:6)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
Do you have Times up module?
I do
Yep, I tried that last night, it just makes the whole expression 0 π
type in console ```js
condition = CONFIG.DND5E.conditionTypes.stunned;
aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === condition));
Yes {id: 'combat-utility-belt.stunned', flags: {β¦}, label: 'Stunned', icon: 'https://assets.forge-vtt.com/5f667a63d23ef6f7008815f4/Status Markers/Stunned.svg', changes: Array(0),Β β¦}
Oh hmm ok CUB is a black box for me nowadays. Try this now ```js
aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === "Stunned"));
into the console correct? If so it produces the same error {id: 'combat-utility-belt.stunned', flags: {β¦}, label: 'Stunned', icon: 'https://assets.forge-vtt.com/5f667a63d23ef6f7008815f4/Status Markers/Stunned.svg', changes: Array(0),Β β¦}
I am using convenient effects also if that changes anything ?
I guess you are not using Replace for the DFreds CE conditions though, do you?
Currently no. I had to turn it off because the inbuilt invisibility kept getting over ridden
Actually it probably matters more the Enhanced Conditions of the CUB settings.
[[@item.level]]d6 try this
You could create a DAE for the Stunned condition using the DAE config and adding a CUB Stunned condition. Then add in the durations tab of the DAE the special duration that suits you.
Give it a unique name.
Select the token with that AE on, open console and type ```js
condition = duplicate(_token.actor.effects.find(e=>e.label === "Unique name you used"))
@boreal maple π
I can modify but not write π
can you clarify this statement cause I might have a solution for you if you just said what I think you said
820760:1 Uncaught SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
at duplicate (commons.js:1897:17)
at <anonymous>:1:13
d
are you trying to remove the core automation of blinded/invisible?
or retain it with cub/dfreds?
Double brackets work perfectly, thank you!
retain it
dfreds should not affect that, its probably cub that is your problem with that, and you shuldn't have both managing ae's
if the AE has a name of My super duper cond you will need to use ```js
condition = duplicate(_token.actor.effects.find(e=>e.label === "My super duper cond"));
ok I have changed that in the macro. So whats happening is if the enemy doesnt save against the con no damage is coming through, it kicks in the error in the console as I previously gave you. If the target does success on the Con save the damage does come through and no error message in console. But on the failed instance it still doesnt stun the enemy
I have turned off Cub handling the enhanced conditions
Does anyone have an automated Create Bonfire item by any chance?
Sorry the error message is different my bad. Its now 982807:1 Uncaught (in promise) SyntaxError: undefined. "undefined" is not valid JSON
[Detected 1 package: midi-qol]
at JSON.parse (<anonymous>)
at duplicate (commons.js:1897:17)
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:10:28)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:465:6)
at async Workflow.next (workflow.js:262:10)
at async Item5e.doAttackRoll (itemhandling.js:520:2)
at async Workflow._next (workflow.js:416:6)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
d
That error means that the name of the Effect and the one that you input in the macro searching the label is NOT the exact same
OK I see what's going on with the macro though. Split sec to edit it
get it again from there @boreal maple
Make it After Active Effect too and check again if it's still not working
I tried both ways. With After Active Effect the damage is coming through even on a failed con save now. But its still not applying the stun and a console error 1041896:1 Uncaught (in promise) SyntaxError: undefined. "undefined" is not valid JSON
[Detected 1 package: midi-qol]
at JSON.parse (<anonymous>)
at duplicate (commons.js:1897:17)
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:10:18)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:934:7)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
d
Can you share the macro you're using to be on the same page?
const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const condition = CONFIG.DND5E.conditionTypes.stunned;
const aeData = duplicate(CONFIG.statusEffects.find(ae => ae.label === condition));
aeData.flags.dae.specialDuration = ['turnEnd'];
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}
If you're using CE, you can just use it's API to add the condition
But then would not have the special duration
OK so the issue is that it cannot find the Stunned condition.
At what point are you now?
DFreds and no CUB enhanced conditions?
DFreds replace?
Have you reloaded after you changed the settings of DFreds and CUB, if you changed anything/
So yes I have Dfreds on replace, Cub enhanced conditions turned off and I have refreshed several times for testing purposes
OK.
Type in console ```js
CONFIG.DND5E.conditionTypes.stunned
comes back with 'Stunned'
in red
What about ```js
CONFIG.statusEffects.find(ae => ae.label === CONFIG.DND5E.conditionTypes.stunned)
undefined
Console ```js
game.dfreds.effects._stunned
ActiveEffect5eΒ {changes: Array(3), disabled: false, duration: {β¦}, #valid: true, #dispatchTokenStatusChange: Ζ,Β β¦}
Try ```js
const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const aeData = duplicate(game.dfreds.effects._stunned);
aeData.flags.dae.specialDuration = ['turnEnd'];
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}
is there an easy way to cap current hp instead of max hp? i'd like the player's health bar to show the effect of a depressed hp maximum
Negative temp max hp will show that on the token bars
Mr badger do you know off the top of your magic hat, if I can pass a parameter to the warpate.crosshairs.show() for suppressing open Character Sheet?
Totally wrong reply soz
perfect. thanks
When testing it with both after attack and after active effects it has the same error. 1215504:10 Uncaught (in promise) TypeError: undefined. Cannot set properties of undefined (setting 'specialDuration')
[Detected 1 package: midi-qol]
at eval (eval at callMacro (workflow.js:1672:15), <anonymous>:10:36)
at async Promise.all (index 0)
at async Workflow.callMacros (workflow.js:1562:13)
at async Workflow._next (workflow.js:934:7)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
at async Workflow.next (workflow.js:262:10)
e
Just as a funny aside, crazy negative max temp have no floor and even the token hud in core dnd5e fails to account for this, I already reported this glorious bug with pictures
Hehe. Hmm, does xhairs show actually minimize sheets? I thought that was part of spawn π€
It doesn't afaik
So what are you looking for again?
I will take another look yeah
If it's not there, I don't have a switch for it, but it's a one line command
Actor.sheet.maximize()
Or minimize
OK no worries, just trying to see if I was missing something. Thanks!
does this minimize ALL opened sheets in the case of the DM?
interesting, ploppin this into my revisit queue for later, I can see a use for it on my dm'ing hotbar
const { isCritical, hitTargets } = args[0];
if (!isCritical || !hitTargets.length) return;
const DC = 15;
const rollSave = await hitTargets[0].actor.rollAbilitySave('con',{targetValue:DC});
if (rollSave.total < DC) {
const aeData = duplicate(game.dfreds.effects._stunned);
foundry.utils.setProperty(aeData.flags,'dae.specialDuration', ['turnEnd']);
if (aeData) await MidiQOL.socket().executeAsGM("createEffects", {actorUuid:hitTargets[0].actor.uuid, effects:[aeData]});
}
Huzzah!!!
That was a trip π
Perfect! Thank you for that heck of an effort!!
Ok, did A-F of DDBI. Slowly but surely comin along for spells atleast:
I wonder if you can make an effect for healing spirit
Its probably hard to do since its an area that heals
Theres 2 ways to approach this spell. Make an actor, make a temp item. If you go the make an actor route, the warpgate wiki's Badger Medic Example is literally Healing spirit renamed.
and badger medic is written as a midi/warpgate example
it does not account for more than one creature in the space however
which I think might be able to be dealt with when you make the actor
Just change its target settings to 2.5|feet|ally
and set the second drop down in workflow tab at the top to always, ignored defeated
Hmm
just copy the whole badger medic code and replace the parts that reference Badger medic with Healing spirit or keep it as a badger medic
make sure the macro matches the name of the actor you make
I'm using the CPR Hex spell. It does everything we want except actually damage the target when hex would. It's easy to work around, but I'm wondering if the CPR version usually does the damage and something is wrong?
Hey is it possible to change an image of a token with DAE effects. If so what do i type in to make it happen?
if you have active token effects installed too, you can use the ATL.texture.src key in DAE
Yes i have ATL active in my session.
you can also do it via warpgate too
Gotten that too. But afterwards do i copy and paste the image's name?
ATL to me just seems simpler cause its just entering a key and a folder path
oh okay so i need to make sure to gather the folder's path to the image itself then.
first key
theres a chance ATL.texture.src still doesn't auto complete in DAE beware, its not a problem, it just means kaelad and tposney haven't updated dae's library of keys for the new updates to ATL
Ah i wasnt aware of this! Why thank you it saves me making dupes of the same character with a differing image then.
I dunno if you have to use the replacements for spaces like I did, but /shrug I just used the filebrowsers version of the filepath and pasted it
oh btw? Advantage reminder? is that a module?
yeah just look at the first key, the rest of that is for my druids character, advantage reminder is a module that only works if you don't fast forward in midi
oh
its rare to see it in use in this channel, I'm a rare breed
Well moto you are a one of a kind for sure
The fourth key is cause the druid is high enough level that when shes in symbiotic it upgrades her reactoin feature to a template version so I made it a createitem key
Hmmm okay i do see the macro create item. Guessing you work with macro yourself too? Ive been looking how to do those things but honestly idk where to start.
Thats an another subject at an another time.
Thanks again! Moto
macro.createItem is always hard to explain the process of, but its designed to be user friendly oddly enough.
make a compendium or a sidebar folder for storage and then whenever you use a macro.createitem key do this with the stored item:
if its meant to only be on the actor while the ae is on them, just do exactly the gif, if its meant to be permenant after the dae is applied, put ,permanent after the drop data
if its an item that needs to be attuned/equipped thats going to involve some headaches in macros as the created item comes unequipped/unattuned
he made a new key runMacro for it but it runs the wrong items macro imo so I just still use effect macro for equipping/attuning
anyone have a clue why the item macro on this item isn't firing for players but is for me (as a DM?)
No errors?
nope. no errors on players side
and none on DM side either. but it is throwing up (on DM's side) a warning that now target is selected. Not doing so on the player side, which does have a target selected.
... does that have two item macros?
Nah just one for v9 and one for v10 π
There is a data more in one of the two, so you can keep on using it for both versions as a side effect!
yeah, this is weird. when i triggerit on the players side, the DM gets a warning that no target is selected, even if a target is selected on the players side.
Do you run it as a GM or something with Advanced macros maybe?
nope. and I can't access the itemmacro as a player.
yeah that is some permissions thingy from Item Macro.
hm. other than whispering private messages, players have all the permissions.
everything on item macro is unchecked except Player Access
other item macros are firing correctly for this player.
Try ```js
const { tokenUuid } = args.at(-1);
const them = fromUuidSync(tokenUuid).object;
const me = canvas.scene.tokens.find(t=>!!t.actor.items.getName("Longbow of Bows (Yank Attack)")).object;
@hot flower π
put that in the item macro?
these lines instead of ```js
const me = canvas.tokens.get(token.id);
const them = game.user.targets.values().next().value;
hmm. nope. But it's throwing the crosshairs up on my DM window instead of the player window.
That will happen cause you are using the DAE method execution
and I can't access the item macro even though I clicked the player access on the item macro config sheet
If you want to make sure it happens on the players, use an Item onUse MidiQOL instead
but the macro should only fire if they fail a saving throw
and I was hoping to avoid writing a saving throw into the macro
make it do that as an onUse
Just access args[0].failedSaves as an onUse and if (!!args[0].failedSaves.length) do what you need
DAEis tricky to get right some times
ok. sorry i'm not following for some reason
does this need to be set to ItemMacro? like this?
how would i set an activation condition to trigger if the target alignment contains "Evil".
Have no idea how to look up those attributes. I see the RaceOrType in provided examples.
Is it as simple as "Alignment"
Log the actor object and check where is the alignment saved
if its target, preface it with target
target.details.alignment.toLocaleLowerCase().includes("evil")
that got it working for me, @violet meadow , thank you, sir!
Are you still up for helping me out with the issue I was having? π
Not at my pc right now. Send me a DM to remind me the use case and I ll take a look
Bump :-3
I remember having made this one, but I cannot find it now.
π³ Tim has rewritten DSN support for midi from the ground up for the next midi release. Sounds like a monumental effort, but the dice should work properly with optional bonuses now π
(I wonder if it will also fix @scarlet galeβs Toll the Dead)
Questions for my midi wizards. Iβm currently using the midi sample items spiritual weapon in my game and it is working superbly for the first character who took the spell. But I now have a second character with a much different aesthetic who also wants a spiritual weapon. How do I ensure that one player can call his spiritual weapon (a scythe made of blood) and this new player will call his spiritual weapon (a spectral maul)?
Hopefully, I did ask about it.
AFAIK the easiest way would be to duplicate the sidebar actor and make a uniquely named one for each player, then modify the item macro for each of the playerβs spells so it spawns that actor. If it still works like it used to
What MidiSRD does, is having a default actor and mutating it to match whatβs needed.
But, yeah creating a couple of unique actors for each player isnβt that bad
Seems easy enough! Thanks!
hey, finding an issue where midi isn't applying damage resistance properly if it is set to Non-Silvered Physical while using an Active Effect, don't know if that is a known issue or something that I'm doing wrong, would appreciate any help!
holy shit, the wiki has a purpose and its not even done yet:
(DDBI has create bonfire)
I should preface that the bar for automations for midiqol are very low in my wiki so it may not be what you want, but it technically is specifically tailored for midiqol
I haven't done the last 2 modules yet, and DDBI is only done A-F(DDBI is a slow one to confirm)
This wiki is such a profound public service
MaxPat contributed a ton to it as well, eventually its going to be on bugbears page but its not done yet so I just preshared its wip location
Obviously the real heroes are the module authors though
Any suggestions for setting an activation condition on an item to look for a target that is medium or smaller size (dnd 5e), and then request a saving throw/apply Prone if they fail? I can get the condition to activate if I only select one size type (i.e., target.traits.size === medium) **edit, not the effect condition (prone), just request the saving throw.
Correction: the item ISN'T correctly looking for the size trait, it is just only asking for the saving throw when the initial attack hits. That was an oversight on my part. ---nvm, figured it out. Found an earlier message with a similar problem.
Wow the wiki tables are gonna have the side benefit of showing DDBI users what stuff to throw in their override I think
If the override does what I think it does
if i want an item to use "other formula" on a different range what activation condition should i use?
I canβt answer that but itβs a cool idea
midi and bab have functions I think you can pass in the activation conditions I think
I feel like he used to have an example for that in the activation conditions before he moved them to the wiki hmmm
I lost the original link though
Nope no distance check in activation condition original post:
#1010273821401555087 message
okay also can you make an automatic effect for war caster?advantage on concentration checks
there is a key specifically for it
I'm not on my main pc so I can't look it up but midi has a flag for advantage on conc
found it
flags.midi-qol.advantage.concentration | CUSTOM | 1
also a really good way to sneakily find a ton of activation conditions is to search bugbears history for posts with the word in it
what about the distance?
(Or ask him directly lol)
doubt you can make it, its something like "When you use this weapon at a distance deals 2d6 thunder damage"
more than 5 ft away you mean?
yeah
thought for sure I'd seen you write one before but I think its not in dnd5e's channel. I know I had a macro made via bab that checks distance.
MidiQOL.getDistance(workflow.token,workflow.targets.first()) > 5
Nah that should do it
that on activation condition?
yes
make sure your roll other option is on in midi settings in the damage settings
I think you also need to check the box also roll other at the bottom too?
@hot walrus there is a setting in midi so unseen attackers get advantage but Iβm not in front of it now to check sorry
shutting that off would ruin a bunch of other things, probably best to just install CPR and use its darkness spell
Iβm saying it should be on
But yeah thatβs the easy option, although Iβve not tried it. Mark is very close though
If you want to diagnose unknown attributions:
#1010273821401555087 message
there are 3 or 4 midi flags that don't show up in actor effects tab that can only be detected if you have attribution turned on in midi
the yellow warning on every attack in the console is also the same as attribution I think just less user friendly
@coarse mesa @vast bane thanks
regarding the activation conditions, can you do multiple?
Say, Fiend, Abberations and undead?
["undead","Abberation","Fiend"].includes(raceOrType) Perhaps?
good point that the activation condition page has no && example
one of the midi samples will have an exxample of undead/fiend
mace of disruption
so, i have this set, but it is re-running when i delete the spell effect from the character
it was not doing this in v9
figured it out
Hello.. in the effect Attribute.key I have to add the attribute DAMAGE ONLY when a critical hit is performed. Have you got any hint to create that effect?
That flag is to cause criticals, there's no flag to add damage to critical, that's something you set on individual weapons or make a worldscript/macro.
if you are trying to do brutal critical there is a special trait for it
Hello, it seems like using AOE targeting sets the targets for all players, not just the one that created the effect. Is there a way to fix this?
that sounds vastly wrong, can you better explain your situation or show us an image?
the only way you can set targets of others is to run macros as others
or use a module that does that
midi doesn't do that
Using this setting, when one player puts a template on the battlefield, every player is targeting the creatures in the area, not just the owner of the effect
does that happen with just socketlib, libwrapper, dae, and midiqol installed enabled?
is the template being placed in an abnormally way like via another module or via macros?
I would need to test
I don't have any other modules that do template targeting. The template are created using the "place template" button on the power card
Yes, the message of the power on the chat
Sounds like 4e π€
I call that a power card... because it is what it is
ok, first off there should never be a place measured template in chat with midi unless you have really abnormal settings
lets just rule out other modules, install find the culprit, enable just dae/midi/socketlib/libwrapper, run the test
OK, I was wrong, it shows up when you cast the spell
Using this place measured template causes the issue
show me what you believe tells you that all the players have targetted via the template, show me the map where the template is placed
preferrably the dm's viewpoint
I strongly feel that your issue is probably just shared cache
when you login as more than one account they should not use the same browser unless the second instance is in incognito mode
if you do see measured template buttons in chat that can often mean that you have one of these installed alongside midi:
No, I don't see them, I was mistaken
Well, it's working as it should right now, so I won't be able to provide more information. If that happens again in the future I'll return here.
Hey yall, question on a midi overtime issue I'm having. I'm trying to implement a saving throw if a creature doesn't have a condition immunity for poisoned. the applyCondition arg doesn't seem to be working with the below though, any thoughts?
label=Asphyxiant Marble (Start of Turn),turn=start,applyCondition=!@traits.ci.value.has("poisoned"),saveDC=13,saveAbility=con,savingThrow=true,saveMagic=true,killAnim=true
when you wrap something in "" I imagine its going to want to see exactly that. I doubt the CI value is not capitalized.
you also may want to just try to yoink the actual activation condition for effects out of the wiki instead
Thanks, the ci is all lowercase though, it seems it just doesn't like the Set.prototype.has() method.. any other ideas for excluding a saving throw based off a set/array field?
what is the overtime doing? Whats the description of the item?
from what I see here, you want it to only induce a save when you don't have the poisoned condition?
Yep thats correct
They want the whole thing to only apply if the target doesnβt have poison immunity.
what does it do in addition to the overtime? apply poisoned?
Yeah my first thought was βif itβs the poisoned condition, immunity should block it automatically,β but I imagine thereβs maybe more to it.
I think you can use removeCondition= to evaluate if it has CI poisoned
if your goal here is to stop the overtime for poisoned immune folks
it just applies the marble effect, it's not poisoned technically it's like a custom condition
but it shouldn't apply if they have poison ci
try removeCondition=, I think its either 1, 0, or an evaluation that equals true
alright I'll give that a shot, I figured I'd run into the same issue with it not able to deal with the array
I think you want the activation condition for effects in the wiki not that
oh wait no
hmmm
Maybe try .includes instead of .has?
let me see if I can find this on my phone lol
just do a search here for thatlonelybugbear and .includes
go through all the shared activation conditions that bugbear gave
okay cool will do
Try @traits.ci.value.has("poisoned") == false instead of using !, maybe π€
I feel like it shouldn't matter but who knows.
I should clarify too, I know the system.traits.ci.value.has("poisoned") call works, if you do it in a normal macro on an actor it returns true or false correctly, it's just not working in the overtime command
Yeah, I ran it in the console and it returned the correct value, which is why I thought maybe the not operator is just weird in the effect box there. But I really have no idea.
thanks yeah I gave it a shot with == false as well, still no go.. Everytime I have some new item I'm like well automating will surely be easy this time lol
Are function calls like .has supported? Maybe it only supports comparison operators :/
yeah that was my thought, seems odd since there are quite a few pieces that would require going through an array but that's my best guess
I could do this in an effect macro I guess right? something like this..
if (args[0] === "on" && midiQOL.combat.onTurnStart) {
const sourceItem = await origin;
const theActor = await actor;
const ci = theActor.traits.ci.value.has("poisoned");
if(!ci)
{
const itemData = mergeObject(
duplicate(sourceItem.data),
{
type: "weapon",
effects: [],
flags: {
"midi-qol": {
noProvokeReaction: true, // no reactions triggered
onUseMacroName: null, //
},
},
data: {
equipped: true,
actionType: "save",
save: { dc: 13, ability: "con", scaling: "flat" },
"target.type": "self",
components: { concentration: false, material: false, ritual: false, somatic: false, value: "", vocal: false },
duration: { units: "inst", value: undefined },
weaponType: "improv",
},
},
{ overwrite: true, inlace: true, insertKeys: true, insertValues: true }
);
itemData.system.target.type = "self";
setProperty(itemData.flags, "autoanimations.killAnim", true);
const item = new CONFIG.Item.documentClass(itemData, { parent: theActor });
const options = { showFullCard: false, createWorkflow: true, versatile: false, configureDialog: false };
await MidiQOL.completeItemRoll(item, options);
}}```
could just have it remove it in a dae/item macro
I think thats what you are trying to do with this macro?
yeah that is true, just do the normal overtime and then have an on combat start check if they have ci and remove it
that's probably the cleanest way at this point
Order of operations will the effect macro run after the midi overtime saving throw?
If em is set to on combat turn starting
you are already there might as well just use it as a dae item macro and change the origin/actor references to the args versions
Couldn't you do it in OnEffectCreation?
is the overtime start or end of turn?
start of turn
Just do it all in the effect macro would be the Zhell advice I feel lol
lol, I did forget about the itemmacro path for a second there, alright I'm gunna give it a shot with em and an item macro, I should be able to get one of them to work, thanks for the ideas yall!
Hi, i'm looking for a way to make a spell/skill with a AoE effect only prompt a specific kind of enemy, like undead, for it's saving throw, damage, etc. Is it possible?
Like some kind of Channel Divinity which only targets the undead in a 30 ft radius.
before we give you the answer, is it literally turn undead?
It's pretty much the same thing.
CPR has Turn Undead handled pretty well but if you just want to set it up yourself you'd probably find the wiki useful in the pins, specifically activation conditions by thatlonelybugbear
Oh, sorry, what is CPR?
Sources of premade stuff for Midiqol:
Modules:
Midi Sample Items Compendium(comes with the module)
Midi SRD's compendiums
https://foundryvtt.com/packages/midi-srd
Chris' Module form of his macros:(CPR)
https://foundryvtt.com/packages/chris-premades
Dfred's Convenient Effects:
https://foundryvtt.com/packages/dfreds-convenient-effects
MrPrimate's D&D Beyond Importer:
https://foundryvtt.com/packages/ddb-importer
w15ps's Module
https://foundryvtt.com/packages/w15ps-srd
Macros:
Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros
Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros
Wiki:
Activation condition and other useful info:
https://github.com/thatlonelybugbear/FoundryMacros/wiki
Wow, ok, thanks. 
added a new one in there just now
That makes things a lot easier.
CPR's stuff is kinda hard to find the nuts and bolts of so if your intention is to pick apart turn undead, you may want to see if midi srd has it instead as its easier to find the parts of
there may also be a midiqol sample item as well
kinda followup question here, if I have a ce status effect added along with midi overtime, shouldn't the status effect only apply if the overtime saving throw is failed? Am I missing something here?
You have to set up the save on the base item, not the AE. The overTime stuff will remove the effect once the save is passed, but it wonβt gate the initial application.
What is killAnim for here?
applyCondition stuff aside, I guess.
Beyond our shared fury for Anim, of course
Iβve seen it on a lot of premades, maybe with DDBI. Iβve never known XD
I'm finding a lot of useful stuff in Midi SRD. Thanks for showing me this.
lol yeah it's just always included, literally no idea
kill anim was made to fix a problem with AA a very long time ago
sorry for the reply meant to just answer it openly
killanim isn't really needed anymore
deep lore cut right there
Spirit guardians was the only one that needed it I believe back then too due to how he implemented it
Real blast from the past then.
It will kill an animation thats setup as an active effect in Automated animations still fwiw
but you could also just not set an aa for that named active effect now
Any ideia on why this is happening? This actor is always taking 22 damage from this specific attack
Any negative DR or vulnerability?
No
Ah
hp increase from draconic resilience and hp increse from tough on a lvl 11 character, they give extra 22hp
Just added the "+" before the formula on each effect and it worked haha
you should not be doing those via ae's
Oh. How should I be doing them?
the hp config menu on the sheet
I did not know about that hahaha. Thanks!
with MidiQOL.completeItemRoll, what would I call to check if the saving throw succeeded or failed?
Make it a variable and have a peek at the data it returns?
Thanks, looks like completeitemroll is deprecated, anybody know the correct function to call to make a saving throw?
completeItemuse
const ceid = "Actor." + theActor.id;
const saveDC = 13; // Replace this with the desired DC
const saveAbility = "con"; // Replace this with the desired ability
const ci = theActor.system.traits.ci.value.has("poisoned");
if(!ci)
{
const itemData = {
name: "Saving Throw",
type: "weapon",
data: {
actionType: "save",
save: { dc: saveDC, ability: saveAbility, scaling: "flat" },
"target.type": "self",
components: { concentration: false, material: false, ritual: false, somatic: false, value: "", vocal: false },
duration: { units: "inst", value: undefined },
weaponType: "improv",
},
flags: {
"midi-qol": {
noProvokeReaction: true, // no reactions triggered
onUseMacroName: null, //
},
"autoanimations.killAnim": true,
},
};
const item = new CONFIG.Item.documentClass(itemData, { parent: theActor });
console.log(item);
const options = { showFullCard: false, createWorkflow: true, versatile: false, configureDialog: false };
console.log(options);
const result = await MidiQOL.completeItemUse(item, options);
if (result.result === "fail") {
game.dfreds.effectInterface.addEffect({ effectName: 'Asphyxiated', ceid });
}
}```
That's what I used (after), I'm not getting any saving throw roll though
might have a problem with dfreds applying ce's does dfreds allow unowned?
I did it without the ce first actually, same result
was just including it in there for completeness
does the item have a save setup on it?
Do we actually use Midi for anything in this setup or do you just want a saving throw from actor(s) and if below saveDC, do something?
It doesn't, the generating effect is a ce labeled Asphyxiant Fog, it's an aura effect with this macro setup as a on combat turn starting effect macro
just want a saving throw
actionType wrong maybe?
actor.rollAbilitySave("con") and then get the results from that
hmm, I see examples in the midi git using 'save' as actiontype
you could totally change MidiQOL.completeItemUse to "origin.use" and sneak it by Zhell
thanks if I can do it without midi that would work, how would I define the save dc?
Save the results to a variable, check the .total and do the last "fail" if you got there as a comparison with that and your save DC instead, something like
edit: added the fastForward in options for the save, remove the , {...} if you don't want that
const saveDC = 13;
const saveThrow = await actor.rollAbilitySave("con", {fastForward: true});
if (saveDC > saveThrow.total){
// die
};```
Awesome thanks, the following seems to work. Only thing I'd like to be able to do is use lmrtfy instead of the base but I guess I can do that down the line:
const ceid = "Actor." + theActor.id;
const saveDC = 13; // Replace this with the desired DC
const saveAbility = "con"; // Replace this with the desired ability
const ci = theActor.system.traits.ci.value.has("poisoned");
if(!ci) {
const saveRoll = await theActor.rollAbilitySave(saveAbility, { fastForward: false, chatMessage: true, dc: saveDC });
if (saveRoll.total < saveDC) {
game.dfreds.effectInterface.addEffect({ effectName: 'Asphyxiated', ceid });
}
}```
I think LMRTFY specifically has a way for you to setup a request and then press a button to save it as a macro? Maybe you can dissect it from a similar setup "handcrafted" in there? Or the screenshot is outdated
Does anyone know if theres a way to kill a banked pending MTB request thats issued by midiqol? I always handle this by rolling with a high situational bonus
I have an idea to allow for killing it, if midi can pickup a non integer bonus like "KillSave"
Nobody seems to have greater or lesser restorations automated.
Lesser Restoration
Item On Use macro, After Active Effects:
(Requires your conditions to be named like mine)
if(game.user.targets.size !== 1 ){
ui.notifications.warn("You must have one token targeted.");
return;
}
let VALID_EFFECT_LABELS = ["Blinded", "Deafened", "Paralyzed", "Poisoned"];
let [targetedToken] = game.user.targets.values();
let availableValidEffects = targetedToken.actor.effects
.filter(e => VALID_EFFECT_LABELS.includes(e.label))
if(availableValidEffects.length < 1){
ui.notifications.warn("No conditions exist on this creature which are removeable by Lesser Restoration.");
return;
}
let dialogButtons = availableValidEffects
.map(e => Object({
label: e.label,
callback: () => {e.delete();}
}))
let dialog = new Dialog({
title: "Lesser Resoration Condition Selection",
content: ``,
buttons: dialogButtons
})
dialog.render(true);
Finally got this macro working with one exception, the CE asphyxiated condition is not applying to enemy tokens. It applies it to the actor, but not the token. Player characters it applies correctly. Anyone know why that would be?
Get the actual uuid instead of trying to construct it, only just noticed
ah is that a value in the actor class?
Value in every document, not at computer but scrap the joining of actor and its actor Id for that instead
Might just straight up be actor.uuid
hm alrighty I'll give that a shot
dead on, thanks much, was pulling my hair out
@celest bluff has Lesser Restoration in his macro portfolio, I just do not know atm if it was from his patreon or his github.
Should be on both gitlab and patreon. The patreon one is more up to date.
My coveted Command automation I just realized could totally be used for Tasha's Mind Whip too lol.
Spells are done, feel free to report any typos:
Midi's Spell Atlas:
https://github.com/MotoMoto1234/Midi-Wiki/wiki/Spells
OOC: is the DDBI content accessible "free-of-charge" or does it come with the patreon?
edit: realising, ooc as shorthand for out of curiosity is not a good abbreviation in a discord full of roleplayers π
Dnd beyond importer takes a campaign ID and your cookie to function.
Theres tons of stuff that are free but the books and what not are sussed out by what your campaign has available to you.
from what I saw of DDBI, its worth using purely to get all the suspended effects and wonky dnd5e srd compendium glitches out of midi's way
^ also importing the monsters is helpful too cause the srd ones are pretty limited
Monsters requires either the patreon or for you to be self hosting and setup his proxy server
I do plan on going down that list again at a later date and XXXXX the ones that just aren't feasable to automate
The bar is very low for qualifying as having a premade for an item in my wiki page lol
sorry, maybe misphrased it. DDB, I know, has fees/costs applied. I was mainly curious if your wiki only references sources that come "free-of-charge" like the midi srd. Otherwise, I would gladly contribute, by scouring what Crymic has in his patreon, but what would not be accessible for free, and not everyone feels like "paying for macros" (which is totally fine).
two of ddbi's are purely getting a check cause the tables were rollable from the item
I'm only doing modules cause macros are complicated
gotcha! π
How can I set up a magic item, so when activated, the user needs to make a DCX attribute check to get an effect, like +1 to damage/attack rolls?
I have for DAE & MidiQOL
why would they need to make a check to get that?
its a check to get a beneficial thing?
Great work, @vast bane !
Yes, its a check to get +1 to the weapon for a limited time.
For my campaign I gave out mainly weaker magic items but with multiple effects.
I dunno if the ability check item type works with midi but you could try it, but modding a weapon is a warpgate mutate macro or item update args on/off macro
look at how they do magic weapon in the premade modules #1010273821401555087 message
Alrighty
what about something like, whenever they do damage with the item, it gains a charge, and then whenever they deal damage and have at least 1 charge, can decide to spend all the charges to do one time extra damage? I suppose this is kinda like Absorb Elements
The effect, does the weapon provide it or does it come from a different item feature?
the weapon
do a search in this channel for "Holy Power" someone made a subclass that was all about that
Thanks will do!
While I'm searching, are there any incompatibilities with the "Magic Item" module with DAE/Midi?
I've seen a few but Tim seems to be trying to hunt them down and patch them
reaction items sometimes fail to prompt, issues with templates, and generally the faux items have issues with a bunch of modules
iirc, magic item module is yet not 100% compatible with v10. not sure, though. last update was 7M ago.
I think dnd5e 2.1 might be the biggest questionmark with it as the data validation thing got added then
Hrm, but maybe it might be fine for just custom items?
Do you know about Items with Spells module?
its basically the same thing only not broken, upcasting via charges is wonky
Items with Spells module? I'll look!
I'm looking at the Magic Weapon macro but its kiiiinda complicated, its doing a thing where it gives the user a prompt to select a weapon? I'd ideally like to skip this as this only applies due to the weapon providing the bonus
Is the weapon the magic item granting the bonus? Or is it a different magic item that grants the bonus on a success?
The weapon is the magic item granting the bonus.
If it is in theory easier to split off the item I can consider that, but ideally the workflow is something like, "Player clicks the use item icon in their sheet/hotbar, then selects apply active effect(?), succeeds at a DC 13 CHA check, if successful, then the weapon gets +1 for the duration (10 minutes concentration)
although for now I'm fine with just +1 from activating the item and roll separately
I think I managed to strip down the macro to something like:
if (args[0] === "on") {
const itemId = /* ??? */;
const weaponItem = targetActor.items.get(itemId);
let copyItem = duplicate(weaponItem);
const spellLevel = Math.floor(args[1] / 2);
const bonus = 1;
const wpDamage = copyItem.system.damage.parts[0][0];
const verDamage = copyItem.system.damage.versatile;
DAE.setFlag(targetActor, "magicWeaponBonus", {
damage: weaponItem.system.attackBonus,
weapon: itemId,
weaponDmg: wpDamage,
verDmg: verDamage,
mgc: copyItem.system.properties.mgc,
});
if (copyItem.system.attackBonus === "") copyItem.system.attackBonus = "0";
copyItem.system.attackBonus = `${parseInt(copyItem.system.attackBonus) + bonus}`;
copyItem.system.damage.parts[0][0] = wpDamage + " + " + bonus;
copyItem.system.properties.mgc = true;
if (verDamage !== "" && verDamage !== null) copyItem.system.damage.versatile = verDamage + " + " + bonus;
targetActor.updateEmbeddedDocuments("Item", [copyItem]);
}
// Revert weapon and unset flag.
if (args[0] === "off") {
const { damage, weapon, weaponDmg, verDmg, mgc } = DAE.getFlag(targetActor, "magicWeaponBonus");
const weaponItem = targetActor.items.get(weapon);
let copyItem = duplicate(weaponItem);
copyItem.system.attackBonus = damage;
copyItem.system.damage.parts[0][0] = weaponDmg;
copyItem.system.properties.mgc = mgc;
if (verDmg !== "" && verDmg !== null) copyItem.system.damage.versatile = verDmg;
targetActor.updateEmbeddedDocuments("Item", [copyItem]);
DAE.unsetFlag(targetActor, "magicWeaponBonus");
}
But I have no idea how to get itemID
that should be filled in in ddbi's macro
where did you get that
is the item always going to be a specific same item or does the user get to pick from their inventory items?
It's a sword
I copied from Magic Item that's in the D&D Beyond importer folder
If there's a MidiQOL compedium folder other than the Sample folder with Magic Weapon I don't see it.
Core from v10
But in anycase, it's a singular weapon, that when activated is supposed to give +1
If it is, then you can open the item and press the button to get the item id, which you can then paste in the macro
I mean maybe, but, wouldn't it be better if the macro can just get the current item?
this way I could copy and paste and reuse that code for other similar effects without hardcoding the ID
I have the Item Macro module enabled, and it should be possible to just use "item"
as this gif demos
well, that depends. Are you using the "equipped" flag?
yer not gonna wanna have that be on the weapon
have it be a feature that is rolled
and enhances the weapon
I'll try that
I have "Feature Attack" Action Type set to "Ability Check" but I assume it isn't a Saving Throw that I want?
you could also just manually handle this by putting the roll in the description and apply the ae when they succeed
cause this is gonna be involved to say the least
Seems like
regarding the id, shouldn't const itemId = args[0].item._id be sufficient to get the id of the weapon item that rolled the attack. Given it is used as a ItemMacro
no cause its not being rolled
weapons when rolled make attacks, so he needs to do a uuid
or define item as a getName
the feature will be doing the rolling and the args item would be the feature's id
I made a Feature that when activated creates an effect, but why does the effect appear twice? One for the "Feature" and then one for the "Effect" provided by the feature?
editing owned items in the pin wiki here
Nope I made the item in the Item menu
I had made it here and then dragged it into the Player sheet
those ae's are on an item by that name /shrug
your the one with the sheet you tell us 8)
The feature appears along with the ae that's provided by the feature
you can tell by the different icons
bag vs glowy figure
All I can tell you is you have two temp ae's applied from an item with the same name
Hrm one sec
I notice the Feature in the Item menu doesnt have a passive effect so you're probably right
is that forgotten odachi item type: Loot?
"Loot" is just a folder
it's not in the folder
There we go that fixed it
You were right, I must've edited the Feature as an owned item.
Do I need the Inline Roll Commands module if I want to have the player be able to click text in the description to roll a Charisma check?
Or does Midi or something else provide that?
that would make things easy if you used that module
what you need is for the feature to prompt an ability check and set the DC
cries in module bloat
have you not tried the ability check with a DC set and then check the box for activiation condition true for effect
at the bottom of the item
1 sec, I havent seen it, me very new to using the full powers of midi
there is a box towards the bottom that is something likeactivation condition true for effect activation or something
is it a straight ability check or a skill check?
cause thats the sucky part of ability checks on the item
you don't want to add an on use, magic weapon is a dae item macro not midi on use
or maybe I'm blind and it was there before
Activation Condition true checkbox is there
show me the whole details tab lol
set a dc
I checked it true, now I just need to figure out how to die it to a check
For Saving Throw?
its not really a saving throw I don't think
when you have it set to ability check I think it doesn't roll as a saving throw
if that doesn't work we just have to make an activation condition is all
probably `workflow.itemRoll > X
Hey I think it worked
It does say "Save" when you hover over the ability but when you activate it it only applies the effect on a success
however I notice it "concentrates" regardless of success or failure though
is it suppose to concentrate?
yes
the idea is its like when samurai jack meditates and is able to more easily strike down evil creatures with his sword
in that one episode
so for 10 minutes the sword gets +1
check conc at bottom?
I checked it, but the concentration status for the feature still appears
and the pop up saying "the character began concentration on..."
are the two concentration check boxes in conflict?
I think so
show me what it looks like in chat
do you have Combat utility belt or concentration notifier?
Concentration notifier
hehe
use midi conc, not third party concs if you want conc to be automated
Is that a module setting for midi?
Can you clarify your question? What do you mean by That
I think it has its own tab in workflow button doesn't it? if not its at the bottom of one of them
one sec
Clear out all the conflicting modules, if you have 1 you'd be likely to have more
I think I actually have none of those others π
Okay well thats unfortunate, seems like turning off the concentration module, and turning on concentration automation has broken the "Activation Condition true required" setting
show me the items details
