Comments/Ratings for a Single Item
I wish I could use the Alfaerie icon for the Sergeant for the Maasai on ranks 3 instead of the one I used instead but I don't know how to do it.
I have added the Sergeant to the piece set with notation "st" but you can still use it with the current "t" notation. Just add the following code to the beginning of the pre-game section:
setsystem groupsets array alfaerie-metamachy;
set mypieces ();
foreach label (a A b B c C d D e E f F g G h H i I j J k K l L m M n N o O p P q Q r R s S t T u U v V w W x X y Y z Z):
setelem mypieces #label pieceimg #label;
next;
if == pieceset alfaerie-metamachy:
set mypieces.t pieceimg st;
set mypieces.T pieceimg ST;
endif;
setsystem pieces #mypieces;
You case see it in action here:
https://www.chessvariants.com/play/pbm/play.php?game%3DMaasai+Chess%26settings%3Dgs_test
Please note that after you change your preset, you will need to refresh the page or clear you cache before you see the game on the preview screen. But if you start moving pieces, you should see the new graphics.
Thank you Greg, this works very fine.
I was wondering that maybe the most practical would be to have a table of all SVG Alfaerie, each one defined with 2 letters, which will give 26^2 possibilities, a very confortable number. Then each designer would be able to pick up the ones he needs using a code like the one you posted here.
Maybe it is already your idea, or something similar.
4 comments displayed
Permalink to the exact comments currently displayed.
I wish I could use the Alfaerie icon for the Sergeant for the Maasai on ranks 3 instead of the one I used instead but I don't know how to do it.