Check out Symmetric Chess, our featured variant for March, 2024.


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

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Multiple=letter piece codes in Diagram Designer[Subject Thread] [Add Response]
Charles Gilman wrote on Tue, Feb 2, 2016 07:48 AM UTC:
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.

Kevin Pacey wrote on Tue, Feb 2, 2016 09:00 AM UTC:
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

Ben Reiniger wrote on Tue, Feb 2, 2016 03:44 PM UTC:

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?


🕸Fergus Duniho wrote on Tue, Feb 2, 2016 04:43 PM UTC:
They're braces, not brackets. To include longer piece names, surround them
with braces.

Ben Reiniger wrote on Tue, Feb 2, 2016 08:17 PM UTC:
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.

Kevin Pacey wrote on Tue, Feb 2, 2016 11:38 PM UTC:
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.

Charles Gilman wrote on Fri, Feb 5, 2016 07:37 AM UTC:
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.

Ben Reiniger wrote on Fri, Feb 5, 2016 04:38 PM UTC:
I would guess that the underscore in their names is the problem?

🕸Fergus Duniho wrote on Fri, Feb 5, 2016 05:57 PM UTC:
> 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.

🕸Fergus Duniho wrote on Fri, Feb 5, 2016 07:24 PM UTC:
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.

Kevin Pacey wrote on Sat, Feb 6, 2016 06:13 PM UTC:
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.

Charles Gilman wrote on Mon, Feb 8, 2016 10:30 AM UTC:
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?

🕸Fergus Duniho wrote on Mon, Feb 8, 2016 04:09 PM UTC:
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.

Charles Gilman wrote on Tue, Feb 9, 2016 08:02 AM UTC:
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.

🕸Fergus Duniho wrote on Tue, Feb 9, 2016 04:53 PM UTC:
You can use empty strings for your rank and file labels. Just put nothing
between two spaces, and that counts as an empty string.

Charles Gilman wrote on Wed, Feb 10, 2016 07:52 AM UTC:
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?

🕸Fergus Duniho wrote on Wed, Feb 10, 2016 02:07 PM UTC:
<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>

Charles Gilman wrote on Wed, Feb 17, 2016 08:27 AM UTC:
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?

🕸Fergus Duniho wrote on Wed, Feb 17, 2016 01:17 PM UTC:
That may have something to do with 0 being an empty value. I'll look into
it later.

🕸Fergus Duniho wrote on Wed, Feb 17, 2016 02:26 PM UTC:
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

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.