Creating new boards for HeroScribe

Designing boards for HeroScribe might seem hard, but with the following walkthrough and some luck you will manage it. It basically takes three editing steps:
  • Vector's: HeroScribe/Icons/Vector/Europe/Board_EU.eps.gz and HeroScribe/Icons/Vector/USA/Board_US.eps.gz
  • Objects.xml's: HeroScribe/Objects.xml
  • Raster's: HeroScribe/Icons/Raster/Europe/Board_EU.png and HeroScribe/Icons/Raster/USA/Board_US.png
That will do it if your board doesn't feature complex objects; otherwise, you will need to give a look at more complex drawing functions.

Vector editing

Vector information for the basic HeroQuest board is stored inside HeroScribe/Icons/Vector/Europe/Board_EU.eps.gz and HeroScribe/Icons/Vector/USA/Board_US.eps.gz, in .eps files compressed in a .gzip archive (we suggest 7-Zip to manage such files); these .eps files include PostScript info that will be converted in .eps or .pdf by Ghostscript, within HeroScribe. Extract Board_EU.eps from the .gzip file, then open it with NotePad++, or TextEdit.

In order to create a new board for HeroScribe you will need to get used to the code used in PostScript; these boards are usually simple to draw, but it could seem hard to understand how this process works: it is not, actually, but it needs some practice. We will not be focusing on every detail here, as we just want to easily create a new board for HeroScribe; so the essential sections we will look into are the following:

While working on your board, you may want to see how it looks like after your edits: if that is your case, save Board_EU.eps inside Notepad++ / TextEdit then drag it into Board_EU.eps.gz, overwriting the original one; now open HeroScribe and export a blank quest as .pdf. Give it a look to see how your map is coming up.

Once the European version of your board is ready, head to the Objects.xml editing Section to complete your board creation. We will now have a full look at the HeroQuest board .eps files; the most interesting parts are colored as such:

  • blue: differences between European and North-American map layouts
  • red: drawing functions we should not care about
  • green: vital info we (may) need to modify
To deepen such colored parts, hover your mouse on them and carefully read their explanations. Here we go, please do not panic:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 538 404
%%HiResBoundingBox: 0 0 537.6 403.2
%%LanguageLevel: 2

% Made with/for HeroScribe
% The board layout is (C) Milton Bradley Company
% This eps file is (C) 2003-2014 Flavio and Valerio Chierichetti


%/adjacentBoardsOffset offset def
/x 26 def
/y 19 def

/Unit { 19.2 mul } def
/Border 0.15 def

/RoomStroke 1.3 def
/GridStroke 0.1 def


/BorderRGB { 0 0 0 } def
% European version only, BEGINNING
/DarkRGB { 0.8 0.8 0.8 } def
/CorridorRGB { 1 1 1 } def
% European version only, END
% North-American version only, BEGINNING
/DarkRGB { 0.7 0.7 0.7 } def
/CorridorRGB { 0.9 0.9 0.9 } def
/TrapRGB { 0.976 0.486 0.200 } def

% North-American version only, END

/BoundingBox {
Blank% Width, Height

Blankexch
Blankdup
Blank1 sub adjacentBoardsOffset mul
Blankexch
Blankx 2 add mul
Blankadd Unit

Blankexch
Blankdup
Blank1 sub adjacentBoardsOffset mul
Blankexch
Blanky 2 add mul
Blankadd Unit

Blank2 array astore

Blank<< /PageSize 2 index
Blank>> setpagedevice

Blankpop

%BlankGhostscript only
%Blankmark /MediaBox [ 0 0 x 2 add Unit y 2 add Unit ] /PAGE pdfmark
%Blankmark /CropBox [ 0 0 x 2 add Unit y 2 add Unit ] /PAGE pdfmark
} def

/horizontalline {
Blank0 rlineto stroke
} def

/verticalline {
Blank0 exch rlineto stroke
} def

/HorizontalLineTo {
Blank% length > 0

Blankcurrentlinewidth exch currentpoint

Blank% lw length x y

Blankcurrentlinewidth 2 div sub exch

Blank% lw length (y - lw / 2) x

Blankcurrentlinewidth 2 div sub exch

Blank% lw length (x - lw / 2) (y - lw / 2)

Blank2 index currentlinewidth add
Blankcurrentlinewidth

Blank% lw length (x - lw / 2) (y - lw / 2) (length + lw) lw

Blank0 setlinewidth
Blankrectfill

Blankpop

Blanksetlinewidth

Blank% [empty]
} def

/VerticalLineTo {
Blank% length > 0

Blankcurrentlinewidth exch currentpoint

Blank% lw length x y

Blankcurrentlinewidth 2 div sub exch

Blank% lw length (y - lw / 2) x

Blankcurrentlinewidth 2 div sub exch

Blank% lw length (x - lw / 2) (y - lw / 2)

Blank2 index currentlinewidth add
Blankcurrentlinewidth

Blankexch

Blank% lw length (x - lw / 2) (y - lw / 2) lw (length + lw)

Blank0 setlinewidth
Blankrectfill

Blankpop

Blanksetlinewidth

Blank% [empty]
} def

Blank% eventual, more complex functions

/RectStroke {
Blank% xs ys width height

Blank3 index 3 index moveto
Blank1 index HorizontalLineTo

Blank3 index 3 index moveto
Blank0 index VerticalLineTo

Blank3 index
Blank3 index 2 index add
Blankmoveto
Blank1 index HorizontalLineTo

Blank3 index 2 index add
Blank3 index
Blankmoveto
Blank0 index VerticalLineTo

Blank% xs ys width height

Blankpop pop pop pop

} def

/Grid {
Blankgsave
Blank1 Unit 1 Unit translate

BlankBorderRGB setrgbcolor
Blank0 setlinejoin

BlankGridStroke setlinewidth

Blank0 1 x 1 sub {
Blankgsave
BlankUnit 0 translate

Blank0 0 moveto
Blanky Unit verticalline


Blank2 1 10 {
BlankBlankgsave
BlankBlank12 div Unit 0 translate

BlankBlank0 0 moveto
BlankBlank-1 Border mul Unit verticalline

BlankBlank0 y Unit moveto
BlankBlankBorder Unit verticalline


BlankBlankgrestore
Blank} for

BlankgrestoreBlank
Blank} for

Blank0 1 y 1 sub {
Blankgsave
BlankUnit 0 exch translate

Blank0 0 moveto
Blankx Unit horizontalline


Blank2 1 10 {
BlankBlankgsave
BlankBlank12 div Unit 0 exch translate

BlankBlank0 0 moveto
BlankBlank-1 Border mul Unit horizontalline

BlankBlankx Unit 0 moveto
BlankBlankBorder Unit horizontalline


BlankBlankgrestore
Blank} for

BlankgrestoreBlank
Blank} for

Blank% eventual corridor, dark and grid areas that are more complex

Blank0 0
Blankx Unit
Blanky Unit
Blank% Use RectStroke (the function previously defined) instead of ``rectstroke''
Blank% for using PDFs of this file as converted by ghostscript with Illustrator
Blankrectstroke

Blank0 Border sub Unit
Blank0 Border sub Unit
Blank2 Border mul x add Unit
Blank2 Border mul y add Unit
Blankrectstroke

BlankRoomStroke setlinewidth

Blank% Central Room
Blank10 Unit 7 Unit 6 Unit 5 Unit rectstroke

Blank% Lower-Left Rooms
Blank1 Unit 1 Unit 8 Unit 8 Unit rectstroke
Blank9 Unit 1 Unit 3 Unit 5 Unit rectstroke
Blank5 Unit 1 Unit 4 Unit 5 Unit rectstroke
Blank1 Unit 5 Unit 4 Unit 4 Unit rectstroke
Blank5 Unit 6 Unit 2 Unit 3 Unit rectstroke

Blank% Upper-Left Rooms
Blank1 Unit 10 Unit 8 Unit 8 Unit rectstroke
Blank1 Unit 10 Unit 4 Unit 8 Unit rectstroke
Blank1 Unit 15 Unit 8 Unit 3 Unit rectstroke
Blank9 Unit 13 Unit 3 Unit 5 Unit rectstroke

Blank% Lower-Right Rooms
Blank14 Unit 1 Unit 4 Unit 5 Unit rectstroke
Blank18 Unit 1 Unit 7 Unit 4 Unit rectstroke
Blank21 Unit 1 Unit 4 Unit 8 Unit rectstroke

Blank17 Unit 6 Unit moveto 3 Unit verticalline
Blank17 Unit 9 Unit moveto 4 Unit horizontalline

Blank% Upper-Right Rooms
Blank14 Unit 13 Unit 3 Unit 5 Unit rectstroke
Blank17 Unit 10 Unit 8 Unit 8 Unit rectstroke
Blank17 Unit 14 Unit 8 Unit 4 Unit rectstroke
Blank17 Unit 10 Unit 4 Unit 8 Unit rectstroke

Blankgrestore
} def

/Dark {
BlankDarkRGB setrgbcolor
Blank0 setlinewidth

Blank3 index Unit
Blank3 index Unit
Blank3 index Unit
Blank3 index Unit

Blankrectfill

Blankpop pop pop pop
} def

/Trap {
% North-American version only, BEGINNING
BlankTrapRGB setrgbcolor
Blank0 setlinewidth

Blank3 index Unit
Blank3 index Unit
Blank3 index Unit
Blank3 index Unit

Blank3 index
Blank3 index
Blank3 index
Blank3 index

Blankgsave
Blankrectclip
Blankrectfill
BlankGrid
Blankgrestore
% North-American version only, END
Blankpop pop pop pop
} def

/Corridor {
% North-American version only, BEGINNING
BlankCorridorRGB setrgbcolor
Blank0 setlinewidth

Blank3 index Unit
Blank3 index Unit
Blank3 index Unit
Blank3 index Unit

Blankrectfill
% North-American version only, END
Blankpop pop pop pop
} def

/StartBoard {
Blank% Column Row

Blankexch
Blankdup
BlankadjacentBoardsOffset mul
Blankexch
Blankx 2 add mul
Blankadd Unit

Blankexch
Blankdup
BlankadjacentBoardsOffset mul
Blankexch
Blanky 2 add mul
Blankadd Unit

Blankgsave
Blanktranslate
} def

/EndBoard {
Blankgrestore
} def

/HorizontalBridge {
Blank% bottom

Blankdup

BlankCorridorRGB setrgbcolor

BlankUnit
Blankx 1 add Unit
Blankexch
Blank2 adjacentBoardsOffset add Unit
Blank1 Unit
Blankrectfill

BlankBorderRGB setrgbcolor
BlankGridStroke setlinewidth

BlankUnit
Blankx 1 add Unit
Blankexch
Blank2 adjacentBoardsOffset add Unit
Blank1 Unit
Blankrectstroke
} def

/VerticalBridge {
Blank% left

Blankdup

BlankCorridorRGB setrgbcolor

BlankUnit
Blank2 adjacentBoardsOffset add -1 mul 1 add Unit
Blank1 Unit
Blank2 adjacentBoardsOffset add Unit
Blankrectfill

BlankBorderRGB setrgbcolor
BlankGridStroke setlinewidth

BlankUnit
Blank2 adjacentBoardsOffset add -1 mul 1 add Unit
Blank1 Unit
Blank2 adjacentBoardsOffset add Unit
Blankrectstroke
} def

% width height BoundingBox

% Deactivating showpage and setpagedevice
% We have to reactivate them before the end

% 2 dict dup dup /showpage {} put /setpagedevice {} put begin
%
% column row StartBoard
%
% x1 y1 width height Corridor
% ...
% x1 y1 width height Dark
% ...
% Grid
%
% EndBoard

Objects.xml editing

Before making any change to your Objects.xml, you first need to repack the European layout of your board.

Rename Board_EU.eps (e.g. DewayneBoard_EU.eps, or anything else), then open Board_EU.eps.gz (with 7-Zip, remember?) and drag in there your new, hypothetical DewayneBoard_EU.eps; while still in 7-Zip, right click on the original Board_EU.eps and delete it. Now close 7-Zip and rename Board_EU.eps.gz to DewayneBoard_EU.eps.gz. You are half way on your vector board editing!

Now open NotePad++: is there the Compare menu, under Plugins? If there is, jump to the next paragraph. If there is not, close Notepad++ and download the plugin (go with the UNI version), then copy the extracted ComparePlugin.dll inside C:\Program Files\Notepad++\plugins.

Now, open HeroScribe/Icons/Vector/Europe/DewayneBoard_EU.eps with Notepad++, then go in HeroScribe/Icons/Vector/USA/, extract Board_US.eps from Board_US.eps.gz and open it too with Notepad++; you should have now both DewayneBoard_EU.eps and Board_US.eps opened in Notepad++. Click on Plugins -> Compare -> Compare and copy the edits done in DewayneBoard_EU.eps to paste them inside Board_US.eps (be sure to paste them in the same file region!). Once again: rename Board_US.eps to the hypotethical DewayneBoard_US.eps (or the one you chose, but it should be exactly like the European's), insert it into Board_US.eps.gz, delete Board_US.eps from inside Board_US.eps.gz and finally rename Board_US.eps.gz to DewayneBoard_US.eps.gz. Your vector board editing is done! Let's move on to your Objects.xml.

Open it up with Notepad++ / TextEdit and give the <board></board> section a look:

<board width="26" height="19" borderDoorsOffset="0.08" adjacentBoardsOffset="-0.5">
<icon region="Europe" path="Europe/Board_EU" />
<icon region="USA" path="USA/Board_US" />

<!-- Border corridors -->
<corridor left="1" top="1" width="26" height="1" />
<corridor left="1" top="19" width="26" height="1" />
<corridor left="1" top="1" width="1" height="19" />
<corridor left="26" top="1" width="1" height="19" />

<!-- 2x7 corridors -->
<corridor left="13" top="1" width="2" height="7" />
<corridor left="13" top="13" width="2" height="7" />

<!-- 10x1 corridors -->
<corridor left="1" top="10" width="10" height="1" />
<corridor left="17" top="10" width="10" height="1" />

<!-- 1x7 corridors -->
<corridor left="10" top="7" width="1" height="7" />
<corridor left="17" top="7" width="1" height="7" />

<!-- 8x1 corridors -->
<corridor left="10" top="7" width="8" height="1" />
<corridor left="10" top="13" width="8" height="1" />

</board>
If your board features corridors more complex than simple rectangles do not worry, we will look into other complex funtions later.

Your Objects.xml editing is done! Let's move on to your board's raster editing.

Raster editing

You now need to work at the raster version of your board, the one used in HeroScribe as the quest's background. Open HeroScribe and export a blank European quest as an .eps named eu.eps; then change the layout to North-American and export a blank American quest as an .eps named us.eps; you may now close HeroScribe.

To export in .eps/.pdf HeroScribe needs Ghostscript: that's the software we will use to rasterize your board. Locate the bin folder of your Ghostscript (ours' at C:\Program Files/gs/gs9.04/bin) and there past the two .eps files you have just extracted (eu.eps and us.eps); now start up your command line (Start -> Run, then type cmd) and enter this command:

cd c:\program files/gs/gs9.04/bin
From there give the following command (copy and paste it by clicking on the upper left icon cmd then Edit -> Paste):
gswin32c -dMaxBitmap=2147483647 -sDEVICE=pngalpha -r125 -sOutputFile="eu.png" -dNOPAUSE -dEPSCrop "eu.eps"
European version of your raster board is ready! Now type Ctrl+C to exit the command and return to the terminal, then type (or copy and cmd -> Edit -> Paste):
gswin32c -dMaxBitmap=2147483647 -sDEVICE=pngalpha -r125 -sOutputFile="us.png" -dNOPAUSE -dEPSCrop "us.eps"
North-American version of your raster board is done! You may close Ghostscript. Now move the two raster files (eu.png and us.png) to their respective folders (HeroScribe/Icons/Raster/Europe/ and HeroScribe/Icons/Raster/USA/) and rename them after their Vector files (DewayneBoard_EU.png and DewayneBoard_US.png).

That's it, even the raster version of your board is ready! Open HeroScribe and have fun. Or head to the more complex drawing functions to panic a bit.

More complex drawing functions

The original HeroQuest board features simple polygons: in most cases they are just rectangles and squares, otherwise single lines. That's not always the case: you may need to draw more complex boards, such as this one from Dragon Strike©:

Dragon Strike© City board

To draw such board you would need new functions like: colors, fills, paths, oblique lines, arcs and ellipses. As long as we are talking about corridor and dark areas, or grids, you should be coding this at this point of the .eps; if you need to draw rooms, instead, just do them in the room section of the .eps.

  • Setting colors: in case you need to draw more complex corridor or dark areas, editing your Objects.xml will not be enough; you would need to draw them directly inside the board. To do that, select the matching color:
    DarkRGB setrgbcolor
    You may choose which one from the colors section, or pick a new one by converting its classic RGB code with this online calculator, then setting it like this:
    0.3 0.3 0.3 setrgbcolor
    Then, you would need a function to fill the color with.
  • Rectangle filling: similar to RectStroke, this function needs the coordinates for the starting square and the rectangle size:
    10 Unit 1 Unit 2 Unit 5 Unit rectfill
    This way you are filling the 2x5 rectangle starting at 10,1 with the previously configured DarkRGB color.
  • Path filling: this function draws a complex polygon made of coordinates:
    newpath 1 Unit 1 Unit moveto 2 Unit 3 Unit lineto 3 Unit 1 Unit lineto closepath fill
    With this, you would be drawing a triangle (whose vertices are at 1,1 - 2,3 - 3,1) filled with the previously configured DarkRGB color. Paths can be build by any number of coordinates:
    newpath 1 Unit 1 Unit moveto 2 Unit 3 Unit lineto 3 Unit 4 Unit lineto 5 Unit 6 Unit lineto 3 Unit 1 Unit lineto closepath fill
  • Setting strokes: in case you need to draw more complex grids, select the right stroke's size:
    GridStroke setlinewidth
    You may choose which one from the strokes section in the .eps. Then, you would need a function to draw the stroke with.
  • Oblique line drawing: this function draws an oblique line, getting over the more simple horizontal and vertical lines:
    1 Unit 1 Unit moveto 4 Unit 4 Unit lineto stroke
    You are drawing an oblique line from 1,1 to 4,4; no filling this time, just a line.
  • Arc drawing: this function draws an arc, partial or not:
    11 Unit 8 Unit 3 Unit 0 360 arc stroke
    You are drawing a 3 squares-radius circle, its center being in 11,8. 0 being the anticlockwise begin of the stroke (3 o'clock) and 360 being the anticlockwise end of the stroke (3 again): a full circle, as shown in the Dragon Strike© City board. Let's say you want a partial circle filled for the third hour quarter (12:30 to 12:45), you would code it this way:
    11 Unit 8 Unit 3 Unit 180 270 arc fill
    Arc
    Please note that 0 means the start of the circle (3 o'clock), 360 the ending.
  • Path and arc drawing: you may draw a complex path which includes an arc:
    newpath 11 Unit 8 Unit 3 Unit 180 270 arc 11 Unit 8 Unit lineto closepath stroke
    You are now drawing a closed, partial arc; again, you could fill it by replacing stroke with fill.
  • Room drawing: in order to draw room borders, be sure to pick the right stroke size (RoomStroke setlinewidth) then choose any of the known functions to start drawing.
  • Ellipse drawing: this function draws an ellipse, partial or not. In order to be able to use it, you will need to insert the following code at this point of the .eps:
    /ellipse {
    /endangle exch def
    /startangle exch def
    /yrad exch def
    /xrad exch def
    /y exch def
    /x exch def
    /savematrix matrix currentmatrix def
    x y translate
    xrad yrad scale
    0 0 1 startangle endangle arc
    savematrix setmatrix
    } def
    That said, you may now draw an ellipse:
    11 Unit 8 Unit 2 Unit 4 Unit 0 360 ellipse stroke
    You are drawing a full 2 squares tall, 4 squares wide ellipse, its center being in 11,8. 0 being the anticlockwise begin of the stroke (3 o'clock) and 360 being the anticlockwise end of the stroke (3 again).
  • Text: this function lets you write texts on your board. In order to be able to write, you will need to insert the following code at this point of the .eps:
    /simplecj {dup stringwidth pop 2 div
    4 -1 roll sub neg 3 -1 roll moveto show} def
    That said, you may now write:
    /Times-Bold findfont 7.5 scalefont setfont 9.5 Unit 9.5 Unit (Text On My Board) simplecj showpage
    You are writing "Text On My Board" at 9.5,9.5.
That's it, you are ready to draw your own HeroScribe board! You may want to give a look on the boards available in the Just Boards Icon Pack from the Icon Packs Section; just extract the Vector board files (HeroScribe/Icons/Vector/Europe/xBoard_EU.eps.gz and HeroScribe/Icons/Vector/USA/xBoard_US.eps.gz) with 7-Zip, then open them with NotePad++, or TextEdit.

Artifact HeroQuest
Front page
Download
Downloads
FAQ
FAQ
Artifact
Fonts
Fonts
Remakes
Remakes
XMLs
XMLs
GuestBook
GuestBook
Links
Links
E-mail
Contacts
Heroes
Heroes
Long Live
Long Live
News
News
Icon Packs
Icon Packs
Copyright 1989, 1990 Milton Bradley Company. All Rights Reserved.
Nothing on this site is intended as a challenge to the rights
of the Milton Bradley Company/Hasbro, Inc. in regard to HeroQuest.