• 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.

    Parameters

    • result: string[]

      An array of target data fields.

    • target: string & {} | "size" | "fort" | "ref" | "will" | "skills" | "attack" | "damage" | "acpA" | "acpS" | "mDexA" | "mDexS" | "reach" | "str" | "dex" | "con" | "int" | "wis" | "cha" | "strMod" | "dexMod" | "conMod" | "intMod" | "wisMod" | "chaMod" | "strPen" | "dexPen" | "conPen" | "intPen" | "wisPen" | "chaPen" | "unskills" | "carryStr" | "carryMult" | "ageCategory" | "ageCategoryPhysical" | "ageCategoryMental" | "strSkills" | "dexSkills" | "conSkills" | "intSkills" | "wisSkills" | "chaSkills" | "allChecks" | "strChecks" | "dexChecks" | "conChecks" | "intChecks" | "wisChecks" | "chaChecks" | "landSpeed" | "climbSpeed" | "swimSpeed" | "burrowSpeed" | "flySpeed" | "allSpeeds" | "ac" | "aac" | "sac" | "nac" | "tac" | "ffac" | "bab" | "~attackCore" | "wattack" | "sattack" | "mattack" | "nattack" | "rattack" | "tattack" | "wdamage" | "mwdamage" | "rwdamage" | "twdamage" | "rdamage" | "mdamage" | "ndamage" | "sdamage" | "critConfirm" | "allSavingThrows" | "cmb" | "cmd" | "ffcmd" | "init" | "mhp" | "wounds" | "vigor" | "spellResist" | "bonusFeats" | "bonusSkillRanks" | "concentration" | "cl" | "dc" | "sensedv" | "sensets" | "sensebse" | "sensebs" | "sensesc" | "sensetr"

      The change target as per the change's subTarget property, see pf1.components.ItemChange.target ItemChange#target and change targets.

    • modifierType: undefined | string | number | symbol | string & {}

      The change type as per the change's modifier property, see pf1.components.ItemChange.type ItemChange#type and change types.

    • value: undefined | number

      The numerical change value, if any.

    • actor: ActorPF

      The actor the change is being applied to.

    Returns void

    Remarks

    Called by Hooks.callAll

    Example

    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