PDA

View Full Version : Custom dices



Xarxus
December 30th, 2020, 20:00
I've some problem to understand how to use customdice.
What I want (it's only a test to understand) is to remove all dices and add a custom with d10 (or d100) icon.

To remove each dice I added merge="delete" for every die in gameelement.xml.
And till now everything seems ok. No dice is shown.

So I added this code (first step is I want to see the dice):


<customdie name="dMyDice">
<icon>d10icon</icon>
<model>d10</model>
<menuicon>customdice</menuicon>
<script>
function onValue(result)
local modresult = 50;
return modresult; -- Yes, always return 50
end
</script>
</customdie>

<die name="dMyDice1">
<icon>d10icon</icon>
<position>120,-68</position>
</die>


But still no dice is shown. I'm sure I'm missing something, but I don't guess what.

Valarian
December 30th, 2020, 21:23
The custom dice appear in the right-click menu of the dice model used. You'll need to show the d10 die.

Xarxus
December 30th, 2020, 21:38
Oh, great. Found it! Ty.

So this is not the way to do what I want. I'd like to have a dice image down with others, but with my rules.
I' have to study more, then. Any tips?

Xarxus
December 31st, 2020, 00:00
As far as I can see there is no dice image avaiable in CoreRules. I'm talking about those that are present
at the bottom and that represent the traditional dice, whose color is changeable. I have to add one of
my own, in some way. So dices are provided by "die" tags/object and there is no way to point to them.
Is it true?

damned
December 31st, 2020, 04:39
The code you cant find is in the engine and not in the rulesets.