Accessing data in active effects via @ symbol

I noticed other systems are able to expose certain bits of data and access it in active effects eg: attribute: system.armor.ac mode: add value: @str.value
However I can't seem to get the same functionality in my system.

I have an actor data model module>data>actor.mjs file that just exports an actor class that extends foundry.abstract.TypeDataModel
I have an actor document module>documets>actor.mjs that extends the actor data model

in module>documents>actor.mjs I expose the abilities to the top level via getRollData()
getRollData() {
    // Starts off by populating the roll data with a shallow copy of `this.system`
    const data = { ...this.system }

    // Copy the ability scores to the top level, so that rolls can use
    // formulas like `@str.mod + 4`.
    if (data.abilities) {
      for (let [k, v] of Object.entries(data.abilities)) {
        data[k] = foundry.utils.deepClone(v)
      }
    }

    return data
  }


However when I try and use this in an effect the value of the attribute I'm changing returns NaN
I know my attribute is correct because if I change the @str.value to simply 1 I get the expected output
Was this page helpful?