[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Comments/Ratings for a Single Item
I notice that some piece sets in the Diagram Designer, such as Alfaerie - Many, have pieces identified by multiple letters. How are these deployed in a diagram? I tried putting the entire sequence in parentheses, which is how I am used to other systems doing it, but this did not work and instead treated the parentheses as "unrecognised piece" characters. I could not see the correct way described anywhere on the page.
Hi Charles I've read parts of the Game Courier documentation (much of which is applicable to the Diagram Designer, from where the documentation can also be accessed). The part that's devoted to FEN notation, I seem to recall, mentions handling piece images that use multiple letters to be represented in the FEN string. For a single piece that uses multiple letters, e.g. for a (White) "Rocket" it could be represented in FEN in a piece set by RK; simply use {RK} instead of entering a single letter (if you actually could) in the FEN string for the chosen piece type. Hopefully an editor will help if I'm not clear on this. Kevin
The short answer is "use brackets" {...}, as Kevin correctly points out. See the third paragraph of this section of the Developer guide.
I didn't see that in the User guide; perhaps Fergus should add it there too?
They're braces, not brackets. To include longer piece names, surround them with braces.
Any of (), [], {}, <> can be called brackets. Braces is perhaps more specific (depending on where you're from), but my inclusion of the symbols themselves should have cleared any confusion.
Fwiw, one thing that's happened is when I've misspelled the name for the image of a piece within the parentheses (aka braces), nothing will appear in the diagram for where the piece image should have been. This can also happen if one forgets one of the pair of the parentheses, or, say, uses one too many of them.
Yes, that works on the whole - although it does mnot seem to work with the coloured images in this set. This is unfortunate as I am particularly keen to use the Diagram Designer on variants with more than 2 players. It also has the oddity, I noticed at the same time, that upper case gives black pieces and lower case white ones, even thouugh the image list gives the more usual reverse. This should be fixed one way or the other, to make it consistent and make usres sure that it will noit be changed again after a diagram is posted.
I would guess that the underscore in their names is the problem?
> I noticed at the same time, that upper case gives black pieces and lower case white ones, even thouugh the image list gives the more usual reverse. That's most unusual. When I switched to the regular Alfaerie set, this didn't happen, and when I used "Alfaerie: Many" on Game Courier, this didn't happen. I replaced some pieces in the setup with alternates, and I found that they changed color (as opposed to the pieces rotating position). When I added some irregularly colored pieces, they disappeared. Reversing the cases of the letters in their labels did not get them to reappear. So it doesn't appear to be a simple matter of switching the cases. In case it was converting everything in a label to one case, I made one lower case label mixed case, and it disappeared. This is a mystery so far. I'll have to look at the code and do some debugging.
This is now fixed. The "Alfaerie: Many" set wrote the $flipped array itself, but drawdiagram.php reset the $flipped array before calculating it. Stopping it from doing that fixed it.
Fergus wrote: "This is now fixed. The "Alfaerie: Many" set wrote the $flipped array itself, but drawdiagram.php reset the $flipped array before calculating it. Stopping it from doing that fixed it." One of my submission diagrams was affected, as I had previously taken into account the (former) problem with that particular piece set. After the fix by Fergus, today I simply switched the Upper & lower case letters I used to represent the White & Black pieces, in my Diagram Designer generated diagram. It would seem anyone else who may have used that particular piece set should check their diagrams as well.
Excellent, it works (as demonstrated in my update to Neutral Subject Chess) - although I notice that the "update" button converts the braces in the original list into %7B and %7D in the final full diagram code, and that is how I pasted into the submission. Is this expected behaviour?
Yes, it is just <A HREF="http://www.w3schools.com/tags/ref_urlencode.asp">urlencoding</a> it. An urlencoded query string will get
urldecoded before extracting values from it.
Is there any way of suppressing the rank numbers and file letters? Mini Fivequarters is another obvious candidate for conversion, but it has a more complicated system of identifying cells.
You can use empty strings for your rank and file labels. Just put nothing between two spaces, and that counts as an empty string.
I have tried that, although I may have misunderstood "Just put nothing between two spaces". Could you show an example of how the finished string would read?
<P>That didn't work out so well, but you can make a rank or file label invisible by beginning it with an exclamation mark. Here's <A HREF="/play/pbm/diagram-designer.php?code=2%7BP_g%7D%7BR_g%7D%7BK_g%7D%7BB_g%7D%7BQ_g%7D%7BR_g%7D%7BP_g%7D5%7BP_g%7D%7BN_g%7D%7BB_g%7D%7BN_g%7D%7BP_g%7D3%7BP_lb%7D3%7BP_g%7D%7BP_g%7D%7BP_g%7D3%7BP_o%7D%7BR_lb%7D%7BP_lb%7D3%7BP_g%7D3%7BP_o%7D%7BR_o%7D%7BQ_lb%7D%7BN_lb%7D%7BP_lb%7D5%7BP_o%7D%7BN_o%7D%7BK_o%7D%7BB_lb%7D%7BB_lb%7D%7BP_lb%7D%7BP_lb%7D3%7BP_o%7D%7BP_o%7D%7BB_o%7D%7BB_o%7D%7BK_lb%7D%7BN_lb%7D%7BP_lb%7D5%7BP_o%7D%7BN_o%7D%7BQ_o%7D%7BR_lb%7D%7BP_lb%7D3%7BP_r%7D3%7BP_o%7D%7BR_o%7D%7BP_lb%7D3%7BP_r%7D%7BP_r%7D%7BP_r%7D3%7BP_o%7D3%7BP_r%7D%7BN_r%7D%7BB_r%7D%7BN_r%7D%7BP_r%7D5%7BP_r%7D%7BR_r%7D%7BQ_r%7D%7BB_r%7D%7BK_r%7D%7BR_r%7D%7BP_r%7D2&cols=11&files=%21a+%21b+%21c+%21d+%21e+%21f+%21g+%21i+%21j+%21k&ranks=%211+%212+%213+%214+%215+%216+%217+%218+%219+%2110+%2111+++++++&set=alfaerie-many">an example</A>.</P>
When I try to put in:
for Haiku Shogi (using the Spearman image for a multi-colourable Coppergeneral) I find that the orthogonals labelled 0 both get squashed. It happens even if I reduce the scale. Any ideas why that might be, and what to do about it?
for Haiku Shogi (using the Spearman image for a multi-colourable Coppergeneral) I find that the orthogonals labelled 0 both get squashed. It happens even if I reduce the scale. Any ideas why that might be, and what to do about it?
That may have something to do with 0 being an empty value. I'll look into it later.
As you can see, it is now fixed. In the appropriate places, I replaced the empty() function with a test of identity with the null string (=== ""), which keeps it from returning a false positive for 0.
20 comments displayed
Permalink to the exact comments currently displayed.