Hi, i have a question when i create a function. First i have two input box named skill_custom_bonus_A & B. Then the function would change the skill_custom_bonus_B value when skill_custom_ability changed. Now the problem is the input box won't display the new number. But it will work fine when i call @{skill_custom_bonus_b} in button. <input type="number" name="attr_skill_custom_bonus_A"
class="nospin number underlined greybg" value="0" disabled />
<input type="number" name="attr_skill_custom_bonus_B"
class="nospin number underlined greybg" value="0" disabled />
on("change:skill_custom_ability change:skill_custom_skill_custom_name sheet:opened", function () {
getAttrs(["skill_custom_skill_custom_name", "skill_custom_ability"], function (value) {
switch (value.skill_custom_ability) {
case "@{strength_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{strength_bonus_sum}]]" });
break;
case "@{dexterity_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{dexterity_bonus_sum}]]" });
break;
case "@{stamina_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{stamina_bonus_sum}]]" });
break;
case "@{intelligence_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{intelligence_bonus_sum}]]" });
break;
case "@{Wits_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{Wits_bonus_sum}]]" });
break;
case "@{resolve_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{resolve_bonus_sum}]]" });
break;
case "@{presence_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{presence_bonus_sum}]]" });
break;
case "@{manipulation_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{manipulation_bonus_sum}]]" });
break;
case "@{composure_sum}":
setAttrs({ skill_custom_bonus_B: "[[@{composure_bonus_sum}]]" });
break;
default:
setAttrs({ skill_custom_bonus_B: 0 });
}