Comments/Ratings for a Single Item
Is there a way to use the alfaerie many graphics from the diagram designer and game courier in the interactive diagrams?
The generated code has variables for updating the image format, folder, and filenames for each piece, so I see no reason why this should be an issue.
How can I do it? I see only the default images. I need to somehow use the names for the other images.
Use the images that ere there while you are designing. Then, edit the generated code to use different images.
Got it.
It still does not work. Try for example : zebrawazir
I probably can do it if I change to directory from default to: graphics.dir/alfaeriemisc/
I am not sure on how to put the file directory for a child directory. For example if I set graphicsDir to ../graphics.dir/alfaeriemisc/ then I need acces to it's subdirectories to acces the zebrawazir. How can I do it?
I'm not sure. It may not be possible to use images that are not all in the same directory. If it can be done, H.G. would have to tell us, but I haven't seen him around here lately. I hope he's OK!
When I used alfaerie pieces for an interactive diagram, I put all the images I needed in the directory for the game.
I assumed this cannot be done by a non editor.
It's easier for an editor, but you can download images to your computer and use the file manager to upload them to a directory.
All right, Thanks Fergus, I'll try it.
How do I create a directory?
Also, How do I upload images?
If you create an article, this automatically creates a directory /membergraphics/MSarticle-name/ for any files you upload. So you could upload all the images you want to use to such a directory, and specify that as graphicsDir in the Interacive Diagram definition. You have to make sure the squareSize, graphicsType and white/blackPrefix match that of the uploaded graphics.
You cannot use sets that are scattered over several directories. Because the diagram builds the image filenames as prefix + root name + exetension (where the exension is the specified graphicsType). So giving the root name as a pahname, like subdir/quagga, would no work, because it will prefix the directory name with the color ('wsubdir/quagga.gif') rather than the image name ('subdir/wquagga.gif'). This should be easy to fix, btw; I could make the diagram split any given roo name at the slashes, prefix the last part with the color, and then put them together again.
Thanks for the input, HG!
Honestly HG, I'd prefer that you manage to do the relative path. It would be very helpful!
Greg, Can you help me by drawing a ferz-alfil-trebuchet? I tried using my own tools but it goes kind of bad.
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.
Ok HG, I'll get to work. Thanks!
Thanks HG!
I still could not make work. I cannot add the wazirzebra here:
https://www.chessvariants.com/invention/grand-apothecary-chess-alert
from here:
OK, my bad. I was wrong about adding the file exension; this was already done at an earlier stage, before replacing the % by a color prefix. This means you should NOT specify an extension in the 'custom image', and that it then will always use the same extension as the regular images. That means you cannot use the cobra from the se in the Elven-Chess directory with alfaerie (because it is png, and alfaerie is gif). But you should not have problems using an alfaerie image from another directory. When you do not put the .gif in the custom name.
BTW, if it doesn't work, you can open the piece legend of the diagram, and right-click the 'missing image' symbol in it, and select 'View Image' from the context menu. This will give a 404 error, but in the adress bar of your browser you should then be able to see what the filename was that it finally made from the parameters you supplied. Which often tells you what went wrong.
Ok, for some reason when trying this: graphics.dir/alfaeriemisc/compounds/%zebrawazir it results in this: https://www.chessvariants.com/rules/graphics.dir/alfaeriemisc/compounds/bzebrawazir.gif
25 comments displayed
Permalink to the exact comments currently displayed.
It shouldn't be too hard to implement the majority of the features. The main problem I am currently facing is how to implement the display of legal moves from XBetza notation, which becomes quite complicated, especially when you take into account the way multi-moves work. Once the display of legal moves is fully implemented, the Universal Chessboard will enter its Beta stage.