#pc-roll-for-not-owned-token

1 messages · Page 1 of 1 (latest)

oak inlet
#

pc-roll-for-not-owned-token

#

@craggy gull can you share a snippet where a PC can roll as a not owned token?

craggy gull
#

🤔 calling a roll function for another token?

oak inlet
#

I can't trigger the roll function as a player

#

It's swade system roll fucntion

craggy gull
#
const targetToken = game.user.targets.values().next().value
targetToken.someFunction(args)

But if the swade system itself requires the caller to be an owner, I can't dodge around that. Warp Gate can modify unowned tokens/actors, but can't modify internal system calls.

oak inlet
#

I'll try

#

tks

oak inlet
#

I'm trying to use warpgate. But, with this I couldn't add an AE.

    myActiveEffect = { // AE!!!
      icon: icon, 
      label: aename, 
      changes: [{
        key:aekey, 
        value: aevalue, mode: aemode 
      }]
    };


  for (let tokenD of Array.from(game.user.targets)) {
    let activeEffectClass = getDocumentClass("ActiveEffect");
    const output = await warpgate.mutate(tokenD.document, myActiveEffect, {}, {permanent: true});
  }
oak inlet
craggy gull
#

Yea, head up to #macro-polo . There was a recent discussion of that. I'll be available a bit later and can help if you don't some it before then. Also take a look at the mutating goblin example on the warpgate wiki