Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Sum Calculations in Macro

I have a macro that calculates combat results for each character in my Yellow King RPG game. I need to add those results together. How do I do that? First Lieutenant Baume [[(@{First Lieutenant Baume|Spend_Fighting}+@{First Lieutenant Baume|Mod_Fighting}+1d6) - ?{Difficulty|4}]] Sergeant Léger [[(@{Sergeant Léger|Spend_Fighting}+@{Sergeant Léger|Mod_Fighting}+1d6) - ?{Difficulty|4}]] Corporal Bardin [[(@{Corporal Bardin|Spend_Fighting}+@{Corporal Bardin|Mod_Fighting}+1d6) - ?{Difficulty|4}]] Private Lagarde [[(@{Private Lagarde|Spend_Fighting}+@{Private Lagarde|Mod_Fighting}+1d6) - ?{Difficulty|4}]] Private Hachette [[(@{Private Hachette|Spend_Fighting}+@{Private Hachette|Mod_Fighting}+1d6) - ?{Difficulty|4}]] Private Duchemin [[(@{Private Duchemin|Spend_Fighting}+@{Private Duchemin|Mod_Fighting}+1d6) - ?{Difficulty|4}]] Private Joubert [[(@{Private Joubert|Spend_Fighting}+@{Private Joubert|Mod_Fighting}+1d6) - ?{Difficulty|4}]]
1594434862
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Take a look at these posts  in  Stupid Tricks : Re-using Rolls  - Scott S. (More info:  Reordering Rows  - GiGs)
1594439413
Oosh
Sheet Author
API Scripter
Yep, you'll essentially need to follow ^^^ those instructions and do the entire sum: [[  [[Baume result]] + [[Leger result]] + ......... + [[Joubert result]] ]] for the total, then call back to the individual results with Baume = $[[0]] Leger = $[[1]] ...etc, probably using the default template just like in the example. Happy to help if you get stuck.