Diary SiteMap RecentChanges About Contact Calendar

Search:

Matching Pages:

SVG

Last edit

Added:

> <journal search tag:svg>


Wikipedia:SVG – Scalable Vector Graphics. Images that consist of lines and shapes and text and fonts, and not pixels. They look the same, but vector graphics can be scaled effortlessly, and could potentially be rearranged without necessarily loosing any information.

I recommend InkScape to edit SVG files. Inkscape used to crash often, but these days I’m very happy with it.

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: RSS RSS RSS

Comments on 2014-01-11 mkhexgrid

Last edit

No diff available.

Add Comment

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
# start with an odd number!
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:

http://farm8.staticflickr.com/7352/9305033183_33b8bc2c37_z.jpg

My “old school hex map” style:

http://farm4.staticflickr.com/3728/9305013905_c5ca700aa5_z.jpg

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

http://farm6.staticflickr.com/5479/9307639706_3a47425285_z.jpg

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: RSS RSS RSS

Comments on 2013-07-16 Inkscape Mapping and mkhexgrid

Last edit

No diff available.

Add Comment

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:

http://farm8.staticflickr.com/7424/9153223058_dae54b6bc5_c.jpg

Subsector created using Text Mapper:

http://farm8.staticflickr.com/7437/9153222700_fc92f88abf_c.jpg

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.

Tags: RSS RSS RSS RSS

Comments on 2013-06-27 Text Mapper for Traveller

Last edit

Summary: I like the new version better (-:

Added:

> ----
> I like the new version better (-:
> -- Harald Wagener 2013-07-01 12:08 UTC



BeRKA
Nice curved routes! I like it.

BeRKA 2013-06-27 21:38 UTC


Looks gorgeous, actually.

noisms 2013-06-27 21:49 UTC



AlexSchroeder
Thanks!

AlexSchroeder 2013-06-28 07:18 UTC


I like the new version better (-:

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

Add Comment

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.

http://farm8.staticflickr.com/7311/8958141006_7000b5627c_o.png

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. :)

Tags: RSS RSS RSS RSS

Comments on 2013-06-05 Gnomeyland and Text Mapper

Last edit

Summary: Possibly. 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…

Changed:

< Possibly. 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...

to

> 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...



Andreas Gohr
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



AlexSchroeder
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

Add Comment

2013-06-05 Another Gnomeyland Example

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

http://farm8.staticflickr.com/7447/8876746436_f2598482c1_o.png

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:

http://farm6.staticflickr.com/5340/8959577095_02aed1b95f_o.png

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.

Tags: RSS RSS RSS RSS

Comments on 2013-06-05 Another Gnomeyland Example

Last edit

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

Added:

> ----
> [[gravatar:http://www.splitbrain.org Andreas Gohr:b6b4d7dbe3fb7cf61b68e36cd80f8698]]
> I agree with Jensan, a GUI Editor of some sort would be really helpful I guess.
> -- [http://www.splitbrain.org Andreas Gohr] 2013-06-06 08:54 UTC



Jensan
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



AlexSchroeder
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



AlexSchroeder
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



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

Andreas Gohr 2013-06-06 08:54 UTC

Add Comment

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:

Dangerous Forest

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: RSS RSS RSS

Comments on 2013-03-04 Text Mapper With Lines

Last edit

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

Changed:

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

to

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



Craig Peters
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



AlexSchroeder
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.

And finally, please share your maps! :)

AlexSchroeder 2014-02-15 09:56 UTC



Craig Peters
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



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

AlexSchroeder 2014-02-17 06:15 UTC

Add Comment

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:

Forgotten Depths SVG

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

Tags: RSS RSS RSS RSS

Comments on 2013-03-01 Text Mapper Progress

Last edit

Summary: 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…

Changed:

< Regarding roads and rivers: I'm discovering that Bézier curves need a bit more effort since simply doing a quadratic curveto ('T' [http://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands in the SVG spec] the hex midpoints isn't working very well.

to

> Regarding roads and rivers: I'm discovering that Bézier curves need a bit more effort since simply doing a quadratic curveto ('T' [http://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands in the SVG spec]) the hex midpoints isn't working very well.


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



AlexSchroeder
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

Add Comment

2013-02-27 SVG Filters

I need help with SVG filters. This question is also on StackOverflow.

This is what I want to achieve:

https://farm9.staticflickr.com/8507/8511938807_5a793d726a.jpg

Previously, I’d duplicate the text element, make the background white, and blur it:

  <defs>
    <filter id="label-glow">
      <feGaussianBlur stdDeviation="1" />
    </filter>
  </defs>
  <text stroke="white" stroke-width="5" filter="url(#label-glow)">Harald's Repose</text>
  <text>Harald's Repose</text>

I’m trying not to duplicate the text element. Here’s how to do it using filters:

  <defs>
    <filter id="label-glow">
      <feFlood flood-color="white"/>
      <feComposite in2="SourceGraphic" operator="in"/>
      <feGaussianBlur stdDeviation="2"/>
      <feComposite operator="over"/>
      <feComposite operator="over"/>
      <feComposite operator="over"/>
      <feComposite operator="over"/>
      <feComposite in="SourceGraphic"/>
    </filter>
  </defs>
  <text filter="url(#label-glow)">Harald's Repose</text>

Unfortunately the output of the Gaussian blur is very weak which is why I need to overlay it multiple times. What am I missing?

Update: As I’ve been experimenting with it, I’ve decided to drop filters altogether. When using Firefox and printing the map to PDF, the filters all result in bitmap elements that don’t scale well.

Tags: RSS RSS

Comments on 2013-02-27 SVG Filters

Last edit

No diff available.

Add Comment

2013-02-27 New Text Mapper Shapes

How to create new shapes for Text Mapper?

First, start with an empty SVG file:

<?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.

https://farm9.staticflickr.com/8240/8512911746_4f1c405dba_o.png

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:

Jungle Hex

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:

Green Jungle Hex

Tags: RSS RSS RSS RSS

Comments on 2013-02-27 New Text Mapper Shapes

Last edit

Summary: Thank you for the feedback. Added. :) . . .

Changed:

< <div style="width:300px">

to

> <div style="width:400px">


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

– Harald 2013-02-27 11:17 UTC



AlexSchroeder
There you go!

Oasis

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

AlexSchroeder 2013-02-27 11:29 UTC



AlexSchroeder
I’m still pondering how to do labels.

https://farm9.staticflickr.com/8507/8511938807_5a793d726a.jpg

AlexSchroeder 2013-02-27 12:01 UTC


Very nice and readable!

– Harald 2013-02-27 12:37 UTC



AlexSchroeder
Thank you for the feedback. Added. :)

Harald's Repose

AlexSchroeder 2013-02-27 14:10 UTC

Add Comment

2012-09-01 SVG Character Sheet

For a while now I’ve been using this German SVG character sheet for my Labyrinth Lord game (it uses the Purisa font):

I’ve now written a little Perl script that allows you to fill in some of these variables using parameters. (Source)

Here’s an example URL:

http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5c%5ctwo;abilities=elvish%5c%5corcish

Result:

It needs more polishing and possibly the option of selecting different character sheets.

I’ve written a text formatting rule for my Campaign Wiki that makes it easy to put your character’s stats on a web page and have it render as a SVG character sheet.

Tags: RSS RSS RSS RSS

Comments on 2012-09-01 SVG Character Sheet

Last edit

Summary: The only thing I haven't tried is embedding the entire SVG document.

Changed:

< The only thing I haven't tried is embedding the entire SVG document.

to

> Embedding the entire SVG document "works" -- the validators choke on it, however. The declaration that all style elements will be using CSS is missing, the namespace declarations on the svg tag are not allowed, and so on. It looks ok in my browser, however. :)


Do they attributes have different bonus tables? If not, why is the bonus for „Geschick“ only +1 and the bonus for „Weisheit“ +2?

Stefan 2012-09-03 06:11 UTC



AlexSchroeder
A bug that I had introduced while reshuffeling the code. Any value of 15+ resulted in a bonus of +1. :)

AlexSchroeder 2012-09-03 08:16 UTC



AlexSchroeder
The default character sheet now supports a parameter named “portrait” with the value being the URL of an image to use. Example.

Too bad this doesn’t work when displaying SVG files using an image tag as part of an XHTML document. Example.

The reason is that the img tag will only load the URL provided. It will not follow further URLs (such as the font or the embedded image). I could use data URLs and waste a lot of bandwidth, or I could use a different tag (frame or object). When I tried using other tags, however, there’s a different kind of problem: clicking on the link resulted in the script being run in special frame, still inside the original page. That’s very confusing for users.

Embedding the entire SVG document “works” – the validators choke on it, however. The declaration that all style elements will be using CSS is missing, the namespace declarations on the svg tag are not allowed, and so on. It looks ok in my browser, however. :)

AlexSchroeder 2012-12-11

Add Comment

More...

Show Google +1

EditNearLinks: InkScape