2013-02-26 Text Mapper
Recently I wanted to create a little hex map and I wanted to do it on an iPad, I wanted to eventually integrate it into my campaign wiki, I wanted it to be SVG based, and so on. All that meant, Hexographer wasn’t the appropriate tool. I needed to cook something up myself. Based on code I wrote nearly five years ago—the Old School Hex Mapper—I wrote up a little something.
I’m calling it the Text Mapper because it takes text input. No interactive fiddling with the map.
There are various sections of the input.
Map
This is simple. Coordinates, terrain.
The rest of the input determines how things look: what colors to use, what icons to display. When you start the Text Mapper, the input area already contains an example. Start with that before doing anything else.
Terrain attributes
Now it gets tricky. For every terrain we used, the script will generate a hex. We need to provide some SVG attributes! Need documentation? Check out the polygon in the SVG specification and click on *show* next to *presentation attributes*. That’s what you should be looking at.
polygon in the SVG specification
Icons
In order to add little icons, you can specify a *path* per terrain.
If you don’t want this path to be black, you need to specify attributes for the path element.
And finally, the coordinates are simple text elements.
If you wanted a black and white map, for example, you could use different strokes...
If you want to create new path elements yourself in Inkscape, you should draw them in a rectangle from (-100,-100) to (100,100) and extract the the path info from the SVG. Yeah, adding new icons isn’t easy.
I need to add more icons. I’d also like to add multiple icons for the same terrain such that the code will pick one at random.
I wonder how easy it’s be to add text labels, roads, rivers and borders. 😄
The result of the above:
01.01 01.02 01.03 01.04 02.01 02.02 02.03 02.04 03.01 03.02 03.03 03.04 04.01 04.02 04.03
#RPG #Hex #Maps #Software #Text Mapper