The goal is a button for players that outputs an Ability Command Button for the GM to whisper dice results to himself. I was able to do this easily outside of a repeating section, having the ability command button reference the roll on a hidden button that does the actual roll. <input type="text" name="attr_DSskillname" value="Adventuring Detect Secret" readonly>
<input type="number" name="attr_DSskillvalue" value="18">
<button type="roll" value="[@{character_name} Detect Secret](~@{character_id}|gmDSThrow)" name="roll_DSThrow" title="Detect Secret Skill Throw"></button>
<button type="roll" value="/w gm &{template:acks_template} {{name=@{DSskillname}}} {{skillthrow=[[1d20+(?{Modifier|0})]]}} {{target=[[@{DSskillvalue}]]}}" name="roll_gmDSThrow"></button>
Now, I am trying to accomplish it with a list of abilities/skills/actions in a repeating section of the sheet, which is a little less straightforward as the ability command button value can’t reference the hidden button without the repeating id. So, I need to set it dynamically with a sheet worker, but I don’t think I can directly change a button value with a sheet worker. So a hidden attribute is introduced as well, and the button value is set to that attribute. Here are the bits for the repeating section and the sheetworker: <fieldset>
<input type="text" name="attr_gmskillname" placeholder="Skill Name">
<input type="number" name="attr_gmskillvalue" value="18">
<input type="hidden" name="attr_gmskillRollvalue">
<button type="roll" value="@{gmskillRollvalue}" name="roll_GMThrow"></button>
<button type="roll" value="/w gm &{template:acks_template} {{name=@{gmskillname}}} {{skillthrow=[[(1d20+?{Modifier|0})]]}} {{target=[[@{gmskillvalue}]]}}" name="roll_gmGMThrow"></button>
</fieldset>
//Update GMSkill buttons roll values sometimes I guess
on("change:repeating_gmskills:gmskillname", function() {
getSectionIDs("gmskills", function(idArray) {
var rollvalues = {};
for(var i=0; i < idArray.length; i++) {
rollvalues["gmskills_" + idArray[i] + "_gmskillRollvalue"] = "[@{character_name} @{repeating_gmskills_" + idArray[i] + "_gmskillname}](~@{character_id}|repeating_gmskills_" + idArray[i] + "_gmGMThrow)";
}
setAttrs(rollvalues);
});
});
I can see the attributes fill in on the character sheet once the event is triggered, and I know that the buttons are tied to those attributes, but clicking the buttons does... nothing. No errors generated or anything, just nothing. If I drag a button to the macro bar and press it, it generates an empty line in chat. On the Attributes and Abilities tab, if I copy the value that is being generated from one of the attributes into an ability macro and execute it, it works! Hopefully someone has some insight into this!