Since I enjoy using fast UNIX tools to build some dungeons in my
spare time, I wonder how much work it'll take to reproduce the
classic One Page Dungeon layout in groff. Just in case you don't
know, the layout would simply look like this:
-------------------------------
| --------------- Table with |
|| | random |
|| Map of the | encounters, |
|| | various |
|| Dungeon | general |
|| | descriptions|
|| Level | of the level|
|| | And finally |
| --------------- a key with |
| descriptions of each |
| individual room of the |
| dungeon. Basically it's a |
| page, with one top-left |
| aligned image and text |
| floating around the image. |
| That shouldn't be too hard. |
| Nothing fancy really ... |
--------------------------------
Laurens Kils-Huetten <lkh@sdf-eu.org> wrote:
Since I enjoy using fast UNIX tools to build some dungeons in my
spare time, I wonder how much work it'll take to reproduce the
classic One Page Dungeon layout in groff. Just in case you don't
know, the layout would simply look like this:
-------------------------------
| --------------- Table with |
|| | random |
|| Map of the | encounters, |
|| | various |
|| Dungeon | general |
|| | descriptions|
|| Level | of the level|
|| | And finally |
| --------------- a key with |
| descriptions of each |
| individual room of the |
| dungeon. Basically it's a |
| page, with one top-left |
| aligned image and text |
| floating around the image. |
| That shouldn't be too hard. |
| Nothing fancy really ... |
--------------------------------
So after some digging around in the archives, and cracking open
*UNIX Text Processing* by Dougherty and O'Reilly, here's my basic
proof of concept: https://ttm.sh/qhr.png
Macros follow, cheers! ~lkh
.\" Macros to typeset One Page Dungeons
.\" in groff
.\"
.de opdMap \" start with the map
.br
.mk a \" Mark current position
.PSPIC -L \\$1 4i \" insert map image 4 inches wide
.br
.mk b \" Mark lower edge of map
..
.de opdSB \" start the side bar
.sp |\\nau \" move back to mark a
.in +4.2i \" increase indent by 4.2 inches
. \" left margin is now just right
. \" of the map
.ft R
..
.de opdH \" section header for opd stuff
.sp 1v
.ft B
..
.de opdLB \" opd begin entries
.ft R
.in +1.3
.br
..
.de opdLI \" opd list entries
.br
.ti -1.3
..
.de opdLE \" opd end list
.in -1.3
.br
..
.de opdEN \" end of special opd stuff
.br \" break line, just to make sure
.sp |\\nbu \" move to mark b
. \" that's the lower edge of the map
. \" we marked above
.sp 1v
..
Laurens Kils-Huetten <lkh@sdf-eu.org> wrote:
Since I enjoy using fast UNIX tools to build some dungeons in my
spare time, I wonder how much work it'll take to reproduce the
classic One Page Dungeon layout in groff. Just in case you don't
know, the layout would simply look like this:
-------------------------------
| --------------- Table with |
|| | random |
|| Map of the | encounters, |
|| | various |
|| Dungeon | general |
|| | descriptions|
|| Level | of the level|
|| | And finally |
| --------------- a key with |
| descriptions of each |
| individual room of the |
| dungeon. Basically it's a |
| page, with one top-left |
| aligned image and text |
| floating around the image. |
| That shouldn't be too hard. |
| Nothing fancy really ... |
--------------------------------
So after some digging around in the archives, and cracking open
*UNIX Text Processing* by Dougherty and O'Reilly, here's my basic
proof of concept: https://ttm.sh/qhr.png
Macros follow, cheers! ~lkh
.\" Macros to typeset One Page Dungeons
.\" in groff
.\"
.de opdMap \" start with the map
.br
.mk a \" Mark current position
.PSPIC -L \\$1 4i \" insert map image 4 inches wide
.br
.mk b \" Mark lower edge of map
..
.de opdSB \" start the side bar
.sp |\\nau \" move back to mark a
.in +4.2i \" increase indent by 4.2 inches
. \" left margin is now just right
. \" of the map
.ft R
..
.de opdH \" section header for opd stuff
.sp 1v
.ft B
..
.de opdLB \" opd begin entries
.ft R
.in +1.3
.br
..
.de opdLI \" opd list entries
.br
.ti -1.3
..
.de opdLE \" opd end list
.in -1.3
.br
..
.de opdEN \" end of special opd stuff
.br \" break line, just to make sure
.sp |\\nbu \" move to mark b
. \" that's the lower edge of the map
. \" we marked above
.sp 1v
..
I always forget about troff/groff, but it's such an obvious choice. Your proof of concept looks great - the next time I feel compelled to create
a "Planet Eris"-style OD&D campaign book I will give it a shot.
Thank you for sharing the macros - these are great!
Frotz <frotz.self@gmail.com> wrote:
I always forget about troff/groff, but it's such an obvious choice. Your
proof of concept looks great - the next time I feel compelled to create
a "Planet Eris"-style OD&D campaign book I will give it a shot.
I'm looking forward to that one :D
Thank you for sharing the macros - these are great!
It was fun getting this to work. The macro made it to one of the "official" groff example pages:
https://www.froude.eu/groff/examples/one-page-dungeon.html
Cheers,
lkh
How does that actually look like in the end? Do you have a sample for that?
kyonshi <gmkeros@gmail.com> wrote:
How does that actually look like in the end? Do you have a sample for that?
yes, it's here: https://ttm.sh/qhr.png
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 10:17:14 |
Calls: | 6,666 |
Files: | 12,213 |
Messages: | 5,336,334 |