My command-line match program currently produces .pgn files in the simplest way possible. For a test game (with variant Spartan) the result looks like this:
When I try to load the resulting file in XBoard, I get an "Invalid move: 2. ... bd5" error. If I enter the sequence of moves manually, it becomes clear than XBoard expects "2. ... Hbd5", so including the piece-character for the Hoplite.
Is this really the correct behaviour, or have I found a bug? The logic behind not printing the initial "H" is that the Hoplite is the pawn replacement, and therefore by analogy it doesn't get the initial.
To me it sounds debatable whether that is correct or not (the example game on the Spartan Chess website has no H prefix for hoplites, treating them as pawns), but it also sounds like something that is a fairly fundamental part of how XBoard works and not so easy to change (for this specific case or in general).
I'll see about making a work-around (probably post-processing the PGN file to add in the H prefix for hoplites). Does this affect other variants with exotic pawns (only Berolina in practice, I guess)?
No, in Berolina the Pawns are represented by normal Pawns. As are Xiangqi and Shogi Pawns. For Spartan Chess I thought this a bit confusing, though, because the Hoplites move differently from the FIDE Pawns. So I wanted them to have different representation.