Thanks again for your help with this Gigs here is the code I am working with now <button type="action" name="act_roll">RR</button> <script type="text/worker"> const extractQueryResult = async function(query){ let queryRoll = await startRoll(`!{{query=[[0[response=?{${query}}]]]}}`); finishRoll(queryRoll.rollId); return queryRoll.results.query.expression.replace(/^.+?response=|\]$/g,''); }; const initiateRoll = async function(event){//Async tag here to allow us to await the various rolls that we're going to do. let queryResult = ${level}; //await extractQueryResult('Attack Ranks|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30');//Await the asynchronous startRoll let queryResult2 = await extractQueryResult('Defense Ranks|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30');//Await the asynchronous startRoll const resultSwitchArray =[ [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30], [1,50,55,60,65,70,73,76,79,82,85,87,89,91,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110], [2,45,50,55,60,65,68,71,74,77,80,82,84,86,88,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105], [3,40,45,50,55,60,63,66,69,72,75,77,79,81,83,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100], [4,35,40,45,50,55,58,61,64,67,70,72,74,76,78,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95], [5,30,35,40,45,50,53,56,59,62,65,67,69,71,73,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90], [6,27,32,37,42,47,50,53,56,59,62,64,66,68,70,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87], [7,24,29,34,39,44,47,50,53,56,59,61,63,65,67,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84], [8,21,26,31,36,41,44,47,50,53,56,58,60,62,64,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81], [9,18,23,28,33,38,41,44,47,50,53,55,57,59,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78], [10,15,20,25,30,35,38,41,44,47,50,52,54,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75], [11,13,18,23,28,33,36,39,42,45,48,50,52,54,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73], [12,11,16,21,26,31,34,37,40,43,46,48,50,52,54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71], [13,9,14,19,24,29,32,35,38,41,44,46,48,50,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69], [14,7,12,17,22,27,30,33,36,39,42,44,46,48,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67], [15,5,10,15,20,25,28,31,34,37,40,42,44,46,48,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65], [16,4,9,14,19,24,27,30,33,36,39,41,43,45,47,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64], [17,3,8,13,18,23,26,29,32,35,38,40,42,44,46,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63], [18,2,7,12,17,22,25,28,31,34,37,39,41,43,45,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62], [19,1,6,11,16,21,24,27,30,33,36,38,40,42,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61], [20,0,5,10,15,20,23,26,29,32,35,37,39,41,43,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60], [21,-1,4,9,14,19,22,25,28,31,34,36,38,40,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59], [22,-2,3,8,13,18,21,24,27,30,33,35,37,39,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58], [23,-3,2,7,12,17,20,23,26,29,32,34,36,38,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57], [24,-4,1,6,11,16,19,22,25,28,31,33,35,37,39,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56], [25,-5,0,5,10,15,18,21,24,27,30,32,34,36,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55], [26,-6,-1,4,9,14,17,20,23,26,29,31,33,35,37,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54], [27,-7,-2,3,8,13,16,19,22,25,28,30,32,34,36,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53], [28,-8,-3,2,7,12,15,18,21,24,27,29,31,33,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52], [29,-9,-4,1,6,11,14,17,20,23,26,28,30,32,34,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51], [30,-10,-5,0,5,10,13,16,19,22,25,27,29,31,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50], ]; let mod = resultSwitchArray[queryResult][queryResult2]; let output = `&{template:default} {{name=Demo Output}} {{d100=[[d100 - ${mod}[Mod]]]}}` let finalRoll = await startRoll(output); finishRoll(finalRoll.rollId); }; on('clicked:roll',initiateRoll); </script> ========================= number 4 is correct, but it needs to be an ADD to the total roll as based on the roll the attacker makes, the save could get a bonus to save. (you can see the Attackers save adjustment in the Base Spell Attack Table below) number 6 so yes the result should be: RESULT = Defenders d100 + Defenders RRBonus - value from array + Attackers Modifier number 7 just needs to report (log) the name of the save and the result (as the actual value is important in some cases not just if they saved. for instance some spell effects are things like "blind for 1 rnd/5% failure") I want to have the Button push trigger asking the defender to enter the attackers Level and Save adjustment. as I am not assigning any stats to tokens. Here is the Attackers bonus chart and RR (saving throw) chart As a note, I reversed the values in the Array to the chart as I was also working up another use for the table. so in the Array the attackers level is in the vertical column and defender the horizontal. Here is a sample of one of the buttons in the CS now (where it just rolls and adds the bonus then I manually check the chart) button type='roll' name='roll_testattack' value='&{template:custom} {{title=^{rrarcanecheck}}} {{^{result}=[[1d100!>96cs>96cf<5 + @{rrtotal_arcane}]]}}'></button> Here are the values from the CS for the save bonuses (these are calculated from stat modifiers, racial modifiers and special bonuses so would be the only value that would need to be sent to the formula. attr_rrtotal_arcane attr_rrtotal_essence attr_rrtotal_channeling attr_rrtotal_mentalism attr_rrtotal_psionics attr_rrtotal_poison attr_rrtotal_disease *as a side note, once i get this CS set to where I am happy with it I would like to get it uploaded to the roll20 collection so that a friend of mine who is also running a rolemaster game can use it as he does not have a Pro account to load the code into the editor. thanks again