Hmm... so... some general points... 1) The gold standard in attribute modification is ChatSetAttr. Ammo scripts have particular usages for tracking ammunition resources, but for general attribute modification, I would tend toward CSA. If you find yourself using the ammo script just for modifying attributes, I would strongly suggest switching to CSA as it tends to be more stable and flexible. 2) I understand what you're trying to do with the attributes, and if you only needed to build a single stack of math it would work. Unfortunately you need to use the original d20 in two separate equations (weap1 and weap2). That is going to force a re-roll of the d20 every time it's used. Without scripts, roll re-use is only available within the same command line where the roll is made... so for your example, you could only reuse that d20 roll if all of your to-hit and damage was in the same template command. That much can be managed: [[ ([[5 * [[1d20]] ]] / 5) * 2]] That would have the d20 at roll $[[x]], weap1 at roll $[[x+1]], and weap2 at roll $[[x+2]]. What it does not do is add weap1 and weap2... which, short of RainbowEncoder having an arcane roll ritual up their sleeve, will not be possible. So what can you do? You can still do this, using either CSA to set an attribute (which your later rolls later use), or using metascripts. ChatSetAttr Using CSA, you can embed an api command in your first template statement (your to-hit). This is a unique ability of CSA (to run a script command even if the original message doesn't start out as intended for the Script Moderator). To make it work, you'd want one more attribute in your attribute set, and you'd reference it in your Multi attribute: Attribute Value DMG @{weap1}+@{weap2} weap1 [[5@{Multi}]] weap2 [[2@{Multi}]] Multi *[[floor((@{tohitd20}/7)+1)]]
tohitd20 << ...numeric value... >> The idea is that once CSA sets the value of tohitd20, it will be the same when it is pulled into both weap1 and weap2. To use CSA to write the value to the attribute in your to hit command, you'd add the following to the command: !setattr --name @{character_name} --tohitd20|$[[3]] --silent!!! Note the 3 closing bangs, necessary when you're embedding the CSA command in a template. Also note that the $[[3]] is my quick counting of the number of rolls present in your command line. I count 3 rolls occurring before the parser would find the d20. Also-also note that in order to reference the d20 separately from the rest of the math involved in the r1 template part, you're going to have to give it its own inline roll bracketing (which will make it the $[[3]] roll). That means that the r1 part should read: {{r1=[[ [[1d20cs>20]] + [[@{spell_attack_bonus}-@{pb}]][SPELL] + [[5+7]][MOD] + @{pb}[PROF]]]}} If you install CSA and make all of those changes, everything should work. Metascript Solution Using metascripts, the basic changes would be: 1) isolating the d20 roll with its own inline brackets (as in the CSA solution, above) 2) using less attributes (weap1 and weap2 math will be in the command line, and we'll hide the math by nesting inline rolls, instead) 3) using ZeroFrame batching to send both templates in the same command (so we can use the roll across command lines) 4) using an APILogic conditional to only run the damage command if the to-hit "scores" In this case, the CSA option seems simpler (and requiring less changes to your current setup), but if you want to try the metascript approach, tell me what would constitute a "hit" so I know how to build the conditional statement.