PDA

View Full Version : Using MoreCore roll parameters



Phystus
February 23rd, 2020, 20:52
I'm trying to set up a character sheet for Ubiquity, and I'm running into a couple challenges.

The first thing I'd like to do is set up rolls for primary attribute checks. In Ubiquity, you roll twice as many Ubiquity dice as the value of the primary attribute. So if you have a Dexterity of 2 you'd roll 4 dice for the attribute check.

31738

I have tried a number of parameter formulae to achieve this without success. /ubiquity (p1)+(p1)d6 seems to ignore the (p1)+ part and give the same result as /ubiquity (p1)d6. /ubiquity (p1)(p1)d6 concatenates the two instances of p1, so if p1=2 you get 22 dice. /ubiquity 2*(p1)d6 ignores the 2*. Any ideas?

Second challenge: Secondary attributes are a ubiquity roll consisting of the sum of two (or sometimes three) attributes. For example, Initiative is the sum of Dex and Int, with an optional modifier (if you have the Improved Initiative feat, for example). So a Dex of 2 and an Int of 4 (and no modifier) should yield a roll of 6 ubiquity dice.

31739

Again, there doesn't seem to be a way to make this work.

The basic problem seems to be that the /ubiquity roll can't evaluate a mathematical expression to determine the number of dice to throw.

Am I missing something?

~P

damned
February 23rd, 2020, 23:00
Hi Phystus

Im surprised no one has mentioned anything along those lines before as /ubiquity is an early roll, its been there a long time.

Most rolls do not accept any sort of math as that is actually a fair bit of coding and to retro add that back in to 150+ rolls is probably never gonna happen. I have looked at several ways to do math and havent solved the issue yet.

I think that Shotgun Jolly used to run some ubiquity...

The only way I have found just now to do it is like this:

create a generic roll
aRoll
/ubiquity 0d6

and create rolls for each attribute or other
Strength
/mod (p1)

and then to use Strength click Strength twice and then aRoll.

I will have a look at improving Ubiquity if you can get someone to conform your rules interpretation is correct.

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=31741

31741

Phystus
February 24th, 2020, 00:40
Hi Damned,

I got the rules interpretation from the Quantum Black core rules, pp 27-29 for the primary attribute rolls (double dice pool) and pp29-30 for secondary attributes (pool the sum of the relevant primary attributes to determine the dice pool). I have also played at Gencon with the authors of Quantum Black, and that's how they ran it too.

I've run a bunch of Ubiquity myself, but I always hand-coded each roll for each character. I'm trying to reduce the workload a bit by coding the character sheet so I just have to plug in the primary attributes to get the primary and secondary rolls.

I appreciate you looking into it.
~P

iiivsion
April 30th, 2020, 02:45
I had a similar problem with the 7th sea rolls, where I have (Attr+Skill) k (Skill) in the roll and keep system. The roll and keep Roller was not able to do (x+y)k(y), but it was easy to enhace it by making it accept Attr+Skill if it recognizes two numbers and a "+". Perhaps that could also be used for ubiquity? Is it an enhancement or one of the dice rollers in MoreCore baserules?

Ok, found the code in manager_custom_ubiquity:
"
-- Now we check that we have a properly formatted parameter, or we set the sDesc for the roll with a message.

-- begin inserting here:
-- write a new check which checks for + and * in the formula
-- write a parser and calculate to a single number

-- write some code to parse the mathematical formula and calculate it to a single number
if not sParams:match("(%d+)d([%dF]*)%s(.*)") then
rRoll.sDesc = "Parameters not in correct format. Should be in the format of \"#d# <desc>\"";
return rRoll;
end

local sDice, sDesc = sParams:match("([^%s]+)%s*(.*)");

Example Code for a math parser for addition from 7th sea to handle (x+y)k(y)-rolls and reduce them to (n)k(y):

if sParam:match("^%(*%d++%d+%)*k%d+%s*.*") then
local sAttr, sSkill, sRest = sParam:match("(%d+)+(%d+)%)*(k%d+.*)")
sParam=tostring(math.floor(sAttr+sSkill))..sRest
end


I am working on some FGU compatibility stuff, but when I am done with that, I could also write that code for you. The idea was to eventually create a function which can be included in other rollers as well to pass mathematical parts for precalc before the roller gets started. As damned stated, writing full math functionality is really hard, but if we could narrow it down to "two numbers and one or two fixed operators at the start of the formula", I think that could be done.

Phystus
May 3rd, 2020, 04:51
I appreciate the offer, but I have already written the code to fix it. In fact I think it's included in the current version of manager_custom_ubiquity.

~P