💡📝H. G. Muller wrote on Thu, Apr 22, 2021 04:29 AM EDT:
Oh, I see that the Diagram already supports a way to include 'custom graphics' for the pieces. I had forgotten all about that.
To include an image that doesn't use the specified graphicsDir or graphicsType, just write the full URL of the image, but with the color prefix replaced by a % sign. The script will replace that % sign by the whitePrefix or blackPrefix, as needed. So you are still limited to image names that use the same color prefixes. E.g. if you specify as image name in the piece definition:
/membergraphics/MSelven-chess/%cobra.png
you could use the cobra image there, no matter what graphics you specified for the other pieces. Note you should also explicitly mention the file exension.
Oh, I see that the Diagram already supports a way to include 'custom graphics' for the pieces. I had forgotten all about that.
To include an image that doesn't use the specified graphicsDir or graphicsType, just write the full URL of the image, but with the color prefix replaced by a % sign. The script will replace that % sign by the whitePrefix or blackPrefix, as needed. So you are still limited to image names that use the same color prefixes. E.g. if you specify as image name in the piece definition:
/membergraphics/MSelven-chess/%cobra.png
you could use the cobra image there, no matter what graphics you specified for the other pieces. Note you should also explicitly mention the file exension.