PDA

View Full Version : 1d6*10 In A Die Field???



dulux-oz
March 12th, 2017, 04:38
Hey Guys,

In a die filed, is it possible to have something like "1d6*10" (note that this is not the same as 10d6), or do we use a die field with "1d6" in it and a numberfields with the "10" in it (and multiply the two together)?

Cheers

damned
March 12th, 2017, 04:45
Hey Guys,

In a die filed, is it possible to have something like "1d6*10" (note that this is not the same as 10d6), or do we use a die field with "1d6" in it and a numberfields with the "10" in it (and multiply the two together?

Cheers

I dont see why not. You would have to code it but it should be very doable.

dulux-oz
March 12th, 2017, 04:48
So are you saying that as far as you are aware you can't put 1d6*10 into a die field "as is"?

(I'm trying to avoide having to code it - yeah, I'm lazy: that's why I went into IT in the first place :p )

Andraax
March 12th, 2017, 04:55
Depends on what you're doing with it. I have some table entries that generate parcels where I use something like "[2d6]0 GP" and it does that. But that won't work in every situation.

dulux-oz
March 12th, 2017, 04:59
No, this is on a character sheet (a spell-template to be exact) - I've used that table technique before and its a good one - thanks

damned
March 12th, 2017, 05:09
So are you saying that as far as you are aware you can't put 1d6*10 into a die field "as is"?

(I'm trying to avoide having to code it - yeah, I'm lazy: that's why I went into IT in the first place :p )

Im sure you have tried putting that in before...
AFAIK you cant do it in an existing field.
Im sure it will only take you 10mins...

Moon Wizard
March 14th, 2017, 01:06
A diefield or diecontrol object in FG can only contain specific dice. It does not perform any calculations. All of those need to be built into Lua scripts surrounding the dice fields.

We have plans to change this model in FGU to be a more general dice/math expression stored in diecontrol/diefield objects, but it is a very large, very invasive change.

Also, there is an math expression parser already built into CoreRPG to handle specialized data from story template and random encounter records.
StringManager.evalDiceMathExpression

Cheers,
JPG