#Ah gotcha Much appreciated man

1 messages · Page 1 of 1 (latest)

orchid fractal
#

Choose the token with it setup, in console get _token.data.flags["resource-icons"]

#

Right click the output, say copy object, paste it here

tawdry saddle
#

Refresh my memory - What's the script to output token data to log? Seem to recall it being something like console.log(token)

orchid fractal
#

just put the thing I wrote above straight into the console

tawdry saddle
#

Well, that sounds simple. Gotcha

#

Any tricks you know of on Firefox to grab output along with sub-layers?

orchid fractal
#

Right clicking the output and saying copy object, as I said, should get everything needed

tawdry saddle
#

Haha, thanks. Too much screen time today


{
  "displayIcons": 50,
  "icon1": {
    "resource": "resources.armorToDr",
    "img": "icons/svg/aura.svg",
    "options": {
      "background": {
        "active": true,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  },
  "icon2": {
    "resource": "resources.deflectToAbdr",
    "img": "",
    "options": {
      "background": {
        "active": false,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  },
  "icon3": {
    "resource": "",
    "img": "",
    "options": {
      "background": {
        "active": false,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  }
}```
sharp hatch
#

p.s. I would use chrome or edge (gasp) with Foundry before firefox. Firefox has issues with webms. Though if you're not using animations for anything then it might not come up

tawdry saddle
#

Yeaaah, the webm issue is rough. There were some hopes that 10.0 would fix it, but doesn't seem like it

orchid fractal
#

Sorry for the delay

tawdry saddle
#

You've no reason to apologize at all, dude. I greatly appreciate your time and help

orchid fractal
#
let tokens = canvas.tokens.controlled;
for (let token of tokens) {
    {
        await token.document.update({'flags.resource-icons': {
  "displayIcons": 50,
  "icon1": {
    "resource": "resources.armorToDr",
    "img": "icons/svg/aura.svg",
    "options": {
      "background": {
        "active": true,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  },
  "icon2": {
    "resource": "resources.deflectToAbdr",
    "img": "",
    "options": {
      "background": {
        "active": false,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  },
  "icon3": {
    "resource": "",
    "img": "",
    "options": {
      "background": {
        "active": false,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  }
}});
        await token.actor.update({'token.flags.resource-icons': {
  "displayIcons": 50,
  "icon1": {
    "resource": "resources.armorToDr",
    "img": "icons/svg/aura.svg",
    "options": {
      "background": {
        "active": true,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  },
  "icon2": {
    "resource": "resources.deflectToAbdr",
    "img": "",
    "options": {
      "background": {
        "active": false,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  },
  "icon3": {
    "resource": "",
    "img": "",
    "options": {
      "background": {
        "active": false,
        "color": ""
      },
      "border": {
        "active": false,
        "color": ""
      },
      "tint": {
        "active": false,
        "color": ""
      }
    }
  }
}})

    }
}
#

Should update placed tokens and their actor's prototype

#

Selected tokens

tawdry saddle
#

Well I'll be damned - that's nifty as hell!