summaryrefslogtreecommitdiffstats
path: root/doc/CreatingThemes
blob: f19cc9a9cb1488c2bd6a71c2dccdcf78210c0319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
====================
  Creating Themes
==================== 

This document is your guide to creating themes for the Knights chess
interface.

-----------------------
1. Anatomy of a Theme:
-----------------------

A theme is a collection of images, sounds, and settings which create a
unique representation of a chess environment. Typically, this theme is in the
form of a gzipped tarball.

There are three types of themes for Knights: Chessboard themes, Chessmen
themes, and Audio themes. 

------------------------
2. Tarball Information:
------------------------

Themes must be stored in tarballs. Knights will use any type of tarball that
KDE supports. A good test is to try loading it in Konqueror using a
tar://mytarball URL. Generaly speaking, using the standard gzipped tarball
( with a '.tar.gz' extension ) will be fine.

The first two letters of your filename must be 'KB', 'KC', or 'KS' depending on
the type of theme it is. KB tells Knights that it is a Chessboard theme, 
and KC represents Chessmen themes. KS is a sound theme. This is 
case-sensitive.

Between the prefix and the extension comes your theme's name. Write it exactly
how you want it displayed in Knights, except use underscores instead of spaces.
So if you want your theme to be called "My Uber Chessmen" within Knights, you'd
have the following filename: KCMy_Uber_Chessmen.tar.gz

As a general rule, you should remove write and execute permissions on the
files, and either remove Owner/Group attributes, or make them something
harmless ( like nobody:users )

---------------------------
3. theme.conf Information:
---------------------------

Every theme must contain a text file called 'theme.conf'. Here's a
sample theme.conf file:

################################
# A Sample theme.conf file
################################
[General]
Type=Board
Name=Default
Version=1.0
Author=Troy Corbin Jr.
AuthorEmail=tcorbin@users.sourceforge.net
AuthorWWW=http://knights.sourceforge.net
Notes=This is the default chessboard for Knights. It was made with the Gimp.

[2DWhite]
King=white.king.png
Queen=white.queen.png
Bishop=white.bishop.png
Knight=white.knight.png
Rook=white.rook.png
Pawn=white.pawn.png

[2DBlack]
King=black.king.png
Queen=black.queen.png
Bishop=black.bishop.png
Knight=black.knight.png
Rook=black.rook.png
Pawn=black.pawn.png

[2DBoard]
Light=square.light.png
Dark=square.dark.png
Motion=square.motion.png
Select=square.select.png
Danger=square.danger.png

[Coordinates]
TextColor=255,255,255
ShadowColor=0,0,0

[Audio]
Select=select.wav
Move=move.wav
Check=check.wav
MatchOver=matchover.wav
Challenge=notify.wav
Tell=tell.wav
Notification=notify.wav
DrawOffer=draw.wav
Say=tell.wav
Promote=promote.wav
################################

Nothing too tough to figure out. 'Type' must be one of the following:

- Board
- Chessmen
- Audio
- 3DBoard ( For future use )
- 3DChessmen ( For future use )

'Name' is your theme's name and 'Version' is the version of your theme. Author,
AuthorEmail, and AuthorWWW should be self explanitory. Notes are any comments
you want to add.

The '2DWhite' and '2DBlack' sections are required in Chessman themes. Each line
specifies the file to be used for each different piece type.

'2DBoard' and 'Coordinates' are required in Chessboard themes. 'Light' and
'Dark' specify the file to be used for each color square on the board. 'Motion'
is the highlight used to indicate that a piece moved, 'Select' is the selection
highlight, and 'Danger' indicates an attacked piece. The 'Coordinates' are
standard 8bit RGB colors. These are the colors that Knights will use for board
coordinates. Try to use colors that contrast with the board itself.

New in Knights 0.5.6 are Chessboard borders. They are not required, but they
can greatly enhance the appearance of your chessboard. If you'd like to use one
then under '2DBoard' add the following lines:

HaveBorder=true
Border=border.png
BorderLightOn=light_on.png
BorderLightOff=light_off.png

-----------------------
4. Pixmap Information:
-----------------------

Your pixmaps can be in any format that Qt supports, as long as it supports an
alpha channel. For this reason you are strongly encouraged to stick with PNG
images. Note that there are a few exceptions to this in Chessboard themes. The
'Light', 'Dark', and 'Border' pixmaps constitute the lowest layer of graphics,
and so they will never be transparent. Therefore, for these items you can use
non-transparent file types ( like JPEG ).

Knights will scale your pixmaps to the current theme size. This means you can
supply any sized images you want and Knights will make it work. However, when
Knights has to enlarge a pixmap, the resulting image tends to be of poor
quality. To keep this from happening to your themes, you should make all your
pixmaps 144 pixels by 144 pixels. This ensures that your images will never be
enlarged, and it's not so large that it's wasteful.

Borders are an exception to the size rule. The 'Border' itself needs to be 9
times the size of your other images. So if you use the recommended 144 pixel
image size, the 'Border' needs to be 1296 pixels. Likewise, the 'BorderLightOn'
and 'BorderLightOff' images need to be half the size of your other images. So
a regular size image of 144 pixels required that the lights be 72 pixels.

----------------------
5. Audio Information:
----------------------

Like pixmaps, you can supply your audio using any file format that aRts
supports. I recommend you stick with .wav and .ogg, although the last time
I checked aRts' Ogg Vorbis support was flaky with short sounds. Also, for
very short sounds, .wav files are actually smaller. It's best to try both
and see which works best with your paticular sounds.

----------------------
6. Copyrights:
----------------------

If you're planning to share your themes with the Knights Project, you must be
the copyright owner on all the material contained in the theme. As much as I'd
love to see the heads of Neo and Agent Smith flying around the board, I don't
want to recieve any nasty letters from Warner Brothers.

Your material must also be released under a GNU or similar license. If you're
in doubt, contact us and we'll work it out.