#MidiQOL
1 messages Β· Page 80 of 1
Ive got a bit of an issue with a macro for a homebrew ability, and it runs off a homebrew resource. Its supposed to ask for an amount of Holy Power use, then consume that amount from the tertiary resource value, then wait an amount of rounds equal to the resource quantity used, then does more damage the more resource that is used. However it keeps stopping after asking for the amount of Holy Power the player wants to spend. The description of the item is below, along with the file for the macro itself. Although I am using it with 'Item Macro' on the feature itself. I use Midi, ItemMacro, DAE, and most other automation modules. Using it in DND5e, but any assistance would be appreciated.
Having a quick read through, seems to me like you just edit the damageDice const you mentioned. Item's spell level is in args[0].castData.castLevel. What kind of scaling are you looking for?
Just 1d6 for each level after first (spell is first level)
Try this ```js
const damageDice = ${args[0].castData.castLevel * 1}d6
feels like the syntax is a crime against someone but my brain say it work
is cast level a string or number?
number
I wasn't aware you could use string literals when doing math as well
everything inside the ${ } is evaluated as a JS expression
so you can do anything in there, the result of the expression is converted into a string
Aah, thanks, I've pretty much only thought of it as "fancy string concatenation"
And if i'm getting "cannot read properties of undefined" error that means I need to assign castLevel first?
it means that likely, either args is empty, or args[0] does not contain castData
assuming its coming from that line, of course, and not somewhere else
Yeah, how are you executing the macro? It uses args so I am assuming it's a macro to be executed by the item rolled
yep, ItemMacro
ItemMacro alone does not have an args argument
that is solely provided by midi executing the itemmacro and inserting that argument
I'm not a prime Primate importer user, so I'm not familiar with the setup. Do you run said ItemMacro either through an effect or the item itself with midi on use macro?
Did it with item itself, should I try onUse?
Uuuh, brain fizzle, can you show me a screenshot of how you've set it up?
character sheet hooks in the item macro options need to be turned off to function with midi
If you get an error when rolling the item, you must be triggering the macro somehow
Can you export the item and DM it to me? That all looks right and the character sheet hook thing doesn't cause an undefined args error for me.
and check item macro settings plz
Hooks enabled, still no luck
You want it off
they were off, tried turning them on
you want that off
item macro is a module that midi only uses for storage its own features step on midi
Anyone here use dice so dice and know if macros with setDamageRoll make it visually wrong?
generally speaking if the error report is on Itemacro, then you have something wrong with itemacro
I think you might have had an old variable named resourceName that got deleted and remains remained, when I defined the resource I wanted to use (tertiary in this case) and await your damageRoll, everything seems to work
do anyy of your premades use that?
Tons of them
if you give me one I can test it hehe
Hex
Let me change this around, one sec
Here's the all-in-one, but I only changed the macro in ItemMacro really
Divine smite
Yep thats where I would change it anyway. The macro json file I attached was just for an easier look into the code.
Specifically the 3d dice getting the weapon die wrong
And not showing my addition to be roll
yes they are off
the damage in the formulas on the weapon are wrong
or more accurately just different
Weird, so it worked and put a damage card into chat, but didnt damage the target automatically or show the usual midi damage roll card.
It also didn't seem to consume the resource
I completely forgot where we are, you just rolled a dice and showed it with that last function there, you need midi stuff
I AM SURE CHRIS IS VERY HELPFUL HERE
For the resource consumption thing, there's a superfluous resource in your actor update in the update holy power section
@gilded yacht Is there anything that can be done about workflow.setDamageRoll and dice so nice. It looks like it's doing the dice so nice roll before macros finish their workflow modifications
yeah I even have the do not spoil setting on and it still is a mismatch but I personally don't care if they mismatch
I don't use dice so nice personally
I only use it for the sound effects on 1's and 20's
But I've had some people message me about it in relation to my module
It needs a DamageOnlyWorkflow, let me juuuuust remember how to fill that out, uno momento
Sure that would be great!
Here you go. I deleted the message outputs you had originally made yourself and put the flavor message into the damage only workflow. It outputs an auto hit message due to the nature of that workflow, unsure if that can be suppressed, but does generate a damage workflow. While dreading the answer, are you aware this wont work timing wise in actual combat? It has a timeout function for real lifeβ’.
Whatcha mean it wont work in actual combat? I just attempted and this works.
Shows a weird damage card of my DM portrait still though, but the other Midi damage card worked.
"after an amount of rounds equal to the amount of Holy Power", that after there is based on real life seconds
ohhhhh I see
I just let it sit and it rolls on its own... darn
I know it's possible but honestly not the best method of doing so. Can anyone pitch in here and help GamesAndCheese with doing damage with a feature x rounds later?
Create an Effect with the duration you need.
When the Effect is deleted, either with DAE and during args[0] === "off" or
with Effect Macro, onDeletion do the damage you need
That's not even a new fancy flag, I was expecting startling innovation π
Sooo, the duration is dynamic. That means it needs to be created with a macro, right? Can that be done by a player or does that need to be socketed? I might again be fishing hopefully for innovative change that makes this an easier gig
You just put the duration right there when you make it
I thought effects also counted as changes to other actors and had to be a GM thing
Yeah, does it change while the effect is active or something?
Nope, just creation, but if that's ok, it's much easier
Yes they are embedded documents. Is it targeted? Not self?
It is targeted, yes
But you are applying an effect anyways to a target via MidiQOL/DAE, so that part is already done, no?
To simplify, the feature is spend x of resource, deal xd6 damage to a target after x rounds
OK create the effect then with a MidiQOL socket
chest pain
Or update the effect before sending it out
That will be done on the feature's duration that will then pass the Effect to the target
Back to MidiSRD π
or via warpgate if easier!
(boils down to the same operation -- shunting to an owner who does the action)
Having fun with the shorthand warpgate example you shared Mr. Badger ```js
static async rayOfEnfeeblement(args) {
const { actor, token, lArgs } = MidiMacros.targets(args) ?? {};
if(!actor || !token || !lArgs) return ui.notifications.error("Something is wrong in the macro of the Item rolled; Notify GM");
const mutName = "debuff str";
const thisToken = token.document;
if (args[0] === "on") {
const findStrWeapons = (item) => item.abilityMod === "str"
const toShortHand = (shorthand, item) => {
const parts = item.system.damage.parts;
const versatile = item.system.damage.versatile;
const formula = item.system.formula;
shorthand[item.id] = {
'system.damage.parts':[[floor((${parts[0][0]})/2),parts[0][1]]],
'system.damage.versatile':floor(${versatile})/2,
'system.formula': floor(${formula})/2
}
return shorthand;
}
const hasMutation = (tokenDoc) => {
const stack = warpgate.mutationStack(tokenDoc);
return !!stack.getName(mutName)
}
const thisActor = thisToken.actor;
const weapons = thisActor.items.filter( findStrWeapons );
const entries = weapons.reduce( toShortHand, {} );
if (hasMutation(thisToken)) await warpgate.revert(thisToken, mutName);
await warpgate.mutate(thisToken, {embedded: {Item: entries}}, {}, {name: mutName, comparisonKeys: {Item: 'id'}});
}
if (args[0] === "off") await warpgate.revert(thisToken, mutName);
}
I just butcher everything to 1/2 damage and let MidiQOL handle the rest π
It just works even when halving a formula like 1d6[acid] πͺ
But I just realised that overrides on the Actor bonuses are not in there π©
AEs giving bonuses to mwak damage for instance
ahhh
yeah I have been looking at my screen for way too long...
follow a similar pattern used in toShorthand (or just lay out the data in place) and add to the ActiveEffect embedded key π
the mutating goblin example on the wiki being a good ref
once you start seeing warpgate as just something that takes a bunch of lego blocks of data, the process of creating that data becomes more generic and easier -- common algorithms like reduce are really strong when used with warpgate
oh yes will do, even though can be done differently with Midi. Good fun though!
whatever the best tool for the job would be
with the small caveat that a single warpgate mutation is transmitted as a single socket and can be awaited on the requesting client now!
I'm unable to make Midi run macros from effects each turn, testing with just this in an ItemMacro run by an effect only shows me args when they're either on or off, did I miss some development here?
console.log("###### Args ######");
console.log(args);```
Go to duration and choose one of the options for macro execute at turn start or end
The each will be run on the GM's client
I'm a dumb dumb, I had disabled times' up by accident, thanks!
Thanks @violet meadow @dark canopy @molten solar and @short aurora I am going to attempt some of the above discussion suggestions
I'm experimenting with the Midi sockets right now for better insight, if you don't end up finding a solution, I might tackle it later.
For the time being though, I can't seem to run removeEffects through the socket? Some of the samples have it, but maybe they're just outdated?
undefined. "removeEffects" is not a function.
Bloody see registered in socketlib though...
await MidiQOL.socket().executeAsGM('removeEffects', {'actorUuid': actor.uuid, 'effects': [effect.id]});```
Was this for my question about the spell? if so, where do i see this menu?
you need times up, dae, and maybe SC to have all the available special durations
and its a + symbol on the duration tab if you have them all
these are all mods?
yep, pretty core to midi builds
Thanks, the syntax was buggered in my attempts.
mmkay so have dae and SC (shared compendium?)
just got times up, lets check it out
hmm not seeing anything different in the details tab with times up added, is that SC for shared compendium or a different module? @vast bane
Not sure if this could be helpful but here is a macro for a different ability with similar functions for custom resource use associated to rounds used.
const options = Array.fromRange(actor.system.resources.tertiary.value, 1).reduce((acc, n) => {
return acc + `<option value="${n}">${n} Holy Power</option>`;
}, "");
const content = `
<form class="dnd5e">
<div class="form-group">
<label>Amount of Holy Power to use:</label>
<div class="form-fields">
<select>${options}</select>
</div>
</div>
</form>`;
const rounds = await Dialog.prompt({
title: "Consume Holy Power",
rejectClose: false,
content,
label: "Consume!",
callback: (html) => html[0].querySelector("select").value
});
if(!rounds) return;
await ChatMessage.create({
content: `Seraphim will last for ${rounds} rounds!`,
speaker: ChatMessage.getSpeaker({actor})
});
await actor.update({"system.resources.tertiary.value": actor.system.resources.tertiary.value - rounds});
return actor.createEmbeddedDocuments("ActiveEffect", [{
label: "Seraphim",
icon: "icons/magic/control/debuff-energy-hold-levitate-yellow.webp",
"duration.rounds": Number(rounds),
"flags.core.statusId": "seraphim",
changes: [
{key: "system.bonuses.mwak.attack", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: "+@abilities.cha.mod"},
{key: "system.bonuses.abilities.check", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: "+@abilities.cha.mod"}
]
}]);```
edit the post and after the first three backticks put js
Thank you sir! I knew there was a way and forgot how
I'm trying to make Versatile damage rolls work with midi by holding V. I've seen it work exactly two times and not since then. Can somebody help me understand what I'm doing wrong?
It's really frustrating me that I was able to make it work once and that I now can't repeat that; I'm not sure what I'm doing differently.
Isn't it shift by default?
Neither V nor ShiftRight works, afa have been able to determine
Well
V worked twice
And now does not
Screenshot the item's details
Could you DM me and export of the item?
Reaching out now
Looks like having charges is messing with it
Not sure why removing the charges fixes it. Maybe midi isn't respecting the key press after the use resource dialog pops up Β―_(γ)_/Β―
I guess it must be something like that. FWIW I can keep the 3 of 9 and still have it work correctly if I don't tell it those are "Charges"
So the sword is satisfied with 3 of 9 something-or-others
I think their issue is they are using a defunct branch of TAH to roll
I imported it into my test environment with just midi and it's requirements (and my module)
and it still had the issue
is it the sample?
not sure
it's whatever they exported
Removed charges and the pop-up dialogue went away, and holding shift made it roll the d10
The dialog is async and awaited. It will ignore what button was initially held unless saved to a variable beforehand.
So, midi bug presumably
I don't see a nine lives premade in any of the modules/links
People can just make stuff themselves too
to follow up, is the SC you mention Shared Compendium or something else? Cause I dont have a + symbol or a duration tab, just the normal Duration dropdown that comes standard
simple calendar
The item is imported from DND Beyond
test it yourself by adding charges to a versatile item
got it lemme grab
show us your duration tabb
Also happy to send you the item to look at, Moto
and then the Midi-qol Fields section with about 13 checkboxes
lets back up cause I have no clue what you are trying to do, and you are on items while I'm on active effects
oh i only have description, details and effects
what are you doing
trying to add a spell
to what?
im adding custom spells to use with some of the classes i added
drag it from the compendium to the actors spellbook
ok so what does this custom spell do?
oh I have that, isn't that a feature from monsters of the multiverse, the enchanter?
why do you want to automate this spell?
found it on GM Binder for the Witch
this feels like a totm spell
Seems like nothing to do
that spell could just be a spell description print out to the chat
I guess you could put advantage.check.cha on the target expires after the next charisma check?
I guess a midi advantage flag
but I honestly wouldn't even waste time on that, its never going to get used
well thats like one of 20ish spells lol
just make a basic spellcard for that and give it to the caster
similar things where its a buff or debuff until a certain thing happens
its not a spell though, its a feature
Do what moto suggested then
gotcha
Pretty sure something by the same name is on one of my humanoids from motm
my fave monster book
i dont doubt it honestly, some of these names look familiar lol
You'll sooner see a background feature get used before that thing, its got awful action economy and fast friends/charm person is better
good to know, still learning on my end lol
you could duplicate the charm condition and then edit it to be alluring charm, and set a special duration for next cha check
assuming you have dfreds CE installed and setup right
lol even dfred thought it wasn't worth automating lol:
what mod gives me those tabs?
they are the window for active effects
you just aren't looking at the right window
when you make a spell that has a duration and you want to apply an effect to a target or self, you click the wrench at the top and add a new ae
then you see this window
yeah I would just click the wrench and press the plus in the next window and then close them all out
you don't need to set flags for that feature
its a totm feature/spell
this might be a good time to casually mention that being new to foundry/dnd5e AND trying to use midi at the same time will cause a lot of confusion and frustration
for sure, definitely shouldnt have let them run custom classes lol
you dont need midi for custom classes π in fact, its likely easier without
honestly the people who go that route have never stuck around past the first few sessions in my experience
oh im just importing so much extra really
they are character makers not character players
idk i happen to like the Cook class, not a bad background character i can play as an npc
this is more general #dnd5e stuff, so i'll leave it with this: Learning foundry, imo, is best done as a group on the struggle bus. If a player wants to bring in a custom class, having them also be involved in creating the needed content will go a long way for learning foundry. (my group is using some homebrew classes, at char level 18 without midi and our combats rarely last more than a half hour)
yeah but if they have midi dnd5e lessons aren't going to help them
yeah, one of them wants to import the witch spells but doesnt know how, so i am trying to learn how to do it so i can show her
just say no to importers, build the content yourself
You'd have to make them all from scratch
even if you had an import for it, it wouldn't work with midi
you have to make them
or drop midi and go back to #dnd5e
yeah, thats what brings me to here to ask how to make the spells (when i say importing i mean me literally adding the stuff to foundry)
show us others and we can help but that charm one is kinda weak and pointless to make automated
fair point, looking at them they seem very straight forward, just remember its active
actual spells
does anyone else have midi srd installed, the fork?
can you import and edit charm person and tell me what the drop down says in the effect on it?
like what is the condition its set to apply
macro territory, honestly I now strongly stress that you should just say no to these players
i still cant find those tabs you mentioned, the only wrench i have on the create spell is for DAE
click the wrench, with NEW set in the drop down, click the + button to the right
in the new window you have the tabs
that flaming skull cantrip is going to be a pain in the ass to make or get made for you
You could just tell them it has to be necrotic not a choice and then its an easy build
strangulation is a simple make
nothing you have shown has warranted an active effect by the way
sorry im still not seeing what you're talking about with the wrench
show me your wrench button window
I'm starting to lean in badgers direction for suggesting you uninstall midi lol
or maybe im missing something lol
show me the top bar of your items
items? im still talking about spells
items in foundry is not the same thing as items in dnd5e
but to humor you, show me the top bar of your spells
click the wrench
when you do, click the + in the next window
then click the edit icon to the right of what you just added
active effects are meant for things that last a while
if the spell is instant, then you don't make ae's on the spells
your charm thing is a feature, not a spell
i literally mentioned all i had for a wrench was DAE lol
could have saved 10 minutes
did you find it?
yeah
for the record you can also edit and add ae's in the effect tab of an item(foundry term)
The dnd5e guys would tell you not to edit active effects on the actor fyi, you also shouldn't make items on the actor either imo
how does midi & foundry handle turns? like if an effect lasted one minute, would i input that as 10 turns? (6 seconds per turn)
I think you would be better served by talking with your players and asking them to run a lesser campaign/oneshot/multishot with just core vanilla stuff so you can get used to foundry
I personally am meticulous with my items with durations, I set their duration in seconds AND rounds, but you can also leave it blank as DAE will auto populate the duration for you if theres a duration on the ITEM
in the details tab of the item if duration is properly filled out the ae will populate with its seconds/rounds if you have DAE and midi enabled
yeah i was looking at that and wondering
however, if you are in combat, dae only populates rounds, and if combat ends before it expires, it never expires and you have to remove it, thats why I populate both
also having a grasp of vanilila can help you figure stuff out cause you can just plagerize midi srd
yeah when i asked the spell question initially i didnt know it was a midi thing, they sent me here
like that strangulation is basically a con save for damage, so something like thunderclap, or thunderwave would be similar
thought i was still doing base foundry
who told you to install midi?
i do like midi however so def not uninstalling, but will probably shy away from the complex stuff unless its something i gotta have
i was watching videos on mods and saw it and liked it
if you are homebrewing, thats the complex stuff lol
i like the auto rolling, how it tracks advantage/disadvantage, flanking etc
didnt know it was THIS complex when i downloaded it, but still like it
there are easier rollers
ready set roll for instance just throws two dice and lets you decide after the fact
alot less setup that way
but you can't use midi with it
New to foundry and transferring a game im running currently to foundry from roll 20. Im kinda just figuring out problems as they come. Right now im trying to automate the summon undead spell. But my specific issue right now is the festering aura. I simply cannot figure out how to setup the effects to apply poison within 5 ft at start of actors turns. Any help or tutorials would be much appreciated
So, I'll help you, and others here can help you even more, but I'll give you the single best advice I got when I transferred my game to foundry from roll20 last year.
100% automation is the path to madness.
Foundry can automate a lot, but trying to make it do everything will inevitable break other things, will cause a lot of things to happen you don't intend, and in your quest to automate all the things, you'll end up spending far, far too much time fiddling with it only to get a mediocre result.
Automate what is the most time consuming, most annoying, and most often forgotten, but if something can be done in a couple clicks, keep it manual.
Anyway, on to helping you with your issue.
@inner mulch Do you have Active Auras module?
Yes
I wouldn't use Active Auras for that.
I would use an OverTime effect triggering a macro to roll an Item (MidiQOL.completeItemUse) that would do the damage to targets 5 | ft | enemies
Can be done either way. I highly recommend OverTime, it's an extremely powerful tool. But it does have a learning curve.
would midi be the mod to track aoe field effects? i.e., token steps into aoe and something triggers?
Also does overtime have visuals?
you sure you want midi out of the gate like this?
Active Auras, Template Macros, or even maybe Monks Active Tile Triggers
CPR might actually have that spell
Negative, you'll need an animation module for that. I'm using Automated Animations
I'm getting some validation errors when trying to create an ActiveEffect with MidiQOL and I can't figure out if it's me or Midi, anyone can spot what's wrong? I'm trying to create an ActiveEffect with a flag with an itemMacro in it, so the effect can run said itemMacro upon expiry. This below creates visually, but errors with a 'Item5e model validation error: item5e.name and item5e.type may not be a blank string' and does not run said macro, despite it looking like it's there.
// Create the active effect as a "countdown"
const holyPowerSpent = 3;
console.log("#### HIGH ENERGY CREATING THE EFFECT ####")
console.log(args)
const effectData = {
changes: [{key: "macro.itemMacro", mode: 0, value: ""}],
label: args[0].item.name,
origin: args[0].item.uuid,
icon: "icons/svg/aura.svg",
duration: {"seconds":`${holyPowerSpent * 6}`},
flags: {
"dae": {
"itemData": {
"flags": {
"itemacro": {
"name": "Created ItemMacro",
"type": "script",
"scope": "global",
"command": "console.log(\"###### Args ######\");",
"author": "RvG7ixWXicSPF67m",
"_id": null,
"img": "icons/svg/dice-target.svg",
"folder": null,
"sort": 0,
"ownership": {
"default": 0
}
}
}
}
}
}
};
await MidiQOL.socket().executeAsGM("createEffects",{actorUuid:args[0].hitTargetUuids[0], effects:[effectData]})```
what is the validation error?
you are creating an item with the itemData object? (this is my ignorance talking, bear with me)
so one of the spells im adding, Bone Spikes (basically Spike Growth with a smaller radius and different dmg) does foundry naturally take into account the aoe left by the spell? like if a player moves into it, will the system make them roll the check, etc. and if foundry natively doesnt, how could i apply this?
just tested the spell Bone Spikes and Spike Growth and the first parts of the spell work (initial dmg/roll) but both spells have additional effects should a target move within,into or out of the aoe space, nothing occurs when i do this in game
This is the function ripped from the code in typescript, I know not if this is itemData, I'm using midi for this for the GM socket function essentially
export async function createEffects(data: { actorUuid: string, effects: any[] }) {
const actor = MQfromActorUuid(data.actorUuid);
for (let effect of data.effects) { // override default foundry behaviour of blank being transfer
if (effect.transfer === undefined) effect.transfer = false;
}
await actor?.createEmbeddedDocuments("ActiveEffect", data.effects)
}```
I have the others installed but i dont know if i have that. Will check
This all started because i wanted to automate summoning which i have now got.
i guess my question is, is it your intention to create an item? If so, the validation error is indicating that you did not give the itemData object a name and type field -- which is the name/type of the item containing those item macro flags
No, the effects I looked at, generated by an item with an itemMacro in it, seemed to store said itemMacro in flags, so I was trying to create an effect with said flag
Ok. so if you set up this OverTime effect on your monster, and set up the Active Aura like this, I believe that should work. You can set your own saveDC= or you can put a token attribute value in there.
effects do not contain macros as far as item macro is concerned, just items -- this may be the issue
(maybe you are looking for Effect Macro)
Complicated process, as far as I can tell, it's actually DAE that copies the flags from the items and puts them on the effect, herein including the item macro, so it seems doable? Although maybe I cannot create it with it and I need to set the flag afterwards?
^console dump of one of the effects applied by item rather than macro
and now i'm out of my depth π sorry
π All good, gave me an avenue to pursue
I will try that thanks
Original question, but just checked out other spells that apply fields to the ground that cause bad to happen when you move within or leave, those secondary effects arent triggering
did you use statusEffect for the key?
midi squashes them all into one if you use multiple statusEffect keys
havent touched anything in midi for this yet, just copied the spell setup as its very similar to Spike Growth (dmg, radius), asked in dnd5e and they sent me here
but noticed that spike growth, blade barrier, etc all have similar hiccups, those secondary effects arent triggering
midi doesn't do aoe placed templates, active auras or template macro does
got it, thanks
so it probably wouldnt be midi thats making Bone Spikes require an attack roll then im guessing? didnt see any fields for Spike Growth that i had checked that should be but theres no roll to hit on that spell
Question
My Gm was looking for a way to hide the damage numbers when his npc's take damage or heals , so instead of the number popping up it just says damage or healed. is this something Midi can do ?
no, but core can turn that off
ok tks
@vast bane using the flaming skull spell i linked before, decided necrotic fits better cause theres enough fire spells i think
not sure what buttons id remove, but id like to not make that mistake lol
Ohhh hold up
that item is also not even setup right
If itβs the range I fixed it
go to the Dm and player tabs of midiqol and stop removing buttons
you are removing the buttons that you could be using to popout and reuse attacks for
the effect transfer button could also be left on, and same with saves I think
honestly I think you'd be best served uninstalling midi
not happening, is this what you're referring to "removing buttons""?
think thats what youre referring to
hmm seems i had apply item effects off by default
ahh i see what you mean by pop out now, this could work
bro how the fuck did i just realize your profile is moto moto from Madagascar
damn, that is him isnt it lol
midi damage automation doesn't like reused buttons that aren't finished
I see, I turned them off earlier cause I didnβt want people to roll from the chat box but if it functions better with it on its no big deal
When I installed the mod the apply item effects was off, is this something Iβll be wanting?
Hey, having a bit of a weird issue and its been basically impossible for me to narrow down. Sometimes when rolling an attack, damage just doesn't roll. There's no errors in the log and its not consistent at all. Just wondering if anyone else has run into the problem and found a fix.
Predominantly happens to PCs if that helps.
my first thought is user error do the players know what they click to attack and damage?
Yeah that's what I was thinking but it happens to me sometimes too and I definitely know I'm pressin the right button haha. When I hit it again, it often works the second time around
i think one of the things that was happening to me and the damage was they had a reaction or something and it wouldnt do anything until the reaction passed
Could they be triggering a reaction on their own sheet when rolling an attack? The things they were fighting did not have any fancy reactions but pretty much all of them do
But I also feel like they'd say something about a reaction prompt popping up
reactions only trigger prompts for the victims
progress! everything working as it should except for the attack roll for the aoe which shouldnt be happening when the spell is cast.
Update, all figured out now, Fireball was the spell i should have used as the template, needed to change the action type to saving throw, now it works like other aoes spells
and ill just do the pop out thing you suggested for now until i learn more about making macros @vast bane
thanks for helping!
then don't set it as an attack roll
what is the spell?
it was bone spikes from earlier, i had it set to other as thats what spike growth was and it was causing a roll
looked up fireball and fireball has it as a saving throw spell, tested it and its worked since, casted it about 30 times now as im tweaking whats shown in the log
is there a way to update the dmg actually taken if the save is successful for the players to see? i get the GM box that shows me, but if im a player, it looks like i did 10 dmg when really it was 5
if you setup your settings right the players see a buttonless version of your gm card, you don't see that card as its pointless for the dm to see it
I don't know what your snippet is but I'm guessing theres a macro going on?
thats not an attack roll
you rolled 10
Thatβs the damage roll actually
The card I see shows the dragon took 5 dmg
I disabled the attack roll so thatβs no longer an issue, was curious because I see the actual dmg, 5 because it passed the check and only takes half of the 10 in pointing at
I guess I could always tell them but was curious
Anyone know if there is a single document with the whole API documentation? Like a massive google doc or something?
V10 API I mean,
I asked over in #macro-polo but was pointed over here. I'm looking to trigger an action when a token with a DAE effect misses an attack roll. This can quite easily be done by having the effect expire on attack Hit (with integration of Midi), but I'm having trouble finding a way to do it on a miss. Am I missing something obvious?
the player card does not display to the DM, it'd be too spammy, they see a card too if you set your damage settings right
If you set your damage settings right, you will see the left, and the player will see the right hand one:
Of foundry?
Nope, you aren't missing anything obvious.
It will need a macro to access the MidiQOL workflow to do something after an Attack misses.
What's your goal here?
So I got a hold of this module (And it is active) yet I don't really see / get how it is suppose to help me out. It does not seem to "separate" the damage. So when the Monk who is suppose to only deal +2d6 Radiant damage with his spear when said spear is buffed (By as I said; adding an effect which gives a +2d6 Radiant on MWD) - It still tries to apply that damage to his unarmed strikes (Which are also MWA) there is no "separate" card for the bludgeoning and radian damage portions as it's all MWD. I figured maybe I had some settings wrong by default with the Advantage Reminder but yeah as you can see; it does not really have a lot of options for me to work with, any clue what I might be doing wrong?
Just to get your original question straight, you have an item that can be "enchanted" with additional damage, but it should only be that item that receives the additional damage?
Yep.
I think Moto's suggestion was then to use Advantage Reminder to remind people to do it themselves manually. If you have an effect that's only supposed to hit one item, I think a macro (specifically Warpgate) would be your best bet for automating. You can tie that macro to an effect for duration purposes, I can see if I can find one of my old and repurpose them for you, give me a mo
I've tried this solution of yours for a similar thing. But I'm not getting it to work. Is this still working?
I couldn't find my example, but honeybadger was kind enough to show me an example of a Warpgate mutate back in v9. It's cloning an item for its' data, removing a quantity (because my guy was dual wielding the same weapon fuck him), adding a new damage part and name to show it's been enchanted and then mutate the item. Maybe you can use this to develop further? I'm not on v9 so I can't test anything from back then
let swordData = token.actor.items.getName("Scimitar").toObject();
//remove 1 sword from the stack
const newQuantity = swordData.data.quantity - 1;
//modify the quantity to 1
swordData.data.quantity = 1;
//add poison damage
swordData.data.damage.parts.push(['1d6','poison']);
//change name (ensures its not overwritten)
swordData.name = `Poisoned ${swordData.name}`;
//clear out ID so we do not UPDATE anything
//note: badger hates this and will try to improve
delete swordData._id
//craft updates
const updates = {
embedded: {
Item: {
[swordData.name]: swordData,
Scimitar: newQuantity > 0 ? {'data.quantity': newQuantity} : warpgate.CONST.DELETE,
}
}
}
await warpgate.mutate(token.document, updates, {}, {name: "Applied Poison"})```
Unrelated question, what is making the "succeeds" green in this screenshot?
I'm not too tech savvy so I may not get far with this but I will see what I can do and thank you ever so much for the assistance π
If it's a temporary enchantment, make an effect run the macro (key is something like macro.execute or macro.itemMacro if it's on the item) and add something like this near the end to undo the enchantment once the effect is gone
if(args[0] === "off") {
await warpgate.revert(tokenDoc); // tokenDoc here being the token's document of the enchanted weapon wielder
}```
It should!
Make sure that you DON'T have the Toggle to opt that bonus into when rolling option checked
Nope.
Quick check that it is actually set to a Ranged Weapon Attack in the details page of the Longbow.
I keep changing them to test various things and forget them, so you never know π
Do you set it up directly as a babonus on the Radier?
I've tried both directly on the raider and on an item on the raider...
I guess it could be some other module interfering or something like that.
At this point, I am testing with MidiQOL 10.0.33 and Babonus 10.4.6
If you are on these versions check with Find the Culprit and if nothing, ping Zhell in #dnd5e
Oh wait... I just randomly got it to work.
Not sure what I changed, but it seems to be working now. I must have done something.
Thank you for your patience. This was a clever solution!
good sir, did you try turning the router off and on again?
Is there any way to set resistance to all damage for a round using an active effect and midiQOL?
Never mind, found it.
Is it possible to auto roll healing for a spell whilst maintaining Auto Roll Damge = Never in Player settings for MidiQol?
It's a homebrew spell similar to Booming Blade.
Triggers on a failed ability check or attack roll rather than on movement.
I figured contested ability checks were too advanced for me right now, but was trying to automate the failed attack roll bit
@gilded yacht Hi, really like the new target token on use macros. But do you think it would be possible to move the call for isDamaged before the damage is applied? For example after the call to preDamageApplication on use macro?
https://gitlab.com/tposney/midi-qol/-/blob/v10/src/module/utils.ts#L729
If you think that isDamaged should stay there, maybe then add a new one that would be called before the damage is applied ?
There are some cases that a feature could prevent damage. In this case it needs to be called before the damage is applied but after effective damage has been computed. Because someone could be hit but immune to the damage so it would not be damaged, and in that case the feature should not trigger
The green in the image is the saving throw against the spell
Yeah thatβs what I have now but it still doesnβt show the actual dmg taken on a successful save
And @gilded yacht further to what @sudden crane mentioned, .33 is really close to being able to conditionally apply (dis)advantage to saves too.
The isSave trigger seems to be a tad late to impose that on the workflow though, as the dnd5e.preRollAbilitySave Hook has already been triggered by that point.
If there could be a trigger for needsSave or something like that, triggered when the rolled item.hasSave is true, would allow for a quick ```js
//NOTE TO READERS: NOT YET IMPLEMENTED.
//to give advantage on Saves when the attacker is a Demon.
const { options: {token:defenderToken, actor:defenderActor }, actor:attackerActor } = args[0] ?? {};
if (!attackerActor || !defenderToken || !defenderActor) return;
if (attackerActor.system.details.type?.value === "demon" ||
attackerActor.system.details.race.includes("Demon"))
Hooks.once("dnd5e.preRollAbilitySave", (actor,config,abilityId) => config.advantage = true})
Yeah. That I knew. Just that the text is not green for me. Assumed it was setting. π
ahh that i wouldnt know unfortunately, i probably have another mod doing the color thing and dont realize it lol
this is what i see on my end vs what the player sees currently, as you can see in the gm box on the left (youll need to click the image to see the whole thing), the actual dmg taken was 5, but the player sees 10 since thats what the dmg roll shows
additionally, did you get both those panes on one screen cause if so thats kinda cool
Yeah. I wanted to feed it to gpt-4 so it would have the latest api to help me write macros and a module Iβm working on. Currently gpt-4 only has data up to Sept 2021.
I can say with 99.99% certainty gpt macros won't work and if you try and ask for help in #macro-polo they're just gonna scrap it and create it from scratch
pleeeeeaaasseeee do not waste your time with chatgpt and anything technical
It's basically only useful for what you can google and get right away anyways
So in short, not foundry related macros
that's about right -- if a google result gives you the exact right answer on a "im feeling lucky", then maybe chatgpt can help
Do you have any suggestions on how to create an effect to replicate the rogue's evade effect?
"Beginning at 7th level, you can nimbly dodge out of the way of certain area effects, such as a red dragon's fiery breath or an Ice Storm spell. When you are subjected to an effect that allows you to make a Dexterity saving throw to take only half damage, you instead take no damage if you succeed on the saving throw, and only half damage if you fail."
thanks
this is precisely why I said to use AR and don't fast forward, then you can put the damage in a message in the damage popout for crit/normal
I've been burned too many times by macros messing up inventory of the players so I don't ever run modification macros of items anymore
If you don't fast forward, then you can setup situational bonus modifiers in the popouts like this, when you click the button it directly adds the dice into it:
Very macro lite for the people who don't know how to write macros and no danger of lost data or messed up items
looking to input the Misfire rule Mercer created for gunslinger, was told midi would be the right tool for this
"Misfire. Whenever you make an attack roll with a firearm, and the dice roll is equal to or lower than the weaponβs Misfire score, the weapon misfires. The attack misses, and the weapon cannot be used again until you spend an action to try and repair it. To repair your firearm, you must make a successful Tinkerβs Tools check (DC equal to 8 + misfire score). If your check fails, the weapon is broken and must be mended out of combat at a quarter of the cost of the firearm. Creatures who use a firearm without being proficient increase the weaponβs misfire score by 1."
I just use the chat description flair. As simple as it can be
yeah I'd use AR and IRC for that
thats alot of macro for something easily handled by the player
Having hopped onto Foundry now to try this - What you now have shown bellow is exactly the kind of thing I would consider to be "the optimal solution" (Due to it being no easy / direct way to just add the effect to a single item outside of macros) but I did not have a clue that the flag for adv-reminder was even a thing, but now that I see / get that it all checks out perfectly π Sorry about clearly then not understanding what you were on about, sometimes what should be simple details goes past me π
hmmmm I always just auto complete the url for his message lists..hang on let me find the url to the list
some of AR's keys are not auto completed by DAE
Kaelad hasn't submitted the newest ones
chat description flair?
Moto, can you grab a screenshot, not at my pc
the problem with gunslinger is honestly similar to Rexx's problem
you can only put ae's on actors and affect actors and the gun jam is weapon specific
thats a whole rabbit hole I would never go down
yeah i figured that would be an issue, whats this chat description flair thing, sounds like a good alternative
I'm not a fan of description usage in midi cause most players hide descriptions by default cause alot of stuff are walls of text
I really wish dnd5e would allow enriched text in the damned flavor field
What's the weapon's Misfire score?
Do you have it as a resource or something? Does it change?
for one gun its 1, 2 for the other, thats it
not doing anything more than basic pistol and musket
this is why I don't like utilizing descriptions in my game lol:
the barbarian attacks 3 times and spams 20 miles of text yey
So for the basic pistol if you the d20 result is 1, it misfires. Musket 2
could that be put into like an item that could be looked up instead for my situation? specifically the misfire rule and how it works
yeah
give me 5
if its a, if you roll this or lower, apply this ae then you could put all the IRC buttons in the description for dfreds CE and have it apply a ce
the secondary effects on needing to repair, the attack missing, that i can do manually if necessary, but if its too complicated thats fine
IRC being inline roll commands
but heres the problem, ae's are actor wide so if the gunslinger has 3 guns, hes affected on all 3
so if one breaks, they all would?
If you start modding items with macros shit gets weird fast in midi
then maybe like something they can click on and open describing the specific trait would be enough
If I had to host for a gunslinger, I would put a message in the attack saying HEY, if you roll this or lower your guns jammed dont continue
Maybe add another message that is apply if said number is rolled that is just a message on all popouts saying that Gun B is jammed currently
and then have an action item that unjams gun B removing the ae
it's a trap π
shit wrong reply...
lol
wait till you get to the point of having to reload guns
where did that message go...
well im wanting to add Reload as well lol
but i think thats a simply thing i could adjust on weapon properties
@digital lagoon I saw your message π
It's a trap π
nope has to be a macro cause what if they reload with a few bullets left in the chamber
so like Reload 4, on the properties of the weapon itself and just tell them
π deleted because I realized I was responding to something like 30 minutes old but Iβm glad you caught it
suddenly their 6 shooter has 9 bullets in the chambers
and it turns into the gun from who framed roger rabbit
go #tabletop-discussion you πͺ
The good news about reload macros is that zhells probably made it 20 times in #macro-polo
βYou can play a gunslinger until you run out of bullets in your first chamber. After that you class convert to a pistol-whipper because I donβt want to figure out how to reload.β
β¦ I need to make a spoiled inept rich gunslinger who throws his guns away every time he empties them and goes to buy new ones.
sounds like Bert from Tremors lol (actually not sure on the Bert lol)
Go reload yourselves
MidiQOL reload weapons with the Loading property.
Create an Item as you want it for the reload, probably a feature and make sure that you Target: empty | empty | Self in its details tab.
Add a MidiQOL macro onUse ItemMacro | After Active Effects and copy paste this in the ItemMacro.
const weapons = args[0].actor.itemTypes.weapon?.filter(i=>i.system.properties?.lod && i.system.uses?.value < i.system.uses?.max);
if (!weapons.length) return ui.notifications.info("No weapons to reload");
const options = weapons.reduce((acc, a) => acc += `<option value="${a.id}">${a.name}</option>`, ``);
const content = `<div class="form-group"><label for="pickWeapon">Pick a weapon to reload.</label><select name="pickWeapon">${options}</select></div>`;
const id = await new Promise((resolve) => {
new Dialog({
title: "Reload Weapons Dialog",
content,
buttons: {
confirm: {
icon: '<i class="fas fa-check"></i>',
label: 'Confirm',
callback: (html) => { resolve(html.find('[name="pickWeapon"]').val()) },
}
},
rejectClose: false
}).render(true)
});
if(!id) return;
const weapon = args[0].actor.items.get(id)
await weapon.update({"system.uses.value":weapon.system.uses.max})
I don't think you can do empty anymore, I think its none now but I'm being pedantic
Some alternative rules have them roll an acrobatics check to see how many bullets they reload
but I know macro polo has made that one
interesting, thanks
i think ill just add the Misfire rule description as a feature the players can look at if they have a question lol, much simpler
sidenote: "secret" blocks are perfect for keeping critical information shown in the chatlog π
or rather, keeping unimportant information hidden in the chatlog
yeah but we'd have to edit hundreds of items to wrap them all in secret
or macro it, but yea, just pointing that out -- quite useful
The flavor field shows always regardless of settings, but it doesn't allow enriched text
if we could utilize that field for modules like IRC then it could expand the cool tricks an AR/IRC user could do
Would I be right in assuming that the easiest way to do this would be to hook midi-qol.AttackRollComplete? If so I'll try have a play with it this evening
Kaelad has another module called Inline Roll Commands which plays really well with advantage reminder, you can have it link item rolls in the messages saving you from having to write macros.
So in the above discussion about gun jams you could make a feature that unjams the gun and have the message in the popout have a button that is [[/rollItem Unjam]] and if the item "Unjam" exists on the actor they will roll it
I"ve actually found it already to be useful. I've refactored some macros that I've written/adapted through it and it seems to have improved the code a bit. I also got it to write a mostly working module that incorporates ChatGPT when asking questions in the chat about D&D rules. I had to tweak it a bit to get it working 100% but it got me started.
right tool for the right job π im glad its useful -- also a pretty neat module overall
it needs a lot of work, the module. and no, the rules aren't 100% accurate all the time. What I'd like to to is figure out how to style the chat output to look like monsterblocks or spell blocks.
here's the manifest link if you want to check it out: https://github.com/ctbritt/gpt4-dnd5e/releases/latest/download/module.json
here's the sample output when I asked for "fireball" ```Fireball is a 3rd-level evocation spell that creates a burst of flame that spreads around corners. The spell has a range of 150 feet and affects all creatures within a 20-foot radius sphere centered on a point the caster chooses. Each creature in the area must make a Dexterity saving throw. On a failed save, a creature takes 8d6 fire damage, or half as much on a successful one. The spell ignites flammable objects in the area that aren't being worn or carried. The spell can be cast using a spell slot of 4th level or higher, increasing the damage by 1d6 for each level above 3rd.
Misfire for @broken wolf WITH Warpgate module.
Not exactly use Tinker Tools to fix, but a take on making an Ability Check (INT) against a DC of 8 + misfire score to "repair".
On the Item create a MidiQOL onUse ItemMacro | After Attack Roll
const misfireScore = 1; //change this between 1 and 2 or whatever you need.
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if (!actor || !item || !tokenUuid ) return;
const tokenDoc = fromUuidSync(tokenUuid)
if (!!d20AttackRoll && d20AttackRoll <= misfireScore) {
Hooks.once("midi-qol.RollComplete", async () => {
const updates = {
embedded:{
Item: {
[item.name]: {
name: item.name + " (destroyed)",
flags: {"midi-qol":{onUseMacroName:"[postActiveEffects]ItemMacro"}},
system: {
ability:"int",
actionType:"abil",
target: {type:"self"},
damage: {parts:[],versatile:""},
formula:"",
save: {ability:"dex",dc:8 + Number(misfireScore),scaling:"flat"}
}
}
}
}
}
await warpgate.mutate(tokenDoc ,updates,{},{name:"boom gun"});
})
}
if(!d20AttackRoll && this.saves.size > 0) await warpgate.revert(tokenDoc,"boom gun")
look how CLEAN IT IS
This will change the Item from a weapon to an Ability Check.
Granted, it is not a Roll Tinker Tools but an Ability Check
[`${item.name}`]: {
to
[item.name]: {
the brackets say "treat this as a string"
you were taking a string, converting it to a string, and then telling it to treat it as a string π
Yeah! Did this change at some point? At first I had an issue with that
furthermore, as you integrate WG, stay mindful of the event system -- when used within a module, it can make some "reactive" or "long term" operations much easier
it shouldnt have π€ this is plain JS syntax
Either a hook or an Actor onUse MidiQOL macro, triggered After Active Effects, checking the size of this.hitTargets.size < 1 and then doing whatever.
that looks really cool, lemme grab that module
mmkay got the warpgate module, item in question is open, not seeing a spot to put the macro on the item, have Midi QOL Fields at the bottom with a bunch of check boxes
Do you have the Item Macro module?
you can use a world macro if you dont have item macro
(give it the name of the macro, instead of "itemmacro")
have the item macro module installed
If ItemMacro is active in your world, on the title bar of the Item, there should be a button for ItemMacro
ahhh there we go
Make sure that in the settings of Item Macro module, the checkbox for Character Sheet Hook is NOT checked
yeah currently nothing is checked there
Copy paste the macro in there then and in the Item's details tab, at the bottom, click the + to create an entry
ItemMacro case sensitive
that option isnt appearing
MidiQOL settings => Workflow Settings => Misc tab.
Check at least the second of these two boxes
there we go
in this case Musket, is it case sensitive? or do i leave as is in image (thinking i need to put the actual item though)
and then this one, if i put it at 2, will it trigger the macro on a 1 or a 2 or just the 2?
need to change the following line to accomodate "roll at or under"
!!d20AttackRoll && d20AttackRoll === misfireScore
to
!!d20AttackRoll && d20AttackRoll <= misfireScore
can you rephrase? that line is changing the "Musket" item name from "Musket" to "Musket (destroyed)"
oh im wondering if i need to put the actual item name where it says item name or just leave it as item name
shakes head, nope, item is the Item5e object, with a name property
specifically, item is the item being rolled currently
so right click compendium, get name from there?
nope, dont touch that line π
Yeah you don't need to change anything in the macro except for the misfireScore to accommodate easier testing π€
including this change? #1010273821401555087 message
yeah only changed the === to <= and the 1 to a 2 at the top
Actually for easier testing you can change to this too π js if (!!d20AttackRoll && d20AttackRoll === misfireScore) { to ```js
if (!!d20AttackRoll) {
whenever it's an actual attack go for the mutation π
so testing now and nothing happens when i roll a 2 or lower
(check console for errors)
If you want, export your Item (move it on the sidebar, right click, export) and send it to me with a DM to check how it's set up
I will be AFK for some time π
@dark canopy i remember reading how to do that somewhere, one sec lemme see if i can find again lol
(and I can assist with warpgate operations, but nothing relating to the midi api)
F12
yeah nothing happens at all in the console when i click on execute macro
you dont execute the macro directly
you roll the item, which executes the macro
(normal item macros can be done that way, but NOT if midi is involved)
yeah i did that to, trying to roll it again and see what console says
from rolling a 2
@gilded yacht Another request, would it be possible in remote completeItemUse to return the equivalent of args[0] instead of true (https://gitlab.com/tposney/midi-qol/-/blob/v10/src/module/GMAction.ts#L164). This would allow the caller to get some info about what happened in the remote workflow.
Depending on your use-case, you can have an actor roll another actor's item locally with a synthetic duplicate of the item.
Actually, looking at my fire aura, it doesn't even need to be a synthetic item, you can roll it without permission issues
so what that ended up doing is applying the poison then having them test out. i cant figure out how to reverse that, test to apply the effect and then remove it at the end of their next turn. what i really need is something that explains the effect value box as understanding that would really help towards using active effects but i cannot find anything about that box, it all talks about the attribute keys.
the pins in #dnd5e has a good guide for AEs and how to create/configure them
midi flags not withstanding, as they are added by midi -- so look for its documentation regarding its specific effect keys
curious: why did you search for the loading property and not the reloading property, since they're different.
Loading. Because of the time required to load this weapon, you can fire only one piece of ammunition from it when you use an action, bonus action, or reaction to fire it, regardless of the number of attacks you can normally make.
Reload. A limited number of shots can be made with a weapon that has the reload property. A character must then reload it using an action or a bonus action (the characterβs choice).
Wouldn't it make more sense to search for the rel prop?
True. I hadn't considered that at all, as this was an ask from an user to tie it to weapons with the loading property
i think loading is more like for crossbows, which require time and a crank, etc. to reload. reloading is like adding bullets to a chamber, which can fire quickly, no?
loading is a weapon property that says "barring exceptions, this weapon can only attack once per turn"
right. I thought we were talking about pistols. I would guess if you're talking about a musket or other single-shot firearm, you'd want the loading prop, as well.
should be easy enough to check for proficiency as well with the weapon, since RAW says misfire score is +1 if not proficient.
thats literally my next ask once i nail down this misfire thing for my musket and pistols lol
yea.
let misfireScore = 2;
if (!item.system.proficient) misfireScore += 1;
But move these 2 lines, after the item has been declared (and delete the const misfireScore = 2;)
Just a sidenote, as I was developing this based on my MidiQOL settings, the MidiQOL workflow needs to be completed before the warpgate mutation takes place.
So if you are not checking hits or rolling damage automatically, you might need to actually clcik on the damage button on the chat card to make it "complete"
Misfire not 100% RAW π
```js
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if (!actor || !item || !tokenUuid ) return;
let misfireScore = 2;
if (!item.system.proficient) misfireScore += 1; //if not proficient the misfireScore is +1 to the normal.
const tokenDoc = fromUuidSync(tokenUuid)
if (!!d20AttackRoll && d20AttackRoll <= misfireScore) {
const updates = {
embedded:{
Item: {
[item.name]: {
name: item.name + " (destroyed)",
flags: {"midi-qol":{onUseMacroName:"[postActiveEffects]ItemMacro"}},
system: {
ability:"int",
actionType:"abil",
target: {type:"self"},
actionType: "other",
damage: {parts:[],versatile:""},
formula:"",
save: {ability:"dex",dc:8 + Number(misfireScore),scaling:"flat"}
}
}
}
}
}
await warpgate.mutate(tokenDoc ,updates,{},{name:"boom gun"});
}
if(!d20AttackRoll && this.saves.size > 0) await warpgate.revert(tokenDoc,"boom gun")
Can someone try this?
how would you change the misfire macro to automatically miss if you roll below the misfire score?
hah; and you just did it.
I thought the misfire score is 1 or 2 or +1 to these if not proficient
yes,for the musket is misfire 2 and then the proficiency thing, regular pistol is misfire 1
does midi have a way of prompting damage type for chromatic orb and applying that type to the damage applied?
there are premades for that one
Sources of premade stuff for Midiqol:
Midi Sample Items Compendium(comes with the module)
Midi SRD's compendiums(this is the manual install link)
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json
More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats
Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros
Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros
Chris' Module form of his macros:
https://foundryvtt.com/packages/chris-premades
Activation condition examples by ThatLonelyBugbear
https://github.com/thatlonelybugbear/FoundryMacros/wiki/MidiQOL-activation-conditions-examples
I thought there would be, but i couldn't find that list in the Pins
do you happen to know which compendium it's in, i've checked "more automated spells", "chris' premades", and "Midi Srd"
oh, it's in the D&D beyond importer
reading through https://gitlab.com/tposney/midi-qol/#notes-for-macro-writers
it seems like id be better off without dice so nice or am i misreading?
100% working together
so im fine to keep it?
yeah
@violet meadow : how would one interrupt the workflow to make it miss if the misfire score target was hit. Since RAW says on a misfire, it automatically misses. I'm thinking something like this?
let { hitTargets, d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if ( !actor || !item || !tokenUuid ) return;
let misfireScore = 2;
if ( !item.system.proficient ) misfireScore += 1; // if not proficient the misfireScore is +1 to the normal.
const tokenDoc = fromUuidSync( tokenUuid );
if ( !!d20AttackRoll && d20AttackRoll <= misfireScore ) {
hitTargets = [ ];
const updates = {
etc, etc...
but that doesn't seem to be working. the target is now making the dex saving that gets added to the firearm via warpgate.
basically just needs to end workflow if (!!d20AttackRoll && d20AttackRoll <= misfireScore) evaluates true
yeah I know. Don't have time to tinker with it now anymore.
That's why I had it Hook on midiQOL RollComplete initially.
i'm just playing around with it.
You can return false in the workflow before DamageRoll
Try adding thisHooks.once("midi-qol.preDamageRoll", () => { return false;})
and then the Hook for roll complete
holy crap, i was just trying to figure this out
sucks there's no obvious way it seems
like this? ```js
const tokenDoc = fromUuidSync( tokenUuid );
if ( !!d20AttackRoll && d20AttackRoll <= misfireScore ) {
Hooks.once("midi-qol.preDamageRoll", () => { return false;});
const updates = {
we had it working at one point, but when we adjusted for the misfire roll it stopped
not sure where the roll complete hook would go, tbh. Right now, I've got it set to roll before the damage roll instead of after the attack roll.
atm all im getting is the warpgate to trigger when i make the roll, but no saving throw or item break
here's my modification so far:
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if ( !actor || !item || !tokenUuid ) return;
let misfireScore = 2;
if ( !item.system.proficient ) misfireScore += 1; // if not proficient the misfireScore is +1 to the normal.
const tokenDoc = fromUuidSync( tokenUuid );
if ( !!d20AttackRoll && d20AttackRoll <= misfireScore ) {
Hooks.once("midi-qol.RollComplete", () => {console.log("BOOM GOES THE DYNAMITE")});
const updates = {
embedded: {
Item: {
[ item.name ]: {
name: item.name + " (Misfired - Needs repair)",
flags: { "midi-qol": { onUseMacroName: "[postActiveEffects]ItemMacro" } },
system: {
ability: "int",
actionType: "abil",
target: { type: "self" },
// actionType: "other", // This is a duplicate key, please remove or rename it
damage: { parts: [ ], versatile: "" },
formula: "",
save: { ability: "dex", dc: 8 + Number( misfireScore ), scaling: "flat" },
consume: {
amount: null,
target: "",
type: ""
},
uses: {
max: "",
per: "",
recovery: "",
value: null
}
}
}
}
}
};
await warpgate.mutate( tokenDoc, updates, {}, { name: "boom gun" } );
}
if ( !d20AttackRoll && this.saves.size > 0 ) await warpgate.revert( tokenDoc, "boom gun" );```
in the empty line in between
wrap the updates and warpgate mutation in the completeRoll hook
as you see, i changed the consume and uses props as well so that when you roll to repair, it won't consume ammo.
are you changing the dropdown to before damage roll on the details tab as well?
yes.
go from here.
wait what now?
this is how I have it set up:
this is for a pistol that I see as kind of a revolver
guys, i figured out how to do it
the abandon workflow thing
if that's still what we're talking about π
testing this now and a 2 isnt triggering the saving throw roll
if you've got a musket or single shot pistol like a flintlock, you can give it the loading property and set it to 1 of 1 charge. And be sure it set it to use whatever ammo you have set up
note, i removed the item macro into a separate macro called "misfire"
how does it work, @vague relic
aahhh
i added lead balls as an ammunition for the musket, it should appear in the 2nd dropdown in resource consumption?
You can also just use ItemMacro and paste the macro in the Item Macro field.
i separated them because I got tired of three clicks to open the macro.
Define workflow, then set workflow.aborted to true
const workflow = MidiQOL.Workflow.getWorkflow(args[0].uuid);
const condition = true
if (condition) { workflow.aborted = true }
this is what i have setup now
awesome, @vague relic
I"m going to look at the reload macro @violet meadow posted and make it consume the right ammo as well.
but that's a later project.
if you just type MidiQOL.Workflow in the console and press enter, you can click the result, and get this, which defines all the stuff you can do with the Workflow function
Mind you that if the workflow is aborted like that, the roll complete might not trigger.
Can you test that to be sure?
how would i go about that?
What are the exact misfire rules you guys are trying to emulate? π€
@hot flower howd you get the item destruction thing on there?
and the dropdown for the 2nd resource consumption tab, mines empty when i click lol
Hooks.once("midi-qol.RollComplete", () => {console.log("BOOM GOES THE DYNAMITE")})
add that after
@kind cape im trying to get as close to this one as i can
Misfire. Whenever you make an attack roll with a firearm, and the dice roll is equal to or lower than the weaponβs Misfire score, the weapon misfires. The attack misses, and the weapon cannot be used again until you spend an action to try and repair it. To repair your firearm, you must make a successful Tinkerβs Tools check (DC equal to 8 + misfire score). If your check fails, the weapon is broken and must be mended out of combat at a quarter of the cost of the firearm. Creatures who use a firearm without being proficient increase the weaponβs misfire score by 1.
love that string
roll does complete
So we can trigger before check hits and abort then
Why are we hooking roll complete then? π€ If the attack is missing when we misfire we can just hook preCheckHits and abort the workflow there, then do the item mutation at the same time
Can set fumble to true as well. Although if you have other things checking for fumbles that would be an issue
That will at least run more of the workflow
yeah its not a fumble always π€·
game.user.updateTokenTargets(targets) should change the targets of a workflow if run early enough right?
Mind you that it needs target IDs, but yes
preambleComplete most of the time is fine
just updated the macro, @violet meadow and @broken wolf ... working well for me.
see the edited version up above.
gonna test now
Yea, trying to figure out where I went wrong. It should just rewrite all the selected targets right?
Not just add to it
magically i cant roll a friggin 1 or 2 now lol
okay theres a 1, no trigger for the saving throw
You need to pass it an array of the final targetIDs you need. Otherwise it wont do anything.
Doesn't hold any info about already targeted ones
Yea doing that
the saving throw doesn't happen when the item misfires. It's a separate action. the macro mutates the pistol (in this case) so that when you click it again, it will roll the dex saving throw.
Just wanted to make sure it wasn't adding, but totally changing the targets
@broken wolf just messaged you a json of a sample pistol
You aren't hooking anywhere with that edited one π€
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if ( !actor || !item || !tokenUuid ) return;
let misfireScore = 2;
if ( !item.system.proficient ) misfireScore += 1; // if not proficient the misfireScore is +1 to the normal.
const tokenDoc = fromUuidSync( tokenUuid );
if ( !!d20AttackRoll && d20AttackRoll <= misfireScore ) {
// Hooks.once("midi-qol.preDamageRoll", () => { return false;});
Hooks.once("midi-qol.RollComplete", () => {console.log("BOOM GOES THE DYNAMITE")});
const updates = {
embedded: {
Item: {
[ item.name ]: {
name: item.name + " (Misfired - Needs repair)",
flags: { "midi-qol": { onUseMacroName: "[postActiveEffects]ItemMacro" } },
system: {
ability: "int",
actionType: "abil",
target: { type: "self" },
// actionType: "other", // This is a duplicate key, please remove or rename it
damage: { parts: [ ], versatile: "" },
formula: "",
save: { ability: "dex", dc: 8 + Number( misfireScore ), scaling: "flat" },
consume: {
amount: null,
target: "",
type: ""
},
uses: {
max: "",
per: "",
recovery: "",
value: null
}
}
}
}
}
};
await warpgate.mutate( tokenDoc, updates, {}, { name: "boom gun" } );
}
if ( !d20AttackRoll && this.saves.size > 0 ) await warpgate.revert( tokenDoc, "boom gun" );```
(For testing macro's I recommend getting DF Manual Rolls, its very useful for when you need a specific value)
and I set it back to AfterAttackRoll for when the macro triggers
Still you aren't aborting anywhere
and the hook once is only to show the console log
ah, i see what you mean.
hm. i'm just not getting this hook business.
where it's supposed to go.
isn't all the warpgate stuff supposed to go inside the hook callback function?
Change to ItemMacro | Before Check Hits ```js
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if (!actor || !item || !tokenUuid ) return;
let misfireScore = 2;
if (!item.system.proficient) misfireScore += 1;
const tokenDoc = fromUuidSync(tokenUuid)
if (!!args[0].attackRoll?.dice[0]?.results[0]?.result && args[0].attackRoll.dice[0].results[0].result <= misfireScore) {
this.aborted = true;
//Hooks.once("midi-qol.RollComplete", async () => {
const updates = {
embedded:{
Item: {
[item.name]: {
name: item.name + " (destroyed)",
flags: {"midi-qol":{onUseMacroName:"[postActiveEffects]ItemMacro"}},
system: {
ability:"int",
actionType:"abil",
target: {type:"self"},
damage: {parts:[],versatile:""},
formula:"",
save: {ability:"dex",dc:8 + Number(misfireScore),scaling:"flat"},
consume: {amount: null,target: "",type: ""},
uses: {max: "",per: "",recovery: "",value: null}
}
}
}
}
}
await ChatMessage.create({content:${item.name} explodes in your face});
await warpgate.mutate(tokenDoc ,updates,{},{name:"boom gun"});
// });
}
if(!d20AttackRoll && this.saves.size > 0) await warpgate.revert(tokenDoc,"boom gun")
See if that does it and cleanup later π
It will say that you tried to hit yourself when it fails though π
That's why its better to Hook on rollcomplete for the mutation
@hot flower in the above I have commented out the Hook position
Yeah it isn't working with the Hook. That's what I was remembering. Aborting the workflow, will not let as reach RollComplete π€
Why do you want to reach RollComplete? π€
Cause you will be mutating the item mid workflow otherwise with some possible side effects
Hmm π€ True.. But since the workflow is aborted I would not expect it to make any difference π€
it seems to be working ok. but yeah, it's trying to hit the attacking player. It's missing, given it's a 2, but still...
instead of a straight dex save, i assume it would be pretty easy, once you have the boom gun mutation, to add an activation check for possession of Tinker's Tools and only allow the dex save if they're present?
or are we getting just way too complicated
by the way, when I dropped the macro into GPT-4 and asked it what it thought of the macro, this was the response: ```This JavaScript macro appears to be for a game system that uses d20 (20-sided dice) rolls. The macro simulates the misfire of a weapon, which occurs when the attack roll is less than or equal to the misfire score.
-
The macro first destructures variables from the current context: d20AttackRoll, item, actor, and tokenUuid. If any of these variables are not defined, the macro ends.
-
The misfire score is set to 2, and if the item's system.proficient property is false (meaning the actor is not proficient with the weapon), the misfire score is increased by 1.
-
The macro retrieves the token document by calling fromUuidSync(tokenUuid).
-
The macro checks if the attack roll from args[0].attackRoll.dice[0].results[0].result is defined and less than or equal to the misfire score. If so, the macro does the following:
a. Sets the aborted property to true.
b. Constructs an updates object that marks the item as destroyed, sets flags, and adjusts other properties of the item (such as ability, action type, target, damage, formula, save, consume, and uses).
c. Sends a chat message indicating the item exploded in the user's face.
d. Calls warpgate.mutate with the tokenDoc, updates, and the name "boom gun" to apply the updates to the item. -
If there was no attack roll and the saves size is greater than 0, the macro calls warpgate.revert with the tokenDoc and the name "boom gun" to revert the previous updates.
The macro appears to be designed for a game using the Foundry VTT platform, and the code is written to work with the Midi-QOL module. Note that the Hooks.once part is commented out, so it won't be executed.```
which is... pretty good!
next step would be to make it a world macro and run every time you roll an attack, and look for an AE called "misfire" with a value set to the misfire score. maybe something like this:
if you are going world script already -- might as well insert a new weapon property and misfire score field to weapon type items π
hello! I'm messing around with the fog cloud spell (which increases range on upcast rather than damage). I'm stuck on how to actually change the '20 ft sphere" of the item (at level 1 cast) to a "[20 * spellLevel] ft sphere".
if (lastArg.tag === 'OnUse' && lastArg.macroPass==='preItemRoll') {
const wf = await MidiQOL.Workflow.getWorkflow(lastArg.uuid);
// spell range multiplies by upcast level (base 20)
const newValue = 20 * wf.castData.castLevel;
wf.item.system.target.value = newValue;
}```
doesn't seem to be changing the template placement on the canvas. I am hoping not to make a worldscript for a single spell hooking to `midi-qol.preTargeting` - any pointers?
Oh, yeah, i guess you could do that
How are you calling this?
ItemMacro from an OnUse of 'Called before the item is rolled'.
Then you should not need the initial if statement, unless you have other things in the same ItemMacro π€
With that being said, at a glance it looks correct
there's another section to remove targets after the targeting is complete because i'm using an aura to apply the blind condition.
is there a method that will update the item in the worklow? debugging in the 'after targeting complete' shows no changes to the item.system.target.value have been made.
Im trying to install this modules in foundry but can't do it, Im not sure why. Im using Foundry v9, but I should be able to install them.
Im getting:
- Midi SRD's Compendium: "Installation failed: k is not defined"
- More Automated Spells Items and Features compendiums: The download don't end never (I'm using the manifest to version for foundry 9 - https://github.com/jbowensii/More-Automated-Spells-Items-and-Feats/releases/tag/1.1.0)
- Mr Primates: I can't install this, right?
- Chris' Premade macros: Same than above.
- Chris' Module: The 84 tag versions has the same manifest and Im getting the "Installation failed: k is not defined"
Can you help me? I want automatizate the bardic inspiration
sorry but those links are for people who are on current versions of foundry and midi, legacy builds are on your own.
ironically the official published midi srd should be useable by you as its v9
Your foundry install might be out of date too
but bugbears fork of it is v10
The newest v9 should properly say it's for a newer version
The official midi has a bardic inspiration but I can't get an "roll for bardic inspiration" or anything similar
But otherwise yes, most of those are V10 only
It only has a effect
I have no way of helping you with v9 as I don't have an install of it π¦
I dont know what means "k is not defined" in module installation
Im using better roll and midi yes
k is not defined was an issue with earlier v9 builds when v10 was released, they changed manfiests for modules and it is an error message basically telling you that you can't use them
and I know my world will be broken when I update the foundry version
they are for v10 foundry
nice
when and if you update you have to either ditch midi or ditch better rolls so I honestly don't think you can do anything with modern stuff, you are stuck living in that legacy build anything you install will likely disrupt that fragile setup
BR and midi compatibility was always a happy side benefit, the new BR absolutely cannot run with midi
how many modules do you have?
I updated with 78 installed, was not bad at all but I was very very ready for it.
I also had a week vacation from hosting that let me do it
I'm not touchin that statement lol
I have no idea what your world is about nor your module combos
backup your entire data folders and then try it /shrug
I mean, you said BR is not working in fv10
as long as you backup, nothing can harm you in trying to update
unless you are on a hosting service then god I have no idea
I dunno if they let you go back
well, for the moment ill try to get the bardic inspiration and when i have time ill try to update
i host locally
ready set roll is the spiritual successor to better rolls. it works fine in v10 but it cannot exist in a world with midi
illl be fine without ready set roll nor better roll
im getting tired of it anyways
RSR has effect transfer br didn't
I'm trying to add a flag (to work with Midi-QOL) to one of my players' weapons. I cannot, for the life of me, figure out where to use a specific flag, let alone how to customize these flags so I can do it with other items and other effects whose automated functionality isn't completely working "out of the box". Can someone direct me to the right place or a tutorial of how to learn to venture into customization using flags?
For this specific situation, one of my players has the Crossbow Expert feat. When they make a ranged attack with an enemy within 5ft, the attack is being automated, through Midi-QOL, as a disadvantage attack (disregarding the Crossbow Expert feat). I'm trying to add the "flags.midi-qol.ignoreNearbyFoes" to said PC's hand crossbows to bypass the forced disadvantage on an attack roll.
there is a key for crossbow expert
just try dae auto complete till you find it
probably nearby should get you it
make an active effect on the crossbow expert feature, have it apply on equip, and make it this:
oh I wonder if we could use an evaluation here @violet meadow , could we make that only ring true if they have a crossbow equipped?
oh nm then
the user should not put it on the weapon, it should be on the crossbw expert feature
Can someone explain the flags.midi-qol.onUseMacroName flag to me? I'm calling my macro, but it's not calling at the right macroPass. I've tried putting macroName,macroPass in the field, but the documentation seems to explain that you just put the macro name in the field, and then do an if statement to do it at the right pass
because weapons can be traded
that key is the same thing as an actor on use macro
are you using the right macropass in the ae?
when does your macro need to be set to?
Comma after the name to specify the pass
well share the macro I guess and someone can tell ya
For example
like this?
ConSaveSpells,preItemRoll
Yep
shouldn't there be a space?
Nah
that's not working for me
if its not working then the macros not just preItemRoll
it also may not work cause you haven't applied it to the actor
Keep in mind if it's set to item macro it'll run the item macro on the item
if you never set the item to apply on equip the actor doesn't have the ae on them
Not the feature
the actor has the ae, and it's a world macro
are you sure its just a preItemRoll? do you get any errors?
checking the workflow, it says the onuse macro is Post Active Effects for some reason
Edit the effect on the actor to make sure
are there two macros at play?
Workflow in console is lazy loaded by the time you see it it's done with everything
could the item roll have a macro and then theres an actor one
That would do it
π€¦ββοΈ
ty guys
now we get to watch bugbear respond to the ping in a few hours
Assuming the item is in the evaluation options easily
I think the workflow is on there
So it would be like workflow.item.type === whatever
Not at PC to actually check and verify that
I was gonna go after the actors data instead
but good point it would have to be part of the workflow
my macro is still causing me issues. Earlier, setting workflow.aborted = true at preambleComplete worked for stopping the rest of the execution of the spell, but now it's not working
but it doesn't matter I misassumed it was crossbows only
basically it's a con save to cast a spell macro for Power Word Pain
trying to stop the workflow from doing anything if they fail that save
that's from when i was trying to figure out how to do it. The documentation does it that way
You can replace js const workflow = MidiQOL.Workflow.getWorkflow(params.uuid);
With js const workflow = this;
As well
does that just work with any on use macro?
Yep
Also
Origin item would just be js this.item;
No need to do a uuid lookup
Depending on the context of that effect
wouldn't that be the spell currently being cast, not the item that the effect is from?
Assuming this is an on use macro on the item and not a macro run via a DAE flag
it's the latter
Then you're good in that regard
the main thing is the workflow just continuing after setting aborted to true
Is the intent for the spell to have this check?
I want the actor casting the spell to have to pass this save in order to cast the spell
Or another effect causing them to have to make this check
latter
So the spell wouldn't always have this?
This is an actor on use macro that is applied via ae. It's supposed to check when the actor rolls an item, if the item is a spell. If it is, the actor has to succeed a Con save, or the spell isn't cast.
On use macros are good to still use this
What's the effect look like?
Could I see the details on it?
Yeah, i've got that part down, it's the abandoning workflow after failing the saving throw that I'm stuck on
this.aborted = true``` should do it
that's what I have, still no dice unfortunately
it's still rolling damage, and applying it
Check to see your if statement is actually working
it is
Don't do the hook
I can just tell because it's posting the chat message that happens right before this.aborted is called, and when i look at the args, aborted = true
Also fair. I'm the one doing all of the automation programming as I'm the DM. Still new to Foundry and everything that comes with it. Thanks for the tips and the answer.
getting rid of the hook fixed it on refresh
Cool
I would like to call that hook if possible though
will it just break no matter what?
it's to stop the animation for the spell playing
Try placing that after?
that seems to have mostly fixed it
I for some reason read that as hooking the midi workflow
it seems like calling return on the if statement is causing the workflow to be abandoned too
so the spell is failing either way
I kinda need the return though if I'm gonna have the hook happen outside of the else statement
Show me what you have now?
Put the hook after the aborted part
const item = params.item;```
Can be ```js
this.item```
```js
params.actor.effects.find```
Can be ```js
this.actor.effects.find```
yeah, it's now just not working when they make the save?
I replaced the return with this.aborted = false just to put something there
i guess i can just invert the condition and just have an if statement
It should be fine having rolling above the dc just do return
Oh actually
Wait
Shouldn't you return false to cancel
i figured out what it was
i wasn't targeting the token
:))))))))))))))))))))))))))
:)
Yea, return false should be more correct
https://github.com/chrisk123999/chris-premades/blob/master/scripts/macros/spells/sanctuary.js
This is pretty close to what your doing
Except I use a synthetic item instead of a forced roll
wait okay, the whole reason things break is because I have the token targeted
it doesn't care if the workflow is aborted, if the token is targeted, it's getting healed
which i don't understand
but I think i can just update targets to nothing, and fix that
That seems off
I have no idea why, but that's how it's working
Return false to cancel instead of setting to aborted
That should actually work as intended
still healing the token
clearing targets is working for now, so it's what i'll go with in the meantime
I'm making sure the monk player in my game has automated Dodge when they use Patient Defense. To have it last until the start of their next turn, am I just applying duration to be 1 round?
Looks right
i believe that ends when the round ends though
I usually set the special duration as well just to be safe
Awesome, thanks! Man, a lot of this stuff is self-explanatory, but when I've been staring at the screen for the whole day, I miss easy stuff like that :p
And last question for the day before I go cross-eyed: I am using Convenient Effects to coordinate with Midi-QOL. Selecting Patient Defense and using it from the monk's character sheet just posts the card to chat, it doesn't "talk" to CE to nor apply the effects of Patient Defense (Dodge and Adv. on DEX saves). How do I make using the Patient Defense item apply the CE "Ki: Patient Defense" item/effect?
on the monks item theres a checkbox to check for it to apply
in the details towards the bottom
if there isn't one, you either don't have the right versions installed or you have the dfreds synergy shut off in midi
this one?
no, its higher up and says it
is there a language barrier?
what version of dfreds CE do you have installed and do not say the newest
version numbers of midiqol, dfreds ce, dae
(and foundry/dnd5e for that matter
You should see something like this:
Foundry: Version 10 Build 291
DnD5e: 2.1.5
DFreds: 4.1.1
DAE: 10.0.23
Midi-QOL: 10.0.33
Hmmm, don't have that checkbox available.
?
you should have those checkboxes, I wonder if this is a cache issue
Those are only shown if an effect in DFred's matches case wise, I think
Yep, that's selected:
yeah is there a language barier?
So the name of the feature does not match the name of the effect in DFred's, you can add an effect to yours to apply DFred's if you want
does the monk have different localization than you?
if you don't like the name or something
I don't know what you are asking about a language barrier. I'm fluent in English :p. And no, all of my players are in US and English as first language
DFred's is called Ki: Patient Defense and wont show unless you name your feature that
midi applies CE's based on perfect name matches with items rolled in chat
Got ya, another easy fix...derp. Thanks!
I had assumed you knew this detail and was wondering if maybe the user has a different language displayed like french or german
sometimes strange characters get used in names
If you don't wanna name your feature that, you can add a key like this to add effects from Convenient Effects
you can also drag and drop the CE to the item
you can literally drag the ce to any item thats on an actor
Fair enough. I'm brand new to Foundry and Midi-QOL so I have a huge learning curve ahead of me
? This does not seem to be true
It is, you can't drag to sidebar items
but you can drag to the effect tab of an item on an actor
Can confirm, just did it π
Ah, you're right, it was the sidebar thing that did it
I personally only use auto detect for monsters
Had too many windows open
all my players have their shit on them cause...well they are the stars of the show
you also could probably save yourself an entry in dfreds CE and just drag dodge to the patient defense
plus dodge will display the helper info if you use helper messages
My CE posts a card for Patient Defense already.
heh, did you duplicate dodge?
Nope, that's direct from DFreds. I haven't customized DFreds at all.
I personally whisper them by default to DM only, and then I manually reveal if the players need them cause those messages spoil names
I had no idea dfred had patient defense premade lol
Wish he would set the messages to whisper to owner instead of role based restriction
actually what I really wish was that dfreds utilized cub/anonymous' name hiding
Can just do a macro.ce dodge too
okay, one more question :p. Are there any reference guides that I can look at to remind myself of @ tags? In particular, how to have an effect use a scaling effect like "WIS mod + Monk level"
I think monk level is something like @classes.monk.levels ?
Nah this on is not evaluating conditions, only boolean
There is a module that helps with this. Autocomplete inline properties I think
Or look at the pins in the 5e channel
@hot flower were we ever able to get the misfire macro working properly? had to duck out for work stuff for a bit
Me too. Out at tye moment.
okie dokie
Reading through the github right now and at the part with the spirit guardians spell macro created. That Active Auras mentioned in this section, thatβs a mod right?
Correct
spirit guardians is also already made int he samples
There is a lot of spirit guardian macros nowadays
I know, but looking at the write up on the GitHub, a lot of this will fix other spell macros I was working on yesterday if Iβm understanding it right @vast bane
Similar effects and all that
so, i run games for friends, is there a decent master list of spells that have been automated? i found a script for Hail of Thorns, but it is a V10 and I am having trouble getting it to work.
i know there are paid versions
Sources of premade stuff for Midiqol:
Midi Sample Items Compendium(comes with the module)
Midi SRD's compendiums(this is the manual install link)
https://raw.githubusercontent.com/thatlonelybugbear/midi-srd/master/module.json
More Automated Spells Items and Features compendiums
https://foundryvtt.com/packages/more-automated-spells-items-and-feats
Mr.Primates premade macros:
https://github.com/MrPrimate/ddb-importer/tree/main/macros
Chris' Premade macros:
https://github.com/chrisk123999/foundry-macros
Chris' Module form of his macros:
https://foundryvtt.com/packages/chris-premades
Activation condition examples by ThatLonelyBugbear
https://github.com/thatlonelybugbear/FoundryMacros/wiki/MidiQOL-activation-conditions-examples
this is what i have on mine now, we had it working and properly breaking/repairing with save throw earlier but once we added the misfire 2, the break has stopped occurring
yeah chat says pistol blew up in your face but it doesnt break the weapon like before, though if we cant get it to work, this might be enough lol, though i dont think it'd be as fluid since its not letting them do the saving throw lol, but i do love the chat message
Is it possible to set an activation condition for triggering if the attack exceeds AC by 5?
Try workflow.attackTotal > workflow.targets.first().actor.system.attributes.ac.value + 5
Cheers, will do in a bit, thanks for the wisdom
The args[0] data is quite big, so I'll add an optional setting (workflowData: boolean), which if true will return the same data as in args[0], which should allow you to get back the info if you want.
Seems fair. 10.0.34 will add a preApplyTargetDamage option, which will be called just before processDamageRoll
Also fair 10.0.34 will include preTargetSave called before saving throw processing is started.
I think I need an example of how you are doing the processing. Longer answer is yes probably.
I would have said no, but it is if you are using Monks Token to handle saves. 10.0.34 fixes it. However, advantage on con rolls against specific damage types is not supported, so you'd need to manually adjust.
I'm being dense, can you elaborate on the problem, i.e. vitality setting and what's happening versus what should be happening?
When this is empty and you use MidiQOL to add Dead Overlay on 0 HP, the Dead DFreds CE is added and removed instantly
Thanks, I thought I was going a bit crazy.
Auto rolling because of choosing Monks to roll. Really appreciate your help on this.
I dunno why but it seems to effect more than just the dead status when auto dead and that setting are in play
Incapacitated, Unconscious could be too
I've been trying to use game.settings.set("midi-qol","splashWarnings",false) from https://gitlab.com/tposney/midi-qol/-/blob/v10/Changelog.md#anchor-0905 but it has no effect either entered in console or as a macro, is there something I'm doing wrong?
that is a very very very old changelog entry are you on a legacy build?
midi can't function without socketlib/libwrapper so that patch note doesn't really matter nowadays
Thanks, I'm not on legacy build or anything, I just saw that and thought it'd be cool to see whether those can be turned off like it said in the note. It's not a big deal
I'm not seeing this. If vitality is empty midi applies unconscious/dead depending on if the token is a character or npc when hp reaches 0. How are you updating the HP (just to make sure I'm testing the same thing)
It will affect the incapacitated check as well
Character sheet or token hud directly
Can you export your midi settings? Might be something odd in the way I initialise the data
@vast bane Token Action Hud Core + 5e and MidiQOL + DFreds CE combo is the culprit...
Ok, so am I adding TAH to the not compatible list?
tposney is taking a look
that seems weird cause I definitely ran find the culprit and still got it with just dfred/midi on
that bug was notoriously flagging innocent modules at fault
tposney found it. Fix in 10.0.34 probably tomorrow
The workaround for me if anyone needs it is to turn off the auto dead in midi and just turn it on in monks little details/combat details or combat booster, or live without auto dead
Probably the issue with the empty Vitality field could be triggered on some other updates too. But yeah that is valid for that usecase, until MidiQOL is updated.
I ended up remaking most of the MidiSRD functions and cleaning up all the Items to match the dnd5e SRD ones (with changed needed).
That's why I havent pushed the update out yet. It's been quite a lot of work π
Warpgate will be a hard dependency. No Advanced Macros needed.
god it is so dangerous this bug where the custom dfreds shows in sidebar, I've now almost deleted it three times
A quick search through the code base seems to suggest it's still there, but all it does is turn off a warning if you're missing dae or a certain version of betterrolls.
if (game.settings.get("midi-qol", "splashWarnings") && game.user?.isGM) {
if (game.user?.isGM && !installedModules.get("dae")) {
ui.notifications?.warn("Midi-qol requires DAE to be installed and at least version 10.0.9 or many automation effects won't work");
}
if (game.user?.isGM && game.modules.get("betterrolls5e")?.active && !installedModules.get("betterrolls5e")) {
ui.notifications?.warn("Midi QOL requires better rolls to be version 1.6.6 or later");
}
}```
this is about all the feedback you'll get from running it in console
@violet meadow ```js
const misfireScore = 2;
const { d20AttackRoll, item, actor, tokenUuid } = this ?? {};
if (!actor || !item || !tokenUuid ) return;
const tokenDoc = fromUuidSync(tokenUuid)
if (!!d20AttackRoll && d20AttackRoll <= misfireScore) {
Hooks.once("midi-qol.RollComplete", async () => {
const updates = {
embedded:{
Item: {
[item.name]: {
name: item.name + " (destroyed)",
flags: {"midi-qol":{onUseMacroName:"[postActiveEffects]ItemMacro"}},
system: {
ability:"int",
actionType:"abil",
target: {type:"self"},
actionType: "other",
damage: {parts:[],versatile:""},
formula:"",
save: {ability:"dex",dc:8 + Number(misfireScore),scaling:"flat"}
}
}
}
}
}
await warpgate.mutate(tokenDoc ,updates,{},{name:"boom gun"});
})
}
if(!d20AttackRoll && this.saves.size > 0) await warpgate.revert(tokenDoc,"boom gun")```
seems to work this morning without issue, even more confused cause it wasnt working yesterday lol
though it doesnt seem to work if the actor is using two guns with misfire, only lets one be broken at a time, dont think itll be an issue for the game, but ya never know
do they have unique names?