|
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
I am futzing with an ability that gives points, to use to spend on abilities like a sorcerer, the calculation is 1/2 level rounded up...the default charge calculation for Half-Level rounds down.
Is there a round up mechanic somewhere? |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 602
|
Search this page for the round function and how to make it go in either direction.
To use an example, let's say you have two variables X (the result) and Y (the number you want rounded down). You put: X = round(Y,0,-1) The 0 represents the number of decimal places you want (in this case zero). The -1 tells it to round down. Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#2 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Sweeeeet.
I used this, but I'm not sure if this is technically correct: doneif (tagis[Helper.Disable] <> 0) field[trkMax].value += round(field[xAllLev].value/2, 1,1) I wasn't sure what "Class Levels" field there was. So I checked UseOwnLev and that seems to work! Happy days. |
#3 |
|
|