Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Latest commit

 

History

History
80 lines (57 loc) · 2.52 KB

File metadata and controls

80 lines (57 loc) · 2.52 KB

Simple: An Excellent Beginning

Introduction

Asciidoc is just like any Asciidoc document. Any chapters that do not have the [.gameplay] role are treated like normal chapters. You can use this to introduce your game world, rules and mechanics.

If you mark a section with the [.gameplay] role you tell Asciihero that this is the core of your gamebook. Within this section any child with the [.segment] style will be considered a segment. A segment is a single numbered part of your gamebook.

gameplay

entrance_hall

In Asciihero segments of a gamebook are regular AsciiDoc section with the [.segment] style. This tells Asciihero that this section should be treated as a section and should be processed.

Note how the section in the Asciidoc source is called entrance_hall, but the rendered document is shown as "1". This is a bit of convenient magic that Asciihero applies. This allows you to give your segments logical names that you can remember, and Asciihero will turn them into numbers for when it matters.

You can use these segment names with the turn:[] macro to automatically place a link with the correct number. If you want to learn about choices, turn to turn:choices[]. If you want to learn about combat, turnto:combat[].

Or do you want to turnto:combat[fight a monster]?

choices

The turn:[] macro is great if you want to embed the segment number into a sentence. But sometimes you want to show multiple choices in a more consistent manner. You can use an unordered list with the [choices] style for that.

  • choice:entrance_hall[North? And this one is so long that it actually wraps. How do we make this look good?]

  • choice:combat[South?]

combat

So you want to fight some creatures do you? In Asciidoc you can easily include a combat block using an unordered list with the [combat] style.

  • enemy:Goblin[strength=12, dexterity=10]

  • enemy:Goblin[name=Evil Goblin, strength=4, dexterity=3]

If you win, turn:game_over[].

rolls

You look in the well and see something, you reach for it and grab the item.

Roll a d6, this determines the item that you have found.

d6 Item

1-2

Rusty dagger

3-4

Old boot

5-6

1 gp

It’s all over

And so, just like that it’s all over. This was just a simple demonstration of what Asciihero can do. Check out the documentation, or the other examples to learn about the more advanced features of Asciihero!