Print Page | Close Window

RPG chr sheet (pdf)

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: Beginners
Forum Description: This is for users new to PDF. Ask simple questions here.
Printed Date: 25 Feb 2020 at 12:54am
Software Version: Web Wiz Forums 11.10 -

Topic: RPG chr sheet (pdf)
Posted By: magnusprime27
Subject: RPG chr sheet (pdf)
Date Posted: 01 Jul 2018 at 8:14pm
im trying to calculate half lv rounded down..
specifilly this is fo starfinder and resovle points..
resolve points is calculated as half your level + your key ability mod
so for the sheet I have a "LV" input box
this determines stamina points and health points per level as well..
so far the box that does the calculation shows the value when its a even half.....
Example: lv 4 is 2, lv6 is 3 etc..
but when lets say lv 3...I get 1.5
and at lv 1  is 1 (min1)
what I don't know how to do is to get it to round down to just 1
heres my code...
var f = this.getField("LV");
g = f.value;
h = g / 2;
if (h < 1) { h = 1 };
event.value = h ;
help would be appreciated...
ive seen bits about using math.floor but not sure how or where to pit it?


Posted By: try67
Date Posted: 08 Jul 2018 at 11:47am
Use this:

var f = this.getField("LV");
g = f.value;
h = g / 2;
event.value = Math.floor(h);

- Acrobat Expert - Contact me personally at
Check out my custom-made scripts website:

Posted By: magnusprime27
Date Posted: 09 Jul 2018 at 4:36am
This is how I got it to work...
var f = this.getField("LV");
g = f.value;
h = ((g - (g % 2))) / 2;
if (h < 2) { h = 1 };
if (h > 0) { h = + h };
event.value = h ;

Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 -
Copyright ©2001-2017 Web Wiz Ltd. -