Check inputs.
The rolling actor.
Optionalarchetype?: string | nullArchetype key, or null.
Optionalattribute?: string | nullAttribute key, or null.
Optionalformula?: string | nullRoll formula, or empty to derive it.
Optionallabel?: string | nullOptional display label.
Optionalvector?: string | nullVector key, or null.
The evaluated Roll, or undefined when no formula could be resolved.
Roll an attribute, vector, or formula-driven check and post it to chat.
Formula resolution: when no
formulais given but avector, or anattributeplusarchetype, is, the formula comes fromactor.getRollFormula({ vector, attribute, archetype }). When the formula is still missing, nothing rolls and the function returnsundefined.Attribute and archetype are parsed from
@attributes.<archetype>.<attribute>in the formula when not given explicitly. Advantage mods from_collectCheckModsare applied via_buildCheckFormula. The roll is posted to chat andbms.checkRolledfires with the outcome.Quirk:
getRollFormula({ vector })ignores the vector key and always returns the luck formula. This is pinned by the characterization suite. Do not fix it here.Config:
actor: the rolling actor. Supplies roll data, the speaker, and the check mods.formula: roll formula. Derived from the vector or attribute when empty.archetype: archetype key (body, mind, soul). Parsed from the formula when empty.attribute: attribute key. Parsed from the formula when empty.vector: vector key. Makes the roll a vector check when truthy or whenCONFIG.BODY_MIND_SOUL.vectorshas the attribute.label: optional label. Chat flavor becomes[attribute] <label>. Also sent raw in the hook payload.