PDA

View Full Version : Changing Dice Rolled Total or hiding it



MadBeardMan
January 3rd, 2019, 23:32
Evening All,

Getting late here and brain is tired, but trying to do one final thing before I go to the land of nod.

In the Vampire ruleset that Dan and I are building I have the dice rolls for the various checks all working pretty much.

Ie for Initiative the player has 6 dots, so they get 6 x d10.

I have 6 x D10 rolling, and as Dan has changed the graphics on the dice so it displays a symbol for 6-9, another for 10 and nothing 1-5. Superb.

What I need to do, is to change the output so that either than sum total is not displayed, ie 4 3 6 6 7 2 = 28, but displays just 4 3 6 6 7 2 or better still 4 3 6 6 7 2 = 3.

I already iterate through the dice rolled, so I know how many successes there are.

Just can't for the life of me remember if I've changed it for another ruleset or something somewhere, so Obi-Wan, you are my last best hope.... promise I'll go to bed after this so no more threads posted tonight!

Cheers,
MBM

damned
January 3rd, 2019, 23:45
You can tell FG not to display the SUM or your can use onDiceTotal to display a different number.
Have a look at the CoD in MoreCore - it only tells you how many successes.

MadBeardMan
January 3rd, 2019, 23:50
You can tell FG not to display the SUM or your can use onDiceTotal to display a different number.
Have a look at the CoD in MoreCore - it only tells you how many successes.

Cheers chap, didn't know about 'onDiceTotal', not seen it so far used.

I'll take a butchers at MoreCore in the morning, what's the CoD btw? That's Call of Duty to me.

Cheers!

Moon Wizard
January 4th, 2019, 00:11
Yes, the onDiceTotal script event was added specifically with an eye towards success/failure dice pools.

JPG

damned
January 4th, 2019, 02:06
Cheers chap, didn't know about 'onDiceTotal', not seen it so far used.

I'll take a butchers at MoreCore in the morning, what's the CoD btw? That's Call of Duty to me.

Cheers!

:facepalm:

WoD, nWoD, CoD...? No bells yet...
hint: related to your current project!

MadBeardMan
January 5th, 2019, 14:28
:facepalm:

WoD, nWoD, CoD...? No bells yet...
hint: related to your current project!

Afternoon Chap,

Nope, CoD still means Call of Duty, or Call of Dthulhu :), WoD means Worlds of Darkness, and I'd see VtM as the correct acronym for this stuff.

Anyway the Success stuff in MoreCore isn't what I wanted, I need either the sum total turned off (which can be done via the Options), or better, replaced by the number of successes in the section that shows the Dice rolls.

25823

This for example would show '1' not 6.

This is what we have atm, there's no 'values' on the dice, just symbols. I could edit the text on the left to show X successes etc, but still prefer the '1' (on in this case, the 4 on the right hand side of the dice).

25824

So let's find the 'onDiceTotal'.....

Cheers

MadBeardMan
January 5th, 2019, 15:15
Yes, the onDiceTotal script event was added specifically with an eye towards success/failure dice pools.

JPG

This is excellent.

Also Damned, top stuff MoreCore, almost where I want now.

And it's all working, splendid!

25825

Cheers both!

MadBeardMan
January 5th, 2019, 15:43
All,

Here's the working code, all contained inside my 'DiceManager' file.


function onDiceTotal( messagedata )

local nSuccessValue = getSuccessCount( messagedata.dice );

-- Debug.console("onDiceTotal: ", nSuccessValue, messagedata);
return true, nSuccessValue;
end


function getSuccessCount( aDice )

local nSuccessCount = 0;

for _,v in ipairs( aDice ) do
if (v.result >= 6) then
nSuccessCount = nSuccessCount + 1;
end
end

return nSuccessCount;

end

Hope this helps someone else.

Cheers,
Col

damned
January 5th, 2019, 22:30
CoD is chronicles of darkness or new world of darkness or world of darkness - which is Im pretty sure what VtM is built on....

Rolling /cod 6d10x7 rolls 6d10 and explodes and successes on 7 or higher
Using Parameterised Roll example below:

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

25828

MadBeardMan
January 5th, 2019, 22:35
CoD is chronicles of darkness or new world of darkness or world of darkness - which is Im pretty sure what VtM is built on....

Rolling /cod 6d10x7 rolls 6d10 and explodes and successes on 7 or higher
Using Parameterised Roll example below:

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

25828

I am liking MoreCore, took a bit of working out how to make the dice rolls work (otherwise throws lots of errors), but in the end I got there with it, going to use it for Victoriana.

As for CoD, yes Chronicles of Darkness (saw that in your notes), new name for it, but still WoD to me.

Still all works lovely.

Huzzah chap!