Without using @{target}, an API script is probably the best option... !show-attr attribute attribute attribute -- character_id character_id character_id Example: !show-attr hp ac -- -Jh1tMI3qnsFKEV66BuA -KS8sEhi64TaYuVoQG9Q This whispers to the person that runs it the name of each character for the character ids passed to it (if they exist), and then the current status of each of the attributes listed (if they exist for the character): You can pre-build the command and put it in a macro, then give your cleric player access to it. The Script: on('ready',() => {
const resolveAttr = (cid,name) => ({
name: name,
current: getAttrByName(cid,name),
max: getAttrByName(cid,name,'max')
});
const makePrefixer = function(prefix){
let c = {};
return (val)=>{
val = val.trim();
c[val]=c[val]||0;
return prefix.repeat(c[val]++)+val;
};
};
const buildRows = (cs, as) => {
let p = makePrefixer(' ');
return cs.map( (c) =>
`{{${p(c.get('name'))}=<ul>${as[c.id].map((a)=>`<li><b>${a.name}:</b> ${a.current}${a.max?`/${a.max}`:''}</li>`).join('')}</ul>}}`
).join('');
};
on('chat:message',(msg) => {
if('api'===msg.type && /^!show-attr\b/i.test(msg.content)){
let parts = msg.content.split(/\s+--\s+/);
let attrs = parts[0].split(/\s+/).splice(1);
let ids = (parts[1]||'').split(/\s+/);
let who=(getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname');
let attrmap = {};
let characters = ids.map((id) => getObj('character',id)).filter((t) => undefined !== t);
characters.forEach((c) => attrmap[c.id] = attrs.map((a) => resolveAttr(c.id,a) ).filter((a)=>undefined !== a.current));
sendChat('',`/w "${who}" &{template:default}{{name=Roster}}${buildRows(characters,attrmap)}`);
}
});
});