An array of target data fields.
The change target as per the change's subTarget
property,
see pf1.components.ItemChange.target ItemChange#target and change targets.
The change type as per the change's modifier
property,
see pf1.components.ItemChange.type ItemChange#type and change types.
The numerical change value, if any.
The actor the change is being applied to.
Called by Hooks.callAll
Adding a (weird) Change that increases an actor's gold
// Add a change target
Hooks.once("init", () => {
CONFIG.PF1.buffTargets.gp = {
label: "Gold Pieces",
category: "misc",
};
});
// Define the correct data field for the change to target
Hooks.on("pf1GetChangeFlat", (result, target, modifierType, value, actor) => {
if (target === "gp") {
result.push("system.currency.gp");
}
});
Generated using TypeDoc
A hook event fired by the system when the system determines which data fields a change target should affect, i.e. flattens the change target to target data fields. This is called for every ItemChange on every actor for every data preparation, so callbacks should be efficient.