Lindharin wrote:Do we really need the separator then? If I can just put the separator I want at the end of the expression, what benefit does including a separator in the options area provide?
Because [c(3): d20 + ", "] would then give "6, 2, 11, ". You don't want the separator included for the last roll.
Lindharin wrote:Also, what tooltip behavior will it have when you use the C option? Are all of the loops put into the tooltip?
Each one has its own tooltop. [c(3): d20] is equivalent to [d20], [d20], [d20].
Lindharin wrote:Another question: What happens if the expression inside a C loop is an assignment? What does [C(3):AttRoll=1d20] actually do?
It does the assignment three times, so AttRoll ends up with whatever the value of the third roll was.
Lindharin wrote:Is it feasible to have assignments in a C loop automatically apply an incrementing suffix to the variable on the left side of the assignment? For example, something like:
[C(3):AttRoll = 1d20]
would be equivalent to:
[AttRoll1=1d20]
[AttRoll2=1d20]
[AttRoll3=1d20]
Is that possible and desirable? Or maybe instead of it happening automatically, you have to use a flag of some type. Maybe you would need to do [C(3):AttRoll.suffix=1d20] to have it create variables AttRoll1, AttRoll2 and AttRoll3?
You can accomplish this with [c(3): eval("AttRoll" + roll.count + " = d20")].
So, it's now working as described
here (still no S or D options). Tomorrow (er, well, today after I wake up) I'll test it some more, make sure the code's nice and clean, check for any last-minute suggestions here, then send the patch off to Trevor.