-
February 18th, 2026, 17:03 #601Patriarch
- Join Date
- Nov 2019
- Posts
- 451
-
February 18th, 2026, 17:04 #602Patriarch
- Join Date
- Nov 2019
- Posts
- 451
Does anyone know if there is a way within the calc fields for rolls, or the Health, n1/n2 init fields to make it round up or down or round normal .5 rounding?
-
February 19th, 2026, 17:16 #603High Patriarch
- Join Date
- Dec 2016
- Location
- Collierville, TN
- Posts
- 535
It has been a while, and I deleted my XCore campaign so I can't see what I did to make a calculation round. I don't think ROUNDUP or ROUNDDOWN work. I may have had to use the Array.
-
February 19th, 2026, 19:49 #604Patriarch
- Join Date
- Nov 2019
- Posts
- 451
Being that the arrays are whole number indexed, I think what I would have to do is create an array that has an item for every possible number before the division and then have the array return the rounded result if the index value has been divided by the numbers I need.
-
February 19th, 2026, 20:33 #605Patriarch
- Join Date
- Nov 2019
- Posts
- 451
And, seems it won't work. It's the Health calc field that I need to divide by 2, and I need to reference a roll.
So getdata|DivByTwo|[Strength|a] does not work.
-
February 19th, 2026, 20:44 #606Patriarch
- Join Date
- Nov 2019
- Posts
- 451
I had to do the look up on the array from within a roll and then reference that roll to get the result into the health field
-
February 19th, 2026, 23:30 #607High Patriarch
- Join Date
- Dec 2016
- Location
- Collierville, TN
- Posts
- 535
I gave up on what I was working on when I realized that if any field has a "0" entry and uses an array, it breaks the character sheet for that skill, stat, etc.
I bought the Ruleset Wizard thinking I would teach myself how to create a ruleset or extension. It feels like trying to create custom scenarios for Neverwinter Nights (1 & 2).
-
February 20th, 2026, 02:16 #608Patriarch
- Join Date
- Nov 2019
- Posts
- 451
-
February 23rd, 2026, 17:05 #609
You might also want to talk to lamorric since he has a working (for him) SR 3e ruleset.
https://www.fantasygrounds.com/forum...l=1#post758791Paul Grosse
PCGen BoD
PR Silverback
Autobackup Batch file, Always ALWAYS backup your data. Remember to follow the 3-2-1 rule!
-
February 25th, 2026, 06:49 #610Patriarch
- Join Date
- Nov 2019
- Posts
- 451
So... I found a huge bug in xcore.
If you have a rule with a name of say, Perception, and if another rule or the same rule has the following in a roll or calc of [Perception|a]
This works fine in itself, but if you have another roll with Perception at the end of it's name it will cause a conflict between the two. Specifically the the roll Perception will interpose itself onto any calc or roll that includes Perception at the end.
The code does a gsub that replaces "Perception|a" with the value of the row a of the Perception roll. Matrix Perception|a and Perception|a are exactly the same when searching for Perception|a.
It searches the string of the roll text or the calc text for Perception|a and replaces it. so Matrix Perception|a gets the Perception|a replaced.
So I edited ManagerRolls.lua to replace how gsub was being used to include [ and ] before and after the original value it was replacing so that Perception|a looks for [Perception|a].
This means that the conflict is removed.
It also means that pretty every references requires [ and ] in them.
I hope I explained this, it's complicated and took me too long to figure out why some rolls worked and some didn't. Or why they worked fine sometimes but not all the time.
ManagerRolls.zip
In order to use these changes you will need to unpack the xcore.pak ruleset file into a folder with the name xcore. Then replace the file in rulesets\XCore\campaign\scripts with the one above.
I also added a couple of items to it.
if you put roundup, rounddown, or round as flags that if places at the beginning of a calc will do that form of rounding on the entire line.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)


Reply With Quote

Bookmarks