No need to apologise for asking lots of questions. When I answer, I try to find out what the person really wants, and so I usually ask a lot of questions too. This post for example :) Are skill and crit universal stats - that is, for a single character,
those are are always the same? They dont vary with attacks (like one
attack has one crit score, and another attack has another crit score)
but remain constant accoss all attacks? Liliana said: And then add a crit array somewhere to do the following? const dice = ['0', '0', '1d4', '1d6', '2d4', '1d4 +1d6', '2d6' ] //etc
const iterator = attr.skill(); Would it be possible to make it so that every odd number of skill would grab the next dice from this? So 1/3/5/7 etc. Yes, this is easy. You can do it two ways. The first does the method I suggested: const skill = +attr.skill || 0; const iterator = Math.ceil(skill /2); Math.ceil rounds up, so you 1-2 = 1, 3-4 = 2, 5-6 = 3, etc. Since the even numbers don't matter, you get what you want. Alternatively if there are no even numbers, you can round down, using Math.floor. const dice = ['0', '1d4', '1d6', '2d4', '1d4 +1d6', '2d6' ] //etc const skill = +attr.skill || 0; const iterator = Math.floor(skill /2); With this version 0-1 = 0, 2-3 = 2, 4-5 = 3, etc. Because this version is rounding down 1 /2 = 0, so you don't need to add an extra '0' at the start. However if even numbers or possible (but just arent different scores) this method will be wrong - the first methiod is better. Notice also in both of these examples I process the skill value with "+attr.skill || 0;" Roll20's backend always stores value as text, so even though you have set type="number" on skill, some processing is often safe. In your case, values should always be numbers. But it's a safe habit to adopt :) In your code you seem to be using Custom Roll Parsing. That's a more advanced level of coding than I was expecting from your initial question, but might not be necessary. But I'm not sure what exactly is going on here. Can you describe an attack roll as if we were playing face-to-face and I was at your table? What do I need to know to make an attack roll? I'm assuming it's something like you add a universal crit score to the weapon's crit bonus, then look on that table that gets 1d6, 1d6+1d4, etc., and roll that. If so, CRP is a bit more than you need.