Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
Enforcer84
Senior Member
 
Join Date: Oct 2011
Location: Portland
Posts: 313

Old December 26th, 2023, 02:07 PM
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?
Enforcer84 is offline   #1 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old 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.

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!
Fenris447 is offline   #2 Reply With Quote
Enforcer84
Senior Member
 
Join Date: Oct 2011
Location: Portland
Posts: 313

Old 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.
Enforcer84 is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:57 AM.


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