Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Rounding up on tracker? (http://forums.wolflair.com/showthread.php?t=68166)

Enforcer84 December 26th, 2023 02:07 PM

Rounding up on tracker?
 
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?

Fenris447 December 26th, 2023 04:26 PM

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.

Enforcer84 December 26th, 2023 06:20 PM

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.


All times are GMT -8. The time now is 12:09 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.