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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Mathematics in the formulas + Character sheet

December 12 (12 years ago)
Greetings, I would like some simple math operations in the formulas.
For example, to calculate my animal companions's hp, I would use:

HD: 7
Constitution: 16
Constitution Bonus: floor( ( Constitution - 10 ) / 2 )
Total HP: floor( @HD * 4.5 ) + @HD * @Constitution Bonus

Basically I would need: floor, ceil, round, max, min
I am sure in time I could think or need of other functions other than these, but for the time being, these simple things wouldn't be a problem for javascript to interpret and apply.
December 12 (12 years ago)
interesting, what game system is this?
December 12 (12 years ago)
Dungeons & Dragons...
December 12 (12 years ago)
Yes, but it is irrelevant, mathematical operations such as min, max are useful in any system that operates with integer results, but with possible floating numbers in the formula.
February 20 (12 years ago)
Leif Egil R.
KS Backer

Has this been made? I can't use floor, but there's really a great help in being able to round up or down. That way you could add BAB and basically anything, so that it only depends on level and ability scores, and then add additional equipment. Leveling the character would simply be to add the new abilities, jump the level, and off you go :-) Well... That is, after all the hard work is done :-)

February 20 (12 years ago)
Eric D.
KS Backer

This is not currently supported

February 20 (12 years ago)
Leif Egil R.
KS Backer

Any chance it's gonna get into the formula? I really can't imagine that's a task more than a couple of minutes to add? Then again, I don't do ANY programming at all... But I do Excell :-P
If the round down/up feature could get on board, the sheet would be insanely much cleaner, and it would really, really speed leveling up! :-) Then again, I've really done comprehensive work on speeding up the leveling as it is :-)

February 20 (12 years ago)
Eric D.
KS Backer

Not in the near future. Right now the dice expression language is at about its limits of saneness. Longer term we may look at more complex options but basic math operations is all that we are supporting for now.

Completely agree with "floor", "round", "min", "max". Right now using attributes in macros that are multiplied or divided then usually rounded down is not able to be done which makes the @attribute function pretty useless in a lot of cases.

This tool is really great but that's the function I think would add a lot of value for quite a few systems.

April 19 (12 years ago)

dare i say it...yes...i dare, there is the possibility that this functionality may be supported by the API, but only the developers would be able to comment on the limits of the "messiah" update, lol.

April 19 (12 years ago)

they have commented: <redacted by Riley>

April 19 (12 years ago)

oh snaps, i didnt even notice that, thank you for pointing that out.

April 19 (12 years ago)
Riley D.
Roll20 Team

And p. said:

they have commented: <redacted>

Okay, actually, I'm going to go ahead and take that down, because it's way out of date and not really fit for public consumption right now. Sorry. More will be forthcoming early next week.
April 19 (12 years ago)

Mmm. Yum. Roll20, only a few days since we got weighted tables, already they're talking of new shiny features.
I approve.
I also approve of being able to play with the API. Coding = fnu!

April 19 (12 years ago)

Riley D. said:

And p. said:

they have commented: <redacted>

Okay, actually, I'm going to go ahead and take that down, because it's way out of date and not really fit for public consumption right now. Sorry. More will be forthcoming early next week.
big government trying to silence the people...

April 19 (12 years ago)
Riley D.
Roll20 Team

Reb S. said:

Riley D. said:

And p. said:

they have commented: <redacted>

Okay, actually, I'm going to go ahead and take that down, because it's way out of date and not really fit for public consumption right now. Sorry. More will be forthcoming early next week.
big government trying to silence the people...
*puts on tinfoil hat*