Transitions are the tiles used to transition (duh) from one terrain type to another, for example grass to sand. As the users of mapgen2 have most likely noticed all of the terrain types don't have transitions even though the graphics would be available. Lack of transitions for certain terrain types results in buggy tiles which have to be repaired manually thus adding more work to the already overwhelming practice.
I began studying transitions a few days ago and noticed that their working mechanism is pretty simple and surely known to some of you. Regardless I didn't notice a topic like this or other transitions being shared than the ones for beach.
The following is a very basic transition "Grass to Forest" and can be found in the data/transitions folder of mapgen2. The files are .xml and I recommend using notepad or a similar program for viewing them.
<Trans Name="SANB" HashKey="404040303030303030" >
<Terrain>
<Tile ID="200" AltIDMod="0" Weight="1"/>
<Tile ID="201" AltIDMod="0" Weight="1"/>
</Terrain>
</Trans>
Trans name: self-explanatory, I haven't noticed that this would affect actual results on the map.
Hashkey: This is the soul of the transition. Every two digits/symbols represent a type of terrain on the map, these types are then used to define which kind of tile would fit in the spot.
The hashkey in the example has forest and grass type terrains; 40 representing forest and 30 of the grass. The hashkey is read from left to right, filling 3 rows with 3 sets of figures.
N
404040
W 303030 E
303030
S
That is how the hashkey would look if laid on a map, the middle tile being the one to be transitioned. So in actual graphics we would see a tile with grass on the south end and forest on the north end appearing at such a spot. The different hashes (2-digit figures/symbols) can be found from terrain.xml in the data folder.
Tile ID (terrain): Just what it sounds like, the identifier for the graphics to be filled in the middle tile. These are LANDTILES, you can check them out with a program like Uofiddler for example.
AltIDMod (terrain): Altitude for the landtiles to be created at.
Weight: When using several tiles the chance for a certain tile to occur, these are added so in the example it's 50% chance for each of the tiles to appear.
There is also Tile ID for art which is pretty much any item in the game. Art tiles allow one to create an extra tile - this is useful because one can't have more than one landtile in one tile. Art tiles in transitions are mainly encountered with coastal transitions, creating water over the brownish landtiles underneath. AltIDMod applies to art tiles in the same way it applies to landtiles.
Basically creating transitions is quite an easy task, especially if you trust the numerous examples in the data folder. Now this has been made even easier.. I requested a player with coding experience to create this simple program to ease our burden. I managed to create jungle embankment to jungle -transitions in less than 30 minutes.
http://jesuz.no-ip.org/bone/files/Mapge ... placer.zip
The tool is less than 24 hours old and will probably receive some more refining but even though the community isn't too active I felt like the prototype should be out there as soon as possible. It is very easy to use, one just pastes the transition file of such type that he wants to modify into something else into the program and inserts which old values will be changed into new.
Basically if you want to do transitions for snow embankment for example you just look up forest embankment in the data and fill in the spots with hashes of snow and snow embankment. Then just do the same for graphics (you'll have to use UoFiddler or something to figure out which are to be replaced with what). Save your transition as .xml to the transitions folder, generate your map and laugh at how easy it all was.
I hope that the transitions spawned by this topic and the tool would be given for the community to use - sharing information helps us to keep this "subculture" alive.
Any comments and added information to the topic is more than welcome.
~Bonethor of the Northern Winds shard.