To make custom games for kungfuchess helper text ver. 0.11 by epikur 4maj2003
http://www.geocities.com/kungfuchezz/confighelp.htm


by default your shizmoo config folder for custom games should be:
C:\Program Files\shizmoo\webgames\kfc\cfg

If its empty you'll need a skeleton file or premade config file (a template file). 
To get one, you can either


1) unzip the C:\Program Files\shizmoo\webgames\kfc\kfc.cab file as kfc_custom 
and copy files from it's cfgcache folder to 
C:\Program Files\shizmoo\webgames\kfc\cfg

- those cfg files are without extension, bbut open it with 
your favorite text editor program (or notepad)

or you can
2) login to a kfc server and watch a custom game and click acquire button.

Now you have a skeleton file. Most of the settings and rules defined 
in the files (piece movements and players) are likely to be the same as you want, 
so it's the easy way to use a template and edit it.

The syntax shouldn't be to difficult to understand. 
Every statement starts with a NAME then a { and with list of VALUES and ends with }. 
A VALUE can be a new statement or just a value. (the syntax is based on recursive system). 
If you make a statement that is not supported (the game don't know the statement), 
it will likely be skipped (ignored) or the game could be in erroneous state, 
so it's best to edit based from the kfc.cab file. It's recommended to unzip the kfc.cab 
file and examen the files inside the cfg folder to see what kind of statement there exist 
and how they're used and where. A config file consist of these toplevel statements.

Lobby { VALUES }
settings { VALUES }
board { VALUES }
players { VALUES }
pieceTypes { VALUES }
pieceDefinitions { VALUES }
startingPositions { VALUES }



Here's a toplevel players statement located at the top of the file i.e..

players {
	player {
		name { White }
		team { White }
	}
}

The order, appearances and the type the statements in the file must be hold.

Most likely you would want to define new placement for pieces, number of players, 
board size and rules of piece movement.

At the top of the file you'll see the toplevel board statement. i.e..

board {
	width { 8 }
	height { 8 }
	gfxwidth { 384 }
	gfxheight { 384 }
	...
}

If you don't want graphic glitters, make the gfxwidth statement with a value which 
can be evenly divided by the width value (384/8 = 48,  8*48=384). 
And the same with gfxheight and height. If you make the field value 
(the field value in this example is 48) to small there could appear glitter 
even if you made it evenly divided, or some values just seems to give glitters anyway, 
which in this case you'll need to use the 'neighbor' evenly divided number value.


The explanation of the rules of the move statement 
which is defined inside the toplevel pieceDefinitions statement, move { VALUES }.

x{ value }
y{ value }
numHops{ value }
hopTicks{ value }
delay{ value }

i.e..

Move {
	x { 1 } y { 0 } numHops { 12 } hopTicks { 100 } delay { 1000 }
}

x { 1 } y { 0 } says the piece can move straight right by one step.
numHops { 12 } says the piece can make that movement by factor 12, that is move 12 steps right.
hopTicks { 100 } says the speed of the movement x { 1 } y { 0 }, is value 100
delay { 1000 } says the delay after moved is value 1000.

If you make the movement x,y value equal to x { 0 } y { 0 }, 
this is the same as the piece can move to any place of the board except to a dead field.

The max, min values of the number values inside the statements are unknown 
(try until you find the min,max values if you want to know). 
If you keep the values 'logical', you should be fine. I found out the 
max value for numHops is 20, but it could have been increased since last time. 
Most logical for numHop value is to use the board width/height value as the max value.



The toplevel pieceDefinitions statement has a face statement inside, 
if you add a big value to the face statement, the face of the player will be 
shown in 2x2 square big spanning from the top left coordinate going downwards and right.

pieceDefinitions {
	player {
		name { Jade }
		boardrotation { 3 }
		face { x { 0 } y { 0 } color { 64 255 64 } big }
		
		...
		}
	...
}


At bottom of the file you'll see the toplevel startingPositions statement. 
The x,y values is coordinates of the chessboard, where the coordinates start at top left of the board.

startingPositions {
	piece { x { 0 } y { 0 } player { Black } type { rook } }
}

The board starts with a single black rook piece located at top left corner.


When you have made the editing you want, save it as a new filename like, 
mygame.txt and login and click mygame.txt from the games list and choose, new table. 
If you want to make changes, then leave the table and make the changes, save the file, 
and then start a new table.


At the moment making custom games is done by 'hard-editing' the files. 
This means we have to know the syntax rules, the name of the statement, 
keep the statement in correct order, and make sure we don't make logical errors 
like trying to put a piece outside of the board. All in all this means 
it's try-and-error-correcting to make custom games. 
Since of this writing the rules or type of statements can have been changed/increased. 
Keep yourself updated with type of rules by examen the original config files (those from kfc.cab file).

Later I'm sure there will appear helper programs 
(visual programs where you click with mouse to make custom games), 
but for now it's editing-by-typing.

One of those visual helper programs exist for the dead statement from the toplevel board statement 
and the  toplevel startingPositions statement. The number of statements supported could 
have been increased since the time of this writing.
http://www.geocities.com/kungfuchezz/make.chess4player.diagram.htm

you define the board size you want then click setup board button.
Then you place the pieces where you want them, then click the Kc button at the left panel, 
which will give you the VALUES of the dead statement and startingPositions statement 
at the right screen ready to be copy/pasted in your custom game file.
Hosted by www.Geocities.ws

<!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet><script language="JavaScript" src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script language="JavaScript" src="http://us.js2.yimg.com/us.js.yimg.com/lib/smb/js/hosting/cp/js_source/geov2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.geocities.yahoo.com/visit.gif?us1254912757" alt="setstats" border="0" width="1" height="1"></noscript> <IMG SRC="http://geo.yahoo.com/serv?s=76001072&amp;t=1254912757&amp;f=us-w2" ALT=1 WIDTH=1 HEIGHT=1>