Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

LatestLater Reverse Order Earlier
@ Fergus Duniho[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Dec 18, 2023 05:00 PM UTC in reply to A. M. DeWitt from 02:48 AM:

Okay, I unzipped this to the sets/ directory.


A. M. DeWitt wrote on Mon, Dec 18, 2023 02:48 AM UTC in reply to Fergus Duniho from Sun Dec 17 06:22 PM:

Thank you. However, it looks like I made some mistakes when defining the sets, which I have fixed in the updated set files below.

/membergraphics/MSchuseireigi/seireigi-set-files-v2.zip


🕸Fergus Duniho wrote on Sun, Dec 17, 2023 06:22 PM UTC in reply to A. M. DeWitt from 03:28 AM:

Okay, I have added them to the sets/ directory, and I have put them all in a Seireigi group in sets.php.


A. M. DeWitt wrote on Sun, Dec 17, 2023 03:28 AM UTC:

I have PHP set files for my Seireigi graphics available for Game Courier.

Set Group: Seireigi Pieces

/membergraphics/MSchuseireigi/seireigi-set-files.zip


H. G. Muller wrote on Mon, Nov 13, 2023 08:54 AM UTC in reply to Fergus Duniho from Sun Nov 12 09:49 PM:

To elaborate a bit on what Fergus said: the PHP set scripts assign a piece label (usually a single letter) to each image, which then can be used in the FEN fed to the Diagram Designer. But some sets are 'automatic', which means they scan the image directory for any images for which they haven't defined a piece label yet, and include these in the set with the root of the image name as label. This is the kind of thing you would want here. To give an example, I printed the auto-alfaeriePNG.php script below:

<?
include_once "/home/chessvariants/public_html/play/pbm/constants.php";
$dir = "/graphics.dir/alfaeriePNG/";
$dirname = CVP_ROOT . "/graphics.dir/alfaeriePNG/";
$maindir = opendir($dirname);
$pieces = array();
$width = $height = 50;
while ($filename = readdir($maindir)) {
    $fullname = $dirname . $filename;
    if (!is_file($fullname))
        continue;
    $t = mime_content_type($fullname);
    if (($t != "image/gif") && ($t != "image/png"))
        continue;
    list($w, $h, $t) = getimagesize($fullname);
    if (($t != IMAGETYPE_GIF) && ($t != IMAGETYPE_PNG))
        continue;
    if (($w > $width) || ($h > $height))
        continue;
    $key = substr($filename, 1, strlen($filename)-5);
    if (($filename[0] == "w") || ($filename[0] == "W"))
        $key = strtoupper($key);
    elseif (($filename[0] == "b") || ($filename[0] == "B"))
        $key = strtolower($key);
    else
        $key = $filename[0] . $key;
    $pieces[$key] = $filename;
    $width = max($width, $w);
    $height = max($width, $h);
}
$pieces["P"] = $pieces["PAWN"];
$pieces["p"] = $pieces["pawn"];
$pieces["N"] = $pieces["KNIGHT"];
$pieces["n"] = $pieces["knight"];
$pieces["B"] = $pieces["BISHOP"];
$pieces["b"] = $pieces["bishop"];
$pieces["R"] = $pieces["ROOK"];
$pieces["r"] = $pieces["rook"];
$pieces["Q"] = $pieces["QUEEN"];
$pieces["q"] = $pieces["queen"];
$pieces["K"] = $pieces["KING"];
$pieces["k"] = $pieces["king"];
$pieces["C"] = $pieces["CANNON"];
$pieces["c"] = $pieces["cannon"];
$pieces["A"] = $pieces["CARDINAL"];
$pieces["a"] = $pieces["cardinal"];
$pieces["M"] = $pieces["CHANCELLOR"];
$pieces["m"] = $pieces["chancellor"];
$pieces["E"] = $pieces["ELEPHANTFERZ"];
$pieces["e"] = $pieces["elephantferz"];
$pieces["J"] = $pieces["CAMEL"];
$pieces["j"] = $pieces["camel"];
$pieces["D"] = $pieces["DRAGON"];
$pieces["d"] = $pieces["dragon"];
$pieces["W"] = $pieces["WILDEBEEST"];
$pieces["w"] = $pieces["wildebeest"];
$pieces["L"] = $pieces["LION"];
$pieces["l"] = $pieces["lion"];
$pieces["U"] = $pieces["UNICORN"];
$pieces["u"] = $pieces["unicorn"];
$pieces["F"] = $pieces["BIRD"];
$pieces["f"] = $pieces["bird"];
$pieces["Z"] = $pieces["AMAZON"];
$pieces["z"] = $pieces["amazon"];
$pieces["G"] = $pieces["GRYPHON"];
$pieces["g"] = $pieces["gryphon"];
closedir ($maindir);
$width = $height = 50;
asort ($pieces);
?>

🕸Fergus Duniho wrote on Sun, Nov 12, 2023 09:49 PM UTC in reply to Diceroller is Fire from Mon Sep 19 2022 04:33 PM:

For Diagram Designer it is same? I uploaded my files in chessvariants , but what I should do to upload in Diagram Designer?

Game Courier uses set files that list the pieces in a set. Each set file is a PHP script that sets at least two variables. One is the $dir variable, which contains the location of the pieces relative to the main directory of the website. The other is the $pieces directory, which is an associative array with piece labels keyed to file names of graphic images. Sometimes, other variables are included. Shogi sets include $width and $height to set the dimensions of spaces, the $flip variable to indicate that the set may be flipped, and the $setdesc variable to provide a text description of the set when it's used in Game Courier. Some also include a $flipped variable, which is like the $piece variable for images to use when the piece set is flipped for Shogi-like games.

Set files go into the /play/pbm/sets directory, and there is also a sets.php script that needs to be filled in with information about each set. These details can be handled by an editor once you make your pieces available and provide the set files you want used.


Diceroller is Fire wrote on Mon, Sep 19, 2022 04:33 PM UTC in reply to H. G. Muller from Thu Jul 14 04:00 PM:

For Diagram Designer it is same? I uploaded my files in chessvariants , but what I should do to upload in Diagram Designer?


H. G. Muller wrote on Thu, Jul 14, 2022 04:00 PM UTC in reply to Diceroller is Fire from Wed Jul 13 01:07 PM:

Where can I create my piece set?

For what purpose? If you want to use your own piece graphics in the Interactive Diagram you can just upload the images to the page belonging to your article, and point the Diagram to the corresponding directory.


Diceroller is Fire wrote on Wed, Jul 13, 2022 01:07 PM UTC:Excellent ★★★★★

Where can I create my piece set? Please answer. Good site, thank You!


H. G. Muller wrote on Fri, May 6, 2022 03:42 PM UTC in reply to Calixtus Wee from 03:06 PM:

You could post a description of the rules on this website.

https://www.chessvariants.com/how.html


Calixtus Wee wrote on Fri, May 6, 2022 03:06 PM UTC in reply to Fergus Duniho from Fri Sep 24 2021 06:46 PM:

Hi, I made my own Chess variant, that I call Cathayan Chess. Is there anything we can do about it?


🕸Fergus Duniho wrote on Fri, Sep 24, 2021 06:46 PM UTC:

Testing whether posting here meets same error as posting on new server.


🕸Fergus Duniho wrote on Wed, Mar 17, 2021 04:37 PM UTC:

Testing the ability to post to a user profile page.


13 comments displayed

LatestLater Reverse Order Earlier

Permalink to the exact comments currently displayed.