1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-06-16 23:20:44 +03:00

RTF cross-references added.

This commit is contained in:
Pelle Nilsson 2014-09-25 20:59:55 +02:00
parent 43b6e93ea6
commit 849d2bb48a
19 changed files with 233 additions and 244 deletions

View file

@ -27,33 +27,33 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This is the first section (or paragraph, if you prefer). From here you can go to section \b 4
\ql This is the first section (or paragraph, if you prefer). From here you can go to section \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
or \b 3
or \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql This is the end. There is nothing more in this gamebook. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql Third section. Again, its number is not known. You can go to the end at \b 2
\ql Third section. Again, its number is not known. You can go to the end at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. This section has an image to show the syntax for doing that (same as images in bgg forums really).
\
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql This is the second section. It may or may not end up with number 2 in the generated gamebook. From here you can skip to the \b 2
\ql This is the second section. It may or may not end up with number 2 in the generated gamebook. From here you can skip to the \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
or go to the third section at \b 3
or go to the third section at \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\

View file

@ -11,83 +11,83 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql Demonstrating how Codewords (AKA sightings) can be used. Go to \b 2
\ql Demonstrating how Codewords (AKA sightings) can be used. Go to \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql Got codeword warrior. Simple enough to set a codeword. Turn to \b 9
\ql Got codeword warrior. Simple enough to set a codeword. Turn to \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql That was easy. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql OK, if you have the codeword warrior, you may turn to \b 3
\ql OK, if you have the codeword warrior, you may turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
otherwise you may go back to \b 2
otherwise you may go back to \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. Although we both know you have that codeword. If you have the codeword fun you may turn to \b 5
. Although we both know you have that codeword. If you have the codeword fun you may turn to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
, without it you can go to \b 8
, without it you can go to \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql Cheater! There is no way you can have codeword fun. \
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql If you have the codeword fun turn to \b 5
\ql If you have the codeword fun turn to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. Otherwise you can go to the end at \b 3
. Otherwise you can go to the end at \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
or to the xortest at \b 4
or to the xortest at \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. \
\
\b \qc 7
\b \qc {\*\bkmkstart s7}7{\*\bkmkend s7}
\b0\
\ql If you have codeword warrior turn to \b 6
\ql If you have codeword warrior turn to \b {\field{\*\fldinst REF s6 \\h }{\fldrslt 6}}
\b0
. Otherwise you can go to the end at \b 3
. Otherwise you can go to the end at \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
or back to \b 1
or back to \b {\field{\*\fldinst REF s1 \\h }{\fldrslt 1}}
\b0
. \
\
\b \qc 8
\b \qc {\*\bkmkstart s8}8{\*\bkmkend s8}
\b0\
\ql This is just to demonstrate choices allowed when not having a codeword. Now go on to \b 7
\ql This is just to demonstrate choices allowed when not having a codeword. Now go on to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
(autotest) or \b 4
(autotest) or \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
(xor test). \
\
\b \qc 9
\b \qc {\*\bkmkstart s9}9{\*\bkmkend s9}
\b0\
\ql If you have the codeword warrior you may turn to \b 3
\ql If you have the codeword warrior you may turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. If you do not have the codeword fun, you may turn to \b 8
. If you do not have the codeword fun, you may turn to \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
. If you have the codeword fun, you may instead turn to \b 5
. If you have the codeword fun, you may instead turn to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. Otherwise see \b 4
. Otherwise see \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. \
\

View file

@ -19,79 +19,78 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points and 12 Gold. You can never have less than 0 Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to \b 9
\ql This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points and 12 Gold. You can never have less than 0 Gold. FIXME need to figure out best syntax for death when life points go below 1. Go to \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
to get more Gold or \b 8
to get more Gold or \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
to lose some Life Points. Go to \b 3
to lose some Life Points. Go to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
for testing the init value markup. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql OK, we increase that something counter by 1 here, and also increase the other counter by 1. You can go back to see the difference between set and init here (
\b 3
\ql OK, we increase that something counter by 1 here, and also increase the other counter by 1. You can go back to see the difference between set and init \b {\field{\*\fldinst REF s3 \\h }{\fldrslt here}}
\b0
)
, stuck in an infinite loop. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql The Something Counter starts at 5, but when you come back here it will not reset to that, unlike the Other Counter that will reset to 5 every time you get here. If we try to init gold to 999 nothing will happen because it was already set to something before you came yere. Go on to \b 2
\ql The Something Counter starts at 5, but when you come back here it will not reset to that, unlike the Other Counter that will reset to 5 every time you get here. If we try to init gold to 999 nothing will happen because it was already set to something before you came yere. Go on to \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql Less than 1 Life Point means the adventure ends now. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql You have at least 16 gold. Go back to get some more at \b 9
\ql You have at least 16 gold. Go back to get some more at \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
. \
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql You have more than 16 Gold. How nice. Go back to get some more at \b 9
\ql You have more than 16 Gold. How nice. Go back to get some more at \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
. \
\
\b \qc 7
\b \qc {\*\bkmkstart s7}7{\*\bkmkend s7}
\b0\
\ql You drop 5 Gold. It should not be possible to go below 0. Then go on to get gold at \b 9
\ql You drop 5 Gold. It should not be possible to go below 0. Then go on to get gold at \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
or lose life at \b 8
or lose life at \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
. \
\
\b \qc 8
\b \qc {\*\bkmkstart s8}8{\*\bkmkend s8}
\b0\
\ql You lose 1 Life Points. You can go to \b 9
\ql You lose 1 Life Points. You can go to \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
to get some Gold. \
\
\b \qc 9
\b \qc {\*\bkmkstart s9}9{\*\bkmkend s9}
\b0\
\ql Congratulations, you found 2 Gold. If you have less than 1 Life Points, turn to \b 4
\ql Congratulations, you found 2 Gold. If you have less than 1 Life Points, turn to \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. You can go to \b 8
. You can go to \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
to lose some life or to \b 7
to lose some life or to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
to drop some gold. If you have at least 16 Gold you can turn to \b 5
to drop some gold. If you have at least 16 Gold you can turn to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. If you have even more than 16 Gold you can turn to \b 6
. If you have even more than 16 Gold you can turn to \b {\field{\*\fldinst REF s6 \\h }{\fldrslt 6}}
\b0
. \
\

View file

@ -28,64 +28,58 @@
\b Adventure begins in section 1.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This examples tests gamebook formatting, not so much game mechanics or references. Currently there is nothing here really. This section contains some tricky characters to quote, like \} and \{ and " and ' and \\. HTML will probably not like <div> or &boom;. You can make named references like this (
\b 6
\ql This examples tests gamebook formatting, not so much game mechanics or references. Currently there is nothing here really. This section contains some tricky characters to quote, like \} and \{ and " and ' and \\. HTML will probably not like <div> or &boom;. You can make named references \b {\field{\*\fldinst REF s6 \\h }{\fldrslt like this}}
\b0
)
(just happens to be exactly the same syntax as in emacs org-mode btw). This book also includes a format-specific section (
\b 4
(just happens to be exactly the same syntax as in emacs org-mode btw). This book also includes a \b {\field{\*\fldinst REF s4 \\h }{\fldrslt format-specific section}}
\b0
)
. There should be an image below as well. If something broke, turn to \b 2
. There should be an image below as well. If something broke, turn to \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
, otherwise turn to \b 3
, otherwise turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. (Good footnote.)
\
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql Bad. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql Good! \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql This is the format-specific section for no other formats. Now you lose (
\b 2
\ql This is the format-specific section for no other formats. Now you \b {\field{\*\fldinst REF s2 \\h }{\fldrslt lose}}
\b0
)
. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql Very good. You win (
\b 3
\ql Very good. \b {\field{\*\fldinst REF s3 \\h }{\fldrslt You win}}
\b0
)
. (Win footnote.)
\
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql This is where you should end up when you follow the named reference from the starting section. From here you can go to the second named section (
\b 5
\ql This is where you should end up when you follow the named reference from the starting section. From here you can go to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt the second named section}}
\b0
)
or to the good end (
\b 3
or to the \b {\field{\*\fldinst REF s3 \\h }{\fldrslt good end}}
\b0
)
. \
\

View file

@ -27,24 +27,23 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql Got to this section. Story ends here. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql Got to another section. Story ends here. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql This is the first section. From here you can go to the unnamed section \b 2
\ql This is the first section. From here you can go to the unnamed section \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
or this named section (
\b 1
or \b {\field{\*\fldinst REF s1 \\h }{\fldrslt this named section}}
\b0
)
. \
\

View file

@ -11,108 +11,108 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql Demonstrating how to manage player Inventory. You start the book carrying a sword and a shield. Turn to \b 12
\ql Demonstrating how to manage player Inventory. You start the book carrying a sword and a shield. Turn to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
or go to the autotest at \b 2
or go to the autotest at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql If you have the stick then you must turn immediately to \b 12
\ql If you have the stick then you must turn immediately to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
, and everything else in this section is ignored. You find a book here. If you have the sword you must turn immediately to \b 5
, and everything else in this section is ignored. You find a book here. If you have the sword you must turn immediately to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
, again ignoring everything that follows. You drop the something valuable here if you have it, then go on to \b 7
, again ignoring everything that follows. You drop the something valuable here if you have it, then go on to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql Congratulations, you won. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql OK. That was fun. Turn to \b 3
\ql OK. That was fun. Turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql There is a rope here that can be cut using a sword. If you have one and want to do that, see \b 4
\ql There is a rope here that can be cut using a sword. If you have one and want to do that, see \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. You can also run to the autotest at \b 2
. You can also run to the autotest at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. Otherwise turn to \b 3
. Otherwise turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql You found something valuable, but there is no way forward, so you head back to \b 12
\ql You found something valuable, but there is no way forward, so you head back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
. \
\
\b \qc 7
\b \qc {\*\bkmkstart s7}7{\*\bkmkend s7}
\b0\
\ql A magic portal ahead will only allow you to pass if you did not pick up the cursed bracelet, leading you to \b 6
\ql A magic portal ahead will only allow you to pass if you did not pick up the cursed bracelet, leading you to \b {\field{\*\fldinst REF s6 \\h }{\fldrslt 6}}
\b0
. If you have the cursed bracelet you have to go back to \b 12
. If you have the cursed bracelet you have to go back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
instead. Actually feel free to head back to \b 12
instead. Actually feel free to head back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
either way. \
\
\b \qc 8
\b \qc {\*\bkmkstart s8}8{\*\bkmkend s8}
\b0\
\ql OK stick dropped. Turn back to \b 12
\ql OK stick dropped. Turn back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
to confirm stick can not be picked up again even if the text says it is there (books work that way, although ideally this dynamic version should provide some hints that it is no longer there). \
\
\b \qc 9
\b \qc {\*\bkmkstart s9}9{\*\bkmkend s9}
\b0\
\ql There is a cursed bracelet here. You can go on to \b 7
\ql There is a cursed bracelet here. You can go on to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
or go back to \b 12
or go back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
. You can also drop the stick for no particular reason if you have it, see \b 8
. You can also drop the stick for no particular reason if you have it, see \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
. \
\
\b \qc 10
\b \qc {\*\bkmkstart s10}10{\*\bkmkend s10}
\b0\
\ql OK. The door is broken, but so is the sword. Turn to \b 5
\ql OK. The door is broken, but so is the sword. Turn to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. \
\
\b \qc 11
\b \qc {\*\bkmkstart s11}11{\*\bkmkend s11}
\b0\
\ql There is a locked door here. If you have a key you can use that to open the door, see \b 5
\ql There is a locked door here. If you have a key you can use that to open the door, see \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. Being right before the link should be enough for the formatter to figure out that the key is required to be allowed to follow the link. Else you can try to open with the sword, if you have it, see \b 10
. Being right before the link should be enough for the formatter to figure out that the key is required to be allowed to follow the link. Else you can try to open with the sword, if you have it, see \b {\field{\*\fldinst REF s10 \\h }{\fldrslt 10}}
\b0
. Hopefully the magic is good enough to pair pre-conditions to links, or more markup must be added later. You could also try to go back to pick up the key, see \b 12
. Hopefully the magic is good enough to pair pre-conditions to links, or more markup must be added later. You could also try to go back to pick up the key, see \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
. \
\
\b \qc 12
\b \qc {\*\bkmkstart s12}12{\*\bkmkend s12}
\b0\
\ql You have reached a t-junction. Here you find a key and a stick. You can go west to \b 11
\ql You have reached a t-junction. Here you find a key and a stick. You can go west to \b {\field{\*\fldinst REF s11 \\h }{\fldrslt 11}}
\b0
, or east to \b 9
, or east to \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
. \
\

View file

@ -19,108 +19,108 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql Demonstrating how to manage player Inventory. You start the book carrying a sword and a shield. Turn to \b 12
\ql Demonstrating how to manage player Inventory. You start the book carrying a sword and a shield. Turn to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
or go to the autotest at \b 2
or go to the autotest at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql If you have the stick then you must turn immediately to \b 12
\ql If you have the stick then you must turn immediately to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
, and everything else in this section is ignored. You find a book here. If you have the sword you must turn immediately to \b 5
, and everything else in this section is ignored. You find a book here. If you have the sword you must turn immediately to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
, again ignoring everything that follows. You drop the something valuable here if you have it, then go on to \b 7
, again ignoring everything that follows. You drop the something valuable here if you have it, then go on to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql Congratulations, you won. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql OK. That was fun. Turn to \b 3
\ql OK. That was fun. Turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql There is a rope here that can be cut using a sword. If you have one and want to do that, see \b 4
\ql There is a rope here that can be cut using a sword. If you have one and want to do that, see \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. You can also run to the autotest at \b 2
. You can also run to the autotest at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. Otherwise turn to \b 3
. Otherwise turn to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql You found something valuable, but there is no way forward, so you head back to \b 12
\ql You found something valuable, but there is no way forward, so you head back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
. \
\
\b \qc 7
\b \qc {\*\bkmkstart s7}7{\*\bkmkend s7}
\b0\
\ql A magic portal ahead will only allow you to pass if you did not pick up the cursed bracelet, leading you to \b 6
\ql A magic portal ahead will only allow you to pass if you did not pick up the cursed bracelet, leading you to \b {\field{\*\fldinst REF s6 \\h }{\fldrslt 6}}
\b0
. If you have the cursed bracelet you have to go back to \b 12
. If you have the cursed bracelet you have to go back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
instead. Actually feel free to head back to \b 12
instead. Actually feel free to head back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
either way. \
\
\b \qc 8
\b \qc {\*\bkmkstart s8}8{\*\bkmkend s8}
\b0\
\ql OK stick dropped. Turn back to \b 12
\ql OK stick dropped. Turn back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
to confirm stick can not be picked up again even if the text says it is there (books work that way, although ideally this dynamic version should provide some hints that it is no longer there). \
\
\b \qc 9
\b \qc {\*\bkmkstart s9}9{\*\bkmkend s9}
\b0\
\ql There is a cursed bracelet here. You can go on to \b 7
\ql There is a cursed bracelet here. You can go on to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
or go back to \b 12
or go back to \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
. You can also drop the stick for no particular reason if you have it, see \b 8
. You can also drop the stick for no particular reason if you have it, see \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
. \
\
\b \qc 10
\b \qc {\*\bkmkstart s10}10{\*\bkmkend s10}
\b0\
\ql OK. The door is broken, but so is the sword. Turn to \b 5
\ql OK. The door is broken, but so is the sword. Turn to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. \
\
\b \qc 11
\b \qc {\*\bkmkstart s11}11{\*\bkmkend s11}
\b0\
\ql There is a locked door here. If you have a key you can use that to open the door, see \b 5
\ql There is a locked door here. If you have a key you can use that to open the door, see \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. Being right before the link should be enough for the formatter to figure out that the key is required to be allowed to follow the link. Else you can try to open with the sword, if you have it, see \b 10
. Being right before the link should be enough for the formatter to figure out that the key is required to be allowed to follow the link. Else you can try to open with the sword, if you have it, see \b {\field{\*\fldinst REF s10 \\h }{\fldrslt 10}}
\b0
. Hopefully the magic is good enough to pair pre-conditions to links, or more markup must be added later. You could also try to go back to pick up the key, see \b 12
. Hopefully the magic is good enough to pair pre-conditions to links, or more markup must be added later. You could also try to go back to pick up the key, see \b {\field{\*\fldinst REF s12 \\h }{\fldrslt 12}}
\b0
. \
\
\b \qc 12
\b \qc {\*\bkmkstart s12}12{\*\bkmkend s12}
\b0\
\ql You have reached a t-junction. Here you find a key and a stick. You can go west to \b 11
\ql You have reached a t-junction. Here you find a key and a stick. You can go west to \b {\field{\*\fldinst REF s11 \\h }{\fldrslt 11}}
\b0
, or east to \b 9
, or east to \b {\field{\*\fldinst REF s9 \\h }{\fldrslt 9}}
\b0
. \
\

View file

@ -19,21 +19,21 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql There has to be a section set as missingto (ie this section), otherwise generating a list with only todo sections will fail (as one of them references non-todo sections). Unfortunate side-effect is that this section will always be included in the list. TODO figure out some fix for this. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql Need to write this section. Sorry for it being a dead-end for now. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql (This section needs some work!) Here you find a key and a stick. You can go west to \b 1
\ql (This section needs some work!) Here you find a key and a stick. You can go west to \b {\field{\*\fldinst REF s1 \\h }{\fldrslt 1}}
\b0
, or east to \b 2
, or east to \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\

View file

@ -11,7 +11,7 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql LaTeX output (and this PDF output) from this book should be in letter size rather than the default A5 size (see command-line options used in letter.gamebook.options). \
\

View file

@ -14,56 +14,54 @@
\ql This gamebook demonstrates simple references between sections. Also notice that an intro section like this one can reference sections, like the start at \b 1
\ql This gamebook demonstrates simple references between sections. Also notice that an intro section like this one can reference sections, like the start at \b {\field{\*\fldinst REF s1 \\h }{\fldrslt 1}}
\b0
or the next section at \b 400
or the next section at \b {\field{\*\fldinst REF s400 \\h }{\fldrslt 400}}
\b0
. References can include an optional name that is used in some formats, so the same links could also be rendered as start (
\b 1
. References can include an optional name that is used in some formats, so the same links could also be rendered as \b {\field{\*\fldinst REF s1 \\h }{\fldrslt start}}
\b0
)
and next (
\b 400
and \b {\field{\*\fldinst REF s400 \\h }{\fldrslt next}}
\b0
)
. \
\
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This is where the adventure begins. You can go on to the next section, see \b 400
\ql This is where the adventure begins. You can go on to the next section, see \b {\field{\*\fldinst REF s400 \\h }{\fldrslt 400}}
\b0
or try the random selection feature at \b 399
or try the random selection feature at \b {\field{\*\fldinst REF s399 \\h }{\fldrslt 399}}
\b0
. \
\
\b \qc 397
\b \qc {\*\bkmkstart s397}397{\*\bkmkend s397}
\b0\
\ql The end. \
\
\b \qc 398
\b \qc {\*\bkmkstart s398}398{\*\bkmkend s398}
\b0\
\ql Alternative ending. \
\
\b \qc 399
\b \qc {\*\bkmkstart s399}399{\*\bkmkend s399}
\b0\
\ql Pick a destination at random from \b 400
\ql Pick a destination at random from \b {\field{\*\fldinst REF s400 \\h }{\fldrslt 400}}
\b0
or \b 397
or \b {\field{\*\fldinst REF s397 \\h }{\fldrslt 397}}
\b0
or \b 398
or \b {\field{\*\fldinst REF s398 \\h }{\fldrslt 398}}
\b0
. \
\
\b \qc 400
\b \qc {\*\bkmkstart s400}400{\*\bkmkend s400}
\b0\
\ql This is the next section. Go on to the end at \b 397
\ql This is the next section. Go on to the end at \b {\field{\*\fldinst REF s397 \\h }{\fldrslt 397}}
\b0
. \
\

View file

@ -19,30 +19,30 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql You can buy a shield here for 50 Gold or a beautiful gold ring for only 75. There is also a chain mail costing 150. You can pick up some spiderweb for free. You can go to \b 4
\ql You can buy a shield here for 50 Gold or a beautiful gold ring for only 75. There is also a chain mail costing 150. You can pick up some spiderweb for free. You can go to \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
at a cost of 50. You can go on to the end at \b 2
at a cost of 50. You can go on to the end at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql It ends here. There is a crown here that you can trade for some spiderweb. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql This is somewhere else. Congratulations you have found 100 gold! Go back to \b 1
\ql This is somewhere else. Congratulations you have found 100 gold! Go back to \b {\field{\*\fldinst REF s1 \\h }{\fldrslt 1}}
\b0
. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql Now you have 50 less gold than you just had. You can go back to \b 1
\ql Now you have 50 less gold than you just had. You can go back to \b {\field{\*\fldinst REF s1 \\h }{\fldrslt 1}}
\b0
. \
\

View file

@ -11,29 +11,29 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql It starts here. You can get to \b 6
\ql It starts here. You can get to \b {\field{\*\fldinst REF s6 \\h }{\fldrslt 6}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql Another fake section that is also ignored. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql You can not get here either, but because it is tagged as fake there will be no warning generated. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql You can not get here. Verification should warn you about that. \
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql You can get here. Congratulations! \
\

View file

@ -11,41 +11,41 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This gamebook contains a few sections tagged as demo, that will be included when building the example (see withdemo.gamebook.options file). There are also some sections without the demo tag that will be ignored. Go on to \b 5
\ql This gamebook contains a few sections tagged as demo, that will be included when building the example (see withdemo.gamebook.options file). There are also some sections without the demo tag that will be ignored. Go on to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
or \b 4
or \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
or \b 2
or \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql This is where references to non-demo sections will lead you. It is configured at the top of the gamebook file. Remember to tag this section correctly to be included. Go on to \b 4
\ql This is where references to non-demo sections will lead you. It is configured at the top of the gamebook file. Remember to tag this section correctly to be included. Go on to \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql This is the end. It is also included in the demo. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql This is the second demo section. You can go on to the end at \b 3
\ql This is the second demo section. You can go on to the end at \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
or alternative (not in demo) end at \b 2
or alternative (not in demo) end at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql This is the first demo section (not counting the start section). You can go on to the end at \b 3
\ql This is the first demo section (not counting the start section). You can go on to the end at \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
. \
\

View file

@ -11,14 +11,14 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 10
\b \qc {\*\bkmkstart s10}10{\*\bkmkend s10}
\b0\
\ql This should have number 10, as specified in first map file. The end, at \b 99
\ql This should have number 10, as specified in first map file. The end, at \b {\field{\*\fldinst REF s99 \\h }{\fldrslt 99}}
\b0
, should be at 99. \
\
\b \qc 99
\b \qc {\*\bkmkstart s99}99{\*\bkmkend s99}
\b0\
\ql Number 99, as specified in second map file. \
\

View file

@ -11,64 +11,64 @@
\b Turn to 1 to begin.
\b0\
\
\b \qc 1
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This gamebook contains a few sections tagged as demo, that will be included when building the example as withdemo.gamebook (see withdemo.gamebook.options file). There are also some sections without the demo tag that will be ignored. This version is built without options and includes all sections. Go on to \b 7
\ql This gamebook contains a few sections tagged as demo, that will be included when building the example as withdemo.gamebook (see withdemo.gamebook.options file). There are also some sections without the demo tag that will be ignored. This version is built without options and includes all sections. Go on to \b {\field{\*\fldinst REF s7 \\h }{\fldrslt 7}}
\b0
or \b 5
or \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
or \b 8
or \b {\field{\*\fldinst REF s8 \\h }{\fldrslt 8}}
\b0
. \
\
\b \qc 2
\b \qc {\*\bkmkstart s2}2{\*\bkmkend s2}
\b0\
\ql Alternative end. Not included in the demo. \
\
\b \qc 3
\b \qc {\*\bkmkstart s3}3{\*\bkmkend s3}
\b0\
\ql This is where references to non-demo sections will lead you. It is configured at the top of the gamebook file. Remember to tag this section correctly to be included. Nothing should lead to this section when building without the demo tag option. Go on to \b 5
\ql This is where references to non-demo sections will lead you. It is configured at the top of the gamebook file. Remember to tag this section correctly to be included. Nothing should lead to this section when building without the demo tag option. Go on to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
. \
\
\b \qc 4
\b \qc {\*\bkmkstart s4}4{\*\bkmkend s4}
\b0\
\ql This is the end. It is also included in the demo. \
\
\b \qc 5
\b \qc {\*\bkmkstart s5}5{\*\bkmkend s5}
\b0\
\ql This is the second demo section. You can go on to the end at \b 4
\ql This is the second demo section. You can go on to the end at \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
or alternative (not in demo) end at \b 2
or alternative (not in demo) end at \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 6
\b \qc {\*\bkmkstart s6}6{\*\bkmkend s6}
\b0\
\ql This section is not included in the demo. You can go on to \b 5
\ql This section is not included in the demo. You can go on to \b {\field{\*\fldinst REF s5 \\h }{\fldrslt 5}}
\b0
or \b 4
or \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
or \b 2
or \b {\field{\*\fldinst REF s2 \\h }{\fldrslt 2}}
\b0
. \
\
\b \qc 7
\b \qc {\*\bkmkstart s7}7{\*\bkmkend s7}
\b0\
\ql This is the first demo section (not counting the start section). You can go on to the end at \b 4
\ql This is the first demo section (not counting the start section). You can go on to the end at \b {\field{\*\fldinst REF s4 \\h }{\fldrslt 4}}
\b0
. \
\
\b \qc 8
\b \qc {\*\bkmkstart s8}8{\*\bkmkend s8}
\b0\
\ql This section is not included in the demo. Turn to \b 6
\ql This section is not included in the demo. Turn to \b {\field{\*\fldinst REF s6 \\h }{\fldrslt 6}}
\b0
. \
\

View file

@ -1,4 +1,3 @@
%(name)s (
\b %(nr)d
\b {\field{\*\fldinst REF s%(nr)d \\h }{\fldrslt %(name)s}}
\b0
)

View file

@ -1,4 +1,4 @@
\b \qc %(nr)d
\b \qc {\*\bkmkstart s%(nr)d}%(nr)d{\*\bkmkend s%(nr)d}
\b0\
\ql %(text)s \
\

View file

@ -1,2 +1,2 @@
\b %(nr)d
\b {\field{\*\fldinst REF s%(nr)d \\h }{\fldrslt %(nr)d}}
\b0

View file

@ -1,2 +1,2 @@
\b \qc %(nr)d
\b \qc {\*\bkmkstart s%(nr)d}%(nr)d{\*\bkmkend s%(nr)d}
\b0\