Not with TokenMod currently, but I really want to add that as a feature, I'm just not sure what the interface should be. In the interim, how about installing this little snippet I threw together. With it, you can set the bar you want to change to "RerollHP" and it will do the individual rolls based on the represented character: !token-mod {{
--on
showname
showplayers_name
showplayers_bar1
light_hassight
--set
bar2_value|@{selected|npc_ac}|
bar1_value|RerollHP
statusmarkers|-dead
}} Snippet: /* globals TokenMod */
on('ready',()=>{
const HP_FORMULA_ATTRIBUTE = "npc_hpformula";
const regex = /^\s*rerollhp\s*$/i;
const checkHPReroll = (obj) => {
let bar = regex.test(obj.get('bar1_value'))
? 1
: regex.test(obj.get('bar2_value'))
? 2
: regex.test(obj.get('bar3_value'))
? 3
: 0
;
if( bar && obj.get('represents').length ) {
let a = findObjs({
type: 'attribute',
characterid: obj.get('represents'),
name: HP_FORMULA_ATTRIBUTE
})[0];
if(a){
sendChat('',`[[${a.get('current')}]]`,(r)=>{
obj.set({
[`bar${bar}_value`]: r[0].inlinerolls[0].results.total,
[`bar${bar}_max`]: r[0].inlinerolls[0].results.total
});
});
}
}
};
if('undefined' !== typeof TokenMod && TokenMod.ObserveTokenChange){
TokenMod.ObserveTokenChange(checkHPReroll);
}
on("change:token", checkHPReroll);
});