From fa6b69dec50b9ecb6da8a0056a90780cea8e32a6 Mon Sep 17 00:00:00 2001 From: David Masad Date: Sat, 20 Feb 2021 21:33:51 -0500 Subject: [PATCH] Updating documentation --- Readme.md | 5 ++--- docs/Tutorial.md | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Readme.md b/Readme.md index c7c625e..145f1e7 100644 --- a/Readme.md +++ b/Readme.md @@ -6,7 +6,7 @@ You can use it in the Twine interactive editor, but at the moment it's probably ## How to use it -Add `storymanager.js` (and optionally `storymanager-widgets.tw`) to your Twine project. In JavaScript, add some story data if needed, and then add a storylet with a name, some tags (optionally), and a `generate` generator function* that `yield`s one or more instantiated storylet objects, like this: +Add `storymanager.js` to your Twine project. In JavaScript, add some story data if needed, and then add a storylet with a name, some tags (optionally), and a `generate` generator function* that `yield`s one or more instantiated storylet objects, like this: ```javascript @@ -54,8 +54,7 @@ And finally, you need to have a passage where you query for available storylets :: Jump You prep your ship to jump. -<> -<> +<> ``` (This example uses the `<>` widget from `storymanager-widgets.tw`) diff --git a/docs/Tutorial.md b/docs/Tutorial.md index 1122685..d84831a 100644 --- a/docs/Tutorial.md +++ b/docs/Tutorial.md @@ -85,7 +85,7 @@ You stand at the edge of the grand ballroom in the Duchess's palace.
<> ``` -This creates one link per available storylet. Each link will have the storylet description as its text, link to the storylet's passage, and when selected will story the storylet's data in the `$currentStorylet` variable, so that the storylet passage itself can access it. This pattern is (expected to be) common enough that there's a widget for it: `<>`. (**TODO:** Make this a macro). We may also not want to show *all* the available storylets. When there are just three guests it isn't so bad, but if the party has five, or ten, or more NPCs, giving the player the entire list will get overwhelming fast. We can randomly choose a subset, to emulate how people randomly circulate during the party. Instead, maybe we want to choose only some number of storylets to display. We can do this by passing a number to `getStorylets`indicating the maximum number of storylets to get. Storylets are selected in order of priority, so that the list is filled with higher-priority storylets first. +This creates one link per available storylet. Each link will have the storylet description as its text, link to the storylet's passage, and when selected will story the storylet's data in the `$currentStorylet` variable, so that the storylet passage itself can access it. This pattern is (expected to be) common enough that there's a macro for it: `<>`. We may also not want to show *all* the available storylets. When there are just three guests it isn't so bad, but if the party has five, or ten, or more NPCs, giving the player the entire list will get overwhelming fast. We can randomly choose a subset, to emulate how people randomly circulate during the party. Instead, maybe we want to choose only some number of storylets to display. We can do this by passing a number to `getStoryletLinks`indicating the maximum number of storylets to get. Storylets are selected in order of priority, so that the list is filled with higher-priority storylets first. #### Putting it all together @@ -131,8 +131,7 @@ StoryManager.storylets["Conversation"] = { :: Start You stand at the edge of the grand ballroom in the Duchess's palace.
-<> -<> +<> :: Conversation @@ -143,7 +142,7 @@ You make polite conversation with $talkingTo.name.
To compile this with Tweego, run: ``` -> tweego storymanager.js storymanager-widgets.tw examples\tutorial.tw -o tutorial.html +> tweego storymanager.js examples\tutorial.tw -o tutorial.html ``` ## Adding interruptions