PDA

View Full Version : Adding a different D10 die rolls as a D20



MadBeardMan
January 6th, 2019, 21:59
Greetings All,

I've got two sets of dice for the D10's, Red and Black.

What I want to do is swap out the default D10 in the rRoll, and put in my D10.

Odd thing is when I add a new die type, it defaults to a D20, even if I set the new die to the D10 default.

In my gameElements.xml


<die name="d10_h">
<icon>d10hungericon</icon>
</die>

In my graphics_icons.xml


<!-- Rolls -->
<icon name="d10icon" file="graphics/icons/d10_icon.png" />
<icon name="d10hungericon" file="graphics/icons/d10_hungericon.png" />

And in my code that swaps the normal D10 for the modified D10.


for i=nDiceRequired,(nDiceRequired-nHungerDice)+1,-1 do
rRoll.aDice[i] = "d10_h"
end

That works when it shows the dice results, but if I drag the dice, I'll have 3 x D10 and 1 x D20.

This is now FIXED. Moon Wizard states a model is needed, so the following code works:


<die name="d10h">
<icon>d10hungericon</icon>
<model>d10</model>
</die>

Cheers
MBM

damned
January 6th, 2019, 22:30
Im not across your code but there are 4 additional colours of every dice in MoreCore
red, green, blue, yellow

hmmm... I think your dice name is wrong - it can only have d##### it cant have any other alphas.

MadBeardMan
January 6th, 2019, 23:09
Im not across your code but there are 4 additional colours of every dice in MoreCore
red, green, blue, yellow

hmmm... I think your dice name is wrong - it can only have d##### it cant have any other alphas.

Nope, I tried that before, even d10h doesn't work.

The really odd thing, in the WOIN ruleset, d6lb, d6r etc all work.

Cheers

Moon Wizard
January 6th, 2019, 23:27
It's because you didn't specify a model for your new dice type, and the default is d20.

JPG

MadBeardMan
January 6th, 2019, 23:28
It's because you didn't specify a model for your new dice type, and the default is d20.

JPG

Model?


<die name="..." >
<icon > ... </icon> The name of an icon resource used to represent the die results in the chat log
<position > ... </position> The default placement of the die on the desktop in the form "x,y"
</die>

Where's the model then chap?

Cheers

MadBeardMan
January 6th, 2019, 23:41
Hi JPG,

Seems the documentation on the wiki (https://www.fantasygrounds.com/refdoc/die.xcp) is wrong then, as adding model did work:


<die name="d10h">
<icon>d10hungericon</icon>
<model>d10</model>
</die>

Cheers
Col

Valarian
January 7th, 2019, 07:02
hmmm... I think your dice name is wrong - it can only have d##### it cant have any other alphas.
You can have alpha characters in custom dice. It'll work as a selected die through the dice radial menus, and through scripted drag/drop or double-click rolling. The /die processing in the chat won't recognise the custom die as valid.

damned
January 7th, 2019, 07:06
You can have alpha characters in custom dice. It'll work as a selected die through the dice radial menus, and through scripted drag/drop or double-click rolling. The /die processing in the chat won't recognise the custom die as valid.

Thanks. That must be where I got that from - I use a lot of /die type commands!