Custom dice

Do you need help installing or using ZunTzu? Would you like to report a bug?

Moderators: Ichibrothers, Cambronne

Post Reply
jonjac
Posts: 2
Joined: 02 Jan 2008, 23:21

Custom dice

Post 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).
User avatar
Jerome
Site Admin
Posts: 974
Joined: 22 Jun 2006, 21:31
Location: France
Contact:

Re: Custom dice

Post 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.
Jerome, ZunTzu developer.
Hedge-o-Matic
010
Posts: 42
Joined: 20 Apr 2008, 01:43
Location: The back of your mind

Post 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?
User avatar
Jerome
Site Admin
Posts: 974
Joined: 22 Jun 2006, 21:31
Location: France
Contact:

Post 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.
Jerome, ZunTzu developer.
Grimshad
010
Posts: 12
Joined: 26 Sep 2011, 08:54

Post 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.
dulcaoin
Site Admin
Posts: 79
Joined: 26 Aug 2014, 01:30
Location: Denver, Colorado, U.S.A.

Post 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.
Post Reply