Hi Kaeden, You'll need to set a listener for changes to your aptype attribute as well as your level attribute that will then set the value of your output attribute. This would look something like this (I'm using calc_ap as the output attribute for demonstration purposes; replace with your actual attribute as needed): <select name="attr_ap_type"><!-- Note, I changed this to snake_case. Snake_ or kebab-case are the best naming formats for attributes/buttons as they are easy to read when in a macro, and do not rely on capitalization which is not as usable when writing sheetworkers. -->
<option value="martialhybrid">Martial/Hybrid</option>
<option value="caster">Caster</option>
</select>
<input type="number" value="" name="attr_level">
<input type="number" readonly name="attr_calc_ap">
<script type="text/javascript">
const apValues = {//Random ap values for the types. Replace with values appropriate to your actual system.
martialhybrid:1,
caster:2
};
on('change:ap_type change:level',(event)=>{
getAttrs(['ap_type','level'],(attributes) => {
const setObj = {}; //I use an object to accumulate my changes for any given sheetworker operation as it makes debugging easier and I can then dynamically add attributes to it as needed for an operation.
setObj.calc_ap = (+attributes.level || 0) * apValues[attributes.ap_type];
setAttrs(setObj,{silent:true});//I nearly always use silent:true on setAttrs to prevent unanticpated event cascades.
})
})
</script>