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

Multiplication

    Is there a way to multiply in ability macros? For example, if I want to take @AbilityScore*1.5 or something like that. Maybe I am missing something obvious, but so far I have not been able to get it to work. I have been using division to achieve a similar affect, but it would be much easier to just be able to multiply and not have to figure out how to divide to achieve the same result.     Additionally, can I have a macro run a math equation without the use of /roll? Say if I want it to achieve the exact same number every time based on certain variables. So far I have to find a way to use /roll 1d1 and then the equation, but that starts it off with a one. Rolling /1d0 also seems to get a 1 at this point. Any way to achieve this or to roll for 0?     Thanks in advance for any assistance.
1372047160
Gauss
Forum Champion
Yes you can multiply in your Ability macro. Example:  /roll 2d6 +@{Str}*1.5 If this does not work for you show me the Ability macro you are trying to create.  Regarding the second question, use 0d1 instead.  /roll 0d1 +whatever - Gauss
Thank you for the help. It seems the only reason I didn't think multiplication worked was because I was trying it before I figured out that it wouldn't calculate without /roll. I have that figured out now. /roll 0d1 worked like a charm, thank you. What I am trying to roll is something like this: /roll 0d1+((@{SklLev}+1)*100)-((@{Intelligence}*0.01)*((1+@{SklLev})*100)) I am trying to create a formula to automatically calculate the experience cost in a homebrew system for buying a new level of a skill. SklLev refers to the current level of the skill, and Intelligence is their intelligence level. The base cost is the current skill level+1, times 100. Then it is supposed to subtract 1% for each level of intelligence. The problem I am running into now is that it seems that any attempt to use 0.01 results in 0.1 instead. Is that a bug or just a limitation? I suppose 1/100 would also work. Of course, my formula is probably also not correct quite yet, but that is just an issue of me trying to math. Anyways, thanks for the previous help. EDIT: I figured out the equation. All I had to do was change the *0.01 to /100. However, this showed me an odd bug. As mentioned, when I used 0.01 it tried to calculate it as 0.1, giving me -60.00000000000006. (SklLev=2, Intelligence=12) However, if I manually changed it to 0.1, it gave me just -60. This seems like a possible bug. I am no mathematician however, and perhaps there is something I do not understand. Anyways, all of my issues here have been resolved. Thank you very much for the assistance.
1372053211
Gauss
Forum Champion
Interesting, it appears you have found a bug. I will file a bug report on it.  - Gauss