Page 1 of 1

pieceToCharTable

PostPosted: 25 Jun 2023, 23:54
by coarse
I've been trying to make a variant with XBoard, and am getting confused with the "pieceToCharTable" option. What do all the letters mean? The manual gives a few:

The characters that are used to represent the piece types XBoard knows in FEN diagrams and SAN moves. The string argument has to have an even length (or it will be ignored), as white and black pieces have to be given separately (in that order). The last letter for each color will be the King. The letters before that will be PNBRQ and then a whole host of fairy pieces in an order that has not fully crystallized yet (currently FEACWMOHIJGDVSLU, F=Ferz, Elephant [sic], A=Archbishop, C=Chancellor, W=Wazir, M=Commoner, O=Cannon, H=Nightrider). You should list at least all pieces that occur in the variant you are playing. If you have less than 44 characters in the string, the pieces not mentioned will get assigned a period, and you will not be able to distinguish them in FENs. You can also explicitly assign pieces a period, in which case they will not be counted in deciding which captured pieces can go into the holdings. A tilde '~' as a piece name does mean this piece is used to represent a promoted Pawn in crazyhouse-like games, i.e. on capture it turns back onto a Pawn. A '+' similarly indicates the piece is a shogi-style promoted piece, that should revert to its non-promoted version on capture (rather than to a Pawn). Note that promoted pieces are represented by pieces 11 further in the list. You should not have to use this option often: each variant has its own default setting for the piece representation in FEN, which should be sufficient in normal use. Default: ""


, but not all, and not enough for me to make a variant with some pieces [ex. Centaur (WFN), Silver (FfW)]. Can someone please give me the full list of pieces?

Re: pieceToCharTable

PostPosted: 29 Jun 2023, 20:34
by H.G.Muller
The letters are something you can choose yourself; it is the position in the pieceToCharTable that corresponds to a piece image. E.g. the 7th character corresponds to the Elephant image. The letter written in the 7th position then is what will be used in move notation and FEN for this piece.

To know which images there are, see the picture in:
https://www.gnu.org/software/xboard/wha ... index.html