So I have a limited amount of experience with programming and I can't seem to get a handle on writing macros for this site. What I am trying to do isn't complicated for the player just tedious. The goal here is to roll and display dice with modifiers, then find and display the average of those rolls. I can do this somewhat with the following macro: [[ ?{Dice1| } + ?{modifier1| } ]] [[ ?{Dice2| } + ?{modifier2| } ]] [[ round( [[ ( [[ ?{Dice1| } + ?{modifier1| } ]] + [[ ?{Dice2| } + ?{modifier2| } ]] ) / ?{Divisor} ]] ) ]] The problem is that I won't always know the number of dice / modifiers sets that the player will want to roll. It will be between 2 and 10. Above is for 2 dice / modifier sets and below is for 4: [[ ?{Dice1| } + ?{modifier1| } ]] [[ ?{Dice2| } + ?{modifier2| } ]] [[ ?{Dice3| } + ?{modifier3| } ]] [[ ?{Dice4| } + ?{modifier4| } ]] [[round([[([[?{Dice1|}+?{modifier1|}]]+[[?{Dice2|}+?{modifier2|}]]+[[?{Dice3|}+?{modifier3|}]]+[[?{Dice4|}+?{modifier4|}]])/?{Divisor}]])]] I would like to write a general macro that allows the user to define how many dice / modifier sets they would like to roll. If I was using a language like C++ I would use an array and loop but I am not sure how to accomplish this on roll20. Any advice would be appreciated. Thanks.