-
Notifications
You must be signed in to change notification settings - Fork 22
Excerpts
In the last years the project Rails had not a wiki, so most of the shared knowledge can be found in the archives of the rails-devel mailinglist. The reading and finding of information in the archives is not always very simple. You can find here some, partly heavily editet, excerpts of interesting threads or emails. Contents
1 Summary of the excerpts
2 The excerpts
2.1 Excerpt 001 - Creation Tree for the different xml files
2.2 Excerpt 002 - Tile identifiers
#Excerpt 001: Erik Vos recapitulates the workflow for the creation of the different xml files
#Excerpt 002: Erik Vos recapitulates how the tile identifiers are numbered in the rails project.
Source Re: [Rails-devel] Tiles.xml, TileSet.xml, and svg files From: Erik Vos <erik.vos@xs...> - 2010-01-11 22:40
- Why do we have separate TileSet.xml and Tiles.xml?
TileSet.xml contains the game-specific tile properties, and Tiles.xml has the game-independent tile properties. The latter file is generated by rails.util.MakeGameTileSets (a stand-alone Java class/program) from TileSet.xml and the overall Tiles.xml file that has all tiles (this file and several other files that I'm going to mention are in directory 18xx/tiles of the CVS repository on Sourceforge). This program also checks TileSet.xml against Map.xml for consistency.
- Why do we have separate XMLand SVG files?
That is because we use an SVG renderer that understands SVG, whereas both I and the Java code I have written only understand XML. And I doubt if the twain will ever meet.
- Where do Tiles.xml and the SVG files come from?
Ultimately everything comes from a tile database named TileDesigner.18t created by Marco Rocci's TileDesigner program (see http://www.rails18xx.it/software.html). In the mean time I have added a lot of tiles to Marco's original tile set. From that database I export both the SVG tiles and an XML descriptive file called TileDesigner.xml.
The SVG export is somewhat buggy. Originally Brett fixed that by a procedure that I don't have the details of. I have recently taken over and I'm now using a procedure described in the comments of a Perl script named CombineTiles.pl. That script builds the Rails SVG file set by combining parts from three sets of SVG files: - tiles with ID > 0 (layable tiles, the ID is printed on the tile). - tiles with ID <=0 (preprinted tiles, no ID on the tile; this is a separate export from TileDesigner) - special tiles that I have modified manually with Inkscape (such as the red off-board tiles -901 throught -903, which TileDesigner cannot create with "arrows". So for these tiles the XML does not exactly correspond with the SVG!).
The XML export (TileDesigner.xml) is converted by another Java program/class named rails.util.ConvertTiles into the overall Tiles.xml that I mentioned before. I'm doing this conversion because I think that the latter format is better suitable for use in Rails.
- Why is this procedure so complex?
Well, we're doing the best we can with the limited knowledge and imperfect tools that we have.
BTW#1: Is there any routine to display all of the SVG files?
No. Only TileDesigner has everything.
source Re: [Rails-devel] Tiles and Their Identifiers From: Erik - 2011-02-16 20:17
To create tile images and XML description, we use TileDesigner from Marco Rocci (see http://www.rails18xx.it/software.html ). This program has not been maintained for many years, and we don't have the source code, but this program is all we have to create tiles, so we have to live with its limitations and bugs. One limitation is that identifiers must be numeric.
The program comes with a tile database, containing 442 tiles, mostly tiles with IDs as defined in Blackwater Station's Tile Encyclopedia. It also contains the preprinted 1830 hexes as tiles with negative numbers. We have continued this approach when new tiles were added for other games, initially without much of a system, but more recently we have started to use a more systematic approach using large negative numbers for preprinted tiles. The total tile set now adds up to 559 tiles.
For the real (positive) tiles we follow the physical tile IDs where possible, adding 1000/2000/3000 in case of duplicate IDs (as did the original Tile Encyclopedia). The occasional alphanumeric ID has to be replaced by some number; there isn't yet a rule for that.
Since some time it is possible to display a different ("external") number than the (internal) tile ID to identify tiles textually in all Rails windows, and from the next release this external ID can be alphanumeric (see 1830 Coalfields, in progress). However, the tile images still display internal IDs only. I suppose the SVG tiles could be tweaked manually to show alphanumeric IDs well, but I haven't looked into that. (BTW the internal IDs are omitted on the preprinted tiles, TileDesigner has a seperate 'export' option for that).
Some specific points raised:
Regarding the towns and cities, this I'm sure is purely aesthetic, dits and city circles are rarely placed in the very centre of the tile on maps, they are usually off to one side, the rotation of the tile on the map helps to match the original board aesthetic.
The off-centre city (-10) and village (-1) tiles come from the original TileDesigner database, and in most cases we have used these in creating maps without particular attention to correct placement. The simplest solution would be to rotate such tiles,and/ or to replace these by the centered city (-3008) and village (-3009) tiles, that have been created for 18EU in a much later stage.
OK So how do you deal with games which have letters like AL? As the IDs are currently required to be numbers.
For such cases it was proposed to use six-digit negative numbers. But that proposal came after 18AL and 18EU had been done, and IIRC no decision has yet been taken.