Open shemetz opened 1 month ago
It seems like this information would not be hard to add. It's there when the dc flag is generated, but omitted.
dc: context.dc ? R.omit(context.dc, ["statistic"]) : null,
This just needs to add context.dc.statistic.parent.slug
to the flags.
My previous feature request that tried to solve this problem didn't really end up doing so (https://github.com/foundryvtt/pf2e/issues/9824).
My new request: I want the
chatMessageData
object that I receive from thepreCreateChatMessage
hook to have information about the DC source statistic even in situations where it normally doesn't exist. This is for the Modifiers Matter module to work in more situations.Right now, I try to get
originUuid
anddc.slug
from the context flags (code) and then I use the origin item type and dc slug to figure out which statistic the DC came from (code). This code is working for most types of checks, but not for@Check
buttons that require rolling against a class DC, such as the Monk's Stunning Fist.What I'd like is for the
chatMessage.flags.pf2e.context
object, which is already full of useful information, to have a bit of extra information that allows me to determine exactly which origin statistic was responsible for creating the DC the roll was using (if it's not a fixed DC).Right now, when rolling against the monk class DC in the normal way, I only get to have the following context data:
This doesn't include anything stable that I can rely on to know that the correct statistic is the
actor.classDCs.monk
statistic. The closest thing is thedc.label
field, but that one's subject to changes by translations, as it's a user-facing string.