Trenloe
December 21st, 2019, 14:07
For custom dice result graphics, the Star Wars: Edge of the Empire community ruleset uses the <die> name.result name to display the correct die face icon in the chat window.
For example:
<!-- dBoost -->
<customdie name="dBoost">
<model>d6</model>
<menuicon>customdice</menuicon>
</customdie>
<die name="dBoost.1"><icon>dBoosticon.1</icon></die>
<die name="dBoost.2"><icon>dBoosticon.2</icon></die>
<die name="dBoost.3"><icon>dBoosticon.3</icon></die>
<die name="dBoost.4"><icon>dBoosticon.4</icon></die>
<die name="dBoost.5"><icon>dBoosticon.5</icon></die>
<die name="dBoost.6"><icon>dBoosticon.6</icon></die>
But, with this, I get multiple warnings (one for each <die> entry) as follows: [12/21/2019 6:55:29 AM] [WARNING] die: Name attribute must be alphanumeric value. (Star Wars EotE) (definitions/dice.xml)
I changed the <die> definition and the underlying code to replace the period (.) with a r and this doesn't give the error anymore:
<!-- dBoost -->
<customdie name="dBoost">
<model>d6</model>
<menuicon>customdice</menuicon>
</customdie>
<die name="dBoostr1"><icon>dBoosticon.1</icon></die>
<die name="dBoostr2"><icon>dBoosticon.2</icon></die>
<die name="dBoostr3"><icon>dBoosticon.3</icon></die>
<die name="dBoostr4"><icon>dBoosticon.4</icon></die>
<die name="dBoostr5"><icon>dBoosticon.5</icon></die>
<die name="dBoostr6"><icon>dBoosticon.6</icon></die>
And the dice roll and show in the chat window:
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=30948
However, there are two issues with this:
1) The die numerical result is superimposed on top of the icon. In FGC I'd use a font called "dieresult" that doesn't have any numeric characters in it, which stops the number being shown on the dice icon. Do I have to do the same in FG Unity or is there an easier way to not display the die result in the result icon?
2) The die name is being shown above each die - for example, in the above: dBoostr3+dBoostr4+dBoostr6 can this be turned off?
To give an idea of what I'd see in FG Classic:
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=30949
For example:
<!-- dBoost -->
<customdie name="dBoost">
<model>d6</model>
<menuicon>customdice</menuicon>
</customdie>
<die name="dBoost.1"><icon>dBoosticon.1</icon></die>
<die name="dBoost.2"><icon>dBoosticon.2</icon></die>
<die name="dBoost.3"><icon>dBoosticon.3</icon></die>
<die name="dBoost.4"><icon>dBoosticon.4</icon></die>
<die name="dBoost.5"><icon>dBoosticon.5</icon></die>
<die name="dBoost.6"><icon>dBoosticon.6</icon></die>
But, with this, I get multiple warnings (one for each <die> entry) as follows: [12/21/2019 6:55:29 AM] [WARNING] die: Name attribute must be alphanumeric value. (Star Wars EotE) (definitions/dice.xml)
I changed the <die> definition and the underlying code to replace the period (.) with a r and this doesn't give the error anymore:
<!-- dBoost -->
<customdie name="dBoost">
<model>d6</model>
<menuicon>customdice</menuicon>
</customdie>
<die name="dBoostr1"><icon>dBoosticon.1</icon></die>
<die name="dBoostr2"><icon>dBoosticon.2</icon></die>
<die name="dBoostr3"><icon>dBoosticon.3</icon></die>
<die name="dBoostr4"><icon>dBoosticon.4</icon></die>
<die name="dBoostr5"><icon>dBoosticon.5</icon></die>
<die name="dBoostr6"><icon>dBoosticon.6</icon></die>
And the dice roll and show in the chat window:
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=30948
However, there are two issues with this:
1) The die numerical result is superimposed on top of the icon. In FGC I'd use a font called "dieresult" that doesn't have any numeric characters in it, which stops the number being shown on the dice icon. Do I have to do the same in FG Unity or is there an easier way to not display the die result in the result icon?
2) The die name is being shown above each die - for example, in the above: dBoostr3+dBoostr4+dBoostr6 can this be turned off?
To give an idea of what I'd see in FG Classic:
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=30949