1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-04-25 21:59:21 +03:00

Fixed some whitespace and HTML quoting problems in twine2 format.

This commit is contained in:
Pelle Nilsson 2014-12-22 17:31:42 +01:00
parent f90e662993
commit ed0ae335e0
27 changed files with 84 additions and 220 deletions

View file

@ -4,8 +4,7 @@ author = Pelle Nilsson
* 1 start
This is just an experiment exporting to the markup used in [b]Twine 2[/b] (see http://twinery.org).
A known problem is that new-lines are significant in Twine, while they are happily ignored by
gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting
to Twine 2. Also the book has to start at section 1 because currently the startnode given in
gamebookformat. The book has to start at section 1 because currently the startnode given in
the generated file is hardcoded to 1.
Many things like item management and counters are not yet implemented, but from a quick look
int the Twine 2 documentation it should be possible to add all that later.

View file

@ -1,13 +1,8 @@
<tw-storydata name="Title of Game" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> This is the first section (or paragraph, if you prefer). From here you can go to section [[4]]
or [[3]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> This is the first section (or paragraph, if you prefer). From here you can go to section [[4]] or [[3]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> This is the end. There is nothing more in this gamebook.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> Third section. Again, its number is not known. You can go to the end at [[2]]
. This section has an image to show the syntax for doing that (same as images in bgg forums really).
<tw-passagedata pid="3" name="3" tags="" position="30,30"> Third section. Again, its number is not known. You can go to the end at [[2]]. This section has an image to show the syntax for doing that (same as images in bgg forums really).
</tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> 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 [[2]]
or go to the third section at [[3]]
. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> 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 [[2]] or go to the third section at [[3]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,30 +1,12 @@
<tw-storydata name="Gamebook" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Demonstrating how **Codewords** (AKA sightings) can be used. Go to [[2]]
. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Got codeword **warrior**. Simple enough to set a codeword. Turn to [[9]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Demonstrating how **Codewords** (AKA sightings) can be used. Go to [[2]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Got codeword **warrior**. Simple enough to set a codeword. Turn to [[9]]. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> That was easy. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> OK, if you have the codeword **warrior**, you may turn to [[3]]
otherwise you may go back to [[2]]
. Although we both know you have that codeword. If you have the codeword **fun** you may turn to [[5]]
, without it you can go to [[8]]
. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> OK, if you have the codeword **warrior**, you may turn to [[3]] otherwise you may go back to [[2]]. Although we both know you have that codeword. If you have the codeword **fun** you may turn to [[5]], without it you can go to [[8]]. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> Cheater! There is no way you can have codeword fun. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> If you have the codeword **fun** turn to [[5]]
. Otherwise you can go to the end at [[3]]
or to the xortest at [[4]]
. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> If you have codeword **warrior** turn to [[6]]
. Otherwise you can go to the end at [[3]]
or back to [[1]]
. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> This is just to demonstrate choices allowed when not having a codeword. Now go on to [[7]]
(autotest) or [[4]]
(xor test). </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> If you have the codeword **warrior** you may turn to [[3]]
. If you do not have the codeword **fun**, you may turn to [[8]]
. If you have the codeword **fun**, you may instead turn to [[5]]
. Otherwise see [[4]]
. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> If you have the codeword **fun** turn to [[5]]. Otherwise you can go to the end at [[3]] or to the xortest at [[4]]. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> If you have codeword **warrior** turn to [[6]]. Otherwise you can go to the end at [[3]] or back to [[1]]. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> This is just to demonstrate choices allowed when not having a codeword. Now go on to [[7]] (autotest) or [[4]] (xor test). </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> If you have the codeword **warrior** you may turn to [[3]]. If you do not have the codeword **fun**, you may turn to [[8]]. If you have the codeword **fun**, you may instead turn to [[5]]. Otherwise see [[4]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,27 +1,12 @@
<tw-storydata name="Counters Example" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[9]]
to get more Gold or [[8]]
to lose some Life Points. Go to [[3]]
for testing the init value markup. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> 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->3]]
, stuck in an infinite loop.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> 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 [[2]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[9]] to get more Gold or [[8]] to lose some Life Points. Go to [[3]] for testing the init value markup. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> 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->3]], stuck in an infinite loop.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> 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 [[2]]. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> Less than 1 Life Point means the adventure ends now. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> You have at least 16 gold. Go back to get some more at [[9]]
. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> You have more than 16 Gold. How nice. Go back to get some more at [[9]]
. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> You drop **5** Gold. It should not be possible to go below 0. Then go on to get gold at [[9]]
or lose life at [[8]]
. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> You lose **1** Life Points. You can go to [[9]]
to get some Gold. </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> Congratulations, you found **2** Gold. If you have less than **1** Life Points, turn to [[4]]
. You can go to [[8]]
to lose some life or to [[7]]
to drop some gold. If you have at least **16** Gold you can turn to [[5]]
. If you have even more than **16** Gold you can turn to [[6]]
. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> You have at least 16 gold. Go back to get some more at [[9]]. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> You have more than 16 Gold. How nice. Go back to get some more at [[9]]. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> You drop **5** Gold. It should not be possible to go below 0. Then go on to get gold at [[9]] or lose life at [[8]]. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> You lose **1** Life Points. You can go to [[9]] to get some Gold. </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> Congratulations, you found **2** Gold. If you have less than **1** Life Points, turn to [[4]]. You can go to [[8]] to lose some life or to [[7]] to drop some gold. If you have at least **16** Gold you can turn to [[5]]. If you have even more than **16** Gold you can turn to [[6]]. </tw-passagedata>
</tw-storydata>

View file

@ -2,15 +2,9 @@
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> <b>Getting Started.</b> </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> <b>Installation.</b> </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> <b>Tutorials.</b> There are 4 tutorials of increasing complexity currently included in this document: [[The Basic Tutorial->4]]
shows how to make a simple static gamebook for printing or reading on a screen. [[The Advanced Tutorial->5]]
adds many formatting tricks to make more interesting gamebooks, but still only very static. [[The Dynamic Tutorial->6]]
finally explains how to add mark-up to your gamebooks to be make dynamic HTML gamebooks that can be played in a browser (while still work well if it is printed on paper or viewed in a simple ebook reader). Finally [[The Customization Tutorial->7]]
shows how to override the default templates to make small or big changes to how gamebooks are rendered. The tutorials do not cover all features of gamebookformat, so also have a look at the included examples and the [[Reference section below->8]]
to learn about all the things the tools can do.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> <b>Tutorials.</b> There are 4 tutorials of increasing complexity currently included in this document: [[The Basic Tutorial->4]] shows how to make a simple static gamebook for printing or reading on a screen. [[The Advanced Tutorial->5]] adds many formatting tricks to make more interesting gamebooks, but still only very static. [[The Dynamic Tutorial->6]] finally explains how to add mark-up to your gamebooks to be make dynamic HTML gamebooks that can be played in a browser (while still work well if it is printed on paper or viewed in a simple ebook reader). Finally [[The Customization Tutorial->7]] shows how to override the default templates to make small or big changes to how gamebooks are rendered. The tutorials do not cover all features of gamebookformat, so also have a look at the included examples and the [[Reference section below->8]] to learn about all the things the tools can do.</tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> <b>Basic Tutorial.</b> This tutorial will guide you through creating a simple gamebook with linked sections of text with some simple formatting, resulting in static html and rtf documents that can be easily navigated for manual play printed on paper or on any computer or ebook reader.</tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> <b>Advanced Tutorial.</b> This tutorial continues the [[Basic Tutorial->4]]
, only adding some more details to do more advanced formatting like adding images to books or how to make links that display text instead of numbers.</tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> <b>Advanced Tutorial.</b> This tutorial continues the [[Basic Tutorial->4]], only adding some more details to do more advanced formatting like adding images to books or how to make links that display text instead of numbers.</tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> <b>Dynamic Tutorial.</b> </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> <b>Customization Tutorial</b>.</tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> <b>Reference.</b></tw-passagedata>

View file

@ -1,20 +1,12 @@
<tw-storydata name="Format" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 &lt;div&gt; or &amp;boom;. You can make named references [[like this->6]]
(just happens to be exactly the same syntax as in emacs org-mode btw). This book also includes a [[format-specific section->4]]
. There should be an image below as well. If something broke, turn to [[2]]
, otherwise turn to [[3]]
. (Good footnote.)
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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->6]] (just happens to be exactly the same syntax as in emacs org-mode btw). This book also includes a [[format-specific section->4]]. There should be an image below as well. If something broke, turn to [[2]], otherwise turn to [[3]]. (Good footnote.)
</tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Bad.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> Good! </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> This is the format-specific section for no other formats. Now you [[lose->2]]
. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> Very good. [[You win->3]]
. (Win footnote.)
<tw-passagedata pid="4" name="4" tags="" position="40,40"> This is the format-specific section for no other formats. Now you [[lose->2]]. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> Very good. [[You win->3]]. (Win footnote.)
</tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> 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->5]]
or to the [[good end->3]]
. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> 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->5]] or to the [[good end->3]]. </tw-passagedata>
</tw-storydata>

View file

@ -2,7 +2,5 @@
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Got to this section. Story ends here.</tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Got to another section. Story ends here. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is the first section. From here you can go to the unnamed section [[2]]
or [[this named section->1]]
. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is the first section. From here you can go to the unnamed section [[2]] or [[this named section->1]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,38 +1,15 @@
<tw-storydata name="Items" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Demonstrating how to manage player **Inventory**. You start the book carrying a **sword** and a **shield**. Turn to [[12]]
or go to the autotest at [[2]]
. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> If you have the **stick** then you must turn immediately to [[12]]
, and everything else in this section is ignored. You find a **book** here. If you have the **sword** you must turn immediately to [[5]]
, again ignoring everything that follows. You drop the **something valuable** here if you have it, then go on to [[7]]
.</tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Demonstrating how to manage player **Inventory**. You start the book carrying a **sword** and a **shield**. Turn to [[12]] or go to the autotest at [[2]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> If you have the **stick** then you must turn immediately to [[12]], and everything else in this section is ignored. You find a **book** here. If you have the **sword** you must turn immediately to [[5]], again ignoring everything that follows. You drop the **something valuable** here if you have it, then go on to [[7]].</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> Congratulations, you won.</tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> OK. That was fun. Turn to [[3]]
. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> There is a rope here that can be cut using a **sword**. If you have one and want to do that, see [[4]]
. You can also run to the autotest at [[2]]
. Otherwise turn to [[3]]
. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> You found **something valuable**, but there is no way forward, so you head back to [[12]]
. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> A magic portal ahead will only allow you to pass if you did not pick up the **cursed bracelet**, leading you to [[6]]
. If you have the **cursed bracelet** you have to go back to [[12]]
instead. Actually feel free to head back to [[12]]
either way. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> OK **stick** dropped. Turn back to [[12]]
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). </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> There is a **cursed bracelet** here. You can go on to [[7]]
or go back to [[12]]
. You can also drop the **stick** for no particular reason if you have it, see [[8]]
. </tw-passagedata>
<tw-passagedata pid="10" name="10" tags="" position="100,100"> OK. The door is broken, but so is the **sword**. Turn to [[5]]
. </tw-passagedata>
<tw-passagedata pid="11" name="11" tags="" position="110,110"> There is a locked door here. If you have a **key** you can use that to open the door, see [[5]]
. 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 [[10]]
. 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 [[12]]
. </tw-passagedata>
<tw-passagedata pid="12" name="12" tags="" position="120,120"> You have reached a t-junction. Here you find a **key** and a **stick**. You can go west to [[11]]
, or east to [[9]]
. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> OK. That was fun. Turn to [[3]]. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> There is a rope here that can be cut using a **sword**. If you have one and want to do that, see [[4]]. You can also run to the autotest at [[2]]. Otherwise turn to [[3]]. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> You found **something valuable**, but there is no way forward, so you head back to [[12]]. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> A magic portal ahead will only allow you to pass if you did not pick up the **cursed bracelet**, leading you to [[6]]. If you have the **cursed bracelet** you have to go back to [[12]] instead. Actually feel free to head back to [[12]] either way. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> OK **stick** dropped. Turn back to [[12]] 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). </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> There is a **cursed bracelet** here. You can go on to [[7]] or go back to [[12]]. You can also drop the **stick** for no particular reason if you have it, see [[8]]. </tw-passagedata>
<tw-passagedata pid="10" name="10" tags="" position="100,100"> OK. The door is broken, but so is the **sword**. Turn to [[5]]. </tw-passagedata>
<tw-passagedata pid="11" name="11" tags="" position="110,110"> There is a locked door here. If you have a **key** you can use that to open the door, see [[5]]. 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 [[10]]. 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 [[12]]. </tw-passagedata>
<tw-passagedata pid="12" name="12" tags="" position="120,120"> You have reached a t-junction. Here you find a **key** and a **stick**. You can go west to [[11]], or east to [[9]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,38 +1,15 @@
<tw-storydata name="Items" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Demonstrating how to manage player **Inventory**. You start the book carrying a **sword** and a **shield**. Turn to [[12]]
or go to the autotest at [[2]]
. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> If you have the **stick** then you must turn immediately to [[12]]
, and everything else in this section is ignored. You find a **book** here. If you have the **sword** you must turn immediately to [[5]]
, again ignoring everything that follows. You drop the **something valuable** here if you have it, then go on to [[7]]
.</tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> Demonstrating how to manage player **Inventory**. You start the book carrying a **sword** and a **shield**. Turn to [[12]] or go to the autotest at [[2]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> If you have the **stick** then you must turn immediately to [[12]], and everything else in this section is ignored. You find a **book** here. If you have the **sword** you must turn immediately to [[5]], again ignoring everything that follows. You drop the **something valuable** here if you have it, then go on to [[7]].</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> Congratulations, you won.</tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> OK. That was fun. Turn to [[3]]
. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> There is a rope here that can be cut using a **sword**. If you have one and want to do that, see [[4]]
. You can also run to the autotest at [[2]]
. Otherwise turn to [[3]]
. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> You found **something valuable**, but there is no way forward, so you head back to [[12]]
. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> A magic portal ahead will only allow you to pass if you did not pick up the **cursed bracelet**, leading you to [[6]]
. If you have the **cursed bracelet** you have to go back to [[12]]
instead. Actually feel free to head back to [[12]]
either way. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> OK **stick** dropped. Turn back to [[12]]
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). </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> There is a **cursed bracelet** here. You can go on to [[7]]
or go back to [[12]]
. You can also drop the **stick** for no particular reason if you have it, see [[8]]
. </tw-passagedata>
<tw-passagedata pid="10" name="10" tags="" position="100,100"> OK. The door is broken, but so is the **sword**. Turn to [[5]]
. </tw-passagedata>
<tw-passagedata pid="11" name="11" tags="" position="110,110"> There is a locked door here. If you have a **key** you can use that to open the door, see [[5]]
. 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 [[10]]
. 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 [[12]]
. </tw-passagedata>
<tw-passagedata pid="12" name="12" tags="" position="120,120"> You have reached a t-junction. Here you find a **key** and a **stick**. You can go west to [[11]]
, or east to [[9]]
. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> OK. That was fun. Turn to [[3]]. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> There is a rope here that can be cut using a **sword**. If you have one and want to do that, see [[4]]. You can also run to the autotest at [[2]]. Otherwise turn to [[3]]. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> You found **something valuable**, but there is no way forward, so you head back to [[12]]. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> A magic portal ahead will only allow you to pass if you did not pick up the **cursed bracelet**, leading you to [[6]]. If you have the **cursed bracelet** you have to go back to [[12]] instead. Actually feel free to head back to [[12]] either way. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> OK **stick** dropped. Turn back to [[12]] 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). </tw-passagedata>
<tw-passagedata pid="9" name="9" tags="" position="90,90"> There is a **cursed bracelet** here. You can go on to [[7]] or go back to [[12]]. You can also drop the **stick** for no particular reason if you have it, see [[8]]. </tw-passagedata>
<tw-passagedata pid="10" name="10" tags="" position="100,100"> OK. The door is broken, but so is the **sword**. Turn to [[5]]. </tw-passagedata>
<tw-passagedata pid="11" name="11" tags="" position="110,110"> There is a locked door here. If you have a **key** you can use that to open the door, see [[5]]. 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 [[10]]. 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 [[12]]. </tw-passagedata>
<tw-passagedata pid="12" name="12" tags="" position="120,120"> You have reached a t-junction. Here you find a **key** and a **stick**. You can go west to [[11]], or east to [[9]]. </tw-passagedata>
</tw-storydata>

View file

@ -2,7 +2,5 @@
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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.</tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Need to write this section. Sorry for it being a dead-end for now. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> (This section needs some work!) Here you find a **key** and a **stick**. You can go west to [[1]]
, or east to [[2]]
. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> (This section needs some work!) Here you find a **key** and a **stick**. You can go west to [[1]], or east to [[2]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,14 +1,8 @@
<tw-storydata name="Gamebook" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> This is where the adventure begins. You can go on to the next section, see [[400]]
or try the random selection feature at [[399]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> This is where the adventure begins. You can go on to the next section, see [[400]] or try the random selection feature at [[399]]. </tw-passagedata>
<tw-passagedata pid="397" name="397" tags="" position="3970,3970"> The end. </tw-passagedata>
<tw-passagedata pid="398" name="398" tags="" position="3980,3980"> Alternative ending. </tw-passagedata>
<tw-passagedata pid="399" name="399" tags="" position="3990,3990"> Pick a destination at random from [[400]]
or [[397]]
or [[398]]
. </tw-passagedata>
<tw-passagedata pid="400" name="400" tags="" position="4000,4000"> This is the next section. Go on to the end at [[397]]
. </tw-passagedata>
<tw-passagedata pid="399" name="399" tags="" position="3990,3990"> Pick a destination at random from [[400]] or [[397]] or [[398]]. </tw-passagedata>
<tw-passagedata pid="400" name="400" tags="" position="4000,4000"> This is the next section. Go on to the end at [[397]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,12 +1,7 @@
<tw-storydata name="Gamebook" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[4]]
at a cost of **50**. You can go on to the end at [[2]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[4]] at a cost of **50**. You can go on to the end at [[2]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> It ends here. There is a **crown** here that you can trade for some **spiderweb**. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is somewhere else. Congratulations you have found **100** gold! Go back to [[1]]
. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> Hopefully you now have 50 less gold than you just had. You can go back to [[1]]
. You can also go to [[3]]
but an angry troll is blocking your path and will only allow you to go there if you give it a **gold ring**. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is somewhere else. Congratulations you have found **100** gold! Go back to [[1]]. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> Hopefully you now have 50 less gold than you just had. You can go back to [[1]]. You can also go to [[3]] but an angry troll is blocking your path and will only allow you to go there if you give it a **gold ring**. </tw-passagedata>
</tw-storydata>

View file

@ -4,8 +4,7 @@ author = Pelle Nilsson
* 1 start
This is just an experiment exporting to the markup used in [b]Twine 2[/b] (see http://twinery.org).
A known problem is that new-lines are significant in Twine, while they are happily ignored by
gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting
to Twine 2. Also the book has to start at section 1 because currently the startnode given in
gamebookformat. The book has to start at section 1 because currently the startnode given in
the generated file is hardcoded to 1.
Many things like item management and counters are not yet implemented, but from a quick look
int the Twine 2 documentation it should be possible to add all that later.

View file

@ -35,7 +35,7 @@
<div class="sectionnumber" id="para1">1</div>
<div class="sectiontext">
This is just an experiment exporting to the markup used in <b>Twine 2</b>
(see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting to Twine 2. Also the book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to <a class="sectionref enabledlink" data-ref="3"
(see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. The book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to <a class="sectionref enabledlink" data-ref="3"
href="#section3">3</a> or <a class="sectionref enabledlink" data-ref="2"
href="#section2">the end</a>.
</div>

View file

@ -5,7 +5,7 @@
"sections" : {"IGNORE-debug-json-padding-IGNORE" : "", "start" : {
"nr" : 1,
"text" : ["" ," This is just an experiment exporting to the markup used in ", "Twine 2"
," (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting to Twine 2. Also the book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the \"Import From File\" link in the Twine 2 web GUI to import the generated file. From here you can go to ",{"reference" : "3"}," or ",{"reference" : "2", "name" : "the end"},". "]
," (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. The book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the \"Import From File\" link in the Twine 2 web GUI to import the generated file. From here you can go to ",{"reference" : "3"}," or ",{"reference" : "2", "name" : "the end"},". "]
}
, "ending" : {
"nr" : 2,

View file

@ -13,7 +13,7 @@
\
\b \qc {\*\bkmkstart s1}1{\*\bkmkend s1}
\b0\
\ql This is just an experiment exporting to the markup used in Twine 2 (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting to Twine 2. Also the book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\ql This is just an experiment exporting to the markup used in Twine 2 (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. The book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to \b {\field{\*\fldinst REF s3 \\h }{\fldrslt 3}}
\b0
or \b {\field{\*\fldinst REF s2 \\h }{\fldrslt the end}}
\b0

View file

@ -40,7 +40,7 @@ Turn to 1 to begin.
\subsection*{\begin{center} \textbf{1} \end{center}}
\noindent
This is just an experiment exporting to the markup used in Twine 2 (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting to Twine 2. Also the book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to \textbf{\autoref{section3}} or the end (\textbf{\autoref{section2}})
This is just an experiment exporting to the markup used in Twine 2 (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. The book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to \textbf{\autoref{section3}} or the end (\textbf{\autoref{section2}})
.
\vspace{1em}
\phantomsection

View file

@ -1,9 +1,6 @@
<tw-storydata name="Gamebookformat Twine 2 Export Example" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> This is just an experiment exporting to the markup used in <b>Twine 2</b> (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting to Twine 2. Also the book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to [[3]]
or [[the end->2]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> This is just an experiment exporting to the markup used in <b>Twine 2</b> (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. The book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to [[3]] or [[the end->2]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> It ends here.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is another section, just to try references. You can go on to the end at [[2]]
. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is another section, just to try references. You can go on to the end at [[2]]. </tw-passagedata>
</tw-storydata>

View file

@ -3,7 +3,7 @@
Turn to 1 to begin.
1
This is just an experiment exporting to the markup used in Twine 2 (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. Have to add some hack to strip unintended whitespace from files when exporting to Twine 2. Also the book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to 3 or the end (2).
This is just an experiment exporting to the markup used in Twine 2 (see http://twinery.org). A known problem is that new-lines are significant in Twine, while they are happily ignored by gamebookformat. The book has to start at section 1 because currently the startnode given in the generated file is hardcoded to 1. Many things like item management and counters are not yet implemented, but from a quick look int the Twine 2 documentation it should be possible to add all that later. Creating a Twine 2 document is done using twine2 output format. Use the "Import From File" link in the Twine 2 web GUI to import the generated file. From here you can go to 3 or the end (2).
2
It ends here.

View file

@ -1,7 +1,6 @@
<tw-storydata name="Gamebook" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> It starts here. You can get to [[6]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> It starts here. You can get to [[6]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Another fake section that is also ignored. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> You can not get here either, but because it is tagged as fake there will be no warning generated. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> You can not get here. Verification should warn you about that. </tw-passagedata>

View file

@ -1,15 +1,8 @@
<tw-storydata name="Gamebook" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[5]]
or [[4]]
or [[2]]
. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> 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 [[4]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[5]] or [[4]] or [[2]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> 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 [[4]]. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> This is the end. It is also included in the demo. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> This is the second demo section. You can go on to the end at [[3]]
or alternative (not in demo) end at [[2]]
. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> This is the first demo section (not counting the start section). You can go on to the end at [[3]]
. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> This is the second demo section. You can go on to the end at [[3]] or alternative (not in demo) end at [[2]]. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> This is the first demo section (not counting the start section). You can go on to the end at [[3]]. </tw-passagedata>
</tw-storydata>

View file

@ -1,6 +1,5 @@
<tw-storydata name="Example Gamebook With Maps" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="10" name="10" tags="" position="100,100"> This should have number 10, as specified in first map file. The end, at [[99]]
, should be at 99. </tw-passagedata>
<tw-passagedata pid="10" name="10" tags="" position="100,100"> This should have number 10, as specified in first map file. The end, at [[99]], should be at 99. </tw-passagedata>
<tw-passagedata pid="99" name="99" tags="" position="990,990"> Number 99, as specified in second map file.</tw-passagedata>
</tw-storydata>

View file

@ -1,22 +1,11 @@
<tw-storydata name="Gamebook" startnode="1" creator="Twine" creator-version="2.0" format="Harlowe" options="">
<style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[7]]
or [[5]]
or [[8]]
. </tw-passagedata>
<tw-passagedata pid="1" name="1" tags="" position="10,10"> 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 [[7]] or [[5]] or [[8]]. </tw-passagedata>
<tw-passagedata pid="2" name="2" tags="" position="20,20"> Alternative end. Not included in the demo.</tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> 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 [[5]]
. </tw-passagedata>
<tw-passagedata pid="3" name="3" tags="" position="30,30"> 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 [[5]]. </tw-passagedata>
<tw-passagedata pid="4" name="4" tags="" position="40,40"> This is the end. It is also included in the demo. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> This is the second demo section. You can go on to the end at [[4]]
or alternative (not in demo) end at [[2]]
. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> This section is not included in the demo. You can go on to [[5]]
or [[4]]
or [[2]]
. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> This is the first demo section (not counting the start section). You can go on to the end at [[4]]
. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> This section is not included in the demo. Turn to [[6]]
. </tw-passagedata>
<tw-passagedata pid="5" name="5" tags="" position="50,50"> This is the second demo section. You can go on to the end at [[4]] or alternative (not in demo) end at [[2]]. </tw-passagedata>
<tw-passagedata pid="6" name="6" tags="" position="60,60"> This section is not included in the demo. You can go on to [[5]] or [[4]] or [[2]]. </tw-passagedata>
<tw-passagedata pid="7" name="7" tags="" position="70,70"> This is the first demo section (not counting the start section). You can go on to the end at [[4]]. </tw-passagedata>
<tw-passagedata pid="8" name="8" tags="" position="80,80"> This section is not included in the demo. Turn to [[6]]. </tw-passagedata>
</tw-storydata>

View file

@ -28,11 +28,14 @@ def js(s):
def twine2(s):
#have to think of a good solution
return (cgi.escape(s).replace("`", "'")
return (s.replace("`", "'")
.replace("<", " `<` ")
.replace(">", " `>` ")
.replace("&", " `&` ")
.replace("\r\n", " ")
.replace("\n", " ")
.replace("[", "`[`")
.replace("]", "`]`"))
.replace("[", " `[` ")
.replace("]", " `]` "))
def no(s):
return s

View file

@ -136,8 +136,7 @@ File* link in the Twine 2 user interface to import the generated
file. If everything works as it should you can then edit and play or
debug the story in Twine 2. Currently most formatting will
be ignored and there is no support for handling collections or
counters (yet?). Also there is a known cosmetic issue with newlines in
files causing ugly line-breaks and list-items.
counters (yet?).
** Check Gamebook
The included *checkgamebook.py* script can be used to run tests
on a book and warn about things that do not look right.

View file

@ -1 +1 @@
[[%(name)s->%(nr)d]]
[[%(name)s->%(nr)d]]

View file

@ -1 +1 @@
[[%(nr)d]]
[[%(nr)d]]