#MidiQOL
1 messages ยท Page 10 of 1
Looks like I'm getting a similar issue. It's telling me I still have no charges
Send me an export of the item
I don't know how to handle abilities that work close and at range other than to make 2 items, bugbear may know better, hes my goto for guru stuff
you can use a macro to differentiate
I suppose you could just make it a melee weapon with a long reach like Thorn Whip
what do you need it to do?
Its causing false disadvantage flags in melee
Importing is sometimes not enough, sometimes you might need to go in to a skill/ability/feature and modify it slightly to make it work in game.
I went through and enabled everything except DF's mods. That was it.
I don't know the full feature list of Damage Log, but if its core functionality is that card in your snippets, midi can do that card(and did right below it)
Oh is that what the grey box was?
I saw a formula but didn't know what it was doing lmao
the damage chaser card for midi on the DM side is that thing with the button and the equation
buttons
I can't dual launch my foundry session cause I have a 16mb application open, but there is a way to setup midi so that the player sees their attack workflow card, and then a similar card to that Damage Log right after it, but the DM won't see that card, instead they see the normal DM damage card. And it basically makes Damage Log redundant afaik
if you are interested in trimming redundant modules is all I'm saying
Yeah this is my first real experience with foundry on the DM side. I've been at this for like 10 hours ๐
well the Moderators would always chime in and say a new user should not jump head first into the deep end of the pool(midi qol) but I did, and I survived, but that could be why your learning process is long here fwiw.
Just keep it simple. Use Foundry as a battlemap. Add some modules that you think that your players would enjoy.
Edge case Moto
I think the problem is he's in the middle of the proverbial pool and really doesn't matter at this point which way they go
I will say @frosty mesa one pitfall I fell for early on was trying to watch youtube videos to learn, Foundry changes so often that the entire module loadouts on streamers how to videos wind up being 2-3 versions too old and defunct. So you really do need to watch the release dates on any tutorial videos, if they are more than 2 months old they are almost entirely obsolete, even Baileywiki lol. I kinda feel bad for the folks writing tutorials and readme documents for foundry.
Oh yeah I learned that pretty early when trying to understand what all the descriptions mean for Midi
Got a video from six months ago that looks totally different than what it is now lmao
Tposney's readme doc for midi is pretty rock solid though
readme's in general are good across the board, its the video tutorials that wound up throwing down the wrong paths until I caught on that foundry changes so fast that you have to look at when the videos were made.
@dense rune. Here's a chill touch (does not do the hit point gain blocking), but does the undead checking/disadvantage stuff. There's no macro, just activation condition and a flag. The flag expression is awful, but 10.0.12 will let you replace it with
targetId === "@token"
Oh I like it "workflow.targets.values().next().value.id === \"@token\"",
It was a bit of pain to setup, but the flags being evaluated when checked to is very convenient.
I did the hp gain blocking with an AE using the DR flag, and setting it to 999 for the special duration
That would work, you might also be able to do di healing
I can't remember if I was suppose to post an issue on that or not lol, I think midi is missing healing as an option for either DR or the DI condition
I forget which one works and which one needed a change
di healing is what I do for the Chill touch macro
Within an ItemMacro, I have it prompt the user for a value and act accordingly, but I need to limit by an ability mod of the caster. How do I pull the ability mod of the caster while in an ItemMacro?
I'll have a look at Damage Reduction for healing.
actually I see it there, I swear I remember actually requesting from you something about healing but I'm misremembering
actor.system.abilities.str.mod (in v10), actor.data.data.abilities.str.mod in v9
Yeah, I need to write that down cause I never made that issue on his github
is that actulaly midi or dae?
or does it not matter when submitting the issue to him?
Perfect, thank you!!
Is there a way/what syntax should I use to multiply or divide damage using effects? If I pick the alldamage flag for example it automatically adds a "+" symbol so it doesn't work with a * 0.5 value
I don't think that this is possible with flags.
The bonus you want to add is based on the actual damage that the attack is supposed to deal, so there is an issue there, if that makes sense.
What is your usecase exactly? Sounds like it is macro territory
asterisks do really strange stuff in the bonus fields
Setting a condition that halves the damage inflicted for example. Or adding % damage reduction to armor since it's automatically calculated anyway. I guess I could add a value on the sheet and hook something to the damage calcution that multiplies the incoming damage by that, with a default of 1?
You can always create an effect for dr against the incoming attack
Is this a reaction like what happens with Uncanny Dodge for example?
No it would be a fixed amount based on armor type or other features most likely. I wanted to leverage the automated calculations to use % based DR so that is automatically scales at all levels
You could create an advancement scale in the class and reference that in the DR flag probably
I also wanted to create a "weakened" conditions that halved all the damage inflicted (I use it a lot with group/horde type enemies after they are reduced to half hp or less) so I guess I'll check in #macro-polo to see about a script, thanks ๐
If it is done with/through MidiQOL, asking for it here is fine or rather advisable.
The "when reduced to half hp" do something can be done easily. Just describe with as much details as possible what you are trying to do and we can get a look.
A full description of the ability/feature/item in question goes a long way ๐
Ok weakened should be an effect/toggleable condition. It gets applied when the midi-qol wounded condition does using dfreds built in logic so that's easy as you mentioned. The effect should be the equivalent of multiplying all the damage inflicted by 0.5 (attacks, spells, etc).
The other thing I would like to do is add something to, IE: a piece of heavy armor that reduces all incoming damage by 33%
That sounds like a world script
Both should be doable with a world script that uses the MIDI hooks ๐ค
First one could also be done with a warpgate macro on the effect, but a hook is almost certainly cleaner
This one can be done with an actor onUse
Oh right, forgot about on use, yeah that's even cleaner
Yeah actually for the half damage thingy I have already something made. Just need to find it...
Ah nice ๐
I've almost gotten this to work, with one problem.. Midi does not seem to respect any changes I make to the workflow damage ๐ค
Hooks.on("renderItemSheet5e", (app, [html]) => {
if (app.document.data.type !== "equipment") return;
if (app.document.data.data.armor === undefined
|| (app.document.data.data.armor.type !== "light"
&& app.document.data.data.armor.type !== "medium"
&& app.document.data.data.armor.type !== "heavy"
&& app.document.data.data.armor.type !== "natural")) return;
console.warn("App", app);
console.warn("HTML", html);
const header = document.createElement("h3");
header.innerHTML = "Special attributes";
header.className = "form-header";
const formGroup = document.createElement("div");
formGroup.className = "form-group";
const label = document.createElement("label");
label.innerHTML = "% Damage Reduction";
formGroup.append(label);
const formFields = document.createElement("div");
formFields.className = "form-fields";
const inputField = document.createElement("input");
inputField.type = "text";
inputField.name = "flags.world.damageReductionArmor";
inputField.placeholder = "0-100";
inputField["data-dtype"] = "Number";
inputField.value = app.document.data.flags.world.damageReductionArmor ?? "";
formFields.append(inputField);
formGroup.append(formFields);
html.querySelector(".details").append(header);
html.querySelector(".details").append(formGroup);
});
Hooks.on("midi-qol.preDamageRollComplete", (workflow) => {
console.warn("Workflow", workflow);
let [target] = workflow.targets;
let reduction = target.document.actor.itemTypes.equipment
.filter(item => item.data.flags.world !== undefined
&& item.data.flags.world.damageReductionArmor !== undefined
&& item.data.data.equipped)
.map(item => item.data.flags.world.damageReductionArmor)
.sum();
if (reduction <= 0) return;
console.log("Target reduces damage by " + (workflow.damageTotal * (reduction / 100)));
workflow.damageTotal -= workflow.damageTotal * (reduction / 100);
if (workflow.damageTotal < 0) {
workflow.damageTotal = 0;
}
return workflow;
});
First bit adds a new "special attributes" section to the bottom of details of armors, where the % reduction can be set. Second bit is supposed to read that flag and calculate total reduction, which it does, but MIDI seems to ignore what I change in the workflow ๐ค
Also this still needs to account for unequipped armor, forgot to add that in.. (EDIT: Fixed, now accounts for that)
Have you had a chance to look at this?
@gilded yacht Has something changed in the way midi handles total? This macro worked a month ago, (my player hasnt summoned his spirit in that long).
You would need to use a setDamageRoll for the new damageRoll to change it in the workflow afaik
On which object? ๐ค
I think you need to hook on midi-qol.preDamageRoll
The passed workflow is "live" so changes will affect subsequent actions. In particular preAttackRoll and preDamageRoll will affect the roll about to be done.
let me try to find an example I had made.
Problem is, I need to know what was rolled to be able to reduce the damage
Is there no way to modify damage resistance in the game and add it to items as an additional boost to DR?
So that if you wear X armor your DR goes up by X percent?
DR in MIDI is flat only
@kind cape try something like ```js
workflow.setDamageRoll(await new Roll(workflow.damageTotal * (reduction / 100)).evaluate())
๐ค
Happens when I pass in a straight number to new Roll()
God damnit, need to make it explicitely a string for new Roll to not whine -_-
ohhh yes
That seems to work ๐ฎ
So here is a functional macro for it @scarlet stump
Hooks.on("renderItemSheet5e", (app, [html]) => {
if (app.document.data.type !== "equipment") return;
if (app.document.data.data.armor === undefined
|| (app.document.data.data.armor.type !== "light"
&& app.document.data.data.armor.type !== "medium"
&& app.document.data.data.armor.type !== "heavy"
&& app.document.data.data.armor.type !== "natural")) return;
const header = document.createElement("h3");
header.innerHTML = "Special attributes";
header.className = "form-header";
const formGroup = document.createElement("div");
formGroup.className = "form-group";
const label = document.createElement("label");
label.innerHTML = "% Damage Reduction";
formGroup.append(label);
const formFields = document.createElement("div");
formFields.className = "form-fields";
const inputField = document.createElement("input");
inputField.type = "text";
inputField.name = "flags.world.damageReductionArmor";
inputField.placeholder = "0-100";
inputField["data-dtype"] = "Number";
inputField.value = app.document.data.flags.world?.damageReductionArmor ?? "";
formFields.append(inputField);
formGroup.append(formFields);
html.querySelector(".details").append(header);
html.querySelector(".details").append(formGroup);
});
Hooks.on("midi-qol.preDamageRollComplete", async (workflow) => {
let [target] = workflow.targets;
let reduction = target.document.actor.itemTypes.equipment
.filter(item => item.data.flags.world !== undefined
&& item.data.flags.world.damageReductionArmor !== undefined
&& item.data.data.equipped)
.map(item => item.data.flags.world.damageReductionArmor)
.sum();
if (reduction <= 0) return;
console.log("midi-qol armor expansion | Target reduces damage by " + (workflow.damageTotal * (reduction / 100)));
workflow.setDamageRoll(await new Roll(workflow.damageTotal * (1 - (reduction / 100)) + "").evaluate())
return workflow;
});
Can you send me the actual item export? not needed for now. Do this ๐
@lean holly can you add a console.log(damageRoll) after line 12 or something, below this const damageRoll = lastArg.damageRoll;, run the macro and post what that logs in the console?
and also await the MidiQOL.applyTokenDamage function call
Heads up - just released midi 10.0.12 with support for the new damage resistance/damage immunity/damage vulnerability (and dae 10.0.8 - also required). midi 10.0.12 will **NOT ** activate if your dnd system is not 2.0.3 or later.
No more updates for V9 midi I suspect? ๐ฅน
Only bug fixes, not new features. Latest is 0.9.82 released today.
0.9.82
- Fix for "isHit" special duration expiring whenever the character takes damage (i.e. cure wounds spell).
0.9.81
- Fix for templates not being removed on concentration timed expiry.
Dang, guess I will have to look at upgrading to V10 soon. Its understandable tho
I'm running my game in v10 now (2 sessions so far) and it's been pretty good. First session (3 weeks ago had a few oddities) last session (Saturday) was pretty solid.
My next session will be v10. Drag ruler might be the only thing missing right now
there is that fork for drag ruler
I really do want to upgrade for other reasons as well, but ATE, AA and Drag Ruler require a patch that isn't verified yet, and ASE does not look like its getting updated so need to replace those spells with custom macros. And 5eHelpers seems to also be dead ๐ฆ
It seems that quite a lot of the breaking changes now come from the dnd5e changes rather than foundry itself - and the dnd changes seem to come with little warning - or I'm just not looking in the right place.
@gilded yacht MidiQOL 10.0.12 doesn't seem to get installed. DAE is up to 10.0.8 and Dnd5e 2.0.3 ๐ค
Uninstalled and tried to install again, but I end up with .11
added where you said, and nothing in the console shows up. I also did add await MidiQOL.applyTokenDamage(); after its called out, nothing different.
Try now - forgot to bump the .zip version
OK now ๐
does foundry v10+midi look significantly different in appearance to players?
The chat cards can be quite different for the players
and dnd5e's new stuff, if I'm using vanilla sheets, will the players notice?
Probably not - the traits display on the sheet is the same, it's only when edited that it's different.
@lean holly use this and check if there is a difference
@violet meadow Have a look at the chill touch in 10.0.12 - I think it's reasonably neat.
oh will do. just bugged my instance when trying to use both Perfect Vision and Elevated Vision for some testing in v10 ๐
Same, enemy rolls save, enemy fails save. Damage is never rolled, console.log never populates.
This is why I think something changed within midi.
OK so it might be the way you execute said macro.
console.log(args) at the top and check what is in there
So this: <#1010273821401555087 message> becomes obsolete ๐
Damn that's powerful functionality!
So hmm, what is the lastArg.damageRoll? ๐ค
damageRoll
:
undefined
[{โฆ}]
0
:
actor
:
Actor5e {overrides: {โฆ}, _preparationWarnings: Array(0), armor: null, shield: Item5e, _classes: {โฆ}, โฆ}
actorData
:
ActorData {_id: '5HE64AdGKzusZPhi', name: 'Kappa-liam', type: 'character', img: 'DDimport/Kappa-liam.jpeg', data: {โฆ}, โฆ}
actorUuid
:
"Actor.5HE64AdGKzusZPhi"
advantage
:
false
attackD20
:
undefined
attackRoll
:
undefined
attackTotal
:
undefined
bonusDamageDetail
:
undefined
bonusDamageFlavor
:
undefined
bonusDamageHTML
:
undefined
bonusDamageRoll
:
undefined
bonusDamageTotal
:
undefined
concentrationData
:
undefined
criticalSaveUuids
:
[]
criticalSaves
:
[]
damageDetail
:
[]
damageList
:
undefined
damageRoll
:
undefined
damageTotal
:
undefined
diceRoll
:
undefined
disadvantage
:
undefined
event
:
PointerEvent {isTrusted: true, pointerId: 1, width: 1, height: 1, pressure: 0, โฆ}
failedSaveUuids
:
['Scene.OfsGZ0jMIdTTHTlj.Token.LpROcNqyhtVs7Jyw']
failedSaves
:
[TokenDocument5e]
fumbleSaveUuids
:
[]
fumbleSaves
:
[]
hitTargetUuids
:
['Scene.OfsGZ0jMIdTTHTlj.Token.LpROcNqyhtVs7Jyw']
hitTargetUuidsEC
:
[]
hitTargets
:
[TokenDocument5e]
hitTargetsEC
:
[]
id
:
"FSkpo04NvRiYXm39"
isCritical
:
false
isFumble
:
false
isVersatile
:
false
item
:
{_id: 'FSkpo04NvRiYXm39', name: 'Summon Wildfire Spirit', type: 'feat', img: 'systems/dnd5e/icons/skills/yellow_04.jpg', data: {โฆ}, โฆ}
itemCardId
:
"2Sb3IGj2LU9E56il"
itemData
:
{_id: 'FSkpo04NvRiYXm39', name: 'Summon Wildfire Spirit', type: 'feat', img: 'systems/dnd5e/icons/skills/yellow_04.jpg', data: {โฆ}, โฆ}
itemUuid
:
"Actor.5HE64AdGKzusZPhi.Item.FSkpo04NvRiYXm39"
macroPass
:
"postActiveEffects"
otherDamageDetail
:
[]
otherDamageList
:
undefined
otherDamageTotal
:
undefined
powerLevel
:
undefined
rollData
:
{abilities: {โฆ}, attributes: {โฆ}, details: {โฆ}, traits: {โฆ}, currency: {โฆ}, โฆ}
rollOptions
:
{advantage: undefined, disadvantage: undefined, versatile: false, critical: false, fastForward: false, โฆ}
saveUuids
:
[]
saves
:
[]
semiSuperSaverUuids
:
[]
semiSuperSavers
:
[]
speaker
:
{scene: 'OfsGZ0jMIdTTHTlj', token: 'RL5kW5GaDeurKUJb', actor: '5HE64AdGKzusZPhi', alias: 'Kappa-liam'}
spellLevel
:
0
superSaverUuids
:
[]
superSavers
:
[]
tag
:
"OnUse"
targetUuids
:
['Scene.OfsGZ0jMIdTTHTlj.Token.LpROcNqyhtVs7Jyw']
targets
:
[TokenDocument5e]
templateId
:
null
templateUuid
:
null
tokenId
:
"RL5kW5GaDeurKUJb"
tokenUuid
:
"Scene.OfsGZ0jMIdTTHTlj.Token.RL5kW5GaDeurKUJb"
uuid
:
"Actor.5HE64AdGKzusZPhi.Item.FSkpo04NvRiYXm39"
workflowOptions
:
{lateTargeting: undefined, notReaction: false}
[[Prototype]]
:
Object
length
:
1
[[Prototype]]
:
Array(0)
Yeah I mean, do you have a damage Formula on the item? Is there a damageRoll supposed to happen from somewhere else?
damage happens in the original macro. Summon spirit, place area available to summon, create aoe templete where the summoned spirit hurts people, roll and apply damage, spirit appears.
for(let targetToken of targets){
const save = (await new Roll("1d20+@mod", {mod: targetToken.actor.data.data.abilities.dex.save}).evaluate({async: true})).total;
targetTokens.add(targetToken)
if(save >= saveDC){
saves.add(targetToken)
}
newChatmessageContent.find(".midi-qol-saves-display").append(
$(addTokenToText(targetToken, save, saveDC))
);
}
await chatMessage.update({ content: newChatmessageContent.prop('outerHTML') });
await ui.chat.scrollBottom();
await MidiQOL.applyTokenDamage(
[{ damage: damageRoll.total, type: "fire" }],
damageRoll.total,
targetTokens,
itemD,
saves,
{ superSavers: saves }
)
await new Sequence()
.effect()
.file("modules/animated-spell-effects/spell-effects/fire/fire_ball_CIRCLE_05.webm")
.atLocation(wildfireSpiritToken)
.scale(1.75)
.wait(150)
.animation()
.on(wildfireSpiritToken)
.opacity(1.0)
.play();
damage portion of the macro.
A small edge case. There is a possibility of multiple casters casting Chill Touch at the same target (...) and RAW only the most recent effect should be active at any given point ๐คท ๐ถโ๐ซ๏ธ
If that's the case (I did not see it in the spell description) then need to make the effects do not stack by name.
OK, but still this doesn't actually define what the damageRoll is at any point so I am a little stumped
its a rule in the dmg I believe
@lean holly just DM me the exported item to take a look
I see that now. I'm looking further myself as to where that arg is coming from.
Had a conversation in #tabletop-discussion about Chill Touch, so I guess still it's a GM decision in the end (if anyone feels the need to check the conversation: <#tabletop-discussion message>) ๐คท
I am dumb dumb, please forgive me. This was not midi's fault at all. Thank you for pointing out where is it getting damage from. I had neglected to stop the ability from syncing with the beyond importer. That caused the damage formula on the feature to be erased. Which in turn cause the macro to break because there was no damage formula.
Hi guys, I need a little help.
Because of an item a npc has 1d10 bonus to initiative
how can I configure this effect?
this ad a random 1d10 1 time but no every combat
2nd 7
That's why I am not fond of importers ๐
Good to hear that you solved it though!
I think wrapping it in double [[]] will roll it each time maybe, +[[1d10]]
maybe do custom instead of add and then the brackets?
In the moment I put the brackets the dice roll and the bonus change to the result
[[]] means "evaluate once and save" so thats not what you want
You need to create an ability to add that before combat I would imagine. What's the feature you want to emulate?
v9 or v10?
9
Couple of ideas that would need some sort of macro ๐ค
The most clean solution would be if @gilded yacht could maybe add an optional Midi flag to add a bonus like +1d8 to initiative rolls ๐
You can do it with advantage reminder if you use MTB or Requestor
requestor and MTB turn intiative into a ability roll you can see advantage/normal/disadvantage on, and advantage reminder will show there(and you can do manual situational bonus')
I would do something similar to what Zhell does here: <#macro-polo message>
But this means that the player will need to roll initiative from a hotbar macro
no don't do that, change how your table does initiative
install MTB, click your request roll, select initiative and hit request
The hook from yesterday is always playing now instead of on max heal rolls...
Hooks.on("midi-qol.RollComplete", function (workflow) {
if (workflow.damageDetail.filter((detail) => detail.type === "healing").length == 0) return;
if (workflow.damageRoll.dice.filter((roll) => roll.results.filter((result) => result.exploded !== undefined)).length == 0) return;
AudioHelper.play({src: "hakuna_meow02.ogg", volume: 0.7, autoplay: true, loop: false}, true);
});
I might have made a dum dum, lemme check
Well this is a bummer, I could have sworn it was working yesterday
you don't need to check for exploded, if its possible to check for max dice rolls in healing that'd work too
Exploded should be easier to check for
@vast bane
Hooks.on("midi-qol.RollComplete", function (workflow) {
if (workflow.damageDetail.filter((detail) => detail.type === "healing").length === 0) return;
let dice = workflow.damageRoll.dice;
let explodedDice = dice.filter((die) => {
return die.results.filter((result) => {
return result.exploded ?? false;
})
});
if (explodedDice.length === 0) return;
AudioHelper.play({src: "sounds/dice.wav", volume: 1, autoplay: true, loop: false}, true);
});
I think I might have introduced a subtle bug to it at some point, can you try this version with your own sound?
went to test it and my world is hanging on load so dealing with that now first apparently
Still always firing on non explodes
Is this hook ok to use with worldscripter module?
yes. you can also just type that in the console when you want it
Reload and its gone
its a dnd5e flag that you want, so starts with data
i didnt know that ci means that XD
only 2 initial one that confuses me constantly is the two different DR's
@violet meadowOne thing I'm noticing with the curse macro you worked on yesterday. Whenever my players use it, they get no dialogue popup to heal an extra target.
Seems to pop up for me, though.
I cannot for the life of me figure out why this macro is running twice and apply the condition twice to the target
a macro adding an effect and DFreds CE and MidiQOL auto applying the same condition maybe?
That feels like what's happening, but I can't figure out how to get it to only apply corroding once
in the item's details page (not the DAE), go towards the end and check Don't apply DFreds CE or something like that
Permissions issue? Cannot check now.
I don't see it
Check your MidiQOL settings => Workflow settings => Workflow tab. There is an entry towards the top about auto applying CE conditions. What's it like for you?
Apply CE, if absent apply item effects
I've given everyone ownership of the macro, and still no luck.
Ah not an actual macro ownership issue, but actor changing permissions. Will double check later
Tried changing it to "Apply item effects, if absent apply CE" and it has the same problem
Try moving each macro.CE to each own entry on the DAE. If not successful, someone else will probably take a look soon. Got to run ๐ถโ๐ซ๏ธ
thanks for the tip, I'll try it
I'm trying to make a weapon that does more damage to charmed targets.
Could I add damage to the other field like for a dragon slayer weapon using @raceOrType".includes("dragon") in the roll other damage setting?
My personal take on the spell failure would be, can create a temporary item on the caster for the healing portion or use either complete item use to rewrite and roll it or update the temp healing item with warpgate and roll it. Within that item, you'd have it give a dialog whom to select to heal with the damage dealt. Just sucks it happens on the enemies turn.
Overtime should let you let run macros on it
There have been some changes in between but this should work
Array.from(workflow.hitTargets)[0].actor.effects.find(ef=>ef.data.label === 'Charmed')
``` as an activation condition
I am a bit lost between versions right now, but there might be a way to use @target directly to check for the effects on them.
It might be a v10 thing though
with a new Chill Touch I can select a "type" for the effect to work ( details.type.value === "undead" ). Can I insert a token name instead? For example if Paladins Aura gives disadv to all enemies against his allies (but not against him)?
You could use an Active Aura which would target all enemies
The activation condition by itself cannot be passive. It needs to be connected to an item roll
as an aside, Active Aura's not updated for v10 yet...
If now you would like to use this "Paladin Aura" as a feature that would affect creatures in a specific radius and "curse" them for some time, you can use targeting with Midi against Enemies in a specific radius
Correct, should have mentioned that Active Aura's not officially updated for v10 (but there is a working fork)
OK @covert mason lets see what's going on. Hit me with the latest version of the macro, as I cannot keep track easily ๐
You mean run a macro from your client, even if its someone else's turn?
I wonder if in Janner's case, triggering a Requestor's request might solve the issue
well each damage it deals, they pick someone to heal
One way to do is to store the item uuid with a midi flag on the active effect. Then you can reference the flag when needed and roll the item on the actor.
Overtime I think generates a workflow
Else you can reference the chat history
@covert mason, I think I got it. You will need Zhell's Requestor module! https://foundryvtt.com/packages/requestor
Ah, okay!
I've installed it
Alright, give me 5 to make sure I grab the correct id for the player
Can use that or make an item
@gilded yacht With the sunsetting of dnd5ehelpers in v10, do you have any plans on picking up some of the automation it provided like reacharging on X-6 stuff, wildmagic surge, Lair/Legendary stuff, and regeneration features?
@covert mason try this as the world macro.
Ayyy, that seems to work. It gives the player a prompt to use the requestor feature, and it works when it's clicked!
Just try with more players connected to make sure I didn't mess up the whisper... It shouldn't but ๐คท
It's a shame it doesn't like the RPG UI I use, but heyho. Not the worst thing ever
Zhell is very responsive to feedback on his modules if you put in an issue on his git I bet you he'd be responsive
Is it not possible to have a reaction prompt after the attack roll but before the damage is applied like how shield works?
Will it override a hit to miss?
nope the Reaction can though
hmmmm, I thought it wasn't let mecheck
well shit, I dunno what didn't cause it to pop up the first time I tried it but yeah, reaction is doing it
No wait I see the problem
Maybe you had already used the reaction for the round
The problem is you can't see the roll
it prompts you and you have no idea what the roll was, I believe raw, you can see the roll
or maybe I'm misunderstanding that
You mean something like add a 1d4 to your AC as a reaction?
oh DSN shows us actually
No, the prompt for shield(and other reactions) comes before the attack is displayed in chat
but DSN shows the dice rolled so there is that to cover up the flaw
Yeah that is the RAW concept behind it if I read what you say correctly
so as long as the setting for DSN spoiling rolls is on, then shield can be properly sussed out whether you need to use it and whether its worth using
Man its crazy how even this far into midi I still get shown shit that was right in front of my nose I had no idea existed lol
I had that drop down set, but I take it the checkbox above enables it
Yeah its not working, is it not compatible with merged cards?
(DSN still fixes this on its own as the dice totally spoil the roll)
wait I think its cause attack roll total can't be calculated yet...
Yeha its the Merge cards/condensed setting messing with this
if you have that setting off, the attack roll is shown to the defender, if its merged, it sits undisplayed till the damage is done
but again, DSN actually catches this problem and solves it accidentally
In a way, DSN is actually the legit way cause the player is not suppose to know the modifiers involved, just what the roll was anyway.
๐ค I for sure cannot follow that right now as its too late ๐
Also reactions that boost saving throw modifiers to prevent failing a save don't work right in reaction either. It just flat out does not do anything with spells like fireball or sacred flame.
I'm trying to automate this, but regardless of whether the target saves or not, it still applies the healing. I used this macro from another spell I found in this server.
async function wait(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); }
const lastArg = args[args.length - 1];
if (lastArg.hitTargets.length === 0) return {};
let actorD = game.actors.get(lastArg.actor._id);
let tokenD = canvas.tokens.get(lastArg.tokenId);
let target = canvas.tokens.get(lastArg.hitTargets[0].id);
let healingType = "healing";
let damageTotal = Math.floor(lastArg.damageTotal / 1);
let damageRoll = new Roll(`${damageTotal}`).evaluate({ async: false });
new MidiQOL.DamageOnlyWorkflow(actorD, tokenD, damageRoll.total, healingType, [tokenD], damageRoll, { flavor: `(${CONFIG.DND5E.healingTypes[healingType]})`, itemCardId: lastArg.itemCardId, damageList: lastArg.damageList });
let targetList = `<div class=\"midi-qol-flex-container\"><div class=\"midi-qol-target-npc midi-qol-target-name\" id=\"${target.id}\">hits ${target.name}</div><div><img src=\"${target.data.img}\" width=\"30\" height=\"30\" style=\"border:0px\"></div></div><div class=\"midi-qol-flex-container\"><div class=\"midi-qol-target-npc midi-qol-target-name\" id=\"${tokenD.id}\">heals ${tokenD.name}</div><div><img src=\"${tokenD.data.img}\" width=\"30\" height=\"30\" style=\"border:0px\"></div></div>`;
await wait(500);
const chatMessage = await game.messages.get(args[0].itemCardId);
let content = await duplicate(chatMessage.data.content);
const searchString = /<div class=\"midi-qol-hits-display\">[\\s\\S]*<div class=\"end-midi-qol-hits-display\">/g;
const replaceString = `<div class=\"midi-qol-hits-display\"><div class=\"end-midi-qol-hits-display\">${targetList}`;
content = await content.replace(searchString, replaceString);
await chatMessage.update({ content: content });
await ui.chat.scrollBottom();```
To be honest have not look at it (only just realised it is going away). I guess I can have a look at it. I've got a feeling that recharge is going to be handled in dnd5e itself.
I understand that overtime could probably handle regeneration probably, and your legendary resistance item works great, but lair/leg actions and the recharge are the things that break my heart that are gone in v10.
I am looking to add the effects to a Spellguard shield, how do I grant an effect where the actor has "advantage on saving throws against spells and other magical effects, and spell attacks have disadvantage against" them? I found I can add a custom damage resistance of 'magic-resistant' which would do the first half, but I'm not sure for the other. I assume both are flags, I just can't pin down which ones
the magic resistance flag+ the two rsak/msak flags for (grant)disadvantage
I've been known to mistake grant and regular advantage flags, I think thats the right set lol. My thin brain does not know how to evaluate the two sets for which one I need most the time.
oh have you tried find the culprit and just used the bare minimum modules to see if maybe a module is doing it?
Yes it is midi...
I wonder if its because there is no value in the length field on the item...which is weird cause its Instantaneous so there should be no need for length...
If I go bare bones automated animations and sequencer it works
set it to 0 minutes
Will try
There's a problem with the custom damage resistance of the target, midi expects that to be an empty string if there are none and it's undefined/null which it shouldn't be. I'll put a guard for that case in 10.0.13 (and I don't need the item after all).
thank you so much! Would I put this in as a world script?
Change this js if (lastArg.hitTargets.length === 0) return {}; to ```js
if (lastArg.failedSaves.length === 0) return {};
For spells that are Saving Throw Action type, the `hitTargets.length` is always going to be NOT `0`, as there is a hitTarget anyways
I think you need ```html
inputField.value = app.document.data.flags.world?.damageReductionArmor ?? "";
formFields.append(inputField);
Yes, but make sure to use the one I posted a bit later that is fully functioning! ๐
Hmmm, that sounds true, can't test right now but will add it to the code as a ?. shouldn't break it regardless
#1010273821401555087 message is the one you want to use @scarlet stump
thanks again!
Might also need some math floor or ceil in the damage roll calculation
I was kinda betting on MIDI taking care of that, but I did never test if it did ๐
heh to get around the versioning,
const version = Math.floor(game.version);
let effect = tactor.effects.find(i => (version > 9 ? i.label : i.data.label) === "whatever");
gotta hand out stuff from v9 > v10
Is there a way to add cumulative exhaustion from an effect?
(midiqol + dae + DF conditions)
As in each time it hits it increases exhaustion with 1
you can use this with dfreds, replacing the condition with the proper exhaustion level. It'll also autoremove previous levels of exhaustion from the token automatically due to hidden dfreds mechanics:
let uuid = token.actor.uuid;
let hasLvl1Applied = await game.dfreds.effectInterface.hasEffectApplied('Contamination I', uuid);
let hasLvl2Applied = await game.dfreds.effectInterface.hasEffectApplied('Contamination II', uuid);
let hasLvl3Applied = await game.dfreds.effectInterface.hasEffectApplied('Contamination III', uuid);
let hasLvl4Applied = await game.dfreds.effectInterface.hasEffectApplied('Contamination IV', uuid);
let hasLvl5Applied = await game.dfreds.effectInterface.hasEffectApplied('Contamination V', uuid);
let hasLvl6Applied = await game.dfreds.effectInterface.hasEffectApplied('Contamination VI', uuid);
if (!hasLvl1Applied) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Contamination I', uuid });
} else if (!hasLvl2Applied) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Contamination II', uuid });
} else if (!hasLvl3Applied) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Contamination III', uuid });
} else if (!hasLvl4Applied) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Contamination IV', uuid });
} else if (!hasLvl5Applied) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Contamination V', uuid });
} else if (!hasLvl6Applied) {
await game.dfreds.effectInterface.addEffect({ effectName: 'Contamination VI', uuid });
} else {
console.log('Nothing to do!');
}
//if used as part of an item with On Use Macro, change line 2 with the following one to contaminate the caster:
// let uuid = args[0].actorUuid;
// or with this one to contaminate the target:
//let uuid = args[0].targetUuids[0];
//}
Heh, I have basically that set up with CUB
I'm trying to figure out something interesting for a plague dragon breath attack.
Your solution might work very well, with exhaustion or like a con penalty or something.
oh also this condition has 6 levels instead of 5, so remove that part
If you need this to work in aoe you have to add a for loop like this one:
// or with this loop to contaminate aoe targets:
for(const targUuid of args[0].targetUuids) {
//Put your code here
}
// targUuid is the UUID of the individual ones
Viral Aura. Any creature that starts its turn within 10 feet of the plague spreader must make a DC 12 Constitution saving throw. On a failed save, the creature is poisoned and canโt regain hit points until the end of its next turn. On a successful save, the creature is immune to this plague spreaderโs Viral Aura for 24 hours.
might be interesting to add too
Yeah, good idea.
I'll have to make it sorta manual though, since as far as I know Active Auras isn't updated for v10
There are PRs that work apparently.
Another question, I notice that if you decrease CON value via an effect it wont affect hp.
Is there a way to do that? Or am I missing something, it SHOULD lower the max hp right?
nope
Theoretically yes, it should lower it, but there is no automation for it
You could write a calculation for and warp gate it, would be the safest way
Using an AE could work, especially if it's just a short lived effect, but it has some issues (no way to adjust max while the effect is active). So using warpgate is better
Unless you wanna do a like -1d4 to max hp or something, then DAE is fine
make sure to wrap in -[[1d4]]
else if there's an update to the actor it'll stack again
That could work.
Just give the character -2 to con and -1d4 or something to max hp.
And stack it for each hit.
If you use an effect to deduct from the con mod, just warpgate the entire thing tbh
read current max hp, current con value, character level,, make a calculation, and then a warpgate update
Warp Gate can stack.
Yeah, could work. I might try that.
Although I'm trying to keep my workload low since it's "just" one fight. But then again... learning by doing.
I need to sort the fight into phases too.
Well a -2 to con is always a -level to max, just FYI
Of course since it could be -1 & -1 a macro is probably needed
@details.level is the character level
would it restack on an update as crymic said?
Or more appropriately for a macro, actor.system.details.level
unless the effect is embedded in an item, just update it tbh
If it doesn't involve dice, I don't see any issue
const target = /* however you get the target actor of this thingamajig */
const effect = target.effects.find(e => e.getFlag("world", "con-down"));
const stack = effect?.getFlag("world", "con-down") ?? 0;
if ( !stack ) {
await target.createEmbeddedDocuments("ActiveEffect", [{
icon: "steve.webp",
label: "Ouchies",
"flags.core.statusId": "steve",
"flags.world.con-down": 1,
changes: [
{key: "system.abilities.con.value", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: -2},
{key: "system.attributes.hp.max", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: -1}
]
}]);
} else {
await effect.update({
changes: [
{key: "system.abilities.con.value", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: -(2 * (stack+1))},
{key: "system.attributes.hp.max", mode: CONST.ACTIVE_EFFECT_MODES.ADD, value: -(stack+1)}
],
"flags.world.con-down": stack+1
});
}
const {value, max} = target.system.attributes.hp;
await target.update({"system.attributes.hp.value": Math.clamped(value, 0, max)});
Tested it. Works great. Modifies con value and max hp and sets the current hp as well.
Works perfectly now, thank you!
I don't even have a v9 world anymore ๐
Shouldn't need many changes.
data instead of system in the keys and updates and also change to ```js
const {value, max} = target.getRollData().attributes.hp;
Only thing worth mentioning, is that it needs to be executed by a GM account or someone with permissions to alter the target.
Hello! new to foundry and wanting some automation as a DM I'm trying to enhance some features I'm going to use. But I've encountered a problem with DAE + Midi-qol. I'm trying to obtain an effect toggled by the use of an ability. The effect per se should do nothing, I only need it to be active to track the duration with DAE.
As in the screenshot, once rolled the effect remain inactive. only once I've managed to get it work but I've lost it somehow.
In the bottom right screenshot uncheck Tranfer to Actor on Item equip
and effect suspended
data.data but either works
I end up using the getRollData() whenever possible to avoid the need to change the system to data.data
Hi @violet meadow and thanks for the help. I've unchecked both the flags you suggested but the effect is not being applied at all now when rolled
Can you move the item to the right sidebar, right click on it, export data and send me the exported file in a DM to take a look? Might be easier to troubleshoot
for sure! will do right now
@gilded yacht MidiQOL v10.0.12. This error pops in console, when you roll, from an actor on the sidebar, an item that has Target Self WITHOUT a token present on the scene.
The issue is not that it doesn't roll, but the error displayed is thrown off for some reason.
As @mossy oak uncovered I think that the error displayed should be something along the lines:```js
export async function getSelfTarget(actor) {
if (actor.token)
return actor.token.object; //actor.token is a token document.
const speaker = ChatMessage.getSpeaker({ actor });
if (speaker.token)
return canvas?.tokens?.get(speaker.token);
throw new error("Could not get a target for self");
}
Yeah, typo should be throw new Error - fix in 10.0.13. I need to do some more work on that - since self target for an actor (even if no token on the scene should still work) - but it's a bit complicated.
@gilded yacht I have this item that uses the DAE.onUpdateTarget method. In v9.280 Foundry, DnD5e 1.6.3, MidiQOL 0.9.81, DAE 0.10.32 and ItemMacro 1.8.0, it doesn't work, but I am certain it was working on some previous versions.
Something off maybe when checking for (it actually monitors data.attributes.hp.value) ```js
else if (lastArg.tag === "onUpdateTarget") {//do stuff
}
In v10 the same item works OK, after a small change in the ItemMacro to use `lastArg.updates.system.attributes.hp.value` instead of `data`
edit: hmmm I might have messed something up big time with this one... Trying to figure it out now
Just don't do the same with getChatData
Hi! I'm trying to understand the "workflow" object that it's returned when using a Hook on a midi event. How can I copy this recursive object into my clipboard/file so I can inspect the attributes in an easier way?
(I'm looking for the targets of the actor that triggered the "midi-qol.preAttackRoll" in the workflow object)
console.log(workflow) in the hook should log it in console
yes! I already did that but it's difficult to navigate through all the properties in the console that's why I want to export/copy that object to an actual editor so I can look for the attributes I need
the problem is that it is a recursive object so it's not possible to copy("golbal_workflow_variable") in the console
stupid question by my side, it's just easier to look at here -> https://gitlab.com/tposney/midi-qol/-/blob/master/src/module/workflow.ts
I have always been using console and or going through the actual files to do that and never occurred to me doing a copy paste to an external editor
Same, turned on debug messages, of course I could just have read it from the repo... ._.
Don't know if that is possible between tbh (the copy paste of an object from console)
Anyway, actually my real problem is that I can't get the targets of the actor which triggered the "midi-qol.preAttackRoll" event.
Looks like the target variable is empty... ๐ฆ
any ideas? Maybe I'm looking in the wrong place
If actor A targets actor B and attacks with weapon X, the workflow object should have actor B information (at least token information) right?
yes afaik. v10?
and hooking on
That's with just a plain ```js
Hooks.on("midi-qol.preAttackRoll", (workflow) => {
console.log(workflow)
})
!!!
Do you have a target option defined on the item?
Does OverTime have the ability to apply a macro CE
Yeah
yea take a quick look at the readme
Just use macro.CE in a different effect below the OT
Yeah I have, but when OT removes itself, it's only removing the OT effect, not the associated macro
Can you try statusEffect?
Target option? I just have an Acolyte targeting (right click and then click on the target button) a Starter Heroe, then the Acolyte attacks
Also use override, not custom for the OT
remove the last ,
saveRemove=true ?
and remove the applyCondition
the club is like that?
Try setting 1 | | creature in the target
Look at my comment above and share a final screenshot
Comme sa?
try setting 1| |creature as the Target
Looks good, try it out
Make sure you're in combat
Also to be safe, make the scene active
It is, yep. And looks like that worked, thank you!
That last comma needed to be removed cause with it, you're saying hey, I'm adding 1 more thing, and because you aren't it breaks
I swear I learn more here than I ever did in college
My target was dead so there is no target to target hahaha sorry
oh lol
My bad ๐

dont kill your loyal test subjects
Happens too often 
@dense rune This chonked piece of code can be used to output the entire structure of the workflow. BUT. Its a chonker, usually 20+MB ๐
function refReplacer() {
let m = new Map(), v= new Map(), init = null;
return function(field, value) {
let p= m.get(this) + (Array.isArray(this) ? `[${field}]` : '.' + field);
let isComplex= value===Object(value)
if (isComplex) m.set(value, p);
let pp = v.get(value)||'';
let path = p.replace(/undefined\.\.?/,'');
let val = pp ? `#REF:${pp[0]=='[' ? '$':'$.'}${pp}` : value;
!init ? (init=value) : (val===init ? val="#REF:$" : 0);
if(!pp && isComplex) v.set(value, path);
return val;
}
}
console.warn("Workflow", JSON.stringify(workflow, refReplacer(), 4));
20+ MB ๐ค
Yeah ๐ But at least its nicely formatted! ๐
I love formatted chonkers
thank you
hahahahahah
Btw I almost managed to fully automatise the Spirit Totem thingy, do we have a community repo for macros?
Let's say you have a torch. It lasts 1 hour. And let's also say it's important in your games to track time and resources used. Is there a way to preserve an item's time spent if they end the effect of that item before it expires?
That sounds.. Difficult.
I would just have them keep track of that manually
Use effect macro module and attach a macro to effect deletion.
In said macro you will get the duration left from the effect data and set a flag on the item with that duration.
On effect creation, with effect macro again, another macro to read the flag and update the duration of the items effect accordingly
DAE on/off could do that too.
Unfortunately not right now.
no worries, I'll try to figure it out
I can write something for that when I have some time tomorrow maybe
That'd be awesome
To be honest I never deal with torches and food in my games. As long as the players donโt overdo it by forgetting their basic needs from time to time, I am fine
Yeah we do. We track time and days pretty rigorously. In part because this is a survival campaign, but also because encumbrance is an important part of balance in our games.
toll the dead from midiqol (v10) is wrong... rolling d8**+**d12 when the creature is not at full HP . Is it to be expected from the macro? Thanks
Isn't it 1d8 if not damaged, and 1d12 when damaged?
Someone called? Ooh. Fun.
on delete:
const remaining = Math.max(0, effect.duration.remaining);
const torch = actor.items.getName("Torch");
await torch.setFlag("world", "remaining-duration", remaining);
on create:
const torch = actor.items.getName("Torch");
const remaining = torch.getFlag("world", "remaining-duration") ?? 3600;
await effect.update({ "duration.seconds": remaining });
yes, not both dices when damaged, which is what is happening
lvl 5, two dices.. I imagine it's because of the cantrip scaling, and the macro isn't working well with it.
What happens when you remove the scaling val
I tested it now, the right dice rolls, but the extras of the scaling are missing, probably need to go in the macro to scale as well
you could make 2 different scale values and reference those in the macro
I think so, but I don't know how to do it lol I'll need to wait for the spell to be updated in the compendium. Thanks
Can you show a screenshot of the macro where it rolls the damage
try {
if (args[0].macroPass === "preDamageRoll") {
const target = await fromUuid(args[0].targetUuids[0]);
const needsD12 = target.actor.system.attributes.hp.value < target.actor.system.attributes.hp.max;
const theItem = await fromUuid(args[0].uuid);
let formula = theItem.system.damage.parts[0][0];
if (needsD12)
formula = formula.replace("d8", "d12")
else
formula = formula.replace("d12", "d8");
theItem.system.damage.parts[0][0] = formula;
}
} catch (err) {
console.error(`${args[0].itemData.name} - Toll The Dead ${version}`, err);
}```
Now I don't know JS at all nor macros but can you test something. replace both d8s with @details.level and attack another PC that has full hp
On v9 the scaling is working without any changes
thanks, I'll test
yes, v9 use without problem for a long time
same problem, d8+d12
ยฏ_(ใ)_/ยฏ
@spring dove Effect macro solution by the hands of Zhell! <#1010273821401555087 message>
thansk anyway o/ @spice kraken
When is that macro executed and why don't you just execute the roll from a clone if the regular item does not work?
const {value, max} = game.user.targets.first().actor.system.attributes.hp;
const formula = value < max ? "1d12" : "1d8";
await item.clone({"system.damage.parts": [[formula, "necrotic"]]}, {keepId: true}).use();
ยฏ_(ใ)_/ยฏ
can you add a console.log(formula) after the let formula = ... and share what it logs?
The formula should have the full cantrip scaled damage, no?
No ๐
ah so then there is the issue
Would that macro account for scaling?
Just set it to scale as a cantrip and leave the field empty
and declare item somehow I guess.
With 70+ lines of DAE and Midi code /s
i just took out the damage in the cantrip scaling and it works great now.
@lucid barn try this
I am trying to figure out why I never had that issue ๐ค
are you v9 or 10
v10
Yeah I think that the v10 Toll the Dead incorrectly adds the scaling dice in the scaling field. v9 left it blank @gilded yacht
args[0].item between ๐
@celest bluff I was wondering but do you perhaps have Spirit Shroud set up for midiqol with the choices to choose a damage type on the spell?
not at the moment but this would be easy to setup
Awesome! I have literally no idea on how to do that so Iโm relying on your stuff mostly lol
I'll see if I got time today to make it
Thank you!
Awesome! Now what do I do with these Macros lol
๐คฃ
Do you have the Effect Macro module?
If not get it ๐
Then on the torch create an (D)AE and in the details page of it you will see the Effect Macros dropdown menu.
Get the macros that Zhell wrote into their respective places (effect creation and effect deletion) and rejoice ๐
I assume you have module(s) taking care of the actual effect creation?
If the effect is transferred from the item immediately when added to the actor, adding an 'on create' macro will be pointless.
I mean let's all hope as we are in MidiQOL.
Just make the item target Self in the 3rd box, so that it will create the effect on them when rolled!
Do you mean convenient effects? That runs as a macro
What is the module called, babe?
You can also use the same method with DAE
well I know I have DAE
DAE also provides a set flag
I'm still pretty new to this. If you have time, I'd ask you to walk me through it
So I'm in DAE, and I make a new effect on the item. Where do I put the macros Zhell wrote?
You don't. ๐
See how little I know?
You need some entirely different macros. The above were written for Effect Macro.
Ok
A module by the name of Effect Macro.
I'll go install that. Any incompatibilities I shouldn't cross streams with?
Does the system you use support Active Effects?
It does not. The only module close to that name is Active Auras
It does.
Which means Effect Macro is compatible.
It ain't got no damn incompatibilities. ๐คฃ
๐ฉ
Wow, I didn't know about this module, this module is amazing hahaha thx
ah, you authored Effect macro
Alright, I've got effect macro
Do I put these macros in Item Macro?
Hey! Really quick question, so I'm trying to ask the player before the workflow goes on but it seems that the workflow will not wait for the user. (I'm trying to mimic the reaction pop up with a dialog) Any ideas about what I should do?
Here is the code:
/*
Hawk Spirit
The hawk spirit is a consummate hunter, aiding you and your allies with its keen sight.
When a creature makes an attack roll against a target in the spirit's aura,
you can use your reaction to grant advantage to that attack roll. In addition,
you and your allies have advantage on Wisdom (Perception) checks while in the aura.
*/
Hooks.on("midi-qol.preAttackRoll", (workflow) => {
console.log(workflow)
let totemActiveTokens = game.actors.getName("Unicorn Totem Actor").getActiveTokens();
if (totemActiveTokens.length > 0) {
let totemActiveToken = totemActiveTokens[0]
let tokensAroundTotem = MidiQOL.findNearby(null, totemActiveToken, 30, null)
let tokenIdsAroundTotem = tokensAroundTotem.map(token => token.data._id)
let tokenIdsTargeted = Array.from(workflow.targets).map(token => token.data._id)
let filtered = tokenIdsAroundTotem.filter(value => tokenIdsTargeted.includes(value));
if(filtered > 0) {
displayReaction(workflow)
}
}
});
function displayReaction(workflow) {
let dialog = new Dialog({
title: "Hawk Totem Passive",
content: `Do you want to grant attack roll advantage to ${workflow.actor.name}? (Cost: 1 Reaction)`,
buttons: {
yes: {
icon: '<i class="fas fa-bolt"></i>',
label: 'Select',
callback: () => {
workflow.advantage = true;
}
},
},
}
).render(true);
dialog
}
See @violet meadow's instructions above
I think you should place it on the effect, that is why you installed effect macro hehe
Gut reaction is that displayReaction needs to be an async function and then you await the function when used, but I'm not really spotting some cross client communication in that code so maybe something else too
I've already tried with async and await (that was indeed my first try) but the behaviour is the same
comme sa?
Does MidiQOL have something to mimic the reaction pop up behaviour? (Where the roll is paused until it gets the answer from the player?)
Yes! I know about this but I mean to invoke it via macro
like using that same behaviour in this macro (instead of a dialog, because it seems that the workflow won't stop with a dialog)
OH yeah, sorry I meant other than that. As in, when the hour is up, will it self delete with the "destroy on empty" check, or do I need to set charges or anything
@dense rune Dialogs use callbacks, the easiest way to do this is probably to create a promise outside, then resolve it in the dialog. Then you can await the promise to wait for the user to do something
That was my first attempt, didn't work hehe... Is this what you mean?
async function displayReaction(workflow) {
let dialog = new Promise((resolve, reject) => {
new Dialog({
title: "Hawk Totem Passive",
content: `Do you want to grant attack roll advantage to ${workflow.actor.name}? (Cost: 1 Reaction)`,
buttons: {
yes: {
icon: '<i class="fas fa-bolt"></i>',
label: 'Select',
callback: async () => {
workflow.advantage = true;
}
},
},
}
).render(true);
})
await dialog;
}
Do you have a module that deletes effects when they expire? Cus Effect Macro don't care.
Close, without having an editor open, so this may not even run, but something like this:
function displayReaction(workflow) {
let dialog = new Promise((resolve, reject) => {
new Dialog({
title: "Hawk Totem Passive",
content: `Do you want to grant attack roll advantage to ${workflow.actor.name}? (Cost: 1 Reaction)`,
buttons: {
yes: {
icon: '<i class="fas fa-bolt"></i>',
label: 'Select',
callback: async () => {
workflow.advantage = true;
resolve(this);
}
},
},
}
).render(true);
})
await dialog;
}
does midi do that
Question for the audience.
Nope, but Times Up does
I've noticed that the Warding Bond spell in the Midi sample items doesn't seem to work with NPCs.
Oh so the problem is the async!! Let me try that (Thank you as always @kind cape)
How or where is the effect for the macro you wrote storing its time used? Cuz when I delete the effect and then use the torch again, it still shows 3600 seconds
I'm sorry guys. I feel like I'm being too difficult.
In the item called "Torch"
invisibly
Do I delete the effect to stop it, or use the torch again?
Deleting the effect stores the remaining time on the item called "Torch"
creating the effect retrieves the stored value and sets the effect's duration accordingly
Right, so, when I delete the effect and use the same torch again, it's still showing 3600 seconds.
on the actor
Did any time pass?
about 2 minutes, yes.
Does it really work with real time? Don't you need Simple Calendar?
I have simple calendar
Time passing in combat is core ๐คท
and is the time active in simple calendar?
yes
6 seconds per round
yes yes but I mean if the torch is running out it will be because of simple calendar not because of real time passing by
right?
Question for the audience.
If you are using a base torch from dnd5e you need to edit the torch so it doesn't nuke everyone in the aoe lol. Midi+vanilla torch is a hilarious interaction.
It's ticking off seconds, but reeeeeeeally slowly. I let it wind for about a minute, deleted the effect, used the torch again, and it has 2 seconds expired
Happy to announce it's not mine or Effect Macro's fault lol
managing torch and oil time is a level of micromanagement that is just too tedious to manage, torches cost like copper, all I care about is hand management.
No, this is a custom item. Most of the items in my game are custom because of Revised Adventure Equipment
They have survival elements in their game tho
Right. Spending weeks away from a source of supplies while in the wilderness or far underground. Resource management, especially light resources, is key
I'm running Dungeon of the Mad Mage, and that was one of the first things I threw out cause it dragged badly
Aaaaanyway
lol
Consult your time management modules.
Deletion has the setFlag and creation has the getFlag
So with a bit of testing
Starting with torch off, then turning on:
effect on actor reads 3478
after 1 minute: (turning back on to check time) 3477
Starting with torch on, then turning off:
effect on actor reads 3477
after 1 minute: 3477
doesn't work (the flow does not stop), but thank you! I will keep looking for a solution
Do you have Warpgate? The menu function in there is supposedly async in the way you want https://github.com/trioderegion/warpgate#menu
oh yeah of course I have warp gate, another amazing module let me try that!
I played along with fotoply's suggestion and your code, I only removed the conditional for ease of use for testing. This works for me.
Hooks.on("midi-qol.preAttackRoll", async (workflow) => {
console.log("I triggered!")
let totemActiveTokens = game.actors.getName("Unicorn Totem Actor").getActiveTokens();
if (totemActiveTokens.length > 0) {
let totemActiveToken = totemActiveTokens[0]
let tokensAroundTotem = MidiQOL.findNearby(null, totemActiveToken, 30, null)
let tokenIdsAroundTotem = tokensAroundTotem.map(token => token.data._id)
let tokenIdsTargeted = Array.from(workflow.targets).map(token => token.data._id)
let filtered = tokenIdsAroundTotem.filter(value => tokenIdsTargeted.includes(value));
/*
if(filtered > 0) {
await displayReaction(workflow)
}
*/
await displayReaction(workflow);
// force true of above for testing
}
});
async function displayReaction(workflow) {
let dialog = new Promise((resolve, reject) => {
new Dialog({
title: "Hawk Totem Passive",
content: `Do you want to grant attack roll advantage to ${workflow.actor.name}? (Cost: 1 Reaction)`,
buttons: {
yes: {
icon: '<i class="fas fa-bolt"></i>',
label: 'Select',
callback: async () => {
workflow.advantage = true;
resolve(this);
}
},
},
}
).render(true);
})
await dialog;
}
});```
(I use warpgate for spawning the totems hehe)
I fcked up the if clause it should be filtered.length
OH SO IT'S ALL ABOUT THE ASYNC CALL IN HERE "await displayReaction(workflow);"
Oh yeah, forgot to add that ๐
Welp, I mindlessly just added that, so used to throwing await and async everywhere if shit stops working >_>
I'm not used to javascript promises I need to read about this hahaha
thank you so much to both of you :3!
Its because you made displayReaction async to allow await in it, then it will be run in parralel so you need to await the new function as well
yeah so await makes everything synchronous and async makes it parallel
makes 100% sense hahaha
(now)
Now I just remembered that this is a world-script and I need to find out the way to only show the dialog to the caster of the totem ๐ฅฒ
Check user ID vs a stored one ๐
1 week for 1 spell ๐ฅฒ
There is a reason I didn't bother making hawk automatic ๐
?
is there any method to show the dialog just to one specific player?
I tested with just EM and ET (which is what I use to transfer effects) and it works flawlessly, with time advancing through the combat tracker.
Ah, maybe that's the issue. Will this tick down seconds outside the combat tracker?
Do you have a module that makes time pass outside of combat, given that combat is the only core mechanic that advances time?
(at 6 seconds per round)
simple calendar, yes.
and is Simple Calendar updated for v10?
If I remember correctly, you're going into the pain zone of needing a socket to trigger a macro/function that displays the dialog for the other player.
I was exactly fearing that the word "socket" will be coming soon, but not this soon
When you spawn the totem you can take the user who did it and store their ID as a flag on it. Then you can check that ID against the user running the macro for the reaction and only trigger it if they match
yes it is
problem is that is not a macro, is a world-script (because of the nature of the spell)
Right now, it seems that it is removing 1 second from the torch's duration for every minute that passes in game. I've checked simply calendar's settings, and it is definitely set to 1 second = 1 game second
That should still work, the hooks are executed on each client
Oh yeah, that's much easier, you already got midi doing all the communicating
game.userId
mama mia
amazing
thank you I'm going to try right now
I'm still avoiding socket API -> 10 out of 10 happy foundry coder
You can always make a gift to Mr Primate, so he could integrate it in ddb importerโฆ
I will surely do
What is ddb importer
oh dnd beyond importer
okay
of course I mean, I don't want anyone wasting one week of their life as me so I will happily share the thingy
Is there a good way to "capture" when an actor is rolling save? I want to mess with the save using the midi-qol workflow, but I don't want to have the attacking creature have the macro, but instead the saving one.
Hooks.on("dnd5e.rollAbilitySave", (...args) => console.log(args))
Core system hook as of v2.0.0.
Yes
I'm starting to think simple calendar doesn't actually advance game time, it is simply a tracker on its own
The 'on create' macro should be amended to this btw, I didn't take negative or zero remaining duration into account.
const torch = actor.items.getName("Torch");
const remaining = torch.getFlag("world", "remaining-duration");
const seconds = remaining > 0 ? remaining : 3600;
await effect.update({ "duration.seconds": seconds });
You may be right. Easy to tell though.
Does this change?
What are you trying to do? Also if you use auto-checking saves you will want to use Hooks.on("midi-qol.preCheckSaves", (workflow) => console.log(workflow))
(Potentially midi-qol.postCheckSaves if you are trying to do stuff with what they rolled already)
Not while I'm watching it lol. If I advanced the combat rounds, that number ticks down by 6 seconds, yes. If I just enable/delete the torch while combat is not happening, it actually doesn't seem to do anything unless a whole minute has passed.
... is your time advancing at 1 second per real time minute or
I checked that, and no lol. It's advancing normally, 1 real second = 1 game second
Give the saving person advantage depending on class features they have
Holy quantity of updates, Batman
meh, it's super small
consider during combat, it's not updating at all.
until I tick over a round, then it's just one 6 second advance
OK, can check another way
You should be able to do this with flags? Unless I misunderstand what you are trying to do
Hooks.on("updateWorldTime", (...T) => console.log(T)) in the console.
be out of combat so SC ticks time
tell me if there's spam (one message per second)
Well alright then. It advances time. At one second per second.
oh neat
Not as far as I can tell, I'm actually just trying to give a specific player advantage on saves when the item that was rolled applies the poisoned condition.
I can't see any obvious way to do that.
how do I turn off that hook lol
F5
lol
Only half paying attention, but isnt it a setting in simple calender for how much time passes in game, vs real time? looks like they have it set up 1 for 1? ๐คทโโ๏ธ
Yeah, we want that.
Could also do Hooks.off("updateWorldTime", 782) ๐
thanks fotoply
(The number is output when you start the hook)
My plan was to scan the message in the item description and change the workflow.
Okay, then you want Hooks.on("midi-qol.preCheckSaves", (workflow) => console.log(workflow))
Yep, was just reading that when I asked
This should output the current workflow into console when a save is rolled in response to an item
@molten solar @vast sierra
I'm actually a bit surprised midi-qol doesn't have it's own way to handle this built-in.
Since there are tons of features that give advantage on saves depending on the description.
I find there are so many situations and contexts that change adv/disad that it's easier to just prompt for it.
esp as a DM since a lot of those are fiat
It handles condition immunities fine, as well as advantages on saves vs magic, but there are few features with advantage on saves that include a specific condition
midi does track if you are supposed to have adv/disad in a lot of ways. When your player is prompted, what midi thinks you should have is highlighted in orange, but they don't have to click it.
what does your simple calendar look like?
uh
We have already established that it advances time.
you want the full or compact view
Does it? Maybe it's just not doing it when I have fast rolls on
there was a long standing issue with simple calendar where the earlier versions would not properly update to the new fork line that everyone uses so some folks wind up thinking they have an updated SC when its really 8-10 months old
Is it a homebrew feature you are trying to make work?
easiest way to spot it is to either show us what it looks like or tell us your version
@scarlet gale This is what it looks like to my players. The barby just used reckless and made an attack, so midi is giving him adv. He doesn't have to click adv, but the player knows he should have adv in that situation because of the highlight (and that he knows he used reckless, but a lot of things people forget, like being restrained giving you disad on attacks etc)
That's just not having fast rolls on no?
If you aren't fast forwarding, I highly recommend Advantage reminder even without setup, it highlights ALOT better than default midi
So midi has a few flags to give adv/disad or grant adv/disad to anyone interacting with said actor that has an effect with that flag. You could set up an effect that activates with your chosen context.
you need to set it to mixed mode
The issue comes down to needing this for a save not an attack roll
Attack rolls can just be done with midi-qol flags
it can be done for saves too
Ah, mine was set to simple, but changing it to mixed does not seem to fix the issue.
there are flags for saving throws too
there is also a flag for magic resistance even
Is there a flag for poison condition advantage?
mixed should accept module controls which change times, such as about time.. though not sure about v10
Does Times Up help
so overall who is the macro or condition being placed on? the attacker or target?
there is no flags for specific saving throw advantages for conditions
I don't see a resistance section for conditions
not necessarily, but if you installed advantage reminder and you didn't fast forward you could do this:
Long story short
you can write a world script to correct this though
See above
That's what my solution was
My plan is to use the method from here: #1010273821401555087 message
And just alter the workflow
by scanning the item description
I just use adv reminder
can scan the item for active effects
I was thinking that too
99% of the time my players don't have the dialog, I have fast rolls on
then can add an active effect on the target to give them advantage on saving throws
@vast bane This is what Simple Calendar looks like, in expanded and compact view. It's super handy
you can also create an actor on use macro on them, if they have some sort of racial feature
Can the onuse thing catch making saves?
While I could edit every feature on creatures that apply conditions
I'd rather just have one catch all
@molten solar wanna know something infuriating? If I advance the day with simple calendar, it definitely wears out the time on the torch to 0
is that old SC guys?
sure whichever method you prefer
What is your version of simple calendar?
2.1.27
What if you set it to 1 second per second, but only update every, I dunno, 5 seconds?
can it do that?
yeah
supposed to be 5 seconds
eh you are 3 versions behind me but you are over the hump of the break so you just haven't updated in a few
I tried fixing it by setting the update to .1 seconds and that did not work
there was some kinda display error I had to work around this morning, maybe the newer updates fixed that
oh wait, I'm behind you lol math this early in the morning
oh lol
youmust be on a v10 branch
I think alo another way to catch anyone on the broken old branch is the icon for SC will be a blank plug vs the new SC logo
ok, @molten solar hilariously, that is now advancing the torch counter, but the clock is ticking by 5 seconds every real second lol
Okay
oh my god
Confirmed: SC cannot do math.
๐ฅณ Don't forget to update the 'on create' version with the new one I wrote
Will do!
I can modify that macro for other timed effects too, like oil in a lamp lasting for 6 hours, or etc
Yep. Easily.
@scarlet gale Are you on V9 or V10?
V9
oooooooh I see what's going on with the clock updates, @molten solar. If the character sheet is open, the time for an effect does not tick down unless you're in combat. You have to close the sheet and reopen it for the time to update. When I was testing your macros, I was just switching between the effects tab and the inventory, never actually closing it.
Yeah the label updates with actor or effect/item updates
Alot of entities in the Ui are like this, where they require certain things for updates
Knowing is half the battle!
This is why I like having an off-sheet panel to show the effect durations
I am guessing you have some sort of equivalent to dfreds effect panel or are you actually referring to that?
Both ๐
WHAT THE HECK PEOPLE? 3 hours away 1000 msgs?
I can't remember why but I purposely put a postit on my monitor saying to keep dfreds EP disabled due to bugs, I really need to keep better notes.
Modules!
It had bugs? ๐ค
I blame all of this on you being away for 3 hours.
Oh, simple calendar also does reversing time too. If I go back in time, it adds to the torch's effect. Can you add a line to not let the effect go above 3600 seconds?
They were stuck with me. I didn't want to leave. They were miserable. It was great.
I will enable it, and we shall see lol, probably won't remember till I see why on saturday
It doesn't reapply expired effects though so beware
yeah I know
Is there a way to freeze an npc in time? Say I have a BBEG thats prepped with a bunch of prebuffs like shield of faith or death ward, can I somehow freeze their timers? So SC doesn't expire them?
The scripts are 1000 messages up. Please post them.
sure
Does removing the start time work?
On creation:
const remaining = torch.getFlag("world", "remaining-duration");
const seconds = remaining > 0 ? remaining : 3600;
await effect.update({ "duration.seconds": seconds });```
On deletion:
```const remaining = Math.max(0, effect.duration.remaining);
const torch = actor.items.getName("Torch");
await torch.setFlag("world", "remaining-duration", remaining);```
oh wait, I can't test it, live world, players have stuff going
I'll fiddle later when I'm done with this prep sequence
backup the world, play with it, test and put it back ๐
nah I got a fiddle world I can load, but I'm elbows deep in a monster automation project
Delete:
const remaining = Math.clamped(effect.duration.remaining, 0, 3600);
const torch = actor.items.getName("Torch");
await torch.setFlag("world", "remaining-duration", remaining);
Do you want the BBEG to have them all preadded when dropped in the scene?
Yeah, can you not just keep him out of the scene until he's relevant, then drop him in?
Nah, my use case it will be different in the future, they already murder hobo'ed the Cassalanters
I did upload my own version of the Effects Panel (for one of my players), it's not published but you can download it ๐คท
Thanks zhell
it was getting too big for my own world script lol
Was that the snazzy one you showed earlier? Would like
The fancy one?
It has collapsibles now!
I think I disabled effects panel when I was dealing with an insidious bug with perfect vision but wound up just flat out disabling PV entirely as the dev tried 3 times to clear the bug for me but it just kept coming back each week we played. I felt like a burden so I stopped using it. It would throw an error that included a bunch of modules but ultimately it was PV's error and I took stock of what it gave me and whether I could live without it and proceeded accordingly.
I still am not using PV... I might need to check the fuss about it at some point ๐
and I just lost track of what modules were wrongly named in those errors and never re-enabled them.
I loved its drawings feature for some map effects but it does NOT like my druid players wildshape macro setup(that you two made for me lol)
I think most people use PV for proper darkvision.
whenever my druids shapes are on the map it would throw these crazy 5 module named errors whenever she did anything
(which is now core in v10)
Midi being one of them andit would break the entire midi workflow
Thought that ironmonk did something that would benefit you, not? something about award exp?
https://github.com/krbz999/visual-active-effects/releases
All the cool features are only supported currently by my own world script and Concentration Notifier, it otherwise just defaults to flags.convenientDescription.
Its own flag data should be in each effect's flags.visual-active-effects.data.intro and .content.
strange.
It would only happen with her wildshapes, and her wildshapes were uniquely built by me and summoned via that really ugly frankenstein warpgate centirc macro you and bugbear built along with me. So I took stock and just decided to give the dev a break from it since its very likely something I did stupidly with her sheets or the macro.
the error only shows PV, but what the bug would cause is a cascade of other errors after that one with other modules till I realized turning off PV would clean up the rest of the modules errors.
refresh on an already destroyed token ๐ค
Yeah it was really weird.
He pushed out fixes for me specifically but it would keep coming back each week, break that players workflow in midi, shed basically start playing in vanilla dnd5e till I would disable PV every week.
So the wildshape warpgate macro, was spawning a new token for her and hiding the normal one or somehting?
We don't need to troubleshoot it though, just reminiscing. I make do, its dungeon of the mad mage, everything is lightless. now anyway
Yes it was hiding the actual druid token under the wildshape
I like this cause of synergy with MTB and other reasons
While its true a druid can't mess with their inventory while they are shaped, meta wise, I still wanted to be able to, so I needed her token out for some things since wildshaping messes up inventory management
Were you doing something to the user permissions too or do i remember something else? Actually that would be #modules or something so I will drop it (here at least) ๐
we don't need to bother him again, the guy wrestled with it for 3 weeks and it was a headache.
We are ok ๐
I only recently realized that warpgate summons don't require permissions set on the original, so I've been slowly fixing my setup to account for this specially with the summons that are shared between me and the players.
Yeah the way it's checking for d12/d10 means it does not see the scaling value at all, so incorrectly scales. Will fix that.
Here's a version that fixes the cantrip scaling.
Oh so you can have in the same json an ItemMacro for v9 and v10? That's interesting!
Convenient use of the lack of data.
Indeed! Nice one
@molten solar @spring dove can you sum up what the issue was with Simple Calendar? It should be working correctly in terms of advancing game time but if there are bugs I need to fix them ๐
It was the users error, they weren't reopening their sheet and were staring at the sheets unupdated data fields for durations on effects and thinking SC wasn't changing time ingame
The solution was, reopen the sheet to see the change in ae's durations after time has transpired, or use another module that shows live updates to durations.
Ah ok thanks for summing that up!
Hi, @gilded yacht. I noticed two typos/overlooks at Midi 0.9.82:
Missing dot at https://gitlab.com/tposney/midi-qol/-/blob/master/src/module/workflow.ts#L932
let effect = this.item.actor.effects.find(ef => ef.data.label === this.item.name + " Template");```
2) Missing *data* at https://gitlab.com/tposney/midi-qol/-/blob/master/src/module/workflow.ts#L934
```js
const newChanges = duplicate(effect.data.changes);```
Doh - the trouble with backporting from 10 -> 9
So I'm using the Hooks.callAll("midi-qol.preCheckSaves", workflow) to adjust what tokens are getting advantage on a save. But the preCheckSaves doesn't seem to have a populated list of tokens that have disadvantage, such as gaining it from a set flag.
Am I just using the wrong hook to do this on?
is About Time still required at all for for midiQOL? i've just upgraded to v10, doing a bit of a cleanup as i re-enable modules
The only thing I keep mixing that module up with is if it adds more options in special durations in the active effect duration tab. So disable about time and see if you are missing any?
Turns out that list just is for displaying if they have disadvantage or advantage, it doesn't actually give them it.
doing a little more digging it looks like it's just for managing events now, times-up handles everything else
It handles the special duration of turn start and end, plus obviously the regular duration expiration
are we sure? I keep both just cause I can never remember which is which, about time and times up.
Oh shoot
I misread that
Times up does what I mentioned
I don't have about time but that's cause I let simple calendar expire AEs out of combat (which has about time integrated)
How do I make midi roll this automatically, I have to constantly click the button:
auto rolling other is not a thing?
With activation conditions on for other formulas in midi, it should be auto rolling, by putting true in the activation condition field.
Now if this bugs out cause there is no damage formula I am not sure as I haven't tried it
About the stuff in macro polo:
I had chosen all cause I wanted this dang roll to fire before I was prompted with warpgate
I thought it was that drop down causing it to do that but I guess its the lack of true in the window
You can check the Roll other in the bottom checkboxes too iirc
Or is there only one for crit other?
I don't remember now
I tried that too, its just not auto rolling
the only way I can pull this off is if I roll the item, and with warpgates summon on my mouse, I move over and click the other button in chat
You can grab the other Formula field in the macro, create a roll for it and do that before continuing along the execution
Or roll a 1d100 in the macro
yeah but I'm not very good with macros and I think I'm about to settle on the bandaid fix instead
Make it Utility, Other or something instead?
Yeah other other
I had it on other/other formula and it was not auto rolling, trying utiliity/other now
Wait but are you auto rolling damage?
Do you need it to create a message with the roll?
Yeah so I can see the result
instead it does this:
I can click that button and it does the job, but I swear to god, at some point in the last hour it auto rolled it
I don't know wtf I did wrong
Is the roll other Formula in the midi settings for spells set to Activation condition?
yes, and I need it to stay that way, I use that a TON
but also this is not a spell or an attack
I think its a feature?
Hmm I will try it a bit later.
could this be the actual problem, midi doesn't actually say it does it for features, it specifically mentions spells and attacks
I'm gonna make an attack version of the item
/r 1d100
const summonType = "Barlgura";
const [spawn] = await warpgate.spawn(summonType)
new Sequence().effect().file("jb2a.misty_step.01.blue").atLocation(spawn).play()
I know this is probably lol but I tried this and yeah...didn't work
I swear I've tried all suggestions now, I think the only way to make this work is to just do other/other formula 1d100 and before placing the summons, click the other formula button in chat
When I set it to damage suddenly the item just flat doesn't roll at all and no error in console
if theres a damage formula in other
(cause no target probably)
OK. Guys I am all set I figured it out. It was lack of target
Auto rolling with self/self set now
as a damage formula
what do you have to set up in warpgate for this to work? Also doesn't that cause damage to the summoner?
I used [no damage]
you don't have to set anything up in warpgate and I think my animation is in the free half of jb2a, so that macro can be used to summon any sheet you want from your side bar, one of these days I'm gonna build up the courage to ask Zhell how to summon a compendium actor in that macro.
Hmm I think that at some point there was a warning from MidiQOL when rolling something without a target when there should be a target.
Except in this case you use the "enforce" targets (in MidiQOL settings), but you had no actual Target info set on the item?
So no warning? ๐ค
no warning cause I was rolling other
also, I really think that cause its a feature some of the midi stuff is ignoring it
how do you select the spawn point for the summoned creature?
warpgate magic
Warpgate is pretty dope
I've only been using warpgate as a dependency, should start using it for good
but for the record thats a warpgate+sequencer macro ;p
using both as dependencies ๐
I also kinda want a macro where it does the above macro, but instead of having a fixed name, I want it to pop up a dialogue where I can type an actor name and it summons it.
is the summonType string value the name of the actor you want to spawn?
Yes, but must be in the Actor's Directory on the sidebar
I honestly don't know why theres 3 lines there
I sorta copied this from that really messy macro that bugbear and zhell helped me make long ago
The last line plays the effect in the spawn position iirc
final question: where do you get the name to use with the JB2A effect for the sequencer macro? IE: the filename for that effect is MistyStep_01_Regular_Blue_400x400.webm but the macro has jb2a.misty_step.01.blue.
GO to the sequencer database on the left sidebar
No heres an easier method:
https://www.jb2a.com/Library_Preview/
Browse all of our free and Patreon-locked assets!
bottom right of every choice is the code
ah ๐
you can't see them there can you?
ui.chat.processMessage("/r 1d100")
or just, you know, new Roll("1d100").toMessage()
I knew you'd come to my rescue on that one, but for the record when I did that, I was literally throwing the keyboard out the window mad at the problem lol. I finally got it solved though thanks for the response hehe.
As I've discovered recently the core implementation of darkvision is wrong for 5e. It amplifies light everywhere on the map and not just in the Darkvision radius. PV doesn't fix this in v10
I honestly think that is a decision based on accessibility issues. People with vision impairments and color blindness have huge issues with black and white and dim color scales.
but also you can change the vision setting to black and white in core I believe just the dimness is not present
actually...my PV is disabled, you can totally pull off dimness in core
I think I'm just gonna put a request into the Dice So Nice guys to see if they can add a trigger in their settings for dice explosions.
Since we can't get that hook to work
Is it possible to use a formula to determine the flat dc for a save in an item's saving throw dc field? It seems to reject any input that isn't an integer
you wouldn't be able to get that without macro work anyway
so a harder creature would fail it but a goblin would easily defeat the ability?
no it's a save that a pc would do to avoid something bad happening to them; the DC is higher the stronger the monster is
so it wouldn't be an attack to begin with yeah :v
the save is manually rolled when using the feature
oh just do an attribute that has no modifier
then give the monster an AE that mods the spell dc with the math for CR
or if its for many monsters and the attribute is different for all, enable sanity and use sanity at 10 or 11
probably have to account for PB getting added in if we can't unproficient said item
eh I could also simply grab the target's CR and paste the DC in chat with some HTML code to make it look snazzy since the con save is rolled right now
still trying to figure out the sintax for this kind of macros though...if I have args[0].target what should I add to grab the CR value? and is there a list somewhere? Asking cause for the uuid it's args[0].targetUuid so I'm not clear on the usage
why reinvent the wheel, do the work on the item, and then let a roller handle it
OK so select a token.
Open console and type _token.actor.getRollData()
Go through the data and see where the CR is
You can also make a monk's tokenbar macro that has a DC set there
Then call it by doing the same path in the macro, but instead of using the _token.actor by using args[0].targets[0].actor
Oooooh I wonder if you can intercept the monks token bar request with an item macro
Why intercept it when you can create it in the Item Macro?
heh more theorycraft than anything, I'd just make the DC in the active effect of a spell dc mod
easier than getting one of you to write all the mumbo jumbo witchcraft in the item macro
is it a saving throw request?
Its not my ask, its @scarlet stump I'm done with my prep for the week as of 20 minutes ago
I'm in the process of doing my weekly backup and then pondering installing a v10 instance
You can again open console and type game.MonksTokenBar.requestRoll
yeah I need an on demand con saving throw that is using 10+a creature's CR as the DC
it will bring up the request roll API exposed function from Monks Tokenbar
monks doesn't let you do modifiers, but Requestor does!
This is a bit more tricky to read through thouth
I can't view my console atm, the servers down and in a backup
do you need a token selected for that console command?
nope but it will show you the function only. I though it had some more details on how to call it properly with its parameters, but it hasn't
Let me check if I remember how to create a monks saving throw
you can use the save macro button on the request window to get some functional syntax
yes but I need to remember ๐
but I literally saked monk on his server if it was possible to add situational bonus's to the macro and he said maybe in a future version
so I believe the CR is data.details.cr but if I try to do this I get an error...something silly I'm sure. I'm in v9
let cr = actor.data.details.cr;
console.log(cr);
missing a data
Or do actor.getRollData().details.cr
that way it will work in both v9 and v10 Foundry
so it would be args[0].targets[0].actor.getRollData().details.cr;
oh you know what? Its the DC value, you CAN add a modifier in monks then
all you have to do is do the math in the defiition above it
use an alias or whatever you guys call it
const DCstuff = cr+magic number
then in monks macro in the DC field use DCstuff
Crude example```js
await game.MonksTokenBar.requestRoll([{"token":_token}],{request:'save:con', dc: _token.actor.getRollData().details.cr + 10, silent:true, fastForward:true, rollMode:'roll'})
and if it doesn't like all the fancy stuff in there, define it as a const above it right?
This will roll a CON save for the selected token and set the DC based on the selected token's CR
its wrong but showcases the use
so I should definitely be using MacroTokenBar right? ๐คฃ any known conflicts? Not sure why I am not using it
Though I believe dc's are 8+ fyi
If you are not using it you can roll a normal save ๐คท
I think the benefit of monks is you can then hook off success and failure?
I'm trying to figure out why we are trying to automatically adjust a DC based on a static value ๐ CR generally doesn't change, 10 never changes, so why not just set it once per creature and be done with it?
Same with an let save = await actor.rollSaveAbility('con')
And get the let total = save.total after
Homebrewers be brewin yo
But even for homebrew I don't see how this makes sense, what's the end goal here?!
If you are still trying to get that hook done for exploding heals, I think I'm just gonna put a request into Dice So Nice for a sound event option in their settings and call it a day. It seems too complex to get to work with a script
Use an ItemMacro whenever that specific ability is present, no matter what the monster that uses it, is probably ๐คท
Wait, didn't the last one I sent work?
I could have sworn it worked on my end.. ๐ What code are you using right now?
or rather it plays on regular rolls
oh poop let me see if its done backing up
I can't check atm my servers backing up
But that comes after the built-in save has been rolled ๐ค
cause it's a save on the receiver, not the attacker
no build in save in their case
so a monster smashes a character > that character rolls a con save with dc 10+cr to avoid effect x
Seriously though, Thanks for getting me to realize how to fiddle with monks macros and modifiers that is a huge help for my homebrew crafting
it's an ability on the character's end, not something on the monster's end
Okay, so to be clear, you are using a MIDI world hook to trigger a save if a creature that is hit has a specific feature?
no automation, it's a feature that a player can choose to use
the only automation I'd like is for the DC to be set dynamically based on the targeted token
(nope this should be a conversation in #macro-polo probably, but noone here to prod us to the proper channel)
ah my bad ๐
lol
Targeted token being the attacker?
He'll get swept back the second he sais arg
cause hes trying to pull a targets CR not the actors CR
then again hes just reading the CR not changing it, that doesn't require args right?
It can all be done with an onUse macro to be honest
let me explain the whole process; I use ability A where a player can choose to break its own shield to prevent damage from an attack. This request is for ability B; ability B allows said character to pass a 10+attacker CR Con save when using ability A to prevent their shield from breaking
Reaction damage would allow that
Within Midi. Like the Uncanny Dodge
Hell I'd use a macro and use the charges on the item to decide if it broke or not all on one item
If succeed, refund charge, if fail, expend charge
Like bugbear said, put it all in the macro on use
@kind cape
Hooks.on("midi-qol.RollComplete", function (workflow) {
if (workflow.damageDetail.filter((detail) => detail.type === "healing").length === 0) return;
let dice = workflow.damageRoll.dice;
let explodedDice = dice.filter((die) => {
return die.results.filter((result) => {
return result.exploded ?? false;
})
});
if (explodedDice.length === 0) return;
AudioHelper.play({src: "hakuna_meow02.ogg", volume: 1, autoplay: true, loop: false}, true);
});
this is the last iteration I was using, it always plays the sound even on non explodes
Thats the one I could have sworn worked ๐ค
let me see if merge/condense is causing it
I am using merge cards