2014-01-11 mkhexgrid

My Old School Hex Map Tutorial tells people to use mkhexgrid, if they can. It’s what I’ve been doing for years, now.

On my wife’s laptop we now run Mac 10.9 (“Maverick”) and it no longer builds. As I’ve switched to using Homebrew, I recided to write my own Formula.

If you want to try it, save it as /usr/local/Library/Formula/mkhexgrid.rb and run brew install mkhexgrid. The only tricky thing is that it requires the GD library to be built with FreeType, apparently. If you don’t have GD installed, great. This Formula will do the right thing. If not, you might have to brew uninstall gd before proceeding.

require 'formula'

class Mkhexgrid < Formula
homepage 'http://www.nomic.net/~uckelman/mkhexgrid/'
url 'http://www.nomic.net/~uckelman/mkhexgrid/releases/mkhexgrid-0.1.1.src.tar.bz2'
sha1 '3b8e0be3636f90a3217a5e3556bdaf7bb0c49116'

depends_on 'gd' => %w{with-freetype}

def install
inreplace 'Makefile' do |s|
s.change_make_var! "DESTDIR", prefix
s.change_make_var! "CC", ENV.cc
s.gsub! /install (.*) -o 0 -g 0/, 'install \1'
end
inreplace 'mkhexgrid.cpp' do |s|
s.sub! 'catch (exception &e)', 'catch (std::exception &e)'
end
system "make" # needs to be separate
system "make", "install"
end

test do
# test the example from the man page (but without inches)
system "mkhexgrid", "--output=ps", "--image-width=2448",
"--image-height=1584", "--hex-side=36", "--coord-bearing=0",
"--coord-dist=22", "--coord-size=8", "--grid-thickness=1",
"--coord-font=Helvetica", "--grid-grain=h", "--grid-start=o",
"--coord-tilt=-90", "--centered", "-o", "test.ps"
end
end

Tags:

2013-07-16 Inkscape Mapping and mkhexgrid

Today I needed to add the island of Tirnanog to my campaign map using Inkscape. In order to do that, I needed to add more hexes in the background—I needed to “grow the ocean”. I looked at my Old School Hex Map Tutorial and figured I must have used the Inkscape Boardgames Extension. When I checked, however, I was unable to find the menu. Perhaps Inkscape has changed and it needs to be reinstalled? I decided to give mkhexgrid another try. Fiddling with the spec file for a bit, I determined that these were the correct settings:

output=svg
outfile=hex-layer.svg
hex-side=45pt
rows=17
columns=14
grid-color=7a7a7a
coord-color=008080
coord-size=10pt
coord-distance=28pt
coord-column-start=37
coord-row-start=01

By now the map is so big, redoing it for Hexographer or Text Mapper seems like a lot of work. When I see the efforts required to update this map in a sluggish Inkscape on a 1024×768 monitor, however, it seems like a lot of work as well.

Update: I actually wanted to see how much time it took to get a decent result using Text Mapper and compare it with my old style, based on the Old School Hex Map Tutorial I wrote.

I don’t know. I like the colors of the Gnomeyland icons. Check out Map Symbols: Trees & Forests on Old Russian Maps by John Krygier for some source material. But really – is it much better? Is it much faster? I don’t think so.

Original, from the Wilderlands of High Fantasy box:

My “old school hex map” style:

Text Mapper, using the Gnomeyland icons by Gregory B. MacKenzie (CC BY SA):

For the curious, here is the source for Text Mapper:

3901 water
3902 water
3903 water
3904 water
3905 water island
3906 water
3907 water
3908 water
4001 water
4002 water
4003 water
4004 water
4005 water
4006 water
4007 water island
4008 water
4101 water
4102 water
4103 water
4104 water
4105 water
4106 water
4107 water island "Andaman Isles"
4108 water
4201 water
4202 water
4203 water
4204 soil tower "Marechal"
4205 dark-green forest
4206 water islands
4207 water islands
4208 water
4301 water
4302 water
4303 water
4304 light-grey hill
4305 light-grey mountain
4306 light-grey
4307 water
4308 water
4401 water
4402 water
4403 light-grey hill
4404 grey mountain "Needles Peak"
4405 light-grey hill
4406 water
4407 water
4408 water
4501 water
4502 dark-green forest
4503 light-grey hill
4504 green forest-hill
4505 soil tower "Lanka"
4506 water
4507 water
4508 water
4601 water
4602 soil tower "Calfat"
4603 soil lake keep "Kailasa"
4604 light-grey hill
4605 water
4606 water
4607 water
4608 water
4701 water
4702 light-grey
4703 light-grey hill
4704 soil tower "Heratus"
4705 dark-green forest
4706 water
4707 water
4708 water
4801 water "Windward Peninsula"
4802 soil keep "Dalmaric"
4803 soil keep "Talimanor"
4804 dark-green forest "Pardolock Jungle"
4805 water
4806 water
4807 water
4808 water
4901 water
4902 water island
4903 water
4904 water
4905 water island
4906 water
4907 water
4908 water
5001 water
5002 water
5003 water
5004 water
5005 water
5006 water
5007 water
5008 water
lake xml <circle cx="0" cy="0" r="50" fill="#6ebae7" stroke="black" stroke-width="3"/>
island xml <circle cx="10" cy="10" r="25" fill="#dcddbe" stroke="black" stroke-width="3"/>
islands xml <circle cx="-20" cy="20" r="20" fill="#dcddbe" stroke="black" stroke-width="3"/><circle cx="20" cy="-20" r="15" fill="#dcddbe" stroke="black" stroke-width="3"/>
include http://alexschroeder.ch/contrib/gnomeyland.txt

4603-4903 fjord
4602-4902 fjord
fjord path attributes stroke="#6ebae7" stroke-width="20" fill-opacity="0" stroke-linecap="round"

other <text stroke="white" stroke-width="10px" font-size="50pt" x="6300" y="550" transform="rotate(330 6300,550)">Tirnanog Isle</text><text font-size="50pt" x="6300" y="550" transform="rotate(330 6300,550)">Tirnanog Isle</text>

Tags:

2013-06-27 Text Mapper for Traveller

A few years ago I was working on Traveller Subsector Mapper. As I was thinking about the new Text Mapper, I wondered how feasible it would be to generate a Traveller subsector using Text Mapper. I know, it’s a stupid waste of time because I already have the Traveller Subsector Mapper. But I couldn’t resist the lure of showing off how flexible Text Mapper could be. And it works!

Subsector created using Traveller Subsector Mapper:

Subsector created using Text Mapper:

In order to reproduce it, use the following input:

include http://alexschroeder.ch/contrib/traveller-example.txt

The example file traveller-example.txt uses the library traveller.txt defining everything it requires.

Comments on 2013-06-27 Text Mapper for Traveller

Nice curved routes! I like it.

BeRKA 2013-06-27 21:38 UTC

Looks gorgeous, actually.

noisms 2013-06-27 21:49 UTC

Thanks!

AlexSchroeder 2013-06-28 07:18 UTC

I like the new version better

– Harald Wagener 2013-07-01 12:08 UTC

2013-06-05 Gnomeyland and Text Mapper

When I wrote my Old School Hex Map Tutorial, I noticed the Gnomeyland Map Icons and the Making Hex Maps With Inkscape tutorial by Gregory B. MacKenzie.

After a futile attempt to write a tool that would extract those icons automatically and make them usable for Text Mapper, I did the work by hand. Look at the example below… Beautiful! And since this is SVG, you can quickly generate your first map and later you can keep working on it using Inkscape.

To regenerate the map above, visit Text Mapper and use the following “map”:

include http://alexschroeder.ch/contrib/gnomeyland-example.txt

This loads the Gnomeyland example map which uses the Gnomeyland library.

The Gnomeyland example map uses the tiles from the library. Here’s what you would need to generate just the lower part of the map:

include http://alexschroeder.ch/contrib/gnomeyland.txt
0005-0806 trail
0105 dark-green fir-forest "to the caves"
0106 dark-green fir-forest
0205 green fir-forest
0206 green fir-forest
0305 green firs
0306 soil keep "The Keep"
0405 light-soil
0406 light-soil
0505 light-grey mountains
0506 light-green forest-hill
0605 grey grass
0606 grey marsh
0706 dark-grey swamp
0806 dark-grey castle "Dolorous Garde"

Just paste it into Text Mapper.

Comments on 2013-06-05 Gnomeyland and Text Mapper

I wonder if it wouldn’t look a bit better if the trail were drawn below the icons.

Andreas Gohr 2013-06-05 14:06 UTC

Hm… I remember moving it behind the text labels, but you’re right, it would make sense to draw hex backgrounds first, then trails, then trails, then things within the hex and finally the text labels…

AlexSchroeder 2013-06-05 14:50 UTC

2013-06-05 Another Gnomeyland Example

I wanted to test the recently added Gnomeyland icons for Text Mapper and looked at the following map:

This is the text description I came up with:

include http://alexschroeder.ch/contrib/gnomeyland.txt
0101 water
0102 water
0103 water
0104 water
0105 water
0106 water
0201 water
0202 dark-grey marsh
0203 dark-grey marsh
0204 water
0205 water
0206 water
0301 water
cave xml <line x1="30" y1="45" x2="130" y2="45" stroke="#6ebae7" stroke-width="20" stroke-linecap="round"/><path d="M 30,45 c 0,-20 -20,-20 -20,0 c 2,0 3,0 20,0 z" stroke="black" stroke-width="2"/>
0303 dark-grey tower cave "Portal"
0304 grey grass
0305 grey mountain
0306 water
0401 water
0402 grey trees
0403 water
0404 water
0405 water
0406 water
0501 water
0502 light-green tree "Silberbäume"
0503 soil
0504 water
0505 dark-grey forest-hill
0506 water
0601 water
0602 green forest
0603 green forest "Faule Wald"
0604 green forest
0605 dark-grey trees
0606 water
0701 water
0702 water
0703 dark-grey forest-mountains "Einhorn"
0704 dark-grey forest-mountains
0705 water
0706 water
0801 water
0802 water
0803 water
0804 water
0805 water
0806 water
lake xml <circle cx="45" cy="75" r="30" fill="#6ebae7" stroke="black" stroke-width="3"/>
0302 dark-grey forest  lake "See"

Note some tricks:

1. the “cave” is defined right then and there, not in a library, and it includes a little water connection to the central bay
2. hex 0302 with the lake comes at the end such that the neighboring hexes don’t overwrite the overflow

Result:

I could work on this some more, or I could just take it, import it into Inkscape, and keep working on it.

The big question is: how much easier is it to work with a text description of a map compared to fiddling with Inkscape directly? As I create new maps, I’m no longer sure this map generator is all that useful, to be honest.

Comments on 2013-06-05 Another Gnomeyland Example

I think it could useful as a kind of intermediate language (like MSIL). For instance, you could make a front-end (GUI or website) that lets you tweak some basic things easily (number of roads, cities, amount of water, etc.), and with a push on “Generate”, the front-end then spits out Text Mapper “source code” and feeds it to the back-end, producing the final SVG.

Jensan 2013-06-05 17:31 UTC

Hm, good point. Perhaps somebody could write a random map generator without having to implement the map drawing aspect.

AlexSchroeder 2013-06-05 20:24 UTC

I like the text mapper. I would rather write the textual description than trying to do this in inkscape. At your level of artistic talent, maybe it’s not that useful …

Harald 2013-06-05 20:33 UTC

Well, even for people not into the artistic aspect of it could get by reasonably, I assume, by opening the Gnomeyland template, for example, and using copy and paste. I haven’t tried it, however. Something to consider.

AlexSchroeder 2013-06-05 21:09 UTC

I agree with Jensan, a GUI Editor of some sort would be really helpful I guess.

Andreas Gohr 2013-06-06 08:54 UTC

2013-03-04 Text Mapper With Lines

SVG Mapper now knows how to draw lines. These lines try to flow from hex to hex…

Example input:

2114 hill
2115 hill
2213 forest
2214 forest "Delan"
2215 hill
2314 forest
2315 forest
2414 hill "Forest Bight Fortress"
2415 forest
2515 forest "Boghra Little"

2214-2615 river
river path attributes fill-opacity="0" stroke="black" stroke-width="5"

include http://alexschroeder.ch/contrib/default.txt✎

Result:

I think that I’m not quite understanding how the viewBox is supposed to work. But anyway: these lines can be used for roads, rivers, borders, cliffs, and the like. If they’re very straight, they don’t look too good. There’s no random waviness. One feature I definitely have to add is providing more intermediary points such that the user can guide rivers around the hills or to allow rivers to merge.

Tags:

Comments on 2013-03-04 Text Mapper With Lines

Hello there. My first time posting. Really hoping you respond. I have been playing with textmapper, learning about SVG, and trying to take it farther on my own. Things would be going much better if I was a computer programmer instead of a chemist. The Viewbox thing has been annoying for me as I have used your website to make ever more complex maps. If I could figure out how to run it locally I would, a big plus would be adding my own content to defaults.txt.

In the above image I THINK you are trying to assign the upper left and lower right corners as it shows here viewBox=“2990 2028 3910 2784”> But what you should be doing is assigning the upper left corner and then the width and height viewBox=“2990 2028 920 756”>. There is still something going on with my bigger maps but they are fully on screen when manually edited this way.

On a related note, in http://alexschroeder.ch/contrib/black-and-white.txt the default attributes are fill=”#ffffff” stroke=“black” stroke-width=“3” That fill attribute causes all the hexes to be blank unless I set the fill-opacity=0.0 with manual editing. I think it should be fill=“none”.

Yeah I really need to get this to work locally, so many possibilities.

– Craig Peters 2014-02-15 02:50 UTC

Wow, this is great! Regarding a local installation. What sort of computer do you have? All you really need is Apache and Perl. If you have a Mac, these come already installed. If you have a GNU/Linux system, you just need to install Apache. If you use Windows, there’s always WAMP.

If you can’t get Apache installed but you have Perl, then you can also run the command from the command-line. It’s somewhat awkward, but if that’s how you’d prefer to use it, usability can always be improved.

Here’s what I did. First I created a file in /tmp/map.txt containing the following

0308 jungle "Affeninsel"
include http://alexschroeder.ch/contrib/default.txt

Then I ran the command as follows:

perl text-mapper.pl map=include+file:///tmp/map.txt | tail -n +5 > map.svg

The map just needs to get an escaped URL – replace spaces with + and you should be good to go if all you do is use a simple include statement. The next problem is that you need to provide a local file URL. Instead of starting the URL with http:// you start it with file:// and then you add the file name. The script output contains some HTTP headers which you need to get rid of. I used the tail program, but you could just as well save the output and remove those extra lines manually:

perl text-mapper.pl map=include+file:///tmp/map.txt > map.svg

If those file URLs are giving your problems, try using your browser to “open” these files and copy the URL from the address bar.

If you’re mostly interested in providing a different default library, then all you need to do is find a site that will allow you to host text files. Perhaps a Gist on GitHub would work for you?

Example Gist:

Viewed as a raw text file (the link will be shown when viewing your Gist):

Or, if you decide to work locally as seen above, then your libraries can also use file URLs.

As for your two bug reports: Both confirmed, fixed, and installed. Thank you very much! The viewBox issue bugged me in the past until I decided that I was no longer going to waste time looking at it. I must have gotten confused because I was computing the two corners, and then width and height, and then ignoring them and using the two corners instead.

AlexSchroeder 2014-02-15 09:56 UTC

Wow, that was fast. Thank you so much. I will try the offline thing once I load Apache and have some free hours. In the meantime here is the first of soon to be 5 maps to be used in a kingmaker D&D campaign. You have said elsewhere on this site that entering text to make a map may not be worth the trouble. I agree, but it is good for editing once you have had a look at the final map. Thats why I’m use excel to input one letter keycodes (like your oldschool mapper) that then make the HTTP using concatenate.

http://tinyurl.com/ke5ay9h in black and white http://tinyurl.com/lhfryo3 in color

I’ll need to attend to ocean/sea/rivers in black and white and must not set hatched hexes to white, but its a good start. Wish me luck.

– Craig Peters 2014-02-17 04:47 UTC

Good luck! I like the black & white map. It has a certain lightness to it.

AlexSchroeder 2014-02-17 06:15 UTC

2013-03-01 Text Mapper Progress

I’m a big fan of the Forgotten Depths. I wanted to use its map as the goal for my Text Mapper. As the mapper now allows the inclusion of other files, I’ve saved my library of colors and icons as default.txt and I’ve saved the map as forgotten-depths.txt. That’s why all you need to do now is include the map:

If you see white hexes, then I haven’t added any definitions for them, yet.

Comments on 2013-03-01 Text Mapper Progress

Wow, this looks great! I think I’ll need to re-map parts of the Mystara campaign … I may have some time on Sunday.

– Harald 2013-03-01 10:56 UTC

Too bad creating new icons takes so damn long. Also, two line labels would be nice. And big, diagonal labels to label areas. “Mirkwood” or something like it. Nice coastlines, roads, rivers…

Regarding roads and rivers: I’m discovering that Bézier curves need a bit more effort since simply doing a quadratic curveto (’T’ in the SVG spec) the hex midpoints isn’t working very well. I will need to rediscover my trigonometry basics!

AlexSchroeder 2013-03-01 12:00 UTC

2013-02-27 New Text Mapper Shapes

How to create new shapes for Text Mapper?

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
height="200px"
width="200px">
</svg>

I like to draw stuff using the calligraphy tool (c). I usually simplify the nodes a lot (Ctrl+L), unify the shapes (Ctrl++), edit the nodes by hand (n) until you’re happy with the fewest number of nodes you can manage.

Now move the entire shape such that it is centered on the top left corner. This is (0,0) as far as SVG is concerned. Save it.

Look at the SVG file and notice something like this:

    <path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 7.647323,-20.341905 c -5.784973,-11.791839
-36.204242,-5.139394 -43.951039,7.112364 8.922877,-5.977096
34.793258,-11.641806 37.046343,-5.498373 -17.505656,0.485788
-29.019956,5.940662 -33.027811,23.8472764 C
-21.859546,-12.603312 -7.5022983,-14.191144 2.47485,-12.984161
-8.2112223,6.06712 -19.987316,13.477858 -15.788864,50.225619 c
3.988368,3.362713 8.6116517,-5.097214 4.510279,-7.531518
-0.559084,-6.64895 -0.875559,-13.360661 -0.08632,-20.004922 C
-9.6892813,9.718021 1.072969,-6.510207 8.835372,-12.256094
26.823805,-7.758432 35.550312,0.1756144 34.450001,15.351883
44.387089,3.7916614 29.882349,-11.701263 14.406587,-15.219388
28.287217,-15.939127 40.549839,-6.589098 45.412784,1.4541824
47.026796,-8.361333 28.866764,-19.205208 16.79733,-20.277164 c
10.765708,-6.95198 25.316253,-3.074379 29.792108,3.226712
-4.893545,-14.115874 -36.158133,-10.60357 -38.942114,-3.291453
z"
id="path3007"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccc" />

You can already extract this path and use it! Usually it takes several attempts to get the placement right. Once I’m happy, I turn all these floating point numbers into integers in order to save space. Personally, I use Emacs to do it (EmacsWiki:RoundFloatingPoints).

This is what I want:

m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13
-8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7
9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20
c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z

Example input:

0202 jungle
jungle attributes fill="white" stroke="#b3b3ff" stroke-width="3"
jungle path m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z

Output:

Example input:

0101 jungle
jungle attributes fill="#9acd32" stroke="black" stroke-width="3"
jungle path attributes fill="#228b22"
jungle path m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z
text font-size="20pt" dy="15px"

Output:

Comments on 2013-02-27 New Text Mapper Shapes

Not enough trees for a jungle (-: At a watering hole and you have a decent oasis …

– Harald 2013-02-27 11:17 UTC

There you go!

I think I like how easy it turns out to be.

AlexSchroeder 2013-02-27 11:29 UTC

I’m still pondering how to do labels.

AlexSchroeder 2013-02-27 12:01 UTC

– Harald 2013-02-27 12:37 UTC

Thank you for the feedback. Added. 😊

AlexSchroeder 2013-02-27 14:10 UTC

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.

# map definition
0101 mountain
0102 mountain
0103 hill
0104 forest
0201 mountain
0202 hill
0203 coast
0204 empty
0301 mountain
0302 mountain
0303 plain
0304 sea
0401 hill
0402 sand
0403 forest

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.

# attributes
empty attributes fill="#ffffff" stroke="black" stroke-width="3"
plain attributes fill="#7cfc00" stroke="black" stroke-width="3"
forest attributes fill="#228b22" stroke="black" stroke-width="3"
hill attributes fill="#daa520" stroke="black" stroke-width="3"
mountain attributes fill="#708090" stroke="black" stroke-width="3"
sand attributes fill="#eedd82" stroke="black" stroke-width="3"
coast attributes fill="#7fffd4" stroke="black" stroke-width="3"
sea attributes fill="#4169e1" stroke="black" stroke-width="3"

Icons

In order to add little icons, you can specify a path per terrain.

hill path M -42,11 C -38,5 -34,0 -28,-3 C -20,-6 -11,-5 -5,-0 C -2,2 1,6 3,9 C 4,12 2,13 0,14 C -3,9 -7,5 -13,2 C -21,-1 -30,0 -36,6 C -38,9 -40,11 -43,14 C -43,15 -44,14 -44,13 C -43,12 -43,12 -42,11 z M -5,-0 C 0,-6 7,-12 15,-16 C 21,-18 28,-17 33,-14 C 39,-11 41,-5 43,-0 C 42,2 41,5 39,2 C 37,-2 33,-8 27,-10 C 20,-13 12,-12 6,-7 C 2,-4 -1,-1 -4,1 C -7,4 -6,0 -5,-0 z

plain path M -18,-13 C -13,-6 -13,4 -8,12 C -11,14 -15,21 -18,26 C -20,17 -22,4 -28,0 C -26,-4 -21,-9 -18,-13 z M 5,-31 C 4,-19 3,-6 6,5 C 1,10 -0,14 -3,19 C -2,6 -3,-4 -4,-16 C -4,-21 2,-26 5,-31 z M 26,-1 C 16,6 19,5 9,18 C 12,3 21,-8 34,-17 C 32,-12 29,-6 27,-1 z

If you don’t want this path to be black, you need to specify attributes for the path element.

plain path attributes fill="#76ee00"
hill path attributes fill="#b8860b"

And finally, the coordinates are simple text elements.

text font-size="20pt" dy="15px"

If you wanted a black and white map, for example, you could use different strokes…

empty attributes fill="white" stroke="#b3b3ff" stroke-width="3"
mountain attributes fill="white" stroke="#b3b3ff" stroke-width="3"
hill attributes fill="white" stroke="#b3b3ff" stroke-width="3"
forest attributes fill="white" stroke="#b3b3ff" stroke-width="3"

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:

(Also on GitHub.)

2012-11-28 Mapping using Inkscape

I recently decided to “publish” my high level module Caverns of Slime. To the right, you can see the various stages my map went through. And you can see that the entire process started out with map. The map was the backbone of all subsequent activities.

It all started with the first map at the top. Things that made it from the very first draft to the very end:

1. the ring like structure with a water flow leading to the Ooze Lord in the center
2. the lab of one of my former player characters, Gar
3. Shroom Lord (I wanted some continuity with the level above)
4. orcs on landsharks throwing bottles of green slime
5. Prison of Dis
6. Aranea city
7. Eternal Swamps
8. ghouls

Things that got lost:

1. were rats (boring unless transformed in interesting ways)
2. poison flowers (what’s interesting about poison flowers? the Eternal Swamps ended up being not so evil…)
3. sauro-eels (but giant eels remained)
4. “sulfur levels of clockhouse wheels” – a kind of evil Clockwork Nirvana of Mechanus (the evil fusion of men and machine reappeared in the Fortress Dam of Ix)
5. refugees of the fungus forest (the level above didn’t seem to have any refugees)
6. rock giant with moss (I feel that giants don’t fit thematically)

Also note how I abandoned my detailed isometric map in step two. As I drew it, I kept dreading the moment where I’d have to key it and I kept thinking that at higher levels, the party would be flying, teleporting, gating, or pass walling anyway.

As for the final map: I just drew it all using Inkscape. I wanted to write more about it, but in the end, all I did was draw lines, using a lot of Ctrl+L to simplify the paths and then editing the nodes using F2 to make it look better. Every section was on a different layer so that I could lock the rest. The most important decision was to work on paper for the longest time.

Comments on 2012-11-28 Mapping using Inkscape

I do most of my maps in Inkscape, sometimes by first sketching them out, but often just playing about with it.

Simon Forster 2012-11-28 11:46 UTC

So you’re saying that you don’t doodle on paper before you turn to Inkscape? I only remember a few maps that I did in Inkscape directly: those were maps I did for Fight On! where the author of the adventure had already provided the doodle—such as this one:

AlexSchroeder 2012-11-28 13:50 UTC