Page 1 of 1

Custom dice

Posted: 13 Jan 2008, 22:19
by jonjac
Hi,

I am just wondering if it's possible to create custom dice that does not use numbers on the sides, but instead shows different symbols. Like for example the Commands & Colors combat system (Memmoir '44, C&C:Ancients and so on).

Re: Custom dice

Posted: 14 Jan 2008, 13:44
by Jerome
jonjac wrote:I am just wondering if it's possible to create custom dice that does not use numbers on the sides, but instead shows different symbols.
Yes, it's possible.

You have to create a texture image. For a six-sided die the image will be a rectangle composed of six squares on two rows (one square for each face of the die). You then have to downsize the image to exactly 256x256 pixels. Note that the image will be distorted because the rectangular image will have become square. Don't worry, the image will end up being displayed correctly on the dice.

Here is an example:

ImageImage

The pixel in the top left corner of the image (colored white in the example) is used to indicate the color of the chamfer between the faces.

In game-box.xml, replace this code:

Code: Select all

<dice count="2" color="ffffff" pips="000000"/>
by this code:

Code: Select all

<dice count="2" texture-file="dicetexture.png"/>
(where dicetexture.png is the name of your texture file, which must be added to the game archive).

You can also make custom four-, eight-, ten-, twelve- or twenty-sided dice. The specification of the texture file will be different of course.

Posted: 11 Jun 2008, 02:04
by Hedge-o-Matic
Yay! I needed this to complete a gamebox!

To do the other die types, do we need to do the faces in two rows (e.g. 6x2 for 12-sided dice)? If so, won't the faces become increasingly distorted? If the texture image itself has lots of lost information due to the aspect-ratio compression, There's little Zun Tzu could do to remedy this. A d12, for example, would need squares of 128x128, which means a raw file of 1536x256. compressed to 256x256, each square is now 1/3rd as wide. A d20 would make each texture section 128x25.

How can these sections not appear distorted in-game? Even if Zun Tzu stretches them out again, won't the visual quality just be degraded further? Is it because the section is displayed on a smaller surface on these higher die types? Or am I not understanding this?

Posted: 19 Jun 2008, 20:25
by Jerome
Hi, Hedge-o-Matic! Sorry for the late reply.
Hedge-o-Matic wrote:To do the other die types, do we need to do the faces in two rows (e.g. 6x2 for 12-sided dice)?
No, you need to follow the templates in this PDF document.

Create your own image based on one of the template. The bounding rectangle around each template indicates how you should clip your image.
When it's done, resize your image to 256x256 pixels. ZunTzu will fix the proportions by stretching the texture out when displaying the dice.

Posted: 14 Oct 2011, 21:05
by Grimshad
This information should be in the support area.
Jerome wrote:Hi, Hedge-o-Matic! Sorry for the late reply.
Hedge-o-Matic wrote:To do the other die types, do we need to do the faces in two rows (e.g. 6x2 for 12-sided dice)?
No, you need to follow the templates in this PDF document.

Create your own image based on one of the template. The bounding rectangle around each template indicates how you should clip your image.
When it's done, resize your image to 256x256 pixels. ZunTzu will fix the proportions by stretching the texture out when displaying the dice.

Posted: 11 Sep 2014, 18:29
by dulcaoin
BUMP.

This information should STILL be in the support area. Just a link to the PDF from the "how to add dice." help section would be a huge improvement.
Grimshad wrote:This information should be in the support area.
Jerome wrote:Hi, Hedge-o-Matic! Sorry for the late reply.
Hedge-o-Matic wrote:To do the other die types, do we need to do the faces in two rows (e.g. 6x2 for 12-sided dice)?
No, you need to follow the templates in this PDF document.

Create your own image based on one of the template. The bounding rectangle around each template indicates how you should clip your image.
When it's done, resize your image to 256x256 pixels. ZunTzu will fix the proportions by stretching the texture out when displaying the dice.