PDA

View Full Version : Difficulty with customdie vs the /die command



IchiSkaar
November 27th, 2016, 20:15
Hi,

Working on a ruleset based upon a where the d6 values change if you have a 0 or a 6.

I manage to create the customdie and the required onValue function. What I don't understand is why my customedie name="dCF" can't work with "/die dCF" command line.

Note: I did test, based on the "Custom Dice Results (https://www.fantasygrounds.com/forums/showthread.php?23013-Demi-Dice&p=197855&viewfull=1#post197855)" extension example, d010 for customdie name; it do work but I would prefer to be able to use "dCF".

Thanks for any assistance.

Trenloe
November 28th, 2016, 03:10
The dice name needs to be numeric.

Nickademus
November 28th, 2016, 15:39
This is what I thought too, but didn't that change in the update that added the dF for fudge dice?

Version 3.0.0 has this in the release notes:

Support for fudge die (dF)

Trenloe
November 28th, 2016, 16:41
This is what I thought too, but didn't that change in the update that added the dF for fudge dice?

Version 3.0.0 has this in the release notes:
dF is a built in <die (https://www.fantasygrounds.com/refdoc/die.xcp)> model.

The <customdie (https://www.fantasygrounds.com/refdoc/customdie.xcp)> definition only appears to work with a numeric "name".

Nickademus
November 28th, 2016, 17:48
Ah. Makes more sense.

IchiSkaar
November 30th, 2016, 05:08
This is my finding also and it is due to the gmatch rule (string) used to parse the dices here and there in the lua script of corerpg ruleset.

Based on that finding, I will seek to see if something could actually be done to add a helper that would actually find such customdice like I would prefer to use, the dice name being a reference to the actual game ruleset I'm working on... got plenty other question about dice management but for now will take baby steps since #1 LUA is a new language to me and #2 I have yet wrap my head around the object model used...

All in due time. Will let you know if I do come up with a clean solution.