Thank you = ). Yes, they are all just based on strength changes. No other stats are involved. I think it's essential to put them all in one worker, and here is that worker: <div class="pss blueBackground section">
<input class="field ability" name="attr_physical_strength" type="number" value='0' min='1' max='220'>
<div class="fieldLabel white section">Physical Strength</div>
</div>
<div class="tps blueBackground section">
<div class="fieldLabel white section">Tmp Adj</div>
<input class="field manual23 right" name="attr_temp_physical_strength" type="number" value='0'>
</div>
<div class="pst blueBackground section">
<input class="field derivedAbility38 section" name="attr_physical_strength_total" value="" readonly />
</div>
<div class="mg blueBackground section">
<div class="fieldLabel white section">Melee Dmg</div>
<input name="attr_melee_damage_adjustment" type="hidden" value="0">
<span class="field derived" name="attr_melee_damage_adjustment"></span>
</div>
<div class="en blueBackground section">
<div class="fieldLabel white section">Max Encumbrance</div>
<input name="attr_maximum_encumbrance" type="hidden" value="0">
<span class="field derived" name="attr_maximum_encumbrance"></span>
</div>
<div class="mw blueBackground section">
<div class="fieldLabel white section">Max Weight</div>
<input class="attr_maximum_weight" type="hidden" value="0">
<span class="field derived" name="attr_maximum_weight"></span>
</div>
<div class="psl blueBackground section">
<div class="fieldLabel white section">Skill Limit</div>
<input name="attr_physical_strength_skill_limit" type="hidden" value="0">
<span class="field derived" name="attr_physical_strength_skill_limit"></span>
</div>
<script type="text/worker">
const int = score => parseInt(score) || 0;
on('change:physical_strength change:temp_physical_strength', () => {
getAttrs(['physical_strength', 'temp_physical_strength'], values => {
const strength_temp = int(values.temp_physical_strength);
const strength_base = int(values.physical_strength);
const strength_total = strength_base + strength_temp;
const lookup_value = ((strength_total <100) ? Math.ceil(strength_total/5) : Math.ceil(strength_total/10) +10) -1
const dmg_enc_wgt_table = [
/* 1-5 */ [-4, "2 pounds", "30 pounds", "1 skill"],
/* 6-10 */ [-3, "5 pounds", "40 pounds", "2 skills"],
/* 11-15 */ [-2, "10 pounds", "50 pounds", "3 skills"],
/* 16-20 */ [-1, "20 pounds", "60 pounds", "4 skills"],
/* 21-25 */ [-1, "30 pounds", "70 pounds", "5 skills"],
/* 26-30 */ [-1, "35 pounds", "80 pounds", "5 skills"],
/* 31-35 */ [-1, "35 pounds", "80 pounds", "5 skills"],
/* 36-40 */ [-1, "40 pounds", "90 pounds", "6 skills"],
/* 41-45 */ [+0, "45 pounds", "115 pounds", "6 skills"],
/* 46-50 */ [+0, "60 pounds", "140 pounds", "7 skills"],
/* 51-55 */ [+0, "70 pounds", "170 pounds", "7 skills"],
/* 56-60 */ [+1, "95 pounds", "220 pounds", "8 skills"],
/* 61-65 */ [+1, "120 pounds", "255 pounds", "8 skills"],
/* 66-70 */ [+2, "130 pounds", "280 pounds", "9 skills"],
/* 71-75 */ [+3, "150 pounds", "305 pounds", "9 skills"],
/* 76-80 */ [+3, "165 pounds", "330 pounds", "10 skills"],
/* 81-85 */ [+3, "165 pounds", "330 pounds", "10 skills"],
/* 86-90 */ [+4, "180 pounds", "380 pounds", "10 skills"],
/* 91-95 */ [+5, "200 pounds", "480 pounds", "11 skills"],
/* 96-100 */ [+6, "300 pounds", "640 pounds", "11 skills"],
/* 101-110 */ [+7, "350 pounds", "700 pounds", "12 skills"],
/* 111-120 */ [+8, "390 pounds", "810 pounds", "12 skills"],
/* 121-130 */ [+9, "450 pounds", "970 pounds", "13 skills"],
/* 131-140 */ [+10, "550 pounds", "1130 pounds", "13 skills"],
/* 141-150 */ [+11, "625 pounds", "1440 pounds", "14 skills"],
/* 151-160 */ [+12, "800 pounds", "1750 pounds", "14 skills"],
/* 161-170 */ [+14, "950 pounds", "2000 pounds", "15 skills"],
/* 171-180 */ [+15, "1050 pounds", "2250 pounds", "15 skills"],
/* 181-190 */ [+16, "1100 pounds", "2500 pounds", "15 skills"],
/* 191-200 */ [+17, "1250 pounds", "2750 pounds", "15 skills"],
/* 201-210 */ [+18, "1600 pounds", "3000 pounds", "15 skills"],
/* 211-220 */ [+19, "1750 pounds", "3250 pounds", "15 skills"]
];
const melee_damage_adj = dmg_enc_wgt_table[lookup_value][0];
const max_encumbrance = dmg_enc_wgt_table[lookup_value][1];
const max_weight = dmg_enc_wgt_table[lookup_value][2];
const str_skill_limit = dmg_enc_wgt_table[lookup_value][3];
console.log(strength_total);
console.log(lookup_value);
console.log(melee_damage_adj);
console.log(max_encumbrance);
console.log(max_weight);
console.log(str_skill_limit);
setAttrs({
physical_strength_total: strength_total,
melee_damage_adjustment: melee_damage_adj,
maximum_encumbrance: max_encumbrance,
maximum_weight: max_weight,
physical_strength_skill_limit: str_skill_limit
});
});
});
</script> I love multidimensional arrays = ).