2019-10-21 Metainformation for an image

Recently, asked me whether it was possible to get from a dungeon map in Hex Describe to an editable map in Gridmapper. There wasn’t, but I liked the idea and so I started thinking about it. It should be doable in theory even though I am generating the dungeon maps using Text Mapper and all they have in common with Gridmapper maps is that they look similar.

So yesterday I started writing the code that transforms the Text Mapper data into a Gridmapper link. Once I could see it in the log output, I was happy. But what next?

I decided to add a HTTP header with that link, hoping that Hex Describe would be able to extract it, and I told J. Alan Henning that I had these instructions for him:

  1. generate map using Hex Describe
  2. use View Image to look at a dungeon map
  3. use Inspect Element to get to the development tools
  4. switch to the Network tab
  5. click the Reload button
  6. click on the new request line to see details
  7. in the Headers tab, there’s a section called Response headers
  8. in that list there’s a header called X-Link
  9. the value of that header is the Gridmapper link

It was late, I was tired, and I needed to sleep, obviously. 🙂

As the rendered image uses the SVG format, I alread had the input used in a comment at the end. Therefore, the link I just mentioned can be found right there. The X-Link code I had written was unnecessary and I removed it.

The instructions were in fact much simpler!

  1. generate map using Hex Describe
  2. use View Image to look at a dungeon map
  3. use View Page Source to look at the SVG code
  4. scroll to the end until you see the Gridmapper link

But then I realized that I could simply add the information the SVG output as a link! Within Hex Describe it’s hard to spot the link. It’s tiny:

Hex Describe output with link

If you use View Image, however, it gets bigger:

View Image

(If you click the image above, you might get taken to a different image because the seed I used is only guaranteed to work for as long as the code doesn’t change. My guess is that this won’t be stable for long!)

If you click the link in the top left corner, you’re taken to Gridmapper:

Image 3

I also need a way to add nice arrows to images using Gimp. Surely there is a better way!

Tags:

Comments

I was playing with Gridmapper the other day and was wondering about Switch Background and Toggle Floor commands. I couldn’t figure them out. Any hints?

– Ruprecht 2019-10-30 19:02 UTC


The Switch Background command (capital Z) toggles between various background options:

  • grey background (the default)
  • black background
  • white background
  • white background with grid
  • blue

The Toggle Floor command (hold Alt and use the arrow keys to move around) simply toggles the floor on or off. In other words, it’s the equivalent of pressing f and and arrow key repeatedly – it’s simply faster.

– Alex Schroeder 2019-10-30 22:46 UTC


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.