I'm trying to make a macro to build an army's composition without having to roll a bunch of time. Those include rolling: 1-The number of people in every squad depending of the number of squad roll 2-The level of a NPC depending if a % is high enough 3-A % dice that determine what of monster and how many (ei on a d100 [1-10] = d4 red dragon, [11-20] = d3 green dragon, [21-100] = nothing) As an example, if I try to make a macro to generate a bunch of Ogre from AD&D 2e the rules are -Roll 2d10 for number of ogre (4d8+1 HP) -If more than 11 add Ogre Leader (30-33 HP) -If 16 or more add Ogre Chieftain (34-37 HP) + 2 Patrol leaders (Same HP as Ogre Leader) In java would give me this int numberOgres = roll("2d10");
for(int i = 1; i <= numberOgres; i++){
System.out.println("HP of Ogre " + i + " is " + roll("4d8+1"));
}
if(numberOgres >= 16){
System.out.println("HP of Ogre Chieftain is " + roll("1d4+33"));
System.out.println("HP of Ogre Leader 1 is " + roll("1d4+29"));
System.out.println("HP of Ogre Leader 2 is " + roll("1d4+29"));
}
else if(numberOgres > 11){
System.out.println("HP of Ogre Leader is " + roll("1d4+29"));
}
I'm not finding anything ATM nor seeing how I can do this without a character sheet to store temporary variables. TL:DR, how do you make loops and if else statement in Roll20